+ + +
+ +
+
+
+
+ +
+
+
+ +
+ 4 +
+ + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ +

Is there a way in Ansible tower to pause the workflow template execution and wait for the user to provide some kind of input like "approved" or "reject" after completion of a job template and then proceed with the next job template?

+ +

I am trying to build a workflow which will have 5 job templates but I want the execution to pause and wait for user input once the second job template execution is successful. Once the user input approved or reject then it should proceed with the third job template execution.

+ +

Please let me know if anyone has implemented any such workflow.

+ +

Thanks in advance.

+
+ + + +
+
+
+ + + +
+ +
+ +
+
CC BY-SA 4.0
+
+ + +
+ Edit +
+ +
+ +
+
+
+ +
+
+ +
+
+ Get updates on questions and answers +
+
+
+ + + + + + +
+
+
+
+ +
+ + + +
+
+
+ +
+ + + + + +
+
+
    + +
+
+ + +
+
+ +
+ + +
+ +
+
+ + + +
+ +
+
+
+

+ 2 Answers + 2 +

+
+
+ + +
+
+ + + Reset to default + +
+
+ +
+
+ + +
+
+ +
+ + + + +
+
+
+
+ +
+ 3 +
+ + + + + + + + + + + + +
+
+ +
+
+ + + + +
+ +
+ + + +
+ +
+

One alternative approach I found is using 'wait_for' module. +We can create a text file in a host which you have access to and 'wait_for' specific text to be present in the file before continuing.

+ +

You can create a job template with the playbook as follows and include in the workflow template wherever you need to wait.

+ +
- name: Wait until the string "approved" is in the file /tmp/foo before continuing
+  wait_for:
+    path: /tmp/foo
+    search_regex: approved
+
+ +

When the tower workflow waits, you can login to the host and change the text to 'approved'

+ +

Documentation

+
+
+
+ +
+ + + +
+ +
+ +
+
CC BY-SA 4.0
+
+ + +
+ Edit +
+ +
+ +
+ + + + + + +
+
+
+
+ + +
+ + + +
+
+ + +
+ +
+ + + + + +
+
+
    + +
+
+ + +
+
+
+ +
+
+
+
+ + +
+
+
+
+ +
+ 0 +
+ + + + + + + + + + + + +
+
+ +
+
+ + + + +
+ +
+ + + +
+ +
+

If using AAF, there is now an Approval Step:

+

[https://www.ansible.com/blog/how-to-add-approval-steps-to-ansible-tower-workflows][1]

+

This should accomplish what you are wanting (or other people in the future who read this)

+
+
+
+ +
+ + + +
+ +
+ +
+
CC BY-SA 4.0
+
+ + +
+ Edit +
+ +
+ +
+ + + + + + +
+
+
+
+ + +
+ + +
+
+ New contributor +
+
+
+ ben10zero is a new contributor to this site. Take care in asking for clarification, commenting, and answering. +Check out our Code of Conduct.
+
+ +
+
+ + +
+ +
+ + + + + +
+
+
    + +
+
+ + +
+
+
+ + + +
+ + + +

+ Your Answer +

+ + + + + + +
+ + +
+
+
+
    +
  • Links
  • +
  • Images
  • +
  • Styling/Headers
  • +
  • Lists
  • +
  • Blockquotes
  • +
  • Code
  • +
  • HTML
  • +
  • Tables
  • Advanced help
  • +
+ + + +
+
+

Images are exactly like links, but they have an exclamation point in front of them:

+
![a busy cat](https://cdn.sstatic.net/Sites/stackoverflow/Img/error-lolcat-problemz.jpg)
+![two muppets][1]
+
+ [1]: https://i.imgur.com/I5DFV.jpg "tooltip"
+
+

+ The word in square brackets is the alt text, which gets displayed if the browser + can't show the image. Be sure to include meaningful alt text for screen-reading + software. +

+ +
+
+ +
+
+
+

Be sure to use text styling sparingly; only where it helps readability.

+
*This is italicized*, and so
+is _this_.
+
+**This is bold**, just like __this__.
+
+You can ***combine*** them
+if you ___really have to___.
+
+ +
+
+

+ To break your text into sections, you can use headers: +

+
A Large Header
+==============
+
+Smaller Subheader
+-----------------
+
+

+ Use hash marks if you need several levels of headers: +

+
# Header 1 #
+## Header 2 ##
+### Header 3 ###
+
+
+
+
+ +
+
+

Both bulleted and numbered lists are possible:

+
+
- Use a minus sign for a bullet
++ Or plus sign
+* Or an asterisk
+
+1. Numbered lists are easy
+2. Markdown keeps track of
+   the numbers for you
+7. So this will be item 3.
+
+
+
+
1. Lists in a list item:
+    - Indented four spaces.
+        * indented eight spaces.
+    - Four spaces again.
+2.  You can have multiple
+    paragraphs in a list items.
+ 
+    Just be sure to indent.
+
+
+
+
+ +
+
+
+
> Create a blockquote by
+> prepending “>” to each line.
+>
+> Other formatting also works here, e.g.
+>
+> 1. Lists or
+> 2. Headings:
+>
+> ## Quoted Heading ##
+
+
+
+

+ You can even put blockquotes in blockquotes: +

+
> A standard blockquote is indented
+> > A nested blockquote is indented more
+> > > > You can nest to any depth.
+
+
+
+
+ +
+
+

+ To create code blocks or other preformatted text, indent by four spaces or surround with groups of backticks: +

+
    This will be displayed in a monospaced font. The first four spaces
+    will be stripped off, but all other whitespace will be preserved.
+
+```
+Markdown and HTML are turned off in code blocks:
+<i>This is not italic</i>, and [this is not a link](https://example.com)
+```
+

+ To create not a block, but an inline code span, use backticks: +

+
The `$` character is just a shortcut for `window.jQuery`.
+
+

+ If you want to have a preformatted block within a list, indent by eight spaces: +

+
1. This is normal text.
+2. So is this, but now follows a code block:
+ 
+        Skip a line and indent eight spaces.
+        That's four spaces for the list
+        and four to trigger the code block.
+
+
+
+ +
+
+

+ If you need to do something that Markdown can't handle, use HTML. Note that we only support a very strict subset of HTML! +

+
Strikethrough humor is <strike>funny</strike>.
+
+

+ Markdown is smart enough not to mangle your span-level HTML: +

+
<b>Markdown works *fine* in here.</b>
+
+

+ Block-level HTML elements have a few restrictions: +

+
    +
  1. They must be separated from surrounding text by blank lines.
  2. +
  3. The begin and end tags of the outermost block element must not be indented.
  4. +
  5. Markdown can't be used within HTML blocks.
  6. +
+
+
<pre>
+    You can <em>not</em> use Markdown in here.
+</pre>
+
+
+
+ +
+
+

+ You can create tables using the GitHub-flavored markdown format. +

+
| A header | Another header |
+| -------- | -------------- |
+| First    | row            |
+| Second   | row            |
+
+ +
    +
  • A header row is required and must be followed by a separator row with the same number of cells
  • +
  • Cells are separated by a pipe (|) symbol
  • +
+ +

+ Set the alignment of a table column by placing a : on the left, right, or both sides of a separator in the separator line. +

+
| left | center | right |
+|:---- |:------:| -----:|
+| One  | Two    | Three |
+
+
+
+
+
+
+
+ +
+
+
+
+
+ + + + + + + +
+ + +
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+
+
+ + +

+
+Not the answer you're looking for? Browse other questions tagged or ask your own question.
+

+
+