init
This commit is contained in:
commit
883f31932e
169 changed files with 5676 additions and 0 deletions
92
ansible/roles/authentik/tasks/deploy-authentik.yml
Normal file
92
ansible/roles/authentik/tasks/deploy-authentik.yml
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
---
|
||||
-
|
||||
name: Ensure install directory exists
|
||||
file:
|
||||
path: "{{ install_dir }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
-
|
||||
name: Deploy environment file
|
||||
template:
|
||||
src: env.j2
|
||||
dest: "{{ install_dir }}/.env"
|
||||
|
||||
-
|
||||
name: Ensure blueprints directory exists
|
||||
file:
|
||||
path: "{{ install_dir }}/blueprints"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
-
|
||||
name: Deploy OAuth2 blueprint
|
||||
template:
|
||||
src: blueprint-oauth2.yml.j2
|
||||
dest: "{{ install_dir }}/blueprints/oauth2-applications.yaml"
|
||||
when: oauth_applications is defined and oauth_applications | length > 0
|
||||
|
||||
-
|
||||
name: Deploy enrollment blueprint
|
||||
template:
|
||||
src: blueprint-enrollment.yml.j2
|
||||
dest: "{{ install_dir }}/blueprints/enrollment.yaml"
|
||||
|
||||
-
|
||||
name: Deploy social login blueprint
|
||||
template:
|
||||
src: blueprint-social-logins.yml.j2
|
||||
dest: "{{ install_dir }}/blueprints/social-logins.yaml"
|
||||
when: social_login_sources is defined and social_login_sources | length > 0
|
||||
|
||||
-
|
||||
name: Ensure media directory exists
|
||||
file:
|
||||
path: "{{ install_dir }}/media/public"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
-
|
||||
name: Copy branding assets
|
||||
copy:
|
||||
src: branding/
|
||||
dest: "{{ install_dir }}/media/public/"
|
||||
mode: "0644"
|
||||
when: branding_assets | default(false)
|
||||
|
||||
-
|
||||
name: Ensure custom-templates email directory exists
|
||||
file:
|
||||
path: "{{ install_dir }}/custom-templates/email"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
-
|
||||
name: Deploy custom email templates
|
||||
template:
|
||||
src: "email/{{ item }}.j2"
|
||||
dest: "{{ install_dir }}/custom-templates/email/{{ item }}"
|
||||
loop:
|
||||
- account-confirmation.html
|
||||
- password-reset.html
|
||||
|
||||
-
|
||||
name: Deploy docker-compose file
|
||||
template:
|
||||
src: docker-compose.yml.j2
|
||||
dest: "{{ install_dir }}/docker-compose.yml"
|
||||
|
||||
-
|
||||
name: Start Authentik stack
|
||||
include_role:
|
||||
name: docker
|
||||
tasks_from: start-compose
|
||||
vars:
|
||||
compose_project_dir: "{{ install_dir }}"
|
||||
|
||||
-
|
||||
name: Deploy Authentik backup script
|
||||
template:
|
||||
src: backup.sh.j2
|
||||
dest: /etc/restic/pre-backup.d/authentik.sh
|
||||
mode: "0755"
|
||||
Loading…
Add table
Add a link
Reference in a new issue