On Mon, 2009-06-15 at 08:07 -0700, iuhh wrote:
> Thanks very much David, that explained it.
>
> I've changed the manifest to the following and it is now working fine.
> augeas { "inittab":
> context => "/files/etc/inittab",
> changes => [ "set 01/id 'co'",
> "set 01/runlevels 2345",
> "set 01/action respawn",
> "set 01/process \"/sbin/agetty ttyS0 19200 vt100\"",
> ],
> onlyif => "match *[id='co'] size == 0",
> }
Just as a headsup: the next version of Augeas (the one after 0.5.1) will
have a slightly different tree structure for inittab; we'll use the id
field from inittab as the name of the subtree for that line; with that,
your example would become
augeas { "inittab":
context => "/files/etc/inittab",
changes => [ "set co/runlevels 2345",
"set co/action respawn",
"set co/process \"/sbin/agetty ttyS0 19200 vt100\"",
],
onlyif => "match co size == 0",
}
I generally try not to break the structure of the tree, but in this case
I think it's leads to a clear improvement.
David
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---