From 4d2287d525b3246788f58feea9f08e0cc028e1f9 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sat, 13 Feb 2021 17:38:44 +0100 Subject: [PATCH] =?UTF-8?q?optional=20sind=20auch=20alternate=5Fnames=20f?= =?UTF-8?q?=C3=BCr=20die=20domains=20m=C3=B6glich?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/dehydrated-domains/README.md | 1 + roles/dehydrated-domains/tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/dehydrated-domains/README.md b/roles/dehydrated-domains/README.md index 3da2197..0d3f9bf 100644 --- a/roles/dehydrated-domains/README.md +++ b/roles/dehydrated-domains/README.md @@ -8,6 +8,7 @@ Ansible role to configure domains for use with dehydrated vars: dehydrated_domains: name: example.com + alternate_names: "www.example.com web.example.com" deploy_challenge_hook: printf 'server 127.0.0.1\nupdate add _acme-challenge.%s 300 IN TXT "%s"\nsend\n' "${DOMAIN}" "${TOKEN_VALUE}" | nsupdate -k /var/run/named/session.key clean_challenge_hook: printf 'server 127.0.0.1\nupdate delete _acme-challenge.%s TXT "%s"\nsend\n' "${DOMAIN}" "${TOKEN_VALUE}" | nsupdate -k /var/run/named/session.key diff --git a/roles/dehydrated-domains/tasks/main.yml b/roles/dehydrated-domains/tasks/main.yml index 10ff537..e4243cd 100644 --- a/roles/dehydrated-domains/tasks/main.yml +++ b/roles/dehydrated-domains/tasks/main.yml @@ -14,6 +14,6 @@ - name: Ensure Domains are in domains.txt lineinfile: path: "{{ dehydrated_config_dir }}/domains.txt" - line: "{{ item.name }}" + line: "{{ item.name }} {{ item.alternate_names|default(omit) }}" with_items: dehydrated_domains notify: dehydrated cron \ No newline at end of file