Re: [ansible-project] problems to address a configuration via ANSIBLE_CONFIG

2021-09-22 Thread Stefan Hornburg (Racke)
On 23/09/2021 08:42, dulhaver via Ansible Project wrote: hello On 22.09.21 22:23, Dick Visser wrote: Well it works fine here, also for a file with the ansible substring: $ export ANSIBLE_CONFIG=/opt/project.cfg $ ansible --version | head -2 ansible 2.10.12 config file = /opt/project.cfg ok I

Re: [ansible-project] problems to address a configuration via ANSIBLE_CONFIG

2021-09-22 Thread dulhaver via Ansible Project
hello On 22.09.21 22:23, Dick Visser wrote: Well it works fine here, also for a file with the ansible substring: $ export ANSIBLE_CONFIG=/opt/project.cfg $ ansible --version | head -2 ansible 2.10.12 config file = /opt/project.cfg ok I got it ... my understanding of environment variables was no

Re: [ansible-project] problems to address a configuration via ANSIBLE_CONFIG

2021-09-22 Thread Dick Visser
On Wed, 22 Sept 2021 at 21:34, dulhaver via Ansible Project wrote: > I assume the file name (everything preceding the .cfg ending) can be chosen > freely and does not require the string 'ansible' being part of it, right? > Still, same as you even if I can validate the existence of the ANSIBLE_C

Re: [ansible-project] problems to address a configuration via ANSIBLE_CONFIG

2021-09-22 Thread dulhaver via Ansible Project
hei Dick, thx for your getting back to me On 22.09.21 20:39, Dick Visser wrote: I just tried this out and apparently the path you specify for ANSIBLE_CONFIG has to actually exist: sorry, I was not clear enough obviously. The real-life .cfg file I am pointing at *does exist* naturally. Maybe

Re: [ansible-project] problems to address a configuration via ANSIBLE_CONFIG

2021-09-22 Thread Dick Visser
I just tried this out and apparently the path you specify for ANSIBLE_CONFIG has to actually exist: dick.visser@ams-049 ~ % export ANSIBLE_CONFIG=/opt/nonexistent/ansible.cfg dick.visser@ams-049 ~ % ansible --version ansible 2.10.12 config file = /Users/dick.visser/.ansible.cfg configured modu

[ansible-project] problems to address a configuration via ANSIBLE_CONFIG

2021-09-22 Thread dulhaver via Ansible Project
hi everybody, Ansible novice here from Germany I learned that setting an environment variable for ANSIBLE_CONFIG (like ANSIBLE_CONFIG=/path/to/any.cfg) would make the defined file the preferred configuration file. However I am still not able to get this working and I am using a fallback confi

[ansible-project] organizing playbooks

2021-09-22 Thread Guy Matz
Is there a modern way of organizing playbooks? Are we still supposed to have our playbooks at the top level of the directory structure as described in The Playbooks Best Practices doc ? That doesn't s

Re: [ansible-project] Getting ansible (not core) version in the playbook

2021-09-22 Thread Matt Martz
To date, the decision has been that ansible-core does not discover or know anything about the ansible package. The ansible package just drops collection bundles in a location where ansible-core will look. The only way to get the ansible version is by the means you show, or by calling `pip`. On W

Re: [ansible-project] Getting ansible (not core) version in the playbook

2021-09-22 Thread Dick Visser
On Wed, 22 Sept 2021 at 10:15, 'Piotr Kowalczyk' via Ansible Project wrote: > The only command I've found which showing Ansible (not core) version instead > is: > > (ansible) poe@lime:~$ python -c 'from ansible_collections.ansible_release > import ansible_version; print(ansible_version)' > 4.6.

[ansible-project] Getting ansible (not core) version in the playbook

2021-09-22 Thread 'Piotr Kowalczyk' via Ansible Project
Good morning, Would you guys help me to understand how to get the Ansible correct version in the playbook? I have newest Ansible: (ansible) poe@lime:~$ pip3 freeze | grep ansible ansible==*4.6.0* ansible-core==*2.11.5* (ansible) poe@lime:~$ But `ansible_version` displays core version instead o