Playbook to wait for servers to come online - Ansible

0 votes
Hey, I wanted to know how to write a playbook to wait for servers on AWS to be ready. How do I do that?
Mar 25, 2019 in Ansible by Dipti
115 views

1 answer to this question.

0 votes

Hey @Dipti, try something like this:

- name: Wait for servers to come online
  wait_for:
    host: "{{ item.public_ip }}"
    port: 22
    timeout: 180
  with_items: "{{ ec2_instances.tagged_instances }}"
answered Mar 25, 2019 by Jaz

Related Questions In Ansible

0 votes
1 answer

Ansible playbook for moving files from one node to another remote node

The best way to do this is: copy ...READ MORE

answered Jan 16, 2019 in Ansible by Nigya

edited Jan 18, 2019 by Vardhan 4,799 views
0 votes
1 answer

Ansible playbook to check if http support for apt is installed

Hi @Hannah, this ansible task should do ...READ MORE

answered Nov 25, 2019 in Ansible by Aria
238 views
0 votes
1 answer
+1 vote
2 answers

Running ansible command on a single server when it is deployed to multiple servers

You can try the run_once attribute: Example from ...READ MORE

answered Jun 13, 2018 in Ansible by DareDev
• 6,870 points
823 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
815 views
+2 votes
1 answer
+1 vote
4 answers

Pass variable to ansible playbook through command line

ansible-playbook test.yml --extra-vars "arg1=${var1} arg2=${var2}" Use is like ...READ MORE

answered May 7, 2019 in Ansible by Bobin
10,565 views
0 votes
1 answer

Ansible playbook to wget a file

Hey @Celia, one recommendation, try not using ...READ MORE

answered Jan 16, 2019 in Ansible by Vaishu
7,147 views