mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-04-28 18:30:24 +02:00
Updated settings
This commit is contained in:
parent
f892a5b54d
commit
c9ab0cd7cc
@ -50,38 +50,18 @@
|
|||||||
"client_secret": oidc.client.secret
|
"client_secret": oidc.client.secret
|
||||||
} | to_json }}
|
} | to_json }}
|
||||||
|
|
||||||
- name: Apply OIDC settings via Docker + here-doc
|
- name: Apply all Listmonk settings
|
||||||
shell: |
|
shell: |
|
||||||
docker exec -i {{ database_host }} psql \
|
docker exec -i {{ database_host }} psql \
|
||||||
-U {{ database_username }} \
|
-U {{ database_username }} \
|
||||||
-d {{ database_name }} << 'EOSQL'
|
-d {{ database_name }} << 'EOSQL'
|
||||||
UPDATE settings
|
UPDATE settings
|
||||||
SET value = '{{ oidc_settings_json }}'::jsonb
|
SET value = '{{ item.value }}'::jsonb
|
||||||
WHERE key = 'security.oidc';
|
WHERE key = '{{ item.key }}';
|
||||||
EOSQL
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
when: applications[application_id].features.oidc | bool
|
|
||||||
|
|
||||||
- name: Enable hCaptcha and configure keys in Listmonk database
|
|
||||||
shell: |
|
|
||||||
docker exec -i {{ database_host }} psql \
|
|
||||||
-U {{ database_username }} \
|
|
||||||
-d {{ database_name }} <<'EOSQL'
|
|
||||||
-- enable captcha (boolean true)
|
|
||||||
UPDATE settings
|
|
||||||
SET value = 'true'::jsonb
|
|
||||||
WHERE key = 'security.enable_captcha';
|
|
||||||
|
|
||||||
-- set site key (JSON string)
|
|
||||||
UPDATE settings
|
|
||||||
SET value = '"{{ applications[application_id].credentials.hcaptcha.site_key }}"'::jsonb
|
|
||||||
WHERE key = 'security.captcha_key';
|
|
||||||
|
|
||||||
-- set secret (JSON string)
|
|
||||||
UPDATE settings
|
|
||||||
SET value = '"{{ applications[application_id].credentials.hcaptcha.secret }}"'::jsonb
|
|
||||||
WHERE key = 'security.captcha_secret';
|
|
||||||
EOSQL
|
EOSQL
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
loop: "{{ listmonk_settings }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.key }}"
|
||||||
|
when: item.when is not defined or item.when
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
application_id: "listmonk"
|
application_id: "listmonk"
|
||||||
database_password: "{{applications[application_id].credentials.database.password}}"
|
database_password: "{{applications[application_id].credentials.database.password}}"
|
||||||
database_type: "postgres"
|
database_type: "postgres"
|
||||||
|
|
||||||
|
listmonk_settings:
|
||||||
|
- key: "app.root_url"
|
||||||
|
value: '"https://{{ domains[application_id] }}"'
|
||||||
|
|
||||||
|
# OIDC integration (conditional)
|
||||||
|
- key: "security.oidc"
|
||||||
|
value: >-
|
||||||
|
{{ {
|
||||||
|
"enabled": True,
|
||||||
|
"client_id": oidc.client.id,
|
||||||
|
"provider_url": oidc.client.issuer_url,
|
||||||
|
"client_secret": oidc.client.secret
|
||||||
|
} | to_json }}
|
||||||
|
when: applications[application_id].features.oidc | bool
|
||||||
|
|
||||||
|
# hCaptcha toggles and credentials\ n - key: "security.enable_captcha"
|
||||||
|
value: "true"
|
||||||
|
- key: "security.captcha_key"
|
||||||
|
value: '"{{ applications[application_id].credentials.hcaptcha.site_key }}"'
|
||||||
|
- key: "security.captcha_secret"
|
||||||
|
value: '"{{ applications[application_id].credentials.hcaptcha.secret }}"'
|
Loading…
x
Reference in New Issue
Block a user