reboot all web servers in Canada, 15 at a time. is that possible in Ansible?

0 votes
I would like to reboot all web servers in Canada, 15 at a time. is that possible in Ansible?
Mar 5 in Ansible by Neel
36 views

1 answer to this question.

0 votes

Of course, that is possible @Neel, just follow these steps:

Set-up ssh-agent

$ ssh-agent bash
$ ssh-add ~/.ssh/id_rsa

And then run the following command:

$ ansible canada -a "/sbin/reboot" -f 15

Where Canada is a group of servers which needs to be rebooted.

answered Mar 5 by Yogesh

Related Questions In Ansible

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,810 points
218 views
0 votes
1 answer

Is it possible to run an Ansible Playbook in python script?

Hey @Cerci, Of course its possible. You ...READ MORE

answered Jan 17 in Ansible by Nicolas
2,735 views
0 votes
1 answer
0 votes
1 answer
+13 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,380 points
216 views
0 votes
1 answer
+1 vote
1 answer

Is it possible to append a large amount of text to a file using Ansible?

Here is concept which you can follow. blockinfile is ...READ MORE

answered Jul 30, 2018 in Ansible by Atul
• 10,240 points
3,042 views