Ansible authorize ssh host key role
Role to authorize the host key of ssh_hostname.
The role tries to authorize the host key globally at
/etc/ssh/ssh_known_hosts or ~/.ssh/known_hosts
as fallback.
Variables
ssh_hostnamethe host to authorizeuse_host_ip_addressesalso authorize the IP addresses reported from DNS
Example Playbook
---
- hosts: host-pattern
roles:
- role: ssh_authorize_host
ssh_hostname: example.org