diff options
author | ioggstream <robipolli@gmail.com> | 2017-07-15 17:51:19 +0200 |
---|---|---|
committer | Rene Moser <mail@renemoser.net> | 2017-07-15 18:05:22 +0200 |
commit | d1cbcc1f412d84ead0b5215e08d2e35fb1eee393 (patch) | |
tree | 87db6fa482515880edac1609f22586ce2107036c | |
parent | 36329941bce9d0c0d26957e6079596027d56c7eb (diff) | |
download | ansible-d1cbcc1f412d84ead0b5215e08d2e35fb1eee393.tar.gz |
known_hosts: always use lowercase hostnames for host keys (#26850)
(cherry picked from commit dc408f903549571091925b7c147d312052a62eb7)
-rw-r--r-- | lib/ansible/modules/system/known_hosts.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/modules/system/known_hosts.py b/lib/ansible/modules/system/known_hosts.py index de33f17ce4..35c50a726a 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: @@ -100,7 +100,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") |