I can ssh to a remote server if I use the ansible command module
e.g
tasks:
- name: ssh to remote machine
command: ssh -i key ansible@172.16.2.2
However as this will be stored in github, I encrypted the private ssh key with ansible-vault.
Once I rerun the same command with the vault decryption password (--ask-vault-pass) it will not connect. It's as if the encryption/de-encryption does not return the same ssh key.
What am I doing wrong here?