Friday, September 5, 2025

My first ansible command execution on client node

 Ansible command execution from master node to client.

master node : ansiblemaster

remote user: shiva

client nodes:

1. node2.example.com

2. node1.example.com

Example 1. check ping pong test to client node which are part of inventory file.

shiva@ansiblemaster ansible]$ ansible -m ping dev,test

node2.example.com | SUCCESS => {

    "ansible_facts": {

        "discovered_interpreter_python": "/usr/bin/python3"

    },

    "changed": false,

    "ping": "pong"

}

node1.example.com | SUCCESS => {

    "ansible_facts": {

        "discovered_interpreter_python": "/usr/bin/python3"

    },

    "changed": false,

    "ping": "pong"

}


2.  Check hostname of client node which are pingable


3.Check xfs file system entry in fstab 


4. Check shiva user entry /etc/passwd

thanks.