Ansible uses a different key than what you use to connect to this "web machine".
You can explicitly configure the ability to use a specific private key with
private_key_file=/path/to/key_rsa
as indicated in the docs . Make sure that you allow this key to be used for the remote user on the remote computer using ssh-copy-id -i /path/to/key_rsa.pub user@webmachine _ip_address
source share