augeas do not save file

asked 2017-08-07 04:09:12 -0600

glavriba gravatar image

I`am use this instruction(https://docs.puppet.com/puppet/latest/types/augeas.html#augeas-attribute-provider) to edit lines in my file. but in result i get some error. This is my init.pp

augeas { 'rsync.conf':
    context => '/files/etc/rsyncd.conf',
    incl => '/etc/rsyncd.conf',
    lens => 'Rsyncd.lns',
      changes => [
        "set 'uid' nobody",
        "set 'gid' nobody",
        "set 'use chroot' yes",
        "set 'max connections' 5",
        "set 'pid file' /var/run/rsyncd.pid",
        "set 'transfer logging' yes",
        "set 'timeout' 900",
        "set 'log file' /var/log/rsyncd.log",
        "set 'address' $::ip4_sats",
      ],
  }

debug output: /opt/puppetlabs/bin/puppet agent --test --trace --verbose --debug

Debug: Augeas[rsync.conf](provider=augeas): Opening augeas with root /, lens path , flags 64
Debug: Augeas[rsync.conf](provider=augeas): Augeas version 1.8.0 is installed
Debug: Augeas[rsync.conf](provider=augeas): Will attempt to save and only run if files changed
Debug: Augeas[rsync.conf](provider=augeas): sending command 'set' with params ["/files/etc/rsyncd.conf/uid", "nobody"]
Debug: Augeas[rsync.conf](provider=augeas): sending command 'set' with params ["/files/etc/rsyncd.conf/gid", "nobody"]
Debug: Augeas[rsync.conf](provider=augeas): sending command 'set' with params ["/files/etc/rsyncd.conf/use chroot", "yes"]
Debug: Augeas[rsync.conf](provider=augeas): sending command 'set' with params ["/files/etc/rsyncd.conf/max connections", "5"]
Debug: Augeas[rsync.conf](provider=augeas): sending command 'set' with params ["/files/etc/rsyncd.conf/pid file", "/var/run/rsyncd.pid"]
Debug: Augeas[rsync.conf](provider=augeas): sending command 'set' with params ["/files/etc/rsyncd.conf/transfer logging", "yes"]
Debug: Augeas[rsync.conf](provider=augeas): sending command 'set' with params ["/files/etc/rsyncd.conf/timeout", "900"]
Debug: Augeas[rsync.conf](provider=augeas): sending command 'set' with params ["/files/etc/rsyncd.conf/log file", "/var/log/rsyncd.log"]
Debug: Augeas[rsync.conf](provider=augeas): sending command 'set' with params ["/files/etc/rsyncd.conf/address", "192.168.164.53"]
Debug: Augeas[rsync.conf](provider=augeas): Put failed on one or more files, output from /augeas//error:
Debug: Augeas[rsync.conf](provider=augeas): /augeas/files/etc/rsyncd.conf/error = put_failed
Debug: Augeas[rsync.conf](provider=augeas): /augeas/files/etc/rsyncd.conf/error/path = /files/etc/rsyncd.conf
Debug: Augeas[rsync.conf](provider=augeas): /augeas/files/etc/rsyncd.conf/error/lens = /opt/puppetlabs/puppet/share/augeas/lenses/dist/rsyncd.aug:50.14-.36:
Debug: Augeas[rsync.conf](provider=augeas): /augeas/files/etc/rsyncd.conf/error/message = Failed to match tree

     { ".anon" }
     { "app" }
     { "uid" = "nobody" }
     { "gid" = "nobody" }
     { "use chroot" = "yes" }
     { "max connections" = "5" }
     { "pid file" = "/var/run/rsyncd.pid" }
     { "transfer logging" = "yes" }
     { "timeout" = "900" }
     { "log file" = "/var/log/rsyncd.log" }
     { "address" = "192.168.164.53" }

  with pattern
       { /\\.anon/ }?
    { /#comme[^]\001-\004\n\r\/n][^]\001-\004\n\r\/][^]\001-\004\n\r\/]*|#comme[^]\001-\004\n\r\/n]|#comme|(#comment[^]\001-\004\n\r\/][^]\001-\004\n\r\/]|#commen[^]\001-\004\n\r\/t][^]\001-\004\n\r\/])[^]\001-\004\n\r\/]*|#comment[^]\001-\004\n\r\/]|#commen[^]\001-\004\n\r\/t]|#commen|#comm[^]\001-\004\n\r\/e][^]\001-\004\n\r ...
(more)
edit retag flag offensive close merge delete