Multistep Variables between Steps #288
-
I have a workflow in AWX. This workflow generates a hostname for me. (As an example, the workflow does much more.) I would like to output this hostname after I have started AnsibleForms and the workflow has run through. A workflow template in AWX does not offer log output; this is only supported by job templates. Of course, I could now write a job template that, in turn, calls a workflow template, but I just don't want to do that. As an idea, I thought about using AnsibleForms multistep. My question is: Can I somehow pass variables set by set_stat in an AWX workflow to the next step in AnsibleForms as extravars? Can I possibly pass the workflow ID that was generated by AWX to a subsequent step? I just wanted to ask, maybe someone has had the same issue before. All in all, I am so happy to have come across this project; the value to me is invaluable. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The AWX id is stored in the log. So you could read it in the next step. But multistep is not really a chain where one step gets info from the other. I am actually writing a new project, it's still a prototype and is meant as a rest-api enabled data flow processor. It's built as spooler service, something between service now (or related product) and ansible forms. The goal is to create a flow that can receive data, grab data (file/rest), convert data (jq/jinja), repost data, and each time allows to pass data or filtered parts or data or reworked (jinja) parts of data. the flows can recurse (flow calling flow or fan-out loop parallel flows), the return data keeps piling up in the master flow. The end step can be a rest call again, a write to file or simply return it back to the launcher. It's very basic still but already quite powerful. No user database yet, just some ENV VAR including a JWT token for authentication. It has a swagger interface to check flow-locks, add/remove flows to the scheduler and ad-hoc launch flows. It's written in flask/python and the flows are a new sort of yaml descriptive language. You could build something similar in AWX or other tools, but it quickly becomes messy. This is just clean and does what it was intended to do. It already has a docker-image. It's meant as boiler plate where many steps can be extended (database read/write, maybe kafta ?, ...) There are so many automation tools out there, but non that are just plain simple. |
Beta Was this translation helpful? Give feedback.
The AWX id is stored in the log. So you could read it in the next step. But multistep is not really a chain where one step gets info from the other. I am actually writing a new project, it's still a prototype and is meant as a rest-api enabled data flow processor. It's built as spooler service, something between service now (or related product) and ansible forms. The goal is to create a flow that can receive data, grab data (file/rest), convert data (jq/jinja), repost data, and each time allows to pass data or filtered parts or data or reworked (jinja) parts of data. the flows can recurse (flow calling flow or fan-out loop parallel flows), the return data keeps piling up in the master flo…