mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 23:08:06 +02:00
Add roles/web-app-taiga/tasks/01_administrator.yml to handle admin creation via 'createsuperuser' and, on failure, an upsert fallback using 'manage.py shell'. Ensures email, is_staff, is_superuser, is_active are set and password is updated when needed; emits CHANGED marker for idempotence. Update roles/web-app-taiga/tasks/main.yml to include the new 01_administrator.yml task file, removing the inline admin logic for better separation of concerns. Uses taiga-manage helper service and composes docker-compose.yml with docker-compose-inits.yml to inherit env/networks/volumes consistently. Chat reference: https://chatgpt.com/share/68af7637-225c-800f-b670-2b948f5dea54
26 lines
808 B
YAML
26 lines
808 B
YAML
---
|
|
- name: "load docker, db and proxy for {{ application_id }}"
|
|
include_role:
|
|
name: cmp-db-docker-proxy
|
|
vars:
|
|
docker_compose_flush_handlers: false
|
|
|
|
- name: "copy templates {{ TAIGA_SETTING_FILES }} for taiga-contrib-oidc-auth"
|
|
template:
|
|
src: "taiga/{{item}}.py.j2"
|
|
dest: "{{ [ docker_compose.directories.config, 'taiga-' ~ item ~ '.py'] | path_join }}"
|
|
when: TAIGA_TAIGAIO_ENABLED | bool
|
|
notify: docker compose up
|
|
loop: "{{ TAIGA_SETTING_FILES }}"
|
|
|
|
- name: "create {{ TAIGA_DOCKER_COMPOSE_INIT_PATH }}"
|
|
template:
|
|
src: "docker-compose-inits.yml.j2"
|
|
dest: "{{ TAIGA_DOCKER_COMPOSE_INIT_PATH }}"
|
|
notify: docker compose up
|
|
|
|
- name: "Flush Taiga handlers"
|
|
meta: flush_handlers
|
|
|
|
- name: "Include Taiga administrator routines"
|
|
include_tasks: 01_administrator.yml |