Re: [ansible-devel] how to read the ansible.cfg file variables in ansible custom modules

2022-08-03 Thread Brian Coca
It is possible, just not via the variable, do `import sys; sys.version_info < (3, 0)`, since that will reflect the python the script is running under. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe f

Re: [ansible-devel] how to read the ansible.cfg file variables in ansible custom modules

2022-08-03 Thread Naveen Kandakur
Thanks for the info Felix, I wanted to do some decision making in my module based on values configured in the ansible.cfg for example, if the python_interpreter variable value set to python2 in ansible.cfg then i want to throw an appropriate error message by checking the python_interpreter value

Re: [ansible-devel] how to read the ansible.cfg file variables in ansible custom modules

2022-08-03 Thread 'Felix Fontein' via Ansible Development
Hi, > I am new to Ansible Custom module development, can any one help me > how i can access the variables defined in ansible.cfg file into my > ansible modules python file. by default you cannot. IMO you also should not, because that's contrary to expectations that users have of modules. Modules

[ansible-devel] how to read the ansible.cfg file variables in ansible custom modules

2022-08-03 Thread Naveen Kandakur
I am new to Ansible Custom module development, can any one help me how i can access the variables defined in ansible.cfg file into my ansible modules python file. -- You received this message because you are subscribed to the Google Groups