# AWX Survey 'dynamic' options?

**URL:** <https://forum.ansible.com/t/awx-survey-dynamic-options/2397>\
**Category:** Get Help\
**Tags:** awx\
**Created:** [November 15, 2023, 1:15pm UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397 "2023-11-15T13:15:27Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edvinas](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/edvinas/32/5406_2.png) [@Edvinas](https://forum.ansible.com/u/Edvinas)\
**Post date:** [November 15, 2023, 1:15pm UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/1 "2023-11-15T13:15:27Z")

</div>

Hello, community !

I’m using AWX Survey with multiple variables. But i need to improve my AWX Survey to be able to populate survey choices that depend on prior survey choices.  
For example if my first survey variable is called: region1, the second survey choice should be: A, B or C.  
But if my first survey choice is other - region2, the second survey choice should be: D, E or F.  
As i know AWX Survey still don’t have a thing called Dynamic/programmatical choices. But maybe there’re a way to somehow input a static structured format, for example, dict of lists, like:  
`dict1 = {'region1': [A, B, C], 'region2':[D, E, F]}` ?

---

<div class="post-metadata">

**Author:** ![tanganellilore](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tanganellilore/32/178_2.png) [@tanganellilore](https://forum.ansible.com/u/tanganellilore)\
**Post date:** [November 15, 2023, 1:38pm UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/2 "2023-11-15T13:38:16Z")

</div>

Hi,

Actually this is not possible with AWX.  
As far as I know there are some issues for enhancement on this topic but are not prioritized.

Something that will bel also very interested is the usage of dynamic survey based on db query or something more complex that dependent choice.

I hope that team will evaluate those things.

---

<div class="post-metadata">

**Author:** ![jbericat](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jbericat/32/627_2.png) [@jbericat](https://forum.ansible.com/u/jbericat)\
**Post date:** [November 15, 2023, 2:10pm UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/3 "2023-11-15T14:10:54Z")

</div>

There is this open issue on GitHub:

> <https://github.com/ansible/awx/issues/20>
>
> AWX Feature Spec - Programmable Surveys
> =======================================…
> 
> User Persona
> \------------
> Administrator delegating jobs to user
> Delegated automation user
> 
> Usage Cases
> \-----------
> High-level:
> 
> \* Administrator wants to present to the user a list of builds to choose to deploy.
> \* Administrator wants to present to the user a verified list of configuration parameters to push to the chosen network devices.
> \* Adminsitrator wants to present survey chocies that depend on prior survey choices, such as a choice to select an AWS region based on 'AWS' being a prior survey answer.
> 
> API Considerations
> \------------------
> We must keep the survey JSON specification stable, or CLEARLY notify users when it changes. This may require a v2 survey spec.
> 
> http://json-schema.org/ may be of use.
> 
> UI/UX Considerations
> \--------------------
> Larger surveys should have options to collapse questions until needed. (c.f. https://github.com/ansible/awx/issues/290)
> 
> Docs
> \----
> Should have sample survey examples
> 
> QA Suggestions
> \--------------
> 
> Notes
> \-----
> 
> Updates/Changelog
> \-----------------
> 2017-09-06: initial/updated spec
> 2017-09-25: added note about collapsible surveys

Feel free to upvote the original post, looks like we’re not the only ones waiting for this feat 🙂

---

<div class="post-metadata">

**Author:** ![tanganellilore](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tanganellilore/32/178_2.png) [@tanganellilore](https://forum.ansible.com/u/tanganellilore)\
**Post date:** [November 15, 2023, 6:08pm UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/4 "2023-11-15T18:08:10Z")

</div>

Sept 2017… Good luck for us 😄

---

<div class="post-metadata">

**Author:** ![jbericat](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jbericat/32/627_2.png) [@jbericat](https://forum.ansible.com/u/jbericat)\
**Post date:** [November 15, 2023, 6:09pm UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/5 "2023-11-15T18:09:28Z")

</div>

hahhaha yet it’s a pretty alive thread lol

---

<div class="post-metadata">

**Author:** ![tanganellilore](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tanganellilore/32/178_2.png) [@tanganellilore](https://forum.ansible.com/u/tanganellilore)\
**Post date:** [November 15, 2023, 6:24pm UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/6 "2023-11-15T18:24:09Z")

</div>

I’m just investigating a service catalog like service now for non awx user (so like legali team, PM od other).

I see squest from HP and [AnsibleForms Docs - Graphical User Interface](https://ansibleforms.com/gui/).  
In the past RH will try to do that with [GitHub - ansible/pinakes](https://github.com/ansible/pinakes) but seems that hti Technical preview will not become ready for production, probably due to agreement with servicenow 😔.

Squest is good but is very poor in terms of organization concept (no segregation of portfolio/service) .

I need to test ansibleforms…

---

<div class="post-metadata">

**Author:** ![sirjaren](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sirjaren](https://forum.ansible.com/u/sirjaren)\
**Post date:** [November 16, 2023, 5:16pm UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/7 "2023-11-16T17:16:31Z")

</div>

That ansibleforms link is quite interesting.

I originally couldn’t see the need for programmable/dynamic surveys since dynamic inventories would be able to provide what I thought was needed, but after looking through that webpage, I really like the idea behind it.

Very useful to have.

---

<div class="post-metadata">

**Author:** ![tanganellilore](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tanganellilore/32/178_2.png) [@tanganellilore](https://forum.ansible.com/u/tanganellilore)\
**Post date:** [November 16, 2023, 6:12pm UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/8 "2023-11-16T18:12:10Z")

</div>

Yes, also to me… This is why i wnat to test and investigare it.

Also forma can be designer online and can be accessibile to users and groups…so very intersting

---

<div class="post-metadata">

**Author:** ![mahjatech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mahjatech/32/3311_2.png) [@mahjatech](https://forum.ansible.com/u/mahjatech)\
**Post date:** [May 7, 2024, 10:43am UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/9 "2024-05-07T10:43:30Z")

</div>

Hello everybody.  
I’m new to awx.  
Was it planned in the awx project, the addition of the following features?  
Add in the survey questionnaire, a feature to transmit a bash environment variable type $1 if the workflow must be applied to an inventory before a playbook. This would allow injecting a variable into an inventory script instead of an extra\_vars variable. like this:

 ![2024-05-07 10_55_45-bob05402.ajout_fonctionnalité_env_bash](https://us1.discourse-cdn.com/ansible/original/2X/3/384aa8003471947abcf94916c767487a338d4f5e.jpeg)

---

<div class="post-metadata">

**Author:** ![lmelcher](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/lmelcher/32/3462_2.png) [@lmelcher](https://forum.ansible.com/u/lmelcher)\
**Post date:** [May 15, 2024, 3:16pm UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/10 "2024-05-15T15:16:51Z")

</div>

Since the dynamic survey option is not directly available in AWX, has anyone used some frontend form or web UI to populate the survey with the needed answers?

---

<div class="post-metadata">

**Author:** ![TheRealHaoLiu](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/therealhaoliu/32/100_2.png) [@TheRealHaoLiu](https://forum.ansible.com/u/TheRealHaoLiu)\
**Post date:** [May 16, 2024, 1:58pm UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/11 "2024-05-16T13:58:36Z")

</div>

There’s a project out there call [https://ansibleforms.com/](https://ansibleforms.com/)

---

<div class="post-metadata">

**Author:** ![lmelcher](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/lmelcher/32/3462_2.png) [@lmelcher](https://forum.ansible.com/u/lmelcher)\
**Post date:** [May 16, 2024, 2:28pm UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/12 "2024-05-16T14:28:10Z")

</div>

Thanks! I started looking at that yesterday….any other solutions as well?

---

<div class="post-metadata">

**Author:** ![FaxMac](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/faxmac/32/8299_2.png) [@FaxMac](https://forum.ansible.com/u/FaxMac)\
**Post date:** [April 30, 2025, 3:32pm UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/14 "2025-04-30T15:32:36Z")

</div>

Recently did a RH AAP workshop where they made a Cisco IOS backup config with one playbook and restore it with another playbook. But the interesting thing is that when running the restore playbook, it showed the latest backup available.

> <https://github.com/network-automation/toolkit/blob/62c8e3884b149e5c82e4267b1df06e6d35328cf6/playbooks/network_backup.yml>

I got the source and what they did is create a job using AWX/AAP API. There they dynamically updated the job template to add survey answers based on a set of backup files.

Of course you’ll have to run a playbook before to update your survey answers. But I think this may be a way.

---

<div class="post-metadata">

**Author:** ![wayt](https://avatars.discourse-cdn.com/v4/letter/w/3be4f8/32.png) [@wayt](https://forum.ansible.com/u/wayt)\
**Post date:** [April 30, 2025, 4:21pm UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/15 "2025-04-30T16:21:17Z")

</div>

I’ve done this in the past. In my case it was populating bridge domains in ACI into a survey. I ran the job that did the survey update on a schedule.

---

<div class="post-metadata">

**Author:** ![tanganellilore](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tanganellilore/32/178_2.png) [@tanganellilore](https://forum.ansible.com/u/tanganellilore)\
**Post date:** [May 16, 2025, 5:56am UTC](https://forum.ansible.com/t/awx-survey-dynamic-options/2397/16 "2025-05-16T05:56:55Z")

</div>

Hi @wayt and @FaxMac  
Your solution is a workaround, not a real answer to question.  
Update survey or extra vars with jobtemplate or api call is something tha is not “dynamic” way to do.

Check for example ansibleforms, this is really dynamic, due to the fact the form propose is dynamic based on answer of the user or based on api call/db query on third part software .
