Skip to content

Instantly share code, notes, and snippets.

@hadrouj
Last active August 29, 2015 14:00
Show Gist options
  • Save hadrouj/11281755 to your computer and use it in GitHub Desktop.
Save hadrouj/11281755 to your computer and use it in GitHub Desktop.
Augeas
$ sudo yum install augeas
$ cd /usr/local/nexus-work/nexus/conf/
$ augtool -r . --noautoload --transform "Xml.lns incl /security.xml"
augtool> defnode user /files/security.xml/security/users/user[id/#text="deployment"]
# Create a new user entry if it doesn't exist yet, assign node to the "user" variable
...
augtool> save
Troubleshooting :
augtool> print /augeas//error
http://stackoverflow.com/questions/21338722/create-or-update-a-section-in-xml-file-with-augeas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment