mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
known_hosts: always use lowercase hostnames for host keys (#26850)
This commit is contained in:
parent
700af0af1d
commit
dc408f9035
1 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ options:
|
||||||
name:
|
name:
|
||||||
aliases: [ 'host' ]
|
aliases: [ 'host' ]
|
||||||
description:
|
description:
|
||||||
- The host to add or remove (must match a host specified in key)
|
- The host to add or remove (must match a host specified in key). It will be converted to lowercase so that ssh-keygen can find it.
|
||||||
required: true
|
required: true
|
||||||
default: null
|
default: null
|
||||||
key:
|
key:
|
||||||
|
@ -101,7 +101,7 @@ def enforce_state(module, params):
|
||||||
Add or remove key.
|
Add or remove key.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
host = params["name"]
|
host = params["name"].lower()
|
||||||
key = params.get("key", None)
|
key = params.get("key", None)
|
||||||
port = params.get("port", None)
|
port = params.get("port", None)
|
||||||
path = params.get("path")
|
path = params.get("path")
|
||||||
|
|
Loading…
Add table
Reference in a new issue