Hi there,
i want to configure wordpress (activate correct theme, plugins, …) on every deploy. so i added a wp-config.yml
file to /trellis/deploy-hooks
:
---
- name: Activate Sage Theme
command: wp theme activate sage
args:
chdir: "{{ deploy_helper.new_release_path }}"
- name: Create main menu if not already there
command: wp menu create main
args:
chdir: "{{ deploy_helper.new_release_path }}"
ignore_errors: yes
When I include that file in the modified deploy hook /trellis/deploy-hooks/finalize-after.yml
:
...
- name: Update WP network database
command: wp core update-db --network
args:
chdir: "{{ deploy_helper.new_release_path }}"
when: wp_installed | success and project.multisite.enabled | default(false)
- include: wp-config.yml
- name: Reload php-fpm
shell: killall php-cgi
args:
chdir: "{{ deploy_helper.new_release_path }}"
warn: false
ignore_errors: True
… then the deploy run silently stops (no fail) with the not executed include step. Here’s the output:
TASK [deploy : Update WP database] *********************************************
changed: [host.uberspace.de]
TASK [deploy : Warn about updating network database.] **************************
skipping: [host.uberspace.de]
TASK [deploy : Update WP network database] *************************************
skipping: [host.uberspace.de]
TASK [deploy : include] ********************************************************
PLAY RECAP *********************************************************************
host.uberspace.de : ok=33 changed=14 unreachable=0 failed=0
localhost : ok=0 changed=0 unreachable=0 failed=0
Anyone any idea, what’s going wrong here?
Thanks for your help,
matthias