From 3c2f1b3df993766ecba4ad1afad7e48c254ca498 Mon Sep 17 00:00:00 2001 From: Hideki Saito Date: Wed, 20 Jul 2022 14:31:15 +0900 Subject: [PATCH] Replace config with _config for the latest azure-mgmt-network. (#904) * Addresses issue #903 Signed-off-by: Hideki Saito --- plugins/module_utils/azure_rm_common.py | 8 +++++--- .../targets/azure_rm_privateendpoint/tasks/main.yml | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/module_utils/azure_rm_common.py b/plugins/module_utils/azure_rm_common.py index e6319a5ad..817774aa2 100644 --- a/plugins/module_utils/azure_rm_common.py +++ b/plugins/module_utils/azure_rm_common.py @@ -927,9 +927,11 @@ def _ansible_get_models(self, *arg, **kwarg): if not is_track2: client.config = self.add_user_agent(client.config) - - if self.azure_auth._cert_validation_mode == 'ignore': - client.config.session_configuration_callback = self._validation_ignore_callback + if self.azure_auth._cert_validation_mode == 'ignore': + client.config.session_configuration_callback = self._validation_ignore_callback + else: + if self.azure_auth._cert_validation_mode == 'ignore': + client._config.session_configuration_callback = self._validation_ignore_callback return client diff --git a/tests/integration/targets/azure_rm_privateendpoint/tasks/main.yml b/tests/integration/targets/azure_rm_privateendpoint/tasks/main.yml index 78d4b159a..306c1cc0a 100644 --- a/tests/integration/targets/azure_rm_privateendpoint/tasks/main.yml +++ b/tests/integration/targets/azure_rm_privateendpoint/tasks/main.yml @@ -64,8 +64,9 @@ - postgresqlServer subnet: id: "{{ subnet_output.state.id }}" - tags: + tags: key1: value1 + cert_validation_mode: ignore register: output - name: Assert status succeeded and results match expectations