authentik first implementation
This commit is contained in:
parent
468b72d9da
commit
9095522515
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
- name: Install / remove authentik
|
||||
hosts: authentik
|
||||
become: true
|
||||
debugger: on_failed
|
||||
roles:
|
||||
- geerlingguy.docker
|
||||
- newt_client
|
||||
- ax-bzh.authentik
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
---
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
- name: Create docker compose directory
|
||||
ansible.builtin.file:
|
||||
path: "/home/{{ ansible_user }}/compose_projects/newt_compose"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
register: compose_dir
|
||||
|
||||
- name: Copy compose file
|
||||
ansible.builtin.template:
|
||||
src: templates/newt_compose.yaml.j2
|
||||
dest: "{{ compose_dir.path }}/compose.yaml"
|
||||
|
||||
|
||||
- name: Copy secret file
|
||||
ansible.builtin.template:
|
||||
src: templates/newt-config.secret.j2
|
||||
dest: "{{ compose_dir.path }}/newt-config.secret"
|
||||
|
||||
|
||||
|
||||
- name: Defining network
|
||||
community.docker.docker_network:
|
||||
name: "newt-network"
|
||||
state: present
|
||||
|
||||
|
||||
|
||||
- name: Starting newt project
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ compose_dir.path }}"
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
- include_tasks: docker_newt.yaml
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"id": "{{ pangolin_site_id }}",
|
||||
"secret": "{{ newt_secret }}",
|
||||
"endpoint": "https://pangolin.{{ base_domain }}",
|
||||
"tlsClientCert": ""
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
services:
|
||||
|
||||
newt:
|
||||
image: fosrl/newt
|
||||
container_name: newt
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- CONFIG_FILE=/run/secrets/newt-config
|
||||
secrets:
|
||||
- newt-config
|
||||
|
||||
networks:
|
||||
- newt-network
|
||||
|
||||
|
||||
|
||||
networks:
|
||||
newt-network:
|
||||
external: true
|
||||
|
||||
secrets:
|
||||
newt-config:
|
||||
file: ./newt-config.secret
|
||||
Loading…
Reference in New Issue