aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2019-05-13 08:55:47 -0300
committerSilvio Rhatto <rhatto@riseup.net>2019-05-13 08:55:47 -0300
commita2c7585e4236c6fe780baeb6f263c85b548ecba4 (patch)
treedefb08a6083de4c93ce7af664519c7bc785bfe06
parent4094ff54a47bf9ab3401475237d75f0cac62ddb4 (diff)
downloadpuppet-monkeysphere-a2c7585e4236c6fe780baeb6f263c85b548ecba4.tar.gz
puppet-monkeysphere-a2c7585e4236c6fe780baeb6f263c85b548ecba4.tar.bz2
Only import key if it exists
-rw-r--r--manifests/import_key.pp3
1 files changed, 2 insertions, 1 deletions
diff --git a/manifests/import_key.pp b/manifests/import_key.pp
index f3124bf..d34f00c 100644
--- a/manifests/import_key.pp
+++ b/manifests/import_key.pp
@@ -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",
}
}