diff --git a/changelogs/fragments/48009-ldap_attr-list.yml b/changelogs/fragments/48009-ldap_attr-list.yml new file mode 100644 index 00000000000..cea866751f8 --- /dev/null +++ b/changelogs/fragments/48009-ldap_attr-list.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - ldap_attr map to list (https://github.com/ansible/ansible/pull/48009) diff --git a/lib/ansible/modules/net_tools/ldap/ldap_attr.py b/lib/ansible/modules/net_tools/ldap/ldap_attr.py index 320fd74595e..8265d20ba62 100644 --- a/lib/ansible/modules/net_tools/ldap/ldap_attr.py +++ b/lib/ansible/modules/net_tools/ldap/ldap_attr.py @@ -173,7 +173,7 @@ class LdapAttr(LdapGeneric): # Normalize values if isinstance(self.module.params['values'], list): - self.values = map(to_bytes, self.module.params['values']) + self.values = list(map(to_bytes, self.module.params['values'])) else: self.values = [to_bytes(self.module.params['values'])]