Table of contents
- <mark>Ansible Handson with some adhoc commands:</mark>
- <mark>Create EC2 instances.</mark>
- <mark>Create inventory file and check host servers once created the inventory file.</mark>
- <mark>Try a ping command using ansible to the Nodes.</mark>
- <mark>To check free space:</mark>
- <mark>Uptime of the servers:</mark>
Ansible Handson with some adhoc commands:
Create EC2 instances.
1 Master and 3 Nodes.
Create inventory file and check host servers once created the inventory file.
[servers]
server1 ansible_host=public ip of server1
server2 ansible_host=public ip of server2
server3 ansible_host=public ip of server3
[all:vars]
ansible_python_interpreter=/usr/bin/python3
ansible_ssh_private_key_file=/home/ubuntu/.ssh/private_key
Try a ping command using ansible to the Nodes.
To test that Ansible is able to connect to your nodes, you can use the following command:
ansible -i <inventory_file> all -m ping --private-key=<path_to_private_key>
To check free space:
Uptime of the servers:
Thank you for reading!! Hope you find this helpful.
#day57#90daysofdevops#devopscommunity
Always open for suggestions..!!
Thank you Shubham Londhe