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
• 17,750 points
309 views

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
760 views
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 30, 2019 in Ansible by Mahir
538 views
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
76 views
+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,400 points
305 views
0 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
741 views
0 votes
1 answer