aboutsummaryrefslogtreecommitdiffstats
path: root/roles/acme/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/acme/tasks')
-rw-r--r--roles/acme/tasks/main.yml23
1 files changed, 14 insertions, 9 deletions
diff --git a/roles/acme/tasks/main.yml b/roles/acme/tasks/main.yml
index 040c176..0435265 100644
--- a/roles/acme/tasks/main.yml
+++ b/roles/acme/tasks/main.yml
@@ -3,7 +3,7 @@
- name: generate acme-client configuration
ansible.builtin.template:
src: acme-client.conf.j2
- dest: "{{ acme_configuration_file }}"
+ dest: "{{ acme__configuration_file }}"
owner: 0
group: 0
mode: "0644"
@@ -11,20 +11,20 @@
- name: retrieve enabled domains
ansible.builtin.shell: |
set -o pipefail
- grep "^domain" {{ acme_configuration_file }} | cut -d " " -f 2
- register: acme_result_subdomains
+ grep "^domain" {{ acme__configuration_file }} | cut -d " " -f 2
+ register: acme__result_subdomains
changed_when: false
- name: generate acme certificates
ansible.builtin.command: acme-client -v {{ item }}
- loop: "{{ acme_result_subdomains.stdout_lines }}"
- register: acme_result_generation
- failed_when: acme_result_generation.rc == 1
- changed_when: acme_result_generation.rc != 2
+ loop: "{{ acme__result_subdomains.stdout_lines }}"
+ register: acme__result_generation
+ failed_when: acme__result_generation.rc == 1
+ changed_when: acme__result_generation.rc != 2
- name: display registered certificates
ansible.builtin.debug:
- msg: "{{ acme_result_generation.results | map(attribute='stderr')
+ msg: "{{ acme__result_generation.results | map(attribute='stderr')
| join('\n') }}"
- name: enable automatic acme certificates update
@@ -33,4 +33,9 @@
minute: 0
hour: 6,18
job: "acme-client -v {{ item }} && rcctl reload relayd"
- loop: "{{ acme_result_subdomains.stdout_lines }}"
+ loop: "{{ acme__result_subdomains.stdout_lines }}"
+
+- name: restart relayd
+ ansible.builtin.service:
+ name: relayd
+ state: restarted
remember that computers suck.