Error during example site install / config (newbie question)

Hi, all! I’ve been going through the example site install / config…and I (think) I’m really close to getting it up and running…learning a lot in the process. However, I get an error at the end when running the ‘vagrant up’ command. So…I’ve been going back through it from scratch, paying closer attention to any errors that are being thrown…and the only one I’ve found is when I run:

ansible-galaxy install -r requirements.yml

I get:

[ error ] Unexpected Exception: pop from empty list

Being new to all of this, I’m not even sure where to start looking to fix it (or what the problem even is). Perhaps I’ve missed something along the way? Just not sure.

When I get to the vagrant step, it created the VirtualBox instance and started it…but I can’t access anything. I get the following error during provisioning:

ERROR! the role 'ntp' was not found

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

Thanks for any insight you can give!

What version of Ansible do you have?

You’ll have to get that ansible-galaxy install to succeed before doing anything with vagrant, unless you’re on Windows, in which case you can just run vagrant up. You might remove the vendor directory in the trellis root and try again.

@kalenjohnson is on to something though. The ansible-galaxy install command requires you to be running Ansible 1.8+ (but avoid 1.9.1).

Everything I have installed should be the latest 'n greatest since I didn’t have anything installed previously other than pieces that are already in OSX. Ansible is 2.0.0 (devel df09691a38).

I’ve been suspecting my problem has something to do with what you just mentioned…the vendor directory. I’ve seen it referenced in a couple of variables. In the Vagrantfile:

ENV['ANSIBLE_ROLES_PATH'] = File.join(ANSIBLE_PATH, 'vendor', 'roles')

And in ansible.cfg

[defaults]
roles_path = vendor/roles

But there is no vendor directory. Anywhere. I tried changing both of those to just ‘roles’, but that didn’t seem to make a difference, either.

Not sure if there are changes between bedrock-ansible to trellis or maybe ansible 1.x to 2 that I’m just lucky enough to be caught up in, but I just can’t seem to make it work when following the install instructions.

I think the vendor directory is created when you successfully run the ansible-galaxy install command. I haven’t run ansible 2.0 yet. I guess you could try switching to the current stable 1.9.2 and try the ansible-galaxy install again.

I think there is also a way you could manually install the galaxy roles listed in requirements.yml, but it would be nice to figure out this issue.

I’m pretty sure this is an issue with Ansible 2.0 as it’s still in development. Definitely try 1.9.2 as @fullyint mentioned.

Yeah, that was it. Once I loaded 1.9.2, the ansible-galaxy install command worked like a charm. I then had some problems provisioning, but reinstalled ansible via pip this time and that fixed the issues with the submodules. (See…I’m learning!)

So…now (hopefully) the last of the newbie questions: I’ve gone through the whole process and there are no apparent errors. The VM is up and running and I can successfully ping it’s IP via the terminal. However, I can’t pull the site up. Any tips on why I wouldn’t be able to bring it up by http://roots-example-project.dev/ ? I feel like I’m ‘this close’…but not quite. Thanks!

Check your /etc/hosts for roots-example-project.dev

If it isn’t there then you probably forgot to install hostsupdater

vagrant plugin install hostsupdater

2 Likes

There were actually multiple entries in the hosts file from all of my attempts at getting this working, and I’m guessing they were conflicting with each other. I cleaned it out and re-ran the vagrant commands and it’s finally working for me! Thanks to all for the assists. I’m sure I’ll have more questions as I work through the framework, but this issue can officially be closed! Thanks again.

1 Like

Multiple entries? That’s odd. Good reminder to run vagrant halt and vagrant destroy, and not to delete the Virtualbox manually.