You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
- name: Set up Authelia
|
|
|
|
hosts: lotus-land-story
|
|
|
|
vars:
|
|
|
|
version: 4.38.14
|
|
|
|
vars_files:
|
|
|
|
- vars.yml
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
- name: Create directories for volume mounting
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: /mnt/lotus-land-story/authelia/{{ item }}
|
|
|
|
state: directory
|
|
|
|
mode: "0700"
|
|
|
|
loop:
|
|
|
|
- config
|
|
|
|
- secrets
|
|
|
|
|
|
|
|
- name: Copy configuration
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: templates/authelia_{{ item }}.yml
|
|
|
|
dest: /mnt/lotus-land-story/authelia/config/{{ item }}.yml
|
|
|
|
mode: "0644"
|
|
|
|
loop:
|
|
|
|
- configuration
|
|
|
|
- users_database
|
|
|
|
|
|
|
|
- name: Get docker network
|
|
|
|
community.docker.docker_network:
|
|
|
|
name: lotus_land_story
|
|
|
|
register: docker_network
|
|
|
|
|
|
|
|
- name: Run Authelia
|
|
|
|
community.docker.docker_container:
|
|
|
|
restart: true
|
|
|
|
name: authelia
|
|
|
|
image: docker.io/authelia/authelia:{{ version }}
|
|
|
|
env:
|
|
|
|
AUTHENTICATION_GUARD: remote_user_guard
|
|
|
|
volumes:
|
|
|
|
- /mnt/lotus-land-story/authelia/config:/config
|
|
|
|
- /mnt/lotus-land-story/authelia/secrets:/secrets
|
|
|
|
restart_policy: unless-stopped
|
|
|
|
networks:
|
|
|
|
- name: lotus_land_story
|
|
|
|
|
|
|
|
handlers:
|
|
|
|
- name: Import restarts
|
|
|
|
ansible.builtin.import_tasks: restarts.yml
|
|
|
|
|
|
|
|
# vim: ft=yaml.ansible
|