Files
computer-playbook/roles/web-app-wordpress/tasks/02_install.yml
T
kevinveenbirkenbachandClaude Opus 4.7 951f6d36d2 chore(lint): unify autoformat/galaxy parallelism into one PARALLEL env var
* scripts/lint/autoformat.sh: rename AUTOFORMAT_PARALLEL to PARALLEL,
  declare it at file start with default `true`; still env-overridable.
  Reword the worker comment so the literal `# shellcheck` token no
  longer appears at start-of-line and trips SC1072/SC1073.
* scripts/lint/galaxy.sh: drop the GALAXY_FATAL / GALAXY_NAMESPACE /
  GALAXY_PARALLEL env vars (over-engineered for a single repo). Failure
  is always fatal. NAMESPACE is an internal constant. Add the same
  PARALLEL env var (default `true`, env-overridable); falsy demotes the
  xargs fan-out to one worker.
* docs/contributing/environment/variables.md: collapse the four
  AUTOFORMAT_*/GALAXY_* rows into one `PARALLEL` row covering both
  consumers.
* docs/contributing/tools/make.md: refer to `PARALLEL=0` everywhere;
  add the lint-galaxy parallelism note.

Plus working-tree drift across roles/, group_vars/, inventories/, and
tasks/ that accumulated from the make-test setup phase regenerating
generated artefacts during recent test runs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 00:59:24 +02:00

36 lines
1.3 KiB
YAML

---
- name: "Wait until WordPress core files exist in {{ WORDPRESS_DOCKER_HTML_PATH }}"
command: >
container exec {{ WORDPRESS_CONTAINER }}
test -f {{ WORDPRESS_DOCKER_HTML_PATH }}/wp-includes/version.php
register: wp_core_present
retries: 60
delay: 2
changed_when: false
until: wp_core_present.rc == 0
failed_when: false
- name: "Seed WordPress core into volume if missing"
when: wp_core_present.rc != 0
command: >
container exec -u root {{ WORDPRESS_CONTAINER }} sh -lc
'set -e;
echo "[seed] WP core missing, copying from /usr/src/wordpress -> {{ WORDPRESS_DOCKER_HTML_PATH }}";
cp -a /usr/src/wordpress/. {{ WORDPRESS_DOCKER_HTML_PATH }}/;
chown -R {{ WORDPRESS_USER }}:{{ WORDPRESS_USER }} {{ WORDPRESS_DOCKER_HTML_PATH }}'
changed_when: true
- name: "Run WordPress core install via WP CLI"
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
command: >
container exec -u {{ WORDPRESS_USER }} {{ WORDPRESS_CONTAINER }}
wp core install
--url="{{ WORDPRESS_URL }}"
--title="{{ WORDPRESS_TITLE }}"
--admin_user="{{ WORDPRESS_ADMIN_USER }}"
--admin_password="{{ WORDPRESS_ADMIN_PASSWORD }}"
--admin_email="{{ WORDPRESS_ADMIN_EMAIL }}"
--path="{{ WORDPRESS_DOCKER_HTML_PATH }}"
args:
chdir: "{{ lookup('container', application_id, 'directories.instance') }}"