Vagrant up stuck at TASK [wordpress-install : Change site owner to user]

vagrant up stuck at TASK [wordpress-install : Change site owner to user] no failure, no error message, simply stuck. How can I debug whats going on, where to start?

This are my dev settings:

wordpress_sites:
  pat.com:
    site_hosts:
      - pat.dev
    local_path: ../site # path targeting local Bedrock site directory (relative to Ansible root)
    admin_email: admin@pat.dev
    multisite:
      enabled: false
    ssl:
      enabled: false
      provider: self-signed
    cache:
      enabled: false

This might be the same problem: Bindfs hangs

run vagrant up -vvvv to debug :slight_smile:

This is happening to me all of a sudden. The initial vagrant up or a vagrant provision hangs at TASK [wordpress-install : Change site owner to user] for a very long time, at least an hour. It seems to finish successfully but take an excessive amount of time.

results of $ vagrant up --debug:

changed: [default] => (item=domain.com)
DEBUG subprocess: stdout:
TASK [wordpress-install : Change site owner to user] ***************************
INFO interface: detail:
TASK [wordpress-install : Change site owner to user] ***************************
TASK [wordpress-install : Change site owner to user] ***************************
DEBUG subprocess: stdout: changed: [default] => (item=domain.com)
INFO interface: detail: changed: [default] => (item=domain.com)

Don’t you have to use “.test” now?

wordpress_sites:
  pat.com:
    site_hosts:
      - pat.test
...

You do, however, at the time when this was posted, you could use .dev.

Oh sorry man, I don’t how I found this. Haha, didn’t check the date.

1 Like

Encountering this issue now, on a machine that successfully just used trellis-cli to provision a new project (so, most recent Trellis version), did the first provision successfully, but hangs on re-provision

1 Like

I’m having the same problem. As a workaround I just removed the last entry in:
/trellis/roles/wordpress-install/tasks/directories.yml
and re-provisioned. Then the re-provision ran through to the end

It looks like ansible is having some trouble chowning the webroot directory recursively to vagrant:www-data when re-provisioning.
I logged in via vagrant ssh, checked user:group on the directories - all of them have the right owner… and if not chown -R vagrant:www-data /srv/www/
From my understanding, roots-dev did everything right -I’m pretty happy with the workaround for now :slight_smile:
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html

1 Like