Skip to content

Commit

Permalink
Update for artifacts_handler
Browse files Browse the repository at this point in the history
* Added a new example for artifacts_handler

Fixes: #739

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
  • Loading branch information
Akasurde committed Aug 22, 2022
1 parent 2d240e0 commit 863fde6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/python_interface.rst
Expand Up @@ -218,6 +218,18 @@ Usage examples
print(r.stats)
.. code-block:: python
import ansible_runner
def my_artifacts_handler(artifacts_dir):
# Do something here
print(artifacts_dir)
# Do something with artifact directory after the run is complete
r = ansible_runner.run(private_data_dir='/tmp/demo', playbook='test.yml', artifacts_handler=my_artifacts_handler)
.. code-block:: python
import ansible_runner
Expand Down

0 comments on commit 863fde6

Please sign in to comment.