Hi,
I have a few queries regarding the Module run on remote machines :-
- If I run a playbook which has a task to run some module, does that module create any temporary file in the remote machine to run the module?
- Is it necessary that a remote machine should have a python package installed in it?
- If Module creates a temporary file in a remote machine,can anybody specify which location it will create?
Please help me with the above questions.
Thank you,
Nitesh
vbotka
(Vladimir Botka)
2
1. If I run a playbook which has a task to run some module, does that
module create any temporary file in the remote machine to run the module?
Yes. It does. The default is '$HOME/.ansible/tmp' where $HOME is the
home directory of *remote_user*. Search *remote_tmp* in FAQ to learn
more
https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#
It seems that it's not documented in 'Ansible Configuration Settings'
https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-configuration-settings
Also 'shell> ansible-config dump | grep -i remote_tmp' shows nothing,
instead of expected default.
2. Is it necessary that a remote machine should have a python package
installed in it?
Yes. It is. Ansible tries to select a platform's default. See the
configuration
'shell> ansible-config dump | grep -i INTERPRETER_PYTHON'
3. If Module creates a temporary file in a remote machine,can anybody
specify which location it will create?
You can configure 'remote_tmp', but you have to understand the
security implications. See 'Risks of becoming an unprivileged user'
https://docs.ansible.com/ansible/latest/user_guide/become.html#risks-of-becoming-an-unprivileged-user
Thank you for the clarification.