nedeľa 30. januára 2022

ansible - ping

 ansible communicates via ssh....We need ssh keys to connect. (When we don't have join via ssh keys, ansible will not work)



ansible -ping




ansible communicate via ssh....We need ssh keys to connect. (When we don't have join via ssh keys, ansible will not work)


for ssh join via keys: 


1) ssh-keygen -t rsa -b 4096

2)[root@localhost ~]# ssh-copy-id root@10.0.2.6


Let's try ping and you see, all are pingable 

[root@localhost ~]# ansible all -m ping

10.0.2.5 | SUCCESS => {

    "ansible_facts": {

        "discovered_interpreter_python": "/usr/bin/python"

    },

    "changed": false,

    "ping": "pong"

}

10.0.2.7 | SUCCESS => {

    "ansible_facts": {

        "discovered_interpreter_python": "/usr/bin/python"

    },

    "changed": false,

    "ping": "pong"

}

10.0.2.6 | SUCCESS => {

    "ansible_facts": {

        "discovered_interpreter_python": "/usr/bin/python"

    },

    "changed": false,

    "ping": "pong"

}


Žiadne komentáre:

Zverejnenie komentára