# AWX survey varible alwasy treated as a string

**URL:** <https://forum.ansible.com/t/awx-survey-varible-alwasy-treated-as-a-string/34061>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [October 19, 2020, 11:17pm UTC](https://forum.ansible.com/t/awx-survey-varible-alwasy-treated-as-a-string/34061 "2020-10-19T23:17:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Biker](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bill_biker/32/8087_2.png) [@Bill\_Biker](https://forum.ansible.com/u/Bill_Biker)\
**Post date:** [October 19, 2020, 11:17pm UTC](https://forum.ansible.com/t/awx-survey-varible-alwasy-treated-as-a-string/34061/1 "2020-10-19T23:17:47Z")

</div>

Hello,  
I have AWX 13.0 and ansible 2.9. I have a template in AWX that has a survey.  
I set and send an integer value to a playbook via --extra\_vars.  
The problem is the playbook sends a string to the device I am working with. The device

responds if the value sent (a switch configuration) is an integer, like 993. but it I

set the variable: “{{ PORT }}” the device does not take the value, as it want an integer, not a string.

If I hard code the number into the playbook - 993 - the device responds.  
Is there a way to fix this?

thanks,  
ewholz1

---

<div class="post-metadata">

**Author:** ![Mike\_Charchuk](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Mike\_Charchuk](https://forum.ansible.com/u/Mike_Charchuk)\
**Post date:** [October 19, 2020, 11:46pm UTC](https://forum.ansible.com/t/awx-survey-varible-alwasy-treated-as-a-string/34061/2 "2020-10-19T23:46:04Z")

</div>

{{Var\_name|int}}

---

<div class="post-metadata">

**Author:** ![Walter\_Rowe1](https://avatars.discourse-cdn.com/v4/letter/w/3d9bf3/32.png) [@Walter\_Rowe1](https://forum.ansible.com/u/Walter_Rowe1)\
**Post date:** [October 19, 2020, 11:51pm UTC](https://forum.ansible.com/t/awx-survey-varible-alwasy-treated-as-a-string/34061/3 "2020-10-19T23:51:22Z")

</div>

Place this in ansible.cfg

jinja2\_native = true

[https://github.com/ansible/ansible/pull/32738#issuecomment-407519803](https://github.com/ansible/ansible/pull/32738#issuecomment-407519803)

Walter

---

<div class="post-metadata">

**Author:** ![Bill\_Biker](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bill_biker/32/8087_2.png) [@Bill\_Biker](https://forum.ansible.com/u/Bill_Biker)\
**Post date:** [October 20, 2020, 2:33pm UTC](https://forum.ansible.com/t/awx-survey-varible-alwasy-treated-as-a-string/34061/4 "2020-10-20T14:33:29Z")

</div>

Hello Guys,  
I tried both of these with no luck. I will take another look at the ansible.cfg file though.

Thank for the replies,

ewholz

---

<div class="post-metadata">

**Author:** ![Walter\_Rowe1](https://avatars.discourse-cdn.com/v4/letter/w/3d9bf3/32.png) [@Walter\_Rowe1](https://forum.ansible.com/u/Walter_Rowe1)\
**Post date:** [October 20, 2020, 5:19pm UTC](https://forum.ansible.com/t/awx-survey-varible-alwasy-treated-as-a-string/34061/5 "2020-10-20T17:19:22Z")

</div>

You need an ansible.cfg at the base of your git repo (ansible tower project).

Walter
