This one is different from examples on that page, in that file
/etc/securetty is not name value pair, it just has values in it. I used the
following as the workaround:
augeas { "securetty":
context => "/files/etc/securetty",
changes => [
"set *[.='tty9'] ttyS1",
],
onlyif => "match ttyS1 size == 0",
}
But I was not able to figure out how to just add one new line without
changing existing line.
Hai
On Wed, Sep 8, 2010 at 9:08 AM, Rob McBroom <[email protected]>wrote:
> On Sep 6, 2010, at 3:41 AM, hai wu wrote:
>
> > Hi, I need to add one line to /etc/securetty, say it needs to be ttyS1.
> Do not add it if ttyS1 already exists in file /etc/securetty.
> >
> > How to achieve this using puppet module in puppet 2.5? This file is
> different than the other examples using augeas, this one only has value per
> line, not name-val pair.
>
> Which examples are you looking at? There's a lengthy discussion of this
> very scenario in the Wiki.
>
>
> http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Augeas#Paths+for+Numbered+Items
>
> --
> Rob McBroom
> <http://www.skurfer.com/>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<puppet-users%[email protected]>
> .
> 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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.