Hi all,
I would like to know where can I find all the related Ansible variables such as ansible_python_interpreter and ANSIBLE_* ?
Please excuse me for my ignorance and low google skills but I could not seem to locate a page that can tell me all the variables that Ansible understands and how to use them.
Thank,
Steven.
Hi Steven,
You can query for these variables by executing the "setup" module, like this:
ansible -m setup hostname
This should spit out all of the available variables.
We're working on a FAQ page that will have a lot of this stuff in place soon!
Thanks,
-Tim
Hi Timothy,
That solves the issue for finding ansible_* variables. Would you point me to where I can find ANSIBLE_* variables?
Thank you,
Steven.
environment variables are mostly out of favor (but not deprecated)
since they can all be set in the config file now. You can see them
all in constants.py.
In some cases, like ansible_*_interpreter, you cannot find a list
because it is set to match arbitrary inputs, in this case you can
create ansible_bash_interpreter or
ansible_myowncustomlanguage_interpreter.
ansible_python_interpreter is of course still covered in the docs.
Perhaps not loudly enough