bundlewrap/bundles/rsyslogd/metadata.py

33 lines
742 B
Python
Raw Permalink Normal View History

2023-08-28 15:21:48 +00:00
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': {
2023-09-24 18:59:58 +00:00
'514/tcp': atomic(metadata.get('rsyslogd/restrict-to', set())),
2023-08-28 15:21:48 +00:00
'514/udp': atomic(metadata.get('rsyslogd/restrict-to', set())),
},
},
}