netz39-infra-ansible/roles/dehydrated/tasks/domains.yml

19 lines
600 B
YAML
Raw Normal View History

2021-02-10 23:27:17 +01:00
---
- 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"
2021-02-14 17:41:27 +01:00
line: "{{ item.name }}{% for an in item.alternate_names %} {{ an|default(omit) }}{% endfor %}"
2021-02-10 23:27:17 +01:00
with_items: dehydrated_domains
2021-02-25 14:47:59 +01:00
notify: dehydrated run