debconf multiselect is converted to string

While debconf is working for me just fine when setting string values, when I try to use vtype: multiselect, my list is converted into a string and only the last item gets selected. The relevant section of the yaml file:

  • name: ldap nsswitch
    debconf:
    name: libnss-ldapd
    question: libnss-ldapd/nsswitch
    value: passwd, group, shadow

vtype: multiselect

but these settings were not applied.

I then changed the value to

value:

  • passwd
  • group
  • shadow

and get the warning

[WARNING]: The value “[‘passwd’, ‘group’, ‘shadow’]” (type list) was converted to “”[‘passwd’, ‘group’, ‘shadow’]“” (type string). If this does not look like what you expect, quote the entire value to ensure it does not change.

I then tried "value: “passwd, group, shadow” (and maybe “[passwd, group, shadow]” but I don’t remember for sure). No change in behavior.

When I log into the machine I ran the ansible script on, with any of those versions on the ansible file, I see

$ debconf-show libnss-ldapd
libnss-ldapd/clean_nsswitch: false

  • libnss-ldapd/nsswitch: sudoers

What I expect to see:

$ debconf-show libnss-ldapd

  • libnss-ldapd/nsswitch: passwd, group, shadow
    libnss-ldapd/clean_nsswitch: false

ansible version is 2.10.8

Is this user error or a bug in debconf?

open a bug, value should be 'raw' and we should convert depending on type: