mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Implemented friendica database credentials update (untested)
This commit is contained in:
@@ -3,50 +3,12 @@
|
||||
include_role:
|
||||
name: cmp-db-docker-proxy
|
||||
|
||||
- name: "create {{ friendica_host_ldap_config }}"
|
||||
template:
|
||||
src: "ldapauth.config.php.j2"
|
||||
dest: "{{ friendica_host_ldap_config }}"
|
||||
mode: '644'
|
||||
owner: root
|
||||
group: 33
|
||||
force: yes
|
||||
notify: docker compose up
|
||||
- name: Integrate LDAP
|
||||
include_tasks: 01_ldap.yml
|
||||
when: applications | get_app_conf(application_id, 'features.ldap', False)
|
||||
|
||||
- name: Build friendica_addons based on features
|
||||
set_fact:
|
||||
friendica_addons: >-
|
||||
{{
|
||||
friendica_addons | default([])
|
||||
+ [{
|
||||
'name': item.key,
|
||||
'enabled': (
|
||||
applications | get_app_conf(application_id, 'features.oidc', True)
|
||||
if item.key == 'keycloakpassword'
|
||||
else applications | get_app_conf(application_id, 'features.ldap', True)
|
||||
if item.key == 'ldapauth'
|
||||
else (item.value.enabled if item.value is mapping and 'enabled' in item.value else False)
|
||||
)
|
||||
}]
|
||||
}}
|
||||
loop: "{{ applications | get_app_conf(application_id, 'addons', True) | dict2items }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
- name: flush handlers to ensure that friendica is up before friendica addon configuration
|
||||
meta: flush_handlers
|
||||
|
||||
- name: Ensure Friendica addons are in sync
|
||||
command: >
|
||||
docker compose exec --user www-data
|
||||
application
|
||||
bin/console addon
|
||||
{{ 'enable' if item.enabled else 'disable' }}
|
||||
{{ item.name }}
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
loop: "{{ friendica_addons }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
- name: Update Friendica DB credentials
|
||||
include_tasks: 02_database.yml
|
||||
|
||||
- name: Add Friendica Add Ons
|
||||
include_tasks: 03_addons.yml
|
Reference in New Issue
Block a user