2024-03-25 00:32:09 +01:00
|
|
|
---
|
|
|
|
- name: Get authentik source
|
|
|
|
ansible.builtin.git:
|
2024-03-25 00:51:16 +01:00
|
|
|
repo: https://github.com/goauthentik/authentik.git
|
2024-03-25 00:32:09 +01:00
|
|
|
dest: /opt/authentik/src
|
|
|
|
version: version/2024.2.2
|
|
|
|
force: true
|
|
|
|
|
|
|
|
- name: Build front
|
|
|
|
ansible.builtin.shell: |
|
|
|
|
cd /opt/authentik/src/website
|
|
|
|
npm i
|
|
|
|
npm run build-docs-only
|
|
|
|
cd /opt/authentik/src/web
|
|
|
|
npm i
|
|
|
|
npm run build
|
|
|
|
|
|
|
|
- name: Create virtualenv
|
2024-03-25 00:51:16 +01:00
|
|
|
ansible.builtin.command: python3.12 -m venv /opt/authentik/src/venv
|
2024-03-25 00:32:09 +01:00
|
|
|
|
|
|
|
- name: Installl poetry and dependencies
|
|
|
|
ansible.builtin.shell: |
|
|
|
|
cd /opt/authentik/src/
|
|
|
|
venv/bin/pip install poetry
|
|
|
|
venv/bin/poetry install --only=main --no-ansi --no-interaction --no-root
|
|
|
|
|
|
|
|
|
|
|
|
- name: Build go proxy
|
2024-03-25 00:51:16 +01:00
|
|
|
ansible.builtin.shell: |-
|
2024-03-25 00:32:09 +01:00
|
|
|
cd /opt/authentik/src/
|
|
|
|
sed -i "s/c.Setup(\".\/authentik\/lib\/default.yml\", \".\/local.env.yml\")/c.Setup(\"\/etc\/authentik\/config.yml\", \".\/authentik\/lib\/default.yml\", \".\/local.env.yml\")/" /opt/authentik/src/internal/config/config.go
|
2024-03-25 00:51:16 +01:00
|
|
|
go build -o /opt/authentik/src/authentik-server ./cmd/server/
|