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] edit files in place (makes backup if extension supplied)" Frank - I will read about the augeas type. As a newbie in Puppet, it was unknown to me. Thanks, -fred On Fri, Aug 26, 2011 at 8:16 AM, Frank Sweetser <f...@wpi.edu> 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/selinux/config": > > path => [ '/usr/bin', '/bin' ], > > onlyif => "/bin/grep '^SELINUX=enforcing' /etc/sysconfig/selinux > 2>/dev/null", > > logoutput => true, > > } > > As an alternative to the exec method, you might want to look into using the > augeas type instead. It's capable of reading /etc/sysconfig/selinux and > managing the entries within it. > > -- > Frank Sweetser fs at wpi.edu | For every problem, there is a solution > that > Manager of Network Operations | is simple, elegant, and wrong. > Worcester Polytechnic Institute | - HL Mencken > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.