* Explain duplicate checks includes tags and when (#68183) ##### SUMMARY Per #67913, when comparing dependencies, Ansible takes into account parameters, tags and the when clause in determining whether a role is a duplicate or not. ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr (cherry picked from commit3e4377300b) * Docs: ansible_host can contain FQDN (#71186) (cherry picked from commit13ab73cd89) * clarify inventory plugin user documentation (#71387) (cherry picked from commitfb035da3b2) * Keep caution tape for older versions (#71400) (cherry picked from commit156b1c5245) * document securing editor for vault (#71404) (cherry picked from commit6c48c62f93) * galaxy: Add examples for galaxy section in ansible.cfg (#70931) Add example section for galaxy section in ansible.cfg Fixes: #68402 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> (cherry picked from commit3f3bcbf05e) * docs: Remove examples using the `ec2.py` script (#69107) This script is mostly unmaintained and relies on the deprecated and unmaintained `boto` library. Featuring it prominently in the docs leads to many new users using it instead of the supported `aws_ec2` inventory plugin. (cherry picked from commit66e38bf499) * Update uri.py (#67688) Adds an example of creating workspaces in Log analytics Azure Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com> (cherry picked from commit4317c2c80c) * docs: Update Kubernetes Guide (#71372) Fixes: #61681 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> (cherry picked from commit59b80b9146) * fix broken links due to master -> main branch rename (#71426) (cherry picked from commit2b7461eb52) * Modify wording to specify two ctl-d to end stdin input in ansible-vault (#69436) * 51860 - Modify wording to specify two ctl-d to end stdin input in ansible-vault * removes space to make line 160 chars (cherry picked from commita6537b59ab) * user_guide: Add an example for loop (#71441) Explain how to use complex data in loop while converting from with_together Fixes: #47906 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> (cherry picked from commit5c1594916a) * Add link to Matt's blog (#71436) nitzmahone's blog nicely explained why Windows is not supported as Ansible controller. Link that in documentation so users can read about it. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> (cherry picked from commit3c8744f0c1) * user_guide: Fix reuse role examples (#71440) Fixes: #53919 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> (cherry picked from commit0b16c0a8c7) * service: Add a note about ignored parameters (#71455) Some parameters for systemd are ignored, add a note about such parameters in documentation. Fixes: #23144 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> (cherry picked from commit1257b0a184) * updates network plugin docs pages for 2.10 (#71467) Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com> (cherry picked from commitf82a1e06d7) * Remove "mode: preserve" option from documentation (#71486) Remove "mode: preserve" option from documentation in doc fragments "FILE_COMMON_ARGUMENTS", as it was incorrectly included in the documentation for the `lineinfile`, `unarchive` and other file-related modules. The `copy` and `templates` modules documentation remains untouched and still contain "mode: preserve", as intended. (cherry picked from commit7127d37466) * quick update to changelog instructins (#71492) (cherry picked from commitaddee0699e) * update Network Advanced Topics for FQCN (#71325) * update Network Advanced Topics for FQCN (cherry picked from commitb6f10b9b52) * fix shippable error Co-authored-by: David M. Lee <leedm777@yahoo.com> Co-authored-by: Eric G <e+github1690@linuxw.info> Co-authored-by: Sloane Hertel <shertel@redhat.com> Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com> Co-authored-by: flowerysong <paul.arthur@flowerysong.com> Co-authored-by: Jose l. Azagra <azagramac@gmail.com> Co-authored-by: Patrick Reader <pxeger@protonmail.com> Co-authored-by: John Westcott IV <32551173+john-westcott-iv@users.noreply.github.com> Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com> Co-authored-by: Timothy Visser <team@sacrome.com>
73 lines
2.6 KiB
ReStructuredText
73 lines
2.6 KiB
ReStructuredText
.. _httpapi_plugins:
|
|
|
|
Httpapi Plugins
|
|
===============
|
|
|
|
.. contents::
|
|
:local:
|
|
:depth: 2
|
|
|
|
Httpapi plugins tell Ansible how to interact with a remote device's HTTP-based API and execute tasks on the
|
|
device.
|
|
|
|
Each plugin represents a particular dialect of API. Some are platform-specific (Arista eAPI, Cisco NXAPI), while others might be usable on a variety of platforms (RESTCONF). Ansible loads the appropriate httpapi plugin automatically based on the ``ansible_network_os`` variable.
|
|
|
|
|
|
.. _enabling_httpapi:
|
|
|
|
Adding httpapi plugins
|
|
-------------------------
|
|
|
|
You can extend Ansible to support other APIs by dropping a custom plugin into the ``httpapi_plugins`` directory. See :ref:`developing_plugins_httpapi` for details.
|
|
|
|
.. _using_httpapi:
|
|
|
|
Using httpapi plugins
|
|
------------------------
|
|
|
|
The httpapi plugin to use is determined automatically from the ``ansible_network_os`` variable.
|
|
|
|
Most httpapi plugins can operate without configuration. Additional options may be defined by each plugin.
|
|
|
|
Plugins are self-documenting. Each plugin should document its configuration options.
|
|
|
|
|
|
The following sample playbook shows the httpapi plugin for an Arista network device, assuming an inventory variable set as ``ansible_network_os=eos`` for the httpapi plugin to trigger off:
|
|
|
|
.. code-block:: yaml
|
|
|
|
- hosts: leaf01
|
|
connection: httpapi
|
|
gather_facts: false
|
|
tasks:
|
|
|
|
- name: type a simple arista command
|
|
eos_command:
|
|
commands:
|
|
- show version | json
|
|
register: command_output
|
|
|
|
- name: print command output to terminal window
|
|
debug:
|
|
var: command_output.stdout[0]["version"]
|
|
|
|
See the full working example `on GitHub <https://github.com/network-automation/httpapi>`_.
|
|
|
|
.. _httpapi_plugin_list:
|
|
|
|
Viewing httpapi plugins
|
|
-----------------------
|
|
|
|
These plugins have migrated to collections on `Ansible Galaxy <https://galaxy.ansible.com>`_. If you installed Ansible version 2.10 or later using ``pip``, you have access to several httpapi plugins. To list all available httpapi plugins on your control node, type ``ansible-doc -t httpapi -l``. To view plugin-specific documentation and examples, use ``ansible-doc -t httpapi``.
|
|
|
|
.. seealso::
|
|
|
|
:ref:`Ansible for Network Automation<network_guide>`
|
|
An overview of using Ansible to automate networking devices.
|
|
:ref:`Developing network modules<developing_modules_network>`
|
|
How to develop network modules.
|
|
`User Mailing List <https://groups.google.com/group/ansible-devel>`_
|
|
Have a question? Stop by the google group!
|
|
`irc.freenode.net <http://irc.freenode.net>`_
|
|
#ansible-network IRC chat channel
|