python3.12 compat

This commit is contained in:
Franzi 2024-04-28 21:40:35 +02:00
parent 65af9ae0c5
commit 9e78b9e07b
Signed by: kunsi
GPG key ID: 12E3D2136B818350
4 changed files with 6 additions and 6 deletions

View file

@ -200,8 +200,8 @@ def telegraf_anon_timing(metadata):
result[f'nginx-{vname}'] = {
'files': [f'/var/log/nginx-timing/{vname}.log'],
'from_beginning': False,
'grok_patterns': ['%{LOGPATTERN}'],
'grok_custom_patterns': 'LOGPATTERN \[%{HTTPDATE:ts:ts-httpd}\] %{NUMBER:request_time:float} (?:%{NUMBER:upstream_response_time:float}|-) "%{WORD:verb:tag} %{NOTSPACE:request} HTTP/%{NUMBER:http_version:float}" %{NUMBER:resp_code:tag}',
'grok_patterns': [r'%{LOGPATTERN}'],
'grok_custom_patterns': r'LOGPATTERN \[%{HTTPDATE:ts:ts-httpd}\] %{NUMBER:request_time:float} (?:%{NUMBER:upstream_response_time:float}|-) "%{WORD:verb:tag} %{NOTSPACE:request} HTTP/%{NUMBER:http_version:float}" %{NUMBER:resp_code:tag}',
'data_format': 'grok',
'name_override': 'nginx_timing',
}

View file

@ -101,7 +101,7 @@ if 'dkim' in node.metadata.get('rspamd', {}):
actions = {
'rspamd_assure_dkim_key_permissions': {
'command': 'chown _rspamd:_rspamd /var/lib/rspamd/dkim/*.key',
'unless': 'test -z "$(find /var/lib/rspamd/ -iname \"*.key\" \! -user _rspamd)"',
'unless': r'test -z "$(find /var/lib/rspamd/ -iname \"*.key\" \! -user _rspamd)"',
'needs': {
'action:rspamd_generate_dkim_key',
'directory:/var/lib/rspamd/dkim',

View file

@ -212,8 +212,8 @@ nodes['home.nas'] = {
'nas_permissions': {
'command': [
'chown -R :nas /storage/nas/',
'find /storage/nas/ -type d -exec chmod 0775 {} \;',
'find /storage/nas/ -type f -exec chmod 0664 {} \;',
r'find /storage/nas/ -type d -exec chmod 0775 {} \;',
r'find /storage/nas/ -type f -exec chmod 0664 {} \;',
],
'when': '*-*-* 02:00:00',
},

View file

@ -45,7 +45,7 @@ nodes['home.router'] = {
# connected longer than 24 hours. We install this cronjob
# to make sure we don't get disconnected randomly during the
# day.
'restart_pppd': '23 2 * * * root systemctl restart pppoe && date -u +\%s > /var/tmp/pppd-last-restart.status',
'restart_pppd': r'23 2 * * * root systemctl restart pppoe && date -u +\%s > /var/tmp/pppd-last-restart.status',
},
},
'kea-dhcp-server': {