From aeaa4574cc991f96d000b365dffa84a831477a81 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sat, 6 Feb 2021 18:49:15 +0100 Subject: [PATCH] only touch domains.txt, actual domains get handled in separate role --- roles/dehydrated/tasks/main.yml | 7 +++---- roles/dehydrated/templates/domains.txt.j2 | 6 ------ 2 files changed, 3 insertions(+), 10 deletions(-) delete mode 100644 roles/dehydrated/templates/domains.txt.j2 diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml index e5ce554..0148f6a 100644 --- a/roles/dehydrated/tasks/main.yml +++ b/roles/dehydrated/tasks/main.yml @@ -16,10 +16,9 @@ state: link - name: Ensure domains.txt is present. - ansible.builtin.template: - src: /templates/domains.txt.j2 - dest: "{{ dehydrated_config }}/domains.txt" - register: dehydomains + ansible.builtin.file: + path: "{{ dehydrated_config }}/domains.txt" + state: touch - name: Ensure config is present. ansible.builtin.template: diff --git a/roles/dehydrated/templates/domains.txt.j2 b/roles/dehydrated/templates/domains.txt.j2 deleted file mode 100644 index 6ab2713..0000000 --- a/roles/dehydrated/templates/domains.txt.j2 +++ /dev/null @@ -1,6 +0,0 @@ -{{ inventory_hostname }} -{% if extra_hostnames is defined %} -{% for hostname in extra_hostnames %} -{{ hostname }} -{% endfor %} -{% endif %} \ No newline at end of file