From 8fab3769595c5f7eb0ad5410c94f34d0ca2273d2 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Thu, 17 Jun 2021 00:29:36 +0200 Subject: [PATCH] wip --- bundles/opendkim/items.py | 44 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/bundles/opendkim/items.py b/bundles/opendkim/items.py index 792f7da..1e0ccd9 100644 --- a/bundles/opendkim/items.py +++ b/bundles/opendkim/items.py @@ -52,29 +52,29 @@ for domain in node.metadata.get('opendkim/domains'): } files[f'/etc/opendkim/keys/{domain}/mail.private'] = { **file_attributes, - 'content_type': 'any', - } - files[f'/etc/opendkim/keys/{domain}/mail.txt'] = { - **file_attributes, - 'content_type': 'any', - } - actions[f'generate_{domain}_dkim_key'] = { - 'command': ( - f'sudo --user opendkim' - f' opendkim-genkey' - f' --selector=mail' - f' --directory=/etc/opendkim/keys/{domain}' - f' --domain={domain}' - ), - 'unless': f'test -f /etc/opendkim/keys/{domain}/mail.private', - 'needs': [ - 'svc_systemd:opendkim', - f'directory:/etc/opendkim/keys/{domain}', - ], - 'triggers': [ - 'svc_systemd:opendkim:restart', - ], + 'content': node.metadata.get(f'opendkim/keys/{domain}/private'), } + # files[f'/etc/opendkim/keys/{domain}/mail.txt'] = { + # **file_attributes, + # 'content_type': 'any', + # } + # actions[f'generate_{domain}_dkim_key'] = { + # 'command': ( + # f'sudo --user opendkim' + # f' opendkim-genkey' + # f' --selector=mail' + # f' --directory=/etc/opendkim/keys/{domain}' + # f' --domain={domain}' + # ), + # 'unless': f'test -f /etc/opendkim/keys/{domain}/mail.private', + # 'needs': [ + # 'svc_systemd:opendkim', + # f'directory:/etc/opendkim/keys/{domain}', + # ], + # 'triggers': [ + # 'svc_systemd:opendkim:restart', + # ], + # } svc_systemd['opendkim'] = { 'needs': [