AWX 22.4.0 survey dropdown not passing variable correctly to playbook

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:

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?

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

This is the playbook:

---
- 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:

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

2 Likes

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

Thanks Joe!!

1 Like