Hi,
On 25/06/2015 08:09, hoize wrote:
> I want to uncomment a line in a file, for example:
>
> */root/.bashrc*
> # export LS_OPTIONS='--color=auto'
>
>
> *after change:*
> export LS_OPTIONS='--color=auto'
Maybe this (not tested):
file_line { 'uncomment-line-in-bashrc':
path => '/root/.bashrc',
line => "export LS_OPTIONS='--color=auto' # Uncommented by Puppet",
match => '^#?[[:space:]]*export LS_OPTIONS=.*$',
}
file_line is provided by the stdlib (which should be installed of course).
HTH.
François Lafont
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/558BD628.7050604%40gmail.com.
For more options, visit https://groups.google.com/d/optout.