Ansible Awx workflow

Hello Everyone,

I am at trying to create ansible AWX workflow, when I attach a job template having survey variable defined, at start of the workflow, it ask me to input those variables and makes me saves it.

When I run the workflow, it takes only those saved values and not the new value to be asked during job run

Is there a way I can prompt survey to user on different job template attached on a workflow ?

Hi Sumit,

From my experience, you will need to have the survey on the workflow for it prompt on launch. We have a few operations where we want to use a job template with a survey both by itself or within a workflow. The way we get around this is to have the job template survey questions as optional so we don’t need to save responses when attaching to a workflow. This does mean that you have to maintain 2 surveys but we’ve found that we usually need different survey questions on the workflow as compared to those in the job template.

You can manage surveys via the API and, in theory, could keep the surveys in sync via another playbook but that will probably not be worth the effort if the surveys are simple or don’t change that often.

Best regards,

Joe

Thanks Joe for the reply.

What I want to achieve is -

I want to create a workflow which does these things -

  • Template1 : Gather server instance information (from openstack) created by the user running the ansible job.
    -Template2: Display the output of 1st template on survey (multiple choice single select) and from here, if user selects one instance, perform patching on that (or any other operation)

Note: I am able to create dynamic inventory for template2 and able to use API too, but cannot create workflow out of it.

Workflow : template1 +(on success) + template2