Hi Brian, this seemed like a good way to do it, but I haven't been able to make it work - I haven't done much logic in my plays... mostly just point and shoot tasks.
--- - hosts: test gather_facts: false tasks: - name: try users remote_user: "{{ item }}" ping: ignore_unreachable: true failed_when: false with_items: - centos - root - ec2-user When I run this, it loops 3 times, and at the start of each I get... -----Original Message----- From: ansible-project@googlegroups.com <ansible-project@googlegroups.com> On Behalf Of Brian Coca Sent: Friday, July 5, 2019 8:10 AM To: Ansible Project <ansible-project@googlegroups.com> Subject: Re: [ansible-project] using different remote_user until success loop a ping task over the users and use 'ignore_unreachable' and failed_when: false to keep running that task, register the result and set ansible_user using the results. -- ---------- Brian Coca -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACVha7ewm22AQ7h9vG7qkfRL37-Zy8w7izdEGqQCD6trNrfKSw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/046d01d535a7%247b7148d0%247253da70%24%40gmail.com. For more options, visit https://groups.google.com/d/optout.