Files
computer-playbook/roles/web-app-wordpress/tasks/03_enable_plugin.yml
Kevin Veen-Birkenbach 73e7fbdc8a refactor(web-app-wordpress): unify variable naming to uppercase WORDPRESS_* style
- Replaced all lowercase wordpress_* variables with uppercase WORDPRESS_* equivalents
- Ensured consistency across tasks, templates, and vars
- Improves readability and aligns with naming conventions

Conversation: https://chatgpt.com/share/68af29b5-8e7c-800f-bd12-48cc5956311c
2025-08-27 17:52:38 +02:00

19 lines
598 B
YAML

---
- name: "Check if plugin has a dedicated install task"
stat:
path: "{{ plugin_task_path }}"
register: plugin_task_file
- name: "Include plugin-specific install task if it exists"
include_tasks: "{{ plugin_task_path }}"
when: plugin_task_file.stat.exists
- name: "Install and activate WordPress plugin via WP CLI"
command: >
docker-compose exec -u www-data -T application
wp plugin install {{ plugin_name }} --activate
--path={{ WORDPRESS_DOCKER_HTML_PATH }}
args:
chdir: "{{ docker_compose.directories.instance }}"
when: not plugin_task_file.stat.exists