mirror of
https://github.com/ansible/awx.git
synced 2026-04-10 04:29:21 -02:30
Properly cast verify_ssl type to a bool
This commit is contained in:
@@ -14,6 +14,7 @@ import re
|
|||||||
from json import loads, dumps
|
from json import loads, dumps
|
||||||
from os.path import isfile, expanduser, split, join, exists, isdir
|
from os.path import isfile, expanduser, split, join, exists, isdir
|
||||||
from os import access, R_OK, getcwd
|
from os import access, R_OK, getcwd
|
||||||
|
from distutils.util import strtobool
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import yaml
|
import yaml
|
||||||
@@ -153,6 +154,10 @@ class TowerModule(AnsibleModule):
|
|||||||
for honorred_setting in self.honorred_settings:
|
for honorred_setting in self.honorred_settings:
|
||||||
try:
|
try:
|
||||||
setattr(self, honorred_setting, config.get('general', honorred_setting))
|
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):
|
except (NoOptionError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user