trying to ping-pong all instances in the group, using virtualenv where I have installed all the needed packages with a makefile. I cloned repository of my project, so I need to say that this is work on my colleagues' laptops(mac intel), but not on mine(mac m2).
using ansible all -i ./inventories/infra-dev/ -m ping
Getting this output
[WARNING]: * Failed to parse /<some>/<some>/<some>/<some>-ansible/inventories/infra-dev/infra_dev_gcp.yaml with auto plugin: Invalid control character at: line 5 column 38 (char 170)
[WARNING]: * Failed to parse /<some>/<some>/<some>/<some>-ansible/inventories/infra-dev/infra_dev_gcp.yaml with yaml plugin: Plugin configuration YAML file, not YAML inventory
[WARNING]: * Failed to parse /<some>/<some>/<some>/<some>-ansible/inventories/infra-dev/infra_dev_gcp.yaml with ini plugin: Invalid host pattern '---' supplied, '---' is normally a sign this is a YAML
file.
[WARNING]: Unable to parse /<some>/<some>/<some>/<some>-ansible/inventories/infra-dev/infra_dev_gcp.yaml as an inventory source
[WARNING]: Unable to parse /<some>/<some>/<some>/<some>-ansible/inventories/infra-dev as an inventory source
ERROR! No inventory was parsed, please check your configuration and options.
Versions:
Package Version
-------------- ---------
ansible 2.9.1
cachetools 4.2.4
certifi 2022.9.24
cffi 1.15.1
chardet 3.0.4
cryptography 38.0.3
google-auth 1.23.0
idna 2.10
Jinja2 3.1.2
MarkupSafe 2.1.1
pathspec 0.10.1
pip 22.3
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.21
PyYAML 6.0
requests 2.25.0
rsa 4.9
setuptools 65.5.0
six 1.16.0
urllib3 1.26.12
wheel 0.37.1
yamllint 1.23.0
And the inventory file:
plugin: gcp_compute
projects:
- <some>-<some>-<some>
keyed_groups:
- prefix: "gcp"
key: labels['group']
filters:
- labels.ecosystem = "dev" AND labels.ecolevel = "infra-dev"
auth_kind: serviceaccount
service_account_file: ~/.<some>/<some>-<some>-<some>.json
hostnames:
- name
compose:
ansible_host: networkInterfaces[0].networkIP