Skip to content

Commit

Permalink
Add path to exec commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mbbx6spp committed Mar 16, 2012
1 parent d867608 commit d8cb96d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}

# apt support preferences.d since version >= 0.7.22
case $lsbdistcodename {
case $lsbdistcodename {
/lucid|squeeze/ : {

file {"/etc/apt/preferences":
Expand Down Expand Up @@ -44,5 +44,6 @@
exec { "apt-get_update":
command => "apt-get update",
refreshonly => true,
path => ['/usr/sbin', '/usr/bin'],
}
}
12 changes: 7 additions & 5 deletions manifests/key.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@

exec { "import gpg key ${name}":
command => "${thekey} | apt-key add -",
unless => "apt-key list | grep -Fqe '${name}'",
before => Exec["apt-get_update"],
notify => Exec["apt-get_update"],
unless => "apt-key list | grep -Fqe '${name}'",
before => Exec["apt-get_update"],
notify => Exec["apt-get_update"],
path => ['/usr/sbin', '/usr/bin'],
}
}

absent: {
exec {"apt-key del ${name}":
onlyif => "apt-key list | grep -Fqe '${name}'",
onlyif => "apt-key list | grep -Fqe '${name}'",
path => ['/usr/sbin', '/usr/bin'],
}
}

Expand Down

0 comments on commit d8cb96d

Please sign in to comment.