Getting a “ERROR! Trellis no longer supports Ansible” error? You probably upgraded to the latest Trellis from an older version and now you need Ansible or higher. So how do we upgrade this baby? Well in my case the box I just had the issue at runs Ansible via Homebrew. Also I have one older Trellis version for another site so I want to be able to use the older version from time to time. So I do want to go back to version when need be.

Homebrew  Ansible Upgrade

To upgrade my Homebrew installed Ansible I ran:

brew update

and then when I checked the version:

ansible --version

I found out it did upgrade, but not to the next version. Silly me. I would need to remove ansible and then so a brew install ansible@2.4 . But then the next time I needed to run I would have to reverse all using two commands. Sounded like doing it with pip was easier which allows version changes with one command and which is recommended by Roots core members.

Ansible Pip Install and Upgrade

So I removed ansible from Homebrew using:

brew remove ansible
brew uninstall --force ansible

and then I installed it with pip like I had on my MBP:

sudo easy_install pip
sudo pip install ansible --quiet

And that worked well. No upgrade needed now as the latest version was grabbed:

ansible --version
config file = /Users/jasper/webdesign/
configured module search path = [u'/Users/jasper/.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.13 (default, Mar 5 2017, 15:42:57) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]

Pip Change Ansible Version

And with pip I can also go back to my older version needed for the older Trellis setup using

sudo pip install ansible==

Trellis Build

So then I tried another vagrant up to see if I could avoid the error message:

ERROR! Trellis no longer supports Ansible
Please upgrade to Ansible or higher.
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

vagrant up did work, but the site failed to load so I did another

vagrant provision

The provisioning took quite some time. Clearly first vagrant up had not really completed the installation of the new packages. But that did the trick and I was able to load the site locally and import the database backup. Yay!

2 Responses

  1. And if you get

    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.

    on an older version you can downgrade with

    sudo pip install ansible==

Leave a Reply

Your email address will not be published. Required fields are marked *