augtool not saving the XML file to the disk

asked 2015-11-05 13:01:02 -0600

R gravatar image

I am following the following link https://twiki.cern.ch/twiki/bin/view/... to use Augeas to parse a XML file.

    [root@devopsdev manifests]# /opt/puppet/bin/augtool --noload --noautoload --echo
       augtool>  set /augeas/load/xml/lens "Xml.lns"
       augtool> set /augeas/load/xml/incl "/local/mnt/workspace/Book.xml"
       augtool> load
       augtool>set Book[BOOKNAME/#text = \"Oracle 12c\"]/AUTHOR/#text 'Richard Gosling'
       augtool>  set Book[BOOKNAME/#text = \"Oracle 12c\"]/ISBN/#text '0-07-913702-4'
        augtool> save
       augtool> print /files
        /files
       /files/local
       /files/local/mnt
       /files/local/mnt/workspace
       /files/local/mnt/workspace/Book.xml
       /files/local/mnt/workspace/Book.xml/Book
        /files/local/mnt/workspace/Book.xml/Book/#text = "\n"
       /files/local/mnt/workspace/Book.xml/Book/BOOKNAME
      /files/local/mnt/workspace/Book.xml/Book/BOOKNAME/#text = "Oracle 12c"
       /files/local/mnt/workspace/Book.xml/Book/AUTHOR
       /files/Book[1]/AUTHOR/#text = "Richard Gosling"
       /files/Book[2]
       /files/Book[2]/ISBN
        /files/Book[2]/ISBN/#text = "0-07-913702-4"

If I cat the xml I dont see the new changes:

 [root@devopsdev manifests]# cat /local/mnt/workspace/Book.xml 
   <Book>
    <BOOKNAME>Oracle 12c</BOOKNAME>
  </Book>

I am using RHEL and puppet 3.7.2

 [root@devopsdev manifests]# cat /etc/release 
  Red Hat Enterprise Linux Server release 6.6 (Santiago)

 [root@devopsdev manifests]# puppet --version
   3.7.4 (Puppet Enterprise 3.7.2)

Thanks in advance

edit retag flag offensive close merge delete