What is it ?
Ansible Galaxy is a platform and online community hub for finding, sharing, and managing Ansible roles.
chatGPT
ansible --version
-bash: /usr/local/bin/ansible: /usr/local/Cellar/ansible/9.1.0/libexec/bin/python: bad interpreter: No such file or directory
# later found reason: wrong interpreter in first line of script...
chrisp:~ sandorm$ brew install ansible
Warning: ansible 9.1.0 is already installed and up-to-date.
To reinstall 9.1.0, run:
brew reinstall ansible
chrisp:~ sandorm$ brew reinstall ansible
==> Downloading https://ghcr.io/v2/homebrew/core/ansible/manifests/9.1.0-1
...
sandorm@chrisp:☸️:(⎈ docker-desktop - default)~$ . ./.bash_profile
sandorm@chrisp:☸️:(⎈ docker-desktop - default)~$ which python
/usr/local/opt/python/libexec/bin/python
sandorm@chrisp:☸️:(⎈ docker-desktop - default)~$ vi $(which ansible) # fix first line
sandorm@chrisp:☸️:(⎈ docker-desktop - default)~$ ansible --version
ansible [core 2.14.3]
config file = /Users/sandorm/.ansible.cfg
...
sandorm@chrisp:☸️:(⎈ docker-desktop - default)~$ ansible -m ping localhost
[WARNING]: No inventory was parsed, only implicit localhost is available
localhost | SUCCESS => {
"changed": false,
"ping": "pong"
}
Now working:
#!/usr/local/opt/python/libexec/bin/python
sandorm@chrisp:☸️:(⎈ docker-desktop - default)~$ ansible-galaxy --version
ansible-galaxy [core 2.14.3]
config file = /Users/sandorm/.ansible.cfg
configured module search path = ['/Users/sandorm/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/sandorm/Library/Python/3.11/lib/python/site-packages/ansible
ansible collection location = /Users/sandorm/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible-galaxy
python version = 3.11.7 (main, Dec 4 2023, 18:10:11) [Clang 15.0.0 (clang-1500.1.0.2.5)] (/Volumes/x8crucial/Homebrew/Cellar/python@3.11/3.11.7/libexec/bin/python)
jinja version = 3.1.2
libyaml = True
sandorm@chrisp:☸️:(⎈ docker-desktop - default)~$ ansible-galaxy list
# /Users/sandorm/.ansible/roles
- geerlingguy.haproxy, 1.1.2
[WARNING]: - the configured path /usr/share/ansible/roles does not exist.
[WARNING]: - the configured path /etc/ansible/roles does not exist.