diff --git a/manifests/system.pp b/manifests/system.pp index 069f2b06..b4a4a03c 100644 --- a/manifests/system.pp +++ b/manifests/system.pp @@ -35,11 +35,11 @@ # ignore gpg check if it is not installed, same as rvm does exec { 'system-rvm-gpg-key': - command => 'gpg2 --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3', + command => 'which gpg2 && gpg2 --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3', path => $::path, environment => $environment, - unless => 'gpg2 --list-keys D39DC0E3', - onlyif => ['gpg2 --version'], + unless => 'which gpg2 && gpg2 --list-keys D39DC0E3', + onlyif => 'which gpg2', } -> exec { 'system-rvm':