ERROR! Trellis no longer supports Ansible 2.3.1.0. Fix

Getting a “ERROR! Trellis no longer supports Ansible 2.3.1.0.” error? You probably upgraded to the latest Trellis from an older version and now you need Ansible 2.4.0.0 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 2.3.1.0 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
ansible 2.3.1.0

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 2.3.1.0 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:

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!

Jasper has been working with web frameworks and applications such as Laravel, Magento and his favorite CMS WordPress including Roots Trellis and Sage for more than a decade. He helps customers with web design and online marketing. Services provided are web design, ecommerce, SEO, content marketing. When Jasper is not coding, marketing a website, reading about the web or dreaming the internet of things he plays with his son, travels or run a few blocks.

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.