Using lists in AWX survey

Hi all,

my scenario:
I have a list of vlanids, in a vars files, for an playbook that works when executed from a controller, but I can’t it to work when I try the same from AWX

the vars I am working with in the controller playbook
vlanid:

  • ‘0302’
  • ‘0303’

dynamic_vlanid:

  • ‘0210’
  • ‘0211’

I need to keep the leading ‘0’ to meet a naming standard, but also need to ensure that if the number hits the 1000’s it will still work, hence the number between ‘xxxx’
This works fine from the controller, when I get to AWX & create a Survey for the end user to fill in, I can’t get the ‘xxxx’ option to work, I get this message, which does not mean much to me.

{
“_ansible_parsed”: true,
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“changed”: false,
“item”: [
“ZAR”,
“- ‘0302’\n- ‘0303’”
],
“invocation”: {
“module_args”: {
“username”: “admin”,
“pool_allocation_mode”: “static”,
“block_end”: “- ‘0302’\n- ‘0303’”,
“use_proxy”: true,
“block_start”: “- ‘0302’\n- ‘0303’”,
“output_level”: “normal”,
“block_name”: “- ‘0302’\n- ‘0303’”,
“state”: “present”,
“timeout”: 30,
“host”: “172.21.11.21”,
“use_ssl”: true,
“password”: “VALUE_SPECIFIED_IN_NO_LOG_PARAMETER”,
“validate_certs”: false,
“pool”: “vlan_ZAR_static”
}
},
“msg”: “argument block_end is of type <type ‘str’> and we were unable to convert to int: invalid literal for int() with base 10: "- ‘0302’\n- ‘0303’"”,
“_ansible_ignore_errors”: null,
“_ansible_item_label”: [
“ZAR”,
“- ‘0302’\n- ‘0303’”
]
}

In the Survey I have tried using ‘Textarea’, ‘Float’ & ‘Integer’ but not had any luck getting it to work.

I have also tried adding the vars & an Extra Variable, that too did not seem to work.

Any ideas?

How do get the Ansible vars on the controller
vars:
vlanid:

  • ‘0201’
  • ‘0202’

To look the same in AWX