Add Joomla CLI paths and implement non-interactive admin password reset via CLI

Ref: https://chatgpt.com/share/69039c22-f530-800f-a641-fd2636d5b6af
This commit is contained in:
2025-10-30 18:11:18 +01:00
parent 265f815b48
commit d61c81634c
4 changed files with 26 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
---
# Reset Joomla admin password via CLI (inside the container)
- name: "Reset Joomla admin password (non-interactive CLI)"
command:
argv:
- docker
- exec
- "{{ JOOMLA_CONTAINER }}"
- php
- "{{ JOOMLA_CLI_FILE }}"
- user:reset-password
- "--username"
- "{{ JOOMLA_USER_NAME }}"
- "--password"
- "{{ JOOMLA_USER_PASSWORD }}"
register: j_password_reset
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
changed_when: j_password_reset.rc == 0