Marley Bacelar <marleybace...@gmail.com> writes:

> I need to replace some text in a file... there is some type, that i can pass
> a value and to be replace and the destination file?

I know this sounds like a great idea, but decades of experience with puppet
and proceeding tools tell us that editing the content of files is very, very
hard to get right.

You would almost certainly be better off copying the right file content into
place, so that you don't have the extra complexity.


As an alternative, building the file from fragments with one of the
'concatenated files' classes is a pretty sound idea; it makes it easy have
variable sections inside the file without needing to edit-in-place.

> or anyone here have some class who does that?

There are a couple in the common module collections; check out the wiki for
the links off to 'em.  Their current state may have changed since I last
looked, so I don't have a specific recommendation for you.

        Daniel

Y'see, I learned that lesson way back when cfengine provided really good tools
for doing this sort of editing, and it *always* tool much longer and was much
less robust than I expected...

-- 
✣ Daniel Pittman            ✉ dan...@rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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.

Reply via email to