# debconf multiselect is converted to string

**URL:** <https://forum.ansible.com/t/debconf-multiselect-is-converted-to-string/38259>\
**Category:** Ansible Project\
**Created:** [July 25, 2023, 3:31pm UTC](https://forum.ansible.com/t/debconf-multiselect-is-converted-to-string/38259 "2023-07-25T15:31:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ann\_Elliott](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Ann\_Elliott](https://forum.ansible.com/u/Ann_Elliott)\
**Post date:** [July 25, 2023, 3:31pm UTC](https://forum.ansible.com/t/debconf-multiselect-is-converted-to-string/38259/1 "2023-07-25T15:31:23Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [July 25, 2023, 4:02pm UTC](https://forum.ansible.com/t/debconf-multiselect-is-converted-to-string/38259/2 "2023-07-25T16:02:46Z")

</div>

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