"vagrant up" on a Windows machine fails on "mailhog"


We are working with a development company that uses Windows and they are running into a problem on “vagrant up”. The error is “The role ‘mailhog’ was not found”:

Has anyone run into this issue? I read in the documentation here:

That ansible runs the galaxy install for you and that shouldn’t be a concern. Since I don’t run on a Windows OS I cannot really troubleshoot for them. Is it truly just a “vagrant up” after a fresh roots clone from a git repo? There’s no other prerequisites that are needed to get up and going on a dev environment?

Thanks in advance!

That’s correct. Vagrant automatically runs the Ansible Galaxy install.

What’s weird is that error is happening on Mailhog, yet the ntp role is before it and didn’t error.

Is this a consistent error? Doesn’t really make sense that one galaxy role in particular wouldn’t download

I have the exact same problem right now.

Just installed on my windows laptop and got that error - how do we fix that problem?

Sorry for the late reply; I wanted to be sure. Yes, multiple vagrant destroys and vagrant ups still dies on mailhog.

I agree it makes no sense why the setup would get past ntp while dying on mailhog. We’re just going to have to end up taking development in house from this company for the time being.

Hi @Krufe I think the problem could be solved by one or both of these:

  1. Remove vendor directory (either from within VM at /vagrant/ansible/vendor or on Windows host at \path\to\bedrock\vendor).
    Then retry vagrant destroy -f && vagrant up
  2. Update the Trellis project, or just recreate project from fresh clone of Trellis and Bedrock.

I see in the original screenshot the ssmpt role that was removed from Trellis Nov 5, 2016. This means that the project is probably still using the old windows.sh which only installed galaxy roles if the vendor directory was absent. Hence the suggestion in #1 to remove vendor so that it can be freshly re-installed.

It’s still surprising that the mailhog role was absent, because it was added so long ago: back in August 2015. However, another potential evidence that these project files could be that old are that the screenshot indicates that Ansible is looking for the vendor roles in /vagrant/ansible/* but the suggest naming/path has been /vagrant/trellis/* since September 2015.

The project files are old and suspect, hence the suggestion in #2 to update the project files or start fresh. Updating would also take advantage of several important Windows improvements Trellis has added in the past few months (e.g., #690, #705, #725).

I tested on Windows 10 and the 3 installation steps in the Trellis README worked without any problem:

# Fresh installation

$ mkdir example.com && cd example.com

$ git clone --depth=1 git@github.com:roots/trellis.git && rm -rf trellis/.git

$ git clone --depth=1 git@github.com:roots/bedrock.git site && rm -rf site/.git

# Boot and provision VM

$ cd trellis

$ vagrant up
1 Like