fix docker creating a dir
This commit is contained in:
@@ -11,6 +11,26 @@
|
||||
- "{{ authelia_config_dir }}"
|
||||
- "{{ authelia_data_dir }}"
|
||||
|
||||
- name: Check if Caddyfile path is wrongly a directory
|
||||
ansible.builtin.stat:
|
||||
path: "{{ authelia_base_dir }}/Caddyfile"
|
||||
register: caddyfile_stat
|
||||
|
||||
- name: Remove Caddyfile if it was created as a directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ authelia_base_dir }}/Caddyfile"
|
||||
state: absent
|
||||
when: caddyfile_stat.stat.exists and caddyfile_stat.stat.isdir
|
||||
|
||||
- name: Deploy Caddyfile
|
||||
ansible.builtin.template:
|
||||
src: Caddyfile.j2
|
||||
dest: "{{ authelia_base_dir }}/Caddyfile"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0640"
|
||||
notify: restart authelia
|
||||
|
||||
- name: Deploy configuration.yml
|
||||
ansible.builtin.template:
|
||||
src: configuration.yml.j2
|
||||
@@ -44,12 +64,3 @@
|
||||
project_src: "{{ authelia_base_dir }}"
|
||||
state: present
|
||||
pull: missing
|
||||
|
||||
- name: Deploy Caddyfile
|
||||
ansible.builtin.template:
|
||||
src: Caddyfile.j2
|
||||
dest: "{{ authelia_base_dir }}/Caddyfile"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0640"
|
||||
notify: restart authelia
|
||||
Reference in New Issue
Block a user