S
S
SierraMadre2017-08-04 12:49:42
linux
SierraMadre, 2017-08-04 12:49:42

What am I doing wrong with Ansible?

Good afternoon. I decided to dig deeper into Ansible, I'm trying to install NGINX on the desktop ubuntu 16.04. But I ran into such a problem
8aa933bdca544c25af83fb88c2453402.png
On the desktop, I set up key authentication, SSH connects from the server to the desktop, and vice versa. But the playbook still does not want to work, by mistake it is clear that the problem is in SHH access, but I searched everything possible. The server is running on real hardware, the desktop is on Hyper-V, and they are in the same subnet.
play book
aea1cb2cf26f4b89b1a43fc075f31712.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Igor S, 2017-08-04
@xarek1986

check the permissions on the ~/.ssh directory and on the files inside it. I myself periodically encounter this, the easiest option is to do it
on both servers

M
Melkij, 2017-08-04
@melkij

SSH connects from a server to a desktop, and vice versa

Attention, the question is: under which user?
Because you run the playbook with a very obscure purpose through sudo. And at a rue in that case keys are configured?
You don't need to go into /etc/ansible at all. Get yourself a directory anywhere and place all the information for ansible in it. ansible-playbook does not need root permissions to run. He only needs access to the target hosts and the ability to operate there.

P
Pavel Serenko, 2017-08-04
@p1r4te

try before starting the playbook to run the command:
If your key has a passphrase, it will ask you to enter it, if not, then the command will simply be executed. Further from the same user, launch the playbook.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question