1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

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
This commit is contained in:
Pilou 2019-02-13 11:26:43 +01:00 committed by AlanCoding
parent ca782a495d
commit c6e47a0a16
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

@ -47,7 +47,7 @@ def tower_auth_config(module):
'''tower_auth_config attempts to load the tower-cli.cfg file '''tower_auth_config attempts to load the tower-cli.cfg file
specified from the `tower_config_file` parameter. If found, specified from the `tower_config_file` parameter. If found,
if returns the contents of the file as a dictionary, else 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. only pass those values that have been set.
''' '''
config_file = module.params.pop('tower_config_file', None) config_file = module.params.pop('tower_config_file', None)
@ -92,7 +92,7 @@ class TowerModule(AnsibleModule):
tower_host=dict(), tower_host=dict(),
tower_username=dict(), tower_username=dict(),
tower_password=dict(no_log=True), 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'), tower_config_file=dict(type='path'),
) )
args.update(argument_spec) args.update(argument_spec)