ansibleguy76/ansibleforms

Feat: Approve Jobs without mail

Closed this issue · 7 comments

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.

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

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.

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

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

Okay will be waiting for the release!

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

fixed in 5.0.1