todd-dsm / mac-ops

QnD Automation to build a MacBook Pro for DevOps
MIT License
11 stars 7 forks source link

fix ansible version config #69

Open todd-dsm opened 2 years ago

todd-dsm commented 2 years ago

config should point to $HOME/.ansible/ansible.cfg

% ansible --version 
ansible [core 2.12.2]
  config file = /Users/thomas/mac-ops/ansible.cfg          <-- BUG
  configured module search path = ['/Users/thomas/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/5.3.0/libexec/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/thomas/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.2 (main, Feb  2 2022, 08:42:42) [Clang 13.0.0 (clang-1300.0.29.3)]
  jinja version = 3.0.3
  libyaml = True
todd-dsm commented 2 years ago

From a fresh(?) machine: still wrong. Perhaps exporting the variable before requesting the version info?

+ printf '\n%s\n' 'Ansible Version Info:'

Ansible Version Info:
+ ansible --version
ansible [core 2.12.2]
  config file = None
  configured module search path = ['/Users/todd.thomas/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/5.3.0/libexec/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/todd.thomas/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.2 (main, Feb  2 2022, 06:19:27) [Clang 13.0.0 (clang-1300.0.29.3)]
  jinja version = 3.0.3
  libyaml = True