]> gitweb.fluxo.info Git - puppet-monkeysphere.git/commitdiff
Only import key if it exists
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 13 May 2019 11:55:47 +0000 (08:55 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 13 May 2019 11:55:47 +0000 (08:55 -0300)
manifests/import_key.pp

index f3124bf6cfa4ed7926ccb97fdbdb9f2c9672c23e..d34f00c26e6619c1107857380ccfdb1e6d6aee88 100644 (file)
@@ -15,6 +15,7 @@ define monkeysphere::import_key (
   exec { "monkeysphere-import-key":
     command => "monkeysphere-host import-key $path $key",
     require => [ Package["monkeysphere"], File["monkeysphere_host_conf"] ],
-    unless  => "/usr/sbin/monkeysphere-host s | grep $key > /dev/null"
+    unless  => "/usr/sbin/monkeysphere-host s | grep $key > /dev/null",
+    onlyif  => "/usr/bin/test -f $path",
   }
 }