Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Frederiko Costa
Hi folks, for the next user looking for help ... augeas did the trick augeas { "selinux": context => "/files/etc/sysconfig/selinux/", changes => [ "set SELINUX disabled" ], } debug: Augeas[selinux](provider=augeas): Augeas version 0.8.1 is installed debug: Augeas[selinux](provider=augeas

Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Frederiko Costa
I tried both suggestions: egrep and adding the -e switch on sed, but none worked. I'm going to try augeas ... -fred On Fri, Aug 26, 2011 at 8:31 AM, Kinzel, David wrote: > > Hi folks, > > > > I have the following resource on my test environ: > > > > exec { "/bin/sed -i 's/^SELINUX=enforcing/S

RE: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Kinzel, David
> Hi folks, > > I have the following resource on my test environ: > > exec { "/bin/sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config": > path => [ '/usr/bin', '/bin' ], > onlyif => "/bin/grep '^SELINUX=enforcing' /etc/sysconfig/selinux 2>/dev/null", > logoutput => true

Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Frederiko Costa
I will give a try and get back to you soon. You may be correct. -fred On Fri, Aug 26, 2011 at 8:30 AM, Aaron Grewell wrote: > I'm clear on what -i does, but I thought -e was also required. I'm not a > sed expert, but last time I left out -e things went rather badly. > > On Fri, Aug 26, 2011

Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Aaron Grewell
I'm clear on what -i does, but I thought -e was also required. I'm not a sed expert, but last time I left out -e things went rather badly. On Fri, Aug 26, 2011 at 8:25 AM, Frederiko Costa wrote: > Hi folks, > > Thanks for the quick help > > Aaron - the -i does an in place modification. If I run

Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Frederiko Costa
Hi folks, Thanks for the quick help Aaron - the -i does an in place modification. If I run on the command-line, works fine. If I don't use -i, I would have to use some sort of redirection and replace the original file. I will try placing -e as well for testing sake "-i[SUFFIX], --in-place[=SUFFIX

Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Aaron Grewell
Or just push a new file, that's what we do. On Fri, Aug 26, 2011 at 8:16 AM, Frank Sweetser wrote: > On 08/26/2011 11:03 AM, Frederiko Costa wrote: > > Hi folks, > > > > I have the following resource on my test environ: > > > > exec { "/bin/sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' > /etc/

Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Frank Sweetser
On 08/26/2011 11:03 AM, Frederiko Costa wrote: > Hi folks, > > I have the following resource on my test environ: > > exec { "/bin/sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' > /etc/selinux/config": > path => [ '/usr/bin', '/bin' ], > onlyif => "/bin/grep '^SELINUX=enforcing' /etc/sys

Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Aaron Grewell
I think you may have a typo in your resource: /bin/sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' should have '-e' after '-i' I believe. On Fri, Aug 26, 2011 at 8:03 AM, Frederiko Costa wrote: > Hi folks, > > I have the following resource on my test environ: > > exec { "/bin/sed -i 's/^SELINUX=

[Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Frederiko Costa
Hi folks, I have the following resource on my test environ: exec { "/bin/sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config": path => [ '/usr/bin', '/bin' ], onlyif => "/bin/grep '^SELINUX=enforcing' /etc/sysconfig/selinux 2>/dev/null", logoutput => true, } Whenever