0

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 ?

1 Answer 1

0

Some people may be interested, so i didnt delete the question right now.

The reason for the endless fact gathering was the described behaviour of the ssh passphrase prompting.

As a normal human beeing would expect the behaviour to be:

[Pre fact gathering phase]
- prompt for ssh passphrase for host 1
- input for host 1
- prompt ssh passphrase for host 2
- input for host 2
[fact gathering phase]

BUT how it actually was:

[Pre fact gathering phase]
- prompt ssh passphrase for host 1 AND host 2 in buggy output
- input for host 1
[fact gathering phase]
- host 1 fact gathering ok
- waiting for input for host 2 without any prompting

this was really confusing.

I was using Ansible 2.8 on Ubuntu 16.04 with python3.7 by the way. I didnt test if this bugg occures in other software constellations as well, but it might !

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .