Issues installing Ansible on Mac OS

I’m in the process of deploying a Trellis/Bedrock/Sage site from my local machine to Kinsta, but it looks like somewhere along the way, Ansible did not get installed correctly.

While following this tutorial, I noticed that I was getting ansible playbook not found errors in my terminal.

So then I tried to check the Ansible version on my machine and it wasn’t found. I then went back to this tutorial to try to get it installed properly.

I even tried the NFS method as well. Did not help. Somewhere along the way, I took a screenshot of this error I saw. Would that have something to do with it?

I’m running macOSMojave. Is there a step I missed somehow?

I feel your pain Python x Ansible x Trellis versions can be a nightmare to get right!

These are the steps I’ve been using to get them all working smoothly together on macOS Catalina

# Install Python 3.7 with pyenv using homebrew

brew install pyenv
pyenv install 3.7.6
pyenv global 3.7.6
pyenv rehash
pip install --upgrade ansible==2.7.15

As far as I know, the latest versions of Trellis need ansible version 2.8, so change that last line to pip install --upgrade ansible==2.8.11 if you’re working on a fairly fresh clone of Trellis.

One of the guys on our team started using Ansible Version Manager (AVM) which seems to be working pretty well - hope it helps!


Thanks for the tips! I ended up installing Ansible using Homebrew, which I remembered I already had installed. I did end up installing Ansible version 2.9.7, and I saw that only 2.8 was tested with Trellis. So I wonder if I’ll need to downgrade at some point.

Now I’m dealing with a different issue, haha. I ran the vagrant provision command and got this error message:

Going to try the fix from this thread and see if that helps.

This topic was automatically closed after 42 days. New replies are no longer allowed.