Issues adding attribute to XML root node via augeas

荒凉一梦 提交于 2019-12-01 11:11:54

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!