mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-12-02 07:47:58 +00:00
Pure 1:1 rename (69 insertions / 69 deletions across 66 files) to finish the ``docker_*`` → ``compose_*`` alignment started in 8373468e9. The flag configures whether the compose include flushes handlers right after run; the ``docker_`` prefix was misleading (handlers are Ansible-side, not docker-side) and the variable is part of the same ``sys-svc-compose`` SPOT cluster as ``compose_repository_*``. Touches the role default, the implementation (``sys-svc-compose/tasks/utils/up.yml``), all 60+ consumer roles, the network-utility wrapper + its README, and the ``test_network_create_via_util.py`` lint (both the docstring guidance and the asserted diff). Breaking change for any external override that still sets the old name — no alias is provided. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
85 lines
2.7 KiB
YAML
85 lines
2.7 KiB
YAML
---
|
|
- name: "Include role sys-stk-front-proxy for {{ application_id }}"
|
|
include_role:
|
|
name: sys-stk-front-proxy
|
|
loop: "{{ WORDPRESS_DOMAINS }}"
|
|
loop_control:
|
|
loop_var: domain
|
|
vars:
|
|
webserver_extra_configuration: "client_max_body_size {{ WORDPRESS_MAX_UPLOAD_SIZE }};"
|
|
http_port: "{{ lookup('config', application_id, 'services.wordpress.ports.local.http') }}"
|
|
|
|
- name: "load docker and db for {{ application_id }}"
|
|
include_role:
|
|
name: sys-stk-backend
|
|
vars:
|
|
compose_handlers_flush: false
|
|
|
|
- name: "Transfering upload.ini to {{ WORDPRESS_CONFIG_UPLD_ABS }}"
|
|
template:
|
|
src: upload.ini.j2
|
|
dest: "{{ WORDPRESS_CONFIG_UPLD_ABS }}"
|
|
notify:
|
|
- compose up
|
|
- compose build
|
|
|
|
- name: "Transfering msmtprc to {{ WORDPRESS_MSMTP_ABS }}"
|
|
template:
|
|
src: "{{ WORDPRESS_MSMTP_SRC }}"
|
|
dest: "{{ WORDPRESS_MSMTP_ABS }}"
|
|
notify: compose up
|
|
|
|
- name: Flush handlers to make {{ WORDPRESS_CONFIG_FILE }} available before patch
|
|
meta: flush_handlers
|
|
|
|
- name: Check if {{ WORDPRESS_CONFIG_FILE }} exists in WordPress
|
|
command: >
|
|
container exec -u {{ WORDPRESS_USER }} {{ WORDPRESS_CONTAINER }} test -f {{ WORDPRESS_CONFIG_PATH }}
|
|
register: wp_config_file_exists
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: Patch WordPress {{ WORDPRESS_CONFIG_FILE }} with updated DB credentials
|
|
include_tasks: 01_patch_config.yml
|
|
when: wp_config_file_exists.rc == 0
|
|
|
|
- name: "Install wordpress"
|
|
include_tasks: 02_install.yml
|
|
|
|
- name: "Convert to Multisite when opted in"
|
|
include_tasks: 06_multisite.yml
|
|
when: >-
|
|
(lookup('config', application_id, 'services.wordpress.multisite.enabled')
|
|
| default(false) | bool)
|
|
|
|
- name: "Install mu-plugins (OIDC→RBAC role mapper)"
|
|
include_tasks: 05_mu_plugins.yml
|
|
|
|
- name: "Install and activate WordPress plugins"
|
|
block:
|
|
- name: "Iterate through WordPress plugins"
|
|
include_tasks: 03_enable_plugin.yml
|
|
loop: "{{ WORDPRESS_PLUGINS }}"
|
|
loop_control:
|
|
loop_var: wordpress_plugin
|
|
label: "{{ wordpress_plugin.key }}"
|
|
vars:
|
|
plugin_name: "{{ wordpress_plugin.key }}"
|
|
plugin_enabled: "{{ wordpress_plugin.value.enabled | bool }}"
|
|
plugin_task_path: "{{ [role_path, 'tasks/plugins', plugin_name ~ '.yml' ] | path_join }}"
|
|
when: plugin_enabled | bool
|
|
|
|
- name: Detect if WordPress is Multisite
|
|
command: >
|
|
container exec -u {{ WORDPRESS_USER }} {{ WORDPRESS_CONTAINER }}
|
|
wp eval 'echo (int) is_multisite();' --path={{ WORDPRESS_DOCKER_HTML_PATH }}
|
|
register: wp_is_multisite
|
|
changed_when: false
|
|
|
|
- name: "Update Single Side WordPress domain"
|
|
include_tasks: 04_update_domain.yml
|
|
when: (wp_is_multisite.stdout | trim) == '0'
|
|
vars:
|
|
# Target URL to switch to (uses your helper)
|
|
wp_new_url: "{{ WORDPRESS_URL }}"
|