known_hosts

Collection: builtin

Full Name: parallax.builtin.known_hosts

Aliases: ansible.builtin.known_hosts, known_hosts

Synopsis

Manage known hosts

Parameters

NameTypeRequiredDefaultDescription
namestringyesThe host to add or remove (must match a host specified in key)
keystringThe SSH public host key, as a string
pathstring~/.ssh/known_hostsThe known_hosts file to edit
hash_hostboolfalseHash the hostname in the known_hosts file
statestringpresentWhether the given host’s fingerprint should be added or removed Choices: absent, present

Example

- name: Example known_hosts task
  known_hosts:
    name: <your_name>