bundlewrap/bundles/rsyslogd/metadata.py

38 lines
828 B
Python
Raw Normal View History

2023-08-28 15:21:48 +00:00
from bundlewrap.metadata import atomic
defaults = {
'apt': {
'packages': {
'rsyslog': {},
},
},
2024-09-08 15:19:03 +00:00
'backups': {
'paths': {
'/var/log/rsyslog',
},
},
2023-08-28 15:21:48 +00:00
'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())),
},
},
}