Workflow doesn't recognizing prompt on launch.

180 views
Skip to first unread message

Thiago Castro

unread,
Apr 27, 2021, 4:08:57 PM4/27/21
to AWX Project
Hey, Guys.

Recently, I've updated my AWX environment from 6.0 (lol) to 19.0

I've done a clean installation of 19.0 and imported the projects, workflows, jobs, etc.. through tower-cli.

My workflow templates are ignoring the limit flag configured on the jobs.
When I add the job template on the workflow, he asks me for the LIMIT (the prompted option) and I configure with my parameteres. But, when I run the workflow, the workflow job ignores the LIMIT configuration I've put before and try to execute the job at the inventory.

Fun fact: I have 3 workflows. One of them works perfectly, the two anothers are bugged.

I tried to create another workflows for testing purposes, but I had no success.

Can you guys help me? I had to create a job template for every server, hard coding the servername  on the limit flag so I can deploy our application in our servers.

Regards,
Thiago.

Michael Abashian

unread,
Apr 27, 2021, 4:12:30 PM4/27/21
to AWX Project

Thiago Castro

unread,
Apr 28, 2021, 2:11:55 PM4/28/21
to AWX Project
Thx for your reply. That issue describes exactly my problem. I got a workaround for this:

Create your workflow, configure your nodes. Save your configuration

Update your workflow through the AWX API:

PUT  http://{your_awx_url}/api/v2/workflow_job_templates/{your_workflow_id}/ HTTP/1.1
Authorization: Basic your_username:your_password
Content-Type: application/json

{
    "name""Your workflow name",
    "limit"null,
    "scm_branch"null,
    "ask_variables_on_launch"true
}

(I used vscode rest api for run this code, you can use curl for that too)

And the workflow will work as expected.

The bug consists in the AWX GUi, when you create a workflow, the default parameters are ignored, so limit, scm_branch and ask_variables_on_launch are always a blank space.
for LIMIT variables, AWX interpreters you don't  have a LIMIT and try to execute the job on all hosts on your inventory.
Reply all
Reply to author
Forward
0 new messages