I can call:
ansible all -m ping -i DevHosts --user=ubuntu --private-key=../DevMongo.pem
with DevHosts:
[mongo] 1.2.3.4
and ansible will correctly connect to the host. But if I try and store these parameters in an inventory: (as suggested here )
`
[mongo]
1.2.3.4 ansible_ssh_user=ubuntu ansible_ssh_private_key_file=…/DevMongo.pem
`
ansible all -m ping -i DevHosts
… gives me: 1.2.3.4 | FAILED => FAILED: No authentication methods available.
Are --private-key and ansible_ssh_private_key_file related? What am I missing here?
Cheers
- Stuart