ansibleguy76 / ansibleforms

A webapplication to create pretty advanced forms to run ansible playbooks or awx templates.
https://ansibleforms.com/
GNU General Public License v3.0
66 stars 10 forks source link

Feat: Approve Jobs without mail #165

Closed Hapshanko closed 5 months ago

Hapshanko commented 5 months ago

Is your feature request related to a problem? Please describe.

First of all, thanks for the amazing thought out work on this project! We are amazed with each little feature and parameter, that are really thought through, and implement many things missing from AWX!

Our organization wishes to use AnsibleForms in our disconnected environment, and have set up everything required with some of our forms! Now we wanted to set approval on them, and we noticed a mail server is required. We do not have a mail server in this environment.

Describe the solution you'd like

A way to approve jobs without mail, In the GUI of the user that has the correct role, could even be a 'pending approvals' tab, or an approval button in the 'job queue' tab.

Describe alternatives you've considered

a different way even using the API (which is less preferred because then we have no way of knowing which jobs are waiting for approval and is more hacky)

Additional context

Set up a "fake" email without setting an email server, and job is stuck in "running". Might also be interesting, there is no pending for validation state in this case.

ansibleguy76 commented 5 months ago

hi

the api is certainly an option as my webclient does everything with api. a quick f12 dev tools cheat in a browser like chrome would reveal how to get pending approvals. also, a logged on person should see pending approvals in the toolbar. if you drop notifications section, mails will not be sent. let me know if you experience differently

Hapshanko commented 5 months ago

Oh okay thanks! Yes so now that I know it is not the desired behavior I see that I have an error, job is not in pending state it is stuck in running state, server logs show

"error: Error: cannot read properties of undefined (reading 'length')"

when I remove the 'approval' field everything works okay.

And approving using API wont work because job is in running state, but it is not really starting it is stuck.

ansibleguy76 commented 5 months ago

hmm, can you give me something to duplicate this behavior ?

ansibleguy76 commented 5 months ago

my bad... this is already fixedin 5.0.1 (still in beta). and just tested : it works without notifications

Hapshanko commented 5 months ago

Okay will be waiting for the release!

ansibleguy76 commented 5 months ago

you can also just use the docker image "ansibleguy/ansibleforms:beta" (instead of :latest)

ansibleguy76 commented 5 months ago

fixed in 5.0.1