Roots example project Vagrantfile issue?


I am very new with Roots and the stack used to get local development up and running.

Whenever I would start a project I would follow the roots-example-project repo. I noticed most recently that the step moving the Vagrantfile out of ansible is no longer listed. Must be due to the update to Trellis

Well when you follow the example project docs and get to “vagrant up” there is an error message

A Vagrant environment or target machine is required to run this
command. Run vagrant init to create a new Vagrant environment. Or,
get an ID of a target machine from vagrant global-status to run
this command on. A final option is to change to a directory with a
Vagrantfile and to try again.

I went ahead and issued the vagrant init command and it creates a file with only the following uncommented = "base"
So reading the comment on the file I visited hasicorp and found the ubuntu trusty 64 option and put that in my Vagrant file.

Once I do that it will actually fire up the VM but when I go to my browser I error out and cannot make a connection.

Time for my question.

Is the example-project repo missing a step? Or do I need to read up on how to configure a Vagrantfile?

It’s located in ./trellis/Vagrantfile.

Delete the file you created with vagrant init and use the one from ./trellis/Vagrantfile.

cd trellis
vagrant up

Or if you would like to move the Vagrantfile to your project root, you can still do that. Just change the ANSIBLE_PATH variable. It should look like this:

ANSIBLE_PATH = File.join(__dir__, 'trellis') # absolute path to Ansible directory

Ahh thank you very much. That was it.