Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

augeas: update xml value based on previous tag

$
0
0
Hi, I have a simple issue while updating xml file but I'm not able to find the solution after trying many things out. I am trying to update password based on the username which is defined in just previous tag of password tag. My xml file is below:user1pass1user2pass2user3pass3 Here, based on the username in tag I need to update password in tag. I have tried following but it's not working: augeas {'Update external.xml': incl => '/tmp/external.xml', context => '/files/tmp/external.xml/ns2:tokens', lens => "xml.lns", changes => ["set /files/external.xml/token/[name/#text='user2'/name]/value/#text newpass2",] } Any idea?

Viewing all articles
Browse latest Browse all 6104


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>