From c91139bde3f5d7034fb717f0680ea7ecdb4e5492 Mon Sep 17 00:00:00 2001 From: Nijin Ashok Date: Fri, 19 Oct 2018 00:55:29 +0530 Subject: [PATCH] ovirt_vm: Fix issue in SSO option Currently the module will disable the SSO if we didn't pass any value for SSO option. The PR fixes the same. Signed-off-by: Ondra Machacek --- changelogs/fragments/ovirt_vm_fix_issue_in_SSO_option.yaml | 2 ++ lib/ansible/modules/cloud/ovirt/ovirt_vm.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/ovirt_vm_fix_issue_in_SSO_option.yaml diff --git a/changelogs/fragments/ovirt_vm_fix_issue_in_SSO_option.yaml b/changelogs/fragments/ovirt_vm_fix_issue_in_SSO_option.yaml new file mode 100644 index 00000000000..9ac8ef8fdae --- /dev/null +++ b/changelogs/fragments/ovirt_vm_fix_issue_in_SSO_option.yaml @@ -0,0 +1,2 @@ +bugfixes: + - ovirt_vm - Fix issue in SSO option (https://github.com/ansible/ansible/pull/47312). diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_vm.py b/lib/ansible/modules/cloud/ovirt/ovirt_vm.py index 799aecb9f97..13d38b8bd11 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_vm.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_vm.py @@ -1031,7 +1031,7 @@ class VmsModule(BaseModule): otypes.Sso( methods=[otypes.Method(id=otypes.SsoMethod.GUEST_AGENT)] if self.param('sso') else [] ) - ), + ) if self.param('sso') is not None else None, quota=otypes.Quota(id=self._module.params.get('quota_id')) if self.param('quota_id') is not None else None, high_availability=otypes.HighAvailability( enabled=self.param('high_availability'),