augtool not saving the XML file to the disk

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

R gravatar image

I am following the following link 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/local/mnt/workspace/Book.xml/Book/#text = "\n"
      /files/local/mnt/workspace/Book.xml/Book/BOOKNAME/#text = "Oracle 12c"
       /files/Book[1]/AUTHOR/#text = "Richard Gosling"
        /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 
    <BOOKNAME>Oracle 12c</BOOKNAME>

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