implemented compose by url, parse, local yaml.
This commit is contained in:
1 parent
53695f4fff
commit
784fff8faf
218 files changed
+2271
-640
No files matched your search
@@ -8,44 +8,18 @@
|
||||
mode: "0755"
|
||||
tags: [authentik]
|
||||
|
||||
- name: Render authentik environment
|
||||
ansible.builtin.template:
|
||||
src: env.j2
|
||||
dest: "{{ authentik_dir }}/.env"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0600"
|
||||
no_log: true
|
||||
tags: [authentik, config]
|
||||
|
||||
- name: Ensure authentik proxy network exists
|
||||
community.docker.docker_network:
|
||||
name: "{{ authentik_traefik_network }}"
|
||||
state: present
|
||||
when: authentik_routing_mode == "traefik"
|
||||
tags: [authentik, docker]
|
||||
|
||||
- name: Render authentik Compose file
|
||||
ansible.builtin.template:
|
||||
src: compose.yaml.j2
|
||||
dest: "{{ authentik_dir }}/compose.yaml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify: restart authentik
|
||||
tags: [authentik, compose]
|
||||
|
||||
- name: Allow authentik ports
|
||||
community.general.ufw:
|
||||
rule: allow
|
||||
port: "{{ item }}"
|
||||
proto: tcp
|
||||
loop: "{{ authentik_tcp_ports }}"
|
||||
when: authentik_routing_mode == "host"
|
||||
tags: [authentik, firewall]
|
||||
|
||||
- name: Start authentik
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ authentik_dir }}"
|
||||
state: present
|
||||
tags: [authentik, compose]
|
||||
- name: Deploy authentik Compose project
|
||||
ansible.builtin.include_role:
|
||||
name: compose_project
|
||||
vars:
|
||||
compose_project_dir: "{{ authentik_dir }}"
|
||||
compose_project_directories:
|
||||
- "{{ authentik_dir }}"
|
||||
compose_project_env_template_src: "{{ playbook_dir }}/../roles/authentik/templates/env.j2"
|
||||
compose_project_compose_template_src: "{{ playbook_dir }}/../roles/authentik/templates/compose.yaml.j2"
|
||||
compose_project_override_template_src: "{{ playbook_dir }}/../roles/authentik/templates/compose.override.yaml.j2"
|
||||
compose_project_create_proxy_network: "{{ authentik_routing_mode == 'traefik' }}"
|
||||
compose_project_proxy_network: "{{ authentik_traefik_network }}"
|
||||
compose_project_firewall_ports: "{{ authentik_tcp_ports }}"
|
||||
compose_project_firewall_enabled: "{{ authentik_routing_mode in ['host', 'traefik_file'] }}"
|
||||
tags: [authentik]
|
||||
Reference in new issue
Block a user