Answers: <p>To complete Jiri's answer, I found out that <code>ansible-runner</code> is used as ansible runtime in the <a href="https://github.com/operator-framework" rel="nofollow noreferrer">openshift-operator</a> framework, so you run a ansible playbook or an ansible role in a pod to reconcile cluster status when changes appears on resources.</p>
  
  <p>So <code>ansible-runner</code> is a really the runtime execution for ansible as <code>runc</code> or <code>cri-o</code> can be for containers execution.</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-11-14T14:27:39.050Z
Answers: 2019-11-14T14:54:51.160Z
Answers: 2019-11-14T14:54:51.160Z
Answers: Baptiste Mille-Mathias
Answers: <p>This project is to support automation of running ansible playbooks. There is a GUI based project called <strong>Ansible Tower</strong> or <a href="https://github.com/ansible/awx" rel="noreferrer">AWX</a> to do that, but <strong>ansible-runner</strong> seems to be the underlying layer of the automation in essence replacing <strong>ansible-playbook</strong> command.</p>
  
  <p>There are some really serious issues for automation when trying to use <strong>ansible-playbook</strong> as part of some scripts. The output of <strong>ansible-playbook</strong> is the most awful thing under the sun when it comes to parsing. So you have to start with writing your own output plugin and then write a parser for that, then you need to figure out how to manage the environment variables and passwords and many other things. So <strong>ansible-runner</strong> is the answer to this. It would preserve the artifacts from running a task or playbook and make encapsulation of ansible in further automation possible.</p>
  
  <p>You can run it from shell, you can run it as python module and there is even a reference container for it and obviously it is used by AWX. Further the project's event emitter will hopefully be much better pluggable to monitoring systems like ELK and to Message Bus type systems.</p>
  
Answers: CC BY-SA 4.0
Answers: 2018-08-30T08:56:32.830Z
Answers: 2018-08-30T08:56:32.830Z
Answers: Jiri Klouda
Body: <p>I've read the <a href="https://github.com/ansible/ansible-runner/blob/master/README.md" rel="noreferrer">README file</a> from the github repository as well as the <a href="https://ansible-runner.readthedocs.io/en/latest/" rel="noreferrer">documentation site</a> of ansible-runner (from the official ansible project) but I don't understand what is ansible-runner about and in which case can it be useful ? Is it a project bring additional features or it is created to run ansible in a different way ?</p>
  
Comments: CC BY-SA 4.0
Comments: 2018-08-27T21:04:12.927Z
Comments: Just a guess from your description : I think it could be useful in a bastion host architecture, where only this host is accessible from ansible client and it takes care of playing the run book to isolated hosts, in a dmz for exemple.
Comments: Tensibai
Comments: CC BY-SA 4.0
Comments: 2019-05-31T21:32:42.613Z
Comments: also the documentation link is https://ansible-runner.readthedocs.io/en/latest/
Comments: Shobi
Tags: <ansible><automation>
Title: What is ansible-runner about?
UserDisplayName: Baptiste Mille-Mathias
ThreadText: # What is ansible-runner about?
  
  (Asked by: username_0 on 2018-08-25)
  
  I've read the [README file](https://github.com/ansible/ansible-runner/blob/master/README.md) from the github repository as well as the [documentation site](https://ansible-runner.readthedocs.io/en/latest/) of ansible-runner (from the official ansible project) but I don't understand what is ansible-runner about and in which case can it be useful ? Is it a project bring additional features or it is created to run ansible in a different way ?
  
  **Tags:** ansible, automation
  
  > **Comments:**
  > **username_1**: Just a guess from your description : I think it could be useful in a bastion host architecture, where only this host is accessible from ansible client and it takes care of playing the run book to isolated hosts, in a dmz for exemple.  
  > **username_2**: also the documentation link is https://ansible-runner.readthedocs.io/en/latest/  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2018-08-30. Score: 12 | Accepted answer
  
  This project is to support automation of running ansible playbooks. There is a GUI based project called **Ansible Tower** or [AWX](https://github.com/ansible/awx) to do that, but **ansible-runner** seems to be the underlying layer of the automation in essence replacing **ansible-playbook** command.
  
  There are some really serious issues for automation when trying to use **ansible-playbook** as part of some scripts. The output of **ansible-playbook** is the most awful thing under the sun when it comes to parsing. So you have to start with writing your own output plugin and then write a parser for that, then you need to figure out how to manage the environment variables and passwords and many other things. So **ansible-runner** is the answer to this. It would preserve the artifacts from running a task or playbook and make encapsulation of ansible in further automation possible.
  
  You can run it from shell, you can run it as python module and there is even a reference container for it and obviously it is used by AWX. Further the project's event emitter will hopefully be much better pluggable to monitoring systems like ELK and to Message Bus type systems.
  
  
  ---
  
  ### Answer by username_0 on 2019-11-14. Score: 1
  
  To complete username_3's answer, I found out that `ansible-runner` is used as ansible runtime in the [openshift-operator](https://github.com/operator-framework) framework, so you run a ansible playbook or an ansible role in a pod to reconcile cluster status when changes appears on resources.
  
  So `ansible-runner` is a really the runtime execution for ansible as `runc` or `cri-o` can be for containers execution.
  
  
  ---
  
  