B
B
BegeMute2021-06-01 17:13:10
SSH
BegeMute, 2021-06-01 17:13:10

How to run ansible-playbook on private IP?

Hello everyone, I have a task to install Docker on a private ip. There are two virtual machines on azure, one with a public IP, the other with a private one. How to run a playbook from the first machine to the second? The first virtualka - 60b63fc57c849575518397.pngAnd the second - 60b63fe8d90be630329773.png.
Tried through the command ansible 10.0.1.5 -m ping
But in the end there was such a problem

"msg": "ERROR! SSH encountered an unknown error. The output was:\nOpenSSH_7.2p2 Ubuntu-4ubuntu2.10, OpenSSL 1.0.2g  1 Mar 2016\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket \"/home/adminuser/.ansible/cp/ansible-ssh-10.0.1.5-22-root\" does not exist\r\ndebug2: resolving \"10.0.1.5\" port 22\r\ndebug2: ssh_connect_direct: needpriv 0\r\ndebug1: Connecting to 10.0.1.5 [10.0.1.5] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 9999 ms remain after connect\r\ndebug1: identity file /home/adminuser/.ssh/id_rsa type 1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/adminuser/.ssh/id_rsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/adminuser/.ssh/id_dsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/adminuser/.ssh/id_dsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/adminuser/.ssh/id_ecdsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/adminuser/.ssh/id_ecdsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2021-06-01
@Zarom

An article with an example https://rtfm.co.ua/ansible-podklyuchenie-v-privatn...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question