From 695fcc2d919bcbbd3820ad594534a0c23891d1f3 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Wed, 10 Feb 2021 23:27:17 +0100 Subject: [PATCH] add tasks for domains role --- roles/dehydrated-domains/tasks/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 roles/dehydrated-domains/tasks/main.yml diff --git a/roles/dehydrated-domains/tasks/main.yml b/roles/dehydrated-domains/tasks/main.yml new file mode 100644 index 0000000..10ff537 --- /dev/null +++ b/roles/dehydrated-domains/tasks/main.yml @@ -0,0 +1,19 @@ +--- +- name: Ensure domain directories are present. + file: + name: "{{ dehydrated_certs_dir }}/{{ item.name }}" + state: directory + 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 + +- name: Ensure Domains are in domains.txt + lineinfile: + path: "{{ dehydrated_config_dir }}/domains.txt" + line: "{{ item.name }}" + with_items: dehydrated_domains + notify: dehydrated cron \ No newline at end of file