How do I check uptime on hundreds of servers using Ansible

0 votes
How do I check uptime on hundreds of servers using Ansible?
Nov 15, 2019 in Ansible by Hannah
• 18,570 points

1 answer to this question.

0 votes
You need an Ansible box for this, ie a server where Ansible is installed and ssh connectivity between those 100 nodes.

Ansible box is a server where ansible in installed and connect other nodes using ssh.

Create a project folder.

Create a file that lists all nodes where this task is required to be executed.

Create an Ansible.cfg file and make sure it is pointing to inventory file which lists IP addresses of nodes.

Run the Ansible Adhoc command to fetch uptime.
answered Nov 15, 2019 by Eric

Related Questions In Ansible

0 votes
2 answers

How do i install Ansible using virtualenv

Adding to @Mohit's answer,  For CentOS and RHEL: sudo ...READ MORE

answered Jan 10, 2019 in Ansible by Dikinson
0 votes
1 answer

How do I get a list of all Ansible variables?

Ansible by default gathers facts about machines ...READ MORE

answered Jan 31, 2019 in Ansible by Mahir
0 votes
1 answer

How do I update CentOS using Ansible?

You can use the yum module in the ...READ MORE

answered Feb 4, 2019 in Ansible by Diana
+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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
0 votes
1 answer

How do I wget a file from web server using shell in the ansible playbook

Hey Ayaan, you could probably use this ...READ MORE

answered Jan 24, 2019 in Ansible by Anushri
0 votes
1 answer