Roots Discourse

Development vagrant up fails with recursion error at TASK [wordpress-install : Change site owner to user]



Trying to figure out what I might be doing wrong here, can’t seem to get around this error during initial vagrant up (or vagrant reload --provision) for a development environment in Windows 10.

TASK [wordpress-install : Change site owner to user] ***************************
System info:
Ansible 2.7.5; Vagrant 2.2.3; Linux
Trellis 1.0.1: January 16th, 2019

See stdout/stderr for the exact error
Traceback (most recent call last):
File “”, line 113, in
File “”, line 105, in _ansiballz_main
File “”, line 48, in invoke_module
File “/usr/lib/python3.6/”, line 235, in load_module
return load_source(name, filename, file)
File “/usr/lib/python3.6/”, line 170, in load_source
module = _exec(spec, sys.modules[name])
File “”, line 618, in _exec
File “”, line 678, in exec_module
File “”, line 219, in
File “/tmp/ansible_file_payload_04h5l9jn/”, line 863, in

File “/tmp/ansible_file_payload_04h5l9jn/”, line 849, in main
File “/tmp/ansible_file_payload_04h5l9jn/”, line 571, in
File “/tmp/ansible_file_payload_04h5l9jn/”, line 305, in
File “/tmp/ansible_file_payload_04h5l9jn/”, line 305, in
File “/tmp/ansible_file_payload_04h5l9jn/”, line 305, in
[Previous line repeated 982 more times]
File “/tmp/ansible_file_payload_04h5l9jn/”, line 296, in
File “/tmp/ansible_file_payload_04h5l9jn/
odule_utils/”, line 1541, in set_fs_attributes_if_different
File “/tmp/ansible_file_payload_04h5l9jn/
odule_utils/”, line 1193, in set_owner_if_different
File “/tmp/ansible_file_payload_04h5l9jn/
odule_utils/”, line 1085, in user_and_group
RecursionError: maximum recursion depth exceeded

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: RecursionError: maximum recursion depth exceeded
failed: [default] ( => {“changed”: false, “item”: {“key”: “”, “value”: {“admin_email”: "", “cache”: {“enabled”: false}, “local_path”: “…/frankfort”, “multisite”: {“enabled”: false}, “site_hosts”: [{“canonical”: “frankfortme.test”, “redirects”: [“www.frankfortme.test”]}], “ssl”: {“enabled”: true, “provider”: “self-signed”}}}, “module_stdout”: “”, “rc”: 1}
to retry, use: --limit @/home/vagrant/trellis/dev.retry

I have been able to identify that the server appears to be running despite the failure, but the wordpress site will not display, instead I get some PHP errors about missing template files:

( ! ) Warning: require(/srv/www/ failed to open stream: No such file or directory in /srv/www/ on line 5
Call Stack

Time Memory Function Location

1 0.0082 391536 {main}( ) …/index.php:0

( ! ) Fatal error: require(): Failed opening required ‘/srv/www/’ (include_path=’.:/usr/share/php’) in /srv/www/ on line 5
Call Stack

Time Memory Function Location

1 0.0082 391536 {main}( ) …/index.php:0

I can verify the files in question are missing, there are no files whatsoever showing up in the wp folder for the site.

I have tried to follow the most recent installation instructions for Windows, which dip heavily into WSL now. I have tried vagrant up from within the WSL as well as from windows using PowerShell as admin, but get the same results either way.

Can anyone offer me any advice about where to look for an issue? If more information would be helpful please let me know what info you would need to dig deeper.


I have a suspicion about where I might have gone wrong - I populated my new site’s directory with an older git command instead of a composer command that was specified in the newer instructions. I’m not sure why that would result in wordpress core seemingly getting left out, but I’m trying again using the composer project method and am hopeful it will work out as expected.


I can confirm now that using the composer method

composer create-project roots/bedrock

in a clean directory for my site resolved my issue

I didn’t use the site’s directory as the last parameter to target a specific directory, and as a result I ended up needing to copy the files to the appropriate directory after the fact. I know I saw it somewhere presented this way:

composer create-project roots/bedrock site

where “site” is the name of the folder you are installing bedrock into, but I can’t recall what page I saw that on at this point (if I had thought to use this syntax, it could have saved me some additional time)

anyhow, this resolved my issue. I ran vagrant up and then vagrant reload --provision after installing bedrock into an empty directory named to match the location specified in my trellis/group_vars/development/wordpress_sites.yml for local path, and everything that wasn’t working started working fine. I could see the wp directory that was previously empty for me had been populated correctly when I ran the composer create-project command, and there was no longer an error during the wordpress install change site owner to user task during provisioning.

Hope this helps someone else if they end up in a similar situation.


Hi. Recently I’m going through same issue like you and I’m bit confused here with your solution. Sorry for not getting your answer properly. Could you please provide your folder structure of your project where you had set bedrock and trellis and what did you put in the trellis/group_vars/development/wordpress_sites.yml for local path


I have been having the exact same issue when following the instructions to the letter (platform is Windows Subsystem for Linux).
I have successfully gotten all of the way through vagrant up by downloading the sample trellis project from github,… every time I try creating the vagrant project through composer etc it fails at this same place. other forum posts seem to point to nfs permissions, but in the same OS environment, using the github sample, it works.
out of ideas at this point…


Just added a note here per the same thing @mmirus ran into:

Can you please try downgrading Ansible to 2.5.1 (pip install ansible==2.5.1) and then re-provisioning?


thank you Ben. ended up doing pip uninstall ansible==2.7.5 then installed 2.5.1 … also had to modify the Vagrantfile to explicitly install 2.5.1 on the guest vm rather than letting it use vconfig.fetch(‘vagrant_ansible_version’) as it kept installing 2.7.5 on the guest vm… Thanks for your help!


Editing the vagrant file solved the issue for me as well. Thank you for posting your solution!