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': [