aboutsummaryrefslogtreecommitdiff

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_hostname the host to authorize
  • use_host_ip_addresses also authorize the IP addresses reported from DNS

Example Playbook

---
- hosts: host-pattern
  roles:
    - role: ssh_authorize_host
      ssh_hostname: example.org