voxpupuli / puppet-augeasproviders_syslog

Augeas-based syslog type and providers for Puppet
Apache License 2.0
3 stars 8 forks source link

module isn't compatible with solaris syslog #3

Open vchepkov opened 8 years ago

vchepkov commented 8 years ago

Hi,

Could you add support for Solaris syslog configuration, please? I assume current module doesn't like this constructs:

# if a non-loghost machine chooses to have authentication messages
# sent to the loghost machine, un-comment out the following line:
#auth.notice                    ifdef(`LOGHOST', /var/log/authlog, @loghost)

mail.debug                      ifdef(`LOGHOST', /var/log/syslog, @loghost)

#
# non-loghost machines will use the following lines to cause "user"
# log messages to be logged locally.
#
ifdef(`LOGHOST', ,
user.err                                        /dev/sysmsg
user.err                                        /var/adm/messages
user.alert                                      `root, operator'
user.emerg                                      *
)

when trying to apply this resource:

syslog { 'local0':
  ensure      => present,
  facility    => 'local0',
  level       => 'info',
  action_type => 'file',
  action      => '/var/log/local0.log',
  target      => '/etc/syslog.conf',
  provider    => 'augeas',
}

I get an error:

Error: /Stage[main]/Main/Syslog[local0]: Could not evaluate: Augeas didn't load /etc/syslog.conf with Syslog.lns: Get did not match entire input (line:24, character:0)

Thank you

raphink commented 8 years ago

Afaik, this construct is not supported by the lens. Please open a bug in Augeas itself for this.