2021-02-01 20:24:38 +01:00
|
|
|
---
|
|
|
|
- name: Gather package facts.
|
|
|
|
package_facts:
|
|
|
|
manager: "auto"
|
|
|
|
|
|
|
|
- name: Clone dehydrated repo.
|
|
|
|
ansible.builtin.git:
|
2021-02-07 15:56:04 +01:00
|
|
|
repo: 'https://github.com/dehydrated-io/dehydrated.git'
|
2021-02-01 20:24:38 +01:00
|
|
|
dest: "{{ dehydrated_location }}"
|
|
|
|
version: "{{ dehydrated_version }}"
|
|
|
|
|
|
|
|
- name: Ensure dehydrated symlink is present.
|
|
|
|
ansible.builtin.file:
|
|
|
|
src: "{{ dehydrated_location }}/dehydrated"
|
|
|
|
dest: "{{ dehydrated_path }}"
|
|
|
|
state: link
|
|
|
|
|
2021-02-07 15:56:40 +01:00
|
|
|
- name: Ensure config directory is present.
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ dehydrated_config }}"
|
|
|
|
state: directory
|
|
|
|
|
2021-02-01 20:24:38 +01:00
|
|
|
- name: Ensure domains.txt is present.
|
2021-02-06 18:49:15 +01:00
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ dehydrated_config }}/domains.txt"
|
|
|
|
state: touch
|
2021-02-01 20:24:38 +01:00
|
|
|
|
|
|
|
- name: Ensure config is present.
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: /templates/config.j2
|
|
|
|
dest: "{{ dehydrated_config }}/config"
|
2021-02-07 12:58:06 +01:00
|
|
|
notify: dehydrated register
|
2021-02-01 20:57:41 +01:00
|
|
|
|
|
|
|
- name: Create wellknown directory.
|
|
|
|
file:
|
|
|
|
state: directory
|
|
|
|
path: /var/www/letsencrypt
|
2021-02-06 18:50:10 +01:00
|
|
|
|