 <p>Order matters in the Augeas tree. In that case, XML node attributes need to be set before the <code>#text</code> node and the child nodes.</p> <p>So what you need is:</p> <pre><code>ins #attribute before /files/test.xml/Context/#text set /files/test.xml/Context/#attribute/allowLinking true </code></pre> <p>Note that this change is not idempotent, since <code>insert</code> is not an idempotent operation.</p> <p>On Puppet, you could use <code>onlyif</code> to make this idempotent.</p>