I am new to ansible . I crated this simple playbook to extract the log
files of remote server
---
-
hosts: all
user: teste
- fetch:src=/var/log/messages dest=/tmp/teste
when i run the playbook it gimes me below error:-
[teste@server]$ ansible-playbook -v play4.yml
PLAY [all]
********************************************************************
GATHERING FACTS
***************************************************************
paramiko: The authenticity of host '198.0.0.0' can't be established.
The ssh-rsa key fingerprint is 33ce79efa1a63fe9c2215c8e9a2357b1.
Are you sure you want to continue connecting (yes/no)?
yes
paramiko: The authenticity of host '127.0.0.1' can't be established.
The ssh-rsa key fingerprint is adb57dd32423ac4e32848fef6d8da5dc.
Are you sure you want to continue connecting (yes/no)?
yes
fatal: [198.0.0.0] => {'msg': 'FAILED: Authentication failed.', 'failed':
True}
fatal: [127.0.0.1] => {'msg': 'FAILED: Authentication failed.', 'failed':
True}
PLAY RECAP
********************************************************************
to retry, use: --limit @/home/teste/play4.retry
127.0.0.1 : ok=0 changed=0 unreachable=1 failed=0
198.0.0.0 : ok=0 changed=0 unreachable=1 failed=0
the first IP is for local system the second IP is remote node . both IPs
entries are present in host file
[teste@server]$ more hosts
# This is the default ansible 'hosts' file.
#
# It should live in /etc/ansible/hosts
#
# - Comments begin with the '#' character
# - Blank lines are ignored
# - Groups of hosts are delimited by [header] elements
# - You can enter hostnames or ip addresses
# - A hostname/ip can be a member of multiple groups
# Ex 1: Ungrouped hosts, specify before any group headers.
127.0.0.1
198.0.0.0
I have also copied the SSH keys to remote node - 198.0.0.0 which is an
ubuntu machine & able to login with user teste on that machine without
password. & my local machine is centos
Plese help!!
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2388f03f-12f2-44fa-b6c9-204b736d8c88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.