This commit is contained in:
cronekorkn 2024-09-22 01:05:57 +02:00
parent 4876f08cb0
commit d374dddf0b
Signed by: cronekorkn
SSH key fingerprint: SHA256:v0410ZKfuO1QHdgKBsdQNF64xmTxOF8osF1LIqwTcVw
5 changed files with 16 additions and 9 deletions

View file

@ -22,22 +22,20 @@ files= {
), ),
), ),
'triggers': [ 'triggers': [
'action:reload_sysctl.conf', 'svc_systemd:systemd-sysctl.service:restart',
], ],
}, },
} }
actions = { svc_systemd = {
'reload_sysctl.conf': { 'systemd-sysctl.service': {},
'command': 'sysctl --system',
'triggered': True,
},
} }
for path, value in key_value_pairs: for path, value in key_value_pairs:
actions[f'reload_sysctl.conf_{path}'] = { actions[f'reload_sysctl.conf_{path}'] = {
'command': f"sysctl --values {'.'.join(path)} | grep -q {quote('^'+value+'$')}", 'command': f"sysctl --values {'.'.join(path)} | grep -q {quote('^'+value+'$')}",
'needs': [ 'needs': [
f'action:reload_sysctl.conf', f'action:systemd-sysctl.service',
f'action:systemd-sysctl.service:restart',
], ],
} }

View file

@ -36,7 +36,7 @@
], ],
'option-data': [ 'option-data': [
{ 'name': 'routers', 'data': '10.0.0.1' }, { 'name': 'routers', 'data': '10.0.0.1' },
{ 'name': 'domain-name-servers', 'data': '1.1.1.1, 8.8.8.8, 9.9.9.9' }, { 'name': 'domain-name-servers', 'data': '10.0.10.2' },
], ],
}, },
], ],

View file

@ -145,6 +145,13 @@
'steam-chat-viewer': { 'steam-chat-viewer': {
'hostname': 'steam-chats.ckn.li', 'hostname': 'steam-chats.ckn.li',
}, },
'sysctl': {
'net': {
'ipv4': {
'ip_forward': 1,
},
},
},
'systemd-swap': 4_000_000_000, 'systemd-swap': 4_000_000_000,
'tasmota-charge': { 'tasmota-charge': {
'phone': { 'phone': {

View file

@ -1,7 +1,7 @@
{ {
'hostname': '49.12.184.229', 'hostname': '49.12.184.229',
'groups': [ 'groups': [
#'backup', 'backup',
'debian-12', 'debian-12',
'hetzner-cloud', 'hetzner-cloud',
'mailserver', 'mailserver',
@ -215,6 +215,7 @@
'10.0.0.0/24', '10.0.0.0/24',
'10.0.2.0/24', '10.0.2.0/24',
'10.0.9.0/24', '10.0.9.0/24',
'10.0.99.0/24',
], ],
}, },
'ovh.secondary': { 'ovh.secondary': {

View file

@ -1,4 +1,5 @@
{ {
'dummy': True,
'hostname': '192.168.179.20', 'hostname': '192.168.179.20',
'groups': [ 'groups': [
'debian-11', 'debian-11',