From c6e47a0a16ff0262e2654bfa2c1935b2ee842d18 Mon Sep 17 00:00:00 2001 From: Pilou Date: Wed, 13 Feb 2019 11:26:43 +0100 Subject: [PATCH] tower modules: check that 'verify_ssl' defined in ~/.tower_cli.cfg isn't ignored (#50687) * Check that verify_ssl defined in tower_cli.cfg isn't ignored * Avoid to override verify_ssl value defined in tower_cli.cfg By default, tower-cli library enables SSL certificates check. But verify_ssl false value defined in config files read by default by tower-cli library (for example /etc/tower/tower_cli.cfg) was ignored because overriden by the tower_verify_ssl parameter default value. * fix a typo in comment --- lib/ansible/module_utils/ansible_tower.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/module_utils/ansible_tower.py b/lib/ansible/module_utils/ansible_tower.py index 9caf3e3e65..a0aed73a54 100644 --- a/lib/ansible/module_utils/ansible_tower.py +++ b/lib/ansible/module_utils/ansible_tower.py @@ -47,7 +47,7 @@ def tower_auth_config(module): '''tower_auth_config attempts to load the tower-cli.cfg file specified from the `tower_config_file` parameter. If found, if returns the contents of the file as a dictionary, else - it will attempt to fetch values from the module pararms and + it will attempt to fetch values from the module params and only pass those values that have been set. ''' config_file = module.params.pop('tower_config_file', None) @@ -92,7 +92,7 @@ class TowerModule(AnsibleModule): tower_host=dict(), tower_username=dict(), tower_password=dict(no_log=True), - tower_verify_ssl=dict(type='bool', default=True), + tower_verify_ssl=dict(type='bool'), tower_config_file=dict(type='path'), ) args.update(argument_spec)