diff --git a/lib/ansible/module_utils/ansible_tower.py b/lib/ansible/module_utils/ansible_tower.py index a0aed73a54..e20dd21326 100644 --- a/lib/ansible/module_utils/ansible_tower.py +++ b/lib/ansible/module_utils/ansible_tower.py @@ -70,7 +70,7 @@ def tower_auth_config(module): password = module.params.pop('tower_password', None) if password: auth_config['password'] = password - verify_ssl = module.params.pop('tower_verify_ssl', None) + verify_ssl = module.params.pop('validate_certs', None) if verify_ssl is not None: auth_config['verify_ssl'] = verify_ssl return auth_config @@ -92,7 +92,7 @@ class TowerModule(AnsibleModule): tower_host=dict(), tower_username=dict(), tower_password=dict(no_log=True), - tower_verify_ssl=dict(type='bool'), + validate_certs=dict(type='bool', aliases=['tower_verify_ssl']), tower_config_file=dict(type='path'), ) args.update(argument_spec) @@ -102,7 +102,7 @@ class TowerModule(AnsibleModule): ('tower_config_file', 'tower_host'), ('tower_config_file', 'tower_username'), ('tower_config_file', 'tower_password'), - ('tower_config_file', 'tower_verify_ssl'), + ('tower_config_file', 'validate_certs'), )) super(TowerModule, self).__init__(argument_spec=args, **kwargs) diff --git a/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential_type.py b/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential_type.py index 12b75a4029..831a35ad3f 100644 --- a/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential_type.py +++ b/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential_type.py @@ -58,11 +58,12 @@ options: required: False default: "present" choices: ["present", "absent"] - tower_verify_ssl: + validate_certs: description: - Tower option to avoid certificates check. required: False type: bool + aliases: [ tower_verify_ssl ] extends_documentation_fragment: tower ''' @@ -75,7 +76,7 @@ EXAMPLES = ''' inputs: "{{ lookup('file', 'tower_credential_inputs_nexus.json') }}" injectors: {'extra_vars': {'nexus_credential': 'test' }} state: present - tower_verify_ssl: false + validate_certs: false - tower_credential_type: name: Nexus diff --git a/lib/ansible/modules/web_infrastructure/ansible_tower/tower_inventory_source.py b/lib/ansible/modules/web_infrastructure/ansible_tower/tower_inventory_source.py index 48a1e9ce1d..9aec7a8b95 100644 --- a/lib/ansible/modules/web_infrastructure/ansible_tower/tower_inventory_source.py +++ b/lib/ansible/modules/web_infrastructure/ansible_tower/tower_inventory_source.py @@ -138,10 +138,11 @@ options: - Desired state of the resource. default: "present" choices: ["present", "absent"] - tower_verify_ssl: + validate_certs: description: - Tower option to avoid certificates check. type: bool + aliases: [ tower_verify_ssl ] extends_documentation_fragment: tower ''' @@ -158,7 +159,7 @@ EXAMPLES = ''' overwrite: true source_vars: '{ private: false }' state: present - tower_verify_ssl: false + validate_certs: false ''' diff --git a/lib/ansible/plugins/inventory/tower.py b/lib/ansible/plugins/inventory/tower.py index f77368f7e4..76eb7eb67b 100644 --- a/lib/ansible/plugins/inventory/tower.py +++ b/lib/ansible/plugins/inventory/tower.py @@ -52,13 +52,14 @@ DOCUMENTATION = ''' env: - name: TOWER_INVENTORY required: True - verify_ssl: + validate_certs: description: Specify whether Ansible should verify the SSL certificate of Ansible Tower host. type: bool default: True env: - name: TOWER_VERIFY_SSL required: False + aliases: [ verify_ssl ] include_metadata: description: Make extra requests to provide all group vars with metadata about the source Ansible Tower host. type: bool @@ -156,7 +157,7 @@ class InventoryModule(BaseInventoryPlugin): request_handler = Request(url_username=self.get_option('username'), url_password=self.get_option('password'), force_basic_auth=True, - validate_certs=self.get_option('verify_ssl')) + validate_certs=self.get_option('validate_certs')) inventory_id = self.get_option('inventory_id').replace('/', '') inventory_url = '/api/v2/inventories/{inv_id}/script/?hostvars=1&towervars=1&all=1'.format(inv_id=inventory_id)