Doubts on Provisioning


After resolving various errors finally I have been able to perform vagrant up without any errors, out of the box.

On opening I am getting 404 error by nginx.

I have confusion about the following Provision part of Trellis doc.



Run vagrant up


Provision server: ansible-playbook -i hosts/<environment> server.yml
Deploy your site: ./ <environment> <site name>

  1. Is it necessary to make any changes in the configuration file? Can’t I run it out of the box? If yes, then what wrong i did to get 404 error.
  2. On Windows environment ansible-playbook can not be run. I couldn’t find servers.yml file shared with Vagrant. How to perform that step from Windows. Same doubt for deploying as well.

I see you’re on Windows. Did you follow these steps?

If you’ve had errors along the way, it would be important to do a vagrant destroy and remove any entries for from your /etc/hosts, then do a fresh vagrant up.

  1. If you’ve dealt with the project Requirements and Installation, then yes, I believe the defaults should be sufficient to bring up the site. Windows users can correct me.

  2. As @ben mentioned, see the Running Ansible Commands section of the Windows wiki.

Surprisingly on my another machine the same configuration worked.

Yes I followed them. I’ve doubt about the Remote Server Setup part where it is mentioned to run the following command.

ansible-playbook -i hosts/<environment> server.yml

How to access Trellis files from Vagrant?

Try this

# SSH in to the vagrant vm
vagrant ssh

# Change directories to the /vagrant shared folder
cd /vagrant

# See that the project files are there, shared
ls -al

# Run your ansible commands, e.g., 
ansible-playbook server.yml -i hosts/staging

In the case of staging/production, you’ll need to edit at least a few configs in wordpress_sites to correspond to your remote server. Also add your server’s IP to the hosts file, like the README says.

1 Like

oh! how could i miss it?

Thank you! :grinning:

Good job diving in! I just remembered someone saying that vagrant ssh doesn’t work on all Windows. If that’s the case for you, see some of the links and ideas in this thread.

1 Like