From: Silvio Rhatto Date: Mon, 13 May 2019 11:55:47 +0000 (-0300) Subject: Only import key if it exists X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=a2c7585e4236c6fe780baeb6f263c85b548ecba4;p=puppet-monkeysphere.git Only import key if it exists --- 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", } }