Refactor Akaunting role and CSP handling

- Improved CSP filter to properly include web-svc-cdn and use protocol-aware domains
- Added Todo.md with redis and OIDC notes
- Enhanced Akaunting role config with CSP flags and redis option
- Updated schema to include app_key validation
- Reworked tasks to handle first-run marker logic cleanly
- Fixed docker-compose template (marker, healthcheck, setup flag)
- Expanded env.j2 with cache, email, proxy, and redis options
- Added javascript.js.j2 template for SSO warning
- Introduced structured vars for Akaunting role
- Removed deprecated update-repository-with-files.yml task

See conversation: https://chatgpt.com/share/68af00df-2c74-800f-90b6-6ac5b29acdcb
This commit is contained in:
2025-08-27 14:58:44 +02:00
parent 5446a1497e
commit 5287bb4d74
10 changed files with 142 additions and 94 deletions

View File

@@ -1,38 +0,0 @@
# It isn't best practice to use this task
# Better load the repositories into /opt/docker/[servicename]/services, build them there and then use a docker-compose file for customizing
# @todo Refactor\Remove
# @deprecated
- name: "Merge detached_files with applications | get_app_conf('web-app-oauth2-proxy','configuration_file')"
set_fact:
merged_detached_files: "{{ detached_files + [applications | get_app_conf('web-app-oauth2-proxy','configuration_file')] }}"
when: "{{ applications | get_app_conf(application_id,'features.oauth2')"
- name: "backup detached files"
command: >
mv "{{ docker_compose.directories.instance }}{{ item }}" "/tmp/{{ application_id }}-{{ item }}.backup"
args:
removes: "{{ docker_compose.directories.instance }}{{ item }}"
become: true
loop: "{{ merged_detached_files | default(detached_files) }}"
- name: checkout repository
ansible.builtin.shell: git checkout .
become: true
args:
chdir: "{{ docker_compose.directories.instance }}"
ignore_errors: true
- name: "restore detached files"
command: >
mv "/tmp/{{ application_id }}-{{ item }}.backup" "{{ docker_compose.directories.instance }}{{ item }}"
args:
removes: "/tmp/{{ application_id }}-{{ item }}.backup"
become: true
loop: "{{ merged_detached_files | default(detached_files) }}"
- name: "copy {{ detached_files }} templates to server"
template:
src: "{{ item }}.j2"
dest: "{{ docker_compose.directories.instance }}{{ item }}"
loop: "{{ detached_files }}"
notify: docker compose up