add tasks for domains role
This commit is contained in:
parent
44f03354d2
commit
695fcc2d91
1 changed files with 19 additions and 0 deletions
19
roles/dehydrated-domains/tasks/main.yml
Normal file
19
roles/dehydrated-domains/tasks/main.yml
Normal file
|
@ -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
|
Loading…
Reference in a new issue