diff options
author | beeankha <beeankha@gmail.com> | 2020-02-07 21:35:23 +0100 |
---|---|---|
committer | beeankha <beeankha@gmail.com> | 2020-02-26 15:15:04 +0100 |
commit | 232ea1e50c34d488c493608a4fb51c7514522272 (patch) | |
tree | 4198e1689e669d9a541c76c931ec0d83fcb16f42 /awx_collection | |
parent | Attempt to make validate_certs work in Python2 (diff) | |
download | awx-232ea1e50c34d488c493608a4fb51c7514522272.tar.xz awx-232ea1e50c34d488c493608a4fb51c7514522272.zip |
Properly cast verify_ssl type to a bool
Diffstat (limited to 'awx_collection')
-rw-r--r-- | awx_collection/plugins/module_utils/tower_api.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/awx_collection/plugins/module_utils/tower_api.py b/awx_collection/plugins/module_utils/tower_api.py index 5ce6120405..0a258c6af5 100644 --- a/awx_collection/plugins/module_utils/tower_api.py +++ b/awx_collection/plugins/module_utils/tower_api.py @@ -14,6 +14,7 @@ import re from json import loads, dumps from os.path import isfile, expanduser, split, join, exists, isdir from os import access, R_OK, getcwd +from distutils.util import strtobool try: import yaml @@ -153,6 +154,10 @@ class TowerModule(AnsibleModule): for honorred_setting in self.honorred_settings: try: setattr(self, honorred_setting, config.get('general', honorred_setting)) + if honorred_setting == 'verify_ssl': + setattr(self, honorred_setting, strtobool(config.get('general', honorred_setting))) + else: + setattr(self, honorred_setting, config.get('general', honorred_setting)) except (NoOptionError): pass |