From 0137cd97439415dc0f9c85a9f64432463ee286a3 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Mon, 1 Feb 2021 20:24:38 +0100 Subject: [PATCH 01/21] initial commit of dehydrated role --- roles/dehydrated/defaults/main.yml | 5 +++++ roles/dehydrated/tasks/main.yml | 27 +++++++++++++++++++++++ roles/dehydrated/templates/config.j2 | 2 ++ roles/dehydrated/templates/domains.txt.j2 | 6 +++++ 4 files changed, 40 insertions(+) create mode 100644 roles/dehydrated/defaults/main.yml create mode 100644 roles/dehydrated/tasks/main.yml create mode 100644 roles/dehydrated/templates/config.j2 create mode 100644 roles/dehydrated/templates/domains.txt.j2 diff --git a/roles/dehydrated/defaults/main.yml b/roles/dehydrated/defaults/main.yml new file mode 100644 index 0000000..2403f57 --- /dev/null +++ b/roles/dehydrated/defaults/main.yml @@ -0,0 +1,5 @@ +--- +dehydrated_version: "v0.7.0" +dehydrated_location: /usr/local/share/dehydrated +dehydrated_path: /usr/local/bin/dehydrated +dehydrated_config: /usr/local/etc/dehydrated/ diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml new file mode 100644 index 0000000..74102e6 --- /dev/null +++ b/roles/dehydrated/tasks/main.yml @@ -0,0 +1,27 @@ +--- +- name: Gather package facts. + package_facts: + manager: "auto" + +- name: Clone dehydrated repo. + ansible.builtin.git: + repo: git@github.com:dehydrated-io/dehydrated.git + dest: "{{ dehydrated_location }}" + version: "{{ dehydrated_version }}" + +- name: Ensure dehydrated symlink is present. + ansible.builtin.file: + src: "{{ dehydrated_location }}/dehydrated" + dest: "{{ dehydrated_path }}" + state: link + +# copy config +- name: Ensure domains.txt is present. + ansible.builtin.template: + src: /templates/domains.txt.j2 + dest: "{{ dehydrated_config }}/domains.txt" + +- name: Ensure config is present. + ansible.builtin.template: + src: /templates/config.j2 + dest: "{{ dehydrated_config }}/config" diff --git a/roles/dehydrated/templates/config.j2 b/roles/dehydrated/templates/config.j2 new file mode 100644 index 0000000..e9f67f9 --- /dev/null +++ b/roles/dehydrated/templates/config.j2 @@ -0,0 +1,2 @@ +HOOK={{ dehydrated_location }}/hook.sh +WELLKNOWN=/var/www/letsencrypt \ No newline at end of file diff --git a/roles/dehydrated/templates/domains.txt.j2 b/roles/dehydrated/templates/domains.txt.j2 new file mode 100644 index 0000000..6ab2713 --- /dev/null +++ b/roles/dehydrated/templates/domains.txt.j2 @@ -0,0 +1,6 @@ +{{ inventory_hostname }} +{% if extra_hostnames is defined %} +{% for hostname in extra_hostnames %} +{{ hostname }} +{% endfor %} +{% endif %} \ No newline at end of file From a8bae49e0d444f89d4330b00c5700601b2e5225f Mon Sep 17 00:00:00 2001 From: David Kilias Date: Mon, 1 Feb 2021 20:38:24 +0100 Subject: [PATCH 02/21] hook scripts go to config location --- roles/dehydrated/templates/config.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/dehydrated/templates/config.j2 b/roles/dehydrated/templates/config.j2 index e9f67f9..806d3a1 100644 --- a/roles/dehydrated/templates/config.j2 +++ b/roles/dehydrated/templates/config.j2 @@ -1,2 +1,2 @@ -HOOK={{ dehydrated_location }}/hook.sh +HOOK={{ dehydrated_config }}/hook.sh WELLKNOWN=/var/www/letsencrypt \ No newline at end of file From af11dfd513fe0cd82b9aa2303d62ce477a410653 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Mon, 1 Feb 2021 20:57:41 +0100 Subject: [PATCH 03/21] remaining tasks --- roles/dehydrated/tasks/main.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml index 74102e6..d9523dc 100644 --- a/roles/dehydrated/tasks/main.yml +++ b/roles/dehydrated/tasks/main.yml @@ -20,8 +20,23 @@ ansible.builtin.template: src: /templates/domains.txt.j2 dest: "{{ dehydrated_config }}/domains.txt" + register: dehydomains - name: Ensure config is present. ansible.builtin.template: src: /templates/config.j2 dest: "{{ dehydrated_config }}/config" + register: dehyconfig + +- name: Create wellknown directory. + file: + state: directory + path: /var/www/letsencrypt + +- name: Register account. + command: "{{ dehydrated_path }} --register --accept-terms" + when: dehyconfig.changed + +- name: Initial dehydrated run. + command: "{{ dehydrated_path }} --cron" + when: dehyconfig.changed or dehydomains.changed From 9a1d0c3c09b8ac070e30124a62907a55cb231aa5 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Mon, 1 Feb 2021 21:57:04 +0100 Subject: [PATCH 04/21] fix comment --- roles/dehydrated/tasks/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml index d9523dc..e5ce554 100644 --- a/roles/dehydrated/tasks/main.yml +++ b/roles/dehydrated/tasks/main.yml @@ -15,7 +15,6 @@ dest: "{{ dehydrated_path }}" state: link -# copy config - name: Ensure domains.txt is present. ansible.builtin.template: src: /templates/domains.txt.j2 From aeaa4574cc991f96d000b365dffa84a831477a81 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sat, 6 Feb 2021 18:49:15 +0100 Subject: [PATCH 05/21] 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 From 0ee902a7f373bc9c6dd3a562f3e9252db375a3ca Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sat, 6 Feb 2021 18:49:31 +0100 Subject: [PATCH 06/21] make wellknown location configurable --- roles/dehydrated/defaults/main.yml | 1 + roles/dehydrated/templates/config.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/dehydrated/defaults/main.yml b/roles/dehydrated/defaults/main.yml index 2403f57..2a777d3 100644 --- a/roles/dehydrated/defaults/main.yml +++ b/roles/dehydrated/defaults/main.yml @@ -3,3 +3,4 @@ dehydrated_version: "v0.7.0" dehydrated_location: /usr/local/share/dehydrated dehydrated_path: /usr/local/bin/dehydrated dehydrated_config: /usr/local/etc/dehydrated/ +dehydrated_wellknown: /usr/local/etc/dehydrated/challenge diff --git a/roles/dehydrated/templates/config.j2 b/roles/dehydrated/templates/config.j2 index 806d3a1..044ecc3 100644 --- a/roles/dehydrated/templates/config.j2 +++ b/roles/dehydrated/templates/config.j2 @@ -1,2 +1,2 @@ HOOK={{ dehydrated_config }}/hook.sh -WELLKNOWN=/var/www/letsencrypt \ No newline at end of file +WELLKNOWN={{ dehydrated_wellknown }} \ No newline at end of file From 1cccde406cf362af9f5f4951aea51702176c0e87 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sat, 6 Feb 2021 18:50:10 +0100 Subject: [PATCH 07/21] fixup aeaa4574cc991f96d000b365dffa84a831477a81 --- roles/dehydrated/tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml index 0148f6a..cd3afa0 100644 --- a/roles/dehydrated/tasks/main.yml +++ b/roles/dehydrated/tasks/main.yml @@ -37,4 +37,5 @@ - name: Initial dehydrated run. command: "{{ dehydrated_path }} --cron" - when: dehyconfig.changed or dehydomains.changed + when: dehyconfig.changed + \ No newline at end of file From fff91c2995bb71e432eeee5b989baa78ebc4160c Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sun, 7 Feb 2021 12:58:06 +0100 Subject: [PATCH 08/21] move some tasks to handlers --- roles/dehydrated/handlers/main.yml | 6 ++++++ roles/dehydrated/tasks/main.yml | 10 +--------- 2 files changed, 7 insertions(+), 9 deletions(-) create mode 100644 roles/dehydrated/handlers/main.yml diff --git a/roles/dehydrated/handlers/main.yml b/roles/dehydrated/handlers/main.yml new file mode 100644 index 0000000..5875423 --- /dev/null +++ b/roles/dehydrated/handlers/main.yml @@ -0,0 +1,6 @@ +--- +- name: dehydrated register + command: "{{ dehydrated_path }} --register --accept-terms" + +- name: dehydrated cron + command: "{{ dehydrated_path }} --cron" \ No newline at end of file diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml index cd3afa0..ef5078f 100644 --- a/roles/dehydrated/tasks/main.yml +++ b/roles/dehydrated/tasks/main.yml @@ -24,18 +24,10 @@ ansible.builtin.template: src: /templates/config.j2 dest: "{{ dehydrated_config }}/config" - register: dehyconfig + notify: dehydrated register - name: Create wellknown directory. file: state: directory path: /var/www/letsencrypt - -- name: Register account. - command: "{{ dehydrated_path }} --register --accept-terms" - when: dehyconfig.changed - -- name: Initial dehydrated run. - command: "{{ dehydrated_path }} --cron" - when: dehyconfig.changed \ No newline at end of file From a308a74dcce86043af0708a4fcd3d876a77efcc7 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sun, 7 Feb 2021 12:58:21 +0100 Subject: [PATCH 09/21] add role dehydrated domains --- roles/dehydrated-domains/meta/main.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 roles/dehydrated-domains/meta/main.yml diff --git a/roles/dehydrated-domains/meta/main.yml b/roles/dehydrated-domains/meta/main.yml new file mode 100644 index 0000000..5445214 --- /dev/null +++ b/roles/dehydrated-domains/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: +- role: dehydrated \ No newline at end of file From ff09f23dd06c66c58c1db359252b0b0b5b365bd4 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sun, 7 Feb 2021 15:56:04 +0100 Subject: [PATCH 10/21] ssh checkout scheint nicht zu funktionieren --- roles/dehydrated/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml index ef5078f..d2b13a4 100644 --- a/roles/dehydrated/tasks/main.yml +++ b/roles/dehydrated/tasks/main.yml @@ -5,7 +5,7 @@ - name: Clone dehydrated repo. ansible.builtin.git: - repo: git@github.com:dehydrated-io/dehydrated.git + repo: 'https://github.com/dehydrated-io/dehydrated.git' dest: "{{ dehydrated_location }}" version: "{{ dehydrated_version }}" From f9edf323cdcc7f07ab93915dde1fe9f33db66a36 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sun, 7 Feb 2021 15:56:40 +0100 Subject: [PATCH 11/21] verzeichnis sollte da sein, bevor wir template hin rendern --- roles/dehydrated/tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml index d2b13a4..c608e83 100644 --- a/roles/dehydrated/tasks/main.yml +++ b/roles/dehydrated/tasks/main.yml @@ -15,6 +15,11 @@ dest: "{{ dehydrated_path }}" state: link +- name: Ensure config directory is present. + ansible.builtin.file: + path: "{{ dehydrated_config }}" + state: directory + - name: Ensure domains.txt is present. ansible.builtin.file: path: "{{ dehydrated_config }}/domains.txt" From 333099449c2d5c8f7758f4861a24c5cf03e291b7 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sun, 7 Feb 2021 15:57:05 +0100 Subject: [PATCH 12/21] templates werden immer im templates ordner der rolle gesucht --- roles/dehydrated/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml index c608e83..382fb9e 100644 --- a/roles/dehydrated/tasks/main.yml +++ b/roles/dehydrated/tasks/main.yml @@ -27,7 +27,7 @@ - name: Ensure config is present. ansible.builtin.template: - src: /templates/config.j2 + src: config.j2 dest: "{{ dehydrated_config }}/config" notify: dehydrated register From 1969bf995e9fa24a02b57e90ed7a2e5167944ef6 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sun, 7 Feb 2021 15:57:36 +0100 Subject: [PATCH 13/21] zur konsostenz alle pfade ohne / am ende --- roles/dehydrated/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/dehydrated/defaults/main.yml b/roles/dehydrated/defaults/main.yml index 2a777d3..d2dfe79 100644 --- a/roles/dehydrated/defaults/main.yml +++ b/roles/dehydrated/defaults/main.yml @@ -2,5 +2,5 @@ dehydrated_version: "v0.7.0" dehydrated_location: /usr/local/share/dehydrated dehydrated_path: /usr/local/bin/dehydrated -dehydrated_config: /usr/local/etc/dehydrated/ +dehydrated_config: /usr/local/etc/dehydrated dehydrated_wellknown: /usr/local/etc/dehydrated/challenge From cd8352a2f4d2309dc8ed16389af5ff498f18b87c Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sun, 7 Feb 2021 15:58:02 +0100 Subject: [PATCH 14/21] newline am ende! --- roles/dehydrated/templates/config.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/dehydrated/templates/config.j2 b/roles/dehydrated/templates/config.j2 index 044ecc3..b7a6b98 100644 --- a/roles/dehydrated/templates/config.j2 +++ b/roles/dehydrated/templates/config.j2 @@ -1,2 +1,2 @@ HOOK={{ dehydrated_config }}/hook.sh -WELLKNOWN={{ dehydrated_wellknown }} \ No newline at end of file +WELLKNOWN={{ dehydrated_wellknown }} From 4378d33dff56ac87455bd2df7150013e4384023b Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sun, 7 Feb 2021 21:10:45 +0100 Subject: [PATCH 15/21] dehydrated_path -> dehydrated_binary --- roles/dehydrated/defaults/main.yml | 2 +- roles/dehydrated/handlers/main.yml | 4 ++-- roles/dehydrated/tasks/main.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/dehydrated/defaults/main.yml b/roles/dehydrated/defaults/main.yml index d2dfe79..fcbb9b4 100644 --- a/roles/dehydrated/defaults/main.yml +++ b/roles/dehydrated/defaults/main.yml @@ -1,6 +1,6 @@ --- dehydrated_version: "v0.7.0" dehydrated_location: /usr/local/share/dehydrated -dehydrated_path: /usr/local/bin/dehydrated +dehydrated_binary: /usr/local/bin/dehydrated dehydrated_config: /usr/local/etc/dehydrated dehydrated_wellknown: /usr/local/etc/dehydrated/challenge diff --git a/roles/dehydrated/handlers/main.yml b/roles/dehydrated/handlers/main.yml index 5875423..4498b79 100644 --- a/roles/dehydrated/handlers/main.yml +++ b/roles/dehydrated/handlers/main.yml @@ -1,6 +1,6 @@ --- - name: dehydrated register - command: "{{ dehydrated_path }} --register --accept-terms" + command: "{{ dehydrated_binary }} --register --accept-terms" - name: dehydrated cron - command: "{{ dehydrated_path }} --cron" \ No newline at end of file + command: "{{ dehydrated_binary }} --cron" \ No newline at end of file diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml index 382fb9e..b06ada6 100644 --- a/roles/dehydrated/tasks/main.yml +++ b/roles/dehydrated/tasks/main.yml @@ -12,7 +12,7 @@ - name: Ensure dehydrated symlink is present. ansible.builtin.file: src: "{{ dehydrated_location }}/dehydrated" - dest: "{{ dehydrated_path }}" + dest: "{{ dehydrated_binary }}" state: link - name: Ensure config directory is present. From 8e5245de97cec881f4e678fb0ddcd200afa36446 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sun, 7 Feb 2021 21:13:00 +0100 Subject: [PATCH 16/21] remove role prefix --- roles/dehydrated/tasks/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml index b06ada6..ece7b48 100644 --- a/roles/dehydrated/tasks/main.yml +++ b/roles/dehydrated/tasks/main.yml @@ -4,29 +4,29 @@ manager: "auto" - name: Clone dehydrated repo. - ansible.builtin.git: + git: repo: 'https://github.com/dehydrated-io/dehydrated.git' dest: "{{ dehydrated_location }}" version: "{{ dehydrated_version }}" - name: Ensure dehydrated symlink is present. - ansible.builtin.file: + file: src: "{{ dehydrated_location }}/dehydrated" dest: "{{ dehydrated_binary }}" state: link - name: Ensure config directory is present. - ansible.builtin.file: + file: path: "{{ dehydrated_config }}" state: directory - name: Ensure domains.txt is present. - ansible.builtin.file: + file: path: "{{ dehydrated_config }}/domains.txt" state: touch - name: Ensure config is present. - ansible.builtin.template: + template: src: config.j2 dest: "{{ dehydrated_config }}/config" notify: dehydrated register From e0c43f330d5255ded801186f3c8a871333c38add Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sun, 7 Feb 2021 21:32:05 +0100 Subject: [PATCH 17/21] reworkd directory creation and add certs dir --- roles/dehydrated/defaults/main.yml | 9 +++++---- roles/dehydrated/tasks/main.yml | 23 ++++++++++++++++------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/roles/dehydrated/defaults/main.yml b/roles/dehydrated/defaults/main.yml index fcbb9b4..8c68c9f 100644 --- a/roles/dehydrated/defaults/main.yml +++ b/roles/dehydrated/defaults/main.yml @@ -1,6 +1,7 @@ --- dehydrated_version: "v0.7.0" -dehydrated_location: /usr/local/share/dehydrated -dehydrated_binary: /usr/local/bin/dehydrated -dehydrated_config: /usr/local/etc/dehydrated -dehydrated_wellknown: /usr/local/etc/dehydrated/challenge +dehydrated_location: "/usr/local/share/dehydrated" +dehydrated_binary: "/usr/local/bin/dehydrated" +dehydrated_config_dir: "/usr/local/etc/dehydrated" +dehydrated_certs_dir: "{{ dehydrated_config_dir }}/certs" +dehydrated_wellknown_dir: "{{ dehydrated_config_dir }}/challenge" diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml index ece7b48..847f61a 100644 --- a/roles/dehydrated/tasks/main.yml +++ b/roles/dehydrated/tasks/main.yml @@ -17,22 +17,31 @@ - name: Ensure config directory is present. file: - path: "{{ dehydrated_config }}" + path: "{{ dehydrated_config_dir }}" state: directory + mode: "0711" + +- name: Ensure wellknown directory is present. + file: + path: "{{ dehydrated_wellknown_dir }}" + state: directory + mode: "0755" + +- name: Ensure certs directory is present. + file: + path: "{{ dehydrated_certs_dir }}" + state: directory + mode: "0700" - name: Ensure domains.txt is present. file: - path: "{{ dehydrated_config }}/domains.txt" + path: "{{ dehydrated_config_dir }}/domains.txt" state: touch - name: Ensure config is present. template: src: config.j2 - dest: "{{ dehydrated_config }}/config" + dest: "{{ dehydrated_config_dir }}/config" notify: dehydrated register -- name: Create wellknown directory. - file: - state: directory - path: /var/www/letsencrypt \ No newline at end of file From 15d5056111eccd0624e9c8072a9fc01f76de2fb6 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Tue, 9 Feb 2021 08:06:32 +0100 Subject: [PATCH 18/21] make CONFIG_EMAIL configurable --- roles/dehydrated/defaults/main.yml | 1 + roles/dehydrated/templates/config.j2 | 1 + 2 files changed, 2 insertions(+) diff --git a/roles/dehydrated/defaults/main.yml b/roles/dehydrated/defaults/main.yml index 8c68c9f..74a8e83 100644 --- a/roles/dehydrated/defaults/main.yml +++ b/roles/dehydrated/defaults/main.yml @@ -1,5 +1,6 @@ --- dehydrated_version: "v0.7.0" +dehydrated_contact_email: "" dehydrated_location: "/usr/local/share/dehydrated" dehydrated_binary: "/usr/local/bin/dehydrated" dehydrated_config_dir: "/usr/local/etc/dehydrated" diff --git a/roles/dehydrated/templates/config.j2 b/roles/dehydrated/templates/config.j2 index b7a6b98..bfaec71 100644 --- a/roles/dehydrated/templates/config.j2 +++ b/roles/dehydrated/templates/config.j2 @@ -1,2 +1,3 @@ HOOK={{ dehydrated_config }}/hook.sh WELLKNOWN={{ dehydrated_wellknown }} +CONTACT_EMAIL={{ dehydrated_contact_email }} From d577a2bdfb400162027875b9c54f92752707864c Mon Sep 17 00:00:00 2001 From: David Kilias Date: Tue, 9 Feb 2021 19:35:33 +0100 Subject: [PATCH 19/21] install dependency git --- roles/dehydrated/tasks/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml index 847f61a..101378f 100644 --- a/roles/dehydrated/tasks/main.yml +++ b/roles/dehydrated/tasks/main.yml @@ -3,6 +3,11 @@ package_facts: manager: "auto" +- name: Ensure git is installed. + package: + name: git + state: present + - name: Clone dehydrated repo. git: repo: 'https://github.com/dehydrated-io/dehydrated.git' @@ -43,5 +48,4 @@ src: config.j2 dest: "{{ dehydrated_config_dir }}/config" notify: dehydrated register - \ No newline at end of file From 5a549367cdc8a805b981642599bbf250c5ae5da3 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Tue, 9 Feb 2021 21:21:00 +0100 Subject: [PATCH 20/21] fix variable names inc config template --- roles/dehydrated/templates/config.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/dehydrated/templates/config.j2 b/roles/dehydrated/templates/config.j2 index bfaec71..d6d3dc7 100644 --- a/roles/dehydrated/templates/config.j2 +++ b/roles/dehydrated/templates/config.j2 @@ -1,3 +1,3 @@ -HOOK={{ dehydrated_config }}/hook.sh -WELLKNOWN={{ dehydrated_wellknown }} +HOOK={{ dehydrated_config_dir }}/hook.sh +WELLKNOWN={{ dehydrated_wellknown_dir }} CONTACT_EMAIL={{ dehydrated_contact_email }} From 868b976add476b0c53b85c7fcf1808bd1bd696da Mon Sep 17 00:00:00 2001 From: David Kilias Date: Tue, 9 Feb 2021 21:38:49 +0100 Subject: [PATCH 21/21] install curl prereq. --- roles/dehydrated/tasks/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml index 101378f..8614ded 100644 --- a/roles/dehydrated/tasks/main.yml +++ b/roles/dehydrated/tasks/main.yml @@ -3,9 +3,11 @@ package_facts: manager: "auto" -- name: Ensure git is installed. +- name: Ensure git and curl are installed. package: - name: git + name: + - git + - curl state: present - name: Clone dehydrated repo.