I would like to do a passwordless SSH login to another Linux server, and I would like to do the setup using ansible
Could you please advise why
~/.ssh/id_rsa.pub
hostvars[item]['ansible_ssh_host_key_rsa_public']
are different ?
Here is the task used as an example:
- debug: msg="ssh-rsa {{ hostvars[item]['ansible_ssh_host_key_rsa_public'] }} {{ hostvars[item]['ansible_user_id'] }}@{{ hostvars[item]['ansible_hostname'] }}"
with_items: "{{ groups.pmacct }}"
when: inventory_hostname in groups.ipacc
- meta: end_play