Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nigel Kersten
On Thu, Jun 23, 2011 at 9:25 AM, Peter Meier wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > I am hesitant for us to put something like this in the core distribution though, simply because we know it's a maintenance problem over time. >>> >>> Fair enough. >>> >>> Though I imag

Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >>> I am hesitant for us to put something like this in the core distribution >>> though, simply because we know it's a maintenance problem over time. >> >> Fair enough. >> >> Though I imagine not having this feature will lose puppet some people. > > T

Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Aaron Grewell
There are at least three ways to do this: 1) Use an Augeas resource to edit the file. For system files this can be a good solution since Augeas generally has lenses for them. 2) Use an Exec resource and something like sed or cat. Not my preferred approach but sometimes the easiest, especially if y

Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nigel Kersten
On Thu, Jun 23, 2011 at 8:06 AM, Nico -telmich- Schottelius wrote: > Nigel Kersten [Thu, Jun 23, 2011 at 07:51:23AM -0700]: >> nico-puppet-us...@schottelius.org> wrote: >> [...] >> I am hesitant for us to put something like this in the core distribution >> though, simply because we know it's a mai

Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nico -telmich- Schottelius
Nigel Kersten [Thu, Jun 23, 2011 at 07:51:23AM -0700]: > nico-puppet-us...@schottelius.org> wrote: > [...] > I am hesitant for us to put something like this in the core distribution > though, simply because we know it's a maintenance problem over time. Fair enough. Though I imagine not having th

Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nigel Kersten
On Thu, Jun 23, 2011 at 8:00 AM, Kinzel, David wrote: > > I just think having some built-in functions for text patterns would be > lovely. There are many cases where something like addifnosuchline would > be perfectly valid. Just because it won't be the solution in all cases > doesn't mean it shou

RE: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Kinzel, David
these sometime.. :> From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On Behalf Of Nigel Kersten Sent: Thursday, June 23, 2011 8:38 AM To: puppet-users@googlegroups.com Subject: Re: [Puppet Users] How to add extra lin

Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nigel Kersten
On Thu, Jun 23, 2011 at 7:46 AM, Nico -telmich- Schottelius < nico-puppet-us...@schottelius.org> wrote: > Nigel, > > Nigel Kersten [Thu, Jun 23, 2011 at 07:37:30AM -0700]: > > [...] > > > > It's simple enough at first, [...] > > > > that's exactly the use case for __addifnosuchline in cdist. > The

Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nico -telmich- Schottelius
Nigel, Nigel Kersten [Thu, Jun 23, 2011 at 07:37:30AM -0700]: > [...] > > It's simple enough at first, [...] > that's exactly the use case for __addifnosuchline in cdist. The type let's you do what you want to do right now, fast and simple. That's what a feature I've always missed in puppet. >

Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nigel Kersten
On Thu, Jun 23, 2011 at 6:37 AM, Kinzel, David wrote: > >> this is not directly built into puppet. > > > >Is there any specific reason why this is not built into puppet? > > > >We've put __addifnosuchline [0] into cdist [1] as one of > >the most basic features, because it's often needed if you do

Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Martin Alfke
On 06/23/2011 03:37 PM, Kinzel, David wrote: >>> this is not directly built into puppet. >> >> Is there any specific reason why this is not built into puppet? >> >> We've put __addifnosuchline [0] into cdist [1] as one of >> the most basic features, because it's often needed if you do not >> care a

RE: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Kinzel, David
>> this is not directly built into puppet. > >Is there any specific reason why this is not built into puppet? > >We've put __addifnosuchline [0] into cdist [1] as one of >the most basic features, because it's often needed if you do not >care about the existing contents, but just need to add a line.

Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nico -telmich- Schottelius
Martin Alfke [Thu, Jun 23, 2011 at 02:51:07PM +0200]: > On 06/23/2011 12:55 PM, Sans wrote: > > [...] how do I add some extra lines in a existing file [...] > > this is not directly built into puppet. Is there any specific reason why this is not built into puppet? We've put __addifnosuchline [0]

Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Martin Alfke
On 06/23/2011 12:55 PM, Sans wrote: > Dear all, > > As in the title, how do I add some extra lines in a existing file and > check every time for its presence? I just don't want to copy over the > existing file for some good reason (system files etc.). > > Any idea how should I do that? cheers!! >

[Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Sans
Dear all, As in the title, how do I add some extra lines in a existing file and check every time for its presence? I just don't want to copy over the existing file for some good reason (system files etc.). Any idea how should I do that? cheers!! -- You received this message because you are subs