This expression would match more than just "puppet".

Example:

root@eggplant:~/infra-puppet# gem list | grep puppet
librarian-puppet (0.9.9)
root@eggplant:~/infra-puppet# gem uninstall -ax puppet facter
ERROR:  While executing gem ... (Gem::InstallError)
    cannot uninstall, check `gem list -d puppet`
This commit is contained in:
Kohsuke Kawaguchi 2013-11-03 21:58:43 -08:00
parent fcb1435756
commit 3c7233d98d
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,7 @@ class base::post {
exec {
'kill puppet gems' :
onlyif => 'gem list | grep puppet',
onlyif => 'gem list | grep ^puppet',
command => 'gem uninstall -ax puppet facter',
path => ['/var/lib/gems/1.8/bin', '/usr/local/bin', '/usr/bin', '/bin'];
}