32 lines
738 B
Python
32 lines
738 B
Python
from bundlewrap.metadata import atomic
|
|
|
|
defaults = {
|
|
'apt': {
|
|
'packages': {
|
|
'rsyslog': {},
|
|
},
|
|
},
|
|
'icinga2_api': {
|
|
'rsyslog': {
|
|
'services': {
|
|
'RSYSLOGD PROCESS': {
|
|
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_systemd_unit rsyslog',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
|
|
@metadata_reactor.provides(
|
|
'firewall/port_rules',
|
|
)
|
|
def firewall(metadata):
|
|
return {
|
|
'firewall': {
|
|
'port_rules': {
|
|
'514': atomic(metadata.get('rsyslogd/restrict-to', set())),
|
|
'514/udp': atomic(metadata.get('rsyslogd/restrict-to', set())),
|
|
},
|
|
},
|
|
}
|