mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix missing ignore_certs (#16018)
This commit is contained in:
parent
c03555b650
commit
2261b2e59a
3 changed files with 7 additions and 14 deletions
|
@ -129,10 +129,10 @@ class GalaxyCLI(CLI):
|
|||
'The default is the roles_path configured in your '
|
||||
'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,
|
||||
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.')
|
||||
|
||||
if self.action in ("init","install"):
|
||||
|
|
|
@ -65,14 +65,11 @@ class GalaxyAPI(object):
|
|||
self.galaxy = galaxy
|
||||
self.token = GalaxyToken()
|
||||
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.version = None
|
||||
self.initialized = False
|
||||
|
||||
# set validate_certs
|
||||
if galaxy.options.ignore_certs:
|
||||
self._validate_certs = False
|
||||
display.vvv('Validate TLS certificates: %s' % self._validate_certs)
|
||||
|
||||
# set the API server
|
||||
|
|
|
@ -54,12 +54,8 @@ class GalaxyRole(object):
|
|||
|
||||
self._metadata = 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)
|
||||
|
||||
self.options = galaxy.options
|
||||
|
|
Loading…
Reference in a new issue