Hi Tom,
Thanks for the reply. I hadn't used the 'file' method as I didn't want to
create the file if it wasn't there already, only modify it. Sorry I should
have said that in my original post. It was this requirement that made it
less than straightforward.
Cheers,
Cam
On Tuesday, 30 June 201
You'll want to create the file using file{} and then add require =>
File['/path/to/file'] so that the file is created before Puppet tries
to modify it.
You can do that with less typing by using the -> operator. For example:
file { '/usr/share/X11/xorg.conf.d/glamor.conf':
ensure => file,
Hi,
I wanted to create a recipe for hashing a line in a file (I'd rather hash
it than delete it), if the file is present and that particular line is
present. I came up with a less than elegant solution and wondered whether
someone knows of a better way.
The file in question: /usr/share/X11/xorg