Ansible 2.7.0 error

Ansible 2.7.0 includes python 3, which caused name ‘unicode’ is not defined errors for me when doing vagrant provision.

I was able to successfully provision by downgrading to Ansible 2.6.5, which still uses python 2. It is quite easy to do this on a Mac if you installed using brew, I don’t know about other platforms:

$ brew switch ansible 2.6.5

Hopefully this is helpful to anyone who runs into the same problem.

Maybe that’s a specific dependency of the brew package on the Mac. Generally Ansible 2.7.0 works with Python >= 2.7. I run it with python 2.7.6 under Linux here without a problem.