WIP
This commit is contained in:
parent
97ab23e625
commit
cb50373b94
3 changed files with 14 additions and 15 deletions
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
- name: Get authentik source
|
- name: Get authentik source
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: 'https://github.com/goauthentik/authentik.git'
|
repo: https://github.com/goauthentik/authentik.git
|
||||||
dest: /opt/authentik/src
|
dest: /opt/authentik/src
|
||||||
version: version/2024.2.2
|
version: version/2024.2.2
|
||||||
force: true
|
force: true
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
- name: Create virtualenv
|
- name: Create virtualenv
|
||||||
ansible.builtin.command: "python3.12 -m venv /opt/authentik/src/venv"
|
ansible.builtin.command: python3.12 -m venv /opt/authentik/src/venv
|
||||||
|
|
||||||
- name: Installl poetry and dependencies
|
- name: Installl poetry and dependencies
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
- name: Build go proxy
|
- name: Build go proxy
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |-
|
||||||
cd /opt/authentik/src/
|
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
|
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
|
||||||
go build -o /opt/authentik/src/authentik-server ./cmd/server/
|
go build -o /opt/authentik/src/authentik-server ./cmd/server/
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
- name: Add deadsnake ppa for python3.12
|
- name: Add deadsnake ppa for python3.12
|
||||||
ansible.builtin.apt_repository:
|
ansible.builtin.apt_repository:
|
||||||
repo: 'ppa:deadsnakes/ppa'
|
repo: ppa:deadsnakes/ppa
|
||||||
|
|
||||||
- name: Install python3.12
|
- name: Install python3.12
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
|
@ -22,16 +22,16 @@
|
||||||
|
|
||||||
- name: Add longsleep ppa for go 1.22
|
- name: Add longsleep ppa for go 1.22
|
||||||
ansible.builtin.apt_repository:
|
ansible.builtin.apt_repository:
|
||||||
repo: 'ppa:longsleep/golang-backports'
|
repo: ppa:longsleep/golang-backports
|
||||||
|
|
||||||
- name: Install go 1.22
|
- name: Install go 1.22
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: "golang-go"
|
name: golang-go
|
||||||
|
|
||||||
- name: Download node GPG key
|
- name: Download node GPG key
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: 'https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key'
|
url: https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key
|
||||||
dest: "/usr/share/keyrings/node-archive-keyring.asc"
|
dest: /usr/share/keyrings/node-archive-keyring.asc
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
validate_certs: true
|
validate_certs: true
|
||||||
checksum: sha512:36c77b2bddaea0523ab90962a38ebd3ee90c3d5cf17e525f02898aa8e7b14fd1026f6d659b99d931fe907e9142a98ff08075ebfc56f0f1e2001c6ba4791d3daa
|
checksum: sha512:36c77b2bddaea0523ab90962a38ebd3ee90c3d5cf17e525f02898aa8e7b14fd1026f6d659b99d931fe907e9142a98ff08075ebfc56f0f1e2001c6ba4791d3daa
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
- name: Add nodesource repo for node
|
- name: Add nodesource repo for node
|
||||||
ansible.builtin.apt_repository:
|
ansible.builtin.apt_repository:
|
||||||
repo: 'deb [arch=amd64 signed-by=/usr/share/keyrings/node-archive-keyring.asc] https://deb.nodesource.com/node_21.x nodistro main'
|
repo: deb [arch=amd64 signed-by=/usr/share/keyrings/node-archive-keyring.asc] https://deb.nodesource.com/node_21.x nodistro main
|
||||||
|
|
||||||
- name: Install nodejs
|
- name: Install nodejs
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
|
@ -48,13 +48,12 @@
|
||||||
|
|
||||||
- name: Add authentik user
|
- name: Add authentik user
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
name: "authentik"
|
name: authentik
|
||||||
system: true
|
system: true
|
||||||
|
|
||||||
- name: Create /opt/authentik
|
- name: Create /opt/authentik
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /opt/authentik
|
path: /opt/authentik
|
||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: "0755"
|
||||||
owner: authentik
|
owner: authentik
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
ansible.builtin.import_tasks: dependencies.yml
|
ansible.builtin.import_tasks: dependencies.yml
|
||||||
become: true
|
become: true
|
||||||
tags:
|
tags:
|
||||||
- install_dependencies
|
- install_dependencies
|
||||||
|
|
||||||
- name: Build authentik
|
- name: Build authentik
|
||||||
ansible.builtin.import_tasks: build.yml
|
ansible.builtin.import_tasks: build.yml
|
||||||
|
|
Loading…
Reference in a new issue