Skip to content

Commit

Permalink
Set a default path for Exec
Browse files Browse the repository at this point in the history
Set a default path for Exec so you don't get an error if not set.
  • Loading branch information
cwarden committed Feb 16, 2012
1 parent 2fbaa24 commit 1798dfc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions manifests/repo.pp
@@ -1,4 +1,7 @@
class newrelic::repo {
Exec {
path => ['/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin']
}
case $operatingsystem {
/Debian|Ubuntu/: {
exec { newrelic-add-apt-key:
Expand Down
4 changes: 4 additions & 0 deletions manifests/server.pp
Expand Up @@ -3,6 +3,10 @@

if $newrelic_license == undef{ fail('$newrelic_license not defined') }

Exec {
path => ['/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin']
}

exec { "newrelic-set-license":
unless => "egrep -q '^license_key=${newrelic_license}$' /etc/newrelic/nrsysmond.cfg",
command => "nrsysmond-config --set license_key=${newrelic_license}",
Expand Down

0 comments on commit 1798dfc

Please sign in to comment.