From 2d62ec231cf84dd54921ee10aff0b7a32de22d04 Mon Sep 17 00:00:00 2001 From: Chris Edester Date: Thu, 5 Feb 2015 09:16:12 -0500 Subject: [PATCH] Use which to test for gpg2 Running gpg2 directly fails on systems without this command. Puppet pre checks for commands in the path. --- manifests/system.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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':