From ea4e167f204a4e18ad016a1cb73f5f946ebccd15 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Fri, 26 Feb 2021 21:26:14 +0100 Subject: [PATCH] fix domain iteration --- roles/dehydrated/tasks/domains.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/dehydrated/tasks/domains.yml b/roles/dehydrated/tasks/domains.yml index 102b8aa..aa020d4 100644 --- a/roles/dehydrated/tasks/domains.yml +++ b/roles/dehydrated/tasks/domains.yml @@ -3,17 +3,17 @@ file: name: "{{ dehydrated_certs_dir }}/{{ item.name }}" state: directory - with_items: dehydrated_domains + with_items: "{{ dehydrated_domains }}" - name: Render hook script templates. template: src: hook.sh.j2 dest: "{{ dehydrated_certs_dir }}/{{ item.name }}/hook.sh" - with_items: dehydrated_domains + with_items: "{{ dehydrated_domains }}" - name: Ensure Domains are in domains.txt lineinfile: path: "{{ dehydrated_config_dir }}/domains.txt" - line: "{{ item.name }}{% for an in item.alternate_names %} {{ an|default(omit) }}{% endfor %}" - with_items: dehydrated_domains + line: "{{ item.name }}{% if 'alternate_names' in item %}{% for an in item.alternate_names %} {{ an|default(omit) }}{% endfor %}{% endif %}" + with_items: "{{ dehydrated_domains }}" notify: dehydrated run \ No newline at end of file