2021-02-01 20:24:38 +01:00
|
|
|
---
|
|
|
|
- name: Gather package facts.
|
|
|
|
package_facts:
|
|
|
|
manager: "auto"
|
|
|
|
|
|
|
|
- name: Clone dehydrated repo.
|
2021-02-07 21:13:00 +01:00
|
|
|
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.
|
2021-02-07 21:13:00 +01:00
|
|
|
file:
|
2021-02-01 20:24:38 +01:00
|
|
|
src: "{{ dehydrated_location }}/dehydrated"
|
2021-02-07 21:10:45 +01:00
|
|
|
dest: "{{ dehydrated_binary }}"
|
2021-02-01 20:24:38 +01:00
|
|
|
state: link
|
|
|
|
|
2021-02-07 15:56:40 +01:00
|
|
|
- name: Ensure config directory is present.
|
2021-02-07 21:13:00 +01:00
|
|
|
file:
|
2021-02-07 21:32:05 +01:00
|
|
|
path: "{{ dehydrated_config_dir }}"
|
2021-02-07 15:56:40 +01:00
|
|
|
state: directory
|
2021-02-07 21:32:05 +01:00
|
|
|
mode: "0711"
|
|
|
|
|
|
|
|
- name: Ensure wellknown directory is present.
|
|
|
|
file:
|
|
|
|
path: "{{ dehydrated_wellknown_dir }}"
|
|
|
|
state: directory
|
|
|
|
mode: "0755"
|
|
|
|
|
|
|
|
- name: Ensure certs directory is present.
|
|
|
|
file:
|
|
|
|
path: "{{ dehydrated_certs_dir }}"
|
|
|
|
state: directory
|
|
|
|
mode: "0700"
|
2021-02-07 15:56:40 +01:00
|
|
|
|
2021-02-01 20:24:38 +01:00
|
|
|
- name: Ensure domains.txt is present.
|
2021-02-07 21:13:00 +01:00
|
|
|
file:
|
2021-02-07 21:32:05 +01:00
|
|
|
path: "{{ dehydrated_config_dir }}/domains.txt"
|
2021-02-06 18:49:15 +01:00
|
|
|
state: touch
|
2021-02-01 20:24:38 +01:00
|
|
|
|
|
|
|
- name: Ensure config is present.
|
2021-02-07 21:13:00 +01:00
|
|
|
template:
|
2021-02-07 15:57:05 +01:00
|
|
|
src: config.j2
|
2021-02-07 21:32:05 +01:00
|
|
|
dest: "{{ dehydrated_config_dir }}/config"
|
2021-02-07 12:58:06 +01:00
|
|
|
notify: dehydrated register
|
2021-02-01 20:57:41 +01:00
|
|
|
|
2021-02-06 18:50:10 +01:00
|
|
|
|