-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Authelia & switch Borgmatic to use Cron (systemd timer broke???)
- Loading branch information
Showing
8 changed files
with
559 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
- name: Setup Authelia using Docker | ||
hosts: myhosts | ||
become: true | ||
vars_files: | ||
- vault.yml | ||
|
||
tasks: | ||
- name: Do prereqs | ||
ansible.builtin.include_role: | ||
name: docker_prereqs | ||
|
||
- name: Copy config file for Authelia | ||
ansible.builtin.template: | ||
src: extra/authelia.yml.j2 | ||
dest: /opt/authelia/config/configuration.yml | ||
mode: "0644" | ||
|
||
- name: Copy user config file for Authelia | ||
ansible.builtin.template: | ||
src: extra/authelia_users.yml.j2 | ||
dest: /opt/authelia/config/users_database.yml | ||
mode: "0644" | ||
|
||
- name: Copy Compose file over | ||
ansible.builtin.template: | ||
src: compose/authelia/compose.yml.j2 | ||
dest: /opt/authelia/compose.yml | ||
mode: "0644" | ||
|
||
- name: Start Authelia from compose | ||
community.docker.docker_compose_v2: | ||
project_src: /opt/authelia/ | ||
register: output | ||
|
||
- name: Show results of compose | ||
ansible.builtin.debug: | ||
var: output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
services: | ||
authelia: | ||
container_name: 'authelia' | ||
image: 'docker.io/authelia/authelia:latest' | ||
restart: 'unless-stopped' | ||
ports: | ||
- 9091:9091 | ||
volumes: | ||
- '/opt/authelia/config:/config' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
totp: | ||
issuer: 'push.stilk.tf' | ||
identity_validation: | ||
reset_password: | ||
jwt_secret: '{{ authelia_jwt_secret }}' | ||
authentication_backend: | ||
refresh_interval: '5m' | ||
password_reset: | ||
disable: false | ||
file: | ||
path: '/config/users_database.yml' | ||
session: | ||
secret: '{{ authelia_session_secret }}' | ||
name: 'authelia_session' | ||
same_site: 'lax' | ||
inactivity: '5m' | ||
expiration: '1h' | ||
remember_me: '1M' | ||
cookies: | ||
- domain: 'stilk.tf' | ||
authelia_url: 'https://auth.stilk.tf' | ||
remember_me: '1d' | ||
notifier: | ||
filesystem: | ||
filename: '/config/notification.txt' | ||
storage: | ||
encryption_key: '{{ authelia_storage_secret }}' | ||
local: | ||
path: '/config/db.sqlite3' | ||
access_control: | ||
default_policy: deny | ||
rules: | ||
- domain: "*.stilk.tf" | ||
policy: two_factor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
users: | ||
{{ authelia_user_username }}: | ||
disabled: false | ||
displayname: '{{authelia_user_displayname}}' | ||
password: '{{authelia_user_password}}' | ||
email: '{{authelia_user_email}}' | ||
groups: | ||
- 'admins' | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- name: Install prerequisite Python packages for the Ansible module for Docker | ||
ansible.builtin.apt: | ||
name: python3-requests | ||
- name: Check if Docker is installed on system | ||
ansible.builtin.command: docker --version | ||
register: docker_valid | ||
changed_when: docker_valid.rc != 0 |