I\'m running into an error I\'ve never seen before. Here is the command and the error:
$ ansible-playbook create_api.yml
PLAY [straw] **********************
By default, Ansible requires Python 2, however, Ansible 2.2+ can work with Python 3 as well.
So either install Python 2 using the raw module, e.g.
ansible localhost --sudo -m raw -a "yum install -y python2 python-simplejson"
or set ansible_python_interpreter variable in the inventory file, like:
[local]
localhost ansible_python_interpreter="env python3"
For Docker, you can add the following line:
RUN printf '[local]\r\nlocalhost ansible_python_interpreter="env python3"\r\n' > /etc/ansible/hosts
or run it as:
ansible-playbook /ansible/provision.yml -e 'ansible_python_interpreter=/usr/bin/python3' -c local