39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
- name: ensure directories exist
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: '0755'
|
|
loop:
|
|
- "{{ data_folder }}/authelia"
|
|
- name: copy configuration.yml
|
|
template:
|
|
src: "configuration.yml.j2"
|
|
dest: "{{ data_folder }}/authelia/configuration.yml"
|
|
mode: "755"
|
|
- name: run container
|
|
docker_container:
|
|
name: "authelia"
|
|
image: "authelia/authelia"
|
|
ports:
|
|
- "9091:9091"
|
|
networks:
|
|
- name: bridge
|
|
- name: nginx-internal
|
|
volumes:
|
|
- "{{ data_folder }}/authelia:/config"
|
|
- name: copy nginx endpoint conf
|
|
template:
|
|
src: "authelia-endpoint.conf.j2"
|
|
dest: "{{ data_folder }}/nginx/snippets/authelia-endpoint.conf"
|
|
mode: "755"
|
|
- name: copy nginx auth conf
|
|
template:
|
|
src: "authelia-auth.conf.j2"
|
|
dest: "{{ data_folder }}/nginx/snippets/authelia-auth.conf"
|
|
mode: "755"
|
|
- name: copy nginx conf
|
|
template:
|
|
src: "authelia.conf.j2"
|
|
dest: "{{ data_folder }}/nginx/conf.d/{{ role_name}}.{{ base_domain }}.conf"
|
|
mode: "755"
|
|
notify: reload nginx |