Ansible provides 'human readable automation' for 'app deployment' and 'configuration management'. Unlike tools like Chef, it doesn't require an agent to be running on remote machines. In short, it translates declarative YAML files into shell commands and runs them on your machines over SSH. Ansible is backed by Red Hat and has a great website. Install MacOS Homebrew Packages With Ansible. GitHub Gist: instantly share code, notes, and snippets. Generate an Ansible Vault Password. On my mac I run: 1. Brew install pwgen. Brew install gpg. Brew install gpg-agent. This gets me my tools! Ok, so now I need.
When running any
ansible command, I see a stack trace similar to:
pip install ansible or
brew install ansible or
yum install ansible or…
Somehow your Ansible Python modules were removed, but the Ansible scripts in your
$PATH remained. Install Ansible’s python package however makes the most sense for your platform and preferences. E.g. via pip directly or Homebrew or your package manager of choice.
The Long Story
Let’s break the error down line by line:
Ansible is just a Python script, so let’s check out line 34:
The second line in the stack trace shows that
from ansible import context is just another module import in the larger context of the Python application. With that larger context clarified, this error may snap a bit more into focus:
It’s just a Python application that can’t find a module. If there’s no module, let’s check with Python to see what packages it knows about: 2019 movie knives.
There’s no Ansible package listed. Wait, which version of Python did I just check?
Let’s check pip2 just to make sure there’s no version weirdness going on:
Brew Ansible Installation
Nope, no Ansible. Since I’m on a Mac, let’s check
Brew just to see what comes back:
Uninstall Brew Cask
I’m not really sure what happened. I’ve got the Ansible scripts in my path, but I don’t have the python modules. I prefer to install Ansible via
pip so I simply
pip install ansible and everything was right with the world.