Hi,
I'm starting two ec2 SLES12 instances with ansible. After they are
up&running the same playbook should configure the machines.
So I inculde
- name: Wait for connection to
wait_for_connection:
after the ec2: module. Ansible is waiting for connecting some seconds.
That's OK.
But the check doesn't work as expected, because when the playbook continues
doing something on the ec2s I'm getting a
FAILED! => {"failed": true, "msg": "Timeout (12s) waiting for privilege
escalation prompt: "}
OK. Shit happens. But we have a do-until loop.
- name: start config
setup: gather_timeout=120
register: result
ignore_errors: yes
until: result|success
retries: 10
delay: 10
I would expect that this loop would continue until both machines succeeded
with the setup task.
But
TASK [Wait for connection to]
**********************************************************************************************************************************************************************
ok: [ip-10-104-30-63.eu-central-1.compute.internal]
ok: [ip-10-104-28-82.eu-central-1.compute.internal]
TASK [start config]
**********************************************************************************************************************************************************************
ok: [ip-10-104-30-63.eu-central-1.compute.internal]
fatal: [ip-10-104-28-82.eu-central-1.compute.internal]: FAILED! =>
{"failed": true, "msg": "Timeout (12s) waiting for privilege escalation
prompt: "}
...ignoring
If I don't ignore the error the playbook would stop right here.
If I ignore the error on maschine ip-10-104-28-82 no facts where gathered,
so the playbook failes later.
a) Is this a bug in "wait_for_connection:"? (I think yes.)
b) How to write a playbook that is fail safe?
Thanks,
Reiner
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/f2cb9db2-bbee-4f11-806e-237c0a79a137%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.