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 in Ansible by Dipti
38 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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 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 in Ansible by Nigya

edited Jan 18 by Vardhan 347 views
0 votes
1 answer

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,520 points
76 views
0 votes
1 answer

devops , how to create user using ansible playbook

root doesn't need a password to switch ...READ MORE

answered Jul 16, 2018 in Ansible by Kalgi
• 2,620 points
54 views
0 votes
1 answer
+13 votes
2 answers
0 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 in Ansible by Bobin
1,150 views
0 votes
1 answer

Ansible playbook to wget a file

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

answered Jan 16 in Ansible by Vaishu
305 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.