From dc408f903549571091925b7c147d312052a62eb7 Mon Sep 17 00:00:00 2001 From: ioggstream Date: Sat, 15 Jul 2017 17:51:19 +0200 Subject: [PATCH] known_hosts: always use lowercase hostnames for host keys (#26850) --- lib/ansible/modules/system/known_hosts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/system/known_hosts.py b/lib/ansible/modules/system/known_hosts.py index 9784d0354e..bc50f78113 100644 --- a/lib/ansible/modules/system/known_hosts.py +++ b/lib/ansible/modules/system/known_hosts.py @@ -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")