# AWX 22.4.0 survey dropdown not passing variable correctly to playbook

**URL:** <https://forum.ansible.com/t/awx-22-4-0-survey-dropdown-not-passing-variable-correctly-to-playbook/42614>\
**Category:** Get Help\
**Tags:** awx, netapp, ee\
**Created:** [May 12, 2025, 9:07pm UTC](https://forum.ansible.com/t/awx-22-4-0-survey-dropdown-not-passing-variable-correctly-to-playbook/42614 "2025-05-12T21:07:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![marshit](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@marshit](https://forum.ansible.com/u/marshit)\
**Post date:** [May 12, 2025, 9:07pm UTC](https://forum.ansible.com/t/awx-22-4-0-survey-dropdown-not-passing-variable-correctly-to-playbook/42614/1 "2025-05-12T21:07:21Z")

</div>

We have a working Ansible playbook that uses the NetApp ONTAP modules to snapshot and clone volumes. When we hardcode SVM (vserver) names in the playbook, everything runs successfully.

However, when we switch to using **Multiple Choice (Single Select)** survey fields in AWX to select the `source_vserver` and `clone_vserver` , the playbook fails with:

```auto
NetApp API failed. Reason - 15698: Specified vserver not found

```

Even though the dropdown values match the SVM names exactly (e.g., `svm-spark` ), and we use Jinja `| trim` to clean any potential whitespace, Ansible still receives either an undefined or invalid value.

We’ve confirmed:

- The same values work when hardcoded
- The survey variables (`source_vserver` and `clone_vserver` ) are spelled correctly and bound to the dropdowns
- We added debug output to show the variable values — but it still fails
- Our dropdown values contain no visible whitespace or formatting issues

This leads us to believe that the survey input isn’t being passed cleanly into the playbook at runtime, even though it appears correctly in the UI.

**Environment Info:**

- **AWX Version** : 22.4.0
- **Execution Environment** : Custom EE with `netapp.ontap` collection 22.13.0
- **Playbook Location** : Git-based project
- **Launch Method** : Job Template via UI with survey input

**Expected Behavior:**  
Dropdown selections from the AWX survey should populate the `source_vserver` and `clone_vserver` variables exactly as typed and pass them into the playbook without introducing errors.

The latest AWX release appears to be 24.6.1, maybe it’s fixed in that version?

---

<div class="post-metadata">

**Author:** ![iwt-cmd](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/iwt-cmd/32/9120_2.png) [@iwt-cmd](https://forum.ansible.com/u/iwt-cmd)\
**Post date:** [May 13, 2025, 12:42pm UTC](https://forum.ansible.com/t/awx-22-4-0-survey-dropdown-not-passing-variable-correctly-to-playbook/42614/2 "2025-05-13T12:42:13Z")

</div>

Hi @marshit ,

Would you mind posting your playbook (or the section that uses those variables) and a screenshot of the survey setup for those variables?

Best regards,

Joe

---

<div class="post-metadata">

**Author:** ![marshit](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@marshit](https://forum.ansible.com/u/marshit)\
**Post date:** [May 13, 2025, 4:00pm UTC](https://forum.ansible.com/t/awx-22-4-0-survey-dropdown-not-passing-variable-correctly-to-playbook/42614/3 "2025-05-13T16:00:30Z")

</div>

This is the playbook:

```auto
---
- name: Clone multiple volumes from source to clone SVM
  hosts: localhost
  connection: local
  gather_facts: no

  tasks:
    - name: Sanitize input vserver names from survey
      set_fact:
        source_vserver: "{{ source_vserver | trim }}"
        clone_vserver: "{{ clone_vserver | trim }}"

    - name: DEBUG — show exact SVM input values
      debug:
        msg:
          - "source_vserver (trimmed): '{{ source_vserver }}'"
          - "clone_vserver (trimmed): '{{ clone_vserver }}'"

    - name: Parse input volume list into structured data
      set_fact:
        clone_volumes: >-
          {{ clone_volume_names.split(',') |
             map('trim') |
             map('regex_replace', '^(.*)$', '{"name": "\1"}') |
             map('from_yaml') | list }}

    - name: Clone and snapshot each volume using include_tasks
      include_tasks: clone_snapshot_task.yml
      loop: "{{ clone_volumes }}"
      loop_control:
        loop_var: item

```

This is the screenshot of the variables:

 ![2025-05-13_08-59-41](https://us1.discourse-cdn.com/ansible/original/2X/c/cb42b9edfe01e7104c5f6f183b1c2b85a96539d3.png)

 ![2025-05-13_09-00-56](https://us1.discourse-cdn.com/ansible/original/2X/8/868d1701019bbf1bc5fa5d6244e2dd16185cf033.png)

---

<div class="post-metadata">

**Author:** ![iwt-cmd](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/iwt-cmd/32/9120_2.png) [@iwt-cmd](https://forum.ansible.com/u/iwt-cmd)\
**Post date:** [May 13, 2025, 5:09pm UTC](https://forum.ansible.com/t/awx-22-4-0-survey-dropdown-not-passing-variable-correctly-to-playbook/42614/4 "2025-05-13T17:09:06Z")

</div>

I see that the survey answer types are “multiple select” which I believe returns a list, not a single string. Do you need to have more than 1 answer selected for these? If not, I would change the type to “Multiple Choice (Single Select)”.

Best regards,

Joe

---

<div class="post-metadata">

**Author:** ![marshit](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@marshit](https://forum.ansible.com/u/marshit)\
**Post date:** [May 13, 2025, 6:19pm UTC](https://forum.ansible.com/t/awx-22-4-0-survey-dropdown-not-passing-variable-correctly-to-playbook/42614/5 "2025-05-13T18:19:52Z")

</div>

Dang, sometimes you work on things all day and it’s just one simple you miss : (

Thanks Joe!!

---

<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:** [June 12, 2025, 6:20pm UTC](https://forum.ansible.com/t/awx-22-4-0-survey-dropdown-not-passing-variable-correctly-to-playbook/42614/6 "2025-06-12T18:20:01Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
