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': [
'action:reload_sysctl.conf',
'svc_systemd:systemd-sysctl.service:restart',
],
},
}
actions = {
'reload_sysctl.conf': {
'command': 'sysctl --system',
'triggered': True,
},
svc_systemd = {
'systemd-sysctl.service': {},
}
for path, value in key_value_pairs:
actions[f'reload_sysctl.conf_{path}'] = {
'command': f"sysctl --values {'.'.join(path)} | grep -q {quote('^'+value+'$')}",
'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': [
{ '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': {
'hostname': 'steam-chats.ckn.li',
},
'sysctl': {
'net': {
'ipv4': {
'ip_forward': 1,
},
},
},
'systemd-swap': 4_000_000_000,
'tasmota-charge': {
'phone': {

View file

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

View file

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