voxpupuli / puppet-rsyslog

Puppet module for managing rsyslog
https://forge.puppet.com/puppet/rsyslog
Apache License 2.0
10 stars 54 forks source link

How do I use this? #206

Closed itinneed2022 closed 1 year ago

itinneed2022 commented 2 years ago

I've been trying to write a couple of custom config files using this module and I can't seem to figure out how to reference my hiera data correctly. I'm trying to configure my

In my rsyslog.yaml file I have:

rsyslog::server::custom_config:
remote_udp_logs:
    priority: 15
    content: |
      ruleset(name="remote_udp"){
        local5.info action(type="omfile" file="/var/log/router_temp/local5info.log" FileCreateMode="0644")
        local7.debug action(type="omfile" file="/var/log/router_temp/local7.log" FileCreateMode="0644")
        local5.debug action(type="omfile" file="/var/log/router_temp/local5debug.log" FileCreateMode="0644")
        local2.debug action(type="omfile" file="/var/log/router_temp/local2debug.log" FileCreateMode="0644")
      }
      ruleset(name="remote_tcp"){
          action(type="omfile" file="/var/log/router_temp/v8temptcp.log" FileCreateMode="0644")
      }

      input(type="imudp" port="514" ruleset="remote_udp")
      input(type="imptcp" port="514" ruleset="remote_tcp")

And in my custom_rsyslog.pp file I have:

$rsyslog_custom_conf        = hiera('rsyslog::server::custom_config')
include rsyslog::config
rsyslog::server: $rsyslog_custom_conf

This does nothing. How do I reference my hiera config in my profile?