I am new to ansible . I crated this simple playbook to extract the log files of remote server
[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!!