Compare commits
2 Commits
908b579f2c
...
a7fad79d05
Author | SHA1 | Date | |
---|---|---|---|
a7fad79d05
|
|||
f3d3617ec0
|
@ -1,14 +1,14 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Ensure user {{ authelia_user }} exists
|
- name: Ensure user {{ authelia_user }} exists
|
||||||
user:
|
ansible.builtin.user:
|
||||||
name: "{{ authelia_user }}"
|
name: "{{ authelia_user }}"
|
||||||
state: present
|
state: present
|
||||||
system: true
|
system: true
|
||||||
register: authelia_user_info
|
register: authelia_user_info
|
||||||
|
|
||||||
- name: Ensure host directories are created with correct permissions
|
- name: Ensure host directories are created with correct permissions
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ item.owner | default(authelia_user) }}"
|
owner: "{{ item.owner | default(authelia_user) }}"
|
||||||
@ -26,7 +26,7 @@
|
|||||||
mode: "0750"
|
mode: "0750"
|
||||||
|
|
||||||
- name: Ensure config file is generated
|
- name: Ensure config file is generated
|
||||||
copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ authelia_config | to_nice_yaml(indent=2, width=10000) }}"
|
content: "{{ authelia_config | to_nice_yaml(indent=2, width=10000) }}"
|
||||||
dest: "{{ authelia_config_file }}"
|
dest: "{{ authelia_config_file }}"
|
||||||
owner: "{{ authelia_run_user }}"
|
owner: "{{ authelia_run_user }}"
|
||||||
@ -35,7 +35,7 @@
|
|||||||
notify: restart-authelia
|
notify: restart-authelia
|
||||||
|
|
||||||
- name: Ensure sqlite database file exists before mounting it
|
- name: Ensure sqlite database file exists before mounting it
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: "{{ authelia_sqlite_storage_file }}"
|
path: "{{ authelia_sqlite_storage_file }}"
|
||||||
state: touch
|
state: touch
|
||||||
owner: "{{ authelia_run_user }}"
|
owner: "{{ authelia_run_user }}"
|
||||||
@ -46,7 +46,7 @@
|
|||||||
when: authelia_config_storage_local_path | default(false, true)
|
when: authelia_config_storage_local_path | default(false, true)
|
||||||
|
|
||||||
- name: Ensure user database exists before mounting it
|
- name: Ensure user database exists before mounting it
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: "{{ authelia_user_storage_file }}"
|
path: "{{ authelia_user_storage_file }}"
|
||||||
state: touch
|
state: touch
|
||||||
owner: "{{ authelia_run_user }}"
|
owner: "{{ authelia_run_user }}"
|
||||||
@ -57,7 +57,7 @@
|
|||||||
when: authelia_config_authentication_backend_file_path | default(false, true)
|
when: authelia_config_authentication_backend_file_path | default(false, true)
|
||||||
|
|
||||||
- name: Ensure notification reports file exists before mounting it
|
- name: Ensure notification reports file exists before mounting it
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: "{{ authelia_notification_storage_file }}"
|
path: "{{ authelia_notification_storage_file }}"
|
||||||
state: touch
|
state: touch
|
||||||
owner: "{{ authelia_run_user }}"
|
owner: "{{ authelia_run_user }}"
|
||||||
@ -76,7 +76,7 @@
|
|||||||
register: authelia_container_image_info
|
register: authelia_container_image_info
|
||||||
|
|
||||||
- name: Ensure authelia container is running
|
- name: Ensure authelia container is running
|
||||||
docker_container:
|
community.docker.docker_container:
|
||||||
name: "{{ authelia_container_name }}"
|
name: "{{ authelia_container_name }}"
|
||||||
image: "{{ authelia_container_image_ref }}"
|
image: "{{ authelia_container_image_ref }}"
|
||||||
env: "{{ authelia_container_env }}"
|
env: "{{ authelia_container_env }}"
|
||||||
@ -88,5 +88,6 @@
|
|||||||
etc_hosts: "{{ authelia_container_etc_hosts | default(omit, true) }}"
|
etc_hosts: "{{ authelia_container_etc_hosts | default(omit, true) }}"
|
||||||
purge_networks: "{{ authelia_container_purge_networks | default(omit, true)}}"
|
purge_networks: "{{ authelia_container_purge_networks | default(omit, true)}}"
|
||||||
restart_policy: "{{ authelia_container_restart_policy }}"
|
restart_policy: "{{ authelia_container_restart_policy }}"
|
||||||
|
recreate: "{{ authelia_container_recreate | default(omit, true) }}"
|
||||||
state: "{{ authelia_container_state }}"
|
state: "{{ authelia_container_state }}"
|
||||||
register: authelia_container_info
|
register: authelia_container_info
|
||||||
|
Reference in New Issue
Block a user