Skip to content

Commit

Permalink
Added '/usr/bin' to path for Exec as it might be needed by some RHEL …
Browse files Browse the repository at this point in the history
…version of grep
  • Loading branch information
Benjamin Merot committed Nov 30, 2016
1 parent fa8be1b commit 00327fb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions manifests/init.pp
Expand Up @@ -91,14 +91,20 @@
exec { 'RHNSM-register':
command => "subscription-manager register --name='${::fqdn}' --username='${rh_user}' --password='${rh_password}' ${proxycli}",
onlyif => 'subscription-manager identity | grep "not yet registered"',
path => '/usr/sbin',
path => [
'/usr/bin'
'/usr/sbin'
],
require => Package['subscription-manager'],
}

exec { 'RHNSM-subscribe':
command => $command,
onlyif => 'subscription-manager list | grep "Not Subscribed\|Unknown"',
path => '/usr/sbin',
path => [
'/usr/bin'
'/usr/sbin'
],
require => Exec['RHNSM-register'],
}

Expand Down

0 comments on commit 00327fb

Please sign in to comment.