My Trellis playbook just failed at the [nginx : Add Nginx PPA] task because the connection timed out. I then re-ran the playbook and Ansible failed as follows:
TASK [php : Start php7.0-fpm service] ******************************************
task path: /Users/siroossaeed/Projects/ansible/trellis-craft/roles/php/tasks/main.yml:39
System info:
Ansible 2.1.1.0; Darwin
Trellis at "Fix #639 - WP 4.6 compatibility: update WP-CLI to 0.24.1"
---------------------------------------------------
Job for php7.0-fpm.service failed because the control process exited with
error code. See "systemctl status php7.0-fpm.service" and "journalctl -xe"
for details.
fatal: [52.31.152.61]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"arguments": "", "enabled": true, "name": "php7.0-fpm", "pattern": null, "runlevel": "default", "sleep": null, "state": "started"}, "module_name": "service"}}
The contents of the php7.0-fpm log on the server were as follows:
[21-Aug-2016 13:11:53] ERROR: [pool wordpress] the chdir path '/srv/www/' does not exist or is not a directory
[21-Aug-2016 13:11:53] ERROR: failed to post process the configuration
[21-Aug-2016 13:11:53] ERROR: FPM initialization failed
This seems to be happening because the /etc/php/7.0/fpm/pool.d/wordpress.conf
file is now on the server, however, the /srv/www/
directory hasn’t yet been created. Would it not be a good idea to ensure that the aforementioned directory is present before copying across the template?