You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docsite/rst/dev_guide/developing_api.rst
+1-23Lines changed: 1 addition & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,33 +6,11 @@ Python API
6
6
7
7
.. contents:: Topics
8
8
9
-
.. note:: This API is intended for internal Ansible use. Ansible may make changes to this API at any time that could break backward compatibility with older versions of the API. Because of this, external use is not supported by Ansible. If you want to use Python API only for executing playbooks or modules, consider `ansible-runner <https://ansible-runner.readthedocs.io/en/latest/>`_ first.
10
-
11
-
There are several ways to use Ansible from an API perspective. You can use
12
-
the Ansible Python API to control nodes, you can extend Ansible to respond to various Python events, you can
13
-
write plugins, and you can plug in inventory data from external data sources. This document
14
-
gives a basic overview and examples of the Ansible execution and playbook API.
9
+
.. attention:: The Ansible API is intended for internal Ansible use. Ansible may make changes to this API at any time that could break backward compatibility with older versions of the API. Because of this, external use is not supported by Ansible. If you want to use Python API only for executing playbooks or modules, consider `ansible-runner <https://ansible-runner.readthedocs.io/en/latest/>`_ first.
15
10
16
11
If you would like to use Ansible programmatically from a language other than Python, trigger events asynchronously,
17
12
or have access control and logging demands, please see the `AWX project <https://github.com/ansible/awx/>`_.
18
13
19
-
.. note:: Because Ansible relies on forking processes, this API is not thread safe.
20
-
21
-
.. _python_api_example:
22
-
23
-
Python API example
24
-
==================
25
-
26
-
This example is a simple demonstration that shows how to minimally run a couple of tasks:
0 commit comments