Ansible sudo hangs after a few requests...

Setup Requirements: local user=goagent1 (ansible kicked off from GoCD), remote user=myadmin. myadmin is a sudoer.

Problem: The playbook seems to stop after ~5 tasks have been executed.

Details: I am running locally as goagent. We are using ‘become’ to gain sudo access which seems to work for the first several tasks, then stalls and timeouts. If I re-order the tasks or add new ones, it still runs about 5 tasks then times-out. The below is a very simple example for demonstration purposes. We are using ansible-vault for encrypting important data, but that wasn’t needed for this example.

Also, I can run the following playbook with my remote user in the remote sudoers with NOPASSWD and it runs successfully as expected.

$ ansible-playbook -i inventory test.yml

inventory.yml

[servers]

172.99.999.99

[all:vars]
ansible_become_pass=bees

test.yml