From 3b80f63e22ad2a3e8e0c66412bdc79116e093eaa Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Thu, 4 Dec 2014 11:39:35 -0800 Subject: [PATCH] Have known_hosts function use the url parameter instead of getting a specific attribute out of the module dict. This makes the function useful in more places --- lib/ansible/module_utils/known_hosts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/known_hosts.py b/lib/ansible/module_utils/known_hosts.py index c997596fd4..99dbf2c03a 100644 --- a/lib/ansible/module_utils/known_hosts.py +++ b/lib/ansible/module_utils/known_hosts.py @@ -40,7 +40,7 @@ def add_git_host_key(module, url, accept_hostkey=True, create_dir=True): """ idempotently add a git url hostkey """ - fqdn = get_fqdn(module.params['repo']) + fqdn = get_fqdn(url) if fqdn: known_host = check_hostkey(module, fqdn)