Hi , I"m trying to add a entry in /etc/syslog.conf using puppet augeas like this " *.warning;mail.none;authpriv.none;cron.none @syslog_host" ,
seems the way to do this with augeas is : augeas { "syslog_conf": lens => "syslog.lns", incl => "/etc/syslog.conf", changes => [ "ins entry after entry[last()]", "set entry[last()]/selector[1]/facility '*'", "set entry[last()]/selector[1]/level warning", "set entry[last()]/selector[2]/facility mail", "set entry[last()]/selector[2]/level none", "set entry[last()]/selector[3]/facility authpriv", "set entry[last()]/selector[3]/level none", "set entry[last()]/selector[4]/facility cron", "set entry[last()]/selector[4]/level none", "set entry[last()]/action/hostname syslog_host", ], onlyif => "match entry[hostname = 'syslog_host'] size == 0", } which is a lot of entries just for one line of config file, also augeas has some problem on Solaris 10 to parse /etc/syslog.conf , it there a better way ? I know could use file server or template, but I'm just trying to add an entry to the existing syslog.conf file, rather than store them in puppet master. there's a puppet module at https://github.com/mstrauss/puppet-editfile , which I haven't tried yet. Is there a plan to add "editfile" feature to puppet , this is becoming rather frustrating . Thanks. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/YqXFiwuWtxQJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.