On 08/19/2016 01:54 PM, Jean-Yves LENHOF wrote:
The first task ansible is doing is gathering facts.... In facts there
are mounted filesystems, so the NFS one too
Thanks a lot. Using 'gather_facts: no' in the playbook solved this issue:
---
- hosts: '{{ target }}'
gather_facts: no
tasks:
- name: Run ls
shell: /bin/ls
However I found this feature to be quite hidden in the documentation. IMHO gather_facts should be off by default and only on on request.
ansible_distribution,
ansible_distribution_version, ansible_lsb.major_release,
to name the most currents one....)
If you need, you can filter facts :
http://stackoverflow.com/questions/34485286/ansible-gathering-facts-with-filter-inside-a-playbook
But from my point of view, is NFS is not responding, it's your server that is broken... Perhaps automouting (and so dismounting) NFS is an option for you
Regards,
JYL