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.