diff --git a/changelogs/fragments/723-ovirt_role-fix-administrative-condition.yml b/changelogs/fragments/723-ovirt_role-fix-administrative-condition.yml new file mode 100644 index 00000000..926e40ce --- /dev/null +++ b/changelogs/fragments/723-ovirt_role-fix-administrative-condition.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - ovirt_role - Fix administrative option when set to False (https://github.com/oVirt/ovirt-ansible-collection/pull/723). diff --git a/plugins/modules/ovirt_role.py b/plugins/modules/ovirt_role.py index 737b2f30..77a60cb7 100644 --- a/plugins/modules/ovirt_role.py +++ b/plugins/modules/ovirt_role.py @@ -112,8 +112,7 @@ def build_entity(self): return otypes.Role( id=self.param('id'), name=self.param('name'), - administrative=self.param('administrative') if self.param( - 'administrative') else None, + administrative=self.param('administrative') if self.param('administrative') is not None else None, permits=[ otypes.Permit(id=all_permits.get(new_permit)) for new_permit in self.param('permits') ] if self.param('permits') else None,