known_hosts
Collection: builtin
Full Name: parallax.builtin.known_hosts
Aliases: ansible.builtin.known_hosts, known_hosts
Synopsis
Manage known hosts
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | yes | The host to add or remove (must match a host specified in key) | |
| key | string | The SSH public host key, as a string | ||
| path | string | ~/.ssh/known_hosts | The known_hosts file to edit | |
| hash_host | bool | false | Hash the hostname in the known_hosts file | |
| state | string | present | Whether the given host’s fingerprint should be added or removed Choices: absent, present |
Example
- name: Example known_hosts task
known_hosts:
name: <your_name>