as read in many other posts and questions gathering facts during exectution o an ansible-playbook may take some time and can get stuck for several reasons.
In my case the behaviour is pretty weird:
I got an ansible playbook to setup my servers. Everything is reachable via SSH and the playbook runs as expected when running it on only one host at a time (independent on which host). Gathering facts work like a charm and is done in seconds.
The problem starts occuring when running the playbook against multiple hosts. As soon as i enter more than one hosts for setup in my hosts file gathering facts takes an endless amount of time.
Did someone experience this behaviour as well and can give me some hints how to solve this problem ?
When starting the playbook like
ansible-playbook frontend_rollout.yml -i hosts -K -vvv
Ansible wants me to type sudo password and SSH passphrase as expected. When asking for the SSH passphrase for each server the prompt output appears in one line as shown below:
Enter passphrase for key '/home/bouldrini/.ssh/ansible_ssh': Enter passphrase for key '/home/bouldrini/.ssh/ansible_ssh':
and I can type the password only once for both prompts. Is this the expected behaviour ? Did I miss something ?