Fix missing ignore_certs (#16018)
This commit is contained in:
parent
2399dd32a8
commit
0de111be00
3 changed files with 7 additions and 14 deletions
|
@ -129,11 +129,11 @@ class GalaxyCLI(CLI):
|
||||||
'The default is the roles_path configured in your '
|
'The default is the roles_path configured in your '
|
||||||
'ansible.cfg file (/etc/ansible/roles if not configured)')
|
'ansible.cfg file (/etc/ansible/roles if not configured)')
|
||||||
|
|
||||||
if self.action in ("import","info","init","install","login","search","setup","delete"):
|
self.parser.add_option('-s', '--server', dest='api_server', default=C.GALAXY_SERVER,
|
||||||
self.parser.add_option('-s', '--server', dest='api_server', default=C.GALAXY_SERVER,
|
help='The API server destination')
|
||||||
help='The API server destination')
|
|
||||||
self.parser.add_option('-c', '--ignore-certs', action='store_true', dest='ignore_certs', default=False,
|
self.parser.add_option('-c', '--ignore-certs', action='store_true', dest='ignore_certs', default=C.GALAXY_IGNORE_CERTS,
|
||||||
help='Ignore SSL certificate validation errors.')
|
help='Ignore SSL certificate validation errors.')
|
||||||
|
|
||||||
if self.action in ("init","install"):
|
if self.action in ("init","install"):
|
||||||
self.parser.add_option('-f', '--force', dest='force', action='store_true', default=False,
|
self.parser.add_option('-f', '--force', dest='force', action='store_true', default=False,
|
||||||
|
|
|
@ -65,14 +65,11 @@ class GalaxyAPI(object):
|
||||||
self.galaxy = galaxy
|
self.galaxy = galaxy
|
||||||
self.token = GalaxyToken()
|
self.token = GalaxyToken()
|
||||||
self._api_server = C.GALAXY_SERVER
|
self._api_server = C.GALAXY_SERVER
|
||||||
self._validate_certs = not C.GALAXY_IGNORE_CERTS
|
self._validate_certs = not galaxy.options.ignore_certs
|
||||||
self.baseurl = None
|
self.baseurl = None
|
||||||
self.version = None
|
self.version = None
|
||||||
self.initialized = False
|
self.initialized = False
|
||||||
|
|
||||||
# set validate_certs
|
|
||||||
if galaxy.options.ignore_certs:
|
|
||||||
self._validate_certs = False
|
|
||||||
display.vvv('Validate TLS certificates: %s' % self._validate_certs)
|
display.vvv('Validate TLS certificates: %s' % self._validate_certs)
|
||||||
|
|
||||||
# set the API server
|
# set the API server
|
||||||
|
|
|
@ -54,12 +54,8 @@ class GalaxyRole(object):
|
||||||
|
|
||||||
self._metadata = None
|
self._metadata = None
|
||||||
self._install_info = None
|
self._install_info = None
|
||||||
|
self._validate_certs = not galaxy.options.ignore_certs
|
||||||
|
|
||||||
self._validate_certs = not C.GALAXY_IGNORE_CERTS
|
|
||||||
|
|
||||||
# set validate_certs
|
|
||||||
if galaxy.options.ignore_certs:
|
|
||||||
self._validate_certs = False
|
|
||||||
display.vvv('Validate TLS certificates: %s' % self._validate_certs)
|
display.vvv('Validate TLS certificates: %s' % self._validate_certs)
|
||||||
|
|
||||||
self.options = galaxy.options
|
self.options = galaxy.options
|
||||||
|
|
Loading…
Reference in a new issue