aboutsummaryrefslogtreecommitdiffstats
path: root/roles/acme/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/acme/tasks')
-rw-r--r--roles/acme/tasks/main.yml10
1 files changed, 8 insertions, 2 deletions
diff --git a/roles/acme/tasks/main.yml b/roles/acme/tasks/main.yml
index 4d0f67f..ff644a4 100644
--- a/roles/acme/tasks/main.yml
+++ b/roles/acme/tasks/main.yml
@@ -18,8 +18,13 @@
group: "{{ group_root }}"
mode: 0644
+- name: retrieve enabled domains
+ shell: grep "^domain" /etc/acme-client.conf | cut -d " " -f 2
+ register: subdomains
+
- name: generate acme certificates
- shell: acme-client -v {{ global.domain_name }}
+ shell: acme-client -v {{ item }}
+ loop: "{{ subdomains.stdout_lines }}"
register: result
failed_when: result.rc not in [ 0, 2 ]
@@ -32,4 +37,5 @@
name: "automatic acme certificates update"
minute: "0"
hour: "6,18"
- job: "acme-client -v {{ global.domain_name }}"
+ job: "acme-client -v {{ item }}"
+ loop: "{{ subdomains.stdout_lines }}"
remember that computers suck.