mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 15:28:12 +02:00
Joomla: Add LDAP autocreate plugin support
- Introduced autocreate_users feature flag in config/main.yml - Added ldapautocreate.php and ldapautocreate.xml plugin files - Implemented tasks/01_ldap_files.yml for plugin deployment - Added tasks/05_ldap.yml to configure LDAP plugin and register ldapautocreate - Renamed tasks for better structure (01→02, 02→03, etc.) - Updated cli-ldap.php.j2 for clean parameter handling - Mounted ldapautocreate plugin via docker-compose.yml.j2 - Extended vars/main.yml with LDAP autocreate configuration Ref: https://chatgpt.com/share/68b0802f-bfd4-800f-b10a-57cf0c091f7e
This commit is contained in:
53
roles/web-app-joomla/tasks/02_install.yml
Normal file
53
roles/web-app-joomla/tasks/02_install.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
# 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, /var/www/html/installation/joomla.php ]
|
||||
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
|
||||
- "{{ JOOMLA_CONTAINER }}"
|
||||
- php
|
||||
- /var/www/html/installation/joomla.php
|
||||
- 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