Forgive me this possibly naive question, I’m new to ansible.
I would like to upload the public key used for ssh authentication with ansible.
There is an ansible module (http://docs.ansible.com/ansible/authorized_key_module.html) to do that.
But I can’t find an example how to call it directly (not from a playbook).
The problem is the key argument for which I have a file. From the documentation I need to pass the argument value
key="{{ lookup('file', 'id_rsa_ansible.pub') }}"
How do I do that on the command line ?
I expect something like this
$ ansible all -m authorized_key -a "user=root key=xxx" --ask-pass
What should I put at the ‘xxx’ ?