remaining tasks

This commit is contained in:
David Kilias 2021-02-01 20:57:41 +01:00
parent a8bae49e0d
commit af11dfd513

View file

@ -20,8 +20,23 @@
ansible.builtin.template: ansible.builtin.template:
src: /templates/domains.txt.j2 src: /templates/domains.txt.j2
dest: "{{ dehydrated_config }}/domains.txt" dest: "{{ dehydrated_config }}/domains.txt"
register: dehydomains
- name: Ensure config is present. - name: Ensure config is present.
ansible.builtin.template: ansible.builtin.template:
src: /templates/config.j2 src: /templates/config.j2
dest: "{{ dehydrated_config }}/config" 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