mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
known_hosts: always use lowercase hostnames for host keys (#26850)
This commit is contained in:
@@ -37,7 +37,7 @@ options:
|
||||
name:
|
||||
aliases: [ 'host' ]
|
||||
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
|
||||
default: null
|
||||
key:
|
||||
@@ -101,7 +101,7 @@ def enforce_state(module, params):
|
||||
Add or remove key.
|
||||
"""
|
||||
|
||||
host = params["name"]
|
||||
host = params["name"].lower()
|
||||
key = params.get("key", None)
|
||||
port = params.get("port", None)
|
||||
path = params.get("path")
|
||||
|
||||
Reference in New Issue
Block a user