mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-11-28 07:28:31 +00:00
Joomla: Add upload-size support, introduce php-upload.ini, refactor task numbering, update Docker Compose and override logout client_max_body_size
This commit adds dynamic upload size configuration (upload_max_filesize + post_max_size), introduces a dedicated php-upload.ini template, mounts it through Docker Compose, renumbers all task files consistently, updates main.yml flow, and overrides client_max_body_size inside the logout role. Improves clarity, consistency, and brings Joomla in line with other IN roles. See: https://chatgpt.com/share/6927075c-4de0-800f-bcee-b1f5193e4a99
This commit is contained in:
55
roles/web-app-joomla/tasks/02_install.yml
Normal file
55
roles/web-app-joomla/tasks/02_install.yml
Normal file
@@ -0,0 +1,55 @@
|
||||
# Wait until the Joomla core is copied into the volume
|
||||
- name: "Wait for Joomla files to exist"
|
||||
command:
|
||||
argv: [ docker, exec, "{{ JOOMLA_CONTAINER }}", test, -f, /var/www/html/index.php ]
|
||||
register: joomla_files
|
||||
changed_when: false
|
||||
retries: 60
|
||||
delay: 2
|
||||
until: joomla_files.rc == 0
|
||||
|
||||
# (Optional) specifically wait for the CLI installer script
|
||||
- name: "Check for CLI installer"
|
||||
command:
|
||||
argv: [ docker, exec, "{{ JOOMLA_CONTAINER }}", test, -f, "{{ JOOMLA_INSTALLER_CLI_FILE }}" ]
|
||||
register: has_installer
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
# Only if not already installed (no configuration.php)
|
||||
- name: "Check if Joomla is already installed"
|
||||
command:
|
||||
argv: [ docker, exec, "{{ JOOMLA_CONTAINER }}", test, -f, "{{ JOOMLA_CONFIG_FILE }}" ]
|
||||
register: joomla_installed
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
# Install (uses absolute path + argv)
|
||||
- name: "Joomla CLI install (first run only)"
|
||||
command:
|
||||
argv:
|
||||
- docker
|
||||
- exec
|
||||
- --user
|
||||
- "{{ JOOMLA_WEB_USER }}"
|
||||
- "{{ JOOMLA_CONTAINER }}"
|
||||
- php
|
||||
- "{{ JOOMLA_INSTALLER_CLI_FILE }}"
|
||||
- install
|
||||
- "--db-type={{ JOOMLA_DB_CONNECTOR }}"
|
||||
- "--db-host={{ database_host }}"
|
||||
- "--db-user={{ database_username }}"
|
||||
- "--db-pass={{ database_password }}"
|
||||
- "--db-name={{ database_name }}"
|
||||
- "--admin-user={{ JOOMLA_USER }}"
|
||||
- "--admin-username={{ JOOMLA_USER_NAME }}"
|
||||
- "--admin-password={{ JOOMLA_USER_PASSWORD }}"
|
||||
- "--admin-email={{ JOOMLA_USER_EMAIL }}"
|
||||
- "--no-interaction"
|
||||
- "--site-name={{ JOOMLA_SITE_NAME }}"
|
||||
register: j_install
|
||||
changed_when: j_install.rc == 0
|
||||
failed_when: j_install.rc != 0
|
||||
when:
|
||||
- joomla_installed.rc != 0
|
||||
- has_installer.rc == 0
|
||||
Reference in New Issue
Block a user