opened 08:05PM - 06 Sep 17 UTC
type:enhancement
component:api
component:ui
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
This is one of the must thumbs up and frequently requested feature in the AWX project and recently when I attended Ansible Fest 2024 6 people came up to me and ask me about this feature.
At this point I do not know what is involve in implementing this feature but lets design it together!
4 Likes
Ansible is a great automation tool, but in the end, it's still a command-line application.
While AWX/Tower is a great GUI, it is lacking fancy forms that can grab data from several sources.<br><br>
That's where AnsibleForms comes in. It...
this is something someone at Fest brought up to me for what they use as a workaround to AWX not having fancy forms
I have not used it yet, maybe there’s something we can learn about from this project
Open Source++
1 Like
fvzwieten
(Fred van Zwieten)
May 14, 2024, 3:03pm
3
We allow the user to fill in a URL in the Multiple-Choice answer types as a single option. The file will be fetched before building the UI for the survey and will populate the multiple choices. If there is a problem with the file the field should be the provided default or blank if there is none.
Just one workaround solution:
Ansible forms: https://ansibleforms.com/
3 Likes
have you all used it @tanganellilore ?
we are looking at it now in the meeting.
1 Like
one issue I could see with ansibleforms is currently I know many people use surveys to pass passwords into the automation and it would show in plain text if sent from the API as extra vars vs how the survey password option currently somewhat obfuscates the passwords at least if not securely manage it similar to credentials.
during today (May 14) community meeting @AlanCoding mention we want to add something around encrypted extra_vars to signal that encrypt it in database and do not show it on API [tech debt] Remove the `survey_passwords` field by AlanCoding · Pull Request #13091 · ansible/awx · GitHub this is the PR that he referenced
1 Like
TheRealHaoLiu:
is is one of the must thumbs up and frequently requested feature in the AWX project and recently when I attended Ansible Fest 2024 6 people came up to me and ask me about this feature.
At this point I do not know what is involve in implementing this feature but
I am struggling with ansible forms specifically with passwords. Since they are clear text in the api and a survey does “$encrypted$”
But other than that ansible forms is awsome! The feature to query a rest api (netbox in my case) changes AWX into datacenter wizard tool.
@tanganellilore would u be able to demo ansibleform on our next community meeting?
this is something we talked about on our last community meeting see my comment Programable Survey feature in AWX - #7 by TheRealHaoLiu
as for “query generic rest api to get options” is this something ansibleform able to do?
Difficult to me because we are on new product launch in our company and we are very busy.
I will chato you if i can do it.
1 Like
Yes
this an example where I query netbox (ibm property now ) to select a tenant in a drop down.
You can later use this in another rest api call
- name: Tenant
type: enum
expression:
fn.fnRestJwtSecure('get','https://xxxx/api/tenancy/tenants/','','credential_name ','[.results[]]','','','Token'
)
columns:
- name
noOutput: false
outputObject: true
group: Vm Settings
some fields later
expression: fn.fnRestJwtSecure('get',
'https://xxxx/api/ipam/prefixes?tenant_id=$(Tenant.id)
1 Like
Maybe I am missing something but looking at the PR I think I stumbled on feature I did not know the existence of.
Am I correct that extra_data is not shown in the logging and can be used for passwords?
Currently it doesn’t know and it will be logged and recorded in DB in plan text
Has anyone gotten AnsibleForms to work with AAP’s automation controller?
What is not working (I only have AWX) but it is just a form wizard create that sends an api launch request to AWX/AAP. So I don’t see why it should not work?
1 Like