bundlewrap/bundles/l4d2/items.py
mwiegand 6fc6f0b6f4 wip
2021-10-10 20:48:14 +02:00

21 lines
544 B
Python

directories = {
'/etc/left4dead2': {
'owner': 'steam',
'purge': True,
}
}
for name, config in node.metadata.get('left4dead2').items():
config.pop('port')
config['hostname'] = name
files[f'/etc/left4dead2/{name}.cfg'] = {
'content': '\n'.join(
f'{key} "{value}"' for key, value in config.items()
),
'owner': 'steam',
'triggers': [
f'svc_systemd:left4dead2-server-{name}:restart',
],
}
svc_systemd[f'left4dead2-server-{name}'] = {}