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

33 lines
No EOL
821 B
YAML

---
- name: Gather package facts.
package_facts:
manager: "auto"
- name: Clone dehydrated repo.
ansible.builtin.git:
repo: git@github.com:dehydrated-io/dehydrated.git
dest: "{{ dehydrated_location }}"
version: "{{ dehydrated_version }}"
- name: Ensure dehydrated symlink is present.
ansible.builtin.file:
src: "{{ dehydrated_location }}/dehydrated"
dest: "{{ dehydrated_path }}"
state: link
- name: Ensure domains.txt is present.
ansible.builtin.file:
path: "{{ dehydrated_config }}/domains.txt"
state: touch
- name: Ensure config is present.
ansible.builtin.template:
src: /templates/config.j2
dest: "{{ dehydrated_config }}/config"
notify: dehydrated register
- name: Create wellknown directory.
file:
state: directory
path: /var/www/letsencrypt