I am using augeas to manipulate XML on some machines. Whereas creating new nodes and also setting a bunch of attributes worked like a charm I\'m biting my nails of adding a
Order matters in the Augeas tree. In that case, XML node attributes need to be set before the #text
node and the child nodes.
So what you need is:
ins #attribute before /files/test.xml/Context/#text
set /files/test.xml/Context/#attribute/allowLinking true
Note that this change is not idempotent, since insert
is not an idempotent operation.
On Puppet, you could use onlyif
to make this idempotent.