Re: [ansible-project] How to loop over result and retry in the same task?
But I want to retry the first task until expected result. I don't see a way for Ansible to retry a bock of tasks. On Tuesday, February 6, 2018 at 12:31:16 PM UTC-5, Brian Coca wrote: > > you cannot loop over the results of your task that is generating those > results, you CAN loop over the results of one task in a second task. > > > > > > -- > -- > 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/9701d9b4-3c86-4521-9baa-4fd6b078e17e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] How to loop over result and retry in the same task?
For example, if I want a task to pull ec2_instance_facts until any instance is in running state, and retry if none is running. --- - hosts: localhost gather_facts: no connection: local tasks: - name: get ec2_instance_facts ec2_instance_facts: register: my_ec2 until: item.state.name == 'running' with_items: '{{ my_ec2.instances }}' But I am getting error, because my_ec2 is not defined yet. TASK [get ec2_instance_facts] ** fatal: [localhost]: FAILED! => {"failed": true, "msg": "'my_ec2' is undefined"} Is it possible to loop over the result and retry the task in a single task? If I have to make a second task to loop over the result, I can't go back to retry the first task. How does Ansible handle retry of multiple tasks? Thanks -- 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/fd013a66-ab84-467f-9d7e-d3819710cfd4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Run Ansible against a standalone Windows server
Is there a way to run Ansible against a standalone Windows server that is not in a domain? The document shows how to setup kerberos with Windows domain. What if the Windows server is not in any domain? Thanks -- 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/13493fc4-f167-4476-a107-6eea88dff216%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.