authentik first implementation

This commit is contained in:
Fabio Sinibaldi 2026-07-27 17:21:30 +02:00
parent 468b72d9da
commit 9095522515
6 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,10 @@
---
- name: Install / remove authentik
hosts: authentik
become: true
debugger: on_failed
roles:
- geerlingguy.docker
- newt_client
- ax-bzh.authentik

View File

@ -0,0 +1 @@
---

View File

@ -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 }}"

View File

@ -0,0 +1,2 @@
---
- include_tasks: docker_newt.yaml

View File

@ -0,0 +1,6 @@
{
"id": "{{ pangolin_site_id }}",
"secret": "{{ newt_secret }}",
"endpoint": "https://pangolin.{{ base_domain }}",
"tlsClientCert": ""
}

View File

@ -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