Running:
ansible all -i inventory/backend/nodes.yml --list-hosts -vvv
ansible 2.4.0.0
config file = /Users/shaun/Seafile/scripts/ansible/yaml_inventory/ansible.cfg
configured module search path = [‘/Users/shaun/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = /Users/shaun/Gentoo/usr/lib/python3.5/site-packages/ansible
executable location = /Users/shaun/Gentoo/usr/lib/python-exec/python3.5/ansible
python version = 3.5.2 (default, Sep 1 2017, 08:53:54) [GCC 4.2.1 Compatible Clang 3.9.1 (tags/RELEASE_391/final)]
Using /Users/shaun/Seafile/scripts/ansible/yaml_inventory/ansible.cfg as config file
[WARNING]: Unable to parse
/Users/shaun/Seafile/scripts/ansible/yaml_inventory/inventory/backend/nodes.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: Could not match supplied host pattern, ignoring: all
[WARNING]: provided hosts list is empty, only localhost is available
[WARNING]: No hosts matched, nothing to do
hosts (0):
That’s interesting… it’s using python3.5.
I created a virtualenv for ansible 2.4 and everything works.
It seems that my environment with a default python3.5 (technically a gentoo prefix on Mac) is actually using python3. That doesn’t happen in the gentoo prefix for Ansible 2.3.2.
The virtualenv works though, so problem solved for me… not sure if there is in fact a larger issue here though.