Provision fails on nginx reload in wordpress-setup task

Nginx doesn’t reload when it is being notified as the last step in the wordpress-setup task when I try to provision my production machine. Based on the error message it looks like nginx isn’t even running? Any thoughts on what might cause this?

NOTIFIED: [common | reload nginx] *********************************************
failed: [ip-of-production-machine] => {"failed": true}
msg: reload: Job is not running: nginx

The task is run here:

Here are my production variables with sensitive info stripped out:

mysql_root_password: XYZ

  - username: XYZ
      - "{{ web_user }}"

   - path: "{{ project.local_path }}/web/app/themes/brostroms"
     cmd: npm install
   - path: "{{ project.local_path }}/web/app/themes/brostroms"
     cmd: bower install
   - path: "{{ project.local_path }}/web/app/themes/brostroms"
     cmd: gulp --production

  - name: compiled theme assets
    src: "{{ project.local_path }}/web/app/themes/brostroms/dist"
    dest: web/app/themes/brostroms

    local_path: '../site' # path targeting local Bedrock site directory (relative to Ansible root)
    branch: master
      enabled: false
      subdomains: false
      enabled: false
    system_cron: true
      wp_env: production
      db_name: XYZ
      db_user: XYZ
      db_password: XYZ
      # Generate your keys here:
      auth_key: "XYZ"
      auth_salt: "XYZ"
      logged_in_key: "XYZ"
      logged_in_salt: "XYZ"
      nonce_key: "XYZ"
      nonce_salt: "XYZ"
      secure_auth_key: "XYZ"
      secure_auth_salt: "XYZ"

Does this always happen? And there were no errors previous to this?

I’ve never seen it myself or from anyone else before. Doesn’t mean it’s not a bug though.

Your production server was stock Ubuntu 14.04?

First time I’ve encountered it as well. I’ve tried to run the provision command a couple of more times (tried again just now) and it always stops at this stage.

Server is a stock Ubuntu 14.04 @ Digital Ocean.

Is there a way to verify that nginx is running earlier in the provisioning process? It doesn’t look like there’s a specific task for explicitly starting the nginx service, or am I missing something?

TASK: [nginx | Add Nginx PPA] *************************************************
ok: [ip]

TASK: [nginx | Install Nginx] *************************************************
ok: [ip]

TASK: [nginx | Grab h5bp/server-configs-nginx] ********************************
ok: [ip]

TASK: [nginx | Copy over h5bp configuration] **********************************
changed: [ip] => (item=mime.types)
changed: [ip] => (item=h5bp/)

TASK: [nginx | Copy SSL conf files] *******************************************
ok: [ip] => (item=/Users/Oscar/Sites/
ok: [ip] => (item=/Users/Oscar/Sites/

TASK: [nginx | Create nginx.conf] *********************************************
ok: [ip]

TASK: [nginx | Disable default server] ****************************************
ok: [ip]

TASK: [nginx | Enable better default site to drop unknown requests] ***********
changed: [ip]

TASK: [nginx | Create base WordPress config] **********************************
ok: [ip]

OK, my bad - I’d accidentally created a LAMP droplet instead of a vanilla 14.04 machine… Sorry for the inconvenience.

No problem, glad it you got it sorted.