Ansible failed to complete successfully

Did you install the latest VirtualBox version 5.0.14? And on which platform are you on? Mac OS X El Capitan?
Also, to be sure you can use this Vagrant plugin to keep the VirtualBox guest additions up to date with your VB version: GitHub - dotless-de/vagrant-vbguest: A Vagrant plugin to keep your VirtualBox Guest Additions up to date

Hmm, that’s weird. Try: sudo pip install ansible==2.0.0.2
Or you can always try installing the 2.0.0.2 version with the Tarball package: http://releases.ansible.com/ansible/

3 Likes

Thank you! I am back up and running with the example project working! Woohoo!

2 Likes

Got the compat.six error on ansible 1.9.4, which, seems expected. Also got an error about setuptools when I tried updating ansible with the upgrade flag. Using sudo pip install ansible== and specifying the version works every time :fist::evergreen_tree:

1 Like

Hello!

I (accidentally) upgraded my version of ansbile on Ubuntu 16.04 Desktop this week. I am now on version 2.4.

$ ansible --version
ansible 2.4.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/<username>/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]

Since the update, I can’t get Trellis to successfully deploy to development, staging or production.

The error I get running vagrant up --provision is:

ERROR! Unexpected Exception, this is probably a bug: No module named six
to see the full traceback, use -vvv
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

As far as I can tell, I have six installed.

Using apt:

$ dpkg -l | grep six
ii  python-six                                                  1.10.0-3                                     all          Python 2 and 3 compatibility library (Python 2 interface)
ii  python3-six                                                 1.10.0-3                                     all          Python 2 and 3 compatibility library (Python 3 interface)

Using pip:

$ pip list | grep six
six (1.10.0)

I stumbled on this issue on GitHub. Not sure if it is related.

Help?

1 Like

I’d suggest using pip to downgrade to Ansible 2.3.2.0:
pip install ansible==2.3.2.0

Trellis compatibility with Ansible 2.4 has been proposed but not yet reviewed nor merged. If you’re inclined to test it, your feedback would be welcome!

4 Likes

I’m experiencing this same issue.

I read this entire post, tried a few of the suggestions to no avail.

Right now I’m using Ansible 2.4.0.0 and when I try to downgrade to 2.3.2.0 I get an error:

If you have installed Ansible via Homebrew, you can downgrade from 2.4.0.0 to 2.3.2.0_1 with this command:

brew remove ansible

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/80a7570f27bbbd3fd57c3b8c4d176442584a2b95/Formula/ansible.rb

2 Likes

roots/trellis#895 – Ansible 2.4 compatibility – has been merged.
Note: Bumps Ansible requirement to 2.4.

4 Likes

Has anybody found a solution to this?

I have recently upgraded to Ansible 2.4.0.0 and since then I have been unable to provision vagrant or provision or deploy to a remote server.

For a previous install of Trellis I downgraded Ansible to 2.3.2.0 which found success. However, I still have this issue for a new Trellis install.

2 Likes

I’ve found this to be good nudge to actually update Trellis on these sites…

Thats for the suggestion to downgrade to 2.3.2.0, this fixed it for me too.

1 Like

Welp,

I guess I’ll dump my troubleshooting here since I have now joined this error boat.

TL:DR - Skip to bottom ====

Updates to High Sierra (because I’m a masochist)
Same exact error

trellis/lib/trellis/plugins/filter/filters.py", line 8, in <module>
from ansible.compat.six import string_types
ImportError: No module named six

Digging into that file, this appears to be the specific offending line

from ansible.module_utils.six import iteritems

This seems like it could be an issue

python --version
Python 2.7.10
trellis casa$ ansible --version
ansible 2.4.2.0
  config file = /Users/casa/Documents/atom/Sites/AbilityDriven/trellis/ansible.cfg
  configured module search path = [u'/Users/casa/.ansible/plugins/modules', 
  u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible 
Apple LLVM 9.0.0 (clang-900.0.37)]
  1. First thing I did was reinstall Ansible… No cigar

  2. Brew has lovingly “updated” python’s default install and sync locations on MacOS from past behavior, which has caused several cluster****s as far as Path is concerned on my system. (They had a legit reason for doing this, it just sucks).

So I’m not positive, but it looks like my python version is several updates behind Ansible’s. I’m not sure if I’m reading that correctly.

  1. Fail: Setting path correctly w/ python at 2.7.14 did not fix this

=====================

Oh snap,

@swalkinshaw
@ben thoughts?

Derp city, somehow I still had old trellis code in my project. Updated to

newest version of Trellis resolved issues.

Had the same issue: reinstalled virtualbox via brew and then clicked “Allow” In System Preferences -> Security & Privacy when it appears. Also had to kill all the running instances even after removing VirtualBox app from Applications. ps aux helps with that.

Then sadly after changing some settings and provisioning (or destroy + vagrant up again), another error pops up sometimes, but otherwise it seems the above fixed it for me on os x:

ERROR! Unexpected Exception, this is probably a bug: 'PlaybookCLI' object has no attribute 'options'
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

hmmph, so annoying to run into errors one after another indeed. Haven’t been able to get trellis working for months :slight_smile:

I was also running into that same exception ‘PlaybookCLI’ object has no attribute ‘options’ when upgrading to the latest trellis v1.2.0. I had to revert the ansible version to v2.5.3 after trying out v2.8.5 and v2.7.12 respectively.

1 Like

The PlaybookCLI error only happens in one situation: you’re using Ansible 2.8.x and do not have a recent Trellis version with Ansible 2.8 support.

If you get that error after upgrading successfully to https://github.com/roots/trellis/releases/tag/1.2.0 then please open an issue.

1 Like

Yeah I see the issue is in my Ansible version indeed - if I properly read the requirements from https://github.com/roots/roots-example-project.com I would have noticed before: it says Ansible should be 2.5.3-2.7.5. Working with Trellis updated to latest master - 1.2.0!
Thanks guys, @crypticsoft too for chiming in

1 Like

I’m also locking this thread now. It’s been going on way too long and evolved into many unrelated issues to the original post.

1 Like