I do have access to ssh into the destination machine, and it works, but whenever I run this playbook, I get this error output:
sudo ansible-playbook ansible-playbook-test.yml
PLAY [openstack] *****************************************************************************************************************************************************************************************
TASK [Gathering Facts] ***********************************************************************************************************************************************************************************
fatal: [amachine]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password,keyboard-interactive).\r\n", "unreachable": true}
to retry, use: --limit @/blah/ansible-play/ansible-playbook-test.retry
PLAY RECAP ***********************************************************************************************************************************************************************************************
amachine : ok=0 changed=0 unreachable=1 failed=0
My playbook is as simple as this:
---
# hosts could have been "remote" or "all" as well
- hosts: openstack
tasks:
- name: test connection
ping:
remote_user: djuarezg
vars:
ansible_ssh_extra_args: '-K -o ControlPath=none'
- hosts: openstack
tasks:
- name: Create Swarm cluster
command: mkdir djg
vars:
ansible_ssh_extra_args: '-K -o ControlPath=none'
I was trying to use ansible_ssh_extra_args: '-K -o ControlPath=none'
to see if it was able to forward the Kerberos ticket, but any kind of connection is enough.