reworkd directory creation and add certs dir

This commit is contained in:
David Kilias 2021-02-07 21:32:05 +01:00
parent 8e5245de97
commit e0c43f330d
2 changed files with 21 additions and 11 deletions

View file

@ -1,6 +1,7 @@
--- ---
dehydrated_version: "v0.7.0" dehydrated_version: "v0.7.0"
dehydrated_location: /usr/local/share/dehydrated dehydrated_location: "/usr/local/share/dehydrated"
dehydrated_binary: /usr/local/bin/dehydrated dehydrated_binary: "/usr/local/bin/dehydrated"
dehydrated_config: /usr/local/etc/dehydrated dehydrated_config_dir: "/usr/local/etc/dehydrated"
dehydrated_wellknown: /usr/local/etc/dehydrated/challenge dehydrated_certs_dir: "{{ dehydrated_config_dir }}/certs"
dehydrated_wellknown_dir: "{{ dehydrated_config_dir }}/challenge"

View file

@ -17,22 +17,31 @@
- name: Ensure config directory is present. - name: Ensure config directory is present.
file: file:
path: "{{ dehydrated_config }}" path: "{{ dehydrated_config_dir }}"
state: directory state: directory
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"
- name: Ensure domains.txt is present. - name: Ensure domains.txt is present.
file: file:
path: "{{ dehydrated_config }}/domains.txt" path: "{{ dehydrated_config_dir }}/domains.txt"
state: touch state: touch
- name: Ensure config is present. - name: Ensure config is present.
template: template:
src: config.j2 src: config.j2
dest: "{{ dehydrated_config }}/config" dest: "{{ dehydrated_config_dir }}/config"
notify: dehydrated register notify: dehydrated register
- name: Create wellknown directory.
file:
state: directory
path: /var/www/letsencrypt