所以我正在尝试做一些看起来与" 通过augeas向XML根节点添加属性的问题"相同的问题,但是提供的答案对我不起作用.没有insert命令,我收到此错误消息(在puppet agent -t --debug --verbose模式下):
Debug: Augeas[context.xml](provider=augeas): /augeas/files/usr/share/tomcat/conf/context.xml/error/message = Failed to match
{ /#attribute/ }?({ /#text/ = /(\\]\\]\\]*[^]\001-\004<>][^]\001-\004<]*\\]|(\\][^]\001-\004<]|[^]\001-\004<][^]\001-\004<])[^]\001-\004<]*\\]|[^]\001-\004<]\\])(\\]\\]*[^]\001-\004<>][^]\001-\004<]*\\]|[^]\001-\004<][^]\001-\004<]*\\])*(\\]\\]*([^]\001-\004<>][^]\001-\004<]*|)|[^]\001-\004<][^]\001-\004<]*|)|\\]\\]\\]*([^]\001-\004<>][^]\001-\004<]*|)|(\\][^]\001-\004<]|[^]\001-\004<][^]\001-\004<])[^]\001-\004<]*|\\]|[^]\001-\004<]/ } | { /#comment/ = /([^\001-\004-]|-[^\001-\004-])*/ } | <<rec>> | { /[:A-Z_a-z][.0-:A-Z_a-z-]*/ = /#empty/ } | { /#pi/ })*
with tree
{ "#text" = "
" } { "#comment" = " Default set of monitored resources " } { "#text" = "
" } { "WatchedResource" } { "#text" = "
" } { "#comment" = " Uncomment …Run Code Online (Sandbox Code Playgroud)