

Ansible Documentation
=====================

 About Ansible
-------------

 Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates.

 Ansible’s main goals are simplicity and ease-of-use. It also has a strong focus on security and reliability, featuring a minimum of moving parts, usage of OpenSSH for transport (with other transports and pull modes as alternatives), and a language that is designed around auditability by humans–even those not familiar with the program.

 We believe simplicity is relevant to all sizes of environments, so we design for busy users of all types: developers, sysadmins, release engineers, IT managers, and everyone in between. Ansible is appropriate for managing all environments, from small setups with a handful of instances to enterprise environments with many thousands of instances.

 You can learn more at [AnsibleFest](https://www.ansible.com/ansiblefest), the annual event for all Ansible contributors, users, and customers hosted by Red Hat. AnsibleFest is the place to connect with others, learn new skills, and find a new friend to automate with.

 Ansible manages machines in an agent-less manner. There is never a question of how to upgrade remote daemons or the problem of not being able to manage systems because daemons are uninstalled. Because OpenSSH is one of the most peer-reviewed open source components, security exposure is greatly reduced. Ansible is decentralized–it relies on your existing OS credentials to control access to remote machines. If needed, Ansible can easily connect with Kerberos, LDAP, and other centralized authentication management systems.

 This documentation covers the version of Ansible noted in the upper left corner of this page. We maintain multiple versions of Ansible and of the documentation, so please be sure you are using the version of the documentation that covers the version of Ansible you’re using. For recent features, we note the version of Ansible where the feature was added.

 Ansible releases a new major release approximately twice a year. The core application evolves somewhat conservatively, valuing simplicity in language design and setup. Contributors develop and change modules and plugins, hosted in collections since version 2.10, much more quickly.

 Installation, Upgrade & Configuration

 * [Installation Guide](https://docs.ansible.com/ansible/latest/installation_guide/index.html)
	+ [Installing Ansible](installation_guide/intro_installation)
	+ [Configuring Ansible](installation_guide/intro_configuration)
* [Ansible Porting Guides](porting_guides/porting_guides)

 Using Ansible

 * [User Guide](user_guide/index)
	+ [Getting started](user_guide/index#getting-started)
	+ [Writing tasks, plays, and playbooks](user_guide/index#writing-tasks-plays-and-playbooks)
	+ [Working with inventory](user_guide/index#working-with-inventory)
	+ [Interacting with data](user_guide/index#interacting-with-data)
	+ [Executing playbooks](user_guide/index#executing-playbooks)
	+ [Advanced features and reference](user_guide/index#advanced-features-and-reference)
	+ [Traditional Table of Contents](user_guide/index#traditional-table-of-contents)

 Contributing to Ansible

 * [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html)
	+ [Getting started](https://docs.ansible.com/ansible/latest/community/index.html#getting-started)
	+ [Going deeper](https://docs.ansible.com/ansible/latest/community/index.html#going-deeper)
	+ [Working with the Ansible repo](https://docs.ansible.com/ansible/latest/community/index.html#working-with-the-ansible-repo)
	+ [Traditional Table of Contents](https://docs.ansible.com/ansible/latest/community/index.html#traditional-table-of-contents)

 Extending Ansible

 * [Developer Guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html)
	+ [Adding modules and plugins locally](https://docs.ansible.com/ansible/latest/dev_guide/developing_locally.html)
	+ [Should you develop a module?](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules.html)
	+ [Developing Ansible modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html)
	+ [Contributing your module to an existing Ansible collection](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_checklist.html)
	+ [Conventions, tips, and pitfalls](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_best_practices.html)
	+ [Ansible and Python 3](https://docs.ansible.com/ansible/latest/dev_guide/developing_python_3.html)
	+ [Debugging modules](https://docs.ansible.com/ansible/latest/dev_guide/debugging.html)
	+ [Module format and documentation](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_documenting.html)
	+ [Windows module development walkthrough](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_windows.html)
	+ [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html)
	+ [Guidelines for Ansible Amazon AWS module development](https://docs.ansible.com/ansible/latest/dev_guide/platforms/aws_guidelines.html)
	+ [OpenStack Ansible Modules](https://docs.ansible.com/ansible/latest/dev_guide/platforms/openstack_guidelines.html)
	+ [oVirt Ansible Modules](https://docs.ansible.com/ansible/latest/dev_guide/platforms/ovirt_dev_guide.html)
	+ [Guidelines for VMware module development](https://docs.ansible.com/ansible/latest/dev_guide/platforms/vmware_guidelines.html)
	+ [Guidelines for VMware REST module development](https://docs.ansible.com/ansible/latest/dev_guide/platforms/vmware_rest_guidelines.html)
	+ [Creating a new collection](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_in_groups.html)
	+ [Testing Ansible](https://docs.ansible.com/ansible/latest/dev_guide/testing.html)
	+ [The lifecycle of an Ansible module or plugin](https://docs.ansible.com/ansible/latest/dev_guide/module_lifecycle.html)
	+ [Developing plugins](https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html)
	+ [Developing dynamic inventory](https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html)
	+ [Developing `ansible-core`](https://docs.ansible.com/ansible/latest/dev_guide/developing_core.html)
	+ [Ansible module architecture](https://docs.ansible.com/ansible/latest/dev_guide/developing_program_flow_modules.html)
	+ [Python API](https://docs.ansible.com/ansible/latest/dev_guide/developing_api.html)
	+ [Rebasing a pull request](https://docs.ansible.com/ansible/latest/dev_guide/developing_rebasing.html)
	+ [Using and developing module utilities](https://docs.ansible.com/ansible/latest/dev_guide/developing_module_utilities.html)
	+ [Developing collections](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html)
	+ [Migrating Roles to Roles in Collections on Galaxy](https://docs.ansible.com/ansible/latest/dev_guide/migrating_roles.html)
	+ [Collection Galaxy metadata structure](https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html)
	+ [Migrating Roles to Roles in Collections on Galaxy](https://docs.ansible.com/ansible/latest/dev_guide/migrating_roles.html)
	+ [Ansible architecture](https://docs.ansible.com/ansible/latest/dev_guide/overview_architecture.html)

 Common Ansible Scenarios

 * [Public Cloud Guides](scenario_guides/cloud_guides)
* [Network Technology Guides](scenario_guides/network_guides)
* [Virtualization and Containerization Guides](scenario_guides/virt_guides)

 Network Automation

 * [Network Getting Started](network/getting_started/index)
	+ [Basic Concepts](network/getting_started/basic_concepts)
	+ [How Network Automation is Different](network/getting_started/network_differences)
	+ [Run Your First Command and Playbook](network/getting_started/first_playbook)
	+ [Build Your Inventory](network/getting_started/first_inventory)
	+ [Use Ansible network roles](network/getting_started/network_roles)
	+ [Beyond the basics](network/getting_started/intermediate_concepts)
	+ [Working with network connection options](network/getting_started/network_connection_options)
	+ [Resources and next steps](network/getting_started/network_resources)
* [Network Advanced Topics](network/user_guide/index)
	+ [Network Resource Modules](network/user_guide/network_resource_modules)
	+ [Ansible Network Examples](network/user_guide/network_best_practices_2.5)
	+ [Parsing semi-structured text with Ansible](network/user_guide/cli_parsing)
	+ [Network Debug and Troubleshooting Guide](network/user_guide/network_debug_troubleshooting)
	+ [Working with command output and prompts in network modules](network/user_guide/network_working_with_command_output)
	+ [Ansible Network FAQ](network/user_guide/faq)
	+ [Platform Options](network/user_guide/platform_index)
* [Network Developer Guide](network/dev_guide/index)
	+ [Developing network resource modules](network/dev_guide/developing_resource_modules_network)
	+ [Developing network plugins](network/dev_guide/developing_plugins_network)
	+ [Documenting new network platforms](network/dev_guide/documenting_modules_network)

 Ansible Galaxy

 * [Galaxy User Guide](galaxy/user_guide)
	+ [Finding collections on Galaxy](galaxy/user_guide#finding-collections-on-galaxy)
	+ [Installing collections](galaxy/user_guide#installing-collections)
	+ [Finding roles on Galaxy](galaxy/user_guide#finding-roles-on-galaxy)
	+ [Installing roles from Galaxy](galaxy/user_guide#installing-roles-from-galaxy)
* [Galaxy Developer Guide](galaxy/dev_guide)
	+ [Creating collections for Galaxy](galaxy/dev_guide#creating-collections-for-galaxy)
	+ [Creating roles for Galaxy](galaxy/dev_guide#creating-roles-for-galaxy)

 Reference & Appendices

 * [Collection Index](collections/index)
* [Indexes of all modules and plugins](https://docs.ansible.com/ansible/latest/collections/all_plugins.html)
* [Playbook Keywords](reference_appendices/playbooks_keywords)
* [Return Values](reference_appendices/common_return_values)
* [Ansible Configuration Settings](reference_appendices/config)
* [Controlling how Ansible behaves: precedence rules](reference_appendices/general_precedence)
* [YAML Syntax](reference_appendices/yamlsyntax)
* [Python 3 Support](reference_appendices/python_3_support)
* [Interpreter Discovery](reference_appendices/interpreter_discovery)
* [Releases and maintenance](reference_appendices/release_and_maintenance)
* [Testing Strategies](reference_appendices/test_strategies)
* [Sanity Tests](https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/index.html)
* [Frequently Asked Questions](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html)
* [Glossary](https://docs.ansible.com/ansible/latest/reference_appendices/glossary.html)
* [Ansible Reference: Module Utilities](reference_appendices/module_utils)
* [Special Variables](reference_appendices/special_variables)
* [Red Hat Ansible Automation Platform](https://docs.ansible.com/ansible/latest/reference_appendices/tower.html)
* [Ansible Automation Hub](reference_appendices/automationhub)
* [Logging Ansible output](reference_appendices/logging)

 Roadmaps

 * [Ansible Roadmap](https://docs.ansible.com/ansible/latest/roadmap/ansible_roadmap_index.html)
	+ [Ansible project 4.0](https://docs.ansible.com/ansible/latest/roadmap/COLLECTIONS_4.html)
	+ [Ansible project 3.0](https://docs.ansible.com/ansible/latest/roadmap/COLLECTIONS_3_0.html)
	+ [Ansible project 2.10](https://docs.ansible.com/ansible/latest/roadmap/COLLECTIONS_2_10.html)
	+ [Older Roadmaps](https://docs.ansible.com/ansible/latest/roadmap/old_roadmap_index.html)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/index.html>

Python 3 Support
================

 Ansible 2.5 and above work with Python 3. Previous to 2.5, using Python 3 was considered a tech preview. This topic discusses how to set up your controller and managed machines to use Python 3.

  Note

 On the controller we support Python 3.5 or greater and Python 2.7 or greater. Module-side, we support Python 3.5 or greater and Python 2.6 or greater.

  On the controller side
----------------------

 The easiest way to run **/usr/bin/ansible** under Python 3 is to install it with the Python3 version of pip. This will make the default **/usr/bin/ansible** run with Python3:

 
```
$ pip3 install ansible
$ ansible --version | grep "python version"
  python version = 3.6.2 (default, Sep 22 2017, 08:28:09) [GCC 7.2.1 20170915 (Red Hat 7.2.1-2)]

```
 If you are running Ansible [Running the devel branch from a clone](../installation_guide/intro_installation#from-source) and want to use Python 3 with your source checkout, run your command via `python3`. For example:

 
```
$ source ./hacking/env-setup
$ python3 $(which ansible) localhost -m ping
$ python3 $(which ansible-playbook) sample-playbook.yml

```
  Note

 Individual Linux distribution packages may be packaged for Python2 or Python3. When running from distro packages you’ll only be able to use Ansible with the Python version for which it was installed. Sometimes distros will provide a means of installing for several Python versions (via a separate package or via some commands that are run after install). You’ll need to check with your distro to see if that applies in your case.

  Using Python 3 on the managed machines with commands and playbooks
------------------------------------------------------------------

 * Ansible will automatically detect and use Python 3 on many platforms that ship with it. To explicitly configure a Python 3 interpreter, set the `ansible_python_interpreter` inventory variable at a group or host level to the location of a Python 3 interpreter, such as **/usr/bin/python3**. The default interpreter path may also be set in `ansible.cfg`.

  See also

 [Interpreter Discovery](interpreter_discovery#interpreter-discovery) for more information.

  
```
# Example inventory that makes an alias for localhost that uses Python3
localhost-py3 ansible_host=localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3

# Example of setting a group of hosts to use Python3
[py3-hosts]
ubuntu16
fedora27

[py3-hosts:vars]
ansible_python_interpreter=/usr/bin/python3

```
  See also

 [How to build your inventory](../user_guide/intro_inventory#intro-inventory) for more information.

  * Run your command or playbook:

 
```
$ ansible localhost-py3 -m ping
$ ansible-playbook sample-playbook.yml

```
 Note that you can also use the `-e` command line option to manually set the python interpreter when you run a command. This can be useful if you want to test whether a specific module or playbook has any bugs under Python 3. For example:

 
```
$ ansible localhost -m ping -e 'ansible_python_interpreter=/usr/bin/python3'
$ ansible-playbook sample-playbook.yml -e 'ansible_python_interpreter=/usr/bin/python3'

```
 What to do if an incompatibility is found
-----------------------------------------

 We have spent several releases squashing bugs and adding new tests so that Ansible’s core feature set runs under both Python 2 and Python 3. However, bugs may still exist in edge cases and many of the modules shipped with Ansible are maintained by the community and not all of those may be ported yet.

 If you find a bug running under Python 3 you can submit a bug report on [Ansible’s GitHub project](https://github.com/ansible/ansible/issues/). Be sure to mention Python3 in the bug report so that the right people look at it.

 If you would like to fix the code and submit a pull request on github, you can refer to [Ansible and Python 3](https://docs.ansible.com/ansible/latest/dev_guide/developing_python_3.html#developing-python-3) for information on how we fix common Python3 compatibility issues in the Ansible codebase.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/reference_appendices/python_3_support.html>

Controlling how Ansible behaves: precedence rules
=================================================

 To give you maximum flexibility in managing your environments, Ansible offers many ways to control how Ansible behaves: how it connects to managed nodes, how it works once it has connected. If you use Ansible to manage a large number of servers, network devices, and cloud resources, you may define Ansible behavior in several different places and pass that information to Ansible in several different ways. This flexibility is convenient, but it can backfire if you do not understand the precedence rules.

 These precedence rules apply to any setting that can be defined in multiple ways (by configuration settings, command-line options, playbook keywords, variables).

 * [Configuration settings](#configuration-settings)
* [Command-line options](#command-line-options)
* [Playbook keywords](#playbook-keywords)
* [Variables](#variables)


	+ [Variable scope: how long is a value available?](#variable-scope-how-long-is-a-value-available)
* [Using `-e` extra variables at the command line](#using-e-extra-variables-at-the-command-line)


Precedence categories
---------------------

 Ansible offers four sources for controlling its behavior. In order of precedence from lowest (most easily overridden) to highest (overrides all others), the categories are:

 * Configuration settings
* Command-line options
* Playbook keywords
* Variables

 Each category overrides any information from all lower-precedence categories. For example, a playbook keyword will override any configuration setting.

 Within each precedence category, specific rules apply. However, generally speaking, ‘last defined’ wins and overrides any previous definitions.

 ### Configuration settings

 [Configuration settings](config#ansible-configuration-settings) include both values from the `ansible.cfg` file and environment variables. Within this category, values set in configuration files have lower precedence. Ansible uses the first `ansible.cfg` file it finds, ignoring all others. Ansible searches for `ansible.cfg` in these locations in order:

 * `ANSIBLE_CONFIG` (environment variable if set)
* `ansible.cfg` (in the current directory)
* `~/.ansible.cfg` (in the home directory)
* `/etc/ansible/ansible.cfg`

 Environment variables have a higher precedence than entries in `ansible.cfg`. If you have environment variables set on your control node, they override the settings in whichever `ansible.cfg` file Ansible loads. The value of any given environment variable follows normal shell precedence: the last value defined overwrites previous values.

 ### Command-line options

 Any command-line option will override any configuration setting.

 When you type something directly at the command line, you may feel that your hand-crafted values should override all others, but Ansible does not work that way. Command-line options have low precedence - they override configuration only. They do not override playbook keywords, variables from inventory or variables from playbooks.

 You can override all other settings from all other sources in all other precedence categories at the command line by [Using -e extra variables at the command line](#general-precedence-extra-vars), but that is not a command-line option, it is a way of passing a [variable](#general-precedence-variables).

 At the command line, if you pass multiple values for a parameter that accepts only a single value, the last defined value wins. For example, this [ad hoc task](../user_guide/intro_adhoc#intro-adhoc) will connect as `carol`, not as `mike`:

 
```
ansible -u mike -m ping myhost -u carol

```
 Some parameters allow multiple values. In this case, Ansible will append all values from the hosts listed in inventory files inventory1 and inventory2:

 
```
ansible -i /path/inventory1 -i /path/inventory2 -m ping all

```
 The help for each [command-line tool](../user_guide/command_line_tools#command-line-tools) lists available options for that tool.

 ### Playbook keywords

 Any [playbook keyword](playbooks_keywords#playbook-keywords) will override any command-line option and any configuration setting.

 Within playbook keywords, precedence flows with the playbook itself; the more specific wins against the more general:

 * play (most general)
* blocks/includes/imports/roles (optional and can contain tasks and each other)
* tasks (most specific)

 A simple example:

 
```
- hosts: all
  connection: ssh
  tasks:
    - name: This task uses ssh.
      ping:

    - name: This task uses paramiko.
      connection: paramiko
      ping:

```
 In this example, the `connection` keyword is set to `ssh` at the play level. The first task inherits that value, and connects using `ssh`. The second task inherits that value, overrides it, and connects using `paramiko`. The same logic applies to blocks and roles as well. All tasks, blocks, and roles within a play inherit play-level keywords; any task, block, or role can override any keyword by defining a different value for that keyword within the task, block, or role.

 Remember that these are KEYWORDS, not variables. Both playbooks and variable files are defined in YAML but they have different significance. Playbooks are the command or ‘state description’ structure for Ansible, variables are data we use to help make playbooks more dynamic.

 ### Variables

 Any variable will override any playbook keyword, any command-line option, and any configuration setting.

 Variables that have equivalent playbook keywords, command-line options, and configuration settings are known as [Connection variables](special_variables#connection-variables). Originally designed for connection parameters, this category has expanded to include other core variables like the temporary directory and the python interpreter.

 Connection variables, like all variables, can be set in multiple ways and places. You can define variables for hosts and groups in [inventory](../user_guide/intro_inventory#intro-inventory). You can define variables for tasks and plays in `vars:` blocks in [playbooks](../user_guide/playbooks_intro#about-playbooks). However, they are still variables - they are data, not keywords or configuration settings. Variables that override playbook keywords, command-line options, and configuration settings follow the same rules of [variable precedence](../user_guide/playbooks_variables#ansible-variable-precedence) as any other variables.

 When set in a playbook, variables follow the same inheritance rules as playbook keywords. You can set a value for the play, then override it in a task, block, or role:

 
```
- hosts: cloud
  gather_facts: false
  become: yes
  vars:
    ansible_become_user: admin
  tasks:
    - name: This task uses admin as the become user.
      dnf:
        name: some-service
        state: latest
    - block:
        - name: This task uses service-admin as the become user.
          # a task to configure the new service
        - name: This task also uses service-admin as the become user, defined in the block.
          # second task to configure the service
      vars:
        ansible_become_user: service-admin
    - name: This task (outside of the block) uses admin as the become user again.
      service:
        name: some-service
        state: restarted

```
 #### Variable scope: how long is a value available?

 Variable values set in a playbook exist only within the playbook object that defines them. These ‘playbook object scope’ variables are not available to subsequent objects, including other plays.

 Variable values associated directly with a host or group, including variables defined in inventory, by vars plugins, or using modules like [set\_fact](../collections/ansible/builtin/set_fact_module#set-fact-module) and [include\_vars](../collections/ansible/builtin/include_vars_module#include-vars-module), are available to all plays. These ‘host scope’ variables are also available via the `hostvars[]` dictionary.

 ### Using `-e` extra variables at the command line

 To override all other settings in all other categories, you can use extra variables: `--extra-vars` or `-e` at the command line. Values passed with `-e` are variables, not command-line options, and they will override configuration settings, command-line options, and playbook keywords as well as variables set elsewhere. For example, this task will connect as `brian` not as `carol`:

 
```
ansible -u carol -e 'ansible_user=brian' -a whoami all

```
 You must specify both the variable name and the value with `--extra-vars`.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/reference_appendices/general_precedence.html>

Galaxy Developer Guide
======================

 You can host collections and roles on Galaxy to share with the Ansible community. Galaxy content is formatted in pre-packaged units of work such as [roles](../user_guide/playbooks_reuse_roles#playbooks-reuse-roles), and new in Galaxy 3.2, [collections](../user_guide/collections_using#collections). You can create roles for provisioning infrastructure, deploying applications, and all of the tasks you do everyday. Taking this a step further, you can create collections which provide a comprehensive package of automation that may include multiple playbooks, roles, modules, and plugins.

 * [Creating collections for Galaxy](#creating-collections-for-galaxy)
* [Creating roles for Galaxy](#creating-roles-for-galaxy)


	+ [Force](#force)
	+ [Container enabled](#container-enabled)
	+ [Using a custom role skeleton](#using-a-custom-role-skeleton)
	+ [Authenticate with Galaxy](#authenticate-with-galaxy)
	+ [Import a role](#import-a-role)
	+ [Delete a role](#delete-a-role)
	+ [Travis integrations](#travis-integrations)

 Creating collections for Galaxy
-------------------------------

 Collections are a distribution format for Ansible content. You can use collections to package and distribute playbooks, roles, modules, and plugins. You can publish and use collections through [Ansible Galaxy](https://galaxy.ansible.com).

 See [Developing collections](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html#developing-collections) for details on how to create collections.

 Creating roles for Galaxy
-------------------------

 Use the `init` command to initialize the base structure of a new role, saving time on creating the various directories and main.yml files a role requires

 
```
$ ansible-galaxy init role_name

```
 The above will create the following directory structure in the current working directory:

 
```
role_name/
    README.md
    .travis.yml
    defaults/
        main.yml
    files/
    handlers/
        main.yml
    meta/
        main.yml
    templates/
    tests/
        inventory
        test.yml
    vars/
        main.yml

```
 If you want to create a repository for the role the repository root should be `role_name`.

 ### Force

 If a directory matching the name of the role already exists in the current working directory, the init command will result in an error. To ignore the error use the `--force` option. Force will create the above subdirectories and files, replacing anything that matches.

 ### Container enabled

 If you are creating a Container Enabled role, pass `--type container` to `ansible-galaxy init`. This will create the same directory structure as above, but populate it with default files appropriate for a Container Enabled role. For instance, the README.md has a slightly different structure, the *.travis.yml* file tests the role using [Ansible Container](https://github.com/ansible/ansible-container), and the meta directory includes a *container.yml* file.

 ### Using a custom role skeleton

 A custom role skeleton directory can be supplied as follows:

 
```
$ ansible-galaxy init --role-skeleton=/path/to/skeleton role_name

```
 When a skeleton is provided, init will:

 * copy all files and directories from the skeleton to the new role
* any .j2 files found outside of a templates folder will be rendered as templates. The only useful variable at the moment is role\_name
* The .git folder and any .git\_keep files will not be copied

 Alternatively, the role\_skeleton and ignoring of files can be configured via ansible.cfg

 
```
[galaxy]
role_skeleton = /path/to/skeleton
role_skeleton_ignore = ^.git$,^.*/.git_keep$

```
 ### Authenticate with Galaxy

 Using the `import`, `delete` and `setup` commands to manage your roles on the Galaxy website requires authentication, and the `login` command can be used to do just that. Before you can use the `login` command, you must create an account on the Galaxy website.

 The `login` command requires using your GitHub credentials. You can use your username and password, or you can create a [personal access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/). If you choose to create a token, grant minimal access to the token, as it is used just to verify identify.

 The following shows authenticating with the Galaxy website using a GitHub username and password:

 
```
$ ansible-galaxy login

We need your GitHub login to identify you.
This information will not be sent to Galaxy, only to api.github.com.
The password will not be displayed.

Use --github-token if you do not want to enter your password.

GitHub Username: dsmith
Password for dsmith:
Successfully logged into Galaxy as dsmith

```
 When you choose to use your username and password, your password is not sent to Galaxy. It is used to authenticates with GitHub and create a personal access token. It then sends the token to Galaxy, which in turn verifies that your identity and returns a Galaxy access token. After authentication completes the GitHub token is destroyed.

 If you do not want to use your GitHub password, or if you have two-factor authentication enabled with GitHub, use the `--github-token` option to pass a personal access token that you create.

 ### Import a role

 The `import` command requires that you first authenticate using the `login` command. Once authenticated you can import any GitHub repository that you own or have been granted access.

 Use the following to import to role:

 
```
$ ansible-galaxy import github_user github_repo

```
 By default the command will wait for Galaxy to complete the import process, displaying the results as the import progresses:

 
```
Successfully submitted import request 41
Starting import 41: role_name=myrole repo=githubuser/ansible-role-repo ref=
Retrieving GitHub repo githubuser/ansible-role-repo
Accessing branch: devel
Parsing and validating meta/main.yml
Parsing galaxy_tags
Parsing platforms
Adding dependencies
Parsing and validating README.md
Adding repo tags as role versions
Import completed
Status SUCCESS : warnings=0 errors=0

```
 #### Branch

 Use the `--branch` option to import a specific branch. If not specified, the default branch for the repo will be used.

 #### Role name

 By default the name given to the role will be derived from the GitHub repository name. However, you can use the `--role-name` option to override this and set the name.

 #### No wait

 If the `--no-wait` option is present, the command will not wait for results. Results of the most recent import for any of your roles is available on the Galaxy web site by visiting *My Imports*.

 ### Delete a role

 The `delete` command requires that you first authenticate using the `login` command. Once authenticated you can remove a role from the Galaxy web site. You are only allowed to remove roles where you have access to the repository in GitHub.

 Use the following to delete a role:

 
```
$ ansible-galaxy delete github_user github_repo

```
 This only removes the role from Galaxy. It does not remove or alter the actual GitHub repository.

 ### Travis integrations

 You can create an integration or connection between a role in Galaxy and [Travis](https://travis-ci.org). Once the connection is established, a build in Travis will automatically trigger an import in Galaxy, updating the search index with the latest information about the role.

 You create the integration using the `setup` command, but before an integration can be created, you must first authenticate using the `login` command; you will also need an account in Travis, and your Travis token. Once you’re ready, use the following command to create the integration:

 
```
$ ansible-galaxy setup travis github_user github_repo xxx-travis-token-xxx

```
 The setup command requires your Travis token, however the token is not stored in Galaxy. It is used along with the GitHub username and repo to create a hash as described in [the Travis documentation](https://docs.travis-ci.com/user/notifications/). The hash is stored in Galaxy and used to verify notifications received from Travis.

 The setup command enables Galaxy to respond to notifications. To configure Travis to run a build on your repository and send a notification, follow the [Travis getting started guide](https://docs.travis-ci.com/user/getting-started/).

 To instruct Travis to notify Galaxy when a build completes, add the following to your .travis.yml file:

 
```
notifications:
    webhooks: https://galaxy.ansible.com/api/v1/notifications/

```
 #### List Travis integrations

 Use the `--list` option to display your Travis integrations:

 
```
$ ansible-galaxy setup --list


ID         Source     Repo
---------- ---------- ----------
2          travis     github_user/github_repo
1          travis     github_user/github_repo

```
 #### Remove Travis integrations

 Use the `--remove` option to disable and remove a Travis integration:

 
```
$ ansible-galaxy setup --remove ID

```
 Provide the ID of the integration to be disabled. You can find the ID by using the `--list` option.

  See also

  [Using collections](../user_guide/collections_using#collections)

Shareable collections of modules, playbooks and roles

  [Roles](../user_guide/playbooks_reuse_roles#playbooks-reuse-roles)

All about ansible roles

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/galaxy/dev_guide.html>

Ansible Porting Guides
======================

 Ansible Porting Guides are maintained in the `devel` branch only. Please go to [the devel Ansible Porting guides](https://docs.ansible.com/ansible/devel/porting_guides/porting_guides.html) for up to date information.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/porting_guides/porting_guides.html>

Network Advanced Topics
=======================

 Once you have mastered the basics of network automation with Ansible, as presented in [Network Getting Started](../getting_started/index#network-getting-started), use this guide understand platform-specific details, optimization, and troubleshooting tips for Ansible for network automation.

 **Who should use this guide?**

 This guide is intended for network engineers using Ansible for automation. It covers advanced topics. If you understand networks and Ansible, this guide is for you. You may read through the entire guide if you choose, or use the links below to find the specific information you need.

 If you’re new to Ansible, or new to using Ansible for network automation, start with the [Network Getting Started](../getting_started/index#network-getting-started).

 Advanced Topics

 * [Network Resource Modules](network_resource_modules)
	+ [Network resource module states](network_resource_modules#network-resource-module-states)
	+ [Using network resource modules](network_resource_modules#using-network-resource-modules)
	+ [Example: Verifying the network device configuration has not changed](network_resource_modules#example-verifying-the-network-device-configuration-has-not-changed)
	+ [Example: Acquiring and updating VLANs on a network device](network_resource_modules#example-acquiring-and-updating-vlans-on-a-network-device)
* [Ansible Network Examples](network_best_practices_2.5)
	+ [Prerequisites](network_best_practices_2.5#prerequisites)
	+ [Groups and variables in an inventory file](network_best_practices_2.5#groups-and-variables-in-an-inventory-file)
	+ [Example 1: collecting facts and creating backup files with a playbook](network_best_practices_2.5#example-1-collecting-facts-and-creating-backup-files-with-a-playbook)
	+ [Example 2: simplifying playbooks with network agnostic modules](network_best_practices_2.5#example-2-simplifying-playbooks-with-network-agnostic-modules)
	+ [Implementation Notes](network_best_practices_2.5#implementation-notes)
	+ [Troubleshooting](network_best_practices_2.5#troubleshooting)
* [Parsing semi-structured text with Ansible](cli_parsing)
	+ [Understanding the CLI parser](cli_parsing#understanding-the-cli-parser)
	+ [Parsing the CLI](cli_parsing#parsing-the-cli)
	+ [Advanced use cases](cli_parsing#advanced-use-cases)
* [Network Debug and Troubleshooting Guide](network_debug_troubleshooting)
	+ [How to troubleshoot](network_debug_troubleshooting#how-to-troubleshoot)
	+ [Troubleshooting socket path issues](network_debug_troubleshooting#troubleshooting-socket-path-issues)
	+ [Category “Unable to open shell”](network_debug_troubleshooting#category-unable-to-open-shell)
	+ [Timeout issues](network_debug_troubleshooting#timeout-issues)
	+ [Playbook issues](network_debug_troubleshooting#playbook-issues)
	+ [Proxy Issues](network_debug_troubleshooting#proxy-issues)
	+ [Miscellaneous Issues](network_debug_troubleshooting#miscellaneous-issues)
* [Working with command output and prompts in network modules](network_working_with_command_output)
	+ [Conditionals in networking modules](network_working_with_command_output#conditionals-in-networking-modules)
	+ [Handling prompts in network modules](network_working_with_command_output#handling-prompts-in-network-modules)
* [Ansible Network FAQ](faq)
	+ [How can I improve performance for network playbooks?](faq#how-can-i-improve-performance-for-network-playbooks)
	+ [Why is my output sometimes replaced with `********`?](faq#why-is-my-output-sometimes-replaced-with)
	+ [Why do the `*_config` modules always return `changed=true` with abbreviated commands?](faq#why-do-the-config-modules-always-return-changed-true-with-abbreviated-commands)
* [Platform Options](platform_index)
	+ [CloudEngine OS Platform Options](platform_ce)
	+ [CNOS Platform Options](platform_cnos)
	+ [Dell OS6 Platform Options](platform_dellos6)
	+ [Dell OS9 Platform Options](platform_dellos9)
	+ [Dell OS10 Platform Options](platform_dellos10)
	+ [ENOS Platform Options](platform_enos)
	+ [EOS Platform Options](platform_eos)
	+ [ERIC\_ECCLI Platform Options](platform_eric_eccli)
	+ [EXOS Platform Options](platform_exos)
	+ [FRR Platform Options](platform_frr)
	+ [ICX Platform Options](platform_icx)
	+ [IOS Platform Options](platform_ios)
	+ [IOS-XR Platform Options](platform_iosxr)
	+ [IronWare Platform Options](platform_ironware)
	+ [Junos OS Platform Options](platform_junos)
	+ [Meraki Platform Options](platform_meraki)
	+ [Pluribus NETVISOR Platform Options](platform_netvisor)
	+ [NOS Platform Options](platform_nos)
	+ [NXOS Platform Options](platform_nxos)
	+ [RouterOS Platform Options](platform_routeros)
	+ [SLX-OS Platform Options](platform_slxos)
	+ [VOSS Platform Options](platform_voss)
	+ [VyOS Platform Options](platform_vyos)
	+ [WeOS 4 Platform Options](platform_weos4)
	+ [Netconf enabled Platform Options](platform_netconf_enabled)
	+ [Settings by Platform](platform_index#settings-by-platform)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/index.html>

Public Cloud Guides
===================

 The guides in this section cover using Ansible with a range of public cloud platforms. They explore particular use cases in greater depth and provide a more “top-down” explanation of some basic features.

 * [Alibaba Cloud Compute Services Guide](guide_alicloud)
* [Amazon Web Services Guide](guide_aws)
* [CloudStack Cloud Guide](guide_cloudstack)
* [Google Cloud Platform Guide](guide_gce)
* [Microsoft Azure Guide](guide_azure)
* [Online.net Guide](guide_online)
* [Oracle Cloud Infrastructure Guide](guide_oracle)
* [Packet.net Guide](guide_packet)
* [Rackspace Cloud Guide](guide_rax)
* [Scaleway Guide](guide_scaleway)
* [Vultr Guide](guide_vultr)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/cloud_guides.html>

Galaxy User Guide
=================

 *Ansible Galaxy* refers to the [Galaxy](https://galaxy.ansible.com) website, a free site for finding, downloading, and sharing community developed roles.

 Use Galaxy to jump-start your automation project with great content from the Ansible community. Galaxy provides pre-packaged units of work such as [roles](../user_guide/playbooks_reuse_roles#playbooks-reuse-roles), and new in Galaxy 3.2, [collections](../user_guide/collections_using#collections) You can find roles for provisioning infrastructure, deploying applications, and all of the tasks you do everyday. The collection format provides a comprehensive package of automation that may include multiple playbooks, roles, modules, and plugins.

 * [Finding collections on Galaxy](#finding-collections-on-galaxy)
* [Installing collections](#installing-collections)


	+ [Installing a collection from Galaxy](#installing-a-collection-from-galaxy)
	+ [Downloading a collection from Automation Hub](#downloading-a-collection-from-automation-hub)
	+ [Installing an older version of a collection](#installing-an-older-version-of-a-collection)
	+ [Install multiple collections with a requirements file](#install-multiple-collections-with-a-requirements-file)
	+ [Downloading a collection for offline use](#downloading-a-collection-for-offline-use)
	+ [Installing a collection from a git repository](#installing-a-collection-from-a-git-repository)
	+ [Listing installed collections](#listing-installed-collections)
	+ [Configuring the `ansible-galaxy` client](#configuring-the-ansible-galaxy-client)
* [Finding roles on Galaxy](#finding-roles-on-galaxy)


	+ [Get more information about a role](#get-more-information-about-a-role)
* [Installing roles from Galaxy](#installing-roles-from-galaxy)


	+ [Installing roles](#installing-roles)
	+ [Installing a specific version of a role](#installing-a-specific-version-of-a-role)
	+ [Installing multiple roles from a file](#installing-multiple-roles-from-a-file)
	+ [Installing roles and collections from the same requirements.yml file](#installing-roles-and-collections-from-the-same-requirements-yml-file)
	+ [Installing multiple roles from multiple files](#installing-multiple-roles-from-multiple-files)
	+ [Dependencies](#dependencies)
	+ [List installed roles](#list-installed-roles)
	+ [Remove an installed role](#remove-an-installed-role)

 Finding collections on Galaxy
-----------------------------

 To find collections on Galaxy:

 1. Click the Search icon in the left-hand navigation.
2. Set the filter to *collection*.
3. Set other filters and press enter.

 Galaxy presents a list of collections that match your search criteria.

 Installing collections
----------------------

 ### Installing a collection from Galaxy

 By default, `ansible-galaxy collection install` uses <https://galaxy.ansible.com> as the Galaxy server (as listed in the `ansible.cfg` file under [GALAXY\_SERVER](../reference_appendices/config#galaxy-server)). You do not need any further configuration.

 See [Configuring the ansible-galaxy client](../user_guide/collections_using#galaxy-server-config) if you are using any other Galaxy server, such as Red Hat Automation Hub.

 To install a collection hosted in Galaxy:

 
```
ansible-galaxy collection install my_namespace.my_collection

```
 To upgrade a collection to the latest available version from the Galaxy server you can use the `--upgrade` option:

 
```
ansible-galaxy collection install my_namespace.my_collection --upgrade

```
 You can also directly use the tarball from your build:

 
```
ansible-galaxy collection install my_namespace-my_collection-1.0.0.tar.gz -p ./collections

```
 You can build and install a collection from a local source directory. The `ansible-galaxy` utility builds the collection using the `MANIFEST.json` or `galaxy.yml` metadata in the directory.

 
```
ansible-galaxy collection install /path/to/collection -p ./collections

```
 You can also install multiple collections in a namespace directory.

 
```
ns/
├── collection1/
│   ├── MANIFEST.json
│   └── plugins/
└── collection2/
    ├── galaxy.yml
    └── plugins/

```
 
```
ansible-galaxy collection install /path/to/ns -p ./collections

```
  Note

 The install command automatically appends the path `ansible_collections` to the one specified with the `-p` option unless the parent directory is already in a folder called `ansible_collections`.

  When using the `-p` option to specify the install path, use one of the values configured in [COLLECTIONS\_PATHS](../reference_appendices/config#collections-paths), as this is where Ansible itself will expect to find collections. If you don’t specify a path, `ansible-galaxy collection install` installs the collection to the first path defined in [COLLECTIONS\_PATHS](../reference_appendices/config#collections-paths), which by default is `~/.ansible/collections`

 You can also keep a collection adjacent to the current playbook, under a `collections/ansible_collections/` directory structure.

 
```
./
├── play.yml
├── collections/
│   └── ansible_collections/
│               └── my_namespace/
│                   └── my_collection/<collection structure lives here>

```
 See [Collection structure](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections_structure.html#collection-structure) for details on the collection directory structure.

 ### Downloading a collection from Automation Hub

 You can download collections from Automation Hub at the command line. Automation Hub content is available to subscribers only, so you must download an API token and configure your local environment to provide it before you can you download collections. To download a collection from Automation Hub with the `ansible-galaxy` command:

 1. Get your Automation Hub API token. Go to <https://cloud.redhat.com/ansible/automation-hub/token/> and click Get API token from the version dropdown to copy your API token.
2. Configure Red Hat Automation Hub server in the `server_list` option under the `[galaxy]` section in your `ansible.cfg` file.

 
```
[galaxy]
server_list = automation_hub

[galaxy_server.automation_hub]
url=https://cloud.redhat.com/api/automation-hub/
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
token=my_ah_token

```
 3. Download the collection hosted in Automation Hub.

 
```
ansible-galaxy collection install my_namespace.my_collection

```
  See also

  [Getting started with Automation Hub](https://www.ansible.com/blog/getting-started-with-ansible-hub)

An introduction to Automation Hub

    ### Installing an older version of a collection

 You can only have one version of a collection installed at a time. By default `ansible-galaxy` installs the latest available version. If you want to install a specific version, you can add a version range identifier. For example, to install the 1.0.0-beta.1 version of the collection:

 
```
ansible-galaxy collection install my_namespace.my_collection:==1.0.0-beta.1

```
 You can specify multiple range identifiers separated by `,`. Use single quotes so the shell passes the entire command, including `>`, `!`, and other operators, along. For example, to install the most recent version that is greater than or equal to 1.0.0 and less than 2.0.0:

 
```
ansible-galaxy collection install 'my_namespace.my_collection:>=1.0.0,<2.0.0'

```
 Ansible will always install the most recent version that meets the range identifiers you specify. You can use the following range identifiers:

 * `*`: The most recent version. This is the default.
* `!=`: Not equal to the version specified.
* `==`: Exactly the version specified.
* `>=`: Greater than or equal to the version specified.
* `>`: Greater than the version specified.
* `<=`: Less than or equal to the version specified.
* `<`: Less than the version specified.

  Note

 By default `ansible-galaxy` ignores pre-release versions. To install a pre-release version, you must use the `==` range identifier to require it explicitly.

  ### Install multiple collections with a requirements file

 You can set up a `requirements.yml` file to install multiple collections in one command. This file is a YAML file in the format:

 
```
---
collections:
# With just the collection name
- my_namespace.my_collection

# With the collection name, version, and source options
- name: my_namespace.my_other_collection
  version: 'version range identifiers (default: ``*``)'
  source: 'The Galaxy URL to pull the collection from (default: ``--api-server`` from cmdline)'

```
 You can specify four keys for each collection entry:

 * `name`
* `version`
* `source`
* `type`

 The `version` key uses the same range identifier format documented in [Installing an older version of a collection](../user_guide/collections_using#collections-older-version).

 The `type` key can be set to `galaxy`, `url`, `file`, and `git`. If `type` is omitted, the `name` key is used to implicitly determine the source of the collection.

 When you install a collection with `type: git`, the `version` key can refer to a branch or to a [git commit-ish](https://git-scm.com/docs/gitglossary#def_commit-ish) object (commit or tag). For example:

 
```
collections:
  - name: https://github.com/organization/repo_name.git
    type: git
    version: devel

```
 You can also add roles to a `requirements.yml` file, under the `roles` key. The values follow the same format as a requirements file used in older Ansible releases.

 
```
---
roles:
  # Install a role from Ansible Galaxy.
  - name: geerlingguy.java
    version: 1.9.6

collections:
  # Install a collection from Ansible Galaxy.
  - name: geerlingguy.php_roles
    version: 0.9.3
    source: https://galaxy.ansible.com

```
 To install both roles and collections at the same time with one command, run the following:

 
```
$ ansible-galaxy install -r requirements.yml

```
 Running `ansible-galaxy collection install -r` or `ansible-galaxy role install -r` will only install collections, or roles respectively.

  Note

 Installing both roles and collections from the same requirements file will not work when specifying a custom collection or role install path. In this scenario the collections will be skipped and the command will process each like `ansible-galaxy role install` would.

  ### Downloading a collection for offline use

 To download the collection tarball from Galaxy for offline use:

 1. Navigate to the collection page.
2. Click on Download tarball.

 You may also need to manually download any dependent collections.

 ### Installing a collection from a git repository

 You can install a collection from a git repository instead of from Galaxy or Automation Hub. As a developer, installing from a git repository lets you review your collection before you create the tarball and publish the collection. As a user, installing from a git repository lets you use collections or versions that are not in Galaxy or Automation Hub yet.

 The repository must contain a `galaxy.yml` or `MANIFEST.json` file. This file provides metadata such as the version number and namespace of the collection.

 #### Installing a collection from a git repository at the command line

 To install a collection from a git repository at the command line, use the URI of the repository instead of a collection name or path to a `tar.gz` file. Prefix the URI with `git+` (or with `git@` to use a private repository with ssh authentication). You can specify a branch, commit, or tag using the comma-separated [git commit-ish](https://git-scm.com/docs/gitglossary#def_commit-ish) syntax.

 For example:

 
```
# Install a collection in a repository using the latest commit on the branch 'devel'
ansible-galaxy collection install git+https://github.com/organization/repo_name.git,devel

# Install a collection from a private github repository
ansible-galaxy collection install git@github.com:organization/repo_name.git

# Install a collection from a local git repository
ansible-galaxy collection install git+file:///home/user/path/to/repo_name.git

```
  Warning

 Embedding credentials into a git URI is not secure. Use safe authentication options to prevent your credentials from being exposed in logs or elsewhere.

 * Use [SSH](https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh) authentication
* Use [netrc](https://linux.die.net/man/5/netrc) authentication
* Use [http.extraHeader](https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpextraHeader) in your git configuration
* Use [url.<base>.pushInsteadOf](https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtpushInsteadOf) in your git configuration

  #### Specifying the collection location within the git repository

 When you install a collection from a git repository, Ansible uses the collection `galaxy.yml` or `MANIFEST.json` metadata file to build the collection. By default, Ansible searches two paths for collection `galaxy.yml` or `MANIFEST.json` metadata files:

 * The top level of the repository.
* Each directory in the repository path (one level deep).

 If a `galaxy.yml` or `MANIFEST.json` file exists in the top level of the repository, Ansible uses the collection metadata in that file to install an individual collection.

 
```
├── galaxy.yml
├── plugins/
│   ├── lookup/
│   ├── modules/
│   └── module_utils/
└─── README.md

```
 If a `galaxy.yml` or `MANIFEST.json` file exists in one or more directories in the repository path (one level deep), Ansible installs each directory with a metadata file as a collection. For example, Ansible installs both collection1 and collection2 from this repository structure by default:

 
```
├── collection1
│   ├── docs/
│   ├── galaxy.yml
│   └── plugins/
│       ├── inventory/
│       └── modules/
└── collection2
    ├── docs/
    ├── galaxy.yml
    ├── plugins/
    |   ├── filter/
    |   └── modules/
    └── roles/

```
 If you have a different repository structure or only want to install a subset of collections, you can add a fragment to the end of your URI (before the optional comma-separated version) to indicate the location of the metadata file or files. The path should be a directory, not the metadata file itself. For example, to install only collection2 from the example repository with two collections:

 
```
ansible-galaxy collection install git+https://github.com/organization/repo_name.git#/collection2/

```
 In some repositories, the main directory corresponds to the namespace:

 
```
namespace/
├── collectionA/
|   ├── docs/
|   ├── galaxy.yml
|   ├── plugins/
|   │   ├── README.md
|   │   └── modules/
|   ├── README.md
|   └── roles/
└── collectionB/
    ├── docs/
    ├── galaxy.yml
    ├── plugins/
    │   ├── connection/
    │   └── modules/
    ├── README.md
    └── roles/

```
 You can install all collections in this repository, or install one collection from a specific commit:

 
```
# Install all collections in the namespace
ansible-galaxy collection install git+https://github.com/organization/repo_name.git#/namespace/

# Install an individual collection using a specific commit
ansible-galaxy collection install git+https://github.com/organization/repo_name.git#/namespace/collectionA/,7b60ddc245bc416b72d8ea6ed7b799885110f5e5

```
 ### Listing installed collections

 To list installed collections, run `ansible-galaxy collection list`. See [Listing collections](../user_guide/collections_using#collections-listing) for more details.

 ### Configuring the `ansible-galaxy` client

 By default, `ansible-galaxy` uses <https://galaxy.ansible.com> as the Galaxy server (as listed in the `ansible.cfg` file under [GALAXY\_SERVER](../reference_appendices/config#galaxy-server)).

 You can use either option below to configure `ansible-galaxy collection` to use other servers (such as Red Hat Automation Hub or a custom Galaxy server):

 * Set the server list in the [GALAXY\_SERVER\_LIST](../reference_appendices/config#galaxy-server-list) configuration option in [The configuration file](../reference_appendices/config#ansible-configuration-settings-locations).
* Use the `--server` command line argument to limit to an individual server.

 To configure a Galaxy server list in `ansible.cfg`:

 1. Add the `server_list` option under the `[galaxy]` section to one or more server names.
2. Create a new section for each server name.
3. Set the `url` option for each server name.
4. Optionally, set the API token for each server name. Go to <https://galaxy.ansible.com/me/preferences> and click Show API key.

  Note

 The `url` option for each server name must end with a forward slash `/`. If you do not set the API token in your Galaxy server list, use the `--api-key` argument to pass in the token to the `ansible-galaxy collection publish` command.

  For Automation Hub, you additionally need to:

 1. Set the `auth_url` option for each server name.
2. Set the API token for each server name. Go to <https://cloud.redhat.com/ansible/automation-hub/token/> and click :Get API token from the version dropdown to copy your API token.

 The following example shows how to configure multiple servers:

 
```
[galaxy]
server_list = automation_hub, my_org_hub, release_galaxy, test_galaxy

[galaxy_server.automation_hub]
url=https://cloud.redhat.com/api/automation-hub/
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
token=my_ah_token

[galaxy_server.my_org_hub]
url=https://automation.my_org/
username=my_user
password=my_pass

[galaxy_server.release_galaxy]
url=https://galaxy.ansible.com/
token=my_token

[galaxy_server.test_galaxy]
url=https://galaxy-dev.ansible.com/
token=my_test_token

```
  Note

 You can use the `--server` command line argument to select an explicit Galaxy server in the `server_list` and the value of this argument should match the name of the server. To use a server not in the server list, set the value to the URL to access that server (all servers in the server list will be ignored). Also you cannot use the `--api-key` argument for any of the predefined servers. You can only use the `api_key` argument if you did not define a server list or if you specify a URL in the `--server` argument.

  **Galaxy server list configuration options**

 The [GALAXY\_SERVER\_LIST](../reference_appendices/config#galaxy-server-list) option is a list of server identifiers in a prioritized order. When searching for a collection, the install process will search in that order, for example, `automation_hub` first, then `my_org_hub`, `release_galaxy`, and finally `test_galaxy` until the collection is found. The actual Galaxy instance is then defined under the section `[galaxy_server.{{ id }}]` where `{{ id }}` is the server identifier defined in the list. This section can then define the following keys:

 * `url`: The URL of the Galaxy instance to connect to. Required.
* `token`: An API token key to use for authentication against the Galaxy instance. Mutually exclusive with `username`.
* `username`: The username to use for basic authentication against the Galaxy instance. Mutually exclusive with `token`.
* `password`: The password to use, in conjunction with `username`, for basic authentication.
* `auth_url`: The URL of a Keycloak server ‘token\_endpoint’ if using SSO authentication (for example, Automation Hub). Mutually exclusive with `username`. Requires `token`.

 As well as defining these server options in the `ansible.cfg` file, you can also define them as environment variables. The environment variable is in the form `ANSIBLE_GALAXY_SERVER_{{ id }}_{{ key }}` where `{{ id }}` is the upper case form of the server identifier and `{{ key }}` is the key to define. For example I can define `token` for `release_galaxy` by setting `ANSIBLE_GALAXY_SERVER_RELEASE_GALAXY_TOKEN=secret_token`.

 For operations that use only one Galaxy server (for example, the `publish`, `info`, or `install` commands). the `ansible-galaxy collection` command uses the first entry in the `server_list`, unless you pass in an explicit server with the `--server` argument.

  Note

 Once a collection is found, any of its requirements are only searched within the same Galaxy instance as the parent collection. The install process will not search for a collection requirement in a different Galaxy instance.

  Finding roles on Galaxy
-----------------------

 Search the Galaxy database by tags, platforms, author and multiple keywords. For example:

 
```
$ ansible-galaxy search elasticsearch --author geerlingguy

```
 The search command will return a list of the first 1000 results matching your search:

 
```
Found 2 roles matching your search:

Name                              Description
----                              -----------
geerlingguy.elasticsearch         Elasticsearch for Linux.
geerlingguy.elasticsearch-curator Elasticsearch curator for Linux.

```
 ### Get more information about a role

 Use the `info` command to view more detail about a specific role:

 
```
$ ansible-galaxy info username.role_name

```
 This returns everything found in Galaxy for the role:

 
```
Role: username.role_name
    description: Installs and configures a thing, a distributed, highly available NoSQL thing.
    active: True
    commit: c01947b7bc89ebc0b8a2e298b87ab416aed9dd57
    commit_message: Adding travis
    commit_url: https://github.com/username/repo_name/commit/c01947b7bc89ebc0b8a2e298b87ab
    company: My Company, Inc.
    created: 2015-12-08T14:17:52.773Z
    download_count: 1
    forks_count: 0
    github_branch:
    github_repo: repo_name
    github_user: username
    id: 6381
    is_valid: True
    issue_tracker_url:
    license: Apache
    min_ansible_version: 1.4
    modified: 2015-12-08T18:43:49.085Z
    namespace: username
    open_issues_count: 0
    path: /Users/username/projects/roles
    scm: None
    src: username.repo_name
    stargazers_count: 0
    travis_status_url: https://travis-ci.org/username/repo_name.svg?branch=main
    version:
    watchers_count: 1

```
 Installing roles from Galaxy
----------------------------

 The `ansible-galaxy` command comes bundled with Ansible, and you can use it to install roles from Galaxy or directly from a git based SCM. You can also use it to create a new role, remove roles, or perform tasks on the Galaxy website.

 The command line tool by default communicates with the Galaxy website API using the server address *https://galaxy.ansible.com*. If you run your own internal Galaxy server and want to use it instead of the default one, pass the `--server` option following the address of this galaxy server. You can set permanently this option by setting the Galaxy server value in your `ansible.cfg` file to use it . For information on setting the value in *ansible.cfg* see [GALAXY\_SERVER](../reference_appendices/config#galaxy-server).

 ### Installing roles

 Use the `ansible-galaxy` command to download roles from the [Galaxy website](https://galaxy.ansible.com)

 
```
$ ansible-galaxy install namespace.role_name

```
 #### Setting where to install roles

 By default, Ansible downloads roles to the first writable directory in the default list of paths `~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles`. This installs roles in the home directory of the user running `ansible-galaxy`.

 You can override this with one of the following options:

 * Set the environment variable [`ANSIBLE_ROLES_PATH`](../reference_appendices/config#envvar-ANSIBLE_ROLES_PATH) in your session.
* Use the `--roles-path` option for the `ansible-galaxy` command.
* Define `roles_path` in an `ansible.cfg` file.

 The following provides an example of using `--roles-path` to install the role into the current working directory:

 
```
$ ansible-galaxy install --roles-path . geerlingguy.apache

```
  See also

  [Configuring Ansible](../installation_guide/intro_configuration#intro-configuration)

All about configuration files

    ### Installing a specific version of a role

 When the Galaxy server imports a role, it imports any git tags matching the [Semantic Version](https://semver.org/) format as versions. In turn, you can download a specific version of a role by specifying one of the imported tags.

 To see the available versions for a role:

 1. Locate the role on the Galaxy search page.
2. Click on the name to view more details, including the available versions.

 You can also navigate directly to the role using the /<namespace>/<role name>. For example, to view the role geerlingguy.apache, go to <https://galaxy.ansible.com/geerlingguy/apache>.

 To install a specific version of a role from Galaxy, append a comma and the value of a GitHub release tag. For example:

 
```
$ ansible-galaxy install geerlingguy.apache,1.0.0

```
 It is also possible to point directly to the git repository and specify a branch name or commit hash as the version. For example, the following will install a specific commit:

 
```
$ ansible-galaxy install git+https://github.com/geerlingguy/ansible-role-apache.git,0b7cd353c0250e87a26e0499e59e7fd265cc2f25

```
 ### Installing multiple roles from a file

 You can install multiple roles by including the roles in a `requirements.yml` file. The format of the file is YAML, and the file extension must be either *.yml* or *.yaml*.

 Use the following command to install roles included in `requirements.yml:`

 
```
$ ansible-galaxy install -r requirements.yml

```
 Again, the extension is important. If the *.yml* extension is left off, the `ansible-galaxy` CLI assumes the file is in an older, now deprecated, “basic” format.

 Each role in the file will have one or more of the following attributes:

  src

The source of the role. Use the format *namespace.role\_name*, if downloading from Galaxy; otherwise, provide a URL pointing to a repository within a git based SCM. See the examples below. This is a required attribute.

  scm

Specify the SCM. As of this writing only *git* or *hg* are allowed. See the examples below. Defaults to *git*.

  version:

The version of the role to download. Provide a release tag value, commit hash, or branch name. Defaults to the branch set as a default in the repository, otherwise defaults to the *master*.

  name:

Download the role to a specific name. Defaults to the Galaxy name when downloading from Galaxy, otherwise it defaults to the name of the repository.

   Use the following example as a guide for specifying roles in *requirements.yml*:

 
```
# from galaxy
- name: yatesr.timezone

# from locally cloned git repository (git+file:// requires full paths)
- src: git+file:///home/bennojoy/nginx

# from GitHub
- src: https://github.com/bennojoy/nginx

# from GitHub, overriding the name and specifying a specific tag
- name: nginx_role
  src: https://github.com/bennojoy/nginx
  version: main

# from GitHub, specifying a specific commit hash
- src: https://github.com/bennojoy/nginx
  version: "ee8aa41"

# from a webserver, where the role is packaged in a tar.gz
- name: http-role-gz
  src: https://some.webserver.example.com/files/main.tar.gz

# from a webserver, where the role is packaged in a tar.bz2
- name: http-role-bz2
  src: https://some.webserver.example.com/files/main.tar.bz2

# from a webserver, where the role is packaged in a tar.xz (Python 3.x only)
- name: http-role-xz
  src: https://some.webserver.example.com/files/main.tar.xz

# from Bitbucket
- src: git+https://bitbucket.org/willthames/git-ansible-galaxy
  version: v1.4

# from Bitbucket, alternative syntax and caveats
- src: https://bitbucket.org/willthames/hg-ansible-galaxy
  scm: hg

# from GitLab or other git-based scm, using git+ssh
- src: git@gitlab.company.com:mygroup/ansible-core.git
  scm: git
  version: "0.1"  # quoted, so YAML doesn't parse this as a floating-point value

```
  Warning

 Embedding credentials into a SCM URL is not secure. Make sure to use safe auth options for security reasons. For example, use [SSH](https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh), [netrc](https://linux.die.net/man/5/netrc) or [http.extraHeader](https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpextraHeader)/[url.<base>.pushInsteadOf](https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtpushInsteadOf) in Git config to prevent your creds from being exposed in logs.

  ### Installing roles and collections from the same requirements.yml file

 You can install roles and collections from the same requirements files

 
```
---
roles:
  # Install a role from Ansible Galaxy.
  - name: geerlingguy.java
    version: 1.9.6

collections:
  # Install a collection from Ansible Galaxy.
  - name: geerlingguy.php_roles
    version: 0.9.3
    source: https://galaxy.ansible.com

```
 ### Installing multiple roles from multiple files

 For large projects, the `include` directive in a `requirements.yml` file provides the ability to split a large file into multiple smaller files.

 For example, a project may have a `requirements.yml` file, and a `webserver.yml` file.

 Below are the contents of the `webserver.yml` file:

 
```
# from github
- src: https://github.com/bennojoy/nginx

# from Bitbucket
- src: git+http://bitbucket.org/willthames/git-ansible-galaxy
  version: v1.4

```
 The following shows the contents of the `requirements.yml` file that now includes the `webserver.yml` file:

 
```
# from galaxy
- name: yatesr.timezone
- include: <path_to_requirements>/webserver.yml

```
 To install all the roles from both files, pass the root file, in this case `requirements.yml` on the command line, as follows:

 
```
$ ansible-galaxy install -r requirements.yml

```
 ### Dependencies

 Roles can also be dependent on other roles, and when you install a role that has dependencies, those dependencies will automatically be installed to the `roles_path`.

 There are two ways to define the dependencies of a role:

 * using `meta/requirements.yml`
* using `meta/main.yml`

 #### Using `meta/requirements.yml`

  New in version 2.10.

  You can create the file `meta/requirements.yml` and define dependencies in the same format used for `requirements.yml` described in the [Installing multiple roles from a file](#installing-multiple-roles-from-a-file) section.

 From there, you can import or include the specified roles in your tasks.

 #### Using `meta/main.yml`

 Alternatively, you can specify role dependencies in the `meta/main.yml` file by providing a list of roles under the `dependencies` section. If the source of a role is Galaxy, you can simply specify the role in the format `namespace.role_name`. You can also use the more complex format in `requirements.yml`, allowing you to provide `src`, `scm`, `version`, and `name`.

 Dependencies installed that way, depending on other factors described below, will also be executed **before** this role is executed during play execution. To better understand how dependencies are handled during play execution, see [Roles](../user_guide/playbooks_reuse_roles#playbooks-reuse-roles).

 The following shows an example `meta/main.yml` file with dependent roles:

 
```
---
dependencies:
  - geerlingguy.java

galaxy_info:
  author: geerlingguy
  description: Elasticsearch for Linux.
  company: "Midwestern Mac, LLC"
  license: "license (BSD, MIT)"
  min_ansible_version: 2.4
  platforms:
  - name: EL
    versions:
    - all
  - name: Debian
    versions:
    - all
  - name: Ubuntu
    versions:
    - all
  galaxy_tags:
    - web
    - system
    - monitoring
    - logging
    - lucene
    - elk
    - elasticsearch

```
 Tags are inherited *down* the dependency chain. In order for tags to be applied to a role and all its dependencies, the tag should be applied to the role, not to all the tasks within a role.

 Roles listed as dependencies are subject to conditionals and tag filtering, and may not execute fully depending on what tags and conditionals are applied.

 If the source of a role is Galaxy, specify the role in the format *namespace.role\_name*:

 
```
dependencies:
  - geerlingguy.apache
  - geerlingguy.ansible

```
 Alternately, you can specify the role dependencies in the complex form used in `requirements.yml` as follows:

 
```
dependencies:
  - name: geerlingguy.ansible
  - name: composer
    src: git+https://github.com/geerlingguy/ansible-role-composer.git
    version: 775396299f2da1f519f0d8885022ca2d6ee80ee8

```
  Note

 Galaxy expects all role dependencies to exist in Galaxy, and therefore dependencies to be specified in the `namespace.role_name` format. If you import a role with a dependency where the `src` value is a URL, the import process will fail.

  ### List installed roles

 Use `list` to show the name and version of each role installed in the *roles\_path*.

 
```
$ ansible-galaxy list
  - ansible-network.network-engine, v2.7.2
  - ansible-network.config_manager, v2.6.2
  - ansible-network.cisco_nxos, v2.7.1
  - ansible-network.vyos, v2.7.3
  - ansible-network.cisco_ios, v2.7.0

```
 ### Remove an installed role

 Use `remove` to delete a role from *roles\_path*:

 
```
$ ansible-galaxy remove namespace.role_name

```
  See also

  [Using collections](../user_guide/collections_using#collections)

Shareable collections of modules, playbooks and roles

  [Roles](../user_guide/playbooks_reuse_roles#playbooks-reuse-roles)

Reusable tasks, handlers, and other files in a known directory structure

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/galaxy/user_guide.html>

Releases and maintenance
========================

 Please go to [the devel release and maintenance page](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html) for up to date information.

  Note

 This link takes you to a different version of the Ansible documentation. Use the version selection on the left or your browser back button to return to this version of the documentation.

   See also

  [Committers Guidelines](https://docs.ansible.com/ansible/latest/community/committer_guidelines.html#community-committer-guidelines)

Guidelines for Ansible core contributors and maintainers

  [Testing Strategies](test_strategies#testing-strategies)

Testing strategies

  [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html#ansible-community-guide)

Community information and contributing

  [Development Mailing List](https://groups.google.com/group/ansible-devel)

Mailing list for development topics

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html>

Testing Strategies
==================

 Integrating Testing With Ansible Playbooks
------------------------------------------

 Many times, people ask, “how can I best integrate testing with Ansible playbooks?” There are many options. Ansible is actually designed to be a “fail-fast” and ordered system, therefore it makes it easy to embed testing directly in Ansible playbooks. In this chapter, we’ll go into some patterns for integrating tests of infrastructure and discuss the right level of testing that may be appropriate.

  Note

 This is a chapter about testing the application you are deploying, not the chapter on how to test Ansible modules during development. For that content, please hop over to the Development section.

  By incorporating a degree of testing into your deployment workflow, there will be fewer surprises when code hits production and, in many cases, tests can be leveraged in production to prevent failed updates from migrating across an entire installation. Since it’s push-based, it’s also very easy to run the steps on the localhost or testing servers. Ansible lets you insert as many checks and balances into your upgrade workflow as you would like to have.

 The Right Level of Testing
--------------------------

 Ansible resources are models of desired-state. As such, it should not be necessary to test that services are started, packages are installed, or other such things. Ansible is the system that will ensure these things are declaratively true. Instead, assert these things in your playbooks.

 
```
tasks:
  - service:
      name: foo
      state: started
      enabled: yes

```
 If you think the service may not be started, the best thing to do is request it to be started. If the service fails to start, Ansible will yell appropriately. (This should not be confused with whether the service is doing something functional, which we’ll show more about how to do later).

 Check Mode As A Drift Test
--------------------------

 In the above setup, `–check` mode in Ansible can be used as a layer of testing as well. If running a deployment playbook against an existing system, using the `–check` flag to the `ansible` command will report if Ansible thinks it would have had to have made any changes to bring the system into a desired state.

 This can let you know up front if there is any need to deploy onto the given system. Ordinarily, scripts and commands don’t run in check mode, so if you want certain steps to execute in normal mode even when the `–check` flag is used, such as calls to the script module, disable check mode for those tasks:

 
```
roles:
  - webserver

tasks:
  - script: verify.sh
    check_mode: no

```
 Modules That Are Useful for Testing
-----------------------------------

 Certain playbook modules are particularly good for testing. Below is an example that ensures a port is open:

 
```
tasks:

  - wait_for:
      host: "{{ inventory_hostname }}"
      port: 22
    delegate_to: localhost

```
 Here’s an example of using the URI module to make sure a web service returns:

 
```
tasks:

  - action: uri url=http://www.example.com return_content=yes
    register: webpage

  - fail:
      msg: 'service is not happy'
    when: "'AWESOME' not in webpage.content"

```
 It’s easy to push an arbitrary script (in any language) on a remote host and the script will automatically fail if it has a non-zero return code:

 
```
tasks:

  - script: test_script1
  - script: test_script2 --parameter value --parameter2 value

```
 If using roles (you should be, roles are great!), scripts pushed by the script module can live in the ‘files/’ directory of a role.

 And the assert module makes it very easy to validate various kinds of truth:

 
```
tasks:

   - shell: /usr/bin/some-command --parameter value
     register: cmd_result

   - assert:
       that:
         - "'not ready' not in cmd_result.stderr"
         - "'gizmo enabled' in cmd_result.stdout"

```
 Should you feel the need to test for the existence of files that are not declaratively set by your Ansible configuration, the ‘stat’ module is a great choice:

 
```
tasks:

   - stat:
       path: /path/to/something
     register: p

   - assert:
       that:
         - p.stat.exists and p.stat.isdir

```
 As mentioned above, there’s no need to check things like the return codes of commands. Ansible is checking them automatically. Rather than checking for a user to exist, consider using the user module to make it exist.

 Ansible is a fail-fast system, so when there is an error creating that user, it will stop the playbook run. You do not have to check up behind it.

 Testing Lifecycle
-----------------

 If writing some degree of basic validation of your application into your playbooks, they will run every time you deploy.

 As such, deploying into a local development VM and a staging environment will both validate that things are according to plan ahead of your production deploy.

 Your workflow may be something like this:

 
```
- Use the same playbook all the time with embedded tests in development
- Use the playbook to deploy to a staging environment (with the same playbooks) that simulates production
- Run an integration test battery written by your QA team against staging
- Deploy to production, with the same integrated tests.

```
 Something like an integration test battery should be written by your QA team if you are a production webservice. This would include things like Selenium tests or automated API tests and would usually not be something embedded into your Ansible playbooks.

 However, it does make sense to include some basic health checks into your playbooks, and in some cases it may be possible to run a subset of the QA battery against remote nodes. This is what the next section covers.

 Integrating Testing With Rolling Updates
----------------------------------------

 If you have read into [Controlling where tasks run: delegation and local actions](../user_guide/playbooks_delegation#playbooks-delegation) it may quickly become apparent that the rolling update pattern can be extended, and you can use the success or failure of the playbook run to decide whether to add a machine into a load balancer or not.

 This is the great culmination of embedded tests:

 
```
---

- hosts: webservers
  serial: 5

  pre_tasks:

    - name: take out of load balancer pool
      command: /usr/bin/take_out_of_pool {{ inventory_hostname }}
      delegate_to: 127.0.0.1

  roles:

     - common
     - webserver
     - apply_testing_checks

  post_tasks:

    - name: add back to load balancer pool
      command: /usr/bin/add_back_to_pool {{ inventory_hostname }}
      delegate_to: 127.0.0.1

```
 Of course in the above, the “take out of the pool” and “add back” steps would be replaced with a call to an Ansible load balancer module or appropriate shell command. You might also have steps that use a monitoring module to start and end an outage window for the machine.

 However, what you can see from the above is that tests are used as a gate – if the “apply\_testing\_checks” step is not performed, the machine will not go back into the pool.

 Read the delegation chapter about “max\_fail\_percentage” and you can also control how many failing tests will stop a rolling update from proceeding.

 This above approach can also be modified to run a step from a testing machine remotely against a machine:

 
```
---

- hosts: webservers
  serial: 5

  pre_tasks:

    - name: take out of load balancer pool
      command: /usr/bin/take_out_of_pool {{ inventory_hostname }}
      delegate_to: 127.0.0.1

  roles:

     - common
     - webserver

  tasks:
     - script: /srv/qa_team/app_testing_script.sh --server {{ inventory_hostname }}
       delegate_to: testing_server

  post_tasks:

    - name: add back to load balancer pool
      command: /usr/bin/add_back_to_pool {{ inventory_hostname }}
      delegate_to: 127.0.0.1

```
 In the above example, a script is run from the testing server against a remote node prior to bringing it back into the pool.

 In the event of a problem, fix the few servers that fail using Ansible’s automatically generated retry file to repeat the deploy on just those servers.

 Achieving Continuous Deployment
-------------------------------

 If desired, the above techniques may be extended to enable continuous deployment practices.

 The workflow may look like this:

 
```
- Write and use automation to deploy local development VMs
- Have a CI system like Jenkins deploy to a staging environment on every code change
- The deploy job calls testing scripts to pass/fail a build on every deploy
- If the deploy job succeeds, it runs the same deploy playbook against production inventory

```
 Some Ansible users use the above approach to deploy a half-dozen or dozen times an hour without taking all of their infrastructure offline. A culture of automated QA is vital if you wish to get to this level.

 If you are still doing a large amount of manual QA, you should still make the decision on whether to deploy manually as well, but it can still help to work in the rolling update patterns of the previous section and incorporate some basic health checks using modules like ‘script’, ‘stat’, ‘uri’, and ‘assert’.

 Conclusion
----------

 Ansible believes you should not need another framework to validate basic things of your infrastructure is true. This is the case because Ansible is an order-based system that will fail immediately on unhandled errors for a host, and prevent further configuration of that host. This forces errors to the top and shows them in a summary at the end of the Ansible run.

 However, as Ansible is designed as a multi-tier orchestration system, it makes it very easy to incorporate tests into the end of a playbook run, either using loose tasks or roles. When used with rolling updates, testing steps can decide whether to put a machine back into a load balanced pool or not.

 Finally, because Ansible errors propagate all the way up to the return code of the Ansible program itself, and Ansible by default runs in an easy push-based mode, Ansible is a great step to put into a build environment if you wish to use it to roll out systems as part of a Continuous Integration/Continuous Delivery pipeline, as is covered in sections above.

 The focus should not be on infrastructure testing, but on application testing, so we strongly encourage getting together with your QA team and ask what sort of tests would make sense to run every time you deploy development VMs, and which sort of tests they would like to run against the staging environment on every deploy. Obviously at the development stage, unit tests are great too. But don’t unit test your playbook. Ansible describes states of resources declaratively, so you don’t have to. If there are cases where you want to be sure of something though, that’s great, and things like stat/assert are great go-to modules for that purpose.

 In all, testing is a very organizational and site-specific thing. Everybody should be doing it, but what makes the most sense for your environment will vary with what you are deploying and who is using it – but everyone benefits from a more robust and reliable deployment system.

  See also

  [Collection Index](../collections/index#list-of-collections)

Browse existing collections, modules, and plugins

  [Working with playbooks](../user_guide/playbooks#working-with-playbooks)

An introduction to playbooks

  [Controlling where tasks run: delegation and local actions](../user_guide/playbooks_delegation#playbooks-delegation)

Delegation, useful for working with load balancers, clouds, and locally executed steps.

  [User Mailing List](https://groups.google.com/group/ansible-project)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/reference_appendices/test_strategies.html>

Virtualization and Containerization Guides
==========================================

 The guides in this section cover integrating Ansible with popular tools for creating virtual machines and containers. They explore particular use cases in greater depth and provide a more “top-down” explanation of some basic features.

 * [Docker Guide](guide_docker)
* [Kubernetes Guide](guide_kubernetes)
* [Vagrant Guide](guide_vagrant)
* [VMware Guide](guide_vmware)
* [VMware REST Scenarios](guide_vmware_rest)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/virt_guides.html>

Network Developer Guide
=======================

 Welcome to the Developer Guide for Ansible Network Automation!

 **Who should use this guide?**

 If you want to extend Ansible for Network Automation by creating a module or plugin, this guide is for you. This guide is specific to networking. You should already be familiar with how to create, test, and document modules and plugins, as well as the prerequisites for getting your module or plugin accepted into the main Ansible repository. See the [Developer Guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html#developer-guide) for details. Before you proceed, please read:

 * How to [add a custom plugin or module locally](https://docs.ansible.com/ansible/latest/dev_guide/developing_locally.html#developing-locally).
* How to figure out if [developing a module is the right approach](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules.html#module-dev-should-you) for my use case.
* How to [set up my Python development environment](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#environment-setup).
* How to [get started writing a module](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#developing-modules-general).

 Find the network developer task that best describes what you want to do:

 * I want to [develop a network resource module](developing_resource_modules_network#developing-resource-modules).
* I want to [develop a network connection plugin](developing_plugins_network#developing-plugins-network).
* I want to [document my set of modules for a network platform](documenting_modules_network#documenting-modules-network).

 If you prefer to read the entire guide, here’s a list of the pages in order.

 * [Developing network resource modules](developing_resource_modules_network)
* [Developing network plugins](developing_plugins_network)
* [Documenting new network platforms](documenting_modules_network)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/dev_guide/index.html>

Playbook Keywords
=================

 These are the keywords available on common playbook objects. Keywords are one of several sources for configuring Ansible behavior. See [Controlling how Ansible behaves: precedence rules](general_precedence#general-precedence-rules) for details on the relative precedence of each source.

  Note

 Please note:

 * Aliases for the directives are not reflected here, nor are mutable one. For example, [action](#term-action) in task can be substituted by the name of any Ansible module.
* The keywords do not have `version_added` information at this time
* Some keywords set defaults for the objects inside of them rather than for the objects themselves

  * [Play](#play)
* [Role](#role)
* [Block](#block)
* [Task](#task)

 Play
----

  
`any_errors_fatal` 

Force any un-handled task errors on any host to propagate to all hosts and end the play.

  
`become` 

Boolean that controls if privilege escalation is used or not on [Task](https://docs.ansible.com/ansible/latest/reference_appendices/glossary.html#term-Task) execution. Implemented by the become plugin. See [Become Plugins](../plugins/become#become-plugins).

  
`become_exe` 

Path to the executable used to elevate privileges. Implemented by the become plugin. See [Become Plugins](../plugins/become#become-plugins).

  
`become_flags` 

A string of flag(s) to pass to the privilege escalation program when [become](#term-52) is True.

  
`become_method` 

Which method of privilege escalation to use (such as sudo or su).

  
`become_user` 

User that you ‘become’ after using privilege escalation. The remote/login user must have permissions to become this user.

  
`check_mode` 

A boolean that controls if a task is executed in ‘check’ mode. See [Validating tasks: check mode and diff mode](../user_guide/playbooks_checkmode#check-mode-dry).

  
`collections` 

List of collection namespaces to search for modules, plugins, and roles. See [Using collections in a Playbook](../user_guide/collections_using#collections-using-playbook)

  Note

 Tasks within a role do not inherit the value of `collections` from the play. To have a role search a list of collections, use the `collections` keyword in `meta/main.yml` within a role.

   
`connection` 

Allows you to change the connection plugin used for tasks to execute on the target. See [Using connection plugins](../plugins/connection#using-connection).

  
`debugger` 

Enable debugging tasks based on state of the task result. See [Debugging tasks](../user_guide/playbooks_debugger#playbook-debugger).

  
`diff` 

Toggle to make tasks return ‘diff’ information or not.

  
`environment` 

A dictionary that gets converted into environment vars to be provided for the task upon execution. This can ONLY be used with modules. This isn’t supported for any other type of plugins nor Ansible itself nor its configuration, it just sets the variables for the code responsible for executing the task. This is not a recommended way to pass in confidential data.

  
`fact_path` 

Set the fact path option for the fact gathering plugin controlled by [gather\_facts](#term-gather_facts).

  
`force_handlers` 

Will force notified handler execution for hosts even if they failed during the play. Will not trigger if the play itself fails.

  
`gather_facts` 

A boolean that controls if the play will automatically run the ‘setup’ task to gather facts for the hosts.

  
`gather_subset` 

Allows you to pass subset options to the fact gathering plugin controlled by [gather\_facts](#term-gather_facts).

  
`gather_timeout` 

Allows you to set the timeout for the fact gathering plugin controlled by [gather\_facts](#term-gather_facts).

  
`handlers` 

A section with tasks that are treated as handlers, these won’t get executed normally, only when notified after each section of tasks is complete. A handler’s `listen` field is not templatable.

  
`hosts` 

A list of groups, hosts or host pattern that translates into a list of hosts that are the play’s target.

  
`ignore_errors` 

Boolean that allows you to ignore task failures and continue with play. It does not affect connection errors.

  
`ignore_unreachable` 

Boolean that allows you to ignore task failures due to an unreachable host and continue with the play. This does not affect other task errors (see [ignore\_errors](#term-65)) but is useful for groups of volatile/ephemeral hosts.

  
`max_fail_percentage` 

can be used to abort the run after a given percentage of hosts in the current batch has failed. This only wokrs on linear or linear derived strategies.

  
`module_defaults` 

Specifies default parameter values for modules.

  
`name` 

Identifier. Can be used for documentation, or in tasks/handlers.

  
`no_log` 

Boolean that controls information disclosure.

  
`order` 

Controls the sorting of hosts as they are used for executing the play. Possible values are inventory (default), sorted, reverse\_sorted, reverse\_inventory and shuffle.

  
`port` 

Used to override the default port used in a connection.

  
`post_tasks` 

A list of tasks to execute after the [tasks](#term-tasks) section.

  
`pre_tasks` 

A list of tasks to execute before [roles](#term-roles).

  
`remote_user` 

User used to log into the target via the connection plugin.

  
`roles` 

List of roles to be imported into the play

  
`run_once` 

Boolean that will bypass the host loop, forcing the task to attempt to execute on the first host available and afterwards apply any results and facts to all active hosts in the same batch.

  
`serial` 

Explicitly define how Ansible batches the execution of the current play on the play’s target

  See also

 [Setting the batch size with serial](../user_guide/playbooks_strategies#rolling-update-batch-size)

   
`strategy` 

Allows you to choose the connection plugin to use for the play.

  
`tags` 

Tags applied to the task or included tasks, this allows selecting subsets of tasks from the command line.

  
`tasks` 

Main list of tasks to execute in the play, they run after [roles](#term-roles) and before [post\_tasks](#term-post_tasks).

  
`throttle` 

Limit number of concurrent task runs on task, block and playbook level. This is independent of the forks and serial settings, but cannot be set higher than those limits. For example, if forks is set to 10 and the throttle is set to 15, at most 10 hosts will be operated on in parallel.

  
`timeout` 

Time limit for task to execute in, if exceeded Ansible will interrupt and fail the task.

  
`vars` 

Dictionary/map of variables

  
`vars_files` 

List of files that contain vars to include in the play.

  
`vars_prompt` 

list of variables to prompt for.

   Role
----

  
`any_errors_fatal` 

Force any un-handled task errors on any host to propagate to all hosts and end the play.

  
`become` 

Boolean that controls if privilege escalation is used or not on [Task](https://docs.ansible.com/ansible/latest/reference_appendices/glossary.html#term-Task) execution. Implemented by the become plugin. See [Become Plugins](../plugins/become#become-plugins).

  
`become_exe` 

Path to the executable used to elevate privileges. Implemented by the become plugin. See [Become Plugins](../plugins/become#become-plugins).

  
`become_flags` 

A string of flag(s) to pass to the privilege escalation program when [become](#term-52) is True.

  
`become_method` 

Which method of privilege escalation to use (such as sudo or su).

  
`become_user` 

User that you ‘become’ after using privilege escalation. The remote/login user must have permissions to become this user.

  
`check_mode` 

A boolean that controls if a task is executed in ‘check’ mode. See [Validating tasks: check mode and diff mode](../user_guide/playbooks_checkmode#check-mode-dry).

  
`collections` 

List of collection namespaces to search for modules, plugins, and roles. See [Using collections in a Playbook](../user_guide/collections_using#collections-using-playbook)

  Note

 Tasks within a role do not inherit the value of `collections` from the play. To have a role search a list of collections, use the `collections` keyword in `meta/main.yml` within a role.

   
`connection` 

Allows you to change the connection plugin used for tasks to execute on the target. See [Using connection plugins](../plugins/connection#using-connection).

  
`debugger` 

Enable debugging tasks based on state of the task result. See [Debugging tasks](../user_guide/playbooks_debugger#playbook-debugger).

  
`delegate_facts` 

Boolean that allows you to apply facts to a delegated host instead of inventory\_hostname.

  
`delegate_to` 

Host to execute task instead of the target (inventory\_hostname). Connection vars from the delegated host will also be used for the task.

  
`diff` 

Toggle to make tasks return ‘diff’ information or not.

  
`environment` 

A dictionary that gets converted into environment vars to be provided for the task upon execution. This can ONLY be used with modules. This isn’t supported for any other type of plugins nor Ansible itself nor its configuration, it just sets the variables for the code responsible for executing the task. This is not a recommended way to pass in confidential data.

  
`ignore_errors` 

Boolean that allows you to ignore task failures and continue with play. It does not affect connection errors.

  
`ignore_unreachable` 

Boolean that allows you to ignore task failures due to an unreachable host and continue with the play. This does not affect other task errors (see [ignore\_errors](#term-65)) but is useful for groups of volatile/ephemeral hosts.

  
`module_defaults` 

Specifies default parameter values for modules.

  
`name` 

Identifier. Can be used for documentation, or in tasks/handlers.

  
`no_log` 

Boolean that controls information disclosure.

  
`port` 

Used to override the default port used in a connection.

  
`remote_user` 

User used to log into the target via the connection plugin.

  
`run_once` 

Boolean that will bypass the host loop, forcing the task to attempt to execute on the first host available and afterwards apply any results and facts to all active hosts in the same batch.

  
`tags` 

Tags applied to the task or included tasks, this allows selecting subsets of tasks from the command line.

  
`throttle` 

Limit number of concurrent task runs on task, block and playbook level. This is independent of the forks and serial settings, but cannot be set higher than those limits. For example, if forks is set to 10 and the throttle is set to 15, at most 10 hosts will be operated on in parallel.

  
`timeout` 

Time limit for task to execute in, if exceeded Ansible will interrupt and fail the task.

  
`vars` 

Dictionary/map of variables

  
`when` 

Conditional expression, determines if an iteration of a task is run or not.

   Block
-----

  
`always` 

List of tasks, in a block, that execute no matter if there is an error in the block or not.

  
`any_errors_fatal` 

Force any un-handled task errors on any host to propagate to all hosts and end the play.

  
`become` 

Boolean that controls if privilege escalation is used or not on [Task](https://docs.ansible.com/ansible/latest/reference_appendices/glossary.html#term-Task) execution. Implemented by the become plugin. See [Become Plugins](../plugins/become#become-plugins).

  
`become_exe` 

Path to the executable used to elevate privileges. Implemented by the become plugin. See [Become Plugins](../plugins/become#become-plugins).

  
`become_flags` 

A string of flag(s) to pass to the privilege escalation program when [become](#term-52) is True.

  
`become_method` 

Which method of privilege escalation to use (such as sudo or su).

  
`become_user` 

User that you ‘become’ after using privilege escalation. The remote/login user must have permissions to become this user.

  
`block` 

List of tasks in a block.

  
`check_mode` 

A boolean that controls if a task is executed in ‘check’ mode. See [Validating tasks: check mode and diff mode](../user_guide/playbooks_checkmode#check-mode-dry).

  
`collections` 

List of collection namespaces to search for modules, plugins, and roles. See [Using collections in a Playbook](../user_guide/collections_using#collections-using-playbook)

  Note

 Tasks within a role do not inherit the value of `collections` from the play. To have a role search a list of collections, use the `collections` keyword in `meta/main.yml` within a role.

   
`connection` 

Allows you to change the connection plugin used for tasks to execute on the target. See [Using connection plugins](../plugins/connection#using-connection).

  
`debugger` 

Enable debugging tasks based on state of the task result. See [Debugging tasks](../user_guide/playbooks_debugger#playbook-debugger).

  
`delegate_facts` 

Boolean that allows you to apply facts to a delegated host instead of inventory\_hostname.

  
`delegate_to` 

Host to execute task instead of the target (inventory\_hostname). Connection vars from the delegated host will also be used for the task.

  
`diff` 

Toggle to make tasks return ‘diff’ information or not.

  
`environment` 

A dictionary that gets converted into environment vars to be provided for the task upon execution. This can ONLY be used with modules. This isn’t supported for any other type of plugins nor Ansible itself nor its configuration, it just sets the variables for the code responsible for executing the task. This is not a recommended way to pass in confidential data.

  
`ignore_errors` 

Boolean that allows you to ignore task failures and continue with play. It does not affect connection errors.

  
`ignore_unreachable` 

Boolean that allows you to ignore task failures due to an unreachable host and continue with the play. This does not affect other task errors (see [ignore\_errors](#term-65)) but is useful for groups of volatile/ephemeral hosts.

  
`module_defaults` 

Specifies default parameter values for modules.

  
`name` 

Identifier. Can be used for documentation, or in tasks/handlers.

  
`no_log` 

Boolean that controls information disclosure.

  
`notify` 

List of handlers to notify when the task returns a ‘changed=True’ status.

  
`port` 

Used to override the default port used in a connection.

  
`remote_user` 

User used to log into the target via the connection plugin.

  
`rescue` 

List of tasks in a [block](#term-block) that run if there is a task error in the main [block](#term-block) list.

  
`run_once` 

Boolean that will bypass the host loop, forcing the task to attempt to execute on the first host available and afterwards apply any results and facts to all active hosts in the same batch.

  
`tags` 

Tags applied to the task or included tasks, this allows selecting subsets of tasks from the command line.

  
`throttle` 

Limit number of concurrent task runs on task, block and playbook level. This is independent of the forks and serial settings, but cannot be set higher than those limits. For example, if forks is set to 10 and the throttle is set to 15, at most 10 hosts will be operated on in parallel.

  
`timeout` 

Time limit for task to execute in, if exceeded Ansible will interrupt and fail the task.

  
`vars` 

Dictionary/map of variables

  
`when` 

Conditional expression, determines if an iteration of a task is run or not.

   Task
----

  
`action` 

The ‘action’ to execute for a task, it normally translates into a C(module) or action plugin.

  
`any_errors_fatal` 

Force any un-handled task errors on any host to propagate to all hosts and end the play.

  
`args` 

A secondary way to add arguments into a task. Takes a dictionary in which keys map to options and values.

  
`async` 

Run a task asynchronously if the C(action) supports this; value is maximum runtime in seconds.

  
`become` 

Boolean that controls if privilege escalation is used or not on [Task](https://docs.ansible.com/ansible/latest/reference_appendices/glossary.html#term-Task) execution. Implemented by the become plugin. See [Become Plugins](../plugins/become#become-plugins).

  
`become_exe` 

Path to the executable used to elevate privileges. Implemented by the become plugin. See [Become Plugins](../plugins/become#become-plugins).

  
`become_flags` 

A string of flag(s) to pass to the privilege escalation program when [become](#term-52) is True.

  
`become_method` 

Which method of privilege escalation to use (such as sudo or su).

  
`become_user` 

User that you ‘become’ after using privilege escalation. The remote/login user must have permissions to become this user.

  
`changed_when` 

Conditional expression that overrides the task’s normal ‘changed’ status.

  
`check_mode` 

A boolean that controls if a task is executed in ‘check’ mode. See [Validating tasks: check mode and diff mode](../user_guide/playbooks_checkmode#check-mode-dry).

  
`collections` 

List of collection namespaces to search for modules, plugins, and roles. See [Using collections in a Playbook](../user_guide/collections_using#collections-using-playbook)

  Note

 Tasks within a role do not inherit the value of `collections` from the play. To have a role search a list of collections, use the `collections` keyword in `meta/main.yml` within a role.

   
`connection` 

Allows you to change the connection plugin used for tasks to execute on the target. See [Using connection plugins](../plugins/connection#using-connection).

  
`debugger` 

Enable debugging tasks based on state of the task result. See [Debugging tasks](../user_guide/playbooks_debugger#playbook-debugger).

  
`delay` 

Number of seconds to delay between retries. This setting is only used in combination with [until](#term-until).

  
`delegate_facts` 

Boolean that allows you to apply facts to a delegated host instead of inventory\_hostname.

  
`delegate_to` 

Host to execute task instead of the target (inventory\_hostname). Connection vars from the delegated host will also be used for the task.

  
`diff` 

Toggle to make tasks return ‘diff’ information or not.

  
`environment` 

A dictionary that gets converted into environment vars to be provided for the task upon execution. This can ONLY be used with modules. This isn’t supported for any other type of plugins nor Ansible itself nor its configuration, it just sets the variables for the code responsible for executing the task. This is not a recommended way to pass in confidential data.

  
`failed_when` 

Conditional expression that overrides the task’s normal ‘failed’ status.

  
`ignore_errors` 

Boolean that allows you to ignore task failures and continue with play. It does not affect connection errors.

  
`ignore_unreachable` 

Boolean that allows you to ignore task failures due to an unreachable host and continue with the play. This does not affect other task errors (see [ignore\_errors](#term-65)) but is useful for groups of volatile/ephemeral hosts.

  
`local_action` 

Same as action but also implies `delegate_to: localhost`

  
`loop` 

Takes a list for the task to iterate over, saving each list element into the `item` variable (configurable via loop\_control)

  
`loop_control` 

Several keys here allow you to modify/set loop behaviour in a task.

  See also

 [Adding controls to loops](../user_guide/playbooks_loops#loop-control)

   
`module_defaults` 

Specifies default parameter values for modules.

  
`name` 

Identifier. Can be used for documentation, or in tasks/handlers.

  
`no_log` 

Boolean that controls information disclosure.

  
`notify` 

List of handlers to notify when the task returns a ‘changed=True’ status.

  
`poll` 

Sets the polling interval in seconds for async tasks (default 10s).

  
`port` 

Used to override the default port used in a connection.

  
`register` 

Name of variable that will contain task status and module return data.

  
`remote_user` 

User used to log into the target via the connection plugin.

  
`retries` 

Number of retries before giving up in a [until](#term-until) loop. This setting is only used in combination with [until](#term-until).

  
`run_once` 

Boolean that will bypass the host loop, forcing the task to attempt to execute on the first host available and afterwards apply any results and facts to all active hosts in the same batch.

  
`tags` 

Tags applied to the task or included tasks, this allows selecting subsets of tasks from the command line.

  
`throttle` 

Limit number of concurrent task runs on task, block and playbook level. This is independent of the forks and serial settings, but cannot be set higher than those limits. For example, if forks is set to 10 and the throttle is set to 15, at most 10 hosts will be operated on in parallel.

  
`timeout` 

Time limit for task to execute in, if exceeded Ansible will interrupt and fail the task.

  
`until` 

This keyword implies a ‘[retries](#term-retries) loop’ that will go on until the condition supplied here is met or we hit the [retries](#term-retries) limit.

  
`vars` 

Dictionary/map of variables

  
`when` 

Conditional expression, determines if an iteration of a task is run or not.

  
`with_<lookup_plugin>` 

The same as `loop` but magically adds the output of any lookup plugin to generate the item list.

  

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/reference_appendices/playbooks_keywords.html>

YAML Syntax
===========

 This page provides a basic overview of correct YAML syntax, which is how Ansible playbooks (our configuration management language) are expressed.

 We use YAML because it is easier for humans to read and write than other common data formats like XML or JSON. Further, there are libraries available in most programming languages for working with YAML.

 You may also wish to read [Working with playbooks](../user_guide/playbooks#working-with-playbooks) at the same time to see how this is used in practice.

 YAML Basics
-----------

 For Ansible, nearly every YAML file starts with a list. Each item in the list is a list of key/value pairs, commonly called a “hash” or a “dictionary”. So, we need to know how to write lists and dictionaries in YAML.

 There’s another small quirk to YAML. All YAML files (regardless of their association with Ansible or not) can optionally begin with `---` and end with `...`. This is part of the YAML format and indicates the start and end of a document.

 All members of a list are lines beginning at the same indentation level starting with a `"- "` (a dash and a space):

 
```
---
# A list of tasty fruits
- Apple
- Orange
- Strawberry
- Mango
...

```
 A dictionary is represented in a simple `key: value` form (the colon must be followed by a space):

 
```
# An employee record
martin:
  name: Martin D'vloper
  job: Developer
  skill: Elite

```
 More complicated data structures are possible, such as lists of dictionaries, dictionaries whose values are lists or a mix of both:

 
```
# Employee records
- martin:
    name: Martin D'vloper
    job: Developer
    skills:
      - python
      - perl
      - pascal
- tabitha:
    name: Tabitha Bitumen
    job: Developer
    skills:
      - lisp
      - fortran
      - erlang

```
 Dictionaries and lists can also be represented in an abbreviated form if you really want to:

 
```
---
martin: {name: Martin D'vloper, job: Developer, skill: Elite}
['Apple', 'Orange', 'Strawberry', 'Mango']

```
 These are called “Flow collections”.

 Ansible doesn’t really use these too much, but you can also specify a boolean value (true/false) in several forms:

 
```
create_key: yes
needs_agent: no
knows_oop: True
likes_emacs: TRUE
uses_cvs: false

```
 Use lowercase ‘true’ or ‘false’ for boolean values in dictionaries if you want to be compatible with default yamllint options.

 Values can span multiple lines using `|` or `>`. Spanning multiple lines using a “Literal Block Scalar” `|` will include the newlines and any trailing spaces. Using a “Folded Block Scalar” `>` will fold newlines to spaces; it’s used to make what would otherwise be a very long line easier to read and edit. In either case the indentation will be ignored. Examples are:

 
```
include_newlines: |
            exactly as you see
            will appear these three
            lines of poetry

fold_newlines: >
            this is really a
            single line of text
            despite appearances

```
 While in the above `>` example all newlines are folded into spaces, there are two ways to enforce a newline to be kept:

 
```
fold_some_newlines: >
    a
    b

    c
    d
      e
    f
same_as: "a b\nc d\n  e\nf\n"

```
 Let’s combine what we learned so far in an arbitrary YAML example. This really has nothing to do with Ansible, but will give you a feel for the format:

 
```
---
# An employee record
name: Martin D'vloper
job: Developer
skill: Elite
employed: True
foods:
  - Apple
  - Orange
  - Strawberry
  - Mango
languages:
  perl: Elite
  python: Elite
  pascal: Lame
education: |
  4 GCSEs
  3 A-Levels
  BSc in the Internet of Things

```
 That’s all you really need to know about YAML to start writing `Ansible` playbooks.

 Gotchas
-------

 While you can put just about anything into an unquoted scalar, there are some exceptions. A colon followed by a space (or newline) `": "` is an indicator for a mapping. A space followed by the pound sign `" #"` starts a comment.

 Because of this, the following is going to result in a YAML syntax error:

 
```
foo: somebody said I should put a colon here: so I did

windows_drive: c:

```
 …but this will work:

 
```
windows_path: c:\windows

```
 You will want to quote hash values using colons followed by a space or the end of the line:

 
```
foo: 'somebody said I should put a colon here: so I did'

windows_drive: 'c:'

```
 …and then the colon will be preserved.

 Alternatively, you can use double quotes:

 
```
foo: "somebody said I should put a colon here: so I did"

windows_drive: "c:"

```
 The difference between single quotes and double quotes is that in double quotes you can use escapes:

 
```
foo: "a \t TAB and a \n NEWLINE"

```
 The list of allowed escapes can be found in the YAML Specification under “Escape Sequences” (YAML 1.1) or “Escape Characters” (YAML 1.2).

 The following is invalid YAML:

 
```
foo: "an escaped \' single quote"

```
 Further, Ansible uses “{{ var }}” for variables. If a value after a colon starts with a “{“, YAML will think it is a dictionary, so you must quote it, like so:

 
```
foo: "{{ variable }}"

```
 If your value starts with a quote the entire value must be quoted, not just part of it. Here are some additional examples of how to properly quote things:

 
```
foo: "{{ variable }}/additional/string/literal"
foo2: "{{ variable }}\\backslashes\\are\\also\\special\\characters"
foo3: "even if it's just a string literal it must all be quoted"

```
 Not valid:

 
```
foo: "E:\\path\\"rest\\of\\path

```
 In addition to `'` and `"` there are a number of characters that are special (or reserved) and cannot be used as the first character of an unquoted scalar: `[] {} > | * & ! % # ` @ ,`.

 You should also be aware of `? : -`. In YAML, they are allowed at the beginning of a string if a non-space character follows, but YAML processor implementations differ, so it’s better to use quotes.

 In Flow Collections, the rules are a bit more strict:

 
```
a scalar in block mapping: this } is [ all , valid

flow mapping: { key: "you { should [ use , quotes here" }

```
 Boolean conversion is helpful, but this can be a problem when you want a literal `yes` or other boolean values as a string. In these cases just use quotes:

 
```
non_boolean: "yes"
other_string: "False"

```
 YAML converts certain strings into floating-point values, such as the string `1.0`. If you need to specify a version number (in a requirements.yml file, for example), you will need to quote the value if it looks like a floating-point value:

 
```
version: "1.0"

```
  See also

  [Working with playbooks](../user_guide/playbooks#working-with-playbooks)

Learn what playbooks can do and how to write/run them.

  [YAMLLint](http://yamllint.com/)

YAML Lint (online) helps you debug YAML syntax if you are having problems

  [GitHub examples directory](https://github.com/ansible/ansible-examples)

Complete playbook files from the github project source

  [Wikipedia YAML syntax reference](https://en.wikipedia.org/wiki/YAML)

A good guide to YAML syntax

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

  [irc.libera.chat](https://libera.chat/)

#yaml for YAML specific questions

  [YAML 1.1 Specification](https://yaml.org/spec/1.1/)

The Specification for YAML 1.1, which PyYAML and libyaml are currently implementing

  [YAML 1.2 Specification](https://yaml.org/spec/1.2/spec.html)

For completeness, YAML 1.2 is the successor of 1.1

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html>

Interpreter Discovery
=====================

 Most Ansible modules that execute under a POSIX environment require a Python interpreter on the target host. Unless configured otherwise, Ansible will attempt to discover a suitable Python interpreter on each target host the first time a Python module is executed for that host.

 To control the discovery behavior:

 * for individual hosts and groups, use the `ansible_python_interpreter` inventory variable
* globally, use the `interpreter_python` key in the `[defaults]` section of `ansible.cfg`

 Use one of the following values:

  
`auto_legacy(default in 2.8)` 

Detects the target OS platform, distribution, and version, then consults a table listing the correct Python interpreter and path for each platform/distribution/version. If an entry is found, and `/usr/bin/python` is absent, uses the discovered interpreter (and path). If an entry is found, and `/usr/bin/python` is present, uses `/usr/bin/python` and issues a warning. This exception provides temporary compatibility with previous versions of Ansible that always defaulted to `/usr/bin/python`, so if you have installed Python and other dependencies at `/usr/bin/python` on some hosts, Ansible will find and use them with this setting. If no entry is found, or the listed Python is not present on the target host, searches a list of common Python interpreter paths and uses the first one found; also issues a warning that future installation of another Python interpreter could alter the one chosen.

  
`auto(future default in 2.12)` 

Detects the target OS platform, distribution, and version, then consults a table listing the correct Python interpreter and path for each platform/distribution/version. If an entry is found, uses the discovered interpreter. If no entry is found, or the listed Python is not present on the target host, searches a list of common Python interpreter paths and uses the first one found; also issues a warning that future installation of another Python interpreter could alter the one chosen.

  auto\_legacy\_silent

Same as `auto_legacy`, but does not issue warnings.

  auto\_silent

Same as `auto`, but does not issue warnings.

   You can still set `ansible_python_interpreter` to a specific path at any variable level (for example, in host\_vars, in vars files, in playbooks, and so on). Setting a specific path completely disables automatic interpreter discovery; Ansible always uses the path specified.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html>

Network Getting Started
=======================

 Ansible collections support a wide range of vendors, device types, and actions, so you can manage your entire network with a single automation tool. With Ansible, you can:

 * Automate repetitive tasks to speed routine network changes and free up your time for more strategic work
* Leverage the same simple, powerful, and agentless automation tool for network tasks that operations and development use
* Separate the data model (in a playbook or role) from the execution layer (via Ansible modules) to manage heterogeneous network devices
* Benefit from community and vendor-generated sample playbooks and roles to help accelerate network automation projects
* Communicate securely with network hardware over SSH or HTTPS

 **Who should use this guide?**

 This guide is intended for network engineers using Ansible for the first time. If you understand networks but have never used Ansible, work through the guide from start to finish.

 This guide is also useful for experienced Ansible users automating network tasks for the first time. You can use Ansible commands, playbooks and modules to configure hubs, switches, routers, bridges and other network devices. But network modules are different from Linux/Unix and Windows modules, and you must understand some network-specific concepts to succeed. If you understand Ansible but have never automated a network task, start with the second section.

 This guide introduces basic Ansible concepts and guides you through your first Ansible commands, playbooks and inventory entries.

 Getting Started Guide

 * [Basic Concepts](basic_concepts)
	+ [Control node](basic_concepts#control-node)
	+ [Managed nodes](basic_concepts#managed-nodes)
	+ [Inventory](basic_concepts#inventory)
	+ [Collections](basic_concepts#collections)
	+ [Modules](basic_concepts#modules)
	+ [Tasks](basic_concepts#tasks)
	+ [Playbooks](basic_concepts#playbooks)
* [How Network Automation is Different](network_differences)
	+ [Execution on the control node](network_differences#execution-on-the-control-node)
	+ [Multiple communication protocols](network_differences#multiple-communication-protocols)
	+ [Collections organized by network platform](network_differences#collections-organized-by-network-platform)
	+ [Privilege Escalation: `enable` mode, `become`, and `authorize`](network_differences#privilege-escalation-enable-mode-become-and-authorize)
* [Run Your First Command and Playbook](first_playbook)
	+ [Prerequisites](first_playbook#prerequisites)
	+ [Install Ansible](first_playbook#install-ansible)
	+ [Establish a manual connection to a managed node](first_playbook#establish-a-manual-connection-to-a-managed-node)
	+ [Run your first network Ansible command](first_playbook#run-your-first-network-ansible-command)
	+ [Create and run your first network Ansible Playbook](first_playbook#create-and-run-your-first-network-ansible-playbook)
	+ [Gathering facts from network devices](first_playbook#gathering-facts-from-network-devices)
* [Build Your Inventory](first_inventory)
	+ [Basic inventory](first_inventory#basic-inventory)
	+ [Add variables to the inventory](first_inventory#add-variables-to-the-inventory)
	+ [Group variables within inventory](first_inventory#group-variables-within-inventory)
	+ [Variable syntax](first_inventory#variable-syntax)
	+ [Group inventory by platform](first_inventory#group-inventory-by-platform)
	+ [Verifying the inventory](first_inventory#verifying-the-inventory)
	+ [Protecting sensitive variables with `ansible-vault`](first_inventory#protecting-sensitive-variables-with-ansible-vault)
* [Use Ansible network roles](network_roles)
	+ [Understanding roles](network_roles#understanding-roles)
* [Beyond the basics](intermediate_concepts)
	+ [A typical Ansible filetree](intermediate_concepts#a-typical-ansible-filetree)
	+ [Tracking changes to inventory and playbooks: source control with git](intermediate_concepts#tracking-changes-to-inventory-and-playbooks-source-control-with-git)
* [Working with network connection options](network_connection_options)
	+ [Setting timeout options](network_connection_options#setting-timeout-options)
* [Resources and next steps](network_resources)
	+ [Documents](network_resources#documents)
	+ [Events (on video and in person)](network_resources#events-on-video-and-in-person)
	+ [GitHub repos](network_resources#github-repos)
	+ [IRC and Slack](network_resources#irc-and-slack)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/getting_started/index.html>

Collection Index
================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/).

 * [amazon.aws](amazon/aws/index#plugins-in-amazon-aws)
* [ansible.builtin](ansible/builtin/index#plugins-in-ansible-builtin)
* [ansible.netcommon](ansible/netcommon/index#plugins-in-ansible-netcommon)
* [ansible.posix](ansible/posix/index#plugins-in-ansible-posix)
* [ansible.utils](ansible/utils/index#plugins-in-ansible-utils)
* [ansible.windows](ansible/windows/index#plugins-in-ansible-windows)
* [arista.eos](arista/eos/index#plugins-in-arista-eos)
* [awx.awx](awx/awx/index#plugins-in-awx-awx)
* [azure.azcollection](azure/azcollection/index#plugins-in-azure-azcollection)
* [check\_point.mgmt](check_point/mgmt/index#plugins-in-check-point-mgmt)
* [chocolatey.chocolatey](chocolatey/chocolatey/index#plugins-in-chocolatey-chocolatey)
* [cisco.aci](cisco/aci/index#plugins-in-cisco-aci)
* [cisco.asa](cisco/asa/index#plugins-in-cisco-asa)
* [cisco.intersight](cisco/intersight/index#plugins-in-cisco-intersight)
* [cisco.ios](cisco/ios/index#plugins-in-cisco-ios)
* [cisco.iosxr](cisco/iosxr/index#plugins-in-cisco-iosxr)
* [cisco.meraki](cisco/meraki/index#plugins-in-cisco-meraki)
* [cisco.mso](cisco/mso/index#plugins-in-cisco-mso)
* [cisco.nso](cisco/nso/index#plugins-in-cisco-nso)
* [cisco.nxos](cisco/nxos/index#plugins-in-cisco-nxos)
* [cisco.ucs](cisco/ucs/index#plugins-in-cisco-ucs)
* [cloudscale\_ch.cloud](cloudscale_ch/cloud/index#plugins-in-cloudscale-ch-cloud)
* [community.aws](community/aws/index#plugins-in-community-aws)
* [community.azure](community/azure/index#plugins-in-community-azure)
* [community.crypto](community/crypto/index#plugins-in-community-crypto)
* [community.digitalocean](community/digitalocean/index#plugins-in-community-digitalocean)
* [community.docker](community/docker/index#plugins-in-community-docker)
* [community.fortios](community/fortios/index#plugins-in-community-fortios)
* [community.general](community/general/index#plugins-in-community-general)
* [community.google](community/google/index#plugins-in-community-google)
* [community.grafana](community/grafana/index#plugins-in-community-grafana)
* [community.hashi\_vault](community/hashi_vault/index#plugins-in-community-hashi-vault)
* [community.hrobot](community/hrobot/index#plugins-in-community-hrobot)
* [community.kubernetes](community/kubernetes/index#plugins-in-community-kubernetes)
* [community.kubevirt](community/kubevirt/index#plugins-in-community-kubevirt)
* [community.libvirt](community/libvirt/index#plugins-in-community-libvirt)
* [community.mongodb](community/mongodb/index#plugins-in-community-mongodb)
* [community.mysql](community/mysql/index#plugins-in-community-mysql)
* [community.network](community/network/index#plugins-in-community-network)
* [community.okd](community/okd/index#plugins-in-community-okd)
* [community.postgresql](community/postgresql/index#plugins-in-community-postgresql)
* [community.proxysql](community/proxysql/index#plugins-in-community-proxysql)
* [community.rabbitmq](community/rabbitmq/index#plugins-in-community-rabbitmq)
* [community.routeros](community/routeros/index#plugins-in-community-routeros)
* [community.skydive](community/skydive/index#plugins-in-community-skydive)
* [community.sops](community/sops/index#plugins-in-community-sops)
* [community.vmware](community/vmware/index#plugins-in-community-vmware)
* [community.windows](community/windows/index#plugins-in-community-windows)
* [community.zabbix](community/zabbix/index#plugins-in-community-zabbix)
* [containers.podman](containers/podman/index#plugins-in-containers-podman)
* [cyberark.conjur](cyberark/conjur/index#plugins-in-cyberark-conjur)
* [cyberark.pas](cyberark/pas/index#plugins-in-cyberark-pas)
* [dellemc.enterprise\_sonic](dellemc/enterprise_sonic/index#plugins-in-dellemc-enterprise-sonic)
* [dellemc.openmanage](dellemc/openmanage/index#plugins-in-dellemc-openmanage)
* [dellemc.os10](dellemc/os10/index#plugins-in-dellemc-os10)
* [dellemc.os6](dellemc/os6/index#plugins-in-dellemc-os6)
* [dellemc.os9](dellemc/os9/index#plugins-in-dellemc-os9)
* [f5networks.f5\_modules](f5networks/f5_modules/index#plugins-in-f5networks-f5-modules)
* [fortinet.fortimanager](fortinet/fortimanager/index#plugins-in-fortinet-fortimanager)
* [fortinet.fortios](fortinet/fortios/index#plugins-in-fortinet-fortios)
* [frr.frr](frr/frr/index#plugins-in-frr-frr)
* [gluster.gluster](gluster/gluster/index#plugins-in-gluster-gluster)
* [google.cloud](google/cloud/index#plugins-in-google-cloud)
* [hetzner.hcloud](hetzner/hcloud/index#plugins-in-hetzner-hcloud)
* [hpe.nimble](hpe/nimble/index#plugins-in-hpe-nimble)
* [ibm.qradar](ibm/qradar/index#plugins-in-ibm-qradar)
* [infinidat.infinibox](infinidat/infinibox/index#plugins-in-infinidat-infinibox)
* [inspur.sm](inspur/sm/index#plugins-in-inspur-sm)
* [junipernetworks.junos](junipernetworks/junos/index#plugins-in-junipernetworks-junos)
* [kubernetes.core](kubernetes/core/index#plugins-in-kubernetes-core)
* [mellanox.onyx](mellanox/onyx/index#plugins-in-mellanox-onyx)
* [netapp.aws](netapp/aws/index#plugins-in-netapp-aws)
* [netapp.azure](netapp/azure/index#plugins-in-netapp-azure)
* [netapp.cloudmanager](netapp/cloudmanager/index#plugins-in-netapp-cloudmanager)
* [netapp.elementsw](netapp/elementsw/index#plugins-in-netapp-elementsw)
* [netapp.ontap](netapp/ontap/index#plugins-in-netapp-ontap)
* [netapp.um\_info](netapp/um_info/index#plugins-in-netapp-um-info)
* [netapp\_eseries.santricity](netapp_eseries/santricity/index#plugins-in-netapp-eseries-santricity)
* [netbox.netbox](netbox/netbox/index#plugins-in-netbox-netbox)
* [ngine\_io.cloudstack](ngine_io/cloudstack/index#plugins-in-ngine-io-cloudstack)
* [ngine\_io.exoscale](ngine_io/exoscale/index#plugins-in-ngine-io-exoscale)
* [ngine\_io.vultr](ngine_io/vultr/index#plugins-in-ngine-io-vultr)
* [openstack.cloud](openstack/cloud/index#plugins-in-openstack-cloud)
* [openvswitch.openvswitch](openvswitch/openvswitch/index#plugins-in-openvswitch-openvswitch)
* [ovirt.ovirt](ovirt/ovirt/index#plugins-in-ovirt-ovirt)
* [purestorage.flasharray](purestorage/flasharray/index#plugins-in-purestorage-flasharray)
* [purestorage.flashblade](purestorage/flashblade/index#plugins-in-purestorage-flashblade)
* [sensu.sensu\_go](sensu/sensu_go/index#plugins-in-sensu-sensu-go)
* [servicenow.servicenow](servicenow/servicenow/index#plugins-in-servicenow-servicenow)
* [splunk.es](splunk/es/index#plugins-in-splunk-es)
* [t\_systems\_mms.icinga\_director](t_systems_mms/icinga_director/index#plugins-in-t-systems-mms-icinga-director)
* [theforeman.foreman](theforeman/foreman/index#plugins-in-theforeman-foreman)
* [vyos.vyos](vyos/vyos/index#plugins-in-vyos-vyos)
* [wti.remote](wti/remote/index#plugins-in-wti-remote)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/index.html>

Configuring Ansible
===================

 * [Configuration file](#configuration-file)


	+ [Getting the latest configuration](#getting-the-latest-configuration)
* [Environmental configuration](#environmental-configuration)
* [Command line options](#command-line-options)


This topic describes how to control Ansible settings.

 Configuration file
------------------

 Certain settings in Ansible are adjustable via a configuration file (ansible.cfg). The stock configuration should be sufficient for most users, but there may be reasons you would want to change them. Paths where configuration file is searched are listed in [reference documentation](../reference_appendices/config#ansible-configuration-settings-locations).

 ### Getting the latest configuration

 If installing Ansible from a package manager, the latest `ansible.cfg` file should be present in `/etc/ansible`, possibly as a `.rpmnew` file (or other) as appropriate in the case of updates.

 If you installed Ansible from pip or from source, you may want to create this file in order to override default settings in Ansible.

 An [example file is available on GitHub](https://github.com/ansible/ansible/blob/stable-2.11/examples/ansible.cfg).

 For more details and a full listing of available configurations go to [configuration\_settings](../reference_appendices/config#ansible-configuration-settings). Starting with Ansible version 2.4, you can use the [ansible-config](../cli/ansible-config#ansible-config) command line utility to list your available options and inspect the current values.

 For in-depth details, see [Ansible Configuration Settings](../reference_appendices/config#ansible-configuration-settings).

 Environmental configuration
---------------------------

 Ansible also allows configuration of settings using environment variables. If these environment variables are set, they will override any setting loaded from the configuration file.

 You can get a full listing of available environment variables from [Ansible Configuration Settings](../reference_appendices/config#ansible-configuration-settings).

 Command line options
--------------------

 Not all configuration options are present in the command line, just the ones deemed most useful or common. Settings in the command line will override those passed through the configuration file and the environment.

 The full list of options available is in [ansible-playbook](../cli/ansible-playbook#ansible-playbook) and [ansible](../cli/ansible#ansible).



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/installation_guide/intro_configuration.html>

Special Variables
=================

 Magic variables
---------------

 These variables cannot be set directly by the user; Ansible will always override them to reflect internal state.

  ansible\_check\_mode

Boolean that indicates if we are in check mode or not

  ansible\_config\_file

The full path of used Ansible configuration file

  ansible\_dependent\_role\_names

The names of the roles currently imported into the current play as dependencies of other plays

  ansible\_diff\_mode

Boolean that indicates if we are in diff mode or not

  ansible\_forks

Integer reflecting the number of maximum forks available to this run

  ansible\_inventory\_sources

List of sources used as inventory

  ansible\_limit

Contents of the `--limit` CLI option for the current execution of Ansible

  ansible\_loop

A dictionary/map containing extended loop information when enabled via `loop_control.extended`

  ansible\_loop\_var

The name of the value provided to `loop_control.loop_var`. Added in `2.8`

  ansible\_index\_var

The name of the value provided to `loop_control.index_var`. Added in `2.9`

  ansible\_parent\_role\_names

When the current role is being executed by means of an [include\_role](../collections/ansible/builtin/include_role_module#include-role-module) or [import\_role](../collections/ansible/builtin/import_role_module#import-role-module) action, this variable contains a list of all parent roles, with the most recent role (in other words, the role that included/imported this role) being the first item in the list. When multiple inclusions occur, this list lists the *last* role (in other words, the role that included this role) as the *first* item in the list. It is also possible that a specific role exists more than once in this list.

 For example: When role **A** includes role **B**, inside role B, `ansible_parent_role_names` will equal to `['A']`. If role **B** then includes role **C**, the list becomes `['B', 'A']`.

  ansible\_parent\_role\_paths

When the current role is being executed by means of an [include\_role](../collections/ansible/builtin/include_role_module#include-role-module) or [import\_role](../collections/ansible/builtin/import_role_module#import-role-module) action, this variable contains a list of all parent roles, with the most recent role (in other words, the role that included/imported this role) being the first item in the list. Please refer to `ansible_parent_role_names` for the order of items in this list.

  ansible\_play\_batch

List of active hosts in the current play run limited by the serial, aka ‘batch’. Failed/Unreachable hosts are not considered ‘active’.

  ansible\_play\_hosts

List of hosts in the current play run, not limited by the serial. Failed/Unreachable hosts are excluded from this list.

  ansible\_play\_hosts\_all

List of all the hosts that were targeted by the play

  ansible\_play\_role\_names

The names of the roles currently imported into the current play. This list does **not** contain the role names that are implicitly included via dependencies.

  ansible\_playbook\_python

The path to the python interpreter being used by Ansible on the controller

  ansible\_role\_names

The names of the roles currently imported into the current play, or roles referenced as dependencies of the roles imported into the current play.

  ansible\_role\_name

The fully qualified collection role name, in the format of `namespace.collection.role_name`

  ansible\_collection\_name

The name of the collection the task that is executing is a part of. In the format of `namespace.collection`

  ansible\_run\_tags

Contents of the `--tags` CLI option, which specifies which tags will be included for the current run. Note that if `--tags` is not passed, this variable will default to `["all"]`.

  ansible\_search\_path

Current search path for action plugins and lookups, in other words, where we search for relative paths when you do `template: src=myfile`

  ansible\_skip\_tags

Contents of the `--skip-tags` CLI option, which specifies which tags will be skipped for the current run.

  ansible\_verbosity

Current verbosity setting for Ansible

  ansible\_version

Dictionary/map that contains information about the current running version of ansible, it has the following keys: full, major, minor, revision and string.

  group\_names

List of groups the current host is part of

  groups

A dictionary/map with all the groups in inventory and each group has the list of hosts that belong to it

  hostvars

A dictionary/map with all the hosts in inventory and variables assigned to them

  inventory\_hostname

The inventory name for the ‘current’ host being iterated over in the play

  inventory\_hostname\_short

The short version of `inventory_hostname`

  inventory\_dir

The directory of the inventory source in which the `inventory_hostname` was first defined

  inventory\_file

The file name of the inventory source in which the `inventory_hostname` was first defined

  omit

Special variable that allows you to ‘omit’ an option in a task, for example `- user: name=bob home={{ bobs_home|default(omit) }}`

  play\_hosts

Deprecated, the same as ansible\_play\_batch

  ansible\_play\_name

The name of the currently executed play. Added in `2.8`. (`name` attribute of the play, not file name of the playbook.)

  playbook\_dir

The path to the directory of the playbook that was passed to the `ansible-playbook` command line.

  role\_name

The name of the role currently being executed.

  role\_names

Deprecated, the same as ansible\_play\_role\_names

  role\_path

The path to the dir of the currently running role

   Facts
-----

 These are variables that contain information pertinent to the current host (`inventory_hostname`). They are only available if gathered first. See [Discovering variables: facts and magic variables](../user_guide/playbooks_vars_facts#vars-and-facts) for more information.

  ansible\_facts

Contains any facts gathered or cached for the `inventory_hostname` Facts are normally gathered by the [setup](../collections/ansible/builtin/setup_module#setup-module) module automatically in a play, but any module can return facts.

  ansible\_local

Contains any ‘local facts’ gathered or cached for the `inventory_hostname`. The keys available depend on the custom facts created. See the [setup](../collections/ansible/builtin/setup_module#setup-module) module and [facts.d or local facts](../user_guide/playbooks_vars_facts#local-facts) for more details.

   Connection variables
--------------------

 Connection variables are normally used to set the specifics on how to execute actions on a target. Most of them correspond to connection plugins, but not all are specific to them; other plugins like shell, terminal and become are normally involved. Only the common ones are described as each connection/become/shell/etc plugin can define its own overrides and specific variables. See [Controlling how Ansible behaves: precedence rules](general_precedence#general-precedence-rules) for how connection variables interact with [configuration settings](config#ansible-configuration-settings), [command-line options](../user_guide/command_line_tools#command-line-tools), and [playbook keywords](playbooks_keywords#playbook-keywords).

  ansible\_become\_user

The user Ansible ‘becomes’ after using privilege escalation. This must be available to the ‘login user’.

  ansible\_connection

The connection plugin actually used for the task on the target host.

  ansible\_host

The ip/name of the target host to use instead of `inventory_hostname`.

  ansible\_python\_interpreter

The path to the Python executable Ansible should use on the target host.

  ansible\_user

The user Ansible ‘logs in’ as.

  

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html>

Run Your First Command and Playbook
===================================

 Put the concepts you learned to work with this quick tutorial. Install Ansible, execute a network configuration command manually, execute the same command with Ansible, then create a playbook so you can execute the command any time on multiple network devices.

 * [Prerequisites](#prerequisites)
* [Install Ansible](#install-ansible)
* [Establish a manual connection to a managed node](#establish-a-manual-connection-to-a-managed-node)
* [Run your first network Ansible command](#run-your-first-network-ansible-command)
* [Create and run your first network Ansible Playbook](#create-and-run-your-first-network-ansible-playbook)
* [Gathering facts from network devices](#gathering-facts-from-network-devices)

 Prerequisites
-------------

 Before you work through this tutorial you need:

 * Ansible 2.10 (or higher) installed
* One or more network devices that are compatible with Ansible
* Basic Linux command line knowledge
* Basic knowledge of network switch & router configuration

 Install Ansible
---------------

 Install Ansible using your preferred method. See [Installing Ansible](../../installation_guide/intro_installation#installation-guide). Then return to this tutorial.

 Confirm the version of Ansible (must be >= 2.10):

 
```
ansible --version

```
 Establish a manual connection to a managed node
-----------------------------------------------

 To confirm your credentials, connect to a network device manually and retrieve its configuration. Replace the sample user and device name with your real credentials. For example, for a VyOS router:

 
```
ssh my_vyos_user@vyos.example.net
show config
exit

```
 This manual connection also establishes the authenticity of the network device, adding its RSA key fingerprint to your list of known hosts. (If you have connected to the device before, you have already established its authenticity.)

 Run your first network Ansible command
--------------------------------------

 Instead of manually connecting and running a command on the network device, you can retrieve its configuration with a single, stripped-down Ansible command:

 
```
ansible all -i vyos.example.net, -c ansible.netcommon.network_cli -u my_vyos_user -k -m vyos.vyos.vyos_facts -e ansible_network_os=vyos.vyos.vyos

```
  The flags in this command set seven values:

* the host group(s) to which the command should apply (in this case, all)
* the inventory (-i, the device or devices to target - without the trailing comma -i points to an inventory file)
* the connection method (-c, the method for connecting and executing ansible)
* the user (-u, the username for the SSH connection)
* the SSH connection method (-k, please prompt for the password)
* the module (-m, the Ansible module to run, using the fully qualified collection name (FQCN))
* an extra variable ( -e, in this case, setting the network OS value)

   NOTE: If you use `ssh-agent` with ssh keys, Ansible loads them automatically. You can omit `-k` flag.

  Note

 If you are running Ansible in a virtual environment, you will also need to add the variable `ansible_python_interpreter=/path/to/venv/bin/python`

  Create and run your first network Ansible Playbook
--------------------------------------------------

 If you want to run this command every day, you can save it in a playbook and run it with `ansible-playbook` instead of `ansible`. The playbook can store a lot of the parameters you provided with flags at the command line, leaving less to type at the command line. You need two files for this - a playbook and an inventory file.

 1. Download [`first_playbook.yml`](../../_downloads/588d4b6e9316c8eb903fbe2485b14d64/first_playbook.yml), which looks like this:

 
```
---

- name: Network Getting Started First Playbook
  connection: ansible.netcommon.network_cli
  gather_facts: false
  hosts: all
  tasks:

    - name: Get config for VyOS devices
      vyos.vyos.vyos_facts:
        gather_subset: all

    - name: Display the config
      debug:
        msg: "The hostname is {{ ansible_net_hostname }} and the OS is {{ ansible_net_version }}"

```
 The playbook sets three of the seven values from the command line above: the group (`hosts: all`), the connection method (`connection: ansible.netcommon.network_cli`) and the module (in each task). With those values set in the playbook, you can omit them on the command line. The playbook also adds a second task to show the config output. When a module runs in a playbook, the output is held in memory for use by future tasks instead of written to the console. The debug task here lets you see the results in your shell.

 2. Run the playbook with the command:

 
```
ansible-playbook -i vyos.example.net, -u ansible -k -e ansible_network_os=vyos.vyos.vyos first_playbook.yml

```
 The playbook contains one play with two tasks, and should generate output like this:

 
```
$ ansible-playbook -i vyos.example.net, -u ansible -k -e ansible_network_os=vyos.vyos.vyos first_playbook.yml

PLAY [First Playbook]
***************************************************************************************************************************

TASK [Get config for VyOS devices]
***************************************************************************************************************************
ok: [vyos.example.net]

TASK [Display the config]
***************************************************************************************************************************
ok: [vyos.example.net] => {
    "msg": "The hostname is vyos and the OS is VyOS 1.1.8"
}

```
 3. Now that you can retrieve the device config, try updating it with Ansible. Download [`first_playbook_ext.yml`](../../_downloads/47cc11a5d29fe635cb56cb6e1cd74e0f/first_playbook_ext.yml), which is an extended version of the first playbook:

 
```
---

- name: Network Getting Started First Playbook Extended
  connection: ansible.netcommon.network_cli
  gather_facts: false
  hosts: all
  tasks:

    - name: Get config for VyOS devices
      vyos.vyos.vyos_facts:
        gather_subset: all

    - name: Display the config
      debug:
        msg: "The hostname is {{ ansible_net_hostname }} and the OS is {{ ansible_net_version }}"

    - name: Update the hostname
      vyos.vyos.vyos_config:
        backup: yes
        lines:
          - set system host-name vyos-changed

    - name: Get changed config for VyOS devices
      vyos.vyos.vyos_facts:
        gather_subset: all

    - name: Display the changed config
      debug:
        msg: "The new hostname is {{ ansible_net_hostname }} and the OS is {{ ansible_net_version }}"

```
 The extended first playbook has four tasks in a single play. Run it with the same command you used above. The output shows you the change Ansible made to the config:

 
```
$ ansible-playbook -i vyos.example.net, -u ansible -k -e ansible_network_os=vyos.vyos.vyos first_playbook_ext.yml

PLAY [First Playbook]
************************************************************************************************************************************

TASK [Get config for VyOS devices]
**********************************************************************************************************************************
ok: [vyos.example.net]

TASK [Display the config]
*************************************************************************************************************************************
ok: [vyos.example.net] => {
    "msg": "The hostname is vyos and the OS is VyOS 1.1.8"
}

TASK [Update the hostname]
*************************************************************************************************************************************
changed: [vyos.example.net]

TASK [Get changed config for VyOS devices]
*************************************************************************************************************************************
ok: [vyos.example.net]

TASK [Display the changed config]
*************************************************************************************************************************************
ok: [vyos.example.net] => {
    "msg": "The new hostname is vyos-changed and the OS is VyOS 1.1.8"
}

PLAY RECAP
************************************************************************************************************************************
vyos.example.net           : ok=5    changed=1    unreachable=0    failed=0

```
 Gathering facts from network devices
------------------------------------

 The `gather_facts` keyword now supports gathering network device facts in standardized key/value pairs. You can feed these network facts into further tasks to manage the network device.

 You can also use the new `gather_network_resources` parameter with the network `*_facts` modules (such as [arista.eos.eos\_facts](../../collections/arista/eos/eos_facts_module#ansible-collections-arista-eos-eos-facts-module)) to return just a subset of the device configuration, as shown below.

 
```
- hosts: arista
  gather_facts: True
  gather_subset: interfaces
  module_defaults:
    arista.eos.eos_facts:
      gather_network_resources: interfaces

```
 The playbook returns the following interface facts:

 
```
"network_resources": {
      "interfaces": [
          {
              "description": "test-interface",
              "enabled": true,
              "mtu": "512",
              "name": "Ethernet1"
          },
          {
              "enabled": true,
              "mtu": "3000",
              "name": "Ethernet2"
          },
          {
              "enabled": true,
              "name": "Ethernet3"
          },
          {
              "enabled": true,
              "name": "Ethernet4"
          },
          {
              "enabled": true,
              "name": "Ethernet5"
          },
          {
              "enabled": true,
              "name": "Ethernet6"
          },
      ]
  }

```
 Note that this returns a subset of what is returned by just setting `gather_subset: interfaces`.

 You can store these facts and use them directly in another task, such as with the [eos\_interfaces](../../collections/arista/eos/eos_interfaces_module#ansible-collections-arista-eos-eos-interfaces-module) resource module.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/getting_started/first_playbook.html>

Network Technology Guides
=========================

 The guides in this section cover using Ansible with specific network technologies. They explore particular use cases in greater depth and provide a more “top-down” explanation of some basic features.

 * [Cisco ACI Guide](guide_aci)
* [Cisco Meraki Guide](guide_meraki)
* [Infoblox Guide](guide_infoblox)

 To learn more about Network Automation with Ansible, see [Network Getting Started](../network/getting_started/index#network-getting-started) and [Network Advanced Topics](../network/user_guide/index#network-advanced).



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/network_guides.html>

Logging Ansible output
======================

 By default Ansible sends output about plays, tasks, and module arguments to your screen (STDOUT) on the control node. If you want to capture Ansible output in a log, you have three options:

 * To save Ansible output in a single log on the control node, set the `log_path` [configuration file setting](../installation_guide/intro_configuration#intro-configuration). You may also want to set `display_args_to_stdout`, which helps to differentiate similar tasks by including variable values in the Ansible output.
* To save Ansible output in separate logs, one on each managed node, set the `no_target_syslog` and `syslog_facility` [configuration file settings](../installation_guide/intro_configuration#intro-configuration).
* To save Ansible output to a secure database, use AWX or [Red Hat Ansible Automation Platform](https://docs.ansible.com/ansible/latest/reference_appendices/tower.html#ansible-platform). You can then review history based on hosts, projects, and particular inventories over time, using graphs and/or a REST API.

 Protecting sensitive data with `no_log`
---------------------------------------

 If you save Ansible output to a log, you expose any secret data in your Ansible output, such as passwords and user names. To keep sensitive values out of your logs, mark tasks that expose them with the `no_log: True` attribute. However, the `no_log` attribute does not affect debugging output, so be careful not to debug playbooks in a production environment. See [How do I keep secret data in my playbook?](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#keep-secret-data) for an example.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/reference_appendices/logging.html>

Basic Concepts
==============

 These concepts are common to all uses of Ansible, including network automation. You need to understand them to use Ansible for network automation. This basic introduction provides the background you need to follow the examples in this guide.

 * [Control node](#control-node)
* [Managed nodes](#managed-nodes)
* [Inventory](#inventory)
* [Collections](#collections)
* [Modules](#modules)
* [Tasks](#tasks)
* [Playbooks](#playbooks)

 Control node
------------

 Any machine with Ansible installed. You can run Ansible commands and playbooks by invoking the `ansible` or `ansible-playbook` command from any control node. You can use any computer that has a Python installation as a control node - laptops, shared desktops, and servers can all run Ansible. However, you cannot use a Windows machine as a control node. You can have multiple control nodes.

 Managed nodes
-------------

 The network devices (and/or servers) you manage with Ansible. Managed nodes are also sometimes called “hosts”. Ansible is not installed on managed nodes.

 Inventory
---------

 A list of managed nodes. An inventory file is also sometimes called a “hostfile”. Your inventory can specify information like IP address for each managed node. An inventory can also organize managed nodes, creating and nesting groups for easier scaling. To learn more about inventory, see [the Working with Inventory](../../user_guide/intro_inventory#intro-inventory) section.

 Collections
-----------

 Collections are a distribution format for Ansible content that can include playbooks, roles, modules, and plugins. You can install and use collections through [Ansible Galaxy](https://galaxy.ansible.com). To learn more about collections, see [Using collections](../../user_guide/collections_using#collections).

 Modules
-------

 The units of code Ansible executes. Each module has a particular use, from administering users on a specific type of database to managing VLAN interfaces on a specific type of network device. You can invoke a single module with a task, or invoke several different modules in a playbook. Starting in Ansible 2.10, modules are grouped in collections. For an idea of how many collections Ansible includes, take a look at the [Collection Index](../../collections/index#list-of-collections).

 Tasks
-----

 The units of action in Ansible. You can execute a single task once with an ad hoc command.

 Playbooks
---------

 Ordered lists of tasks, saved so you can run those tasks in that order repeatedly. Playbooks can include variables as well as tasks. Playbooks are written in YAML and are easy to read, write, share and understand. To learn more about playbooks, see [Intro to playbooks](../../user_guide/playbooks_intro#about-playbooks).



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/getting_started/basic_concepts.html>

How Network Automation is Different
===================================

 Network automation leverages the basic Ansible concepts, but there are important differences in how the network modules work. This introduction prepares you to understand the exercises in this guide.

 * [Execution on the control node](#execution-on-the-control-node)
* [Multiple communication protocols](#multiple-communication-protocols)
* [Collections organized by network platform](#collections-organized-by-network-platform)
* [Privilege Escalation: `enable` mode, `become`, and `authorize`](#privilege-escalation-enable-mode-become-and-authorize)


	+ [Using `become` for privilege escalation](#using-become-for-privilege-escalation)

 Execution on the control node
-----------------------------

 Unlike most Ansible modules, network modules do not run on the managed nodes. From a user’s point of view, network modules work like any other modules. They work with ad hoc commands, playbooks, and roles. Behind the scenes, however, network modules use a different methodology than the other (Linux/Unix and Windows) modules use. Ansible is written and executed in Python. Because the majority of network devices can not run Python, the Ansible network modules are executed on the Ansible control node, where `ansible` or `ansible-playbook` runs.

 Network modules also use the control node as a destination for backup files, for those modules that offer a `backup` option. With Linux/Unix modules, where a configuration file already exists on the managed node(s), the backup file gets written by default in the same directory as the new, changed file. Network modules do not update configuration files on the managed nodes, because network configuration is not written in files. Network modules write backup files on the control node, usually in the `backup` directory under the playbook root directory.

 Multiple communication protocols
--------------------------------

 Because network modules execute on the control node instead of on the managed nodes, they can support multiple communication protocols. The communication protocol (XML over SSH, CLI over SSH, API over HTTPS) selected for each network module depends on the platform and the purpose of the module. Some network modules support only one protocol; some offer a choice. The most common protocol is CLI over SSH. You set the communication protocol with the `ansible_connection` variable:

 

| Value of ansible\_connection | Protocol | Requires | Persistent? |
| --- | --- | --- | --- |
| ansible.netcommon.network\_cli | CLI over SSH | network\_os setting | yes |
| ansible.netcommon.netconf | XML over SSH | network\_os setting | yes |
| ansible.netcommon.httpapi | API over HTTP/HTTPS | network\_os setting | yes |
| local | depends on provider | provider setting | no |

  Note

 `ansible.netcommon.httpapi` deprecates `eos_eapi` and `nxos_nxapi`. See [Httpapi Plugins](../../plugins/httpapi#httpapi-plugins) for details and an example.

  The `ansible_connection: local` has been deprecated. Please use one of the persistent connection types listed above instead. With persistent connections, you can define the hosts and credentials only once, rather than in every task. You also need to set the `network_os` variable for the specific network platform you are communicating with. For more details on using each connection type on various platforms, see the [platform-specific](../user_guide/platform_index#platform-options) pages.

 Collections organized by network platform
-----------------------------------------

 A network platform is a set of network devices with a common operating system that can be managed by an Ansible collection, for example:

 * Arista: [arista.eos](https://galaxy.ansible.com/arista/eos)
* Cisco: [cisco.ios](https://galaxy.ansible.com/cisco/ios), [cisco.iosxr](https://galaxy.ansible.com/cisco/iosxr), [cisco.nxos](https://galaxy.ansible.com/cisco/nxos)
* Juniper: [junipernetworks.junos](https://galaxy.ansible.com/junipernetworks/junos)
* VyOS [vyos.vyos](https://galaxy.ansible.com/vyos/vyos)

 All modules within a network platform share certain requirements. Some network platforms have specific differences - see the [platform-specific](../user_guide/platform_index#platform-options) documentation for details.

 Privilege Escalation: `enable` mode, `become`, and `authorize`
--------------------------------------------------------------

 Several network platforms support privilege escalation, where certain tasks must be done by a privileged user. On network devices this is called the `enable` mode (the equivalent of `sudo` in \*nix administration). Ansible network modules offer privilege escalation for those network devices that support it. For details of which platforms support `enable` mode, with examples of how to use it, see the [platform-specific](../user_guide/platform_index#platform-options) documentation.

 ### Using `become` for privilege escalation

 Use the top-level Ansible parameter `become: yes` with `become_method: enable` to run a task, play, or playbook with escalated privileges on any network platform that supports privilege escalation. You must use either `connection: network_cli` or `connection: httpapi` with `become: yes` with `become_method: enable`. If you are using `network_cli` to connect Ansible to your network devices, a `group_vars` file would look like:

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: cisco.ios.ios
ansible_become: yes
ansible_become_method: enable

```
 For more information, see [Become and Networks](../../user_guide/become#become-network)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/getting_started/network_differences.html>

Return Values
=============

 * [Common](#common)


	+ [backup\_file](#backup-file)
	+ [changed](#changed)
	+ [diff](#diff)
	+ [failed](#failed)
	+ [invocation](#invocation)
	+ [msg](#msg)
	+ [rc](#rc)
	+ [results](#results)
	+ [skipped](#skipped)
	+ [stderr](#stderr)
	+ [stderr\_lines](#stderr-lines)
	+ [stdout](#stdout)
	+ [stdout\_lines](#stdout-lines)
* [Internal use](#internal-use)


	+ [ansible\_facts](#ansible-facts)
	+ [exception](#exception)
	+ [warnings](#warnings)
	+ [deprecations](#deprecations)


Ansible modules normally return a data structure that can be registered into a variable, or seen directly when output by the `ansible` program. Each module can optionally document its own unique return values (visible through ansible-doc and on the [main docsite](../index#ansible-documentation)).

 This document covers return values common to all modules.

  Note

 Some of these keys might be set by Ansible itself once it processes the module’s return information.

  Common
------

 ### backup\_file

 For those modules that implement `backup=no|yes` when manipulating files, a path to the backup file created.

 
```
"backup_file": "./foo.txt.32729.2020-07-30@06:24:19~"

```
 ### changed

 A boolean indicating if the task had to make changes to the target or delegated host.

 
```
"changed": true

```
 ### diff

 Information on differences between the previous and current state. Often a dictionary with entries `before` and `after`, which will then be formatted by the callback plugin to a diff view.

 
```
"diff": [
        {
            "after": "",
            "after_header": "foo.txt (content)",
            "before": "",
            "before_header": "foo.txt (content)"
        },
        {
            "after_header": "foo.txt (file attributes)",
            "before_header": "foo.txt (file attributes)"
        }

```
 ### failed

 A boolean that indicates if the task was failed or not.

 
```
"failed": false

```
 ### invocation

 Information on how the module was invoked.

 
```
"invocation": {
        "module_args": {
            "_original_basename": "foo.txt",
            "attributes": null,
            "backup": true,
            "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
            "content": null,
            "delimiter": null,
            "dest": "./foo.txt",
            "directory_mode": null,
            "follow": false,
            "force": true,
            "group": null,
            "local_follow": null,
            "mode": "666",
            "owner": null,
            "regexp": null,
            "remote_src": null,
            "selevel": null,
            "serole": null,
            "setype": null,
            "seuser": null,
            "src": "/Users/foo/.ansible/tmp/ansible-tmp-1596115458.110205-105717464505158/source",
            "unsafe_writes": null,
            "validate": null
        }

```
 ### msg

 A string with a generic message relayed to the user.

 
```
"msg": "line added"

```
 ### rc

 Some modules execute command line utilities or are geared for executing commands directly (raw, shell, command, and so on), this field contains ‘return code’ of these utilities.

 
```
"rc": 257

```
 ### results

 If this key exists, it indicates that a loop was present for the task and that it contains a list of the normal module ‘result’ per item.

 
```
"results": [
    {
        "ansible_loop_var": "item",
        "backup": "foo.txt.83170.2020-07-30@07:03:05~",
        "changed": true,
        "diff": [
            {
                "after": "",
                "after_header": "foo.txt (content)",
                "before": "",
                "before_header": "foo.txt (content)"
            },
            {
                "after_header": "foo.txt (file attributes)",
                "before_header": "foo.txt (file attributes)"
            }
        ],
        "failed": false,
        "invocation": {
            "module_args": {
                "attributes": null,
                "backrefs": false,
                "backup": true
            }
        },
        "item": "foo",
        "msg": "line added"
    },
    {
        "ansible_loop_var": "item",
        "backup": "foo.txt.83187.2020-07-30@07:03:05~",
        "changed": true,
        "diff": [
            {
                "after": "",
                "after_header": "foo.txt (content)",
                "before": "",
                "before_header": "foo.txt (content)"
            },
            {
                "after_header": "foo.txt (file attributes)",
                "before_header": "foo.txt (file attributes)"
            }
        ],
        "failed": false,
        "invocation": {
            "module_args": {
                "attributes": null,
                "backrefs": false,
                "backup": true
            }
        },
        "item": "bar",
        "msg": "line added"
    }
    ]

```
 ### skipped

 A boolean that indicates if the task was skipped or not

 
```
"skipped": true

```
 ### stderr

 Some modules execute command line utilities or are geared for executing commands directly (raw, shell, command, and so on), this field contains the error output of these utilities.

 
```
"stderr": "ls: foo: No such file or directory"

```
 ### stderr\_lines

 When `stderr` is returned we also always provide this field which is a list of strings, one item per line from the original.

 
```
"stderr_lines": [
        "ls: doesntexist: No such file or directory"
        ]

```
 ### stdout

 Some modules execute command line utilities or are geared for executing commands directly (raw, shell, command, and so on). This field contains the normal output of these utilities.

 
```
"stdout": "foo!"

```
 ### stdout\_lines

 When `stdout` is returned, Ansible always provides a list of strings, each containing one item per line from the original output.

 
```
"stdout_lines": [
"foo!"
]

```
 Internal use
------------

 These keys can be added by modules but will be removed from registered variables; they are ‘consumed’ by Ansible itself.

 ### ansible\_facts

 This key should contain a dictionary which will be appended to the facts assigned to the host. These will be directly accessible and don’t require using a registered variable.

 ### exception

 This key can contain traceback information caused by an exception in a module. It will only be displayed on high verbosity (-vvv).

 ### warnings

 This key contains a list of strings that will be presented to the user.

 ### deprecations

 This key contains a list of dictionaries that will be presented to the user. Keys of the dictionaries are `msg` and `version`, values are string, value for the `version` key can be an empty string.

  See also

  [Collection Index](../collections/index#list-of-collections)

Browse existing collections, modules, and plugins

  [GitHub modules directory](https://github.com/ansible/ansible/tree/devel/lib/ansible/modules)

Browse source of core and extras modules

  [Mailing List](https://groups.google.com/group/ansible-devel)

Development mailing list

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html>

Ansible Automation Hub
======================

 [Ansible Automation Hub](https://www.ansible.com/products/automation-hub) is the official location to discover and download supported [collections](../user_guide/collections_using#collections), included as part of an Ansible Automation Platform subscription. These content collections contain modules, plugins, roles, and playbooks in a downloadable package.

 Ansible Automation Hub gives you direct access to trusted content collections from Red Hat and Certified Partners. You can find content by topic or Ansible Partner organizations.

 Ansible Automation Hub is the downstream Red Hat supported product version of Ansible Galaxy. Find out more about Ansible Automation Hub features and how to access it at [Ansible Automation Hub](https://www.ansible.com/products/automation-hub). Ansible Automation Hub is part of the Red Hat Ansible Automation Platform subscription, and comes bundled with support from Red Hat, Inc.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/reference_appendices/automationhub.html>

Ansible Reference: Module Utilities
===================================

 This page documents utilities intended to be helpful when writing Ansible modules in Python.

 AnsibleModule
-------------

 To use this functionality, include `from ansible.module_utils.basic import AnsibleModule` in your module.

   *class* ansible.module\_utils.basic.AnsibleModule(*argument\_spec*, *bypass\_checks=False*, *no\_log=False*, *mutually\_exclusive=None*, *required\_together=None*, *required\_one\_of=None*, *add\_file\_common\_args=False*, *supports\_check\_mode=False*, *required\_if=None*, *required\_by=None*)
 
Common code for quickly building an ansible module in Python (although you can write modules with anything that can return JSON).

 See [Developing Ansible modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#developing-modules-general) for a general introduction and [Ansible module architecture](https://docs.ansible.com/ansible/latest/dev_guide/developing_program_flow_modules.html#developing-program-flow-modules) for more detailed explanation.

   add\_path\_info(*kwargs*)
 
for results that are files, supplement the info about the file in the return path with stats about the file path.

 
   atomic\_move(*src*, *dest*, *unsafe\_writes=False*)
 
atomically move src to dest, copying attributes from dest, returns true on success it uses os.rename to ensure this as it is an atomic operation, rest of the function is to work around limitations, corner cases and ensure selinux context is saved if possible

 
   backup\_local(*fn*)
 
make a date-marked backup of the specified file, return True or False on success or failure

 
   boolean(*arg*)
 
Convert the argument to a boolean

 
   digest\_from\_file(*filename*, *algorithm*)
 
Return hex digest of local file for a digest\_method specified by name, or None if file is not present.

 
   exit\_json(*\*\*kwargs*)
 
return from the module, without error

 
   fail\_json(*msg*, *\*\*kwargs*)
 
return from the module, with an error message

 
   find\_mount\_point(*path*)
  Takes a path and returns it’s mount point

  Parameters 
**path** – a string type with a filesystem path

  Returns 
the path to the mount point as a text type

   
   get\_bin\_path(*arg*, *required=False*, *opt\_dirs=None*)
 
Find system executable in PATH.

  Parameters 
* **arg** – The executable to find.
* **required** – if executable is not found and required is `True`, fail\_json
* **opt\_dirs** – optional list of directories to search in addition to `PATH`

  Returns 
if found return full path; otherwise return None

   
   is\_executable(*path*)
 
is the given path executable?

  Parameters 
**path** – The path of the file to check.

   Limitations:

 * Does not account for FSACLs.
* Most times we really want to know “Can the current user execute this file”. This function does not tell us that, only if any execute bit is set.

 
   is\_special\_selinux\_path(*path*)
 
Returns a tuple containing (True, selinux\_context) if the given path is on a NFS or other ‘special’ fs mount point, otherwise the return will be (False, None).

 
   load\_file\_common\_arguments(*params*, *path=None*)
 
many modules deal with files, this encapsulates common options that the file module accepts such that it is directly available to all modules and they can share code.

 Allows to overwrite the path/dest module argument by providing path.

 
   md5(*filename*)
 
Return MD5 hex digest of local file using digest\_from\_file().

  Do not use this function unless you have no other choice for:

1. Optional backwards compatibility
2. Compatibility with a third party protocol

   This function will not work on systems complying with FIPS-140-2.

 Most uses of this function can use the module.sha1 function instead.

 
   preserved\_copy(*src*, *dest*)
 
Copy a file with preserved ownership, permissions and context

 
   run\_command(*args*, *check\_rc=False*, *close\_fds=True*, *executable=None*, *data=None*, *binary\_data=False*, *path\_prefix=None*, *cwd=None*, *use\_unsafe\_shell=False*, *prompt\_regex=None*, *environ\_update=None*, *umask=None*, *encoding='utf-8'*, *errors='surrogate\_or\_strict'*, *expand\_user\_and\_vars=True*, *pass\_fds=None*, *before\_communicate\_callback=None*, *ignore\_invalid\_cwd=True*)
 
Execute a command, returns rc, stdout, and stderr.

  Parameters 
**args** – is the command to run \* If args is a list, the command will be run with shell=False. \* If args is a string and use\_unsafe\_shell=False it will split args to a list and run with shell=False \* If args is a string and use\_unsafe\_shell=True it runs with shell=True.

  Kw check\_rc 
Whether to call fail\_json in case of non zero RC. Default False

  Kw close\_fds 
See documentation for subprocess.Popen(). Default True

  Kw executable 
See documentation for subprocess.Popen(). Default None

  Kw data 
If given, information to write to the stdin of the command

  Kw binary\_data 
If False, append a newline to the data. Default False

  Kw path\_prefix 
If given, additional path to find the command in. This adds to the PATH environment variable so helper commands in the same directory can also be found

  Kw cwd 
If given, working directory to run the command inside

  Kw use\_unsafe\_shell 
See `args` parameter. Default False

  Kw prompt\_regex 
Regex string (not a compiled regex) which can be used to detect prompts in the stdout which would otherwise cause the execution to hang (especially if no input data is specified)

  Kw environ\_update 
dictionary to *update* os.environ with

  Kw umask 
Umask to be used when running the command. Default None

  Kw encoding 
Since we return native strings, on python3 we need to know the encoding to use to transform from bytes to text. If you want to always get bytes back, use encoding=None. The default is “utf-8”. This does not affect transformation of strings given as args.

  Kw errors 
Since we return native strings, on python3 we need to transform stdout and stderr from bytes to text. If the bytes are undecodable in the `encoding` specified, then use this error handler to deal with them. The default is `surrogate_or_strict` which means that the bytes will be decoded using the surrogateescape error handler if available (available on all python3 versions we support) otherwise a UnicodeError traceback will be raised. This does not affect transformations of strings given as args.

  Kw expand\_user\_and\_vars 
When `use_unsafe_shell=False` this argument dictates whether `~` is expanded in paths and environment variables are expanded before running the command. When `True` a string such as `$SHELL` will be expanded regardless of escaping. When `False` and `use_unsafe_shell=False` no path or variable expansion will be done.

  Kw pass\_fds 
When running on Python 3 this argument dictates which file descriptors should be passed to an underlying `Popen` constructor. On Python 2, this will set `close_fds` to False.

  Kw before\_communicate\_callback 
This function will be called after `Popen` object will be created but before communicating to the process. (`Popen` object will be passed to callback as a first argument)

  Kw ignore\_invalid\_cwd 
This flag indicates whether an invalid `cwd` (non-existent or not a directory) should be ignored or should raise an exception.

  Returns 
A 3-tuple of return code (integer), stdout (native string), and stderr (native string). On python2, stdout and stderr are both byte strings. On python3, stdout and stderr are text strings converted according to the encoding and errors parameters. If you want byte strings on python3, use encoding=None to turn decoding to text off.

   
   sha1(*filename*)
 
Return SHA1 hex digest of local file using digest\_from\_file().

 
   sha256(*filename*)
 
Return SHA-256 hex digest of local file using digest\_from\_file().

 
 
 Basic
-----

 To use this functionality, include `import ansible.module_utils.basic` in your module.

  
`ansible.module_utils.basic.get_all_subclasses(cls)`  
**Deprecated**: Use ansible.module\_utils.common.\_utils.get\_all\_subclasses instead

 
  
`ansible.module_utils.basic.get_platform()`  
**Deprecated** Use [`platform.system()`](https://docs.python.org/3/library/platform.html#platform.system "(in Python v3.10)") directly.

  Returns 
Name of the platform the module is running on in a native string

   Returns a native string that labels the platform (“Linux”, “Solaris”, etc). Currently, this is the result of calling [`platform.system()`](https://docs.python.org/3/library/platform.html#platform.system "(in Python v3.10)").

 
  
`ansible.module_utils.basic.heuristic_log_sanitize(data, no_log_values=None)`  
Remove strings that look like passwords from log messages

 
  
`ansible.module_utils.basic.load_platform_subclass(cls, *args, **kwargs)`  
**Deprecated**: Use ansible.module\_utils.common.sys\_info.get\_platform\_subclass instead

 
 Argument Spec
-------------

 Classes and functions for validating parameters against an argument spec.

 ### ArgumentSpecValidator

  
`class ansible.module_utils.common.arg_spec.ArgumentSpecValidator(argument_spec, mutually_exclusive=None, required_together=None, required_one_of=None, required_if=None, required_by=None)`  
Argument spec validation class

 Creates a validator based on the `argument_spec` that can be used to validate a number of parameters using the [`validate()`](#ansible.module_utils.common.arg_spec.ArgumentSpecValidator.validate "ansible.module_utils.common.arg_spec.ArgumentSpecValidator.validate") method.

  Parameters 
* **argument\_spec** ([dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.10)")*[*[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.10)")*,* [dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.10)")*]*) – Specification of valid parameters and their type. May include nested argument specs.
* **mutually\_exclusive** ([list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)")*[*[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.10)")*] or* [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)")*[*[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)")*[*[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.10)")*]**]*) – List or list of lists of terms that should not be provided together.
* **required\_together** ([list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)")*[*[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)")*[*[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.10)")*]**]*) – List of lists of terms that are required together.
* **required\_one\_of** ([list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)")*[*[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)")*[*[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.10)")*]**]*) – List of lists of terms, one of which in each list is required.
* **required\_if** ([list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)")) – List of lists of `[parameter, value, [parameters]]` where one of `[parameters]` is required if `parameter == value`.
* **required\_by** ([dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.10)")*[*[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.10)")*,* [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)")*[*[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.10)")*]**]*) – Dictionary of parameter names that contain a list of parameters required by each key in the dictionary.

    
`validate(parameters, *args, **kwargs)`  
Validate `parameters` against argument spec.

 Error messages in the [`ValidationResult`](#ansible.module_utils.common.arg_spec.ValidationResult "ansible.module_utils.common.arg_spec.ValidationResult") may contain no\_log values and should be sanitized with [`sanitize_keys()`](#ansible.module_utils.common.parameters.sanitize_keys "ansible.module_utils.common.parameters.sanitize_keys") before logging or displaying.

  Parameters 
**parameters** ([dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.10)")*[*[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.10)")*,* [dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.10)")*]*) – Parameters to validate against the argument spec

  Returns 
[`ValidationResult`](#ansible.module_utils.common.arg_spec.ValidationResult "ansible.module_utils.common.arg_spec.ValidationResult") containing validated parameters.

  Simple Example 

```
argument_spec = {
    'name': {'type': 'str'},
    'age': {'type': 'int'},
}

parameters = {
    'name': 'bo',
    'age': '42',
}

validator = ArgumentSpecValidator(argument_spec)
result = validator.validate(parameters)

if result.error_messages:
    sys.exit("Validation failed: {0}".format(", ".join(result.error_messages))

valid_params = result.validated_parameters

```
   
 
 ### ValidationResult

  
`class ansible.module_utils.common.arg_spec.ValidationResult(parameters)`  
Result of argument spec validation.

 This is the object returned by [`ArgumentSpecValidator.validate()`](#ansible.module_utils.common.arg_spec.ArgumentSpecValidator.validate "ansible.module_utils.common.arg_spec.ArgumentSpecValidator.validate") containing the validated parameters and any errors.

  Parameters 
**parameters** ([dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.10)")) – Terms to be validated and coerced to the correct type.

    
`errors`  
[`AnsibleValidationErrorMultiple`](#ansible.module_utils.errors.AnsibleValidationErrorMultiple "ansible.module_utils.errors.AnsibleValidationErrorMultiple") containing all [`AnsibleValidationError`](#ansible.module_utils.errors.AnsibleValidationError "ansible.module_utils.errors.AnsibleValidationError") objects if there were any failures during validation.

 
  
`property validated_parameters`  
Validated and coerced parameters.

 
  
`property unsupported_parameters`  
[`set`](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.10)") of unsupported parameter names.

 
  
`property error_messages`  
[`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)") of all error messages from each exception in [`errors`](#ansible.module_utils.common.arg_spec.ValidationResult.errors "ansible.module_utils.common.arg_spec.ValidationResult.errors").

 
 
 ### Parameters

  
`ansible.module_utils.common.parameters.DEFAULT_TYPE_VALIDATORS`  
[`dict`](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.10)") of type names, such as `'str'`, and the default function used to check that type, [`check_type_str()`](#ansible.module_utils.common.validation.check_type_str "ansible.module_utils.common.validation.check_type_str") in this case.

 
  
`ansible.module_utils.common.parameters.env_fallback(*args, **kwargs)`  
Load value from environment variable

 
  
`ansible.module_utils.common.parameters.remove_values(value, no_log_strings)`  
Remove strings in `no_log_strings` from value.

 If value is a container type, then remove a lot more.

 Use of `deferred_removals` exists, rather than a pure recursive solution, because of the potential to hit the maximum recursion depth when dealing with large amounts of data (see [issue #24560](https://github.com/ansible/ansible/issues/24560)).

 
  
`ansible.module_utils.common.parameters.sanitize_keys(obj, no_log_strings, ignore_keys=frozenset({}))`  
Sanitize the keys in a container object by removing `no_log` values from key names.

 This is a companion function to the [`remove_values()`](#ansible.module_utils.common.parameters.remove_values "ansible.module_utils.common.parameters.remove_values") function. Similar to that function, we make use of `deferred_removals` to avoid hitting maximum recursion depth in cases of large data structures.

  Parameters 
* **obj** – The container object to sanitize. Non-container objects are returned unmodified.
* **no\_log\_strings** – A set of string values we do not want logged.
* **ignore\_keys** – A set of string values of keys to not sanitize.

  Returns 
An object with sanitized keys.

   
 ### Validation

 Standalone functions for validating various parameter types.

  
`ansible.module_utils.common.validation.check_missing_parameters(parameters, required_parameters=None)`  
This is for checking for required params when we can not check via argspec because we need more information than is simply given in the argspec.

 Raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if any required parameters are missing

  Parameters 
* **parameters** – Dictionary of parameters
* **required\_parameters** – List of parameters to look for in the given parameters.

  Returns 
Empty list or raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if the check fails.

   
  
`ansible.module_utils.common.validation.check_mutually_exclusive(terms, parameters, options_context=None)`  
Check mutually exclusive terms against argument parameters

 Accepts a single list or list of lists that are groups of terms that should be mutually exclusive with one another

  Parameters 
* **terms** – List of mutually exclusive parameters
* **parameters** – Dictionary of parameters

  Returns 
Empty list or raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if the check fails.

   
  
`ansible.module_utils.common.validation.check_required_arguments(argument_spec, parameters, options_context=None)`  
Check all parameters in argument\_spec and return a list of parameters that are required but not present in parameters.

 Raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if the check fails

  Parameters 
* **argument\_spec** – Argument spec dictionary containing all parameters and their specification
* **parameters** – Dictionary of parameters

  Returns 
Empty list or raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if the check fails.

   
  
`ansible.module_utils.common.validation.check_required_by(requirements, parameters, options_context=None)`  
For each key in requirements, check the corresponding list to see if they exist in parameters.

 Accepts a single string or list of values for each key.

  Parameters 
* **requirements** – Dictionary of requirements
* **parameters** – Dictionary of parameters

  Returns 
Empty dictionary or raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if the

   
  
`ansible.module_utils.common.validation.check_required_if(requirements, parameters, options_context=None)`  
Check parameters that are conditionally required

 Raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if the check fails

  Parameters 
**requirements** – List of lists specifying a parameter, value, parameters required when the given parameter is the specified value, and optionally a boolean indicating any or all parameters are required.

  Example  
```
required_if=[
    ['state', 'present', ('path',), True],
    ['someint', 99, ('bool_param', 'string_param')],
]

```
  Parameters 
**parameters** – Dictionary of parameters

  Returns 
Empty list or raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if the check fails. The results attribute of the exception contains a list of dictionaries. Each dictionary is the result of evaluating each item in requirements. Each return dictionary contains the following keys:

  key missing 
List of parameters that are required but missing

  key requires 
’any’ or ‘all’

  key parameter 
Parameter name that has the requirement

  key value 
Original value of the parameter

  key requirements 
Original required parameters

    Example  
```
[
    {
        'parameter': 'someint',
        'value': 99
        'requirements': ('bool_param', 'string_param'),
        'missing': ['string_param'],
        'requires': 'all',
    }
]

```
   
  
`ansible.module_utils.common.validation.check_required_one_of(terms, parameters, options_context=None)`  
Check each list of terms to ensure at least one exists in the given module parameters

 Accepts a list of lists or tuples

  Parameters 
* **terms** – List of lists of terms to check. For each list of terms, at least one is required.
* **parameters** – Dictionary of parameters
* **options\_context** – List of strings of parent key names if `terms` are in a sub spec.

  Returns 
Empty list or raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if the check fails.

   
  
`ansible.module_utils.common.validation.check_required_together(terms, parameters, options_context=None)`  
Check each list of terms to ensure every parameter in each list exists in the given parameters.

 Accepts a list of lists or tuples.

  Parameters 
* **terms** – List of lists of terms to check. Each list should include parameters that are all required when at least one is specified in the parameters.
* **parameters** – Dictionary of parameters

  Returns 
Empty list or raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if the check fails.

   
  
`ansible.module_utils.common.validation.check_type_bits(value)`  
Convert a human-readable string bits value to bits in integer.

 Example: `check_type_bits('1Mb')` returns integer 1048576.

 Raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if unable to covert the value.

 
  
`ansible.module_utils.common.validation.check_type_bool(value)`  
Verify that the value is a bool or convert it to a bool and return it.

 Raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if unable to convert to a bool

  Parameters 
**value** – String, int, or float to convert to bool. Valid booleans include: ‘1’, ‘on’, 1, ‘0’, 0, ‘n’, ‘f’, ‘false’, ‘true’, ‘y’, ‘t’, ‘yes’, ‘no’, ‘off’

  Returns 
Boolean True or False

   
  
`ansible.module_utils.common.validation.check_type_bytes(value)`  
Convert a human-readable string value to bytes

 Raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if unable to covert the value

 
  
`ansible.module_utils.common.validation.check_type_dict(value)`  
Verify that value is a dict or convert it to a dict and return it.

 Raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if unable to convert to a dict

  Parameters 
**value** – Dict or string to convert to a dict. Accepts `k1=v2, k2=v2`.

  Returns 
value converted to a dictionary

   
  
`ansible.module_utils.common.validation.check_type_float(value)`  
Verify that value is a float or convert it to a float and return it

 Raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if unable to convert to a float

  Parameters 
**value** – float, int, str, or bytes to verify or convert and return.

  Returns 
float of given value.

   
  
`ansible.module_utils.common.validation.check_type_int(value)`  
Verify that the value is an integer and return it or convert the value to an integer and return it

 Raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if unable to convert to an int

  Parameters 
**value** – String or int to convert of verify

  Returns 
int of given value

   
  
`ansible.module_utils.common.validation.check_type_jsonarg(value)`  
Return a jsonified string. Sometimes the controller turns a json string into a dict/list so transform it back into json here

 Raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if unable to covert the value

 
  
`ansible.module_utils.common.validation.check_type_list(value)`  
Verify that the value is a list or convert to a list

 A comma separated string will be split into a list. Raises a [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") if unable to convert to a list.

  Parameters 
**value** – Value to validate or convert to a list

  Returns 
Original value if it is already a list, single item list if a float, int, or string without commas, or a multi-item list if a comma-delimited string.

   
  
`ansible.module_utils.common.validation.check_type_path(value)`  
Verify the provided value is a string or convert it to a string, then return the expanded path

 
  
`ansible.module_utils.common.validation.check_type_raw(value)`  
Returns the raw value

 
  
`ansible.module_utils.common.validation.check_type_str(value, allow_conversion=True, param=None, prefix='')`  
Verify that the value is a string or convert to a string.

 Since unexpected changes can sometimes happen when converting to a string, `allow_conversion` controls whether or not the value will be converted or a TypeError will be raised if the value is not a string and would be converted

  Parameters 
* **value** – Value to validate or convert to a string
* **allow\_conversion** – Whether to convert the string and return it or raise a TypeError

  Returns 
Original value if it is a string, the value converted to a string if allow\_conversion=True, or raises a TypeError if allow\_conversion=False.

   
  
`ansible.module_utils.common.validation.count_terms(terms, parameters)`  
Count the number of occurrences of a key in a given dictionary

  Parameters 
* **terms** – String or iterable of values to check
* **parameters** – Dictionary of parameters

  Returns 
An integer that is the number of occurrences of the terms values in the provided dictionary.

   
 Errors
------

  
`exception ansible.module_utils.errors.AnsibleFallbackNotFound`  
Fallback validator was not found

 
  
`exception ansible.module_utils.errors.AnsibleValidationError(message)`  
Single argument spec validation error

  
`error_message`  
The error message passed in when the exception was raised.

 
  
`property msg`  
The error message passed in when the exception was raised.

 
 
  
`exception ansible.module_utils.errors.AnsibleValidationErrorMultiple(errors=None)`  
Multiple argument spec validation errors

  
`errors`  
[`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)") of [`AnsibleValidationError`](#ansible.module_utils.errors.AnsibleValidationError "ansible.module_utils.errors.AnsibleValidationError") objects

 
  
`property msg`  
The first message from the first error in `errors`.

 
  
`property messages`  
[`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)") of each error message in `errors`.

 
  
`append(error)`  
Append a new error to `self.errors`.

 Only [`AnsibleValidationError`](#ansible.module_utils.errors.AnsibleValidationError "ansible.module_utils.errors.AnsibleValidationError") should be added.

 
  
`extend(errors)`  
Append each item in `errors` to `self.errors`. Only [`AnsibleValidationError`](#ansible.module_utils.errors.AnsibleValidationError "ansible.module_utils.errors.AnsibleValidationError") should be added.

 
 
  
`exception ansible.module_utils.errors.AliasError(message)`  
Error handling aliases

 
  
`exception ansible.module_utils.errors.ArgumentTypeError(message)`  
Error with parameter type

 
  
`exception ansible.module_utils.errors.ArgumentValueError(message)`  
Error with parameter value

 
  
`exception ansible.module_utils.errors.ElementError(message)`  
Error when validating elements

 
  
`exception ansible.module_utils.errors.MutuallyExclusiveError(message)`  
Mutually exclusive parameters were supplied

 
  
`exception ansible.module_utils.errors.NoLogError(message)`  
Error converting no\_log values

 
  
`exception ansible.module_utils.errors.RequiredByError(message)`  
Error with parameters that are required by other parameters

 
  
`exception ansible.module_utils.errors.RequiredDefaultError(message)`  
A required parameter was assigned a default value

 
  
`exception ansible.module_utils.errors.RequiredError(message)`  
Missing a required parameter

 
  
`exception ansible.module_utils.errors.RequiredIfError(message)`  
Error with conditionally required parameters

 
  
`exception ansible.module_utils.errors.RequiredOneOfError(message)`  
Error with parameters where at least one is required

 
  
`exception ansible.module_utils.errors.RequiredTogetherError(message)`  
Error with parameters that are required together

 
  
`exception ansible.module_utils.errors.SubParameterTypeError(message)`  
Incorrect type for subparameter

 
  
`exception ansible.module_utils.errors.UnsupportedError(message)`  
Unsupported parameters were supplied

 


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/reference_appendices/module_utils.html>

User Guide
==========

  Note

 **Making Open Source More Inclusive**

 Red Hat is committed to replacing problematic language in our code, documentation, and web properties. We are beginning with these four terms: master, slave, blacklist, and whitelist. We ask that you open an issue or pull request if you come upon a term that we have missed. For more details, see [our CTO Chris Wright’s message](https://www.redhat.com/en/blog/making-open-source-more-inclusive-eradicating-problematic-language).

  Welcome to the Ansible User Guide! This guide covers how to work with Ansible, including using the command line, working with inventory, interacting with data, writing tasks, plays, and playbooks; executing playbooks, and reference materials. This page outlines the most common situations and questions that bring readers to this section. If you prefer a traditional table of contents, you can find one at the bottom of the page.

 Getting started
---------------

 * I’d like an overview of how Ansible works. Where can I find:


	+ a [quick video overview](https://docs.ansible.com/ansible/latest/user_guide/quickstart.html#quickstart-guide)
	+ a [text introduction](intro_getting_started#intro-getting-started)
* I’m ready to learn about Ansible. What [Ansible concepts](basic_concepts#basic-concepts) do I need to learn?
* I want to use Ansible without writing a playbook. How do I use [ad hoc commands](intro_adhoc#intro-adhoc)?

 Writing tasks, plays, and playbooks
-----------------------------------

 * I’m writing my first playbook. What should I [know before I begin](playbooks_best_practices#playbooks-tips-and-tricks)?
* I have a specific use case for a task or play:


	+ Executing tasks with elevated privileges or as a different user with [become](become#become)
	+ Repeating a task once for each item in a list with [loops](playbooks_loops#playbooks-loops)
	+ Executing tasks on a different machine with [delegation](playbooks_delegation#playbooks-delegation)
	+ Running tasks only when certain conditions apply with [conditionals](playbooks_conditionals#playbooks-conditionals) and evaluating conditions with [tests](playbooks_tests#playbooks-tests)
	+ Grouping a set of tasks together with [blocks](playbooks_blocks#playbooks-blocks)
	+ Running tasks only when something has changed with [handlers](playbooks_handlers#handlers)
	+ Changing the way Ansible [handles failures](playbooks_error_handling#playbooks-error-handling)
	+ Setting remote [environment values](playbooks_environment#playbooks-environment)
* I want to leverage the power of re-usable Ansible artifacts. How do I create re-usable [files](playbooks_reuse#playbooks-reuse) and [roles](playbooks_reuse_roles#playbooks-reuse-roles)?
* I need to incorporate one file or playbook inside another. What is the difference between [including and importing](playbooks_reuse#dynamic-vs-static)?
* I want to run selected parts of my playbook. How do I add and use [tags](playbooks_tags#tags)?

 Working with inventory
----------------------

 * I have a list of servers and devices I want to automate. How do I create [inventory](intro_inventory#intro-inventory) to track them?
* I use cloud services and constantly have servers and devices starting and stopping. How do I track them using [dynamic inventory](intro_dynamic_inventory#intro-dynamic-inventory)?
* I want to automate specific sub-sets of my inventory. How do I use [patterns](intro_patterns#intro-patterns)?

 Interacting with data
---------------------

 * I want to use a single playbook against multiple systems with different attributes. How do I use [variables](playbooks_variables#playbooks-variables) to handle the differences?
* I want to retrieve data about my systems. How do I access [Ansible facts](playbooks_vars_facts#vars-and-facts)?
* I need to access sensitive data like passwords with Ansible. How can I protect that data with [Ansible vault](vault#vault)?
* I want to change the data I have, so I can use it in a task. How do I use [filters](playbooks_filters#playbooks-filters) to transform my data?
* I need to retrieve data from an external datastore. How do I use [lookups](playbooks_lookups#playbooks-lookups) to access databases and APIs?
* I want to ask playbook users to supply data. How do I get user input with [prompts](playbooks_prompts#playbooks-prompts)?
* I use certain modules frequently. How do I streamline my inventory and playbooks by [setting default values for module parameters](playbooks_module_defaults#module-defaults)?

 Executing playbooks
-------------------

 Once your playbook is ready to run, you may need to use these topics:

 * Executing “dry run” playbooks with [check mode and diff](playbooks_checkmode#check-mode-dry)
* Running playbooks while troubleshooting with [start and step](playbooks_startnstep#playbooks-start-and-step)
* Correcting tasks during execution with the [Ansible debugger](playbooks_debugger#playbook-debugger)
* Controlling how my playbook executes with [strategies and more](playbooks_strategies#playbooks-strategies)
* Running tasks, plays, and playbooks [asynchronously](playbooks_async#playbooks-async)

 Advanced features and reference
-------------------------------

 * Using [advanced syntax](playbooks_advanced_syntax#playbooks-advanced-syntax)
* Manipulating [complex data](complex_data_manipulation#complex-data-manipulation)
* Using [plugins](../plugins/plugins#plugins-lookup)
* Using [playbook keywords](../reference_appendices/playbooks_keywords#playbook-keywords)
* Using [command-line tools](command_line_tools#command-line-tools)
* Rejecting [specific modules](plugin_filtering_config#plugin-filtering-config)
* Module [maintenance](modules_support#modules-support)

 Traditional Table of Contents
-----------------------------

 If you prefer to read the entire User Guide, here’s a list of the pages in order:

 * [Ansible Quickstart Guide](https://docs.ansible.com/ansible/latest/user_guide/quickstart.html)
* [Ansible concepts](basic_concepts)
	+ [Control node](basic_concepts#control-node)
	+ [Managed nodes](basic_concepts#managed-nodes)
	+ [Inventory](basic_concepts#inventory)
	+ [Collections](basic_concepts#collections)
	+ [Modules](basic_concepts#modules)
	+ [Tasks](basic_concepts#tasks)
	+ [Playbooks](basic_concepts#playbooks)
* [Getting Started](intro_getting_started)
	+ [Selecting machines from inventory](intro_getting_started#selecting-machines-from-inventory)
	+ [Connecting to remote nodes](intro_getting_started#connecting-to-remote-nodes)
	+ [Copying and executing modules](intro_getting_started#copying-and-executing-modules)
	+ [Resources](intro_getting_started#resources)
	+ [Next steps](intro_getting_started#next-steps)
* [Introduction to ad hoc commands](intro_adhoc)
	+ [Why use ad hoc commands?](intro_adhoc#why-use-ad-hoc-commands)
	+ [Use cases for ad hoc tasks](intro_adhoc#use-cases-for-ad-hoc-tasks)
* [Working with playbooks](playbooks)
	+ [Templating (Jinja2)](playbooks_templating)
	+ [Advanced playbooks features](playbooks_special_topics)
	+ [Playbook Example: Continuous Delivery and Rolling Upgrades](guide_rolling_upgrade)
* [Intro to playbooks](playbooks_intro)
	+ [Playbook syntax](playbooks_intro#playbook-syntax)
	+ [Playbook execution](playbooks_intro#playbook-execution)
	+ [Ansible-Pull](playbooks_intro#ansible-pull)
	+ [Verifying playbooks](playbooks_intro#verifying-playbooks)
* [Tips and tricks](playbooks_best_practices)
	+ [General tips](playbooks_best_practices#general-tips)
	+ [Playbook tips](playbooks_best_practices#playbook-tips)
	+ [Inventory tips](playbooks_best_practices#inventory-tips)
	+ [Execution tricks](playbooks_best_practices#execution-tricks)
* [Understanding privilege escalation: become](become)
	+ [Using become](become#using-become)
	+ [Risks and limitations of become](become#risks-and-limitations-of-become)
	+ [Become and network automation](become#become-and-network-automation)
	+ [Become and Windows](become#become-and-windows)
* [Loops](playbooks_loops)
	+ [Comparing `loop` and `with_*`](playbooks_loops#comparing-loop-and-with)
	+ [Standard loops](playbooks_loops#standard-loops)
	+ [Registering variables with a loop](playbooks_loops#registering-variables-with-a-loop)
	+ [Complex loops](playbooks_loops#complex-loops)
	+ [Ensuring list input for `loop`: using `query` rather than `lookup`](playbooks_loops#ensuring-list-input-for-loop-using-query-rather-than-lookup)
	+ [Adding controls to loops](playbooks_loops#adding-controls-to-loops)
	+ [Migrating from with\_X to loop](playbooks_loops#migrating-from-with-x-to-loop)
* [Controlling where tasks run: delegation and local actions](playbooks_delegation)
	+ [Tasks that cannot be delegated](playbooks_delegation#tasks-that-cannot-be-delegated)
	+ [Delegating tasks](playbooks_delegation#delegating-tasks)
	+ [Delegating facts](playbooks_delegation#delegating-facts)
	+ [Local playbooks](playbooks_delegation#local-playbooks)
* [Conditionals](playbooks_conditionals)
	+ [Basic conditionals with `when`](playbooks_conditionals#basic-conditionals-with-when)
	+ [Commonly-used facts](playbooks_conditionals#commonly-used-facts)
* [Tests](playbooks_tests)
	+ [Test syntax](playbooks_tests#test-syntax)
	+ [Testing strings](playbooks_tests#testing-strings)
	+ [Vault](playbooks_tests#vault)
	+ [Testing truthiness](playbooks_tests#testing-truthiness)
	+ [Comparing versions](playbooks_tests#comparing-versions)
	+ [Set theory tests](playbooks_tests#set-theory-tests)
	+ [Testing if a list contains a value](playbooks_tests#testing-if-a-list-contains-a-value)
	+ [Testing if a list value is True](playbooks_tests#testing-if-a-list-value-is-true)
	+ [Testing paths](playbooks_tests#testing-paths)
	+ [Testing size formats](playbooks_tests#testing-size-formats)
	+ [Testing task results](playbooks_tests#testing-task-results)
* [Blocks](playbooks_blocks)
	+ [Grouping tasks with blocks](playbooks_blocks#grouping-tasks-with-blocks)
	+ [Handling errors with blocks](playbooks_blocks#handling-errors-with-blocks)
* [Handlers: running operations on change](playbooks_handlers)
	+ [Handler example](playbooks_handlers#handler-example)
	+ [Controlling when handlers run](playbooks_handlers#controlling-when-handlers-run)
	+ [Using variables with handlers](playbooks_handlers#using-variables-with-handlers)
* [Error handling in playbooks](playbooks_error_handling)
	+ [Ignoring failed commands](playbooks_error_handling#ignoring-failed-commands)
	+ [Ignoring unreachable host errors](playbooks_error_handling#ignoring-unreachable-host-errors)
	+ [Resetting unreachable hosts](playbooks_error_handling#resetting-unreachable-hosts)
	+ [Handlers and failure](playbooks_error_handling#handlers-and-failure)
	+ [Defining failure](playbooks_error_handling#defining-failure)
	+ [Defining “changed”](playbooks_error_handling#defining-changed)
	+ [Ensuring success for command and shell](playbooks_error_handling#ensuring-success-for-command-and-shell)
	+ [Aborting a play on all hosts](playbooks_error_handling#aborting-a-play-on-all-hosts)
	+ [Controlling errors in blocks](playbooks_error_handling#controlling-errors-in-blocks)
* [Setting the remote environment](playbooks_environment)
	+ [Setting the remote environment in a task](playbooks_environment#setting-the-remote-environment-in-a-task)
* [Working with language-specific version managers](playbooks_environment#working-with-language-specific-version-managers)
* [Re-using Ansible artifacts](playbooks_reuse)
	+ [Creating re-usable files and roles](playbooks_reuse#creating-re-usable-files-and-roles)
	+ [Re-using playbooks](playbooks_reuse#re-using-playbooks)
	+ [Re-using files and roles](playbooks_reuse#re-using-files-and-roles)
	+ [Re-using tasks as handlers](playbooks_reuse#re-using-tasks-as-handlers)
* [Roles](playbooks_reuse_roles)
	+ [Role directory structure](playbooks_reuse_roles#role-directory-structure)
	+ [Storing and finding roles](playbooks_reuse_roles#storing-and-finding-roles)
	+ [Using roles](playbooks_reuse_roles#using-roles)
	+ [Role argument validation](playbooks_reuse_roles#role-argument-validation)
	+ [Running a role multiple times in one playbook](playbooks_reuse_roles#running-a-role-multiple-times-in-one-playbook)
	+ [Using role dependencies](playbooks_reuse_roles#using-role-dependencies)
	+ [Embedding modules and plugins in roles](playbooks_reuse_roles#embedding-modules-and-plugins-in-roles)
	+ [Sharing roles: Ansible Galaxy](playbooks_reuse_roles#sharing-roles-ansible-galaxy)
* [Including and importing](playbooks_reuse_includes)
* [Tags](playbooks_tags)
	+ [Adding tags with the tags keyword](playbooks_tags#adding-tags-with-the-tags-keyword)
	+ [Special tags: always and never](playbooks_tags#special-tags-always-and-never)
	+ [Selecting or skipping tags when you run a playbook](playbooks_tags#selecting-or-skipping-tags-when-you-run-a-playbook)
* [How to build your inventory](intro_inventory)
	+ [Inventory basics: formats, hosts, and groups](intro_inventory#inventory-basics-formats-hosts-and-groups)
	+ [Adding variables to inventory](intro_inventory#adding-variables-to-inventory)
	+ [Assigning a variable to one machine: host variables](intro_inventory#assigning-a-variable-to-one-machine-host-variables)
	+ [Assigning a variable to many machines: group variables](intro_inventory#assigning-a-variable-to-many-machines-group-variables)
	+ [Organizing host and group variables](intro_inventory#organizing-host-and-group-variables)
	+ [How variables are merged](intro_inventory#how-variables-are-merged)
	+ [Using multiple inventory sources](intro_inventory#using-multiple-inventory-sources)
	+ [Connecting to hosts: behavioral inventory parameters](intro_inventory#connecting-to-hosts-behavioral-inventory-parameters)
	+ [Inventory setup examples](intro_inventory#inventory-setup-examples)
* [Working with dynamic inventory](intro_dynamic_inventory)
	+ [Inventory script example: Cobbler](intro_dynamic_inventory#inventory-script-example-cobbler)
	+ [Inventory script example: OpenStack](intro_dynamic_inventory#inventory-script-example-openstack)
	+ [Other inventory scripts](intro_dynamic_inventory#other-inventory-scripts)
	+ [Using inventory directories and multiple inventory sources](intro_dynamic_inventory#using-inventory-directories-and-multiple-inventory-sources)
	+ [Static groups of dynamic groups](intro_dynamic_inventory#static-groups-of-dynamic-groups)
* [Patterns: targeting hosts and groups](intro_patterns)
	+ [Using patterns](intro_patterns#using-patterns)
	+ [Common patterns](intro_patterns#common-patterns)
	+ [Limitations of patterns](intro_patterns#limitations-of-patterns)
	+ [Advanced pattern options](intro_patterns#advanced-pattern-options)
	+ [Patterns and ansible-playbook flags](intro_patterns#patterns-and-ansible-playbook-flags)
* [Connection methods and details](connection_details)
	+ [ControlPersist and paramiko](connection_details#controlpersist-and-paramiko)
	+ [Setting a remote user](connection_details#setting-a-remote-user)
	+ [Setting up SSH keys](connection_details#setting-up-ssh-keys)
	+ [Running against localhost](connection_details#running-against-localhost)
	+ [Managing host key checking](connection_details#managing-host-key-checking)
	+ [Other connection methods](connection_details#other-connection-methods)
* [Working with command line tools](command_line_tools)
	+ [ansible](../cli/ansible)
	+ [ansible-config](../cli/ansible-config)
	+ [ansible-console](../cli/ansible-console)
	+ [ansible-doc](../cli/ansible-doc)
	+ [ansible-galaxy](../cli/ansible-galaxy)
	+ [ansible-inventory](../cli/ansible-inventory)
	+ [ansible-playbook](../cli/ansible-playbook)
	+ [ansible-pull](../cli/ansible-pull)
	+ [ansible-vault](../cli/ansible-vault)
* [Using Variables](playbooks_variables)
	+ [Creating valid variable names](playbooks_variables#creating-valid-variable-names)
	+ [Simple variables](playbooks_variables#simple-variables)
	+ [When to quote variables (a YAML gotcha)](playbooks_variables#when-to-quote-variables-a-yaml-gotcha)
	+ [List variables](playbooks_variables#list-variables)
	+ [Dictionary variables](playbooks_variables#dictionary-variables)
	+ [Registering variables](playbooks_variables#registering-variables)
	+ [Referencing nested variables](playbooks_variables#referencing-nested-variables)
	+ [Transforming variables with Jinja2 filters](playbooks_variables#transforming-variables-with-jinja2-filters)
	+ [Where to set variables](playbooks_variables#where-to-set-variables)
	+ [Variable precedence: Where should I put a variable?](playbooks_variables#variable-precedence-where-should-i-put-a-variable)
	+ [Using advanced variable syntax](playbooks_variables#using-advanced-variable-syntax)
* [Discovering variables: facts and magic variables](playbooks_vars_facts)
	+ [Ansible facts](playbooks_vars_facts#ansible-facts)
	+ [Information about Ansible: magic variables](playbooks_vars_facts#information-about-ansible-magic-variables)
* [Encrypting content with Ansible Vault](vault)
	+ [Managing vault passwords](vault#managing-vault-passwords)
	+ [Encrypting content with Ansible Vault](vault#id1)
	+ [Using encrypted variables and files](vault#using-encrypted-variables-and-files)
	+ [Configuring defaults for using encrypted content](vault#configuring-defaults-for-using-encrypted-content)
	+ [When are encrypted files made visible?](vault#when-are-encrypted-files-made-visible)
	+ [Speeding up Ansible Vault](vault#speeding-up-ansible-vault)
	+ [Format of files encrypted with Ansible Vault](vault#format-of-files-encrypted-with-ansible-vault)
* [Using filters to manipulate data](playbooks_filters)
	+ [Handling undefined variables](playbooks_filters#handling-undefined-variables)
	+ [Defining different values for true/false/null (ternary)](playbooks_filters#defining-different-values-for-true-false-null-ternary)
	+ [Managing data types](playbooks_filters#managing-data-types)
	+ [Formatting data: YAML and JSON](playbooks_filters#formatting-data-yaml-and-json)
	+ [Combining and selecting data](playbooks_filters#combining-and-selecting-data)
	+ [Randomizing data](playbooks_filters#randomizing-data)
	+ [Managing list variables](playbooks_filters#managing-list-variables)
	+ [Selecting from sets or lists (set theory)](playbooks_filters#selecting-from-sets-or-lists-set-theory)
	+ [Calculating numbers (math)](playbooks_filters#calculating-numbers-math)
	+ [Managing network interactions](playbooks_filters#managing-network-interactions)
	+ [Encrypting and checksumming strings and passwords](playbooks_filters#encrypting-and-checksumming-strings-and-passwords)
	+ [Manipulating text](playbooks_filters#manipulating-text)
	+ [Manipulating strings](playbooks_filters#manipulating-strings)
	+ [Managing UUIDs](playbooks_filters#managing-uuids)
	+ [Handling dates and times](playbooks_filters#handling-dates-and-times)
	+ [Getting Kubernetes resource names](playbooks_filters#getting-kubernetes-resource-names)
* [Lookups](playbooks_lookups)
	+ [Using lookups in variables](playbooks_lookups#using-lookups-in-variables)
* [Interactive input: prompts](playbooks_prompts)
	+ [Encrypting values supplied by `vars_prompt`](playbooks_prompts#encrypting-values-supplied-by-vars-prompt)
	+ [Allowing special characters in `vars_prompt` values](playbooks_prompts#allowing-special-characters-in-vars-prompt-values)
* [Module defaults](playbooks_module_defaults)
	+ [Module defaults groups](playbooks_module_defaults#module-defaults-groups)
* [Validating tasks: check mode and diff mode](playbooks_checkmode)
	+ [Using check mode](playbooks_checkmode#using-check-mode)
	+ [Using diff mode](playbooks_checkmode#using-diff-mode)
* [Executing playbooks for troubleshooting](playbooks_startnstep)
	+ [start-at-task](playbooks_startnstep#start-at-task)
	+ [Step mode](playbooks_startnstep#step-mode)
* [Debugging tasks](playbooks_debugger)
	+ [Enabling the debugger](playbooks_debugger#enabling-the-debugger)
	+ [Resolving errors in the debugger](playbooks_debugger#resolving-errors-in-the-debugger)
	+ [Available debug commands](playbooks_debugger#available-debug-commands)
	+ [How the debugger interacts with the free strategy](playbooks_debugger#how-the-debugger-interacts-with-the-free-strategy)
* [Controlling playbook execution: strategies and more](playbooks_strategies)
	+ [Selecting a strategy](playbooks_strategies#selecting-a-strategy)
	+ [Setting the number of forks](playbooks_strategies#setting-the-number-of-forks)
	+ [Using keywords to control execution](playbooks_strategies#using-keywords-to-control-execution)
* [Asynchronous actions and polling](playbooks_async)
	+ [Asynchronous ad hoc tasks](playbooks_async#asynchronous-ad-hoc-tasks)
	+ [Asynchronous playbook tasks](playbooks_async#asynchronous-playbook-tasks)
* [Advanced Syntax](playbooks_advanced_syntax)
	+ [Unsafe or raw strings](playbooks_advanced_syntax#unsafe-or-raw-strings)
	+ [YAML anchors and aliases: sharing variable values](playbooks_advanced_syntax#yaml-anchors-and-aliases-sharing-variable-values)
* [Data manipulation](complex_data_manipulation)
	+ [Loops and list comprehensions](complex_data_manipulation#loops-and-list-comprehensions)
	+ [Complex Type transformations](complex_data_manipulation#complex-type-transformations)
* [Rejecting modules](plugin_filtering_config)
* [Sample Ansible setup](sample_setup)
	+ [Sample directory layout](sample_setup#sample-directory-layout)
	+ [Alternative directory layout](sample_setup#alternative-directory-layout)
	+ [Sample group and host variables](sample_setup#sample-group-and-host-variables)
	+ [Sample playbooks organized by function](sample_setup#sample-playbooks-organized-by-function)
	+ [Sample task and handler files in a function-based role](sample_setup#sample-task-and-handler-files-in-a-function-based-role)
	+ [What the sample setup enables](sample_setup#what-the-sample-setup-enables)
	+ [Organizing for deployment or configuration](sample_setup#organizing-for-deployment-or-configuration)
	+ [Using local Ansible modules](sample_setup#using-local-ansible-modules)
* [Working With Modules](modules)
	+ [Introduction to modules](modules_intro)
	+ [Module Maintenance & Support](modules_support)
	+ [Return Values](../reference_appendices/common_return_values)
* [Working With Plugins](../plugins/plugins)
	+ [Action Plugins](../plugins/action)
	+ [Become Plugins](../plugins/become)
	+ [Cache Plugins](../plugins/cache)
	+ [Callback Plugins](../plugins/callback)
	+ [Cliconf Plugins](../plugins/cliconf)
	+ [Connection Plugins](../plugins/connection)
	+ [Httpapi Plugins](../plugins/httpapi)
	+ [Inventory Plugins](../plugins/inventory)
	+ [Lookup Plugins](../plugins/lookup)
	+ [Netconf Plugins](../plugins/netconf)
	+ [Shell Plugins](../plugins/shell)
	+ [Strategy Plugins](../plugins/strategy)
	+ [Vars Plugins](../plugins/vars)
	+ [Using filters to manipulate data](playbooks_filters)
	+ [Tests](playbooks_tests)
	+ [Rejecting modules](plugin_filtering_config)
* [Playbook Keywords](../reference_appendices/playbooks_keywords)
	+ [Play](../reference_appendices/playbooks_keywords#play)
	+ [Role](../reference_appendices/playbooks_keywords#role)
	+ [Block](../reference_appendices/playbooks_keywords#block)
	+ [Task](../reference_appendices/playbooks_keywords#task)
* [Ansible and BSD](intro_bsd)
	+ [Connecting to BSD nodes](intro_bsd#connecting-to-bsd-nodes)
	+ [Bootstrapping BSD](intro_bsd#bootstrapping-bsd)
	+ [Setting the Python interpreter](intro_bsd#setting-the-python-interpreter)
	+ [Which modules are available?](intro_bsd#which-modules-are-available)
	+ [Using BSD as the control node](intro_bsd#using-bsd-as-the-control-node)
	+ [BSD facts](intro_bsd#bsd-facts)
	+ [BSD efforts and contributions](intro_bsd#bsd-efforts-and-contributions)
* [Windows Guides](windows)
	+ [Setting up a Windows Host](windows_setup)
	+ [Windows Remote Management](windows_winrm)
	+ [Using Ansible and Windows](windows_usage)
	+ [Desired State Configuration](windows_dsc)
	+ [Windows performance](windows_performance)
	+ [Windows Frequently Asked Questions](windows_faq)
* [Using collections](collections_using)
	+ [Installing collections](collections_using#installing-collections)
	+ [Downloading collections](collections_using#downloading-collections)
	+ [Listing collections](collections_using#listing-collections)
	+ [Verifying collections](collections_using#verifying-collections)
	+ [Using collections in a Playbook](collections_using#using-collections-in-a-playbook)
	+ [Simplifying module names with the `collections` keyword](collections_using#simplifying-module-names-with-the-collections-keyword)
	+ [Using a playbook from a collection](collections_using#using-a-playbook-from-a-collection)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/index.html>

Installing Ansible
==================

 Ansible is an agentless automation tool that you install on a control node. From the control node, Ansible manages machines and other devices remotely (by default, over the SSH protocol).

 To install Ansible for use at the command line, simply install the Ansible package on one machine (which could easily be a laptop). You do not need to install a database or run any daemons. Ansible can manage an entire fleet of remote machines from that one control node.

 * [Prerequisites](#prerequisites)


	+ [Control node requirements](#control-node-requirements)
	+ [Managed node requirements](#managed-node-requirements)
* [Selecting an Ansible artifact and version to install](#selecting-an-ansible-artifact-and-version-to-install)


	+ [Installing the Ansible community package](#installing-the-ansible-community-package)
	+ [Installing `ansible-core`](#installing-ansible-core)
* [Installing and upgrading Ansible with `pip`](#installing-and-upgrading-ansible-with-pip)


	+ [Prerequisites: Installing `pip`](#prerequisites-installing-pip)
	+ [Installing Ansible with `pip`](#installing-ansible-with-pip)
	+ [Installing Ansible in a virtual environment with `pip`](#installing-ansible-in-a-virtual-environment-with-pip)
	+ [Upgrading Ansible with `pip`](#upgrading-ansible-with-pip)
	
	
		- [Upgrading from 2.9 or earlier to 2.10](#upgrading-from-2-9-or-earlier-to-2-10)
		- [Upgrading from Ansible 3 or ansible-core 2.10](#upgrading-from-ansible-3-or-ansible-core-2-10)
* [Installing Ansible on specific operating systems](#installing-ansible-on-specific-operating-systems)


	+ [Installing Ansible on RHEL, CentOS, or Fedora](#installing-ansible-on-rhel-centos-or-fedora)
	+ [Installing Ansible on Ubuntu](#installing-ansible-on-ubuntu)
	+ [Installing Ansible on Debian](#installing-ansible-on-debian)
	+ [Installing Ansible on Gentoo with portage](#installing-ansible-on-gentoo-with-portage)
	+ [Installing Ansible on FreeBSD](#installing-ansible-on-freebsd)
	+ [Installing Ansible on macOS](#installing-ansible-on-macos)
	+ [Installing Ansible on Solaris](#installing-ansible-on-solaris)
	+ [Installing Ansible on Arch Linux](#installing-ansible-on-arch-linux)
	+ [Installing Ansible on Slackware Linux](#installing-ansible-on-slackware-linux)
	+ [Installing Ansible on Clear Linux](#installing-ansible-on-clear-linux)
* [Installing and running the `devel` branch from source](#installing-and-running-the-devel-branch-from-source)


	+ [Installing `devel` from GitHub with `pip`](#installing-devel-from-github-with-pip)
	+ [Installing `devel` from GitHub by cloning](#installing-devel-from-github-by-cloning)
	+ [Running the `devel` branch from a clone](#running-the-devel-branch-from-a-clone)
* [Confirming your installation](#confirming-your-installation)
* [Finding tarballs of tagged releases](#finding-tarballs-of-tagged-releases)
* [Adding Ansible command shell completion](#adding-ansible-command-shell-completion)


	+ [Installing `argcomplete` on RHEL, CentOS, or Fedora](#installing-argcomplete-on-rhel-centos-or-fedora)
	+ [Installing `argcomplete` with `apt`](#installing-argcomplete-with-apt)
	+ [Installing `argcomplete` with `pip`](#installing-argcomplete-with-pip)
	+ [Configuring `argcomplete`](#configuring-argcomplete)
	
	
		- [Global configuration](#global-configuration)
		- [Per command configuration](#per-command-configuration)
		- [Using `argcomplete` with zsh or tcsh](#using-argcomplete-with-zsh-or-tcsh)

 Prerequisites
-------------

 Before you install Ansible, review the requirements for a control node. Before you use Ansible, review the requirements for managed nodes (those end devices you want to automate). Control nodes and managed nodes have different minimum requirements.

 ### Control node requirements

 For your control node (the machine that runs Ansible), you can use any machine with Python 2 (version 2.7) or Python 3 (versions 3.5 and higher) installed. ansible-core 2.11 and Ansible 4.0.0 will make Python 3.8 a soft dependency for the control node, but will function with the aforementioned requirements. ansible-core 2.12 and Ansible 5.0.0 will require Python 3.8 or newer to function on the control node. Starting with ansible-core 2.11, the project will only be packaged for Python 3.8 and newer. This includes Red Hat, Debian, CentOS, macOS, any of the BSDs, and so on. Windows is not supported for the control node, read more about this in [Matt Davis’s blog post](http://blog.rolpdog.com/2020/03/why-no-ansible-controller-for-windows.html).

  Warning

 Please note that some plugins that run on the control node have additional requirements. These requirements should be listed in the plugin documentation.

  When choosing a control node, remember that any management system benefits from being run near the machines being managed. If you are using Ansible to manage machines in a cloud, consider using a machine inside that cloud as your control node. In most cases Ansible will perform better from a machine on the cloud than from a machine on the open Internet.

  Warning

 Ansible 2.11 will make Python 3.8 a soft dependency for the control node, but will function with the aforementioned requirements. Ansible 2.12 will require Python 3.8 or newer to function on the control node. Starting with Ansible 2.11, the project will only be packaged for Python 3.8 and newer.

  ### Managed node requirements

 Although you do not need a daemon on your managed nodes, you do need a way for Ansible to communicate with them. For most managed nodes, Ansible makes a connection over SSH and transfers modules using SFTP. If SSH works but SFTP is not available on some of your managed nodes, you can switch to SCP in [ansible.cfg](../reference_appendices/config#ansible-configuration-settings). For any machine or device that can run Python, you also need Python 2 (version 2.6 or later) or Python 3 (version 3.5 or later).

  Warning

 Please note that some modules have additional requirements that need to be satisfied on the ‘target’ machine (the managed node). These requirements should be listed in the module documentation.

   Note

 * If you have SELinux enabled on remote nodes, you will also want to install libselinux-python on them before using any copy/file/template related functions in Ansible. You can use the [yum module](../collections/ansible/builtin/yum_module#yum-module) or [dnf module](../collections/ansible/builtin/dnf_module#dnf-module) in Ansible to install this package on remote systems that do not have it.
* By default, before the first Python module in a playbook runs on a host, Ansible attempts to discover a suitable Python interpreter on that host. You can override the discovery behavior by setting the [ansible\_python\_interpreter](../user_guide/intro_inventory#ansible-python-interpreter) inventory variable to a specific interpreter, and in other ways. See [Interpreter Discovery](../reference_appendices/interpreter_discovery#interpreter-discovery) for details.
* Ansible’s [raw module](../collections/ansible/builtin/raw_module#raw-module), and the [script module](../collections/ansible/builtin/script_module#script-module), do not depend on a client side install of Python to run. Technically, you can use Ansible to install a compatible version of Python using the [raw module](../collections/ansible/builtin/raw_module#raw-module), which then allows you to use everything else. For example, if you need to bootstrap Python 2 onto a RHEL-based system, you can install it as follows:

 
```
$ ansible myhost --become -m raw -a "yum install -y python2"

```

  Selecting an Ansible artifact and version to install
----------------------------------------------------

 Starting with version 2.10, Ansible distributes two artifacts: a community package called `ansible` and a minimalist language and runtime called `ansible-core` (called `ansible-base` in version 2.10). Choose the Ansible artifact and version that matches your particular needs.

 ### Installing the Ansible community package

 The `ansible` package includes the Ansible language and runtime plus a range of community curated Collections. It recreates and expands on the functionality that was included in Ansible 2.9.

 You can choose any of the following ways to install the Ansible community package:

 * Install the latest release with your OS package manager (for Red Hat Enterprise Linux (TM), CentOS, Fedora, Debian, or Ubuntu).
* Install with `pip` (the Python package manager).

 ### Installing `ansible-core`

 Ansible also distributes a minimalist object called `ansible-core` (or `ansible-base` in version 2.10). It contains the Ansible language, runtime, and a short list of core modules and other plugins. You can build functionality on top of `ansible-core` by installing collections from Galaxy, Automation Hub, or any other source.

 You can choose any of the following ways to install `ansible-core`:

 * Install `ansible-core` (version 2.11 and greater) or `ansible-base` (version 2.10) with `pip`.
* Install `ansible-core` from source from the ansible/ansible GitHub repository to access the development (`devel`) version to develop or test the latest features.

  Note

 You should only run `ansible-core` from `devel` if you are modifying `ansible-core`, or trying out features under development. This is a rapidly changing source of code and can become unstable at any point.

  Ansible generally creates new releases twice a year. See [Releases and maintenance](../reference_appendices/release_and_maintenance#release-and-maintenance) for information on release timing and maintenance of older releases.

 Installing and upgrading Ansible with `pip`
-------------------------------------------

 Ansible can be installed on many systems with `pip`, the Python package manager.

 ### Prerequisites: Installing `pip`

 If `pip` is not already available on your system, run the following commands to install it:

 
```
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python get-pip.py --user

```
 You may need to perform some additional configuration before you are able to run Ansible. See the Python documentation on [installing to the user site](https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site) for more information.

 ### Installing Ansible with `pip`

  Note

 If you have Ansible 2.9 or older installed or Ansible 3, see [Upgrading Ansible with pip](#pip-upgrade).

  Once `pip` is installed, you can install Ansible [1](#id7):

 
```
$ python -m pip install --user ansible

```
 In order to use the `paramiko` connection plugin or modules that require `paramiko`, install the required module [2](#id8):

 
```
$ python -m pip install --user paramiko

```
 If you wish to install Ansible globally, run the following commands:

 
```
$ sudo python get-pip.py
$ sudo python -m pip install ansible

```
  Note

 Running `pip` with `sudo` will make global changes to the system. Since `pip` does not coordinate with system package managers, it could make changes to your system that leaves it in an inconsistent or non-functioning state. This is particularly true for macOS. Installing with `--user` is recommended unless you understand fully the implications of modifying global files on the system.

   Note

 Older versions of `pip` default to <http://pypi.python.org/simple>, which no longer works. Please make sure you have the latest version of `pip` before installing Ansible. If you have an older version of `pip` installed, you can upgrade by following [pip’s upgrade instructions](https://pip.pypa.io/en/stable/installing/#upgrading-pip) .

  ### Installing Ansible in a virtual environment with `pip`

  Note

 If you have Ansible 2.9 or older installed or Ansible 3, see [Upgrading Ansible with pip](#pip-upgrade).

  Ansible can also be installed inside a new or existing `virtualenv`:

 
```
$ python -m virtualenv ansible  # Create a virtualenv if one does not already exist
$ source ansible/bin/activate   # Activate the virtual environment
$ python -m pip install ansible

```
 ### Upgrading Ansible with `pip`

 #### Upgrading from 2.9 or earlier to 2.10

 Starting in version 2.10, Ansible is made of two packages. When you upgrade from version 2.9 and older to version 2.10 or later, you need to uninstall the old Ansible version (2.9 or earlier) before upgrading. If you do not uninstall the older version of Ansible, you will see the following message, and no change will be performed:

 
```
Cannot install ansible-base with a pre-existing ansible==2.x installation.

Installing ansible-base with ansible-2.9 or older currently installed with
pip is known to cause problems. Please uninstall ansible and install the new
version:

pip uninstall ansible
pip install ansible-base

...

```
 As explained by the message, to upgrade you must first remove the version of Ansible installed and then install it to the latest version.

 
```
$ pip uninstall ansible
$ pip install ansible

```
 #### Upgrading from Ansible 3 or ansible-core 2.10

 `ansible-base` only exists for version 2.10 and in Ansible 3. In 2.11 and later, the package is called `ansible-core`. Before installing `ansible-core` or Ansible 4, you must uninstall `ansible-base` if you have installed Ansible 3 or `ansible-base` 2.10.

 To upgrade to `ansible-core`:

 
```
pip uninstall ansible-base
pip install ansible-core

```
 To upgrade to Ansible 4:

 
```
pip uninstall ansible-base
pip install ansible

```
 Installing Ansible on specific operating systems
------------------------------------------------

 Follow these instructions to install the Ansible community package on a variety of operating systems.

 ### Installing Ansible on RHEL, CentOS, or Fedora

 On Fedora:

 
```
$ sudo dnf install ansible

```
 On RHEL:

 
```
$ sudo yum install ansible

```
 On CentOS:

 
```
$ sudo yum install epel-release
$ sudo yum install ansible

```
 RPMs for RHEL 7 and RHEL 8 are available from the [Ansible Engine repository](https://access.redhat.com/articles/3174981).

 To enable the Ansible Engine repository for RHEL 8, run the following command:

 
```
$ sudo subscription-manager repos --enable ansible-2.9-for-rhel-8-x86_64-rpms

```
 To enable the Ansible Engine repository for RHEL 7, run the following command:

 
```
$ sudo subscription-manager repos --enable rhel-7-server-ansible-2.9-rpms

```
 RPMs for currently supported versions of RHEL and CentOS are also available from [EPEL](https://fedoraproject.org/wiki/EPEL).

  Note

 Since Ansible 2.10 for RHEL is not available at this time, continue to use Ansible 2.9.

  Ansible can manage older operating systems that contain Python 2.6 or higher.

 ### Installing Ansible on Ubuntu

 Ubuntu builds are available [in a PPA here](https://launchpad.net/~ansible/+archive/ubuntu/ansible).

 To configure the PPA on your machine and install Ansible run these commands:

 
```
$ sudo apt update
$ sudo apt install software-properties-common
$ sudo add-apt-repository --yes --update ppa:ansible/ansible
$ sudo apt install ansible

```
  Note

 On older Ubuntu distributions, “software-properties-common” is called “python-software-properties”. You may want to use `apt-get` instead of `apt` in older versions. Also, be aware that only newer distributions (in other words, 18.04, 18.10, and so on) have a `-u` or `--update` flag, so adjust your script accordingly.

  Debian/Ubuntu packages can also be built from the source checkout, run:

 
```
$ make deb

```
 ### Installing Ansible on Debian

 Debian users may use the same source as the Ubuntu PPA (using the following table).

 

| Debian |  | Ubuntu |
| --- | --- | --- |
| Debian 11 (Bullseye) | -> | Ubuntu 20.04 (Focal) |
| Debian 10 (Buster) | -> | Ubuntu 18.04 (Bionic) |
| Debian 9 (Stretch) | -> | Ubuntu 16.04 (Xenial) |
| Debian 8 (Jessie) | -> | Ubuntu 14.04 (Trusty) |

  Note

 As of Ansible 4.0.0, new releases will only be generated for Ubuntu 18.04 (Bionic) or later releases.

  Add the following line to `/etc/apt/sources.list` or `/etc/apt/sources.list.d/ansible.list`:

 
```
deb http://ppa.launchpad.net/ansible/ansible/ubuntu MATCHING_UBUNTU_CODENAME_HERE main

```
 Example for Debian 11 (Bullseye)

 
```
deb http://ppa.launchpad.net/ansible/ansible/ubuntu focal main

```
 Then run these commands:

 
```
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
$ sudo apt update
$ sudo apt install ansible

```
 ### Installing Ansible on Gentoo with portage

 
```
$ emerge -av app-admin/ansible

```
 To install the newest version, you may need to unmask the Ansible package prior to emerging:

 
```
$ echo 'app-admin/ansible' >> /etc/portage/package.accept_keywords

```
 ### Installing Ansible on FreeBSD

 Though Ansible works with both Python 2 and 3 versions, FreeBSD has different packages for each Python version. So to install you can use:

 
```
$ sudo pkg install py27-ansible

```
 or:

 
```
$ sudo pkg install py37-ansible

```
 You may also wish to install from ports, run:

 
```
$ sudo make -C /usr/ports/sysutils/ansible install

```
 You can also choose a specific version, for example `ansible25`.

 Older versions of FreeBSD worked with something like this (substitute for your choice of package manager):

 
```
$ sudo pkg install ansible

```
 ### Installing Ansible on macOS

 The preferred way to install Ansible on a Mac is with `pip`.

 The instructions can be found in [Installing and upgrading Ansible with pip](#from-pip). If you are running macOS version 10.12 or older, then you should upgrade to the latest `pip` to connect to the Python Package Index securely. It should be noted that pip must be run as a module on macOS, and the linked `pip` instructions will show you how to do that.

  Note

  Note

 If you have Ansible 2.9 or older installed or Ansible 3, see [Upgrading Ansible with pip](#pip-upgrade).

    Note

 macOS by default is configured for a small number of file handles, so if you want to use 15 or more forks you’ll need to raise the ulimit with `sudo launchctl limit maxfiles unlimited`. This command can also fix any “Too many open files” errors.

  If you are installing on macOS Mavericks (10.9), you may encounter some noise from your compiler. A workaround is to do the following:

 
```
$ CFLAGS=-Qunused-arguments CPPFLAGS=-Qunused-arguments pip install --user ansible

```
 ### Installing Ansible on Solaris

 Ansible is available for Solaris as [SysV package from OpenCSW](https://www.opencsw.org/packages/ansible/).

 
```
# pkgadd -d http://get.opencsw.org/now
# /opt/csw/bin/pkgutil -i ansible

```
 ### Installing Ansible on Arch Linux

 Ansible is available in the Community repository:

 
```
$ pacman -S ansible

```
 The AUR has a PKGBUILD for pulling directly from GitHub called [ansible-git](https://aur.archlinux.org/packages/ansible-git).

 Also see the [Ansible](https://wiki.archlinux.org/index.php/Ansible) page on the ArchWiki.

 ### Installing Ansible on Slackware Linux

 Ansible build script is available in the [SlackBuilds.org](https://slackbuilds.org/apps/ansible/) repository. Can be built and installed using [sbopkg](https://sbopkg.org/).

 Create queue with Ansible and all dependencies:

 
```
# sqg -p ansible

```
 Build and install packages from a created queuefile (answer Q for question if sbopkg should use queue or package):

 
```
# sbopkg -k -i ansible

```
 ### Installing Ansible on Clear Linux

 Ansible and its dependencies are available as part of the sysadmin host management bundle:

 
```
$ sudo swupd bundle-add sysadmin-hostmgmt

```
 Update of the software will be managed by the swupd tool:

 
```
$ sudo swupd update

```
 Installing and running the `devel` branch from source
-----------------------------------------------------

 In Ansible 2.10 and later, the [ansible/ansible repository](https://github.com/ansible/ansible) contains the code for basic features and functions, such as copying module code to managed nodes. This code is also known as `ansible-core`.

 New features are added to `ansible-core` on a branch called `devel`. If you are testing new features, fixing bugs, or otherwise working with the development team on changes to the core code, you can install and run `devel`.

  Note

 You should only install and run the `devel` branch if you are modifying `ansible-core` or trying out features under development. This is a rapidly changing source of code and can become unstable at any point.

   Note

 If you want to use Ansible AWX as the control node, do not install or run the `devel` branch of Ansible. Use an OS package manager (like `apt` or `yum`) or `pip` to install a stable version.

  If you are running Ansible from source, you may also wish to follow the [Ansible GitHub project](https://github.com/ansible/ansible). We track issues, document bugs, and share feature ideas in this and other related repositories.

 For more information on getting involved in the Ansible project, see the [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html#ansible-community-guide). For more information on creating Ansible modules and Collections, see the [Developer Guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html#developer-guide).

 ### Installing `devel` from GitHub with `pip`

 You can install the `devel` branch of `ansible-core` directly from GitHub with `pip`:

 
```
$ python -m pip install --user https://github.com/ansible/ansible/archive/devel.tar.gz

```
  Note

 If you have Ansible 2.9 or older installed or Ansible 3, see [Upgrading Ansible with pip](#pip-upgrade).

  You can replace `devel` in the URL mentioned above, with any other branch or tag on GitHub to install older versions of Ansible (prior to `ansible-base` 2.10.), tagged alpha or beta versions, and release candidates. This installs all of Ansible.

 
```
$ python -m pip install --user https://github.com/ansible/ansible/archive/stable-2.9.tar.gz

```
 See [Running the devel branch from a clone](#from-source) for instructions on how to run `ansible-core` directly from source.

 ### Installing `devel` from GitHub by cloning

 You can install the `devel` branch of `ansible-core` by cloning the GitHub repository:

 
```
$ git clone https://github.com/ansible/ansible.git
$ cd ./ansible

```
 The default branch is `devel`.

 ### Running the `devel` branch from a clone

 `ansible-core` is easy to run from source. You do not need `root` permissions to use it and there is no software to actually install. No daemons or database setup are required.

 Once you have installed the `ansible-core` repository by cloning, setup the Ansible environment:

 Using Bash:

 
```
$ source ./hacking/env-setup

```
 Using Fish:

 
```
$ source ./hacking/env-setup.fish

```
 If you want to suppress spurious warnings/errors, use:

 
```
$ source ./hacking/env-setup -q

```
 If you do not have `pip` installed in your version of Python, install it:

 
```
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python get-pip.py --user

```
 Ansible also uses the following Python modules that need to be installed [1](#id7):

 
```
$ python -m pip install --user -r ./requirements.txt

```
 To update the `devel` branch of `ansible-core` on your local machine, use pull-with-rebase so any local changes are replayed.

 
```
$ git pull --rebase

```
 
```
$ git pull --rebase #same as above
$ git submodule update --init --recursive

```
 After you run the the env-setup script, you will be running from the source code. The default inventory file will be `/etc/ansible/hosts`. You can optionally specify an inventory file (see [How to build your inventory](../user_guide/intro_inventory#inventory)) other than `/etc/ansible/hosts`:

 
```
$ echo "127.0.0.1" > ~/ansible_hosts
$ export ANSIBLE_INVENTORY=~/ansible_hosts

```
 You can read more about the inventory file at [How to build your inventory](../user_guide/intro_inventory#inventory).

 Confirming your installation
----------------------------

 Whatever method of installing Ansible you chose, you can test that it is installed correctly with a ping command:

 
```
$ ansible all -m ping --ask-pass

```
 You can also use “sudo make install”.

 Finding tarballs of tagged releases
-----------------------------------

 If you are packaging Ansible or wanting to build a local package yourself, and you want to avoid a git checkout, you can use a tarball of a tagged release. You can download the latest stable release from PyPI’s [ansible package page](https://pypi.org/project/ansible/). If you need a specific older version, beta version, or release candidate, you can use the pattern `pypi.python.org/packages/source/a/ansible/ansible-{{VERSION}}.tar.gz`. VERSION must be the full version number, for example 3.1.0 or 4.0.0b2. You can make VERSION a variable in your package managing system that you update in one place whenever you package a new version.

  Note

 If you are creating your own Ansible package, you must also download or package `ansible-core` (or `ansible-base` for packages based on 2.10.x) from PyPI as part of your Ansible package. You must specify a particular version. Visit the PyPI project pages to download files for [ansible-core](https://pypi.org/project/ansible-core/) or [ansible-base](https://pypi.org/project/ansible-base/).

  These releases are also tagged in the [git repository](https://github.com/ansible/ansible/releases) with the release version.

 Adding Ansible command shell completion
---------------------------------------

 As of Ansible 2.9, you can add shell completion of the Ansible command line utilities by installing an optional dependency called `argcomplete`. `argcomplete` supports bash, and has limited support for zsh and tcsh.

 You can install `python-argcomplete` from EPEL on Red Hat Enterprise based distributions, and or from the standard OS repositories for many other distributions.

 For more information about installation and configuration, see the [argcomplete documentation](https://kislyuk.github.io/argcomplete/).

 ### Installing `argcomplete` on RHEL, CentOS, or Fedora

 On Fedora:

 
```
$ sudo dnf install python-argcomplete

```
 On RHEL and CentOS:

 
```
$ sudo yum install epel-release
$ sudo yum install python-argcomplete

```
 ### Installing `argcomplete` with `apt`

 
```
$ sudo apt install python-argcomplete

```
 ### Installing `argcomplete` with `pip`

 
```
$ python -m pip install argcomplete

```
 ### Configuring `argcomplete`

 There are 2 ways to configure `argcomplete` to allow shell completion of the Ansible command line utilities: globally or per command.

 #### Global configuration

 Global completion requires bash 4.2.

 
```
$ sudo activate-global-python-argcomplete

```
 This will write a bash completion file to a global location. Use `--dest` to change the location.

 #### Per command configuration

 If you do not have bash 4.2, you must register each script independently.

 
```
$ eval $(register-python-argcomplete ansible)
$ eval $(register-python-argcomplete ansible-config)
$ eval $(register-python-argcomplete ansible-console)
$ eval $(register-python-argcomplete ansible-doc)
$ eval $(register-python-argcomplete ansible-galaxy)
$ eval $(register-python-argcomplete ansible-inventory)
$ eval $(register-python-argcomplete ansible-playbook)
$ eval $(register-python-argcomplete ansible-pull)
$ eval $(register-python-argcomplete ansible-vault)

```
 You should place the above commands into your shells profile file such as `~/.profile` or `~/.bash_profile`.

 #### Using `argcomplete` with zsh or tcsh

 See the [argcomplete documentation](https://kislyuk.github.io/argcomplete/).

  See also

  [Introduction to ad hoc commands](../user_guide/intro_adhoc#intro-adhoc)

Examples of basic commands

  [Working with playbooks](../user_guide/playbooks#working-with-playbooks)

Learning ansible’s configuration management language

  [How do I handle the package dependencies required by Ansible package dependencies during Ansible installation ?](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#installation-faqs)

Ansible Installation related to FAQs

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

     
`1(1,2)`  
If you have issues with the “pycrypto” package install on macOS, then you may need to try `CC=clang sudo -E pip install pycrypto`.

  
`2`  
`paramiko` was included in Ansible’s `requirements.txt` prior to 2.8.

  

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html>

Ansible Network Examples
========================

 This document describes some examples of using Ansible to manage your network infrastructure.

 * [Prerequisites](#prerequisites)
* [Groups and variables in an inventory file](#groups-and-variables-in-an-inventory-file)


	+ [Ansible vault for password encryption](#ansible-vault-for-password-encryption)
	+ [Common inventory variables](#common-inventory-variables)
	+ [Privilege escalation](#privilege-escalation)
	+ [Jump hosts](#jump-hosts)
* [Example 1: collecting facts and creating backup files with a playbook](#example-1-collecting-facts-and-creating-backup-files-with-a-playbook)


	+ [Step 1: Creating the inventory](#step-1-creating-the-inventory)
	+ [Step 2: Creating the playbook](#step-2-creating-the-playbook)
	+ [Step 3: Running the playbook](#step-3-running-the-playbook)
	+ [Step 4: Examining the playbook results](#step-4-examining-the-playbook-results)
* [Example 2: simplifying playbooks with network agnostic modules](#example-2-simplifying-playbooks-with-network-agnostic-modules)


	+ [Sample playbook with platform-specific modules](#sample-playbook-with-platform-specific-modules)
	+ [Simplified playbook with `cli_command` network agnostic module](#simplified-playbook-with-cli-command-network-agnostic-module)
	+ [Using multiple prompts with the `ansible.netcommon.cli_command`](#using-multiple-prompts-with-the-ansible-netcommon-cli-command)
* [Implementation Notes](#implementation-notes)


	+ [Demo variables](#demo-variables)
	+ [Get running configuration](#get-running-configuration)
* [Troubleshooting](#troubleshooting)

 Prerequisites
-------------

 This example requires the following:

 * **Ansible 2.10** (or higher) installed. See [Installing Ansible](../../installation_guide/intro_installation#intro-installation-guide) for more information.
* One or more network devices that are compatible with Ansible.
* Basic understanding of YAML [YAML Syntax](../../reference_appendices/yamlsyntax#yaml-syntax).
* Basic understanding of Jinja2 templates. See [Templating (Jinja2)](../../user_guide/playbooks_templating#playbooks-templating) for more information.
* Basic Linux command line use.
* Basic knowledge of network switch & router configurations.

 Groups and variables in an inventory file
-----------------------------------------

 An `inventory` file is a YAML or INI-like configuration file that defines the mapping of hosts into groups.

 In our example, the inventory file defines the groups `eos`, `ios`, `vyos` and a “group of groups” called `switches`. Further details about subgroups and inventory files can be found in the [Ansible inventory Group documentation](../../user_guide/intro_inventory#subgroups).

 Because Ansible is a flexible tool, there are a number of ways to specify connection information and credentials. We recommend using the `[my_group:vars]` capability in your inventory file.

 
```
[all:vars]
# these defaults can be overridden for any group in the [group:vars] section
ansible_connection=ansible.netcommon.network_cli
ansible_user=ansible

[switches:children]
eos
ios
vyos

[eos]
veos01 ansible_host=veos-01.example.net
veos02 ansible_host=veos-02.example.net
veos03 ansible_host=veos-03.example.net
veos04 ansible_host=veos-04.example.net

[eos:vars]
ansible_become=yes
ansible_become_method=enable
ansible_network_os=arista.eos.eos
ansible_user=my_eos_user
ansible_password=my_eos_password

[ios]
ios01 ansible_host=ios-01.example.net
ios02 ansible_host=ios-02.example.net
ios03 ansible_host=ios-03.example.net

[ios:vars]
ansible_become=yes
ansible_become_method=enable
ansible_network_os=cisco.ios.ios
ansible_user=my_ios_user
ansible_password=my_ios_password

[vyos]
vyos01 ansible_host=vyos-01.example.net
vyos02 ansible_host=vyos-02.example.net
vyos03 ansible_host=vyos-03.example.net

[vyos:vars]
ansible_network_os=vyos.vyos.vyos
ansible_user=my_vyos_user
ansible_password=my_vyos_password

```
 If you use ssh-agent, you do not need the `ansible_password` lines. If you use ssh keys, but not ssh-agent, and you have multiple keys, specify the key to use for each connection in the `[group:vars]` section with `ansible_ssh_private_key_file=/path/to/correct/key`. For more information on `ansible_ssh_` options see [Connecting to hosts: behavioral inventory parameters](../../user_guide/intro_inventory#behavioral-parameters).

  Warning

 Never store passwords in plain text.

  ### Ansible vault for password encryption

 The “Vault” feature of Ansible allows you to keep sensitive data such as passwords or keys in encrypted files, rather than as plain text in your playbooks or roles. These vault files can then be distributed or placed in source control. See [Using encrypted variables and files](../../user_guide/vault#playbooks-vault) for more information.

 Here’s what it would look like if you specified your SSH passwords (encrypted with Ansible Vault) among your variables:

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: vyos.vyos.vyos
ansible_user: my_vyos_user
ansible_ssh_pass: !vault |
                  $ANSIBLE_VAULT;1.1;AES256
                  39336231636137663964343966653162353431333566633762393034646462353062633264303765
                  6331643066663534383564343537343334633031656538370a333737656236393835383863306466
                  62633364653238323333633337313163616566383836643030336631333431623631396364663533
                  3665626431626532630a353564323566316162613432373738333064366130303637616239396438
                  9853

```
 ### Common inventory variables

 The following variables are common for all platforms in the inventory, though they can be overwritten for a particular inventory group or host.

  ansible\_connection 
Ansible uses the ansible-connection setting to determine how to connect to a remote device. When working with Ansible Networking, set this to an appropriate network connection option, such as``ansible.netcommon.network\_cli``, so Ansible treats the remote node as a network device with a limited execution environment. Without this setting, Ansible would attempt to use ssh to connect to the remote and execute the Python script on the network device, which would fail because Python generally isn’t available on network devices.

  ansible\_network\_os 
Informs Ansible which Network platform this hosts corresponds to. This is required when using the `ansible.netcommon.*` connection options.

  ansible\_user 
The user to connect to the remote device (switch) as. Without this the user that is running `ansible-playbook` would be used. Specifies which user on the network device the connection

  ansible\_password 
The corresponding password for `ansible_user` to log in as. If not specified SSH key will be used.

  ansible\_become 
If enable mode (privilege mode) should be used, see the next section.

  ansible\_become\_method 
Which type of `become` should be used, for `network_cli` the only valid choice is `enable`.

   ### Privilege escalation

 Certain network platforms, such as Arista EOS and Cisco IOS, have the concept of different privilege modes. Certain network modules, such as those that modify system state including users, will only work in high privilege states. Ansible supports `become` when using `connection: ansible.netcommon.network_cli`. This allows privileges to be raised for the specific tasks that need them. Adding `become: yes` and `become_method: enable` informs Ansible to go into privilege mode before executing the task, as shown here:

 
```
[eos:vars]
ansible_connection=ansible.netcommon.network_cli
ansible_network_os=arista.eos.eos
ansible_become=yes
ansible_become_method=enable

```
 For more information, see the [using become with network modules](../../user_guide/become#become-network) guide.

 ### Jump hosts

 If the Ansible Controller does not have a direct route to the remote device and you need to use a Jump Host, please see the [Ansible Network Proxy Command](network_debug_troubleshooting#network-delegate-to-vs-proxycommand) guide for details on how to achieve this.

 Example 1: collecting facts and creating backup files with a playbook
---------------------------------------------------------------------

 Ansible facts modules gather system information ‘facts’ that are available to the rest of your playbook.

 Ansible Networking ships with a number of network-specific facts modules. In this example, we use the `_facts` modules [arista.eos.eos\_facts](../../collections/arista/eos/eos_facts_module#ansible-collections-arista-eos-eos-facts-module), [cisco.ios.ios\_facts](../../collections/cisco/ios/ios_facts_module#ansible-collections-cisco-ios-ios-facts-module) and [vyos.vyos.vyos\_facts](../../collections/vyos/vyos/vyos_facts_module#ansible-collections-vyos-vyos-vyos-facts-module) to connect to the remote networking device. As the credentials are not explicitly passed with module arguments, Ansible uses the username and password from the inventory file.

 Ansible’s “Network Fact modules” gather information from the system and store the results in facts prefixed with `ansible_net_`. The data collected by these modules is documented in the `Return Values` section of the module docs, in this case [arista.eos.eos\_facts](../../collections/arista/eos/eos_facts_module#ansible-collections-arista-eos-eos-facts-module) and [vyos.vyos.vyos\_facts](../../collections/vyos/vyos/vyos_facts_module#ansible-collections-vyos-vyos-vyos-facts-module). We can use the facts, such as `ansible_net_version` late on in the “Display some facts” task.

 To ensure we call the correct mode (`*_facts`) the task is conditionally run based on the group defined in the inventory file, for more information on the use of conditionals in Ansible Playbooks see [Basic conditionals with when](../../user_guide/playbooks_conditionals#the-when-statement).

 In this example, we will create an inventory file containing some network switches, then run a playbook to connect to the network devices and return some information about them.

 ### Step 1: Creating the inventory

 First, create a file called `inventory`, containing:

 
```
[switches:children]
eos
ios
vyos

[eos]
eos01.example.net

[ios]
ios01.example.net

[vyos]
vyos01.example.net

```
 ### Step 2: Creating the playbook

 Next, create a playbook file called `facts-demo.yml` containing the following:

 
```
- name: "Demonstrate connecting to switches"
  hosts: switches
  gather_facts: no

  tasks:
    ###
    # Collect data
    #
    - name: Gather facts (eos)
      arista.eos.eos_facts:
      when: ansible_network_os == 'arista.eos.eos'

    - name: Gather facts (ios)
      cisco.ios.ios_facts:
      when: ansible_network_os == 'cisco.ios.ios'

    - name: Gather facts (vyos)
      vyos.vyos.vyos_facts:
      when: ansible_network_os == 'vyos.vyos.vyos'

    ###
    # Demonstrate variables
    #
    - name: Display some facts
      debug:
        msg: "The hostname is {{ ansible_net_hostname }} and the OS is {{ ansible_net_version }}"

    - name: Facts from a specific host
      debug:
        var: hostvars['vyos01.example.net']

    - name: Write facts to disk using a template
      copy:
        content: |
          #jinja2: lstrip_blocks: True
          EOS device info:
            {% for host in groups['eos'] %}
            Hostname: {{ hostvars[host].ansible_net_hostname }}
            Version: {{ hostvars[host].ansible_net_version }}
            Model: {{ hostvars[host].ansible_net_model }}
            Serial: {{ hostvars[host].ansible_net_serialnum }}
            {% endfor %}

          IOS device info:
            {% for host in groups['ios'] %}
            Hostname: {{ hostvars[host].ansible_net_hostname }}
            Version: {{ hostvars[host].ansible_net_version }}
            Model: {{ hostvars[host].ansible_net_model }}
            Serial: {{ hostvars[host].ansible_net_serialnum }}
            {% endfor %}

          VyOS device info:
            {% for host in groups['vyos'] %}
            Hostname: {{ hostvars[host].ansible_net_hostname }}
            Version: {{ hostvars[host].ansible_net_version }}
            Model: {{ hostvars[host].ansible_net_model }}
            Serial: {{ hostvars[host].ansible_net_serialnum }}
            {% endfor %}
        dest: /tmp/switch-facts
      run_once: yes

    ###
    # Get running configuration
    #

    - name: Backup switch (eos)
      arista.eos.eos_config:
        backup: yes
      register: backup_eos_location
      when: ansible_network_os == 'arista.eos.eos'

    - name: backup switch (vyos)
      vyos.vyos.vyos_config:
        backup: yes
      register: backup_vyos_location
      when: ansible_network_os == 'vyos.vyos.vyos'

    - name: Create backup dir
      file:
        path: "/tmp/backups/{{ inventory_hostname }}"
        state: directory
        recurse: yes

    - name: Copy backup files into /tmp/backups/ (eos)
      copy:
        src: "{{ backup_eos_location.backup_path }}"
        dest: "/tmp/backups/{{ inventory_hostname }}/{{ inventory_hostname }}.bck"
      when: ansible_network_os == 'arista.eos.eos'

    - name: Copy backup files into /tmp/backups/ (vyos)
      copy:
        src: "{{ backup_vyos_location.backup_path }}"
        dest: "/tmp/backups/{{ inventory_hostname }}/{{ inventory_hostname }}.bck"
      when: ansible_network_os == 'vyos.vyos.vyos'

```
 ### Step 3: Running the playbook

 To run the playbook, run the following from a console prompt:

 
```
ansible-playbook -i inventory facts-demo.yml

```
 This should return output similar to the following:

 
```
PLAY RECAP
eos01.example.net          : ok=7    changed=2    unreachable=0    failed=0
ios01.example.net          : ok=7    changed=2    unreachable=0    failed=0
vyos01.example.net         : ok=6    changed=2    unreachable=0    failed=0

```
 ### Step 4: Examining the playbook results

 Next, look at the contents of the file we created containing the switch facts:

 
```
cat /tmp/switch-facts

```
 You can also look at the backup files:

 
```
find /tmp/backups

```
 If `ansible-playbook` fails, please follow the debug steps in [Network Debug and Troubleshooting Guide](network_debug_troubleshooting#network-debug-troubleshooting).

 Example 2: simplifying playbooks with network agnostic modules
--------------------------------------------------------------

 (This example originally appeared in the [Deep Dive on cli\_command for Network Automation](https://www.ansible.com/blog/deep-dive-on-cli-command-for-network-automation) blog post by Sean Cavanaugh -[@IPvSean](https://github.com/IPvSean)).

 If you have two or more network platforms in your environment, you can use the network agnostic modules to simplify your playbooks. You can use network agnostic modules such as `ansible.netcommon.cli_command` or `ansible.netcommon.cli_config` in place of the platform-specific modules such as `arista.eos.eos_config`, `cisco.ios.ios_config`, and `junipernetworks.junos.junos_config`. This reduces the number of tasks and conditionals you need in your playbooks.

  Note

 Network agnostic modules require the [ansible.netcommon.network\_cli](../../collections/ansible/netcommon/network_cli_connection#ansible-collections-ansible-netcommon-network-cli-connection) connection plugin.

  ### Sample playbook with platform-specific modules

 This example assumes three platforms, Arista EOS, Cisco NXOS, and Juniper JunOS. Without the network agnostic modules, a sample playbook might contain the following three tasks with platform-specific commands:

 
```
---
- name: Run Arista command
  arista.eos.eos_command:
    commands: show ip int br
  when: ansible_network_os == 'arista.eos.eos'

- name: Run Cisco NXOS command
  cisco.nxos.nxos_command:
    commands: show ip int br
  when: ansible_network_os == 'cisco.nxos.nxos'

- name: Run Vyos command
  vyos.vyos.vyos_command:
    commands: show interface
  when: ansible_network_os == 'vyos.vyos.vyos'

```
 ### Simplified playbook with `cli_command` network agnostic module

 You can replace these platform-specific modules with the network agnostic `ansible.netcommon.cli_command` module as follows:

 
```
---
- hosts: network
  gather_facts: false
  connection: ansible.netcommon.network_cli

  tasks:
    - name: Run cli_command on Arista and display results
      block:
      - name: Run cli_command on Arista
        ansible.netcommon.cli_command:
          command: show ip int br
        register: result

      - name: Display result to terminal window
        debug:
          var: result.stdout_lines
      when: ansible_network_os == 'arista.eos.eos'

    - name: Run cli_command on Cisco IOS and display results
      block:
      - name: Run cli_command on Cisco IOS
        ansible.netcommon.cli_command:
          command: show ip int br
        register: result

      - name: Display result to terminal window
        debug:
          var: result.stdout_lines
      when: ansible_network_os == 'cisco.ios.ios'

    - name: Run cli_command on Vyos and display results
      block:
      - name: Run cli_command on Vyos
        ansible.netcommon.cli_command:
          command: show interfaces
        register: result

      - name: Display result to terminal window
        debug:
          var: result.stdout_lines
      when: ansible_network_os == 'vyos.vyos.vyos'

```
 If you use groups and group\_vars by platform type, this playbook can be further simplified to :

 
```
---
- name: Run command and print to terminal window
  hosts: routers
  gather_facts: false

  tasks:
    - name: Run show command
      ansible.netcommon.cli_command:
        command: "{{show_interfaces}}"
      register: command_output

```
 You can see a full example of this using group\_vars and also a configuration backup example at [Network agnostic examples](https://github.com/network-automation/agnostic_example).

 ### Using multiple prompts with the `ansible.netcommon.cli_command`

 The `ansible.netcommon.cli_command` also supports multiple prompts.

 
```
---
- name: Change password to default
  ansible.netcommon.cli_command:
    command: "{{ item }}"
    prompt:
      - "New password"
      - "Retype new password"
    answer:
      - "mypassword123"
      - "mypassword123"
    check_all: True
  loop:
    - "configure"
    - "rollback"
    - "set system root-authentication plain-text-password"
    - "commit"

```
 See the [ansible.netcommon.cli\_command](https://docs.ansible.com/ansible/2.9/modules/cli_command_module.html#cli-command-module "(in Ansible v2.9)") for full documentation on this command.

 Implementation Notes
--------------------

 ### Demo variables

 Although these tasks are not needed to write data to disk, they are used in this example to demonstrate some methods of accessing facts about the given devices or a named host.

 Ansible `hostvars` allows you to access variables from a named host. Without this we would return the details for the current host, rather than the named host.

 For more information, see [Information about Ansible: magic variables](../../user_guide/playbooks_vars_facts#magic-variables-and-hostvars).

 ### Get running configuration

 The [arista.eos.eos\_config](../../collections/arista/eos/eos_config_module#ansible-collections-arista-eos-eos-config-module) and [vyos.vyos.vyos\_config](../../collections/vyos/vyos/vyos_config_module#ansible-collections-vyos-vyos-vyos-config-module) modules have a `backup:` option that when set will cause the module to create a full backup of the current `running-config` from the remote device before any changes are made. The backup file is written to the `backup` folder in the playbook root directory. If the directory does not exist, it is created.

 To demonstrate how we can move the backup file to a different location, we register the result and move the file to the path stored in `backup_path`.

 Note that when using variables from tasks in this way we use double quotes (`"`) and double curly-brackets (`{{...}}` to tell Ansible that this is a variable.

 Troubleshooting
---------------

 If you receive an connection error please double check the inventory and playbook for typos or missing lines. If the issue still occurs follow the debug steps in [Network Debug and Troubleshooting Guide](network_debug_troubleshooting#network-debug-troubleshooting).

  See also

 * [Ansible for Network Automation](../index#network-guide)
* [How to build your inventory](../../user_guide/intro_inventory#intro-inventory)
* [Keeping vaulted variables visible](../../user_guide/playbooks_best_practices#tip-for-variables-and-vaults)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/network_best_practices_2.5.html>

Ansible Configuration Settings
==============================

 Ansible supports several sources for configuring its behavior, including an ini file named `ansible.cfg`, environment variables, command-line options, playbook keywords, and variables. See [Controlling how Ansible behaves: precedence rules](general_precedence#general-precedence-rules) for details on the relative precedence of each source.

 The `ansible-config` utility allows users to see all the configuration settings available, their defaults, how to set them and where their current value comes from. See [ansible-config](../cli/ansible-config#ansible-config) for more information.

 The configuration file
----------------------

 Changes can be made and used in a configuration file which will be searched for in the following order:

 * `ANSIBLE_CONFIG` (environment variable if set)
* `ansible.cfg` (in the current directory)
* `~/.ansible.cfg` (in the home directory)
* `/etc/ansible/ansible.cfg`

 Ansible will process the above list and use the first file found, all others are ignored.

  Note

 The configuration file is one variant of an INI format. Both the hash sign (`#`) and semicolon (`;`) are allowed as comment markers when the comment starts the line. However, if the comment is inline with regular values, only the semicolon is allowed to introduce the comment. For instance:

 
```
# some basic default values...
inventory = /etc/ansible/hosts  ; This points to the file that lists your hosts

```
  ### Avoiding security risks with `ansible.cfg` in the current directory

 If Ansible were to load `ansible.cfg` from a world-writable current working directory, it would create a serious security risk. Another user could place their own config file there, designed to make Ansible run malicious code both locally and remotely, possibly with elevated privileges. For this reason, Ansible will not automatically load a config file from the current working directory if the directory is world-writable.

 If you depend on using Ansible with a config file in the current working directory, the best way to avoid this problem is to restrict access to your Ansible directories to particular user(s) and/or group(s). If your Ansible directories live on a filesystem which has to emulate Unix permissions, like Vagrant or Windows Subsystem for Linux (WSL), you may, at first, not know how you can fix this as `chmod`, `chown`, and `chgrp` might not work there. In most of those cases, the correct fix is to modify the mount options of the filesystem so the files and directories are readable and writable by the users and groups running Ansible but closed to others. For more details on the correct settings, see:

 * for Vagrant, the [Vagrant documentation](https://www.vagrantup.com/docs/synced-folders/) covers synced folder permissions.
* for WSL, the [WSL docs](https://docs.microsoft.com/en-us/windows/wsl/wsl-config#set-wsl-launch-settings) and this [Microsoft blog post](https://blogs.msdn.microsoft.com/commandline/2018/01/12/chmod-chown-wsl-improvements/) cover mount options.

 If you absolutely depend on storing your Ansible config in a world-writable current working directory, you can explicitly specify the config file via the [`ANSIBLE_CONFIG`](#envvar-ANSIBLE_CONFIG) environment variable. Please take appropriate steps to mitigate the security concerns above before doing so.

 ### Relative paths for configuration

 You can specify a relative path for many configuration options. In most of those cases the path used will be relative to the `ansible.cfg` file used for the current execution. If you need a path relative to your current working directory (CWD) you can use the `{{CWD}}` macro to specify it. We do not recommend this approach, as using your CWD as the root of relative paths can be a security risk. For example: `cd /tmp; secureinfo=./newrootpassword ansible-playbook ~/safestuff/change_root_pwd.yml`.

 Common Options
--------------

 This is a copy of the options available from our release, your local install might have extra options due to additional plugins, you can use the command line utility mentioned above (`ansible-config`) to browse through those.

 ### ACTION\_WARNINGS

  Description 
By default Ansible will issue a warning when received from a task action (module or action plugin) These warnings can be silenced by adjusting this setting to False.

  Type 
boolean

  Default 
True

  Version Added 
2.5

  Ini 
 Section 
[defaults]

  Key 
action\_warnings

    Environment 
 Variable 
[`ANSIBLE_ACTION_WARNINGS`](#envvar-ANSIBLE_ACTION_WARNINGS)

     ### AGNOSTIC\_BECOME\_PROMPT

  Description 
Display an agnostic become prompt instead of displaying a prompt containing the command line supplied become method

  Type 
boolean

  Default 
True

  Version Added 
2.5

  Ini 
 Section 
[privilege\_escalation]

  Key 
agnostic\_become\_prompt

    Environment 
 Variable 
[`ANSIBLE_AGNOSTIC_BECOME_PROMPT`](#envvar-ANSIBLE_AGNOSTIC_BECOME_PROMPT)

     ### ALLOW\_WORLD\_READABLE\_TMPFILES

  Description 
This setting has been moved to the individual shell plugins as a plugin option [Shell Plugins](../plugins/shell#shell-plugins). The existing configuration settings are still accepted with the shell plugin adding additional options, like variables. This message will be removed in 2.14.

  Type 
boolean

  Default 
False

  Deprecated in 
2.14

  Deprecated detail 
moved to shell plugins

  Deprecated alternatives 
world\_readable\_tmp

   ### ANSIBLE\_CONNECTION\_PATH

  Description 
Specify where to look for the ansible-connection script. This location will be checked before searching $PATH. If null, ansible will start with the same directory as the ansible script.

  Type 
path

  Default 
None

  Version Added 
2.8

  Ini 
 Section 
[persistent\_connection]

  Key 
ansible\_connection\_path

    Environment 
 Variable 
[`ANSIBLE_CONNECTION_PATH`](#envvar-ANSIBLE_CONNECTION_PATH)

     ### ANSIBLE\_COW\_ACCEPTLIST

  Description 
White list of cowsay templates that are ‘safe’ to use, set to empty list if you want to enable all installed templates.

  Type 
list

  Default 
[‘bud-frogs’, ‘bunny’, ‘cheese’, ‘daemon’, ‘default’, ‘dragon’, ‘elephant-in-snake’, ‘elephant’, ‘eyes’, ‘hellokitty’, ‘kitty’, ‘luke-koala’, ‘meow’, ‘milk’, ‘moofasa’, ‘moose’, ‘ren’, ‘sheep’, ‘small’, ‘stegosaurus’, ‘stimpy’, ‘supermilker’, ‘three-eyes’, ‘turkey’, ‘turtle’, ‘tux’, ‘udder’, ‘vader-koala’, ‘vader’, ‘www’]

  Ini 
* Section 
[defaults]

  Key 
cow\_whitelist

  Deprecated in 
2.15

  Deprecated detail 
normalizing names to new standard

  Deprecated alternatives 
cowsay\_enabled\_stencils
* Section 
[defaults]

  Key 
cowsay\_enabled\_stencils

  Version Added 
2.11

  Environment 
* Variable 
[`ANSIBLE_COW_ACCEPTLIST`](#envvar-ANSIBLE_COW_ACCEPTLIST)

  Version Added 
2.11
* Variable 
[`ANSIBLE_COW_WHITELIST`](#envvar-ANSIBLE_COW_WHITELIST)

  Deprecated in 
2.15

  Deprecated detail 
normalizing names to new standard

  Deprecated alternatives 
ANSIBLE\_COW\_ACCEPTLIST

   ### ANSIBLE\_COW\_PATH

  Description 
Specify a custom cowsay path or swap in your cowsay implementation of choice

  Type 
string

  Default 
None

  Ini 
 Section 
[defaults]

  Key 
cowpath

    Environment 
 Variable 
[`ANSIBLE_COW_PATH`](#envvar-ANSIBLE_COW_PATH)

     ### ANSIBLE\_COW\_SELECTION

  Description 
This allows you to chose a specific cowsay stencil for the banners or use ‘random’ to cycle through them.

  Default 
default

  Ini 
 Section 
[defaults]

  Key 
cow\_selection

    Environment 
 Variable 
[`ANSIBLE_COW_SELECTION`](#envvar-ANSIBLE_COW_SELECTION)

     ### ANSIBLE\_FORCE\_COLOR

  Description 
This option forces color mode even when running without a TTY or the “nocolor” setting is True.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
force\_color

    Environment 
 Variable 
[`ANSIBLE_FORCE_COLOR`](#envvar-ANSIBLE_FORCE_COLOR)

     ### ANSIBLE\_NOCOLOR

  Description 
This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
nocolor

    Environment 
* Variable 
[`ANSIBLE_NOCOLOR`](#envvar-ANSIBLE_NOCOLOR)
* Variable 
[`NO_COLOR`](#envvar-NO_COLOR)

  Version Added 
2.11

   ### ANSIBLE\_NOCOWS

  Description 
If you have cowsay installed but want to avoid the ‘cows’ (why????), use this.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
nocows

    Environment 
 Variable 
[`ANSIBLE_NOCOWS`](#envvar-ANSIBLE_NOCOWS)

     ### ANSIBLE\_PIPELINING

  Description 
Pipelining, if supported by the connection plugin, reduces the number of network operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfer. This can result in a very significant performance improvement when enabled. However this conflicts with privilege escalation (become). For example, when using ‘sudo:’ operations you must first disable ‘requiretty’ in /etc/sudoers on all managed hosts, which is why it is disabled by default. This option is disabled if `ANSIBLE_KEEP_REMOTE_FILES` is enabled. This is a global option, each connection plugin can override either by having more specific options or not supporting pipelining at all.

  Type 
boolean

  Default 
False

  Ini 
* Section 
[connection]

  Key 
pipelining
* Section 
[defaults]

  Key 
pipelining

  Environment 
 Variable 
[`ANSIBLE_PIPELINING`](#envvar-ANSIBLE_PIPELINING)

     ### ANY\_ERRORS\_FATAL

  Description 
Sets the default value for the any\_errors\_fatal keyword, if True, Task failures will be considered fatal errors.

  Type 
boolean

  Default 
False

  Version Added 
2.4

  Ini 
 Section 
[defaults]

  Key 
any\_errors\_fatal

    Environment 
 Variable 
[`ANSIBLE_ANY_ERRORS_FATAL`](#envvar-ANSIBLE_ANY_ERRORS_FATAL)

     ### BECOME\_ALLOW\_SAME\_USER

  Description 
This setting controls if become is skipped when remote user and become user are the same. I.E root sudo to root.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[privilege\_escalation]

  Key 
become\_allow\_same\_user

    Environment 
 Variable 
[`ANSIBLE_BECOME_ALLOW_SAME_USER`](#envvar-ANSIBLE_BECOME_ALLOW_SAME_USER)

     ### BECOME\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Become Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/become:/usr/share/ansible/plugins/become

  Version Added 
2.8

  Ini 
 Section 
[defaults]

  Key 
become\_plugins

    Environment 
 Variable 
[`ANSIBLE_BECOME_PLUGINS`](#envvar-ANSIBLE_BECOME_PLUGINS)

     ### CACHE\_PLUGIN

  Description 
Chooses which cache plugin to use, the default ‘memory’ is ephemeral.

  Default 
memory

  Ini 
 Section 
[defaults]

  Key 
fact\_caching

    Environment 
 Variable 
[`ANSIBLE_CACHE_PLUGIN`](#envvar-ANSIBLE_CACHE_PLUGIN)

     ### CACHE\_PLUGIN\_CONNECTION

  Description 
Defines connection or path information for the cache plugin

  Default 
None

  Ini 
 Section 
[defaults]

  Key 
fact\_caching\_connection

    Environment 
 Variable 
[`ANSIBLE_CACHE_PLUGIN_CONNECTION`](#envvar-ANSIBLE_CACHE_PLUGIN_CONNECTION)

     ### CACHE\_PLUGIN\_PREFIX

  Description 
Prefix to use for cache plugin files/tables

  Default 
ansible\_facts

  Ini 
 Section 
[defaults]

  Key 
fact\_caching\_prefix

    Environment 
 Variable 
[`ANSIBLE_CACHE_PLUGIN_PREFIX`](#envvar-ANSIBLE_CACHE_PLUGIN_PREFIX)

     ### CACHE\_PLUGIN\_TIMEOUT

  Description 
Expiration timeout for the cache plugin data

  Type 
integer

  Default 
86400

  Ini 
 Section 
[defaults]

  Key 
fact\_caching\_timeout

    Environment 
 Variable 
[`ANSIBLE_CACHE_PLUGIN_TIMEOUT`](#envvar-ANSIBLE_CACHE_PLUGIN_TIMEOUT)

     ### CALLABLE\_ACCEPT\_LIST

  Description 
Whitelist of callable methods to be made available to template evaluation

  Type 
list

  Default 
[]

  Ini 
* Section 
[defaults]

  Key 
callable\_whitelist

  Deprecated in 
2.15

  Deprecated detail 
normalizing names to new standard

  Deprecated alternatives 
callable\_enabled
* Section 
[defaults]

  Key 
callable\_enabled

  Version Added 
2.11

  Environment 
* Variable 
[`ANSIBLE_CALLABLE_ENABLED`](#envvar-ANSIBLE_CALLABLE_ENABLED)

  Version Added 
2.11
* Variable 
[`ANSIBLE_CALLABLE_WHITELIST`](#envvar-ANSIBLE_CALLABLE_WHITELIST)

  Deprecated in 
2.15

  Deprecated detail 
normalizing names to new standard

  Deprecated alternatives 
ANSIBLE\_CALLABLE\_ENABLED

   ### CALLBACKS\_ENABLED

  Description 
List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don’t want them activated by default.

  Type 
list

  Default 
[]

  Ini 
* Section 
[defaults]

  Key 
callback\_whitelist

  Deprecated in 
2.15

  Deprecated detail 
normalizing names to new standard

  Deprecated alternatives 
callbacks\_enabled
* Section 
[defaults]

  Key 
callbacks\_enabled

  Version Added 
2.11

  Environment 
* Variable 
[`ANSIBLE_CALLBACK_WHITELIST`](#envvar-ANSIBLE_CALLBACK_WHITELIST)

  Deprecated in 
2.15

  Deprecated detail 
normalizing names to new standard

  Deprecated alternatives 
ANSIBLE\_CALLBACKS\_ENABLED
* Variable 
[`ANSIBLE_CALLBACKS_ENABLED`](#envvar-ANSIBLE_CALLBACKS_ENABLED)

  Version Added 
2.11

   ### COLLECTIONS\_ON\_ANSIBLE\_VERSION\_MISMATCH

  Description 
When a collection is loaded that does not support the running Ansible version (via the collection metadata key `requires_ansible`), the default behavior is to issue a warning and continue anyway. Setting this value to `ignore` skips the warning entirely, while setting it to `fatal` will immediately halt Ansible execution.

  Default 
warning

  Choices 
* error
* warning
* ignore

  Ini 
 Section 
[defaults]

  Key 
collections\_on\_ansible\_version\_mismatch

    Environment 
 Variable 
[`ANSIBLE_COLLECTIONS_ON_ANSIBLE_VERSION_MISMATCH`](#envvar-ANSIBLE_COLLECTIONS_ON_ANSIBLE_VERSION_MISMATCH)

     ### COLLECTIONS\_PATHS

  Description 
Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, not directly in these directories. For example, if `COLLECTIONS_PATHS` includes `~/.ansible/collections`, and you want to add `my.collection` to that directory, it must be saved as `~/.ansible/collections/ansible_collections/my/collection`.

  Type 
pathspec

  Default 
~/.ansible/collections:/usr/share/ansible/collections

  Ini 
* Section 
[defaults]

  Key 
collections\_paths
* Section 
[defaults]

  Key 
collections\_path

  Version Added 
2.10

  Environment 
* Variable 
[`ANSIBLE_COLLECTIONS_PATH`](#envvar-ANSIBLE_COLLECTIONS_PATH)

  Version Added 
2.10
* Variable 
[`ANSIBLE_COLLECTIONS_PATHS`](#envvar-ANSIBLE_COLLECTIONS_PATHS)

   ### COLLECTIONS\_SCAN\_SYS\_PATH

  Description 
A boolean to enable or disable scanning the sys.path for installed collections

  Type 
boolean

  Default 
True

  Ini 
 Section 
[defaults]

  Key 
collections\_scan\_sys\_path

    Environment 
 Variable 
[`ANSIBLE_COLLECTIONS_SCAN_SYS_PATH`](#envvar-ANSIBLE_COLLECTIONS_SCAN_SYS_PATH)

     ### COLOR\_CHANGED

  Description 
Defines the color to use on ‘Changed’ task status

  Default 
yellow

  Choices 
* black
* bright gray
* blue
* white
* green
* bright blue
* cyan
* bright green
* red
* bright cyan
* purple
* bright red
* yellow
* bright purple
* dark gray
* bright yellow
* magenta
* bright magenta
* normal

  Ini 
 Section 
[colors]

  Key 
changed

    Environment 
 Variable 
[`ANSIBLE_COLOR_CHANGED`](#envvar-ANSIBLE_COLOR_CHANGED)

     ### COLOR\_CONSOLE\_PROMPT

  Description 
Defines the default color to use for ansible-console

  Default 
white

  Choices 
* black
* bright gray
* blue
* white
* green
* bright blue
* cyan
* bright green
* red
* bright cyan
* purple
* bright red
* yellow
* bright purple
* dark gray
* bright yellow
* magenta
* bright magenta
* normal

  Version Added 
2.7

  Ini 
 Section 
[colors]

  Key 
console\_prompt

    Environment 
 Variable 
[`ANSIBLE_COLOR_CONSOLE_PROMPT`](#envvar-ANSIBLE_COLOR_CONSOLE_PROMPT)

     ### COLOR\_DEBUG

  Description 
Defines the color to use when emitting debug messages

  Default 
dark gray

  Choices 
* black
* bright gray
* blue
* white
* green
* bright blue
* cyan
* bright green
* red
* bright cyan
* purple
* bright red
* yellow
* bright purple
* dark gray
* bright yellow
* magenta
* bright magenta
* normal

  Ini 
 Section 
[colors]

  Key 
debug

    Environment 
 Variable 
[`ANSIBLE_COLOR_DEBUG`](#envvar-ANSIBLE_COLOR_DEBUG)

     ### COLOR\_DEPRECATE

  Description 
Defines the color to use when emitting deprecation messages

  Default 
purple

  Choices 
* black
* bright gray
* blue
* white
* green
* bright blue
* cyan
* bright green
* red
* bright cyan
* purple
* bright red
* yellow
* bright purple
* dark gray
* bright yellow
* magenta
* bright magenta
* normal

  Ini 
 Section 
[colors]

  Key 
deprecate

    Environment 
 Variable 
[`ANSIBLE_COLOR_DEPRECATE`](#envvar-ANSIBLE_COLOR_DEPRECATE)

     ### COLOR\_DIFF\_ADD

  Description 
Defines the color to use when showing added lines in diffs

  Default 
green

  Choices 
* black
* bright gray
* blue
* white
* green
* bright blue
* cyan
* bright green
* red
* bright cyan
* purple
* bright red
* yellow
* bright purple
* dark gray
* bright yellow
* magenta
* bright magenta
* normal

  Ini 
 Section 
[colors]

  Key 
diff\_add

    Environment 
 Variable 
[`ANSIBLE_COLOR_DIFF_ADD`](#envvar-ANSIBLE_COLOR_DIFF_ADD)

     ### COLOR\_DIFF\_LINES

  Description 
Defines the color to use when showing diffs

  Default 
cyan

  Choices 
* black
* bright gray
* blue
* white
* green
* bright blue
* cyan
* bright green
* red
* bright cyan
* purple
* bright red
* yellow
* bright purple
* dark gray
* bright yellow
* magenta
* bright magenta
* normal

  Ini 
 Section 
[colors]

  Key 
diff\_lines

    Environment 
 Variable 
[`ANSIBLE_COLOR_DIFF_LINES`](#envvar-ANSIBLE_COLOR_DIFF_LINES)

     ### COLOR\_DIFF\_REMOVE

  Description 
Defines the color to use when showing removed lines in diffs

  Default 
red

  Choices 
* black
* bright gray
* blue
* white
* green
* bright blue
* cyan
* bright green
* red
* bright cyan
* purple
* bright red
* yellow
* bright purple
* dark gray
* bright yellow
* magenta
* bright magenta
* normal

  Ini 
 Section 
[colors]

  Key 
diff\_remove

    Environment 
 Variable 
[`ANSIBLE_COLOR_DIFF_REMOVE`](#envvar-ANSIBLE_COLOR_DIFF_REMOVE)

     ### COLOR\_ERROR

  Description 
Defines the color to use when emitting error messages

  Default 
red

  Choices 
* black
* bright gray
* blue
* white
* green
* bright blue
* cyan
* bright green
* red
* bright cyan
* purple
* bright red
* yellow
* bright purple
* dark gray
* bright yellow
* magenta
* bright magenta
* normal

  Ini 
 Section 
[colors]

  Key 
error

    Environment 
 Variable 
[`ANSIBLE_COLOR_ERROR`](#envvar-ANSIBLE_COLOR_ERROR)

     ### COLOR\_HIGHLIGHT

  Description 
Defines the color to use for highlighting

  Default 
white

  Choices 
* black
* bright gray
* blue
* white
* green
* bright blue
* cyan
* bright green
* red
* bright cyan
* purple
* bright red
* yellow
* bright purple
* dark gray
* bright yellow
* magenta
* bright magenta
* normal

  Ini 
 Section 
[colors]

  Key 
highlight

    Environment 
 Variable 
[`ANSIBLE_COLOR_HIGHLIGHT`](#envvar-ANSIBLE_COLOR_HIGHLIGHT)

     ### COLOR\_OK

  Description 
Defines the color to use when showing ‘OK’ task status

  Default 
green

  Choices 
* black
* bright gray
* blue
* white
* green
* bright blue
* cyan
* bright green
* red
* bright cyan
* purple
* bright red
* yellow
* bright purple
* dark gray
* bright yellow
* magenta
* bright magenta
* normal

  Ini 
 Section 
[colors]

  Key 
ok

    Environment 
 Variable 
[`ANSIBLE_COLOR_OK`](#envvar-ANSIBLE_COLOR_OK)

     ### COLOR\_SKIP

  Description 
Defines the color to use when showing ‘Skipped’ task status

  Default 
cyan

  Choices 
* black
* bright gray
* blue
* white
* green
* bright blue
* cyan
* bright green
* red
* bright cyan
* purple
* bright red
* yellow
* bright purple
* dark gray
* bright yellow
* magenta
* bright magenta
* normal

  Ini 
 Section 
[colors]

  Key 
skip

    Environment 
 Variable 
[`ANSIBLE_COLOR_SKIP`](#envvar-ANSIBLE_COLOR_SKIP)

     ### COLOR\_UNREACHABLE

  Description 
Defines the color to use on ‘Unreachable’ status

  Default 
bright red

  Choices 
* black
* bright gray
* blue
* white
* green
* bright blue
* cyan
* bright green
* red
* bright cyan
* purple
* bright red
* yellow
* bright purple
* dark gray
* bright yellow
* magenta
* bright magenta
* normal

  Ini 
 Section 
[colors]

  Key 
unreachable

    Environment 
 Variable 
[`ANSIBLE_COLOR_UNREACHABLE`](#envvar-ANSIBLE_COLOR_UNREACHABLE)

     ### COLOR\_VERBOSE

  Description 
Defines the color to use when emitting verbose messages. i.e those that show with ‘-v’s.

  Default 
blue

  Choices 
* black
* bright gray
* blue
* white
* green
* bright blue
* cyan
* bright green
* red
* bright cyan
* purple
* bright red
* yellow
* bright purple
* dark gray
* bright yellow
* magenta
* bright magenta
* normal

  Ini 
 Section 
[colors]

  Key 
verbose

    Environment 
 Variable 
[`ANSIBLE_COLOR_VERBOSE`](#envvar-ANSIBLE_COLOR_VERBOSE)

     ### COLOR\_WARN

  Description 
Defines the color to use when emitting warning messages

  Default 
bright purple

  Choices 
* black
* bright gray
* blue
* white
* green
* bright blue
* cyan
* bright green
* red
* bright cyan
* purple
* bright red
* yellow
* bright purple
* dark gray
* bright yellow
* magenta
* bright magenta
* normal

  Ini 
 Section 
[colors]

  Key 
warn

    Environment 
 Variable 
[`ANSIBLE_COLOR_WARN`](#envvar-ANSIBLE_COLOR_WARN)

     ### COMMAND\_WARNINGS

  Description 
Ansible can issue a warning when the shell or command module is used and the command appears to be similar to an existing Ansible module. These warnings can be silenced by adjusting this setting to False. You can also control this at the task level with the module option `warn`. As of version 2.11, this is disabled by default.

  Type 
boolean

  Default 
False

  Version Added 
1.8

  Ini 
 Section 
[defaults]

  Key 
command\_warnings

    Environment 
 Variable 
[`ANSIBLE_COMMAND_WARNINGS`](#envvar-ANSIBLE_COMMAND_WARNINGS)

    Deprecated in 
2.14

  Deprecated detail 
the command warnings feature is being removed

   ### CONDITIONAL\_BARE\_VARS

  Description 
With this setting on (True), running conditional evaluation ‘var’ is treated differently than ‘var.subkey’ as the first is evaluated directly while the second goes through the Jinja2 parser. But ‘false’ strings in ‘var’ get evaluated as booleans. With this setting off they both evaluate the same but in cases in which ‘var’ was ‘false’ (a string) it won’t get evaluated as a boolean anymore. Currently this setting defaults to ‘True’ but will soon change to ‘False’ and the setting itself will be removed in the future. Expect that this setting eventually will be deprecated after 2.12

  Type 
boolean

  Default 
False

  Version Added 
2.8

  Ini 
 Section 
[defaults]

  Key 
conditional\_bare\_variables

    Environment 
 Variable 
[`ANSIBLE_CONDITIONAL_BARE_VARS`](#envvar-ANSIBLE_CONDITIONAL_BARE_VARS)

     ### CONNECTION\_FACTS\_MODULES

  Description 
Which modules to run during a play’s fact gathering stage based on connection

  Type 
dict

  Default 
{‘asa’: ‘ansible.legacy.asa\_facts’, ‘cisco.asa.asa’: ‘cisco.asa.asa\_facts’, ‘eos’: ‘ansible.legacy.eos\_facts’, ‘arista.eos.eos’: ‘arista.eos.eos\_facts’, ‘frr’: ‘ansible.legacy.frr\_facts’, ‘frr.frr.frr’: ‘frr.frr.frr\_facts’, ‘ios’: ‘ansible.legacy.ios\_facts’, ‘cisco.ios.ios’: ‘cisco.ios.ios\_facts’, ‘iosxr’: ‘ansible.legacy.iosxr\_facts’, ‘cisco.iosxr.iosxr’: ‘cisco.iosxr.iosxr\_facts’, ‘junos’: ‘ansible.legacy.junos\_facts’, ‘junipernetworks.junos.junos’: ‘junipernetworks.junos.junos\_facts’, ‘nxos’: ‘ansible.legacy.nxos\_facts’, ‘cisco.nxos.nxos’: ‘cisco.nxos.nxos\_facts’, ‘vyos’: ‘ansible.legacy.vyos\_facts’, ‘vyos.vyos.vyos’: ‘vyos.vyos.vyos\_facts’, ‘exos’: ‘ansible.legacy.exos\_facts’, ‘extreme.exos.exos’: ‘extreme.exos.exos\_facts’, ‘slxos’: ‘ansible.legacy.slxos\_facts’, ‘extreme.slxos.slxos’: ‘extreme.slxos.slxos\_facts’, ‘voss’: ‘ansible.legacy.voss\_facts’, ‘extreme.voss.voss’: ‘extreme.voss.voss\_facts’, ‘ironware’: ‘ansible.legacy.ironware\_facts’, ‘community.network.ironware’: ‘community.network.ironware\_facts’}

   ### CONTROLLER\_PYTHON\_WARNING

  Description 
Toggle to control showing warnings related to running a Python version older than Python 3.8 on the controller

  Type 
boolean

  Default 
True

  Ini 
 Section 
[defaults]

  Key 
controller\_python\_warning

    Environment 
 Variable 
[`ANSIBLE_CONTROLLER_PYTHON_WARNING`](#envvar-ANSIBLE_CONTROLLER_PYTHON_WARNING)

     ### COVERAGE\_REMOTE\_OUTPUT

  Description 
Sets the output directory on the remote host to generate coverage reports to. Currently only used for remote coverage on PowerShell modules. This is for internal use only.

  Type 
str

  Version Added 
2.9

  Environment 
 Variable 
[`_ANSIBLE_COVERAGE_REMOTE_OUTPUT`](#envvar-_ANSIBLE_COVERAGE_REMOTE_OUTPUT)

    Variables 
 name 
`_ansible_coverage_remote_output`

     ### COVERAGE\_REMOTE\_PATHS

  Description 
A list of paths for files on the Ansible controller to run coverage for when executing on the remote host. Only files that match the path glob will have its coverage collected. Multiple path globs can be specified and are separated by `:`. Currently only used for remote coverage on PowerShell modules. This is for internal use only.

  Type 
str

  Default 
* 

  Version Added 
2.9

  Environment 
 Variable 
[`_ANSIBLE_COVERAGE_REMOTE_PATH_FILTER`](#envvar-_ANSIBLE_COVERAGE_REMOTE_PATH_FILTER)

     ### DEFAULT\_ACTION\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Action Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/action:/usr/share/ansible/plugins/action

  Ini 
 Section 
[defaults]

  Key 
action\_plugins

    Environment 
 Variable 
[`ANSIBLE_ACTION_PLUGINS`](#envvar-ANSIBLE_ACTION_PLUGINS)

     ### DEFAULT\_ALLOW\_UNSAFE\_LOOKUPS

  Description 
When enabled, this option allows lookup plugins (whether used in variables as `{{lookup('foo')}}` or as a loop as with\_foo) to return data that is not marked ‘unsafe’. By default, such data is marked as unsafe to prevent the templating engine from evaluating any jinja2 templating language, as this could represent a security risk. This option is provided to allow for backwards-compatibility, however users should first consider adding allow\_unsafe=True to any lookups which may be expected to contain data which may be run through the templating engine late

  Type 
boolean

  Default 
False

  Version Added 
2.2.3

  Ini 
 Section 
[defaults]

  Key 
allow\_unsafe\_lookups

     ### DEFAULT\_ASK\_PASS

  Description 
This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probably do not needed to change this setting.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
ask\_pass

    Environment 
 Variable 
[`ANSIBLE_ASK_PASS`](#envvar-ANSIBLE_ASK_PASS)

     ### DEFAULT\_ASK\_VAULT\_PASS

  Description 
This controls whether an Ansible playbook should prompt for a vault password.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
ask\_vault\_pass

    Environment 
 Variable 
[`ANSIBLE_ASK_VAULT_PASS`](#envvar-ANSIBLE_ASK_VAULT_PASS)

     ### DEFAULT\_BECOME

  Description 
Toggles the use of privilege escalation, allowing you to ‘become’ another user after login.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[privilege\_escalation]

  Key 
become

    Environment 
 Variable 
[`ANSIBLE_BECOME`](#envvar-ANSIBLE_BECOME)

     ### DEFAULT\_BECOME\_ASK\_PASS

  Description 
Toggle to prompt for privilege escalation password.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[privilege\_escalation]

  Key 
become\_ask\_pass

    Environment 
 Variable 
[`ANSIBLE_BECOME_ASK_PASS`](#envvar-ANSIBLE_BECOME_ASK_PASS)

     ### DEFAULT\_BECOME\_EXE

  Description 
executable to use for privilege escalation, otherwise Ansible will depend on PATH

  Default 
None

  Ini 
 Section 
[privilege\_escalation]

  Key 
become\_exe

    Environment 
 Variable 
[`ANSIBLE_BECOME_EXE`](#envvar-ANSIBLE_BECOME_EXE)

     ### DEFAULT\_BECOME\_FLAGS

  Description 
Flags to pass to the privilege escalation executable.

  Default Ini 
 Section 
[privilege\_escalation]

  Key 
become\_flags

    Environment 
 Variable 
[`ANSIBLE_BECOME_FLAGS`](#envvar-ANSIBLE_BECOME_FLAGS)

     ### DEFAULT\_BECOME\_METHOD

  Description 
Privilege escalation method to use when `become` is enabled.

  Default 
sudo

  Ini 
 Section 
[privilege\_escalation]

  Key 
become\_method

    Environment 
 Variable 
[`ANSIBLE_BECOME_METHOD`](#envvar-ANSIBLE_BECOME_METHOD)

     ### DEFAULT\_BECOME\_USER

  Description 
The user your login/remote user ‘becomes’ when using privilege escalation, most systems will use ‘root’ when no user is specified.

  Default 
root

  Ini 
 Section 
[privilege\_escalation]

  Key 
become\_user

    Environment 
 Variable 
[`ANSIBLE_BECOME_USER`](#envvar-ANSIBLE_BECOME_USER)

     ### DEFAULT\_CACHE\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Cache Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/cache:/usr/share/ansible/plugins/cache

  Ini 
 Section 
[defaults]

  Key 
cache\_plugins

    Environment 
 Variable 
[`ANSIBLE_CACHE_PLUGINS`](#envvar-ANSIBLE_CACHE_PLUGINS)

     ### DEFAULT\_CALLBACK\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Callback Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/callback:/usr/share/ansible/plugins/callback

  Ini 
 Section 
[defaults]

  Key 
callback\_plugins

    Environment 
 Variable 
[`ANSIBLE_CALLBACK_PLUGINS`](#envvar-ANSIBLE_CALLBACK_PLUGINS)

     ### DEFAULT\_CLICONF\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Cliconf Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/cliconf:/usr/share/ansible/plugins/cliconf

  Ini 
 Section 
[defaults]

  Key 
cliconf\_plugins

    Environment 
 Variable 
[`ANSIBLE_CLICONF_PLUGINS`](#envvar-ANSIBLE_CLICONF_PLUGINS)

     ### DEFAULT\_CONNECTION\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Connection Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/connection:/usr/share/ansible/plugins/connection

  Ini 
 Section 
[defaults]

  Key 
connection\_plugins

    Environment 
 Variable 
[`ANSIBLE_CONNECTION_PLUGINS`](#envvar-ANSIBLE_CONNECTION_PLUGINS)

     ### DEFAULT\_DEBUG

  Description 
Toggles debug output in Ansible. This is *very* verbose and can hinder multiprocessing. Debug output can also include secret information despite no\_log settings being enabled, which means debug mode should not be used in production.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
debug

    Environment 
 Variable 
[`ANSIBLE_DEBUG`](#envvar-ANSIBLE_DEBUG)

     ### DEFAULT\_EXECUTABLE

  Description 
This indicates the command to use to spawn a shell under for Ansible’s execution needs on a target. Users may need to change this in rare instances when shell usage is constrained, but in most cases it may be left as is.

  Default 
/bin/sh

  Ini 
 Section 
[defaults]

  Key 
executable

    Environment 
 Variable 
[`ANSIBLE_EXECUTABLE`](#envvar-ANSIBLE_EXECUTABLE)

     ### DEFAULT\_FACT\_PATH

  Description 
This option allows you to globally configure a custom path for ‘local\_facts’ for the implied M(ansible.builtin.setup) task when using fact gathering. If not set, it will fallback to the default from the M(ansible.builtin.setup) module: `/etc/ansible/facts.d`. This does **not** affect user defined tasks that use the M(ansible.builtin.setup) module.

  Type 
string

  Default 
None

  Ini 
 Section 
[defaults]

  Key 
fact\_path

    Environment 
 Variable 
[`ANSIBLE_FACT_PATH`](#envvar-ANSIBLE_FACT_PATH)

     ### DEFAULT\_FILTER\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Jinja2 Filter Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/filter:/usr/share/ansible/plugins/filter

  Ini 
 Section 
[defaults]

  Key 
filter\_plugins

    Environment 
 Variable 
[`ANSIBLE_FILTER_PLUGINS`](#envvar-ANSIBLE_FILTER_PLUGINS)

     ### DEFAULT\_FORCE\_HANDLERS

  Description 
This option controls if notified handlers run on a host even if a failure occurs on that host. When false, the handlers will not run if a failure has occurred on a host. This can also be set per play or on the command line. See Handlers and Failure for more details.

  Type 
boolean

  Default 
False

  Version Added 
1.9.1

  Ini 
 Section 
[defaults]

  Key 
force\_handlers

    Environment 
 Variable 
[`ANSIBLE_FORCE_HANDLERS`](#envvar-ANSIBLE_FORCE_HANDLERS)

     ### DEFAULT\_FORKS

  Description 
Maximum number of forks Ansible will use to execute tasks on target hosts.

  Type 
integer

  Default 
5

  Ini 
 Section 
[defaults]

  Key 
forks

    Environment 
 Variable 
[`ANSIBLE_FORKS`](#envvar-ANSIBLE_FORKS)

     ### DEFAULT\_GATHER\_SUBSET

  Description 
Set the `gather_subset` option for the M(ansible.builtin.setup) task in the implicit fact gathering. See the module documentation for specifics. It does **not** apply to user defined M(ansible.builtin.setup) tasks.

  Type 
list

  Default 
[‘all’]

  Version Added 
2.1

  Ini 
 Section 
[defaults]

  Key 
gather\_subset

    Environment 
 Variable 
[`ANSIBLE_GATHER_SUBSET`](#envvar-ANSIBLE_GATHER_SUBSET)

     ### DEFAULT\_GATHER\_TIMEOUT

  Description 
Set the timeout in seconds for the implicit fact gathering. It does **not** apply to user defined M(ansible.builtin.setup) tasks.

  Type 
integer

  Default 
10

  Ini 
 Section 
[defaults]

  Key 
gather\_timeout

    Environment 
 Variable 
[`ANSIBLE_GATHER_TIMEOUT`](#envvar-ANSIBLE_GATHER_TIMEOUT)

     ### DEFAULT\_GATHERING

  Description 
This setting controls the default policy of fact gathering (facts discovered about remote systems). When ‘implicit’ (the default), the cache plugin will be ignored and facts will be gathered per play unless ‘gather\_facts: False’ is set. When ‘explicit’ the inverse is true, facts will not be gathered unless directly requested in the play. The ‘smart’ value means each new host that has no facts discovered will be scanned, but if the same host is addressed in multiple plays it will not be contacted again in the playbook run. This option can be useful for those wishing to save fact gathering time. Both ‘smart’ and ‘explicit’ will use the cache plugin.

  Default 
implicit

  Choices 
* smart
* explicit
* implicit

  Version Added 
1.6

  Ini 
 Section 
[defaults]

  Key 
gathering

    Environment 
 Variable 
[`ANSIBLE_GATHERING`](#envvar-ANSIBLE_GATHERING)

     ### DEFAULT\_HANDLER\_INCLUDES\_STATIC

  Description 
Since 2.0 M(ansible.builtin.include) can be ‘dynamic’, this setting (if True) forces that if the include appears in a `handlers` section to be ‘static’.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
handler\_includes\_static

    Environment 
 Variable 
[`ANSIBLE_HANDLER_INCLUDES_STATIC`](#envvar-ANSIBLE_HANDLER_INCLUDES_STATIC)

    Deprecated in 
2.12

  Deprecated detail 
include itself is deprecated and this setting will not matter in the future

  Deprecated alternatives 
none as its already built into the decision between include\_tasks and import\_tasks

   ### DEFAULT\_HASH\_BEHAVIOUR

  Description 
This setting controls how duplicate definitions of dictionary variables (aka hash, map, associative array) are handled in Ansible. This does not affect variables whose values are scalars (integers, strings) or arrays. **WARNING**, changing this setting is not recommended as this is fragile and makes your content (plays, roles, collections) non portable, leading to continual confusion and misuse. Don’t change this setting unless you think you have an absolute need for it. We recommend avoiding reusing variable names and relying on the `combine` filter and `vars` and `varnames` lookups to create merged versions of the individual variables. In our experience this is rarely really needed and a sign that too much complexity has been introduced into the data structures and plays. For some uses you can also look into custom vars\_plugins to merge on input, even substituting the default `host_group_vars` that is in charge of parsing the `host_vars/` and `group_vars/` directories. Most users of this setting are only interested in inventory scope, but the setting itself affects all sources and makes debugging even harder. All playbooks and roles in the official examples repos assume the default for this setting. Changing the setting to `merge` applies across variable sources, but many sources will internally still overwrite the variables. For example `include_vars` will dedupe variables internally before updating Ansible, with ‘last defined’ overwriting previous definitions in same file. The Ansible project recommends you **avoid ``merge`` for new projects.** It is the intention of the Ansible developers to eventually deprecate and remove this setting, but it is being kept as some users do heavily rely on it. New projects should **avoid ‘merge’**.

  Type 
string

  Default 
replace

  Choices 
* replace 
Any variable that is defined more than once is overwritten using the order from variable precedence rules (highest wins).
* merge 
Any dictionary variable will be recursively merged with new definitions across the different variable definition sources.

  Ini 
 Section 
[defaults]

  Key 
hash\_behaviour

    Environment 
 Variable 
[`ANSIBLE_HASH_BEHAVIOUR`](#envvar-ANSIBLE_HASH_BEHAVIOUR)

     ### DEFAULT\_HOST\_LIST

  Description 
Comma separated list of Ansible inventory sources

  Type 
pathlist

  Default 
/etc/ansible/hosts

  Ini 
 Section 
[defaults]

  Key 
inventory

    Environment 
 Variable 
[`ANSIBLE_INVENTORY`](#envvar-ANSIBLE_INVENTORY)

     ### DEFAULT\_HTTPAPI\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for HttpApi Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/httpapi:/usr/share/ansible/plugins/httpapi

  Ini 
 Section 
[defaults]

  Key 
httpapi\_plugins

    Environment 
 Variable 
[`ANSIBLE_HTTPAPI_PLUGINS`](#envvar-ANSIBLE_HTTPAPI_PLUGINS)

     ### DEFAULT\_INTERNAL\_POLL\_INTERVAL

  Description 
This sets the interval (in seconds) of Ansible internal processes polling each other. Lower values improve performance with large playbooks at the expense of extra CPU load. Higher values are more suitable for Ansible usage in automation scenarios, when UI responsiveness is not required but CPU usage might be a concern. The default corresponds to the value hardcoded in Ansible <= 2.1

  Type 
float

  Default 
0.001

  Version Added 
2.2

  Ini 
 Section 
[defaults]

  Key 
internal\_poll\_interval

     ### DEFAULT\_INVENTORY\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Inventory Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/inventory:/usr/share/ansible/plugins/inventory

  Ini 
 Section 
[defaults]

  Key 
inventory\_plugins

    Environment 
 Variable 
[`ANSIBLE_INVENTORY_PLUGINS`](#envvar-ANSIBLE_INVENTORY_PLUGINS)

     ### DEFAULT\_JINJA2\_EXTENSIONS

  Description 
This is a developer-specific feature that allows enabling additional Jinja2 extensions. See the Jinja2 documentation for details. If you do not know what these do, you probably don’t need to change this setting :)

  Default 
[]

  Ini 
 Section 
[defaults]

  Key 
jinja2\_extensions

    Environment 
 Variable 
[`ANSIBLE_JINJA2_EXTENSIONS`](#envvar-ANSIBLE_JINJA2_EXTENSIONS)

     ### DEFAULT\_JINJA2\_NATIVE

  Description 
This option preserves variable types during template operations. This requires Jinja2 >= 2.10.

  Type 
boolean

  Default 
False

  Version Added 
2.7

  Ini 
 Section 
[defaults]

  Key 
jinja2\_native

    Environment 
 Variable 
[`ANSIBLE_JINJA2_NATIVE`](#envvar-ANSIBLE_JINJA2_NATIVE)

     ### DEFAULT\_KEEP\_REMOTE\_FILES

  Description 
Enables/disables the cleaning up of the temporary files Ansible used to execute the tasks on the remote. If this option is enabled it will disable `ANSIBLE_PIPELINING`.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
keep\_remote\_files

    Environment 
 Variable 
[`ANSIBLE_KEEP_REMOTE_FILES`](#envvar-ANSIBLE_KEEP_REMOTE_FILES)

     ### DEFAULT\_LIBVIRT\_LXC\_NOSECLABEL

  Description 
This setting causes libvirt to connect to lxc containers by passing –noseclabel to virsh. This is necessary when running on systems which do not have SELinux.

  Type 
boolean

  Default 
False

  Version Added 
2.1

  Ini 
 Section 
[selinux]

  Key 
libvirt\_lxc\_noseclabel

    Environment 
* Variable 
[`ANSIBLE_LIBVIRT_LXC_NOSECLABEL`](#envvar-ANSIBLE_LIBVIRT_LXC_NOSECLABEL)
* Variable 
[`LIBVIRT_LXC_NOSECLABEL`](#envvar-LIBVIRT_LXC_NOSECLABEL)

  Deprecated in 
2.12

  Deprecated detail 
environment variables without `ANSIBLE_` prefix are deprecated

  Deprecated alternatives 
the `ANSIBLE_LIBVIRT_LXC_NOSECLABEL` environment variable

   ### DEFAULT\_LOAD\_CALLBACK\_PLUGINS

  Description 
Controls whether callback plugins are loaded when running /usr/bin/ansible. This may be used to log activity from the command line, send notifications, and so on. Callback plugins are always loaded for `ansible-playbook`.

  Type 
boolean

  Default 
False

  Version Added 
1.8

  Ini 
 Section 
[defaults]

  Key 
bin\_ansible\_callbacks

    Environment 
 Variable 
[`ANSIBLE_LOAD_CALLBACK_PLUGINS`](#envvar-ANSIBLE_LOAD_CALLBACK_PLUGINS)

     ### DEFAULT\_LOCAL\_TMP

  Description 
Temporary directory for Ansible to use on the controller.

  Type 
tmppath

  Default 
~/.ansible/tmp

  Ini 
 Section 
[defaults]

  Key 
local\_tmp

    Environment 
 Variable 
[`ANSIBLE_LOCAL_TEMP`](#envvar-ANSIBLE_LOCAL_TEMP)

     ### DEFAULT\_LOG\_FILTER

  Description 
List of logger names to filter out of the log file

  Type 
list

  Default 
[]

  Ini 
 Section 
[defaults]

  Key 
log\_filter

    Environment 
 Variable 
[`ANSIBLE_LOG_FILTER`](#envvar-ANSIBLE_LOG_FILTER)

     ### DEFAULT\_LOG\_PATH

  Description 
File to which Ansible will log on the controller. When empty logging is disabled.

  Type 
path

  Default 
None

  Ini 
 Section 
[defaults]

  Key 
log\_path

    Environment 
 Variable 
[`ANSIBLE_LOG_PATH`](#envvar-ANSIBLE_LOG_PATH)

     ### DEFAULT\_LOOKUP\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Lookup Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/lookup:/usr/share/ansible/plugins/lookup

  Ini 
 Section 
[defaults]

  Key 
lookup\_plugins

    Environment 
 Variable 
[`ANSIBLE_LOOKUP_PLUGINS`](#envvar-ANSIBLE_LOOKUP_PLUGINS)

     ### DEFAULT\_MANAGED\_STR

  Description 
Sets the macro for the ‘ansible\_managed’ variable available for M(ansible.builtin.template) and M(ansible.windows.win\_template) modules. This is only relevant for those two modules.

  Default 
Ansible managed

  Ini 
 Section 
[defaults]

  Key 
ansible\_managed

     ### DEFAULT\_MODULE\_ARGS

  Description 
This sets the default arguments to pass to the `ansible` adhoc binary if no `-a` is specified.

  Default Ini 
 Section 
[defaults]

  Key 
module\_args

    Environment 
 Variable 
[`ANSIBLE_MODULE_ARGS`](#envvar-ANSIBLE_MODULE_ARGS)

     ### DEFAULT\_MODULE\_COMPRESSION

  Description 
Compression scheme to use when transferring Python modules to the target.

  Default 
ZIP\_DEFLATED

  Ini 
 Section 
[defaults]

  Key 
module\_compression

     ### DEFAULT\_MODULE\_NAME

  Description 
Module to use with the `ansible` AdHoc command, if none is specified via `-m`.

  Default 
command

  Ini 
 Section 
[defaults]

  Key 
module\_name

     ### DEFAULT\_MODULE\_PATH

  Description 
Colon separated paths in which Ansible will search for Modules.

  Type 
pathspec

  Default 
~/.ansible/plugins/modules:/usr/share/ansible/plugins/modules

  Ini 
 Section 
[defaults]

  Key 
library

    Environment 
 Variable 
[`ANSIBLE_LIBRARY`](#envvar-ANSIBLE_LIBRARY)

     ### DEFAULT\_MODULE\_UTILS\_PATH

  Description 
Colon separated paths in which Ansible will search for Module utils files, which are shared by modules.

  Type 
pathspec

  Default 
~/.ansible/plugins/module\_utils:/usr/share/ansible/plugins/module\_utils

  Ini 
 Section 
[defaults]

  Key 
module\_utils

    Environment 
 Variable 
[`ANSIBLE_MODULE_UTILS`](#envvar-ANSIBLE_MODULE_UTILS)

     ### DEFAULT\_NETCONF\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Netconf Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/netconf:/usr/share/ansible/plugins/netconf

  Ini 
 Section 
[defaults]

  Key 
netconf\_plugins

    Environment 
 Variable 
[`ANSIBLE_NETCONF_PLUGINS`](#envvar-ANSIBLE_NETCONF_PLUGINS)

     ### DEFAULT\_NO\_LOG

  Description 
Toggle Ansible’s display and logging of task details, mainly used to avoid security disclosures.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
no\_log

    Environment 
 Variable 
[`ANSIBLE_NO_LOG`](#envvar-ANSIBLE_NO_LOG)

     ### DEFAULT\_NO\_TARGET\_SYSLOG

  Description 
Toggle Ansible logging to syslog on the target when it executes tasks. On Windows hosts this will disable a newer style PowerShell modules from writting to the event log.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
no\_target\_syslog

    Environment 
 Variable 
[`ANSIBLE_NO_TARGET_SYSLOG`](#envvar-ANSIBLE_NO_TARGET_SYSLOG)

    Variables 
 name 
`ansible_no_target_syslog` :Version Added: 2.10

     ### DEFAULT\_NULL\_REPRESENTATION

  Description 
What templating should return as a ‘null’ value. When not set it will let Jinja2 decide.

  Type 
none

  Default 
None

  Ini 
 Section 
[defaults]

  Key 
null\_representation

    Environment 
 Variable 
[`ANSIBLE_NULL_REPRESENTATION`](#envvar-ANSIBLE_NULL_REPRESENTATION)

     ### DEFAULT\_POLL\_INTERVAL

  Description 
For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how often to check back on the status of those tasks when an explicit poll interval is not supplied. The default is a reasonably moderate 15 seconds which is a tradeoff between checking in frequently and providing a quick turnaround when something may have completed.

  Type 
integer

  Default 
15

  Ini 
 Section 
[defaults]

  Key 
poll\_interval

    Environment 
 Variable 
[`ANSIBLE_POLL_INTERVAL`](#envvar-ANSIBLE_POLL_INTERVAL)

     ### DEFAULT\_PRIVATE\_KEY\_FILE

  Description 
Option for connections using a certificate or key file to authenticate, rather than an agent or passwords, you can set the default value here to avoid re-specifying –private-key with every invocation.

  Type 
path

  Default 
None

  Ini 
 Section 
[defaults]

  Key 
private\_key\_file

    Environment 
 Variable 
[`ANSIBLE_PRIVATE_KEY_FILE`](#envvar-ANSIBLE_PRIVATE_KEY_FILE)

     ### DEFAULT\_PRIVATE\_ROLE\_VARS

  Description 
Makes role variables inaccessible from other roles. This was introduced as a way to reset role variables to default values if a role is used more than once in a playbook.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
private\_role\_vars

    Environment 
 Variable 
[`ANSIBLE_PRIVATE_ROLE_VARS`](#envvar-ANSIBLE_PRIVATE_ROLE_VARS)

     ### DEFAULT\_REMOTE\_PORT

  Description 
Port to use in remote connections, when blank it will use the connection plugin default.

  Type 
integer

  Default 
None

  Ini 
 Section 
[defaults]

  Key 
remote\_port

    Environment 
 Variable 
[`ANSIBLE_REMOTE_PORT`](#envvar-ANSIBLE_REMOTE_PORT)

     ### DEFAULT\_REMOTE\_USER

  Description 
Sets the login user for the target machines When blank it uses the connection plugin’s default, normally the user currently executing Ansible.

  Default 
None

  Ini 
 Section 
[defaults]

  Key 
remote\_user

    Environment 
 Variable 
[`ANSIBLE_REMOTE_USER`](#envvar-ANSIBLE_REMOTE_USER)

     ### DEFAULT\_ROLES\_PATH

  Description 
Colon separated paths in which Ansible will search for Roles.

  Type 
pathspec

  Default 
~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles

  Ini 
 Section 
[defaults]

  Key 
roles\_path

    Environment 
 Variable 
[`ANSIBLE_ROLES_PATH`](#envvar-ANSIBLE_ROLES_PATH)

     ### DEFAULT\_SELINUX\_SPECIAL\_FS

  Description 
Some filesystems do not support safe operations and/or return inconsistent errors, this setting makes Ansible ‘tolerate’ those in the list w/o causing fatal errors. Data corruption may occur and writes are not always verified when a filesystem is in the list.

  Type 
list

  Default 
fuse, nfs, vboxsf, ramfs, 9p, vfat

  Ini 
 Section 
[selinux]

  Key 
special\_context\_filesystems

    Environment 
 Variable 
[`ANSIBLE_SELINUX_SPECIAL_FS`](#envvar-ANSIBLE_SELINUX_SPECIAL_FS) :Version Added: 2.9

     ### DEFAULT\_STDOUT\_CALLBACK

  Description 
Set the main callback used to display Ansible output, you can only have one at a time. You can have many other callbacks, but just one can be in charge of stdout.

  Default 
default

  Ini 
 Section 
[defaults]

  Key 
stdout\_callback

    Environment 
 Variable 
[`ANSIBLE_STDOUT_CALLBACK`](#envvar-ANSIBLE_STDOUT_CALLBACK)

     ### DEFAULT\_STRATEGY

  Description 
Set the default strategy used for plays.

  Default 
linear

  Version Added 
2.3

  Ini 
 Section 
[defaults]

  Key 
strategy

    Environment 
 Variable 
[`ANSIBLE_STRATEGY`](#envvar-ANSIBLE_STRATEGY)

     ### DEFAULT\_STRATEGY\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Strategy Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/strategy:/usr/share/ansible/plugins/strategy

  Ini 
 Section 
[defaults]

  Key 
strategy\_plugins

    Environment 
 Variable 
[`ANSIBLE_STRATEGY_PLUGINS`](#envvar-ANSIBLE_STRATEGY_PLUGINS)

     ### DEFAULT\_SU

  Description 
Toggle the use of “su” for tasks.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
su

    Environment 
 Variable 
[`ANSIBLE_SU`](#envvar-ANSIBLE_SU)

     ### DEFAULT\_SYSLOG\_FACILITY

  Description 
Syslog facility to use when Ansible logs to the remote target

  Default 
LOG\_USER

  Ini 
 Section 
[defaults]

  Key 
syslog\_facility

    Environment 
 Variable 
[`ANSIBLE_SYSLOG_FACILITY`](#envvar-ANSIBLE_SYSLOG_FACILITY)

     ### DEFAULT\_TASK\_INCLUDES\_STATIC

  Description 
The `include` tasks can be static or dynamic, this toggles the default expected behaviour if autodetection fails and it is not explicitly set in task.

  Type 
boolean

  Default 
False

  Version Added 
2.1

  Ini 
 Section 
[defaults]

  Key 
task\_includes\_static

    Environment 
 Variable 
[`ANSIBLE_TASK_INCLUDES_STATIC`](#envvar-ANSIBLE_TASK_INCLUDES_STATIC)

    Deprecated in 
2.12

  Deprecated detail 
include itself is deprecated and this setting will not matter in the future

  Deprecated alternatives 
None, as its already built into the decision between include\_tasks and import\_tasks

   ### DEFAULT\_TERMINAL\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Terminal Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/terminal:/usr/share/ansible/plugins/terminal

  Ini 
 Section 
[defaults]

  Key 
terminal\_plugins

    Environment 
 Variable 
[`ANSIBLE_TERMINAL_PLUGINS`](#envvar-ANSIBLE_TERMINAL_PLUGINS)

     ### DEFAULT\_TEST\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Jinja2 Test Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/test:/usr/share/ansible/plugins/test

  Ini 
 Section 
[defaults]

  Key 
test\_plugins

    Environment 
 Variable 
[`ANSIBLE_TEST_PLUGINS`](#envvar-ANSIBLE_TEST_PLUGINS)

     ### DEFAULT\_TIMEOUT

  Description 
This is the default timeout for connection plugins to use.

  Type 
integer

  Default 
10

  Ini 
 Section 
[defaults]

  Key 
timeout

    Environment 
 Variable 
[`ANSIBLE_TIMEOUT`](#envvar-ANSIBLE_TIMEOUT)

     ### DEFAULT\_TRANSPORT

  Description 
Default connection plugin to use, the ‘smart’ option will toggle between ‘ssh’ and ‘paramiko’ depending on controller OS and ssh versions

  Default 
smart

  Ini 
 Section 
[defaults]

  Key 
transport

    Environment 
 Variable 
[`ANSIBLE_TRANSPORT`](#envvar-ANSIBLE_TRANSPORT)

     ### DEFAULT\_UNDEFINED\_VAR\_BEHAVIOR

  Description 
When True, this causes ansible templating to fail steps that reference variable names that are likely typoed. Otherwise, any ‘{{ template\_expression }}’ that contains undefined variables will be rendered in a template or ansible action line exactly as written.

  Type 
boolean

  Default 
True

  Version Added 
1.3

  Ini 
 Section 
[defaults]

  Key 
error\_on\_undefined\_vars

    Environment 
 Variable 
[`ANSIBLE_ERROR_ON_UNDEFINED_VARS`](#envvar-ANSIBLE_ERROR_ON_UNDEFINED_VARS)

     ### DEFAULT\_VARS\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Vars Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/vars:/usr/share/ansible/plugins/vars

  Ini 
 Section 
[defaults]

  Key 
vars\_plugins

    Environment 
 Variable 
[`ANSIBLE_VARS_PLUGINS`](#envvar-ANSIBLE_VARS_PLUGINS)

     ### DEFAULT\_VAULT\_ENCRYPT\_IDENTITY

  Description 
The vault\_id to use for encrypting by default. If multiple vault\_ids are provided, this specifies which to use for encryption. The –encrypt-vault-id cli option overrides the configured value.

  Default 
None

  Ini 
 Section 
[defaults]

  Key 
vault\_encrypt\_identity

    Environment 
 Variable 
[`ANSIBLE_VAULT_ENCRYPT_IDENTITY`](#envvar-ANSIBLE_VAULT_ENCRYPT_IDENTITY)

     ### DEFAULT\_VAULT\_ID\_MATCH

  Description 
If true, decrypting vaults with a vault id will only try the password from the matching vault-id

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
vault\_id\_match

    Environment 
 Variable 
[`ANSIBLE_VAULT_ID_MATCH`](#envvar-ANSIBLE_VAULT_ID_MATCH)

     ### DEFAULT\_VAULT\_IDENTITY

  Description 
The label to use for the default vault id label in cases where a vault id label is not provided

  Default 
default

  Ini 
 Section 
[defaults]

  Key 
vault\_identity

    Environment 
 Variable 
[`ANSIBLE_VAULT_IDENTITY`](#envvar-ANSIBLE_VAULT_IDENTITY)

     ### DEFAULT\_VAULT\_IDENTITY\_LIST

  Description 
A list of vault-ids to use by default. Equivalent to multiple –vault-id args. Vault-ids are tried in order.

  Type 
list

  Default 
[]

  Ini 
 Section 
[defaults]

  Key 
vault\_identity\_list

    Environment 
 Variable 
[`ANSIBLE_VAULT_IDENTITY_LIST`](#envvar-ANSIBLE_VAULT_IDENTITY_LIST)

     ### DEFAULT\_VAULT\_PASSWORD\_FILE

  Description 
The vault password file to use. Equivalent to –vault-password-file or –vault-id

  Type 
path

  Default 
None

  Ini 
 Section 
[defaults]

  Key 
vault\_password\_file

    Environment 
 Variable 
[`ANSIBLE_VAULT_PASSWORD_FILE`](#envvar-ANSIBLE_VAULT_PASSWORD_FILE)

     ### DEFAULT\_VERBOSITY

  Description 
Sets the default verbosity, equivalent to the number of `-v` passed in the command line.

  Type 
integer

  Default 
0

  Ini 
 Section 
[defaults]

  Key 
verbosity

    Environment 
 Variable 
[`ANSIBLE_VERBOSITY`](#envvar-ANSIBLE_VERBOSITY)

     ### DEPRECATION\_WARNINGS

  Description 
Toggle to control the showing of deprecation warnings

  Type 
boolean

  Default 
True

  Ini 
 Section 
[defaults]

  Key 
deprecation\_warnings

    Environment 
 Variable 
[`ANSIBLE_DEPRECATION_WARNINGS`](#envvar-ANSIBLE_DEPRECATION_WARNINGS)

     ### DEVEL\_WARNING

  Description 
Toggle to control showing warnings related to running devel

  Type 
boolean

  Default 
True

  Ini 
 Section 
[defaults]

  Key 
devel\_warning

    Environment 
 Variable 
[`ANSIBLE_DEVEL_WARNING`](#envvar-ANSIBLE_DEVEL_WARNING)

     ### DIFF\_ALWAYS

  Description 
Configuration toggle to tell modules to show differences when in ‘changed’ status, equivalent to `--diff`.

  Type 
bool

  Default 
False

  Ini 
 Section 
[diff]

  Key 
always

    Environment 
 Variable 
[`ANSIBLE_DIFF_ALWAYS`](#envvar-ANSIBLE_DIFF_ALWAYS)

     ### DIFF\_CONTEXT

  Description 
How many lines of context to show when displaying the differences between files.

  Type 
integer

  Default 
3

  Ini 
 Section 
[diff]

  Key 
context

    Environment 
 Variable 
[`ANSIBLE_DIFF_CONTEXT`](#envvar-ANSIBLE_DIFF_CONTEXT)

     ### DISPLAY\_ARGS\_TO\_STDOUT

  Description 
Normally `ansible-playbook` will print a header for each task that is run. These headers will contain the name: field from the task if you specified one. If you didn’t then `ansible-playbook` uses the task’s action to help you tell which task is presently running. Sometimes you run many of the same action and so you want more information about the task to differentiate it from others of the same action. If you set this variable to True in the config then `ansible-playbook` will also include the task’s arguments in the header. This setting defaults to False because there is a chance that you have sensitive values in your parameters and you do not want those to be printed. If you set this to True you should be sure that you have secured your environment’s stdout (no one can shoulder surf your screen and you aren’t saving stdout to an insecure file) or made sure that all of your playbooks explicitly added the `no_log: True` parameter to tasks which have sensitive values See How do I keep secret data in my playbook? for more information.

  Type 
boolean

  Default 
False

  Version Added 
2.1

  Ini 
 Section 
[defaults]

  Key 
display\_args\_to\_stdout

    Environment 
 Variable 
[`ANSIBLE_DISPLAY_ARGS_TO_STDOUT`](#envvar-ANSIBLE_DISPLAY_ARGS_TO_STDOUT)

     ### DISPLAY\_SKIPPED\_HOSTS

  Description 
Toggle to control displaying skipped task/host entries in a task in the default callback

  Type 
boolean

  Default 
True

  Ini 
 Section 
[defaults]

  Key 
display\_skipped\_hosts

    Environment 
* Variable 
[`ANSIBLE_DISPLAY_SKIPPED_HOSTS`](#envvar-ANSIBLE_DISPLAY_SKIPPED_HOSTS)
* Variable 
[`DISPLAY_SKIPPED_HOSTS`](#envvar-DISPLAY_SKIPPED_HOSTS)

  Deprecated in 
2.12

  Deprecated detail 
environment variables without `ANSIBLE_` prefix are deprecated

  Deprecated alternatives 
the `ANSIBLE_DISPLAY_SKIPPED_HOSTS` environment variable

   ### DOC\_FRAGMENT\_PLUGIN\_PATH

  Description 
Colon separated paths in which Ansible will search for Documentation Fragments Plugins.

  Type 
pathspec

  Default 
~/.ansible/plugins/doc\_fragments:/usr/share/ansible/plugins/doc\_fragments

  Ini 
 Section 
[defaults]

  Key 
doc\_fragment\_plugins

    Environment 
 Variable 
[`ANSIBLE_DOC_FRAGMENT_PLUGINS`](#envvar-ANSIBLE_DOC_FRAGMENT_PLUGINS)

     ### DOCSITE\_ROOT\_URL

  Description 
Root docsite URL used to generate docs URLs in warning/error text; must be an absolute URL with valid scheme and trailing slash.

  Default 
<https://docs.ansible.com/ansible-core/>

  Version Added 
2.8

  Ini 
 Section 
[defaults]

  Key 
docsite\_root\_url

     ### DUPLICATE\_YAML\_DICT\_KEY

  Description 
By default Ansible will issue a warning when a duplicate dict key is encountered in YAML. These warnings can be silenced by adjusting this setting to False.

  Type 
string

  Default 
warn

  Choices 
* warn
* error
* ignore

  Version Added 
2.9

  Ini 
 Section 
[defaults]

  Key 
duplicate\_dict\_key

    Environment 
 Variable 
[`ANSIBLE_DUPLICATE_YAML_DICT_KEY`](#envvar-ANSIBLE_DUPLICATE_YAML_DICT_KEY)

     ### ENABLE\_TASK\_DEBUGGER

  Description 
Whether or not to enable the task debugger, this previously was done as a strategy plugin. Now all strategy plugins can inherit this behavior. The debugger defaults to activating when a task is failed on unreachable. Use the debugger keyword for more flexibility.

  Type 
boolean

  Default 
False

  Version Added 
2.5

  Ini 
 Section 
[defaults]

  Key 
enable\_task\_debugger

    Environment 
 Variable 
[`ANSIBLE_ENABLE_TASK_DEBUGGER`](#envvar-ANSIBLE_ENABLE_TASK_DEBUGGER)

     ### ERROR\_ON\_MISSING\_HANDLER

  Description 
Toggle to allow missing handlers to become a warning instead of an error when notifying.

  Type 
boolean

  Default 
True

  Ini 
 Section 
[defaults]

  Key 
error\_on\_missing\_handler

    Environment 
 Variable 
[`ANSIBLE_ERROR_ON_MISSING_HANDLER`](#envvar-ANSIBLE_ERROR_ON_MISSING_HANDLER)

     ### FACTS\_MODULES

  Description 
Which modules to run during a play’s fact gathering stage, using the default of ‘smart’ will try to figure it out based on connection type.

  Type 
list

  Default 
[‘smart’]

  Ini 
 Section 
[defaults]

  Key 
facts\_modules

    Environment 
 Variable 
[`ANSIBLE_FACTS_MODULES`](#envvar-ANSIBLE_FACTS_MODULES)

    Variables 
 name 
`ansible_facts_modules`

     ### GALAXY\_CACHE\_DIR

  Description 
The directory that stores cached responses from a Galaxy server. This is only used by the `ansible-galaxy collection install` and `download` commands. Cache files inside this dir will be ignored if they are world writable.

  Type 
path

  Default 
~/.ansible/galaxy\_cache

  Version Added 
2.11

  Ini 
 Section 
[galaxy]

  Key 
cache\_dir

    Environment 
 Variable 
[`ANSIBLE_GALAXY_CACHE_DIR`](#envvar-ANSIBLE_GALAXY_CACHE_DIR)

     ### GALAXY\_DISPLAY\_PROGRESS

  Description 
Some steps in `ansible-galaxy` display a progress wheel which can cause issues on certain displays or when outputing the stdout to a file. This config option controls whether the display wheel is shown or not. The default is to show the display wheel if stdout has a tty.

  Type 
bool

  Default 
None

  Version Added 
2.10

  Ini 
 Section 
[galaxy]

  Key 
display\_progress

    Environment 
 Variable 
[`ANSIBLE_GALAXY_DISPLAY_PROGRESS`](#envvar-ANSIBLE_GALAXY_DISPLAY_PROGRESS)

     ### GALAXY\_IGNORE\_CERTS

  Description 
If set to yes, ansible-galaxy will not validate TLS certificates. This can be useful for testing against a server with a self-signed certificate.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[galaxy]

  Key 
ignore\_certs

    Environment 
 Variable 
[`ANSIBLE_GALAXY_IGNORE`](#envvar-ANSIBLE_GALAXY_IGNORE)

     ### GALAXY\_ROLE\_SKELETON

  Description 
Role or collection skeleton directory to use as a template for the `init` action in `ansible-galaxy`, same as `--role-skeleton`.

  Type 
path

  Default 
None

  Ini 
 Section 
[galaxy]

  Key 
role\_skeleton

    Environment 
 Variable 
[`ANSIBLE_GALAXY_ROLE_SKELETON`](#envvar-ANSIBLE_GALAXY_ROLE_SKELETON)

     ### GALAXY\_ROLE\_SKELETON\_IGNORE

  Description 
patterns of files to ignore inside a Galaxy role or collection skeleton directory

  Type 
list

  Default 
[‘^.git$’, ‘^.\*/.git\_keep$’]

  Ini 
 Section 
[galaxy]

  Key 
role\_skeleton\_ignore

    Environment 
 Variable 
[`ANSIBLE_GALAXY_ROLE_SKELETON_IGNORE`](#envvar-ANSIBLE_GALAXY_ROLE_SKELETON_IGNORE)

     ### GALAXY\_SERVER

  Description 
URL to prepend when roles don’t specify the full URI, assume they are referencing this server as the source.

  Default 
<https://galaxy.ansible.com>

  Ini 
 Section 
[galaxy]

  Key 
server

    Environment 
 Variable 
[`ANSIBLE_GALAXY_SERVER`](#envvar-ANSIBLE_GALAXY_SERVER)

     ### GALAXY\_SERVER\_LIST

  Description 
A list of Galaxy servers to use when installing a collection. The value corresponds to the config ini header `[galaxy_server.{{item}}]` which defines the server details. See [Configuring the ansible-galaxy client](../user_guide/collections_using#galaxy-server-config) for more details on how to define a Galaxy server. The order of servers in this list is used to as the order in which a collection is resolved. Setting this config option will ignore the [GALAXY\_SERVER](#galaxy-server) config option.

  Type 
list

  Version Added 
2.9

  Ini 
 Section 
[galaxy]

  Key 
server\_list

    Environment 
 Variable 
[`ANSIBLE_GALAXY_SERVER_LIST`](#envvar-ANSIBLE_GALAXY_SERVER_LIST)

     ### GALAXY\_TOKEN\_PATH

  Description 
Local path to galaxy access token file

  Type 
path

  Default 
~/.ansible/galaxy\_token

  Version Added 
2.9

  Ini 
 Section 
[galaxy]

  Key 
token\_path

    Environment 
 Variable 
[`ANSIBLE_GALAXY_TOKEN_PATH`](#envvar-ANSIBLE_GALAXY_TOKEN_PATH)

     ### HOST\_KEY\_CHECKING

  Description 
Set this to “False” if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host

  Type 
boolean

  Default 
True

  Ini 
 Section 
[defaults]

  Key 
host\_key\_checking

    Environment 
 Variable 
[`ANSIBLE_HOST_KEY_CHECKING`](#envvar-ANSIBLE_HOST_KEY_CHECKING)

     ### HOST\_PATTERN\_MISMATCH

  Description 
This setting changes the behaviour of mismatched host patterns, it allows you to force a fatal error, a warning or just ignore it

  Default 
warning

  Choices 
* warning
* error
* ignore

  Version Added 
2.8

  Ini 
 Section 
[inventory]

  Key 
host\_pattern\_mismatch

    Environment 
 Variable 
[`ANSIBLE_HOST_PATTERN_MISMATCH`](#envvar-ANSIBLE_HOST_PATTERN_MISMATCH)

     ### INJECT\_FACTS\_AS\_VARS

  Description 
Facts are available inside the `ansible_facts` variable, this setting also pushes them as their own vars in the main namespace. Unlike inside the `ansible_facts` dictionary, these will have an `ansible_` prefix.

  Type 
boolean

  Default 
True

  Version Added 
2.5

  Ini 
 Section 
[defaults]

  Key 
inject\_facts\_as\_vars

    Environment 
 Variable 
[`ANSIBLE_INJECT_FACT_VARS`](#envvar-ANSIBLE_INJECT_FACT_VARS)

     ### INTERPRETER\_PYTHON

  Description 
Path to the Python interpreter to be used for module execution on remote targets, or an automatic discovery mode. Supported discovery modes are `auto`, `auto_silent`, and `auto_legacy` (the default). All discovery modes employ a lookup table to use the included system Python (on distributions known to include one), falling back to a fixed ordered list of well-known Python interpreter locations if a platform-specific default is not available. The fallback behavior will issue a warning that the interpreter should be set explicitly (since interpreters installed later may change which one is used). This warning behavior can be disabled by setting `auto_silent`. The default value of `auto_legacy` provides all the same behavior, but for backwards-compatibility with older Ansible releases that always defaulted to `/usr/bin/python`, will use that interpreter if present (and issue a warning that the default behavior will change to that of `auto` in a future Ansible release.

  Default 
auto\_legacy

  Version Added 
2.8

  Ini 
 Section 
[defaults]

  Key 
interpreter\_python

    Environment 
 Variable 
[`ANSIBLE_PYTHON_INTERPRETER`](#envvar-ANSIBLE_PYTHON_INTERPRETER)

    Variables 
 name 
`ansible_python_interpreter`

     ### INTERPRETER\_PYTHON\_DISTRO\_MAP

  Default 
{‘centos’: {‘6’: ‘/usr/bin/python’, ‘8’: ‘/usr/libexec/platform-python’}, ‘debian’: {‘8’: ‘/usr/bin/python’, ‘10’: ‘/usr/bin/python3’}, ‘fedora’: {‘23’: ‘/usr/bin/python3’}, ‘oracle’: {‘6’: ‘/usr/bin/python’, ‘8’: ‘/usr/libexec/platform-python’}, ‘redhat’: {‘6’: ‘/usr/bin/python’, ‘8’: ‘/usr/libexec/platform-python’}, ‘rhel’: {‘6’: ‘/usr/bin/python’, ‘8’: ‘/usr/libexec/platform-python’}, ‘ubuntu’: {‘14’: ‘/usr/bin/python’, ‘16’: ‘/usr/bin/python3’}}

  Version Added 
2.8

   ### INTERPRETER\_PYTHON\_FALLBACK

  Default 
[‘/usr/bin/python’, ‘python3.9’, ‘python3.8’, ‘python3.7’, ‘python3.6’, ‘python3.5’, ‘python2.7’, ‘python2.6’, ‘/usr/libexec/platform-python’, ‘/usr/bin/python3’, ‘python’]

  Version Added 
2.8

   ### INVALID\_TASK\_ATTRIBUTE\_FAILED

  Description 
If ‘false’, invalid attributes for a task will result in warnings instead of errors

  Type 
boolean

  Default 
True

  Version Added 
2.7

  Ini 
 Section 
[defaults]

  Key 
invalid\_task\_attribute\_failed

    Environment 
 Variable 
[`ANSIBLE_INVALID_TASK_ATTRIBUTE_FAILED`](#envvar-ANSIBLE_INVALID_TASK_ATTRIBUTE_FAILED)

     ### INVENTORY\_ANY\_UNPARSED\_IS\_FAILED

  Description 
If ‘true’, it is a fatal error when any given inventory source cannot be successfully parsed by any available inventory plugin; otherwise, this situation only attracts a warning.

  Type 
boolean

  Default 
False

  Version Added 
2.7

  Ini 
 Section 
[inventory]

  Key 
any\_unparsed\_is\_failed

    Environment 
 Variable 
[`ANSIBLE_INVENTORY_ANY_UNPARSED_IS_FAILED`](#envvar-ANSIBLE_INVENTORY_ANY_UNPARSED_IS_FAILED)

     ### INVENTORY\_CACHE\_ENABLED

  Description 
Toggle to turn on inventory caching

  Type 
bool

  Default 
False

  Ini 
 Section 
[inventory]

  Key 
cache

    Environment 
 Variable 
[`ANSIBLE_INVENTORY_CACHE`](#envvar-ANSIBLE_INVENTORY_CACHE)

     ### INVENTORY\_CACHE\_PLUGIN

  Description 
The plugin for caching inventory. If INVENTORY\_CACHE\_PLUGIN is not provided CACHE\_PLUGIN can be used instead.

  Ini 
 Section 
[inventory]

  Key 
cache\_plugin

    Environment 
 Variable 
[`ANSIBLE_INVENTORY_CACHE_PLUGIN`](#envvar-ANSIBLE_INVENTORY_CACHE_PLUGIN)

     ### INVENTORY\_CACHE\_PLUGIN\_CONNECTION

  Description 
The inventory cache connection. If INVENTORY\_CACHE\_PLUGIN\_CONNECTION is not provided CACHE\_PLUGIN\_CONNECTION can be used instead.

  Ini 
 Section 
[inventory]

  Key 
cache\_connection

    Environment 
 Variable 
[`ANSIBLE_INVENTORY_CACHE_CONNECTION`](#envvar-ANSIBLE_INVENTORY_CACHE_CONNECTION)

     ### INVENTORY\_CACHE\_PLUGIN\_PREFIX

  Description 
The table prefix for the cache plugin. If INVENTORY\_CACHE\_PLUGIN\_PREFIX is not provided CACHE\_PLUGIN\_PREFIX can be used instead.

  Default 
ansible\_facts

  Ini 
 Section 
[inventory]

  Key 
cache\_prefix

    Environment 
 Variable 
[`ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX`](#envvar-ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX)

     ### INVENTORY\_CACHE\_TIMEOUT

  Description 
Expiration timeout for the inventory cache plugin data. If INVENTORY\_CACHE\_TIMEOUT is not provided CACHE\_TIMEOUT can be used instead.

  Default 
3600

  Ini 
 Section 
[inventory]

  Key 
cache\_timeout

    Environment 
 Variable 
[`ANSIBLE_INVENTORY_CACHE_TIMEOUT`](#envvar-ANSIBLE_INVENTORY_CACHE_TIMEOUT)

     ### INVENTORY\_ENABLED

  Description 
List of enabled inventory plugins, it also determines the order in which they are used.

  Type 
list

  Default 
[‘host\_list’, ‘script’, ‘auto’, ‘yaml’, ‘ini’, ‘toml’]

  Ini 
 Section 
[inventory]

  Key 
enable\_plugins

    Environment 
 Variable 
[`ANSIBLE_INVENTORY_ENABLED`](#envvar-ANSIBLE_INVENTORY_ENABLED)

     ### INVENTORY\_EXPORT

  Description 
Controls if ansible-inventory will accurately reflect Ansible’s view into inventory or its optimized for exporting.

  Type 
bool

  Default 
False

  Ini 
 Section 
[inventory]

  Key 
export

    Environment 
 Variable 
[`ANSIBLE_INVENTORY_EXPORT`](#envvar-ANSIBLE_INVENTORY_EXPORT)

     ### INVENTORY\_IGNORE\_EXTS

  Description 
List of extensions to ignore when using a directory as an inventory source

  Type 
list

  Default 
{{(REJECT\_EXTS + (‘.orig’, ‘.ini’, ‘.cfg’, ‘.retry’))}}

  Ini 
* Section 
[defaults]

  Key 
inventory\_ignore\_extensions
* Section 
[inventory]

  Key 
ignore\_extensions

  Environment 
 Variable 
[`ANSIBLE_INVENTORY_IGNORE`](#envvar-ANSIBLE_INVENTORY_IGNORE)

     ### INVENTORY\_IGNORE\_PATTERNS

  Description 
List of patterns to ignore when using a directory as an inventory source

  Type 
list

  Default 
[]

  Ini 
* Section 
[defaults]

  Key 
inventory\_ignore\_patterns
* Section 
[inventory]

  Key 
ignore\_patterns

  Environment 
 Variable 
[`ANSIBLE_INVENTORY_IGNORE_REGEX`](#envvar-ANSIBLE_INVENTORY_IGNORE_REGEX)

     ### INVENTORY\_UNPARSED\_IS\_FAILED

  Description 
If ‘true’ it is a fatal error if every single potential inventory source fails to parse, otherwise this situation will only attract a warning.

  Type 
bool

  Default 
False

  Ini 
 Section 
[inventory]

  Key 
unparsed\_is\_failed

    Environment 
 Variable 
[`ANSIBLE_INVENTORY_UNPARSED_FAILED`](#envvar-ANSIBLE_INVENTORY_UNPARSED_FAILED)

     ### LOCALHOST\_WARNING

  Description 
By default Ansible will issue a warning when there are no hosts in the inventory. These warnings can be silenced by adjusting this setting to False.

  Type 
boolean

  Default 
True

  Version Added 
2.6

  Ini 
 Section 
[defaults]

  Key 
localhost\_warning

    Environment 
 Variable 
[`ANSIBLE_LOCALHOST_WARNING`](#envvar-ANSIBLE_LOCALHOST_WARNING)

     ### MAX\_FILE\_SIZE\_FOR\_DIFF

  Description 
Maximum size of files to be considered for diff display

  Type 
int

  Default 
104448

  Ini 
 Section 
[defaults]

  Key 
max\_diff\_size

    Environment 
 Variable 
[`ANSIBLE_MAX_DIFF_SIZE`](#envvar-ANSIBLE_MAX_DIFF_SIZE)

     ### MODULE\_IGNORE\_EXTS

  Description 
List of extensions to ignore when looking for modules to load This is for rejecting script and binary module fallback extensions

  Type 
list

  Default 
{{(REJECT\_EXTS + (‘.yaml’, ‘.yml’, ‘.ini’))}}

  Ini 
 Section 
[defaults]

  Key 
module\_ignore\_exts

    Environment 
 Variable 
[`ANSIBLE_MODULE_IGNORE_EXTS`](#envvar-ANSIBLE_MODULE_IGNORE_EXTS)

     ### NETCONF\_SSH\_CONFIG

  Description 
This variable is used to enable bastion/jump host with netconf connection. If set to True the bastion/jump host ssh settings should be present in ~/.ssh/config file, alternatively it can be set to custom ssh configuration file path to read the bastion/jump host settings.

  Default 
None

  Ini 
 Section 
[netconf\_connection]

  Key 
ssh\_config

    Environment 
 Variable 
[`ANSIBLE_NETCONF_SSH_CONFIG`](#envvar-ANSIBLE_NETCONF_SSH_CONFIG)

     ### NETWORK\_GROUP\_MODULES

  Type 
list

  Default 
[‘eos’, ‘nxos’, ‘ios’, ‘iosxr’, ‘junos’, ‘enos’, ‘ce’, ‘vyos’, ‘sros’, ‘dellos9’, ‘dellos10’, ‘dellos6’, ‘asa’, ‘aruba’, ‘aireos’, ‘bigip’, ‘ironware’, ‘onyx’, ‘netconf’, ‘exos’, ‘voss’, ‘slxos’]

  Ini 
 Section 
[defaults]

  Key 
network\_group\_modules

    Environment 
* Variable 
[`ANSIBLE_NETWORK_GROUP_MODULES`](#envvar-ANSIBLE_NETWORK_GROUP_MODULES)
* Variable 
[`NETWORK_GROUP_MODULES`](#envvar-NETWORK_GROUP_MODULES)

  Deprecated in 
2.12

  Deprecated detail 
environment variables without `ANSIBLE_` prefix are deprecated

  Deprecated alternatives 
the `ANSIBLE_NETWORK_GROUP_MODULES` environment variable

   ### OLD\_PLUGIN\_CACHE\_CLEARING

  Description 
Previouslly Ansible would only clear some of the plugin loading caches when loading new roles, this led to some behaviours in which a plugin loaded in prevoius plays would be unexpectedly ‘sticky’. This setting allows to return to that behaviour.

  Type 
boolean

  Default 
False

  Version Added 
2.8

  Ini 
 Section 
[defaults]

  Key 
old\_plugin\_cache\_clear

    Environment 
 Variable 
[`ANSIBLE_OLD_PLUGIN_CACHE_CLEAR`](#envvar-ANSIBLE_OLD_PLUGIN_CACHE_CLEAR)

     ### PARAMIKO\_HOST\_KEY\_AUTO\_ADD

  Type 
boolean

  Default 
False

  Ini 
 Section 
[paramiko\_connection]

  Key 
host\_key\_auto\_add

    Environment 
 Variable 
[`ANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD`](#envvar-ANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD)

     ### PARAMIKO\_LOOK\_FOR\_KEYS

  Type 
boolean

  Default 
True

  Ini 
 Section 
[paramiko\_connection]

  Key 
look\_for\_keys

    Environment 
 Variable 
[`ANSIBLE_PARAMIKO_LOOK_FOR_KEYS`](#envvar-ANSIBLE_PARAMIKO_LOOK_FOR_KEYS)

     ### PERSISTENT\_COMMAND\_TIMEOUT

  Description 
This controls the amount of time to wait for response from remote device before timing out persistent connection.

  Type 
int

  Default 
30

  Ini 
 Section 
[persistent\_connection]

  Key 
command\_timeout

    Environment 
 Variable 
[`ANSIBLE_PERSISTENT_COMMAND_TIMEOUT`](#envvar-ANSIBLE_PERSISTENT_COMMAND_TIMEOUT)

     ### PERSISTENT\_CONNECT\_RETRY\_TIMEOUT

  Description 
This controls the retry timeout for persistent connection to connect to the local domain socket.

  Type 
integer

  Default 
15

  Ini 
 Section 
[persistent\_connection]

  Key 
connect\_retry\_timeout

    Environment 
 Variable 
[`ANSIBLE_PERSISTENT_CONNECT_RETRY_TIMEOUT`](#envvar-ANSIBLE_PERSISTENT_CONNECT_RETRY_TIMEOUT)

     ### PERSISTENT\_CONNECT\_TIMEOUT

  Description 
This controls how long the persistent connection will remain idle before it is destroyed.

  Type 
integer

  Default 
30

  Ini 
 Section 
[persistent\_connection]

  Key 
connect\_timeout

    Environment 
 Variable 
[`ANSIBLE_PERSISTENT_CONNECT_TIMEOUT`](#envvar-ANSIBLE_PERSISTENT_CONNECT_TIMEOUT)

     ### PERSISTENT\_CONTROL\_PATH\_DIR

  Description 
Path to socket to be used by the connection persistence system.

  Type 
path

  Default 
~/.ansible/pc

  Ini 
 Section 
[persistent\_connection]

  Key 
control\_path\_dir

    Environment 
 Variable 
[`ANSIBLE_PERSISTENT_CONTROL_PATH_DIR`](#envvar-ANSIBLE_PERSISTENT_CONTROL_PATH_DIR)

     ### PLAYBOOK\_DIR

  Description 
A number of non-playbook CLIs have a `--playbook-dir` argument; this sets the default value for it.

  Type 
path

  Version Added 
2.9

  Ini 
 Section 
[defaults]

  Key 
playbook\_dir

    Environment 
 Variable 
[`ANSIBLE_PLAYBOOK_DIR`](#envvar-ANSIBLE_PLAYBOOK_DIR)

     ### PLAYBOOK\_VARS\_ROOT

  Description 
This sets which playbook dirs will be used as a root to process vars plugins, which includes finding host\_vars/group\_vars The `top` option follows the traditional behaviour of using the top playbook in the chain to find the root directory. The `bottom` option follows the 2.4.0 behaviour of using the current playbook to find the root directory. The `all` option examines from the first parent to the current playbook.

  Default 
top

  Choices 
* top
* bottom
* all

  Version Added 
2.4.1

  Ini 
 Section 
[defaults]

  Key 
playbook\_vars\_root

    Environment 
 Variable 
[`ANSIBLE_PLAYBOOK_VARS_ROOT`](#envvar-ANSIBLE_PLAYBOOK_VARS_ROOT)

     ### PLUGIN\_FILTERS\_CFG

  Description 
A path to configuration for filtering which plugins installed on the system are allowed to be used. See [Rejecting modules](../user_guide/plugin_filtering_config#plugin-filtering-config) for details of the filter file’s format. The default is /etc/ansible/plugin\_filters.yml

  Type 
path

  Default 
None

  Version Added 
2.5.0

  Ini 
* Section 
[default]

  Key 
plugin\_filters\_cfg

  Deprecated in 
2.12

  Deprecated detail 
specifying “plugin\_filters\_cfg” under the “default” section is deprecated

  Deprecated alternatives 
the “defaults” section instead
* Section 
[defaults]

  Key 
plugin\_filters\_cfg

   ### PYTHON\_MODULE\_RLIMIT\_NOFILE

  Description 
Attempts to set RLIMIT\_NOFILE soft limit to the specified value when executing Python modules (can speed up subprocess usage on Python 2.x. See <https://bugs.python.org/issue11284>). The value will be limited by the existing hard limit. Default value of 0 does not attempt to adjust existing system-defined limits.

  Default 
0

  Version Added 
2.8

  Ini 
 Section 
[defaults]

  Key 
python\_module\_rlimit\_nofile

    Environment 
 Variable 
[`ANSIBLE_PYTHON_MODULE_RLIMIT_NOFILE`](#envvar-ANSIBLE_PYTHON_MODULE_RLIMIT_NOFILE)

    Variables 
 name 
`ansible_python_module_rlimit_nofile`

     ### RETRY\_FILES\_ENABLED

  Description 
This controls whether a failed Ansible playbook should create a .retry file.

  Type 
bool

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
retry\_files\_enabled

    Environment 
 Variable 
[`ANSIBLE_RETRY_FILES_ENABLED`](#envvar-ANSIBLE_RETRY_FILES_ENABLED)

     ### RETRY\_FILES\_SAVE\_PATH

  Description 
This sets the path in which Ansible will save .retry files when a playbook fails and retry files are enabled. This file will be overwritten after each run with the list of failed hosts from all plays.

  Type 
path

  Default 
None

  Ini 
 Section 
[defaults]

  Key 
retry\_files\_save\_path

    Environment 
 Variable 
[`ANSIBLE_RETRY_FILES_SAVE_PATH`](#envvar-ANSIBLE_RETRY_FILES_SAVE_PATH)

     ### RUN\_VARS\_PLUGINS

  Description 
This setting can be used to optimize vars\_plugin usage depending on user’s inventory size and play selection. Setting to C(demand) will run vars\_plugins relative to inventory sources anytime vars are ‘demanded’ by tasks. Setting to C(start) will run vars\_plugins relative to inventory sources after importing that inventory source.

  Type 
str

  Default 
demand

  Choices 
* demand
* start

  Version Added 
2.10

  Ini 
 Section 
[defaults]

  Key 
run\_vars\_plugins

    Environment 
 Variable 
[`ANSIBLE_RUN_VARS_PLUGINS`](#envvar-ANSIBLE_RUN_VARS_PLUGINS)

     ### SHOW\_CUSTOM\_STATS

  Description 
This adds the custom stats set via the set\_stats plugin to the default output

  Type 
bool

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
show\_custom\_stats

    Environment 
 Variable 
[`ANSIBLE_SHOW_CUSTOM_STATS`](#envvar-ANSIBLE_SHOW_CUSTOM_STATS)

     ### STRING\_CONVERSION\_ACTION

  Description 
Action to take when a module parameter value is converted to a string (this does not affect variables). For string parameters, values such as ‘1.00’, “[‘a’, ‘b’,]”, and ‘yes’, ‘y’, etc. will be converted by the YAML parser unless fully quoted. Valid options are ‘error’, ‘warn’, and ‘ignore’. Since 2.8, this option defaults to ‘warn’ but will change to ‘error’ in 2.12.

  Type 
string

  Default 
warn

  Version Added 
2.8

  Ini 
 Section 
[defaults]

  Key 
string\_conversion\_action

    Environment 
 Variable 
[`ANSIBLE_STRING_CONVERSION_ACTION`](#envvar-ANSIBLE_STRING_CONVERSION_ACTION)

     ### STRING\_TYPE\_FILTERS

  Description 
This list of filters avoids ‘type conversion’ when templating variables Useful when you want to avoid conversion into lists or dictionaries for JSON strings, for example.

  Type 
list

  Default 
[‘string’, ‘to\_json’, ‘to\_nice\_json’, ‘to\_yaml’, ‘to\_nice\_yaml’, ‘ppretty’, ‘json’]

  Ini 
 Section 
[jinja2]

  Key 
dont\_type\_filters

    Environment 
 Variable 
[`ANSIBLE_STRING_TYPE_FILTERS`](#envvar-ANSIBLE_STRING_TYPE_FILTERS)

     ### SYSTEM\_WARNINGS

  Description 
Allows disabling of warnings related to potential issues on the system running ansible itself (not on the managed hosts) These may include warnings about 3rd party packages or other conditions that should be resolved if possible.

  Type 
boolean

  Default 
True

  Ini 
 Section 
[defaults]

  Key 
system\_warnings

    Environment 
 Variable 
[`ANSIBLE_SYSTEM_WARNINGS`](#envvar-ANSIBLE_SYSTEM_WARNINGS)

     ### TAGS\_RUN

  Description 
default list of tags to run in your plays, Skip Tags has precedence.

  Type 
list

  Default 
[]

  Version Added 
2.5

  Ini 
 Section 
[tags]

  Key 
run

    Environment 
 Variable 
[`ANSIBLE_RUN_TAGS`](#envvar-ANSIBLE_RUN_TAGS)

     ### TAGS\_SKIP

  Description 
default list of tags to skip in your plays, has precedence over Run Tags

  Type 
list

  Default 
[]

  Version Added 
2.5

  Ini 
 Section 
[tags]

  Key 
skip

    Environment 
 Variable 
[`ANSIBLE_SKIP_TAGS`](#envvar-ANSIBLE_SKIP_TAGS)

     ### TASK\_DEBUGGER\_IGNORE\_ERRORS

  Description 
This option defines whether the task debugger will be invoked on a failed task when ignore\_errors=True is specified. True specifies that the debugger will honor ignore\_errors, False will not honor ignore\_errors.

  Type 
boolean

  Default 
True

  Version Added 
2.7

  Ini 
 Section 
[defaults]

  Key 
task\_debugger\_ignore\_errors

    Environment 
 Variable 
[`ANSIBLE_TASK_DEBUGGER_IGNORE_ERRORS`](#envvar-ANSIBLE_TASK_DEBUGGER_IGNORE_ERRORS)

     ### TASK\_TIMEOUT

  Description 
Set the maximum time (in seconds) that a task can run for. If set to 0 (the default) there is no timeout.

  Type 
integer

  Default 
0

  Version Added 
2.10

  Ini 
 Section 
[defaults]

  Key 
task\_timeout

    Environment 
 Variable 
[`ANSIBLE_TASK_TIMEOUT`](#envvar-ANSIBLE_TASK_TIMEOUT)

     ### TRANSFORM\_INVALID\_GROUP\_CHARS

  Description 
Make ansible transform invalid characters in group names supplied by inventory sources. If ‘never’ it will allow for the group name but warn about the issue. When ‘ignore’, it does the same as ‘never’, without issuing a warning. When ‘always’ it will replace any invalid characters with ‘\_’ (underscore) and warn the user When ‘silently’, it does the same as ‘always’, without issuing a warning.

  Type 
string

  Default 
never

  Choices 
* always
* never
* ignore
* silently

  Version Added 
2.8

  Ini 
 Section 
[defaults]

  Key 
force\_valid\_group\_names

    Environment 
 Variable 
[`ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS`](#envvar-ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS)

     ### USE\_PERSISTENT\_CONNECTIONS

  Description 
Toggles the use of persistence for connections.

  Type 
boolean

  Default 
False

  Ini 
 Section 
[defaults]

  Key 
use\_persistent\_connections

    Environment 
 Variable 
[`ANSIBLE_USE_PERSISTENT_CONNECTIONS`](#envvar-ANSIBLE_USE_PERSISTENT_CONNECTIONS)

     ### VARIABLE\_PLUGINS\_ENABLED

  Description 
Whitelist for variable plugins that require it.

  Type 
list

  Default 
[‘host\_group\_vars’]

  Version Added 
2.10

  Ini 
 Section 
[defaults]

  Key 
vars\_plugins\_enabled

    Environment 
 Variable 
[`ANSIBLE_VARS_ENABLED`](#envvar-ANSIBLE_VARS_ENABLED)

     ### VARIABLE\_PRECEDENCE

  Description 
Allows to change the group variable precedence merge order.

  Type 
list

  Default 
[‘all\_inventory’, ‘groups\_inventory’, ‘all\_plugins\_inventory’, ‘all\_plugins\_play’, ‘groups\_plugins\_inventory’, ‘groups\_plugins\_play’]

  Version Added 
2.4

  Ini 
 Section 
[defaults]

  Key 
precedence

    Environment 
 Variable 
[`ANSIBLE_PRECEDENCE`](#envvar-ANSIBLE_PRECEDENCE)

     ### VERBOSE\_TO\_STDERR

  Description 
Force ‘verbose’ option to use stderr instead of stdout

  Type 
bool

  Default 
False

  Version Added 
2.8

  Ini 
 Section 
[defaults]

  Key 
verbose\_to\_stderr

    Environment 
 Variable 
[`ANSIBLE_VERBOSE_TO_STDERR`](#envvar-ANSIBLE_VERBOSE_TO_STDERR)

     ### WIN\_ASYNC\_STARTUP\_TIMEOUT

  Description 
For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how long, in seconds, to wait for the task spawned by Ansible to connect back to the named pipe used on Windows systems. The default is 5 seconds. This can be too low on slower systems, or systems under heavy load. This is not the total time an async command can run for, but is a separate timeout to wait for an async command to start. The task will only start to be timed against its async\_timeout once it has connected to the pipe, so the overall maximum duration the task can take will be extended by the amount specified here.

  Type 
integer

  Default 
5

  Version Added 
2.10

  Ini 
 Section 
[defaults]

  Key 
win\_async\_startup\_timeout

    Environment 
 Variable 
[`ANSIBLE_WIN_ASYNC_STARTUP_TIMEOUT`](#envvar-ANSIBLE_WIN_ASYNC_STARTUP_TIMEOUT)

    Variables 
 name 
`ansible_win_async_startup_timeout`

     ### WORKER\_SHUTDOWN\_POLL\_COUNT

  Description 
The maximum number of times to check Task Queue Manager worker processes to verify they have exited cleanly. After this limit is reached any worker processes still running will be terminated. This is for internal use only.

  Type 
integer

  Default 
0

  Version Added 
2.10

  Environment 
 Variable 
[`ANSIBLE_WORKER_SHUTDOWN_POLL_COUNT`](#envvar-ANSIBLE_WORKER_SHUTDOWN_POLL_COUNT)

     ### WORKER\_SHUTDOWN\_POLL\_DELAY

  Description 
The number of seconds to sleep between polling loops when checking Task Queue Manager worker processes to verify they have exited cleanly. This is for internal use only.

  Type 
float

  Default 
0.1

  Version Added 
2.10

  Environment 
 Variable 
[`ANSIBLE_WORKER_SHUTDOWN_POLL_DELAY`](#envvar-ANSIBLE_WORKER_SHUTDOWN_POLL_DELAY)

     ### YAML\_FILENAME\_EXTENSIONS

  Description 
Check all of these extensions when looking for ‘variable’ files which should be YAML or JSON or vaulted versions of these. This affects vars\_files, include\_vars, inventory and vars plugins among others.

  Type 
list

  Default 
[‘.yml’, ‘.yaml’, ‘.json’]

  Ini 
 Section 
[defaults]

  Key 
yaml\_valid\_extensions

    Environment 
 Variable 
[`ANSIBLE_YAML_FILENAME_EXT`](#envvar-ANSIBLE_YAML_FILENAME_EXT)

     Environment Variables
---------------------

  
`ANSIBLE_CONFIG`  
Override the default ansible config file

 
  
`ANSIBLE_CONNECTION_PATH`  
Specify where to look for the ansible-connection script. This location will be checked before searching $PATH.If null, ansible will start with the same directory as the ansible script.

 See also [ANSIBLE\_CONNECTION\_PATH](#ansible-connection-path)

 
  
`ANSIBLE_COW_SELECTION`  
This allows you to chose a specific cowsay stencil for the banners or use ‘random’ to cycle through them.

 See also [ANSIBLE\_COW\_SELECTION](#ansible-cow-selection)

 
  
`ANSIBLE_COW_WHITELIST`  
White list of cowsay templates that are ‘safe’ to use, set to empty list if you want to enable all installed templates.

 See also [ANSIBLE\_COW\_ACCEPTLIST](#ansible-cow-acceptlist)

  Deprecated in 
2.15

  Deprecated detail 
normalizing names to new standard

  Deprecated alternatives 
ANSIBLE\_COW\_ACCEPTLIST

   
  
`ANSIBLE_COW_ACCEPTLIST`  
White list of cowsay templates that are ‘safe’ to use, set to empty list if you want to enable all installed templates.

 See also [ANSIBLE\_COW\_ACCEPTLIST](#ansible-cow-acceptlist)

  Version Added 
2.11

   
  
`ANSIBLE_FORCE_COLOR`  
This option forces color mode even when running without a TTY or the “nocolor” setting is True.

 See also [ANSIBLE\_FORCE\_COLOR](#ansible-force-color)

 
  
`ANSIBLE_NOCOLOR`  
This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.

 See also [ANSIBLE\_NOCOLOR](#ansible-nocolor)

 
  
`NO_COLOR`  
This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.

 See also [ANSIBLE\_NOCOLOR](#ansible-nocolor)

  Version Added 
2.11

   
  
`ANSIBLE_NOCOWS`  
If you have cowsay installed but want to avoid the ‘cows’ (why????), use this.

 See also [ANSIBLE\_NOCOWS](#ansible-nocows)

 
  
`ANSIBLE_COW_PATH`  
Specify a custom cowsay path or swap in your cowsay implementation of choice

 See also [ANSIBLE\_COW\_PATH](#ansible-cow-path)

 
  
`ANSIBLE_PIPELINING`  
Pipelining, if supported by the connection plugin, reduces the number of network operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfer.This can result in a very significant performance improvement when enabled.However this conflicts with privilege escalation (become). For example, when using ‘sudo:’ operations you must first disable ‘requiretty’ in /etc/sudoers on all managed hosts, which is why it is disabled by default.This option is disabled if `ANSIBLE_KEEP_REMOTE_FILES` is enabled.This is a global option, each connection plugin can override either by having more specific options or not supporting pipelining at all.

 See also [ANSIBLE\_PIPELINING](#ansible-pipelining)

 
  
`ANSIBLE_ANY_ERRORS_FATAL`  
Sets the default value for the any\_errors\_fatal keyword, if True, Task failures will be considered fatal errors.

 See also [ANY\_ERRORS\_FATAL](#any-errors-fatal)

 
  
`ANSIBLE_BECOME_ALLOW_SAME_USER`  
This setting controls if become is skipped when remote user and become user are the same. I.E root sudo to root.

 See also [BECOME\_ALLOW\_SAME\_USER](#become-allow-same-user)

 
  
`ANSIBLE_AGNOSTIC_BECOME_PROMPT`  
Display an agnostic become prompt instead of displaying a prompt containing the command line supplied become method

 See also [AGNOSTIC\_BECOME\_PROMPT](#agnostic-become-prompt)

 
  
`ANSIBLE_CACHE_PLUGIN`  
Chooses which cache plugin to use, the default ‘memory’ is ephemeral.

 See also [CACHE\_PLUGIN](#cache-plugin)

 
  
`ANSIBLE_CACHE_PLUGIN_CONNECTION`  
Defines connection or path information for the cache plugin

 See also [CACHE\_PLUGIN\_CONNECTION](#cache-plugin-connection)

 
  
`ANSIBLE_CACHE_PLUGIN_PREFIX`  
Prefix to use for cache plugin files/tables

 See also [CACHE\_PLUGIN\_PREFIX](#cache-plugin-prefix)

 
  
`ANSIBLE_CACHE_PLUGIN_TIMEOUT`  
Expiration timeout for the cache plugin data

 See also [CACHE\_PLUGIN\_TIMEOUT](#cache-plugin-timeout)

 
  
`ANSIBLE_COLLECTIONS_SCAN_SYS_PATH`  
A boolean to enable or disable scanning the sys.path for installed collections

 See also [COLLECTIONS\_SCAN\_SYS\_PATH](#collections-scan-sys-path)

 
  
`ANSIBLE_COLLECTIONS_PATHS`  
Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, not directly in these directories. For example, if `COLLECTIONS_PATHS` includes `~/.ansible/collections`, and you want to add `my.collection` to that directory, it must be saved as `~/.ansible/collections/ansible_collections/my/collection`.

 See also [COLLECTIONS\_PATHS](#collections-paths)

 
  
`ANSIBLE_COLLECTIONS_PATH`  
Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, not directly in these directories. For example, if `COLLECTIONS_PATHS` includes `~/.ansible/collections`, and you want to add `my.collection` to that directory, it must be saved as `~/.ansible/collections/ansible_collections/my/collection`.

 See also [COLLECTIONS\_PATHS](#collections-paths)

  Version Added 
2.10

   
  
`ANSIBLE_COLLECTIONS_ON_ANSIBLE_VERSION_MISMATCH`  
When a collection is loaded that does not support the running Ansible version (via the collection metadata key `requires_ansible`), the default behavior is to issue a warning and continue anyway. Setting this value to `ignore` skips the warning entirely, while setting it to `fatal` will immediately halt Ansible execution.

 See also [COLLECTIONS\_ON\_ANSIBLE\_VERSION\_MISMATCH](#collections-on-ansible-version-mismatch)

 
  
`ANSIBLE_COLOR_CHANGED`  
Defines the color to use on ‘Changed’ task status

 See also [COLOR\_CHANGED](#color-changed)

 
  
`ANSIBLE_COLOR_CONSOLE_PROMPT`  
Defines the default color to use for ansible-console

 See also [COLOR\_CONSOLE\_PROMPT](#color-console-prompt)

 
  
`ANSIBLE_COLOR_DEBUG`  
Defines the color to use when emitting debug messages

 See also [COLOR\_DEBUG](#color-debug)

 
  
`ANSIBLE_COLOR_DEPRECATE`  
Defines the color to use when emitting deprecation messages

 See also [COLOR\_DEPRECATE](#color-deprecate)

 
  
`ANSIBLE_COLOR_DIFF_ADD`  
Defines the color to use when showing added lines in diffs

 See also [COLOR\_DIFF\_ADD](#color-diff-add)

 
  
`ANSIBLE_COLOR_DIFF_LINES`  
Defines the color to use when showing diffs

 See also [COLOR\_DIFF\_LINES](#color-diff-lines)

 
  
`ANSIBLE_COLOR_DIFF_REMOVE`  
Defines the color to use when showing removed lines in diffs

 See also [COLOR\_DIFF\_REMOVE](#color-diff-remove)

 
  
`ANSIBLE_COLOR_ERROR`  
Defines the color to use when emitting error messages

 See also [COLOR\_ERROR](#color-error)

 
  
`ANSIBLE_COLOR_HIGHLIGHT`  
Defines the color to use for highlighting

 See also [COLOR\_HIGHLIGHT](#color-highlight)

 
  
`ANSIBLE_COLOR_OK`  
Defines the color to use when showing ‘OK’ task status

 See also [COLOR\_OK](#color-ok)

 
  
`ANSIBLE_COLOR_SKIP`  
Defines the color to use when showing ‘Skipped’ task status

 See also [COLOR\_SKIP](#color-skip)

 
  
`ANSIBLE_COLOR_UNREACHABLE`  
Defines the color to use on ‘Unreachable’ status

 See also [COLOR\_UNREACHABLE](#color-unreachable)

 
  
`ANSIBLE_COLOR_VERBOSE`  
Defines the color to use when emitting verbose messages. i.e those that show with ‘-v’s.

 See also [COLOR\_VERBOSE](#color-verbose)

 
  
`ANSIBLE_COLOR_WARN`  
Defines the color to use when emitting warning messages

 See also [COLOR\_WARN](#color-warn)

 
  
`ANSIBLE_CONDITIONAL_BARE_VARS`  
With this setting on (True), running conditional evaluation ‘var’ is treated differently than ‘var.subkey’ as the first is evaluated directly while the second goes through the Jinja2 parser. But ‘false’ strings in ‘var’ get evaluated as booleans.With this setting off they both evaluate the same but in cases in which ‘var’ was ‘false’ (a string) it won’t get evaluated as a boolean anymore.Currently this setting defaults to ‘True’ but will soon change to ‘False’ and the setting itself will be removed in the future.Expect that this setting eventually will be deprecated after 2.12

 See also [CONDITIONAL\_BARE\_VARS](#conditional-bare-vars)

 
  
`_ANSIBLE_COVERAGE_REMOTE_OUTPUT`  
Sets the output directory on the remote host to generate coverage reports to.Currently only used for remote coverage on PowerShell modules.This is for internal use only.

 See also [COVERAGE\_REMOTE\_OUTPUT](#coverage-remote-output)

 
  
`_ANSIBLE_COVERAGE_REMOTE_PATH_FILTER`  
A list of paths for files on the Ansible controller to run coverage for when executing on the remote host.Only files that match the path glob will have its coverage collected.Multiple path globs can be specified and are separated by `:`.Currently only used for remote coverage on PowerShell modules.This is for internal use only.

 See also [COVERAGE\_REMOTE\_PATHS](#coverage-remote-paths)

 
  
`ANSIBLE_ACTION_WARNINGS`  
By default Ansible will issue a warning when received from a task action (module or action plugin)These warnings can be silenced by adjusting this setting to False.

 See also [ACTION\_WARNINGS](#action-warnings)

 
  
`ANSIBLE_COMMAND_WARNINGS`  
Ansible can issue a warning when the shell or command module is used and the command appears to be similar to an existing Ansible module.These warnings can be silenced by adjusting this setting to False. You can also control this at the task level with the module option `warn`.As of version 2.11, this is disabled by default.

 See also [COMMAND\_WARNINGS](#command-warnings)

 
  
`ANSIBLE_LOCALHOST_WARNING`  
By default Ansible will issue a warning when there are no hosts in the inventory.These warnings can be silenced by adjusting this setting to False.

 See also [LOCALHOST\_WARNING](#localhost-warning)

 
  
`ANSIBLE_DOC_FRAGMENT_PLUGINS`  
Colon separated paths in which Ansible will search for Documentation Fragments Plugins.

 See also [DOC\_FRAGMENT\_PLUGIN\_PATH](#doc-fragment-plugin-path)

 
  
`ANSIBLE_ACTION_PLUGINS`  
Colon separated paths in which Ansible will search for Action Plugins.

 See also [DEFAULT\_ACTION\_PLUGIN\_PATH](#default-action-plugin-path)

 
  
`ANSIBLE_ASK_PASS`  
This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probably do not needed to change this setting.

 See also [DEFAULT\_ASK\_PASS](#default-ask-pass)

 
  
`ANSIBLE_ASK_VAULT_PASS`  
This controls whether an Ansible playbook should prompt for a vault password.

 See also [DEFAULT\_ASK\_VAULT\_PASS](#default-ask-vault-pass)

 
  
`ANSIBLE_BECOME`  
Toggles the use of privilege escalation, allowing you to ‘become’ another user after login.

 See also [DEFAULT\_BECOME](#default-become)

 
  
`ANSIBLE_BECOME_ASK_PASS`  
Toggle to prompt for privilege escalation password.

 See also [DEFAULT\_BECOME\_ASK\_PASS](#default-become-ask-pass)

 
  
`ANSIBLE_BECOME_METHOD`  
Privilege escalation method to use when `become` is enabled.

 See also [DEFAULT\_BECOME\_METHOD](#default-become-method)

 
  
`ANSIBLE_BECOME_EXE`  
executable to use for privilege escalation, otherwise Ansible will depend on PATH

 See also [DEFAULT\_BECOME\_EXE](#default-become-exe)

 
  
`ANSIBLE_BECOME_FLAGS`  
Flags to pass to the privilege escalation executable.

 See also [DEFAULT\_BECOME\_FLAGS](#default-become-flags)

 
  
`ANSIBLE_BECOME_PLUGINS`  
Colon separated paths in which Ansible will search for Become Plugins.

 See also [BECOME\_PLUGIN\_PATH](#become-plugin-path)

 
  
`ANSIBLE_BECOME_USER`  
The user your login/remote user ‘becomes’ when using privilege escalation, most systems will use ‘root’ when no user is specified.

 See also [DEFAULT\_BECOME\_USER](#default-become-user)

 
  
`ANSIBLE_CACHE_PLUGINS`  
Colon separated paths in which Ansible will search for Cache Plugins.

 See also [DEFAULT\_CACHE\_PLUGIN\_PATH](#default-cache-plugin-path)

 
  
`ANSIBLE_CALLABLE_WHITELIST`  
Whitelist of callable methods to be made available to template evaluation

 See also [CALLABLE\_ACCEPT\_LIST](#callable-accept-list)

  Deprecated in 
2.15

  Deprecated detail 
normalizing names to new standard

  Deprecated alternatives 
ANSIBLE\_CALLABLE\_ENABLED

   
  
`ANSIBLE_CALLABLE_ENABLED`  
Whitelist of callable methods to be made available to template evaluation

 See also [CALLABLE\_ACCEPT\_LIST](#callable-accept-list)

  Version Added 
2.11

   
  
`ANSIBLE_CONTROLLER_PYTHON_WARNING`  
Toggle to control showing warnings related to running a Python version older than Python 3.8 on the controller

 See also [CONTROLLER\_PYTHON\_WARNING](#controller-python-warning)

 
  
`ANSIBLE_CALLBACK_PLUGINS`  
Colon separated paths in which Ansible will search for Callback Plugins.

 See also [DEFAULT\_CALLBACK\_PLUGIN\_PATH](#default-callback-plugin-path)

 
  
`ANSIBLE_CALLBACK_WHITELIST`  
List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don’t want them activated by default.

 See also [CALLBACKS\_ENABLED](#callbacks-enabled)

  Deprecated in 
2.15

  Deprecated detail 
normalizing names to new standard

  Deprecated alternatives 
ANSIBLE\_CALLBACKS\_ENABLED

   
  
`ANSIBLE_CALLBACKS_ENABLED`  
List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don’t want them activated by default.

 See also [CALLBACKS\_ENABLED](#callbacks-enabled)

  Version Added 
2.11

   
  
`ANSIBLE_CLICONF_PLUGINS`  
Colon separated paths in which Ansible will search for Cliconf Plugins.

 See also [DEFAULT\_CLICONF\_PLUGIN\_PATH](#default-cliconf-plugin-path)

 
  
`ANSIBLE_CONNECTION_PLUGINS`  
Colon separated paths in which Ansible will search for Connection Plugins.

 See also [DEFAULT\_CONNECTION\_PLUGIN\_PATH](#default-connection-plugin-path)

 
  
`ANSIBLE_DEBUG`  
Toggles debug output in Ansible. This is *very* verbose and can hinder multiprocessing. Debug output can also include secret information despite no\_log settings being enabled, which means debug mode should not be used in production.

 See also [DEFAULT\_DEBUG](#default-debug)

 
  
`ANSIBLE_EXECUTABLE`  
This indicates the command to use to spawn a shell under for Ansible’s execution needs on a target. Users may need to change this in rare instances when shell usage is constrained, but in most cases it may be left as is.

 See also [DEFAULT\_EXECUTABLE](#default-executable)

 
  
`ANSIBLE_FACT_PATH`  
This option allows you to globally configure a custom path for ‘local\_facts’ for the implied M(ansible.builtin.setup) task when using fact gathering.If not set, it will fallback to the default from the M(ansible.builtin.setup) module: `/etc/ansible/facts.d`.This does **not** affect user defined tasks that use the M(ansible.builtin.setup) module.

 See also [DEFAULT\_FACT\_PATH](#default-fact-path)

 
  
`ANSIBLE_FILTER_PLUGINS`  
Colon separated paths in which Ansible will search for Jinja2 Filter Plugins.

 See also [DEFAULT\_FILTER\_PLUGIN\_PATH](#default-filter-plugin-path)

 
  
`ANSIBLE_FORCE_HANDLERS`  
This option controls if notified handlers run on a host even if a failure occurs on that host.When false, the handlers will not run if a failure has occurred on a host.This can also be set per play or on the command line. See Handlers and Failure for more details.

 See also [DEFAULT\_FORCE\_HANDLERS](#default-force-handlers)

 
  
`ANSIBLE_FORKS`  
Maximum number of forks Ansible will use to execute tasks on target hosts.

 See also [DEFAULT\_FORKS](#default-forks)

 
  
`ANSIBLE_GATHERING`  
This setting controls the default policy of fact gathering (facts discovered about remote systems).When ‘implicit’ (the default), the cache plugin will be ignored and facts will be gathered per play unless ‘gather\_facts: False’ is set.When ‘explicit’ the inverse is true, facts will not be gathered unless directly requested in the play.The ‘smart’ value means each new host that has no facts discovered will be scanned, but if the same host is addressed in multiple plays it will not be contacted again in the playbook run.This option can be useful for those wishing to save fact gathering time. Both ‘smart’ and ‘explicit’ will use the cache plugin.

 See also [DEFAULT\_GATHERING](#default-gathering)

 
  
`ANSIBLE_GATHER_SUBSET`  
Set the `gather_subset` option for the M(ansible.builtin.setup) task in the implicit fact gathering. See the module documentation for specifics.It does **not** apply to user defined M(ansible.builtin.setup) tasks.

 See also [DEFAULT\_GATHER\_SUBSET](#default-gather-subset)

 
  
`ANSIBLE_GATHER_TIMEOUT`  
Set the timeout in seconds for the implicit fact gathering.It does **not** apply to user defined M(ansible.builtin.setup) tasks.

 See also [DEFAULT\_GATHER\_TIMEOUT](#default-gather-timeout)

 
  
`ANSIBLE_HANDLER_INCLUDES_STATIC`  
Since 2.0 M(ansible.builtin.include) can be ‘dynamic’, this setting (if True) forces that if the include appears in a `handlers` section to be ‘static’.

 See also [DEFAULT\_HANDLER\_INCLUDES\_STATIC](#default-handler-includes-static)

 
  
`ANSIBLE_HASH_BEHAVIOUR`  
This setting controls how duplicate definitions of dictionary variables (aka hash, map, associative array) are handled in Ansible.This does not affect variables whose values are scalars (integers, strings) or arrays.\*\*WARNING\*\*, changing this setting is not recommended as this is fragile and makes your content (plays, roles, collections) non portable, leading to continual confusion and misuse. Don’t change this setting unless you think you have an absolute need for it.We recommend avoiding reusing variable names and relying on the `combine` filter and `vars` and `varnames` lookups to create merged versions of the individual variables. In our experience this is rarely really needed and a sign that too much complexity has been introduced into the data structures and plays.For some uses you can also look into custom vars\_plugins to merge on input, even substituting the default `host_group_vars` that is in charge of parsing the `host_vars/` and `group_vars/` directories. Most users of this setting are only interested in inventory scope, but the setting itself affects all sources and makes debugging even harder.All playbooks and roles in the official examples repos assume the default for this setting.Changing the setting to `merge` applies across variable sources, but many sources will internally still overwrite the variables. For example `include_vars` will dedupe variables internally before updating Ansible, with ‘last defined’ overwriting previous definitions in same file.The Ansible project recommends you **avoid ``merge`` for new projects.\*\*It is the intention of the Ansible developers to eventually deprecate and remove this setting, but it is being kept as some users do heavily rely on it. New projects should \*\*avoid ‘merge’**.

 See also [DEFAULT\_HASH\_BEHAVIOUR](#default-hash-behaviour)

 
  
`ANSIBLE_INVENTORY`  
Comma separated list of Ansible inventory sources

 See also [DEFAULT\_HOST\_LIST](#default-host-list)

 
  
`ANSIBLE_HTTPAPI_PLUGINS`  
Colon separated paths in which Ansible will search for HttpApi Plugins.

 See also [DEFAULT\_HTTPAPI\_PLUGIN\_PATH](#default-httpapi-plugin-path)

 
  
`ANSIBLE_INVENTORY_PLUGINS`  
Colon separated paths in which Ansible will search for Inventory Plugins.

 See also [DEFAULT\_INVENTORY\_PLUGIN\_PATH](#default-inventory-plugin-path)

 
  
`ANSIBLE_JINJA2_EXTENSIONS`  
This is a developer-specific feature that allows enabling additional Jinja2 extensions.See the Jinja2 documentation for details. If you do not know what these do, you probably don’t need to change this setting :)

 See also [DEFAULT\_JINJA2\_EXTENSIONS](#default-jinja2-extensions)

 
  
`ANSIBLE_JINJA2_NATIVE`  
This option preserves variable types during template operations. This requires Jinja2 >= 2.10.

 See also [DEFAULT\_JINJA2\_NATIVE](#default-jinja2-native)

 
  
`ANSIBLE_KEEP_REMOTE_FILES`  
Enables/disables the cleaning up of the temporary files Ansible used to execute the tasks on the remote.If this option is enabled it will disable `ANSIBLE_PIPELINING`.

 See also [DEFAULT\_KEEP\_REMOTE\_FILES](#default-keep-remote-files)

 
  
`LIBVIRT_LXC_NOSECLABEL`  
This setting causes libvirt to connect to lxc containers by passing –noseclabel to virsh. This is necessary when running on systems which do not have SELinux.

 See also [DEFAULT\_LIBVIRT\_LXC\_NOSECLABEL](#default-libvirt-lxc-noseclabel)

  Deprecated in 
2.12

  Deprecated detail 
environment variables without `ANSIBLE_` prefix are deprecated

  Deprecated alternatives 
the `ANSIBLE_LIBVIRT_LXC_NOSECLABEL` environment variable

   
  
`ANSIBLE_LIBVIRT_LXC_NOSECLABEL`  
This setting causes libvirt to connect to lxc containers by passing –noseclabel to virsh. This is necessary when running on systems which do not have SELinux.

 See also [DEFAULT\_LIBVIRT\_LXC\_NOSECLABEL](#default-libvirt-lxc-noseclabel)

 
  
`ANSIBLE_LOAD_CALLBACK_PLUGINS`  
Controls whether callback plugins are loaded when running /usr/bin/ansible. This may be used to log activity from the command line, send notifications, and so on. Callback plugins are always loaded for `ansible-playbook`.

 See also [DEFAULT\_LOAD\_CALLBACK\_PLUGINS](#default-load-callback-plugins)

 
  
`ANSIBLE_LOCAL_TEMP`  
Temporary directory for Ansible to use on the controller.

 See also [DEFAULT\_LOCAL\_TMP](#default-local-tmp)

 
  
`ANSIBLE_LOG_PATH`  
File to which Ansible will log on the controller. When empty logging is disabled.

 See also [DEFAULT\_LOG\_PATH](#default-log-path)

 
  
`ANSIBLE_LOG_FILTER`  
List of logger names to filter out of the log file

 See also [DEFAULT\_LOG\_FILTER](#default-log-filter)

 
  
`ANSIBLE_LOOKUP_PLUGINS`  
Colon separated paths in which Ansible will search for Lookup Plugins.

 See also [DEFAULT\_LOOKUP\_PLUGIN\_PATH](#default-lookup-plugin-path)

 
  
`ANSIBLE_MODULE_ARGS`  
This sets the default arguments to pass to the `ansible` adhoc binary if no `-a` is specified.

 See also [DEFAULT\_MODULE\_ARGS](#default-module-args)

 
  
`ANSIBLE_LIBRARY`  
Colon separated paths in which Ansible will search for Modules.

 See also [DEFAULT\_MODULE\_PATH](#default-module-path)

 
  
`ANSIBLE_MODULE_UTILS`  
Colon separated paths in which Ansible will search for Module utils files, which are shared by modules.

 See also [DEFAULT\_MODULE\_UTILS\_PATH](#default-module-utils-path)

 
  
`ANSIBLE_NETCONF_PLUGINS`  
Colon separated paths in which Ansible will search for Netconf Plugins.

 See also [DEFAULT\_NETCONF\_PLUGIN\_PATH](#default-netconf-plugin-path)

 
  
`ANSIBLE_NO_LOG`  
Toggle Ansible’s display and logging of task details, mainly used to avoid security disclosures.

 See also [DEFAULT\_NO\_LOG](#default-no-log)

 
  
`ANSIBLE_NO_TARGET_SYSLOG`  
Toggle Ansible logging to syslog on the target when it executes tasks. On Windows hosts this will disable a newer style PowerShell modules from writting to the event log.

 See also [DEFAULT\_NO\_TARGET\_SYSLOG](#default-no-target-syslog)

 
  
`ANSIBLE_NULL_REPRESENTATION`  
What templating should return as a ‘null’ value. When not set it will let Jinja2 decide.

 See also [DEFAULT\_NULL\_REPRESENTATION](#default-null-representation)

 
  
`ANSIBLE_POLL_INTERVAL`  
For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how often to check back on the status of those tasks when an explicit poll interval is not supplied. The default is a reasonably moderate 15 seconds which is a tradeoff between checking in frequently and providing a quick turnaround when something may have completed.

 See also [DEFAULT\_POLL\_INTERVAL](#default-poll-interval)

 
  
`ANSIBLE_PRIVATE_KEY_FILE`  
Option for connections using a certificate or key file to authenticate, rather than an agent or passwords, you can set the default value here to avoid re-specifying –private-key with every invocation.

 See also [DEFAULT\_PRIVATE\_KEY\_FILE](#default-private-key-file)

 
  
`ANSIBLE_PRIVATE_ROLE_VARS`  
Makes role variables inaccessible from other roles.This was introduced as a way to reset role variables to default values if a role is used more than once in a playbook.

 See also [DEFAULT\_PRIVATE\_ROLE\_VARS](#default-private-role-vars)

 
  
`ANSIBLE_REMOTE_PORT`  
Port to use in remote connections, when blank it will use the connection plugin default.

 See also [DEFAULT\_REMOTE\_PORT](#default-remote-port)

 
  
`ANSIBLE_REMOTE_USER`  
Sets the login user for the target machinesWhen blank it uses the connection plugin’s default, normally the user currently executing Ansible.

 See also [DEFAULT\_REMOTE\_USER](#default-remote-user)

 
  
`ANSIBLE_ROLES_PATH`  
Colon separated paths in which Ansible will search for Roles.

 See also [DEFAULT\_ROLES\_PATH](#default-roles-path)

 
  
`ANSIBLE_SELINUX_SPECIAL_FS`  
Some filesystems do not support safe operations and/or return inconsistent errors, this setting makes Ansible ‘tolerate’ those in the list w/o causing fatal errors.Data corruption may occur and writes are not always verified when a filesystem is in the list.

 See also [DEFAULT\_SELINUX\_SPECIAL\_FS](#default-selinux-special-fs)

  Version Added 
2.9

   
  
`ANSIBLE_STDOUT_CALLBACK`  
Set the main callback used to display Ansible output, you can only have one at a time.You can have many other callbacks, but just one can be in charge of stdout.

 See also [DEFAULT\_STDOUT\_CALLBACK](#default-stdout-callback)

 
  
`ANSIBLE_ENABLE_TASK_DEBUGGER`  
Whether or not to enable the task debugger, this previously was done as a strategy plugin.Now all strategy plugins can inherit this behavior. The debugger defaults to activating whena task is failed on unreachable. Use the debugger keyword for more flexibility.

 See also [ENABLE\_TASK\_DEBUGGER](#enable-task-debugger)

 
  
`ANSIBLE_TASK_DEBUGGER_IGNORE_ERRORS`  
This option defines whether the task debugger will be invoked on a failed task when ignore\_errors=True is specified.True specifies that the debugger will honor ignore\_errors, False will not honor ignore\_errors.

 See also [TASK\_DEBUGGER\_IGNORE\_ERRORS](#task-debugger-ignore-errors)

 
  
`ANSIBLE_STRATEGY`  
Set the default strategy used for plays.

 See also [DEFAULT\_STRATEGY](#default-strategy)

 
  
`ANSIBLE_STRATEGY_PLUGINS`  
Colon separated paths in which Ansible will search for Strategy Plugins.

 See also [DEFAULT\_STRATEGY\_PLUGIN\_PATH](#default-strategy-plugin-path)

 
  
`ANSIBLE_SU`  
Toggle the use of “su” for tasks.

 See also [DEFAULT\_SU](#default-su)

 
  
`ANSIBLE_SYSLOG_FACILITY`  
Syslog facility to use when Ansible logs to the remote target

 See also [DEFAULT\_SYSLOG\_FACILITY](#default-syslog-facility)

 
  
`ANSIBLE_TASK_INCLUDES_STATIC`  
The `include` tasks can be static or dynamic, this toggles the default expected behaviour if autodetection fails and it is not explicitly set in task.

 See also [DEFAULT\_TASK\_INCLUDES\_STATIC](#default-task-includes-static)

 
  
`ANSIBLE_TERMINAL_PLUGINS`  
Colon separated paths in which Ansible will search for Terminal Plugins.

 See also [DEFAULT\_TERMINAL\_PLUGIN\_PATH](#default-terminal-plugin-path)

 
  
`ANSIBLE_TEST_PLUGINS`  
Colon separated paths in which Ansible will search for Jinja2 Test Plugins.

 See also [DEFAULT\_TEST\_PLUGIN\_PATH](#default-test-plugin-path)

 
  
`ANSIBLE_TIMEOUT`  
This is the default timeout for connection plugins to use.

 See also [DEFAULT\_TIMEOUT](#default-timeout)

 
  
`ANSIBLE_TRANSPORT`  
Default connection plugin to use, the ‘smart’ option will toggle between ‘ssh’ and ‘paramiko’ depending on controller OS and ssh versions

 See also [DEFAULT\_TRANSPORT](#default-transport)

 
  
`ANSIBLE_ERROR_ON_UNDEFINED_VARS`  
When True, this causes ansible templating to fail steps that reference variable names that are likely typoed.Otherwise, any ‘{{ template\_expression }}’ that contains undefined variables will be rendered in a template or ansible action line exactly as written.

 See also [DEFAULT\_UNDEFINED\_VAR\_BEHAVIOR](#default-undefined-var-behavior)

 
  
`ANSIBLE_VARS_PLUGINS`  
Colon separated paths in which Ansible will search for Vars Plugins.

 See also [DEFAULT\_VARS\_PLUGIN\_PATH](#default-vars-plugin-path)

 
  
`ANSIBLE_VAULT_ID_MATCH`  
If true, decrypting vaults with a vault id will only try the password from the matching vault-id

 See also [DEFAULT\_VAULT\_ID\_MATCH](#default-vault-id-match)

 
  
`ANSIBLE_VAULT_IDENTITY`  
The label to use for the default vault id label in cases where a vault id label is not provided

 See also [DEFAULT\_VAULT\_IDENTITY](#default-vault-identity)

 
  
`ANSIBLE_VAULT_ENCRYPT_IDENTITY`  
The vault\_id to use for encrypting by default. If multiple vault\_ids are provided, this specifies which to use for encryption. The –encrypt-vault-id cli option overrides the configured value.

 See also [DEFAULT\_VAULT\_ENCRYPT\_IDENTITY](#default-vault-encrypt-identity)

 
  
`ANSIBLE_VAULT_IDENTITY_LIST`  
A list of vault-ids to use by default. Equivalent to multiple –vault-id args. Vault-ids are tried in order.

 See also [DEFAULT\_VAULT\_IDENTITY\_LIST](#default-vault-identity-list)

 
  
`ANSIBLE_VAULT_PASSWORD_FILE`  
The vault password file to use. Equivalent to –vault-password-file or –vault-id

 See also [DEFAULT\_VAULT\_PASSWORD\_FILE](#default-vault-password-file)

 
  
`ANSIBLE_VERBOSITY`  
Sets the default verbosity, equivalent to the number of `-v` passed in the command line.

 See also [DEFAULT\_VERBOSITY](#default-verbosity)

 
  
`ANSIBLE_DEPRECATION_WARNINGS`  
Toggle to control the showing of deprecation warnings

 See also [DEPRECATION\_WARNINGS](#deprecation-warnings)

 
  
`ANSIBLE_DEVEL_WARNING`  
Toggle to control showing warnings related to running devel

 See also [DEVEL\_WARNING](#devel-warning)

 
  
`ANSIBLE_DIFF_ALWAYS`  
Configuration toggle to tell modules to show differences when in ‘changed’ status, equivalent to `--diff`.

 See also [DIFF\_ALWAYS](#diff-always)

 
  
`ANSIBLE_DIFF_CONTEXT`  
How many lines of context to show when displaying the differences between files.

 See also [DIFF\_CONTEXT](#diff-context)

 
  
`ANSIBLE_DISPLAY_ARGS_TO_STDOUT`  
Normally `ansible-playbook` will print a header for each task that is run. These headers will contain the name: field from the task if you specified one. If you didn’t then `ansible-playbook` uses the task’s action to help you tell which task is presently running. Sometimes you run many of the same action and so you want more information about the task to differentiate it from others of the same action. If you set this variable to True in the config then `ansible-playbook` will also include the task’s arguments in the header.This setting defaults to False because there is a chance that you have sensitive values in your parameters and you do not want those to be printed.If you set this to True you should be sure that you have secured your environment’s stdout (no one can shoulder surf your screen and you aren’t saving stdout to an insecure file) or made sure that all of your playbooks explicitly added the `no_log: True` parameter to tasks which have sensitive values See How do I keep secret data in my playbook? for more information.

 See also [DISPLAY\_ARGS\_TO\_STDOUT](#display-args-to-stdout)

 
  
`DISPLAY_SKIPPED_HOSTS`  
Toggle to control displaying skipped task/host entries in a task in the default callback

 See also [DISPLAY\_SKIPPED\_HOSTS](#display-skipped-hosts)

  Deprecated in 
2.12

  Deprecated detail 
environment variables without `ANSIBLE_` prefix are deprecated

  Deprecated alternatives 
the `ANSIBLE_DISPLAY_SKIPPED_HOSTS` environment variable

   
  
`ANSIBLE_DISPLAY_SKIPPED_HOSTS`  
Toggle to control displaying skipped task/host entries in a task in the default callback

 See also [DISPLAY\_SKIPPED\_HOSTS](#display-skipped-hosts)

 
  
`ANSIBLE_DUPLICATE_YAML_DICT_KEY`  
By default Ansible will issue a warning when a duplicate dict key is encountered in YAML.These warnings can be silenced by adjusting this setting to False.

 See also [DUPLICATE\_YAML\_DICT\_KEY](#duplicate-yaml-dict-key)

 
  
`ANSIBLE_ERROR_ON_MISSING_HANDLER`  
Toggle to allow missing handlers to become a warning instead of an error when notifying.

 See also [ERROR\_ON\_MISSING\_HANDLER](#error-on-missing-handler)

 
  
`ANSIBLE_FACTS_MODULES`  
Which modules to run during a play’s fact gathering stage, using the default of ‘smart’ will try to figure it out based on connection type.

 See also [FACTS\_MODULES](#facts-modules)

 
  
`ANSIBLE_GALAXY_IGNORE`  
If set to yes, ansible-galaxy will not validate TLS certificates. This can be useful for testing against a server with a self-signed certificate.

 See also [GALAXY\_IGNORE\_CERTS](#galaxy-ignore-certs)

 
  
`ANSIBLE_GALAXY_ROLE_SKELETON`  
Role or collection skeleton directory to use as a template for the `init` action in `ansible-galaxy`, same as `--role-skeleton`.

 See also [GALAXY\_ROLE\_SKELETON](#galaxy-role-skeleton)

 
  
`ANSIBLE_GALAXY_ROLE_SKELETON_IGNORE`  
patterns of files to ignore inside a Galaxy role or collection skeleton directory

 See also [GALAXY\_ROLE\_SKELETON\_IGNORE](#galaxy-role-skeleton-ignore)

 
  
`ANSIBLE_GALAXY_SERVER`  
URL to prepend when roles don’t specify the full URI, assume they are referencing this server as the source.

 See also [GALAXY\_SERVER](#galaxy-server)

 
  
`ANSIBLE_GALAXY_SERVER_LIST`  
A list of Galaxy servers to use when installing a collection.The value corresponds to the config ini header `[galaxy_server.{{item}}]` which defines the server details.See [Configuring the ansible-galaxy client](../user_guide/collections_using#galaxy-server-config) for more details on how to define a Galaxy server.The order of servers in this list is used to as the order in which a collection is resolved.Setting this config option will ignore the [GALAXY\_SERVER](#galaxy-server) config option.

 See also [GALAXY\_SERVER\_LIST](#galaxy-server-list)

 
  
`ANSIBLE_GALAXY_TOKEN_PATH`  
Local path to galaxy access token file

 See also [GALAXY\_TOKEN\_PATH](#galaxy-token-path)

 
  
`ANSIBLE_GALAXY_DISPLAY_PROGRESS`  
Some steps in `ansible-galaxy` display a progress wheel which can cause issues on certain displays or when outputing the stdout to a file.This config option controls whether the display wheel is shown or not.The default is to show the display wheel if stdout has a tty.

 See also [GALAXY\_DISPLAY\_PROGRESS](#galaxy-display-progress)

 
  
`ANSIBLE_GALAXY_CACHE_DIR`  
The directory that stores cached responses from a Galaxy server.This is only used by the `ansible-galaxy collection install` and `download` commands.Cache files inside this dir will be ignored if they are world writable.

 See also [GALAXY\_CACHE\_DIR](#galaxy-cache-dir)

 
  
`ANSIBLE_HOST_KEY_CHECKING`  
Set this to “False” if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host

 See also [HOST\_KEY\_CHECKING](#host-key-checking)

 
  
`ANSIBLE_HOST_PATTERN_MISMATCH`  
This setting changes the behaviour of mismatched host patterns, it allows you to force a fatal error, a warning or just ignore it

 See also [HOST\_PATTERN\_MISMATCH](#host-pattern-mismatch)

 
  
`ANSIBLE_PYTHON_INTERPRETER`  
Path to the Python interpreter to be used for module execution on remote targets, or an automatic discovery mode. Supported discovery modes are `auto`, `auto_silent`, and `auto_legacy` (the default). All discovery modes employ a lookup table to use the included system Python (on distributions known to include one), falling back to a fixed ordered list of well-known Python interpreter locations if a platform-specific default is not available. The fallback behavior will issue a warning that the interpreter should be set explicitly (since interpreters installed later may change which one is used). This warning behavior can be disabled by setting `auto_silent`. The default value of `auto_legacy` provides all the same behavior, but for backwards-compatibility with older Ansible releases that always defaulted to `/usr/bin/python`, will use that interpreter if present (and issue a warning that the default behavior will change to that of `auto` in a future Ansible release.

 See also [INTERPRETER\_PYTHON](#interpreter-python)

 
  
`ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS`  
Make ansible transform invalid characters in group names supplied by inventory sources.If ‘never’ it will allow for the group name but warn about the issue.When ‘ignore’, it does the same as ‘never’, without issuing a warning.When ‘always’ it will replace any invalid characters with ‘\_’ (underscore) and warn the userWhen ‘silently’, it does the same as ‘always’, without issuing a warning.

 See also [TRANSFORM\_INVALID\_GROUP\_CHARS](#transform-invalid-group-chars)

 
  
`ANSIBLE_INVALID_TASK_ATTRIBUTE_FAILED`  
If ‘false’, invalid attributes for a task will result in warnings instead of errors

 See also [INVALID\_TASK\_ATTRIBUTE\_FAILED](#invalid-task-attribute-failed)

 
  
`ANSIBLE_INVENTORY_ANY_UNPARSED_IS_FAILED`  
If ‘true’, it is a fatal error when any given inventory source cannot be successfully parsed by any available inventory plugin; otherwise, this situation only attracts a warning.

 See also [INVENTORY\_ANY\_UNPARSED\_IS\_FAILED](#inventory-any-unparsed-is-failed)

 
  
`ANSIBLE_INVENTORY_CACHE`  
Toggle to turn on inventory caching

 See also [INVENTORY\_CACHE\_ENABLED](#inventory-cache-enabled)

 
  
`ANSIBLE_INVENTORY_CACHE_PLUGIN`  
The plugin for caching inventory. If INVENTORY\_CACHE\_PLUGIN is not provided CACHE\_PLUGIN can be used instead.

 See also [INVENTORY\_CACHE\_PLUGIN](#inventory-cache-plugin)

 
  
`ANSIBLE_INVENTORY_CACHE_CONNECTION`  
The inventory cache connection. If INVENTORY\_CACHE\_PLUGIN\_CONNECTION is not provided CACHE\_PLUGIN\_CONNECTION can be used instead.

 See also [INVENTORY\_CACHE\_PLUGIN\_CONNECTION](#inventory-cache-plugin-connection)

 
  
`ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX`  
The table prefix for the cache plugin. If INVENTORY\_CACHE\_PLUGIN\_PREFIX is not provided CACHE\_PLUGIN\_PREFIX can be used instead.

 See also [INVENTORY\_CACHE\_PLUGIN\_PREFIX](#inventory-cache-plugin-prefix)

 
  
`ANSIBLE_INVENTORY_CACHE_TIMEOUT`  
Expiration timeout for the inventory cache plugin data. If INVENTORY\_CACHE\_TIMEOUT is not provided CACHE\_TIMEOUT can be used instead.

 See also [INVENTORY\_CACHE\_TIMEOUT](#inventory-cache-timeout)

 
  
`ANSIBLE_INVENTORY_ENABLED`  
List of enabled inventory plugins, it also determines the order in which they are used.

 See also [INVENTORY\_ENABLED](#inventory-enabled)

 
  
`ANSIBLE_INVENTORY_EXPORT`  
Controls if ansible-inventory will accurately reflect Ansible’s view into inventory or its optimized for exporting.

 See also [INVENTORY\_EXPORT](#inventory-export)

 
  
`ANSIBLE_INVENTORY_IGNORE`  
List of extensions to ignore when using a directory as an inventory source

 See also [INVENTORY\_IGNORE\_EXTS](#inventory-ignore-exts)

 
  
`ANSIBLE_INVENTORY_IGNORE_REGEX`  
List of patterns to ignore when using a directory as an inventory source

 See also [INVENTORY\_IGNORE\_PATTERNS](#inventory-ignore-patterns)

 
  
`ANSIBLE_INVENTORY_UNPARSED_FAILED`  
If ‘true’ it is a fatal error if every single potential inventory source fails to parse, otherwise this situation will only attract a warning.

 See also [INVENTORY\_UNPARSED\_IS\_FAILED](#inventory-unparsed-is-failed)

 
  
`ANSIBLE_MAX_DIFF_SIZE`  
Maximum size of files to be considered for diff display

 See also [MAX\_FILE\_SIZE\_FOR\_DIFF](#max-file-size-for-diff)

 
  
`NETWORK_GROUP_MODULES`  
See also [NETWORK\_GROUP\_MODULES](#network-group-modules)

  Deprecated in 
2.12

  Deprecated detail 
environment variables without `ANSIBLE_` prefix are deprecated

  Deprecated alternatives 
the `ANSIBLE_NETWORK_GROUP_MODULES` environment variable

   
  
`ANSIBLE_NETWORK_GROUP_MODULES`  
See also [NETWORK\_GROUP\_MODULES](#network-group-modules)

 
  
`ANSIBLE_INJECT_FACT_VARS`  
Facts are available inside the `ansible_facts` variable, this setting also pushes them as their own vars in the main namespace.Unlike inside the `ansible_facts` dictionary, these will have an `ansible_` prefix.

 See also [INJECT\_FACTS\_AS\_VARS](#inject-facts-as-vars)

 
  
`ANSIBLE_MODULE_IGNORE_EXTS`  
List of extensions to ignore when looking for modules to loadThis is for rejecting script and binary module fallback extensions

 See also [MODULE\_IGNORE\_EXTS](#module-ignore-exts)

 
  
`ANSIBLE_OLD_PLUGIN_CACHE_CLEAR`  
Previouslly Ansible would only clear some of the plugin loading caches when loading new roles, this led to some behaviours in which a plugin loaded in prevoius plays would be unexpectedly ‘sticky’. This setting allows to return to that behaviour.

 See also [OLD\_PLUGIN\_CACHE\_CLEARING](#old-plugin-cache-clearing)

 
  
`ANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD`  
See also [PARAMIKO\_HOST\_KEY\_AUTO\_ADD](#paramiko-host-key-auto-add)

 
  
`ANSIBLE_PARAMIKO_LOOK_FOR_KEYS`  
See also [PARAMIKO\_LOOK\_FOR\_KEYS](#paramiko-look-for-keys)

 
  
`ANSIBLE_PERSISTENT_CONTROL_PATH_DIR`  
Path to socket to be used by the connection persistence system.

 See also [PERSISTENT\_CONTROL\_PATH\_DIR](#persistent-control-path-dir)

 
  
`ANSIBLE_PERSISTENT_CONNECT_TIMEOUT`  
This controls how long the persistent connection will remain idle before it is destroyed.

 See also [PERSISTENT\_CONNECT\_TIMEOUT](#persistent-connect-timeout)

 
  
`ANSIBLE_PERSISTENT_CONNECT_RETRY_TIMEOUT`  
This controls the retry timeout for persistent connection to connect to the local domain socket.

 See also [PERSISTENT\_CONNECT\_RETRY\_TIMEOUT](#persistent-connect-retry-timeout)

 
  
`ANSIBLE_PERSISTENT_COMMAND_TIMEOUT`  
This controls the amount of time to wait for response from remote device before timing out persistent connection.

 See also [PERSISTENT\_COMMAND\_TIMEOUT](#persistent-command-timeout)

 
  
`ANSIBLE_PLAYBOOK_DIR`  
A number of non-playbook CLIs have a `--playbook-dir` argument; this sets the default value for it.

 See also [PLAYBOOK\_DIR](#playbook-dir)

 
  
`ANSIBLE_PLAYBOOK_VARS_ROOT`  
This sets which playbook dirs will be used as a root to process vars plugins, which includes finding host\_vars/group\_varsThe `top` option follows the traditional behaviour of using the top playbook in the chain to find the root directory.The `bottom` option follows the 2.4.0 behaviour of using the current playbook to find the root directory.The `all` option examines from the first parent to the current playbook.

 See also [PLAYBOOK\_VARS\_ROOT](#playbook-vars-root)

 
  
`ANSIBLE_PYTHON_MODULE_RLIMIT_NOFILE`  
Attempts to set RLIMIT\_NOFILE soft limit to the specified value when executing Python modules (can speed up subprocess usage on Python 2.x. See <https://bugs.python.org/issue11284>). The value will be limited by the existing hard limit. Default value of 0 does not attempt to adjust existing system-defined limits.

 See also [PYTHON\_MODULE\_RLIMIT\_NOFILE](#python-module-rlimit-nofile)

 
  
`ANSIBLE_RETRY_FILES_ENABLED`  
This controls whether a failed Ansible playbook should create a .retry file.

 See also [RETRY\_FILES\_ENABLED](#retry-files-enabled)

 
  
`ANSIBLE_RETRY_FILES_SAVE_PATH`  
This sets the path in which Ansible will save .retry files when a playbook fails and retry files are enabled.This file will be overwritten after each run with the list of failed hosts from all plays.

 See also [RETRY\_FILES\_SAVE\_PATH](#retry-files-save-path)

 
  
`ANSIBLE_RUN_VARS_PLUGINS`  
This setting can be used to optimize vars\_plugin usage depending on user’s inventory size and play selection.Setting to C(demand) will run vars\_plugins relative to inventory sources anytime vars are ‘demanded’ by tasks.Setting to C(start) will run vars\_plugins relative to inventory sources after importing that inventory source.

 See also [RUN\_VARS\_PLUGINS](#run-vars-plugins)

 
  
`ANSIBLE_SHOW_CUSTOM_STATS`  
This adds the custom stats set via the set\_stats plugin to the default output

 See also [SHOW\_CUSTOM\_STATS](#show-custom-stats)

 
  
`ANSIBLE_STRING_TYPE_FILTERS`  
This list of filters avoids ‘type conversion’ when templating variablesUseful when you want to avoid conversion into lists or dictionaries for JSON strings, for example.

 See also [STRING\_TYPE\_FILTERS](#string-type-filters)

 
  
`ANSIBLE_SYSTEM_WARNINGS`  
Allows disabling of warnings related to potential issues on the system running ansible itself (not on the managed hosts)These may include warnings about 3rd party packages or other conditions that should be resolved if possible.

 See also [SYSTEM\_WARNINGS](#system-warnings)

 
  
`ANSIBLE_RUN_TAGS`  
default list of tags to run in your plays, Skip Tags has precedence.

 See also [TAGS\_RUN](#tags-run)

 
  
`ANSIBLE_SKIP_TAGS`  
default list of tags to skip in your plays, has precedence over Run Tags

 See also [TAGS\_SKIP](#tags-skip)

 
  
`ANSIBLE_TASK_TIMEOUT`  
Set the maximum time (in seconds) that a task can run for.If set to 0 (the default) there is no timeout.

 See also [TASK\_TIMEOUT](#task-timeout)

 
  
`ANSIBLE_WORKER_SHUTDOWN_POLL_COUNT`  
The maximum number of times to check Task Queue Manager worker processes to verify they have exited cleanly.After this limit is reached any worker processes still running will be terminated.This is for internal use only.

 See also [WORKER\_SHUTDOWN\_POLL\_COUNT](#worker-shutdown-poll-count)

 
  
`ANSIBLE_WORKER_SHUTDOWN_POLL_DELAY`  
The number of seconds to sleep between polling loops when checking Task Queue Manager worker processes to verify they have exited cleanly.This is for internal use only.

 See also [WORKER\_SHUTDOWN\_POLL\_DELAY](#worker-shutdown-poll-delay)

 
  
`ANSIBLE_USE_PERSISTENT_CONNECTIONS`  
Toggles the use of persistence for connections.

 See also [USE\_PERSISTENT\_CONNECTIONS](#use-persistent-connections)

 
  
`ANSIBLE_VARS_ENABLED`  
Whitelist for variable plugins that require it.

 See also [VARIABLE\_PLUGINS\_ENABLED](#variable-plugins-enabled)

 
  
`ANSIBLE_PRECEDENCE`  
Allows to change the group variable precedence merge order.

 See also [VARIABLE\_PRECEDENCE](#variable-precedence)

 
  
`ANSIBLE_WIN_ASYNC_STARTUP_TIMEOUT`  
For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how long, in seconds, to wait for the task spawned by Ansible to connect back to the named pipe used on Windows systems. The default is 5 seconds. This can be too low on slower systems, or systems under heavy load.This is not the total time an async command can run for, but is a separate timeout to wait for an async command to start. The task will only start to be timed against its async\_timeout once it has connected to the pipe, so the overall maximum duration the task can take will be extended by the amount specified here.

 See also [WIN\_ASYNC\_STARTUP\_TIMEOUT](#win-async-startup-timeout)

 
  
`ANSIBLE_YAML_FILENAME_EXT`  
Check all of these extensions when looking for ‘variable’ files which should be YAML or JSON or vaulted versions of these.This affects vars\_files, include\_vars, inventory and vars plugins among others.

 See also [YAML\_FILENAME\_EXTENSIONS](#yaml-filename-extensions)

 
  
`ANSIBLE_NETCONF_SSH_CONFIG`  
This variable is used to enable bastion/jump host with netconf connection. If set to True the bastion/jump host ssh settings should be present in ~/.ssh/config file, alternatively it can be set to custom ssh configuration file path to read the bastion/jump host settings.

 See also [NETCONF\_SSH\_CONFIG](#netconf-ssh-config)

 
  
`ANSIBLE_STRING_CONVERSION_ACTION`  
Action to take when a module parameter value is converted to a string (this does not affect variables). For string parameters, values such as ‘1.00’, “[‘a’, ‘b’,]”, and ‘yes’, ‘y’, etc. will be converted by the YAML parser unless fully quoted.Valid options are ‘error’, ‘warn’, and ‘ignore’.Since 2.8, this option defaults to ‘warn’ but will change to ‘error’ in 2.12.

 See also [STRING\_CONVERSION\_ACTION](#string-conversion-action)

 
  
`ANSIBLE_VERBOSE_TO_STDERR`  
Force ‘verbose’ option to use stderr instead of stdout

 See also [VERBOSE\_TO\_STDERR](#verbose-to-stderr)

 


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/reference_appendices/config.html>

Build Your Inventory
====================

 Running a playbook without an inventory requires several command-line flags. Also, running a playbook against a single device is not a huge efficiency gain over making the same change manually. The next step to harnessing the full power of Ansible is to use an inventory file to organize your managed nodes into groups with information like the `ansible_network_os` and the SSH user. A fully-featured inventory file can serve as the source of truth for your network. Using an inventory file, a single playbook can maintain hundreds of network devices with a single command. This page shows you how to build an inventory file, step by step.

 * [Basic inventory](#basic-inventory)
* [Add variables to the inventory](#add-variables-to-the-inventory)
* [Group variables within inventory](#group-variables-within-inventory)
* [Variable syntax](#variable-syntax)
* [Group inventory by platform](#group-inventory-by-platform)
* [Verifying the inventory](#verifying-the-inventory)
* [Protecting sensitive variables with `ansible-vault`](#protecting-sensitive-variables-with-ansible-vault)

 Basic inventory
---------------

 First, group your inventory logically. Best practice is to group servers and network devices by their What (application, stack or microservice), Where (datacenter or region), and When (development stage):

 * **What**: db, web, leaf, spine
* **Where**: east, west, floor\_19, building\_A
* **When**: dev, test, staging, prod

 Avoid spaces, hyphens, and preceding numbers (use `floor_19`, not `19th_floor`) in your group names. Group names are case sensitive.

 This tiny example data center illustrates a basic group structure. You can group groups using the syntax `[metagroupname:children]` and listing groups as members of the metagroup. Here, the group `network` includes all leafs and all spines; the group `datacenter` includes all network devices plus all webservers.

 
```
---

leafs:
  hosts:
    leaf01:
      ansible_host: 10.16.10.11
    leaf02:
      ansible_host: 10.16.10.12

spines:
  hosts:
    spine01:
      ansible_host: 10.16.10.13
    spine02:
      ansible_host: 10.16.10.14

network:
  children:
    leafs:
    spines:

webservers:
  hosts:
    webserver01:
      ansible_host: 10.16.10.15
    webserver02:
      ansible_host: 10.16.10.16

datacenter:
  children:
    network:
    webservers:

```
 You can also create this same inventory in INI format.

 
```
[leafs]
leaf01
leaf02

[spines]
spine01
spine02

[network:children]
leafs
spines

[webservers]
webserver01
webserver02

[datacenter:children]
network
webservers

```
 Add variables to the inventory
------------------------------

 Next, you can set values for many of the variables you needed in your first Ansible command in the inventory, so you can skip them in the `ansible-playbook` command. In this example, the inventory includes each network device’s IP, OS, and SSH user. If your network devices are only accessible by IP, you must add the IP to the inventory file. If you access your network devices using hostnames, the IP is not necessary.

 
```
---

leafs:
  hosts:
    leaf01:
      ansible_host: 10.16.10.11
      ansible_network_os: vyos.vyos.vyos
      ansible_user: my_vyos_user
    leaf02:
      ansible_host: 10.16.10.12
      ansible_network_os: vyos.vyos.vyos
      ansible_user: my_vyos_user

spines:
  hosts:
    spine01:
      ansible_host: 10.16.10.13
      ansible_network_os: vyos.vyos.vyos
      ansible_user: my_vyos_user
    spine02:
      ansible_host: 10.16.10.14
      ansible_network_os: vyos.vyos.vyos
      ansible_user: my_vyos_user

network:
  children:
    leafs:
    spines:

webservers:
  hosts:
    webserver01:
      ansible_host: 10.16.10.15
      ansible_user: my_server_user
    webserver02:
      ansible_host: 10.16.10.16
      ansible_user: my_server_user

datacenter:
  children:
    network:
    webservers:

```
 Group variables within inventory
--------------------------------

 When devices in a group share the same variable values, such as OS or SSH user, you can reduce duplication and simplify maintenance by consolidating these into group variables:

 
```
---

leafs:
  hosts:
    leaf01:
      ansible_host: 10.16.10.11
    leaf02:
      ansible_host: 10.16.10.12
  vars:
    ansible_network_os: vyos.vyos.vyos
    ansible_user: my_vyos_user

spines:
  hosts:
    spine01:
      ansible_host: 10.16.10.13
    spine02:
      ansible_host: 10.16.10.14
  vars:
    ansible_network_os: vyos.vyos.vyos
    ansible_user: my_vyos_user

network:
  children:
    leafs:
    spines:

webservers:
  hosts:
    webserver01:
      ansible_host: 10.16.10.15
    webserver02:
      ansible_host: 10.16.10.16
  vars:
    ansible_user: my_server_user

datacenter:
  children:
    network:
    webservers:

```
 Variable syntax
---------------

 The syntax for variable values is different in inventory, in playbooks, and in the `group_vars` files, which are covered below. Even though playbook and `group_vars` files are both written in YAML, you use variables differently in each.

 * In an ini-style inventory file you **must** use the syntax `key=value` for variable values: `ansible_network_os=vyos.vyos.vyos`.
* In any file with the `.yml` or `.yaml` extension, including playbooks and `group_vars` files, you **must** use YAML syntax: `key: value`.
* In `group_vars` files, use the full `key` name: `ansible_network_os: vyos.vyos.vyos`.
* In playbooks, use the short-form `key` name, which drops the `ansible` prefix: `network_os: vyos.vyos.vyos`.

 Group inventory by platform
---------------------------

 As your inventory grows, you may want to group devices by platform. This allows you to specify platform-specific variables easily for all devices on that platform:

 
```
---

leafs:
  hosts:
    leaf01:
      ansible_host: 10.16.10.11
    leaf02:
      ansible_host: 10.16.10.12

spines:
  hosts:
    spine01:
      ansible_host: 10.16.10.13
    spine02:
      ansible_host: 10.16.10.14

network:
  children:
    leafs:
    spines:
  vars:
    ansible_connection: ansible.netcommon.network_cli
    ansible_network_os: vyos.vyos.vyos
    ansible_user: my_vyos_user

webservers:
  hosts:
    webserver01:
      ansible_host: 10.16.10.15
    webserver02:
      ansible_host: 10.16.10.16
  vars:
    ansible_user: my_server_user

datacenter:
  children:
    network:
    webservers:

```
 With this setup, you can run `first_playbook.yml` with only two flags:

 
```
ansible-playbook -i inventory.yml -k first_playbook.yml

```
 With the `-k` flag, you provide the SSH password(s) at the prompt. Alternatively, you can store SSH and other secrets and passwords securely in your group\_vars files with `ansible-vault`. See [Protecting sensitive variables with ansible-vault](#network-vault) for details.

 Verifying the inventory
-----------------------

 You can use the [ansible-inventory](../../cli/ansible-inventory#ansible-inventory) CLI command to display the inventory as Ansible sees it.

 
```
$ ansible-inventory -i test.yml --list
  {
    "_meta": {
        "hostvars": {
            "leaf01": {
                "ansible_connection": "ansible.netcommon.network_cli",
                "ansible_host": "10.16.10.11",
                "ansible_network_os": "vyos.vyos.vyos",
                "ansible_user": "my_vyos_user"
            },
            "leaf02": {
                "ansible_connection": "ansible.netcommon.network_cli",
                "ansible_host": "10.16.10.12",
                "ansible_network_os": "vyos.vyos.vyos",
                "ansible_user": "my_vyos_user"
            },
            "spine01": {
                "ansible_connection": "ansible.netcommon.network_cli",
                "ansible_host": "10.16.10.13",
                "ansible_network_os": "vyos.vyos.vyos",
                "ansible_user": "my_vyos_user"
            },
            "spine02": {
                "ansible_connection": "ansible.netcommon.network_cli",
                "ansible_host": "10.16.10.14",
                "ansible_network_os": "vyos.vyos.vyos",
                "ansible_user": "my_vyos_user"
            },
            "webserver01": {
                "ansible_host": "10.16.10.15",
                "ansible_user": "my_server_user"
            },
            "webserver02": {
                "ansible_host": "10.16.10.16",
                "ansible_user": "my_server_user"
            }
        }
    },
    "all": {
        "children": [
            "datacenter",
            "ungrouped"
        ]
    },
    "datacenter": {
        "children": [
            "network",
            "webservers"
        ]
    },
    "leafs": {
        "hosts": [
            "leaf01",
            "leaf02"
        ]
    },
    "network": {
        "children": [
            "leafs",
            "spines"
        ]
    },
    "spines": {
        "hosts": [
            "spine01",
            "spine02"
        ]
    },
    "webservers": {
        "hosts": [
            "webserver01",
            "webserver02"
        ]
    }
  }

```
 Protecting sensitive variables with `ansible-vault`
---------------------------------------------------

 The `ansible-vault` command provides encryption for files and/or individual variables like passwords. This tutorial will show you how to encrypt a single SSH password. You can use the commands below to encrypt other sensitive information, such as database passwords, privilege-escalation passwords and more.

 First you must create a password for ansible-vault itself. It is used as the encryption key, and with this you can encrypt dozens of different passwords across your Ansible project. You can access all those secrets (encrypted values) with a single password (the ansible-vault password) when you run your playbooks. Here’s a simple example.

 1. Create a file and write your password for ansible-vault to it:

 
```
echo "my-ansible-vault-pw" > ~/my-ansible-vault-pw-file

```
 2. Create the encrypted ssh password for your VyOS network devices, pulling your ansible-vault password from the file you just created:

 
```
ansible-vault encrypt_string --vault-id my_user@~/my-ansible-vault-pw-file 'VyOS_SSH_password' --name 'ansible_password'

```
 If you prefer to type your ansible-vault password rather than store it in a file, you can request a prompt:

 
```
ansible-vault encrypt_string --vault-id my_user@prompt 'VyOS_SSH_password' --name 'ansible_password'

```
 and type in the vault password for `my_user`.

 The [`--vault-id`](../../cli/ansible-playbook#cmdoption-ansible-playbook-vault-id) flag allows different vault passwords for different users or different levels of access. The output includes the user name `my_user` from your `ansible-vault` command and uses the YAML syntax `key: value`:

 
```
ansible_password: !vault |
       $ANSIBLE_VAULT;1.2;AES256;my_user
       66386134653765386232383236303063623663343437643766386435663632343266393064373933
       3661666132363339303639353538316662616638356631650a316338316663666439383138353032
       63393934343937373637306162366265383461316334383132626462656463363630613832313562
       3837646266663835640a313164343535316666653031353763613037656362613535633538386539
       65656439626166666363323435613131643066353762333232326232323565376635
Encryption successful

```
 This is an example using an extract from a YAML inventory, as the INI format does not support inline vaults:

 
```
...

vyos: # this is a group in yaml inventory, but you can also do under a host
  vars:
    ansible_connection: ansible.netcommon.network_cli
    ansible_network_os: vyos.vyos.vyos
    ansible_user: my_vyos_user
    ansible_password:  !vault |
         $ANSIBLE_VAULT;1.2;AES256;my_user
         66386134653765386232383236303063623663343437643766386435663632343266393064373933
         3661666132363339303639353538316662616638356631650a316338316663666439383138353032
         63393934343937373637306162366265383461316334383132626462656463363630613832313562
         3837646266663835640a313164343535316666653031353763613037656362613535633538386539
         65656439626166666363323435613131643066353762333232326232323565376635

 ...

```
 To use an inline vaulted variables with an INI inventory you need to store it in a ‘vars’ file in YAML format, it can reside in host\_vars/ or group\_vars/ to be automatically picked up or referenced from a play via `vars_files` or `include_vars`.

 To run a playbook with this setup, drop the `-k` flag and add a flag for your `vault-id`:

 
```
ansible-playbook -i inventory --vault-id my_user@~/my-ansible-vault-pw-file first_playbook.yml

```
 Or with a prompt instead of the vault password file:

 
```
ansible-playbook -i inventory --vault-id my_user@prompt first_playbook.yml

```
 To see the original value, you can use the debug module. Please note if your YAML file defines the `ansible_connection` variable (as we used in our example), it will take effect when you execute the command below. To prevent this, please make a copy of the file without the ansible\_connection variable.

 
```
cat vyos.yml | grep -v ansible_connection >> vyos_no_connection.yml

ansible localhost -m debug -a var="ansible_password" -e "@vyos_no_connection.yml" --ask-vault-pass
Vault password:

localhost | SUCCESS => {
    "ansible_password": "VyOS_SSH_password"
}

```
  Warning

 Vault content can only be decrypted with the password that was used to encrypt it. If you want to stop using one password and move to a new one, you can update and re-encrypt existing vault content with `ansible-vault rekey myfile`, then provide the old password and the new password. Copies of vault content still encrypted with the old password can still be decrypted with old password.

  For more details on building inventory files, see [the introduction to inventory](../../user_guide/intro_inventory#intro-inventory); for more details on ansible-vault, see [the full Ansible Vault documentation](../../user_guide/vault#vault).

 Now that you understand the basics of commands, playbooks, and inventory, it’s time to explore some more complex Ansible Network examples.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/getting_started/first_inventory.html>

Use Ansible network roles
=========================

 Roles are sets of Ansible defaults, files, tasks, templates, variables, and other Ansible components that work together. As you saw on [Run Your First Command and Playbook](first_playbook#first-network-playbook), moving from a command to a playbook makes it easy to run multiple tasks and repeat the same tasks in the same order. Moving from a playbook to a role makes it even easier to reuse and share your ordered tasks. You can look at [Ansible Galaxy](../../galaxy/user_guide#ansible-galaxy), which lets you share your roles and use others’ roles, either directly or as inspiration.

 * [A sample DNS playbook](#a-sample-dns-playbook)
* [Convert the playbook into a role](#convert-the-playbook-into-a-role)
* [Variable precedence](#variable-precedence)


	+ [Lowest precedence](#lowest-precedence)
	+ [Highest precedence](#highest-precedence)
* [Update an installed role](#update-an-installed-role)


Understanding roles
-------------------

 So what exactly is a role, and why should you care? Ansible roles are basically playbooks broken up into a known file structure. Moving to roles from a playbook makes sharing, reading, and updating your Ansible workflow easier. Users can write their own roles. So for example, you don’t have to write your own DNS playbook. Instead, you specify a DNS server and a role to configure it for you.

 To simplify your workflow even further, the Ansible Network team has written a series of roles for common network use cases. Using these roles means you don’t have to reinvent the wheel. Instead of writing and maintaining your own `create_vlan` playbooks or roles, you can concentrate on designing, codifying and maintaining the parser templates that describe your network topologies and inventory, and let Ansible’s network roles do the work. See the [network-related roles](https://galaxy.ansible.com/ansible-network) on Ansible Galaxy.

 ### A sample DNS playbook

 To demonstrate the concept of what a role is, the example `playbook.yml` below is a single YAML file containing a two-task playbook. This Ansible Playbook configures the hostname on a Cisco IOS XE device, then it configures the DNS (domain name system) servers.

 
```
---
- name: configure cisco routers
  hosts: routers
  connection: ansible.netcommon.network_cli
  gather_facts: no
  vars:
    dns: "8.8.8.8 8.8.4.4"

  tasks:
   - name: configure hostname
     cisco.ios.ios_config:
       lines: hostname {{ inventory_hostname }}

   - name: configure DNS
     cisco.ios.ios_config:
       lines: ip name-server {{dns}}

```
 If you run this playbook using the `ansible-playbook` command, you’ll see the output below. This example used `-l` option to limit the playbook to only executing on the **rtr1** node.

 
```
[user@ansible ~]$ ansible-playbook playbook.yml -l rtr1

PLAY [configure cisco routers] *************************************************

TASK [configure hostname] ******************************************************
changed: [rtr1]

TASK [configure DNS] ***********************************************************
changed: [rtr1]

PLAY RECAP *********************************************************************
rtr1                       : ok=2    changed=2    unreachable=0    failed=0

```
 This playbook configured the hostname and DNS servers. You can verify that configuration on the Cisco IOS XE **rtr1** router:

 
```
rtr1#sh run | i name
hostname rtr1
ip name-server 8.8.8.8 8.8.4.4

```
 ### Convert the playbook into a role

 The next step is to convert this playbook into a reusable role. You can create the directory structure manually, or you can use `ansible-galaxy init` to create the standard framework for a role.

 
```
[user@ansible ~]$ ansible-galaxy init system-demo
[user@ansible ~]$ cd system-demo/
[user@ansible system-demo]$ tree
.
├── defaults
│   └── main.yml
├── files
├── handlers
│   └── main.yml
├── meta
│   └── main.yml
├── README.md
├── tasks
│   └── main.yml
├── templates
├── tests
│   ├── inventory
│   └── test.yml
└── vars
  └── main.yml

```
 This first demonstration uses only the **tasks** and **vars** directories. The directory structure would look as follows:

 
```
[user@ansible system-demo]$ tree
.
├── tasks
│   └── main.yml
└── vars
    └── main.yml

```
 Next, move the content of the `vars` and `tasks` sections from the original Ansible Playbook into the role. First, move the two tasks into the `tasks/main.yml` file:

 
```
[user@ansible system-demo]$ cat tasks/main.yml
---
- name: configure hostname
  cisco.ios.ios_config:
    lines: hostname {{ inventory_hostname }}

- name: configure DNS
  cisco.ios.ios_config:
    lines: ip name-server {{dns}}

```
 Next, move the variables into the `vars/main.yml` file:

 
```
[user@ansible system-demo]$ cat vars/main.yml
---
dns: "8.8.8.8 8.8.4.4"

```
 Finally, modify the original Ansible Playbook to remove the `tasks` and `vars` sections and add the keyword `roles` with the name of the role, in this case `system-demo`. You’ll have this playbook:

 
```
---
- name: configure cisco routers
  hosts: routers
  connection: ansible.netcommon.network_cli
  gather_facts: no

  roles:
    - system-demo

```
 To summarize, this demonstration now has a total of three directories and three YAML files. There is the `system-demo` folder, which represents the role. This `system-demo` contains two folders, `tasks` and `vars`. There is a `main.yml` is each respective folder. The `vars/main.yml` contains the variables from `playbook.yml`. The `tasks/main.yml` contains the tasks from `playbook.yml`. The `playbook.yml` file has been modified to call the role rather than specifying vars and tasks directly. Here is a tree of the current working directory:

 
```
[user@ansible ~]$ tree
.
├── playbook.yml
└── system-demo
    ├── tasks
    │   └── main.yml
    └── vars
        └── main.yml

```
 Running the playbook results in identical behavior with slightly different output:

 
```
[user@ansible ~]$ ansible-playbook playbook.yml -l rtr1

PLAY [configure cisco routers] *************************************************

TASK [system-demo : configure hostname] ****************************************
ok: [rtr1]

TASK [system-demo : configure DNS] *********************************************
ok: [rtr1]

PLAY RECAP *********************************************************************
rtr1             : ok=2    changed=0    unreachable=0    failed=0

```
 As seen above each task is now prepended with the role name, in this case `system-demo`. When running a playbook that contains several roles, this will help pinpoint where a task is being called from. This playbook returned `ok` instead of `changed` because it has identical behavior for the single file playbook we started from.

 As before, the playbook will generate the following configuration on a Cisco IOS-XE router:

 
```
rtr1#sh run | i name
hostname rtr1
ip name-server 8.8.8.8 8.8.4.4

```
 This is why Ansible roles can be simply thought of as deconstructed playbooks. They are simple, effective and reusable. Now another user can simply include the `system-demo` role instead of having to create a custom “hard coded” playbook.

 ### Variable precedence

 What if you want to change the DNS servers? You aren’t expected to change the `vars/main.yml` within the role structure. Ansible has many places where you can specify variables for a given play. See [Using Variables](../../user_guide/playbooks_variables#playbooks-variables) for details on variables and precedence. There are actually 21 places to put variables. While this list can seem overwhelming at first glance, the vast majority of use cases only involve knowing the spot for variables of least precedence and how to pass variables with most precedence. See [Variable precedence: Where should I put a variable?](../../user_guide/playbooks_variables#ansible-variable-precedence) for more guidance on where you should put variables.

 #### Lowest precedence

 The lowest precedence is the `defaults` directory within a role. This means all the other 20 locations you could potentially specify the variable will all take higher precedence than `defaults`, no matter what. To immediately give the vars from the `system-demo` role the least precedence, rename the `vars` directory to `defaults`.

 
```
[user@ansible system-demo]$ mv vars defaults
[user@ansible system-demo]$ tree
.
├── defaults
│   └── main.yml
├── tasks
│   └── main.yml

```
 Add a new `vars` section to the playbook to override the default behavior (where the variable `dns` is set to 8.8.8.8 and 8.8.4.4). For this demonstration, set `dns` to 1.1.1.1, so `playbook.yml` becomes:

 
```
---
- name: configure cisco routers
  hosts: routers
  connection: ansible.netcommon.network_cli
  gather_facts: no
  vars:
    dns: 1.1.1.1
  roles:
    - system-demo

```
 Run this updated playbook on **rtr2**:

 
```
[user@ansible ~]$ ansible-playbook playbook.yml -l rtr2

```
 The configuration on the **rtr2** Cisco router will look as follows:

 
```
rtr2#sh run | i name-server
ip name-server 1.1.1.1

```
 The variable configured in the playbook now has precedence over the `defaults` directory. In fact, any other spot you configure variables would win over the values in the `defaults` directory.

 #### Highest precedence

 Specifying variables in the `defaults` directory within a role will always take the lowest precedence, while specifying `vars` as extra vars with the `-e` or `--extra-vars=` will always take the highest precedence, no matter what. Re-running the playbook with the `-e` option overrides both the `defaults` directory (8.8.4.4 and 8.8.8.8) as well as the newly created `vars` within the playbook that contains the 1.1.1.1 dns server.

 
```
[user@ansible ~]$ ansible-playbook playbook.yml -e "dns=192.168.1.1" -l rtr3

```
 The result on the Cisco IOS XE router will only contain the highest precedence setting of 192.168.1.1:

 
```
rtr3#sh run | i name-server
ip name-server 192.168.1.1

```
 How is this useful? Why should you care? Extra vars are commonly used by network operators to override defaults. A powerful example of this is with the Job Template Survey feature on AWX or the [Red Hat Ansible Automation Platform](https://docs.ansible.com/ansible/latest/reference_appendices/tower.html#ansible-platform). It is possible through the web UI to prompt a network operator to fill out parameters with a Web form. This can be really simple for non-technical playbook writers to execute a playbook using their Web browser.

 ### Update an installed role

 The Ansible Galaxy page for a role lists all available versions. To update a locally installed role to a new or different version, use the `ansible-galaxy install` command with the version and `--force` option. You may also need to manually update any dependent roles to support this version. See the role **Read Me** tab in Galaxy for dependent role minimum version requirements.

 
```
[user@ansible]$ ansible-galaxy install mynamespace.my_role,v2.7.1 --force

```
  See also

  [Ansible Galaxy documentation](https://galaxy.ansible.com/docs/)

Ansible Galaxy user guide

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/getting_started/network_roles.html>

Beyond the basics
=================

 This page introduces some concepts that help you manage your Ansible workflow with directory structure and source control. Like the Basic Concepts at the beginning of this guide, these intermediate concepts are common to all uses of Ansible.

 * [A typical Ansible filetree](#a-typical-ansible-filetree)
* [Tracking changes to inventory and playbooks: source control with git](#tracking-changes-to-inventory-and-playbooks-source-control-with-git)

 A typical Ansible filetree
--------------------------

 Ansible expects to find certain files in certain places. As you expand your inventory and create and run more network playbooks, keep your files organized in your working Ansible project directory like this:

 
```
.
├── backup
│   ├── vyos.example.net_config.2018-02-08@11:10:15
│   ├── vyos.example.net_config.2018-02-12@08:22:41
├── first_playbook.yml
├── inventory
├── group_vars
│   ├── vyos.yml
│   └── eos.yml
├── roles
│   ├── static_route
│   └── system
├── second_playbook.yml
└── third_playbook.yml

```
 The `backup` directory and the files in it get created when you run modules like `vyos_config` with the `backup: yes` parameter.

 Tracking changes to inventory and playbooks: source control with git
--------------------------------------------------------------------

 As you expand your inventory, roles and playbooks, you should place your Ansible projects under source control. We recommend `git` for source control. `git` provides an audit trail, letting you track changes, roll back mistakes, view history and share the workload of managing, maintaining and expanding your Ansible ecosystem. There are plenty of tutorials and guides to using `git` available.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/getting_started/intermediate_concepts.html>

Working with network connection options
=======================================

 Network modules can support multiple connection protocols, such as `ansible.netcommon.network_cli`, `ansible.netcommon.netconf`, and `ansible.netcommon.httpapi`. These connections include some common options you can set to control how the connection to your network device behaves.

 Common options are:

 * `become` and `become_method` as described in [Privilege Escalation: enable mode, become, and authorize](network_differences#privilege-escalation).
* `network_os` - set to match your network platform you are communicating with. See the [platform-specific](../user_guide/platform_index#platform-options) pages.
* `remote_user` as described in [Setting a remote user](../../user_guide/connection_details#connection-set-user).
* Timeout options - `persistent_command_timeout`, `persistent_connect_timeout`, and `timeout`.

 Setting timeout options
-----------------------

 When communicating with a remote device, you have control over how long Ansible maintains the connection to that device, as well as how long Ansible waits for a command to complete on that device. Each of these options can be set as variables in your playbook files, environment variables, or settings in your [ansible.cfg file](../../reference_appendices/config#ansible-configuration-settings).

 For example, the three options for controlling the connection timeout are as follows.

 Using vars (per task):

 
```
- name: save running-config
  cisco.ios.ios_command:
    commands: copy running-config startup-config
    vars:
      ansible_command_timeout: 30

```
 Using the environment variable:

 
```
$export ANSIBLE_PERSISTENT_COMMAND_TIMEOUT=30

```
 Using the global configuration (in `ansible.cfg`)

 
```
[persistent_connection ]
command_timeout = 30

```
 See [Variable precedence: Where should I put a variable?](../../user_guide/playbooks_variables#ansible-variable-precedence) for details on the relative precedence of each of these variables. See the individual connection type to understand each option.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/getting_started/network_connection_options.html>

Resources and next steps
========================

 * [Documents](#documents)
* [Events (on video and in person)](#events-on-video-and-in-person)
* [GitHub repos](#github-repos)
* [IRC and Slack](#irc-and-slack)

 Documents
---------

 Read more about Ansible for Network Automation:

 * Network Automation on the [Ansible website](https://www.ansible.com/overview/networking)
* Ansible Network [Blog posts](https://www.ansible.com/blog/topic/networks)

 Events (on video and in person)
-------------------------------

 All sessions at Ansible events are recorded and include many Network-related topics (use Filter by Category to view only Network topics). You can also join us for future events in your area. See:

 * [Recorded AnsibleFests](https://www.ansible.com/resources/videos/ansiblefest)
* [Recorded AnsibleAutomates](https://www.ansible.com/resources/webinars-training)
* [Upcoming Ansible Events](https://www.ansible.com/community/events) page.

 GitHub repos
------------

 Ansible hosts module code, examples, demonstrations, and other content on GitHub. Anyone with a GitHub account is able to create Pull Requests (PRs) or issues on these repos:

 * [Network-Automation](https://github.com/network-automation) is an open community for all things network automation. Have an idea, some playbooks, or roles to share? Email [ansible-network@redhat.com](https://docs.ansible.com/cdn-cgi/l/email-protection#10717e6379727c753d7e7564677f627b363323272b363325222b363324282b627574787164363324262b737f7d) and we will add you as a contributor to the repository.
* [Ansible collections](https://github.com/ansible-collections) is the main repository for Ansible-maintained and community collections, including collections for network devices.

 IRC and Slack
-------------

 Join us on:

 * IRC Channel - `#ansible-network` on [irc.libera.chat](https://libera.chat/)
* Slack - <https://ansiblenetwork.slack.com>



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/getting_started/network_resources.html>

Network Resource Modules
========================

 Ansible network resource modules simplify and standardize how you manage different network devices. Network devices separate configuration into sections (such as interfaces and VLANs) that apply to a network service. Ansible network resource modules take advantage of this to allow you to configure subsections or *resources* within the network device configuration. Network resource modules provide a consistent experience across different network devices.

 * [Network resource module states](#network-resource-module-states)
* [Using network resource modules](#using-network-resource-modules)
* [Example: Verifying the network device configuration has not changed](#example-verifying-the-network-device-configuration-has-not-changed)
* [Example: Acquiring and updating VLANs on a network device](#example-acquiring-and-updating-vlans-on-a-network-device)

 Network resource module states
------------------------------

 You use the network resource modules by assigning a state to what you want the module to do. The resource modules support the following states:

  merged

Ansible merges the on-device configuration with the provided configuration in the task.

  replaced

Ansible replaces the on-device configuration subsection with the provided configuration subsection in the task.

  overridden

Ansible overrides the on-device configuration for the resource with the provided configuration in the task. Use caution with this state as you could remove your access to the device (for example, by overriding the management interface configuration).

  deleted

Ansible deletes the on-device configuration subsection and restores any default settings.

  gathered

Ansible displays the resource details gathered from the network device and accessed with the `gathered` key in the result.

  rendered

Ansible renders the provided configuration in the task in the device-native format (for example, Cisco IOS CLI). Ansible returns this rendered configuration in the `rendered` key in the result. Note this state does not communicate with the network device and can be used offline.

  parsed

Ansible parses the configuration from the `running_config` option into Ansible structured data in the `parsed` key in the result. Note this does not gather the configuration from the network device so this state can be used offline.

   Using network resource modules
------------------------------

 This example configures the L3 interface resource on a Cisco IOS device, based on different state settings.

 
```
- name: configure l3 interface
  cisco.ios.ios_l3_interfaces:
    config: "{{ config }}"
    state: <state>

```
 The following table shows an example of how an initial resource configuration changes with this task for different states.

 

| Resource starting configuration | task-provided configuration (YAML) | Final resource configuration on device |
| --- | --- | --- |
| 
```
interface loopback100
 ip address 10.10.1.100 255.255.255.0
 ipv6 address FC00:100/64

```
 | 
```
config:
- ipv6:
 - address: fc00::100/64
 - address: fc00::101/64
 name: loopback100

```
 |  *merged*


```
interface loopback100
 ip address 10.10.1.100 255.255.255.0
 ipv6 address FC00:100/64
 ipv6 address FC00:101/64

```
   |
|  *replaced*


```
interface loopback100
 no ip address
 ipv6 address FC00:100/64
 ipv6 address FC00:101/64

```
   |
|  *overridden*

Incorrect use case. This would remove all interfaces from the device  (including the mgmt interface) except

the configured loopback100   |
|  *deleted*


```
interface loopback100
 no ip address

```
   |

 Network resource modules return the following details:

 * The *before* state - the existing resource configuration before the task was executed.
* The *after* state - the new resource configuration that exists on the network device after the task was executed.
* Commands - any commands configured on the device.

 
```
ok: [nxos101] =>
  result:
    after:
      contact: IT Support
      location: Room E, Building 6, Seattle, WA 98134
      users:
      - algorithm: md5
        group: network-admin
        localized_key: true
        password: '0x73fd9a2cc8c53ed3dd4ed8f4ff157e69'
        privacy_password: '0x73fd9a2cc8c53ed3dd4ed8f4ff157e69'
        username: admin
    before:
      contact: IT Support
      location: Room E, Building 5, Seattle HQ
      users:
      - algorithm: md5
        group: network-admin
        localized_key: true
        password: '0x73fd9a2cc8c53ed3dd4ed8f4ff157e69'
        privacy_password: '0x73fd9a2cc8c53ed3dd4ed8f4ff157e69'
        username: admin
    changed: true
    commands:
    - snmp-server location Room E, Building 6, Seattle, WA 98134
    failed: false

```
 Example: Verifying the network device configuration has not changed
-------------------------------------------------------------------

 The following playbook uses the [arista.eos.eos\_l3\_interfaces](../../collections/arista/eos/eos_l3_interfaces_module#ansible-collections-arista-eos-eos-l3-interfaces-module) module to gather a subset of the network device configuration (Layer 3 interfaces only) and verifies the information is accurate and has not changed. This playbook passes the results of [arista.eos.eos\_facts](../../collections/arista/eos/eos_facts_module#ansible-collections-arista-eos-eos-facts-module) directly to the `arista.eos.eos_l3_interfaces` module.

 
```
- name: Example of facts being pushed right back to device.
  hosts: arista
  gather_facts: false
  tasks:
    - name: grab arista eos facts
      arista.eos.eos_facts:
        gather_subset: min
        gather_network_resources: l3_interfaces

- name: Ensure that the IP address information is accurate.
  arista.eos.eos_l3_interfaces:
    config: "{{ ansible_network_resources['l3_interfaces'] }}"
    register: result

- name: Ensure config did not change.
  assert:
    that: not result.changed

```
 Example: Acquiring and updating VLANs on a network device
---------------------------------------------------------

 This example shows how you can use resource modules to:

 1. Retrieve the current configuration on a network device.
2. Save that configuration locally.
3. Update that configuration and apply it to the network device.

 This example uses the `cisco.ios.ios_vlans` resource module to retrieve and update the VLANs on an IOS device.

 1. Retrieve the current IOS VLAN configuration:

 
```
- name: Gather VLAN information as structured data
  cisco.ios.ios_facts:
     gather_subset:
      - '!all'
      - '!min'
     gather_network_resources:
     - 'vlans'

```
 2. Store the VLAN configuration locally:

 
```
- name: Store VLAN facts to host_vars
  copy:
    content: "{{ ansible_network_resources | to_nice_yaml }}"
    dest: "{{ playbook_dir }}/host_vars/{{ inventory_hostname }}"

```
 3. Modify the stored file to update the VLAN configuration locally.
4. Merge the updated VLAN configuration with the existing configuration on the device:

 
```
- name: Make VLAN config changes by updating stored facts on the controller.
  cisco.ios.ios_vlans:
    config: "{{ vlans }}"
    state: merged
  tags: update_config

```
  See also

  [Network Features in Ansible 2.9](https://www.ansible.com/blog/network-features-coming-soon-in-ansible-engine-2.9)

A introductory blog post on network resource modules.

  [Deep Dive into Network Resource Modules](https://www.ansible.com/deep-dive-into-ansible-network-resource-module)

A deeper dive presentation into network resource modules.

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/network_resource_modules.html>

Network Debug and Troubleshooting Guide
=======================================

 This section discusses how to debug and troubleshoot network modules in Ansible.

 * [How to troubleshoot](#how-to-troubleshoot)


	+ [Enabling Networking logging and how to read the logfile](#enabling-networking-logging-and-how-to-read-the-logfile)
	+ [Enabling Networking device interaction logging](#enabling-networking-device-interaction-logging)
	+ [Isolating an error](#isolating-an-error)
* [Troubleshooting socket path issues](#troubleshooting-socket-path-issues)
* [Category “Unable to open shell”](#category-unable-to-open-shell)


	+ [Error: “[Errno -2] Name or service not known”](#error-errno-2-name-or-service-not-known)
	+ [Error: “Authentication failed”](#error-authentication-failed)
	+ [Error: “connecting to host <hostname> returned an error” or “Bad address”](#error-connecting-to-host-hostname-returned-an-error-or-bad-address)
	+ [Error: “No authentication methods available”](#error-no-authentication-methods-available)
	+ [Clearing Out Persistent Connections](#clearing-out-persistent-connections)
* [Timeout issues](#timeout-issues)


	+ [Persistent connection idle timeout](#persistent-connection-idle-timeout)
	+ [Command timeout](#command-timeout)
	+ [Persistent connection retry timeout](#persistent-connection-retry-timeout)
	+ [Timeout issue due to platform specific login menu with `network_cli` connection type](#timeout-issue-due-to-platform-specific-login-menu-with-network-cli-connection-type)
* [Playbook issues](#playbook-issues)


	+ [Error: “Unable to enter configuration mode”](#error-unable-to-enter-configuration-mode)
* [Proxy Issues](#proxy-issues)


	+ [delegate\_to vs ProxyCommand](#delegate-to-vs-proxycommand)
	+ [Using bastion/jump host with netconf connection](#using-bastion-jump-host-with-netconf-connection)
	+ [Enabling jump host setting](#enabling-jump-host-setting)
	+ [Example ssh config file (~/.ssh/config)](#example-ssh-config-file-ssh-config)
* [Miscellaneous Issues](#miscellaneous-issues)


	+ [Intermittent failure while using `ansible.netcommon.network_cli` connection type](#intermittent-failure-while-using-ansible-netcommon-network-cli-connection-type)
	+ [Task failure due to mismatched error regex within command response using `ansible.netcommon.network_cli` connection type](#task-failure-due-to-mismatched-error-regex-within-command-response-using-ansible-netcommon-network-cli-connection-type)
	+ [Intermittent failure while using `ansible.netcommon.network_cli` connection type due to slower network or remote target host](#intermittent-failure-while-using-ansible-netcommon-network-cli-connection-type-due-to-slower-network-or-remote-target-host)

 How to troubleshoot
-------------------

 Ansible network automation errors generally fall into one of the following categories:

  Authentication issues 
* Not correctly specifying credentials
* Remote device (network switch/router) not falling back to other other authentication methods
* SSH key issues

  Timeout issues 
* Can occur when trying to pull a large amount of data
* May actually be masking a authentication issue

  Playbook issues 
* Use of `delegate_to`, instead of `ProxyCommand`. See [network proxy guide](#network-delegate-to-vs-proxycommand) for more information.

    Warning

 `unable to open shell`

 The `unable to open shell` message means that the `ansible-connection` daemon has not been able to successfully talk to the remote network device. This generally means that there is an authentication issue. See the “Authentication and connection issues” section in this document for more information.

  ### Enabling Networking logging and how to read the logfile

 **Platforms:** Any

 Ansible includes logging to help diagnose and troubleshoot issues regarding Ansible Networking modules.

 Because logging is very verbose, it is disabled by default. It can be enabled with the [`ANSIBLE_LOG_PATH`](../../reference_appendices/config#envvar-ANSIBLE_LOG_PATH) and [`ANSIBLE_DEBUG`](../../reference_appendices/config#envvar-ANSIBLE_DEBUG) options on the ansible-controller, that is the machine running `ansible-playbook`.

 Before running `ansible-playbook`, run the following commands to enable logging:

 
```
# Specify the location for the log file
export ANSIBLE_LOG_PATH=~/ansible.log
# Enable Debug
export ANSIBLE_DEBUG=True

# Run with 4*v for connection level verbosity
ansible-playbook -vvvv ...

```
 After Ansible has finished running you can inspect the log file which has been created on the ansible-controller:

 
```
less $ANSIBLE_LOG_PATH

2017-03-30 13:19:52,740 p=28990 u=fred |  creating new control socket for host veos01:22 as user admin
2017-03-30 13:19:52,741 p=28990 u=fred |  control socket path is /home/fred/.ansible/pc/ca5960d27a
2017-03-30 13:19:52,741 p=28990 u=fred |  current working directory is /home/fred/ansible/test/integration
2017-03-30 13:19:52,741 p=28990 u=fred |  using connection plugin network_cli
...
2017-03-30 13:20:14,771 paramiko.transport userauth is OK
2017-03-30 13:20:15,283 paramiko.transport Authentication (keyboard-interactive) successful!
2017-03-30 13:20:15,302 p=28990 u=fred |  ssh connection done, setting terminal
2017-03-30 13:20:15,321 p=28990 u=fred |  ssh connection has completed successfully
2017-03-30 13:20:15,322 p=28990 u=fred |  connection established to veos01 in 0:00:22.580626

```
 From the log notice:

 * `p=28990` Is the PID (Process ID) of the `ansible-connection` process
* `u=fred` Is the user `running` ansible, not the remote-user you are attempting to connect as
* `creating new control socket for host veos01:22 as user admin` host:port as user
* `control socket path is` location on disk where the persistent connection socket is created
* `using connection plugin network_cli` Informs you that persistent connection is being used
* `connection established to veos01 in 0:00:22.580626` Time taken to obtain a shell on the remote device

 Because the log files are verbose, you can use grep to look for specific information. For example, once you have identified the `pid` from the `creating new control socket for host` line you can search for other connection log entries:

 
```
grep "p=28990" $ANSIBLE_LOG_PATH

```
 ### Enabling Networking device interaction logging

 **Platforms:** Any

 Ansible includes logging of device interaction in the log file to help diagnose and troubleshoot issues regarding Ansible Networking modules. The messages are logged in the file pointed to by the `log_path` configuration option in the Ansible configuration file or by setting the [`ANSIBLE_LOG_PATH`](../../reference_appendices/config#envvar-ANSIBLE_LOG_PATH).

  Warning

 The device interaction messages consist of command executed on the target device and the returned response. Since this log data can contain sensitive information including passwords in plain text it is disabled by default. Additionally, in order to prevent accidental leakage of data, a warning will be shown on every task with this setting enabled, specifying which host has it enabled and where the data is being logged.

  Be sure to fully understand the security implications of enabling this option. The device interaction logging can be enabled either globally by setting in configuration file or by setting environment or enabled on per task basis by passing a special variable to the task.

 Before running `ansible-playbook` run the following commands to enable logging:

 
```
# Specify the location for the log file
export ANSIBLE_LOG_PATH=~/ansible.log

```
 Enable device interaction logging for a given task

 
```
- name: get version information
  cisco.ios.ios_command:
    commands:
      - show version
  vars:
    ansible_persistent_log_messages: True

```
 To make this a global setting, add the following to your `ansible.cfg` file:

 
```
[persistent_connection]
log_messages = True

```
 or enable the environment variable `ANSIBLE_PERSISTENT_LOG_MESSAGES`:

 
```
# Enable device interaction logging
export ANSIBLE_PERSISTENT_LOG_MESSAGES=True

```
 If the task is failing on connection initialization itself, you should enable this option globally. If an individual task is failing intermittently this option can be enabled for that task itself to find the root cause.

 After Ansible has finished running you can inspect the log file which has been created on the ansible-controller

  Note

 Be sure to fully understand the security implications of enabling this option as it can log sensitive information in log file thus creating security vulnerability.

  ### Isolating an error

 **Platforms:** Any

 As with any effort to troubleshoot it’s important to simplify the test case as much as possible.

 For Ansible this can be done by ensuring you are only running against one remote device:

 * Using `ansible-playbook --limit switch1.example.net...`
* Using an ad hoc `ansible` command

 `ad hoc` refers to running Ansible to perform some quick command using `/usr/bin/ansible`, rather than the orchestration language, which is `/usr/bin/ansible-playbook`. In this case we can ensure connectivity by attempting to execute a single command on the remote device:

 
```
ansible -m arista.eos.eos_command -a 'commands=?' -i inventory switch1.example.net -e 'ansible_connection=ansible.netcommon.network_cli' -u admin -k

```
 In the above example, we:

 * connect to `switch1.example.net` specified in the inventory file `inventory`
* use the module `arista.eos.eos_command`
* run the command `?`
* connect using the username `admin`
* inform the `ansible` command to prompt for the SSH password by specifying `-k`

 If you have SSH keys configured correctly, you don’t need to specify the `-k` parameter.

 If the connection still fails you can combine it with the enable\_network\_logging parameter. For example:

 
```
# Specify the location for the log file
export ANSIBLE_LOG_PATH=~/ansible.log
# Enable Debug
export ANSIBLE_DEBUG=True
# Run with ``-vvvv`` for connection level verbosity
ansible -m arista.eos.eos_command -a 'commands=?' -i inventory switch1.example.net -e 'ansible_connection=ansible.netcommon.network_cli' -u admin -k

```
 Then review the log file and find the relevant error message in the rest of this document.

 Troubleshooting socket path issues
----------------------------------

 **Platforms:** Any

 The `Socket path does not exist or cannot be found` and `Unable to connect to socket` messages indicate that the socket used to communicate with the remote network device is unavailable or does not exist.

 For example:

 
```
fatal: [spine02]: FAILED! => {
    "changed": false,
    "failed": true,
    "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_TSqk5J/ansible_modlib.zip/ansible/module_utils/connection.py\", line 115, in _exec_jsonrpc\nansible.module_utils.connection.ConnectionError: Socket path XX does not exist or cannot be found. See Troubleshooting socket path issues in the Network Debug and Troubleshooting Guide\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE",
    "rc": 1
}

```
 or

 
```
fatal: [spine02]: FAILED! => {
    "changed": false,
    "failed": true,
    "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_TSqk5J/ansible_modlib.zip/ansible/module_utils/connection.py\", line 123, in _exec_jsonrpc\nansible.module_utils.connection.ConnectionError: Unable to connect to socket XX. See Troubleshooting socket path issues in Network Debug and Troubleshooting Guide\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE",
    "rc": 1
}

```
 Suggestions to resolve:

 1. Verify that you have write access to the socket path described in the error message.
2. Follow the steps detailed in [enable network logging](#enable-network-logging).

 If the identified error message from the log file is:

 
```
2017-04-04 12:19:05,670 p=18591 u=fred |  command timeout triggered, timeout value is 30 secs

```
 or

 
```
2017-04-04 12:19:05,670 p=18591 u=fred |  persistent connection idle timeout triggered, timeout value is 30 secs

```
 Follow the steps detailed in [timeout issues](#timeout-issues)

 Category “Unable to open shell”
-------------------------------

 **Platforms:** Any

 The `unable to open shell` message means that the `ansible-connection` daemon has not been able to successfully talk to the remote network device. This generally means that there is an authentication issue. It is a “catch all” message, meaning you need to enable [logging](https://docs.ansible.com/ansible/2.8/user_guide/intro_getting_started.html#a-note-about-logging "(in Ansible v2.8)") to find the underlying issues.

 For example:

 
```
TASK [prepare_eos_tests : enable cli on remote device] **************************************************
fatal: [veos01]: FAILED! => {"changed": false, "failed": true, "msg": "unable to open shell"}

```
 or:

 
```
TASK [ios_system : configure name_servers] *************************************************************
task path:
fatal: [ios-csr1000v]: FAILED! => {
    "changed": false,
    "failed": true,
    "msg": "unable to open shell",
}

```
 Suggestions to resolve:

 Follow the steps detailed in [enable\_network\_logging](#enable-network-logging).

 Once you’ve identified the error message from the log file, the specific solution can be found in the rest of this document.

 ### Error: “[Errno -2] Name or service not known”

 **Platforms:** Any

 Indicates that the remote host you are trying to connect to can not be reached

 For example:

 
```
2017-04-04 11:39:48,147 p=15299 u=fred |  control socket path is /home/fred/.ansible/pc/ca5960d27a
2017-04-04 11:39:48,147 p=15299 u=fred |  current working directory is /home/fred/git/ansible-inc/stable-2.3/test/integration
2017-04-04 11:39:48,147 p=15299 u=fred |  using connection plugin network_cli
2017-04-04 11:39:48,340 p=15299 u=fred |  connecting to host veos01 returned an error
2017-04-04 11:39:48,340 p=15299 u=fred |  [Errno -2] Name or service not known

```
 Suggestions to resolve:

 * If you are using the `provider:` options ensure that its suboption `host:` is set correctly.
* If you are not using `provider:` nor top-level arguments ensure your inventory file is correct.

 ### Error: “Authentication failed”

 **Platforms:** Any

 Occurs if the credentials (username, passwords, or ssh keys) passed to `ansible-connection` (via `ansible` or `ansible-playbook`) can not be used to connect to the remote device.

 For example:

 
```
<ios01> ESTABLISH CONNECTION FOR USER: cisco on PORT 22 TO ios01
<ios01> Authentication failed.

```
 Suggestions to resolve:

 If you are specifying credentials via `password:` (either directly or via `provider:`) or the environment variable `ANSIBLE_NET_PASSWORD` it is possible that `paramiko` (the Python SSH library that Ansible uses) is using ssh keys, and therefore the credentials you are specifying are being ignored. To find out if this is the case, disable “look for keys”. This can be done like this:

 
```
export ANSIBLE_PARAMIKO_LOOK_FOR_KEYS=False

```
 To make this a permanent change, add the following to your `ansible.cfg` file:

 
```
[paramiko_connection]
look_for_keys = False

```
 ### Error: “connecting to host <hostname> returned an error” or “Bad address”

 This may occur if the SSH fingerprint hasn’t been added to Paramiko’s (the Python SSH library) know hosts file.

 When using persistent connections with Paramiko, the connection runs in a background process. If the host doesn’t already have a valid SSH key, by default Ansible will prompt to add the host key. This will cause connections running in background processes to fail.

 For example:

 
```
2017-04-04 12:06:03,486 p=17981 u=fred |  using connection plugin network_cli
2017-04-04 12:06:04,680 p=17981 u=fred |  connecting to host veos01 returned an error
2017-04-04 12:06:04,682 p=17981 u=fred |  (14, 'Bad address')
2017-04-04 12:06:33,519 p=17981 u=fred |  number of connection attempts exceeded, unable to connect to control socket
2017-04-04 12:06:33,520 p=17981 u=fred |  persistent_connect_interval=1, persistent_connect_retries=30

```
 Suggestions to resolve:

 Use `ssh-keyscan` to pre-populate the known\_hosts. You need to ensure the keys are correct.

 
```
ssh-keyscan veos01

```
 or

 You can tell Ansible to automatically accept the keys

 Environment variable method:

 
```
export ANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD=True
ansible-playbook ...

```
 `ansible.cfg` method:

 ansible.cfg

 
```
[paramiko_connection]
host_key_auto_add = True

```
 ### Error: “No authentication methods available”

 For example:

 
```
2017-04-04 12:19:05,670 p=18591 u=fred |  creating new control socket for host veos01:None as user admin
2017-04-04 12:19:05,670 p=18591 u=fred |  control socket path is /home/fred/.ansible/pc/ca5960d27a
2017-04-04 12:19:05,670 p=18591 u=fred |  current working directory is /home/fred/git/ansible-inc/ansible-workspace-2/test/integration
2017-04-04 12:19:05,670 p=18591 u=fred |  using connection plugin network_cli
2017-04-04 12:19:06,606 p=18591 u=fred |  connecting to host veos01 returned an error
2017-04-04 12:19:06,606 p=18591 u=fred |  No authentication methods available
2017-04-04 12:19:35,708 p=18591 u=fred |  connect retry timeout expired, unable to connect to control socket
2017-04-04 12:19:35,709 p=18591 u=fred |  persistent_connect_retry_timeout is 15 secs

```
 Suggestions to resolve:

 No password or SSH key supplied

 ### Clearing Out Persistent Connections

 **Platforms:** Any

 In Ansible 2.3, persistent connection sockets are stored in `~/.ansible/pc` for all network devices. When an Ansible playbook runs, the persistent socket connection is displayed when verbose output is specified.

 `<switch> socket_path: /home/fred/.ansible/pc/f64ddfa760`

 To clear out a persistent connection before it times out (the default timeout is 30 seconds of inactivity), simple delete the socket file.

 Timeout issues
--------------

 ### Persistent connection idle timeout

 By default, `ANSIBLE_PERSISTENT_CONNECT_TIMEOUT` is set to 30 (seconds). You may see the following error if this value is too low:

 
```
2017-04-04 12:19:05,670 p=18591 u=fred |  persistent connection idle timeout triggered, timeout value is 30 secs

```
 Suggestions to resolve:

 Increase value of persistent connection idle timeout:

 
```
export ANSIBLE_PERSISTENT_CONNECT_TIMEOUT=60

```
 To make this a permanent change, add the following to your `ansible.cfg` file:

 
```
[persistent_connection]
connect_timeout = 60

```
 ### Command timeout

 By default, `ANSIBLE_PERSISTENT_COMMAND_TIMEOUT` is set to 30 (seconds). Prior versions of Ansible had this value set to 10 seconds by default. You may see the following error if this value is too low:

 
```
2017-04-04 12:19:05,670 p=18591 u=fred |  command timeout triggered, timeout value is 30 secs

```
 Suggestions to resolve:

 * Option 1 (Global command timeout setting): Increase value of command timeout in configuration file or by setting environment variable.

 
```
export ANSIBLE_PERSISTENT_COMMAND_TIMEOUT=60

```
 To make this a permanent change, add the following to your `ansible.cfg` file:

 
```
[persistent_connection]
command_timeout = 60

```
* Option 2 (Per task command timeout setting): Increase command timeout per task basis. All network modules support a timeout value that can be set on a per task basis. The timeout value controls the amount of time in seconds before the task will fail if the command has not returned.

 For local connection type:

 Suggestions to resolve:

 
```
- name: save running-config
  cisco.ios.ios_command:
    commands: copy running-config startup-config
    provider: "{{ cli }}"
    timeout: 30

```
 Suggestions to resolve:

 
```
- name: save running-config
  cisco.ios.ios_command:
    commands: copy running-config startup-config
  vars:
    ansible_command_timeout: 60

```

 Some operations take longer than the default 30 seconds to complete. One good example is saving the current running config on IOS devices to startup config. In this case, changing the timeout value from the default 30 seconds to 60 seconds will prevent the task from failing before the command completes successfully.

 ### Persistent connection retry timeout

 By default, `ANSIBLE_PERSISTENT_CONNECT_RETRY_TIMEOUT` is set to 15 (seconds). You may see the following error if this value is too low:

 
```
2017-04-04 12:19:35,708 p=18591 u=fred |  connect retry timeout expired, unable to connect to control socket
2017-04-04 12:19:35,709 p=18591 u=fred |  persistent_connect_retry_timeout is 15 secs

```
 Suggestions to resolve:

 Increase the value of the persistent connection idle timeout. Note: This value should be greater than the SSH timeout value (the timeout value under the defaults section in the configuration file) and less than the value of the persistent connection idle timeout (connect\_timeout).

 
```
export ANSIBLE_PERSISTENT_CONNECT_RETRY_TIMEOUT=30

```
 To make this a permanent change, add the following to your `ansible.cfg` file:

 
```
[persistent_connection]
connect_retry_timeout = 30

```
 ### Timeout issue due to platform specific login menu with `network_cli` connection type

 In Ansible 2.9 and later, the network\_cli connection plugin configuration options are added to handle the platform specific login menu. These options can be set as group/host or tasks variables.

 Example: Handle single login menu prompts with host variables

 
```
$cat host_vars/<hostname>.yaml
---
ansible_terminal_initial_prompt:
  - "Connect to a host"
ansible_terminal_initial_answer:
  - "3"

```
 Example: Handle remote host multiple login menu prompts with host variables

 
```
$cat host_vars/<inventory-hostname>.yaml
---
ansible_terminal_initial_prompt:
  - "Press any key to enter main menu"
  - "Connect to a host"
ansible_terminal_initial_answer:
  - "\\r"
  - "3"
ansible_terminal_initial_prompt_checkall: True

```
 To handle multiple login menu prompts:

 * The values of `ansible_terminal_initial_prompt` and `ansible_terminal_initial_answer` should be a list.
* The prompt sequence should match the answer sequence.
* The value of `ansible_terminal_initial_prompt_checkall` should be set to `True`.

  Note

 If all the prompts in sequence are not received from remote host at the time connection initialization it will result in a timeout.

  Playbook issues
---------------

 This section details issues are caused by issues with the Playbook itself.

 ### Error: “Unable to enter configuration mode”

 **Platforms:** Arista EOS and Cisco IOS

 This occurs when you attempt to run a task that requires privileged mode in a user mode shell.

 For example:

 
```
TASK [ios_system : configure name_servers] *****************************************************************************
task path:
fatal: [ios-csr1000v]: FAILED! => {
    "changed": false,
    "failed": true,
   "msg": "unable to enter configuration mode",
}

```
 Suggestions to resolve:

 Use `connection: ansible.netcommon.network_cli` and `become: yes`

 Proxy Issues
------------

 ### delegate\_to vs ProxyCommand

 In order to use a bastion or intermediate jump host to connect to network devices over `cli` transport, network modules support the use of `ProxyCommand`.

 To use `ProxyCommand`, configure the proxy settings in the Ansible inventory file to specify the proxy host.

 
```
[nxos]
nxos01
nxos02

[nxos:vars]
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 With the configuration above, simply build and run the playbook as normal with no additional changes necessary. The network module will now connect to the network device by first connecting to the host specified in `ansible_ssh_common_args`, which is `bastion01` in the above example.

 You can also set the proxy target for all hosts by using environment variables.

 
```
export ANSIBLE_SSH_ARGS='-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 ### Using bastion/jump host with netconf connection

 ### Enabling jump host setting

  Bastion/jump host with netconf connection can be enabled by:

* Setting Ansible variable `ansible_netconf_ssh_config` either to `True` or custom ssh config file path
* Setting environment variable `ANSIBLE_NETCONF_SSH_CONFIG` to `True` or custom ssh config file path
* Setting `ssh_config = 1` or `ssh_config = <ssh-file-path>` under `netconf_connection` section

   If the configuration variable is set to 1 the proxycommand and other ssh variables are read from default ssh config file (~/.ssh/config).

 If the configuration variable is set to file path the proxycommand and other ssh variables are read from the given custom ssh file path

 ### Example ssh config file (~/.ssh/config)

 
```
Host jumphost
  HostName jumphost.domain.name.com
  User jumphost-user
  IdentityFile "/path/to/ssh-key.pem"
  Port 22

# Note: Due to the way that Paramiko reads the SSH Config file,
# you need to specify the NETCONF port that the host uses.
# In other words, it does not automatically use ansible_port
# As a result you need either:

Host junos01
  HostName junos01
  ProxyCommand ssh -W %h:22 jumphost

# OR

Host junos01
  HostName junos01
  ProxyCommand ssh -W %h:830 jumphost

# Depending on the netconf port used.

```
 Example Ansible inventory file

 
```
[junos]
junos01

[junos:vars]
ansible_connection=ansible.netcommon.netconf
ansible_network_os=junipernetworks.junos.junos
ansible_user=myuser
ansible_password=!vault...

```
  Note

 Using `ProxyCommand` with passwords via variables

 By design, SSH doesn’t support providing passwords via environment variables. This is done to prevent secrets from leaking out, for example in `ps` output.

 We recommend using SSH Keys, and if needed an ssh-agent, rather than passwords, where ever possible.

  Miscellaneous Issues
--------------------

 ### Intermittent failure while using `ansible.netcommon.network_cli` connection type

 If the command prompt received in response is not matched correctly within the `ansible.netcommon.network_cli` connection plugin the task might fail intermittently with truncated response or with the error message `operation requires privilege escalation`. Starting in 2.7.1 a new buffer read timer is added to ensure prompts are matched properly and a complete response is send in output. The timer default value is 0.2 seconds and can be adjusted on a per task basis or can be set globally in seconds.

 Example Per task timer setting

 
```
- name: gather ios facts
  cisco.ios.ios_facts:
    gather_subset: all
  register: result
  vars:
    ansible_buffer_read_timeout: 2

```
 To make this a global setting, add the following to your `ansible.cfg` file:

 
```
[persistent_connection]
buffer_read_timeout = 2

```
 This timer delay per command executed on remote host can be disabled by setting the value to zero.

 ### Task failure due to mismatched error regex within command response using `ansible.netcommon.network_cli` connection type

 In Ansible 2.9 and later, the `ansible.netcommon.network_cli` connection plugin configuration options are added to handle the stdout and stderr regex to identify if the command execution response consist of a normal response or an error response. These options can be set group/host variables or as tasks variables.

 Example: For mismatched error response

 
```
- name: fetch logs from remote host
  cisco.ios.ios_command:
    commands:
      - show logging

```
 Playbook run output:

 
```
TASK [first fetch logs] ********************************************************
fatal: [ios01]: FAILED! => {
    "changed": false,
    "msg": "RF Name:\r\n\r\n <--nsip-->
           \"IPSEC-3-REPLAY_ERROR: Test log\"\r\n*Aug  1 08:36:18.483: %SYS-7-USERLOG_DEBUG:
            Message from tty578(user id: ansible): test\r\nan-ios-02#"}

```
 Suggestions to resolve:

 Modify the error regex for individual task.

 
```
- name: fetch logs from remote host
  cisco.ios.ios_command:
    commands:
      - show logging
  vars:
    ansible_terminal_stderr_re:
      - pattern: 'connection timed out'
        flags: 're.I'

```
 The terminal plugin regex options `ansible_terminal_stderr_re` and `ansible_terminal_stdout_re` have `pattern` and `flags` as keys. The value of the `flags` key should be a value that is accepted by the `re.compile` python method.

 ### Intermittent failure while using `ansible.netcommon.network_cli` connection type due to slower network or remote target host

 In Ansible 2.9 and later, the `ansible.netcommon.network_cli` connection plugin configuration option is added to control the number of attempts to connect to a remote host. The default number of attempts is three. After every retry attempt the delay between retries is increased by power of 2 in seconds until either the maximum attempts are exhausted or either the `persistent_command_timeout` or `persistent_connect_timeout` timers are triggered.

 To make this a global setting, add the following to your `ansible.cfg` file:

 
```
[persistent_connection]
network_cli_retries = 5

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/network_debug_troubleshooting.html>

Platform Options
================

 Some Ansible Network platforms support multiple connection types, privilege escalation (`enable` mode), or other options. The pages in this section offer standardized guides to understanding available options on each network platform. We welcome contributions from community-maintained platforms to this section.

 Platform Options

 * [CloudEngine OS Platform Options](platform_ce)
	+ [Connections available](platform_ce#connections-available)
	+ [Using CLI in Ansible](platform_ce#using-cli-in-ansible)
	+ [Using NETCONF in Ansible](platform_ce#using-netconf-in-ansible)
	+ [Notes](platform_ce#notes)
* [CNOS Platform Options](platform_cnos)
	+ [Connections available](platform_cnos#connections-available)
	+ [Using CLI in Ansible](platform_cnos#using-cli-in-ansible)
* [Dell OS6 Platform Options](platform_dellos6)
	+ [Connections available](platform_dellos6#connections-available)
	+ [Using CLI in Ansible](platform_dellos6#using-cli-in-ansible)
* [Dell OS9 Platform Options](platform_dellos9)
	+ [Connections available](platform_dellos9#connections-available)
	+ [Using CLI in Ansible](platform_dellos9#using-cli-in-ansible)
* [Dell OS10 Platform Options](platform_dellos10)
	+ [Connections available](platform_dellos10#connections-available)
	+ [Using CLI in Ansible](platform_dellos10#using-cli-in-ansible)
* [ENOS Platform Options](platform_enos)
	+ [Connections available](platform_enos#connections-available)
	+ [Using CLI in Ansible](platform_enos#using-cli-in-ansible)
* [EOS Platform Options](platform_eos)
	+ [Connections available](platform_eos#connections-available)
	+ [Using CLI in Ansible](platform_eos#using-cli-in-ansible)
	+ [Using eAPI in Ansible](platform_eos#using-eapi-in-ansible)
* [ERIC\_ECCLI Platform Options](platform_eric_eccli)
	+ [Connections available](platform_eric_eccli#connections-available)
	+ [Using CLI in Ansible](platform_eric_eccli#using-cli-in-ansible)
* [EXOS Platform Options](platform_exos)
	+ [Connections available](platform_exos#connections-available)
	+ [Using CLI in Ansible](platform_exos#using-cli-in-ansible)
	+ [Using EXOS-API in Ansible](platform_exos#using-exos-api-in-ansible)
* [FRR Platform Options](platform_frr)
	+ [Connections available](platform_frr#connections-available)
	+ [Using CLI in Ansible](platform_frr#using-cli-in-ansible)
* [ICX Platform Options](platform_icx)
	+ [Connections available](platform_icx#connections-available)
	+ [Using CLI in Ansible](platform_icx#using-cli-in-ansible)
* [IOS Platform Options](platform_ios)
	+ [Connections available](platform_ios#connections-available)
	+ [Using CLI in Ansible](platform_ios#using-cli-in-ansible)
* [IOS-XR Platform Options](platform_iosxr)
	+ [Connections available](platform_iosxr#connections-available)
	+ [Using CLI in Ansible](platform_iosxr#using-cli-in-ansible)
	+ [Using NETCONF in Ansible](platform_iosxr#using-netconf-in-ansible)
* [IronWare Platform Options](platform_ironware)
	+ [Connections available](platform_ironware#connections-available)
	+ [Using CLI in Ansible](platform_ironware#using-cli-in-ansible)
* [Junos OS Platform Options](platform_junos)
	+ [Connections available](platform_junos#connections-available)
	+ [Using CLI in Ansible](platform_junos#using-cli-in-ansible)
	+ [Using NETCONF in Ansible](platform_junos#using-netconf-in-ansible)
* [Meraki Platform Options](platform_meraki)
	+ [Connections available](platform_meraki#connections-available)
* [Pluribus NETVISOR Platform Options](platform_netvisor)
	+ [Connections available](platform_netvisor#connections-available)
	+ [Using CLI in Ansible](platform_netvisor#using-cli-in-ansible)
* [NOS Platform Options](platform_nos)
	+ [Connections available](platform_nos#connections-available)
	+ [Using CLI in Ansible](platform_nos#using-cli-in-ansible)
* [NXOS Platform Options](platform_nxos)
	+ [Connections available](platform_nxos#connections-available)
	+ [Using CLI in Ansible](platform_nxos#using-cli-in-ansible)
	+ [Using NX-API in Ansible](platform_nxos#using-nx-api-in-ansible)
	+ [Cisco Nexus platform support matrix](platform_nxos#cisco-nexus-platform-support-matrix)
* [RouterOS Platform Options](platform_routeros)
	+ [Connections available](platform_routeros#connections-available)
	+ [Using CLI in Ansible](platform_routeros#using-cli-in-ansible)
* [SLX-OS Platform Options](platform_slxos)
	+ [Connections available](platform_slxos#connections-available)
	+ [Using CLI in Ansible](platform_slxos#using-cli-in-ansible)
* [VOSS Platform Options](platform_voss)
	+ [Connections available](platform_voss#connections-available)
	+ [Using CLI in Ansible](platform_voss#using-cli-in-ansible)
* [VyOS Platform Options](platform_vyos)
	+ [Connections available](platform_vyos#connections-available)
	+ [Using CLI in Ansible](platform_vyos#using-cli-in-ansible)
* [WeOS 4 Platform Options](platform_weos4)
	+ [Connections available](platform_weos4#connections-available)
	+ [Using CLI in Ansible](platform_weos4#using-cli-in-ansible)
* [Netconf enabled Platform Options](platform_netconf_enabled)
	+ [Connections available](platform_netconf_enabled#connections-available)
	+ [Using NETCONF in Ansible](platform_netconf_enabled#using-netconf-in-ansible)

 Settings by Platform
--------------------

 

|  | `ansible_connection:` settings available |
| --- | --- |
| Network OS | `ansible_network_os:` | network\_cli | netconf | httpapi | local |
| [Arista EOS](https://galaxy.ansible.com/arista/eos) [[†]](#id3) | `arista.eos.eos` | ✓ |  | ✓ | ✓ |
| [Ciena SAOS6](https://galaxy.ansible.com/ciena/saos6) | `ciena.saos6.saos6` | ✓ |  |  | ✓ |
| [Cisco ASA](https://galaxy.ansible.com/cisco/asa) [[†]](#id3) | `cisco.asa.asa` | ✓ |  |  | ✓ |
| [Cisco IOS](https://galaxy.ansible.com/cisco/ios) [[†]](#id3) | `cisco.ios.ios` | ✓ |  |  | ✓ |
| [Cisco IOS XR](https://galaxy.ansible.com/cisco/iosxr) [[†]](#id3) | `cisco.iosxr.iosxr` | ✓ |  |  | ✓ |
| [Cisco NX-OS](https://galaxy.ansible.com/cisco/nxos) [[†]](#id3) | `cisco.nxos.nxos` | ✓ |  | ✓ | ✓ |
| [Cloudengine OS](https://galaxy.ansible.com/community/network) | `community.network.ce` | ✓ | ✓ |  | ✓ |
| [Dell OS6](https://github.com/ansible-collections/dellemc.os6) | `dellemc.os6.os6` | ✓ |  |  | ✓ |
| [Dell OS9](https://github.com/ansible-collections/dellemc.os9) | `dellemc.os9.os9` | ✓ |  |  | ✓ |
| [Dell OS10](https://galaxy.ansible.com/dellemc/os10) | `dellemc.os10.os10` | ✓ |  |  | ✓ |
| [Ericsson ECCLI](https://galaxy.ansible.com/community/network) | `community.network.eric_eccli` | ✓ |  |  | ✓ |
| [Extreme EXOS](https://galaxy.ansible.com/community/network) | `community.network.exos` | ✓ |  | ✓ |  |
| [Extreme IronWare](https://galaxy.ansible.com/community/network) | `community.network.ironware` | ✓ |  |  | ✓ |
| [Extreme NOS](https://galaxy.ansible.com/community/network) | `community.network.nos` | ✓ |  |  |  |
| [Extreme SLX-OS](https://galaxy.ansible.com/community/network) | `community.network.slxos` | ✓ |  |  |  |
| [Extreme VOSS](https://galaxy.ansible.com/community/network) | `community.network.voss` | ✓ |  |  |  |
| [F5 BIG-IP](https://galaxy.ansible.com/f5networks/f5_modules) |  |  |  |  | ✓ |
| [F5 BIG-IQ](https://galaxy.ansible.com/f5networks/f5_modules) |  |  |  |  | ✓ |
| [Junos OS](https://galaxy.ansible.com/junipernetworks/junos) [[†]](#id3) | `junipernetworks.junos.junos` | ✓ | ✓ |  | ✓ |
| [Lenovo CNOS](https://galaxy.ansible.com/community/network) | `community.network.cnos` | ✓ |  |  | ✓ |
| [Lenovo ENOS](https://galaxy.ansible.com/community/network) | `community.network.enos` | ✓ |  |  | ✓ |
| [Meraki](https://galaxy.ansible.com/cisco/meraki) |  |  |  |  | ✓ |
| [MikroTik RouterOS](https://galaxy.ansible.com/community/network) | `community.network.routeros` | ✓ |  |  |  |
| [Nokia SR OS](https://galaxy.ansible.com/community/network) |  |  |  |  | ✓ |
| [Pluribus Netvisor](https://galaxy.ansible.com/community/network) | `community.network.netvisor` | ✓ |  |  |  |
| [Ruckus ICX](https://galaxy.ansible.com/community/network) | `community.network.icx` | ✓ |  |  |  |
| [VyOS](https://galaxy.ansible.com/vyos/vyos) [[†]](#id3) | `vyos.vyos.vyos` | ✓ |  |  | ✓ |
| [Westermo WeOS 4](https://galaxy.ansible.com/community/network) | `community.network.weos4` | ✓ |  |  |  |
| OS that supports Netconf [[†]](#id3) | `<network-os>` |  | ✓ |  | ✓ |

 **[†]** Maintained by Ansible Network Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_index.html>

Parsing semi-structured text with Ansible
=========================================

 The [cli\_parse](../../collections/ansible/netcommon/cli_parse_module#ansible-collections-ansible-netcommon-cli-parse-module) module parses semi-structured data such as network configurations into structured data to allow programmatic use of the data from that device. You can pull information from a network device and update a CMDB in one playbook. Use cases include automated troubleshooting, creating dynamic documentation, updating IPAM (IP address management) tools and so on.

 * [Understanding the CLI parser](#understanding-the-cli-parser)


	+ [Why parse the text?](#why-parse-the-text)
	+ [When not to parse the text](#when-not-to-parse-the-text)
* [Parsing the CLI](#parsing-the-cli)


	+ [Parsing with the native parsing engine](#parsing-with-the-native-parsing-engine)
	
	
		- [Networking example](#networking-example)
		- [Linux example](#linux-example)
	+ [Parsing JSON](#parsing-json)
	+ [Parsing with ntc\_templates](#parsing-with-ntc-templates)
	+ [Parsing with pyATS](#parsing-with-pyats)
	+ [Parsing with textfsm](#parsing-with-textfsm)
	+ [Parsing with TTP](#parsing-with-ttp)
	+ [Parsing with JC](#parsing-with-jc)
	+ [Converting XML](#converting-xml)
* [Advanced use cases](#advanced-use-cases)


	+ [Provide a full template path](#provide-a-full-template-path)
	+ [Provide command to parser different than the command run](#provide-command-to-parser-different-than-the-command-run)
	+ [Provide a custom OS value](#provide-a-custom-os-value)
	+ [Parse existing text](#parse-existing-text)

 Understanding the CLI parser
----------------------------

 The [ansible.netcommon](https://galaxy.ansible.com/ansible/netcommon) collection version 1.2.0 or later includes the [cli\_parse](../../collections/ansible/netcommon/cli_parse_module#ansible-collections-ansible-netcommon-cli-parse-module) module that can run CLI commands and parse the semi-structured text output. You can use the `cli_parse` module on a device, host, or platform that only supports a command-line interface and the commands issued return semi-structured text. The `cli_parse` module can either run a CLI command on a device and return a parsed result or can simply parse any text document. The `cli_parse` module includes cli\_parser plugins to interface with a variety of parsing engines.

 ### Why parse the text?

 Parsing semi-structured data such as network configurations into structured data allows programmatic use of the data from that device. Use cases include automated troubleshooting, creating dynamic documentation, updating IPAM (IP address management) tools and so on. You may prefer to do this with Ansible natively to take advantage of native Ansible constructs such as:

 * The `when` clause to conditionally run other tasks or roles
* The `assert` module to check configuration and operational state compliance
* The `template` module to generate reports about configuration and operational state information
* Templates and `command` or `config` modules to generate host, device, or platform commands or configuration
* The current platform `facts` modules to supplement native facts information

 By parsing semi-structured text into Ansible native data structures, you can take full advantage of Ansible’s network modules and plugins.

 ### When not to parse the text

 You should not parse semi-structured text when:

 * The device, host, or platform has a RESTAPI and returns JSON.
* Existing Ansible facts modules already return the desired data.
* Ansible network resource modules exist for configuration management of the device and resource.

 Parsing the CLI
---------------

 The `cli_parse` module includes the following cli\_parsing plugins:

  
`native` 

The native parsing engine built into Ansible and requires no addition python libraries

  
`xml` 

Convert XML to an Ansible native data structure

  
`textfsm` 

A python module which implements a template based state machine for parsing semi-formatted text

  
`ntc_templates` 

Predefined `textfsm` templates packages supporting a variety of platforms and commands

  
`ttp` 

A library for semi-structured text parsing using templates, with added capabilities to simplify the process

  
`pyats` 

Uses the parsers included with the Cisco Test Automation & Validation Solution

  
`jc` 

A python module that converts the output of dozens of popular Linux/UNIX/macOS/Windows commands and file types to python dictionaries or lists of dictionaries. Note: this filter plugin can be found in the `community.general` collection.

  
`json` 

Converts JSON output at the CLI to an Ansible native data structure

   Although Ansible contains a number of plugins that can convert XML to Ansible native data structures, the `cli_parse` module runs the command on devices that return XML and returns the converted data in a single task.

 Because `cli_parse` uses a plugin based architecture, it can use additional parsing engines from any Ansible collection.

  Note

 The `ansible.netcommon.native` and `ansible.netcommon.json` parsing engines are fully supported with a Red Hat Ansible Automation Platform subscription. Red Hat Ansible Automation Platform subscription support is limited to the use of the `ntc_templates`, pyATS, `textfsm`, `xmltodict`, public APIs as documented.

  ### Parsing with the native parsing engine

 The native parsing engine is included with the `cli_parse` module. It uses data captured using regular expressions to populate the parsed data structure. The native parsing engine requires a YAML template file to parse the command output.

 #### Networking example

 This example uses the output of a network device command and applies a native template to produce an output in Ansible structured data format.

 The `show interface` command output from the network device looks as follows:

 
```
Ethernet1/1 is up
admin state is up, Dedicated Interface
  Hardware: 100/1000/10000 Ethernet, address: 5254.005a.f8bd (bia 5254.005a.f8bd)
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec
  reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, medium is broadcast
  Port mode is access
  full-duplex, auto-speed
  Beacon is turned off
  Auto-Negotiation is turned on  FEC mode is Auto
  Input flow-control is off, output flow-control is off
  Auto-mdix is turned off
  Switchport monitor is off
  EtherType is 0x8100
  EEE (efficient-ethernet) : n/a
  Last link flapped 4week(s) 6day(s)
  Last clearing of "show interface" counters never
<...>

```
 Create the native template to match this output and store it as `templates/nxos_show_interface.yaml`:

 
```
---
- example: Ethernet1/1 is up
  getval: '(?P<name>\S+) is (?P<oper_state>\S+)'
  result:
    "{{ name }}":
      name: "{{ name }}"
      state:
        operating: "{{ oper_state }}"
  shared: true

- example: admin state is up, Dedicated Interface
  getval: 'admin state is (?P<admin_state>\S+),'
  result:
    "{{ name }}":
      name: "{{ name }}"
      state:
        admin: "{{ admin_state }}"

- example: "  Hardware: Ethernet, address: 5254.005a.f8b5 (bia 5254.005a.f8b5)"
  getval: '\s+Hardware: (?P<hardware>.*), address: (?P<mac>\S+)'
  result:
    "{{ name }}":
      hardware: "{{ hardware }}"
      mac_address: "{{ mac }}"

```
 This native parser template is structured as a list of parsers, each containing the following key-value pairs:

 * `example` - An example line of the text line to be parsed
* `getval` - A regular expression using named capture groups to store the extracted data
* `result` - A data tree, populated as a template, from the parsed data
* `shared` - (optional) The shared key makes the parsed values available to the rest of the parser entries until matched again.

 The following example task uses `cli_parse` with the native parser and the example template above to parse the `show interface` command from a Cisco NXOS device:

 
```
- name: "Run command and parse with native"
  ansible.netcommon.cli_parse:
    command: show interface
    parser:
      name: ansible.netcommon.native
    set_fact: interfaces

```
 Taking a deeper dive into this task:

 * The `command` option provides the command you want to run on the device or host. Alternately, you can provide text from a previous command with the `text` option instead.
* The `parser` option provides information specific to the parser engine.
* The `name` suboption provides the fully qualified collection name (FQCN) of the parsing engine (`ansible.netcommon.native`).
* The `cli_parse` module, by default, looks for the template in the templates directory as `{{ short_os }}_{{ command }}.yaml`.


	+ The `short_os` in the template filename is derived from either the host `ansible_network_os` or `ansible_distribution`.
	+ Spaces in the network or host command are replace with `_` in the `command` portion of the template filename. In this example, the `show interfaces` network CLI command becomes `show_interfaces` in the filename.

  Note

 `ansible.netcommon.native` parsing engine is fully supported with a Red Hat Ansible Automation Platform subscription.

  Lastly in this task, the `set_fact` option sets the following `interfaces` fact for the device based on the now-structured data returned from `cli_parse`:

 
```
Ethernet1/1:
    hardware: 100/1000/10000 Ethernet
    mac_address: 5254.005a.f8bd
    name: Ethernet1/1
    state:
    admin: up
    operating: up
Ethernet1/10:
    hardware: 100/1000/10000 Ethernet
    mac_address: 5254.005a.f8c6
<...>

```
 #### Linux example

 You can also use the native parser to run commands and parse output from Linux hosts.

 The output of a sample Linux command (`ip addr show`) looks as follows:

 
```
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s31f6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether x2:6a:64:9d:84:19 brd ff:ff:ff:ff:ff:ff
3: wlp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether x6:c2:44:f7:41:e0 brd ff:ff:ff:ff:ff:ff permaddr d8:f2:ca:99:5c:82

```
 Create the native template to match this output and store it as `templates/fedora_ip_addr_show.yaml`:

 
```
---
- example: '1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000'
  getval: |
    (?x)                                                # free-spacing
    \d+:\s                                              # the interface index
    (?P<name>\S+):\s                                    # the name
    <(?P<properties>\S+)>                               # the properties
    \smtu\s(?P<mtu>\d+)                                 # the mtu
    .*                                                  # gunk
    state\s(?P<state>\S+)                               # the state of the interface
  result:
    "{{ name }}":
        name: "{{ name }}"
        loopback: "{{ 'LOOPBACK' in stats.split(',') }}"
        up: "{{ 'UP' in properties.split(',')  }}"
        carrier: "{{ not 'NO-CARRIER' in properties.split(',') }}"
        broadcast: "{{ 'BROADCAST' in properties.split(',') }}"
        multicast: "{{ 'MULTICAST' in properties.split(',') }}"
        state: "{{ state|lower() }}"
        mtu: "{{ mtu }}"
  shared: True

- example: 'inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0'
  getval: |
   (?x)                                                 # free-spacing
   \s+inet\s(?P<inet>([0-9]{1,3}\.){3}[0-9]{1,3})       # the ip address
   /(?P<bits>\d{1,2})                                   # the mask bits
  result:
    "{{ name }}":
        ip_address: "{{ inet }}"
        mask_bits: "{{ bits }}"

```
  Note

 The `shared` key in the parser template allows the interface name to be used in subsequent parser entries. The use of examples and free-spacing mode with the regular expressions makes the template easier to read.

  The following example task uses `cli_parse` with the native parser and the example template above to parse the Linux output:

 
```
- name: Run command and parse
  ansible.netcommon.cli_parse:
    command: ip addr show
    parser:
      name: ansible.netcommon.native
    set_fact: interfaces

```
 This task assumes you previously gathered facts to determine the `ansible_distribution` needed to locate the template. Alternately, you could provide the path in the `parser/template_path` option.

 Lastly in this task, the `set_fact` option sets the following `interfaces` fact for the host, based on the now-structured data returned from `cli_parse`:

 
```
lo:
  broadcast: false
  carrier: true
  ip_address: 127.0.0.1
  mask_bits: 8
  mtu: 65536
  multicast: false
  name: lo
  state: unknown
  up: true
enp64s0u1:
  broadcast: true
  carrier: true
  ip_address: 192.168.86.83
  mask_bits: 24
  mtu: 1500
  multicast: true
  name: enp64s0u1
  state: up
  up: true
<...>

```
 ### Parsing JSON

 Although Ansible will natively convert serialized JSON to Ansible native data when recognized, you can also use the `cli_parse` module for this conversion.

 Example task:

 
```
- name: "Run command and parse as json"
  ansible.netcommon.cli_parse:
    command: show interface | json
    parser:
      name: ansible.netcommon.json
    register: interfaces

```
 Taking a deeper dive into this task:

 * The `show interface | json` command is issued on the device.
* The output is set as the `interfaces` fact for the device.
* JSON support is provided primarily for playbook consistency.

  Note

 The use of `ansible.netcommon.json` is fully supported with a Red Hat Ansible Automation Platform subscription

  ### Parsing with ntc\_templates

 The `ntc_templates` python library includes pre-defined `textfsm` templates for parsing a variety of network device commands output.

 Example task:

 
```
- name: "Run command and parse with ntc_templates"
  ansible.netcommon.cli_parse:
    command: show interface
    parser:
      name: ansible.netcommon.ntc_templates
    set_fact: interfaces

```
 Taking a deeper dive into this task:

 * The `ansible_network_os` of the device is converted to the ntc\_template format `cisco_nxos`. Alternately, you can provide the `os` with the `parser/os` option instead.
* The `cisco_nxos_show_interface.textfsm` template, included with the `ntc_templates` package, parses the output.
* See [the ntc\_templates README](https://github.com/networktocode/ntc-templates/blob/master/README.md) for additional information about the `ntc_templates` python library.

  Note

 Red Hat Ansible Automation Platform subscription support is limited to the use of the `ntc_templates` public APIs as documented.

  This task and and the predefined template sets the following fact as the `interfaces` fact for the host:

 
```
interfaces:
- address: 5254.005a.f8b5
  admin_state: up
  bandwidth: 1000000 Kbit
  bia: 5254.005a.f8b5
  delay: 10 usec
  description: ''
  duplex: full-duplex
  encapsulation: ARPA
  hardware_type: Ethernet
  input_errors: ''
  input_packets: ''
  interface: mgmt0
  ip_address: 192.168.101.14/24
  last_link_flapped: ''
  link_status: up
  mode: ''
  mtu: '1500'
  output_errors: ''
  output_packets: ''
  speed: 1000 Mb/s
- address: 5254.005a.f8bd
  admin_state: up
  bandwidth: 1000000 Kbit
  bia: 5254.005a.f8bd
  delay: 10 usec

```
 ### Parsing with pyATS

 `pyATS` is part of the Cisco Test Automation & Validation Solution. It includes many predefined parsers for a number of network platforms and commands. You can use the predefined parsers that are part of the `pyATS` package with the `cli_parse` module.

 Example task:

 
```
- name: "Run command and parse with pyats"
  ansible.netcommon.cli_parse:
    command: show interface
    parser:
      name: ansible.netcommon.pyats
    set_fact: interfaces

```
 Taking a deeper dive into this task:

 * The `cli_parse` modules converts the `ansible_network_os` automatically (in this example, `ansible_network_os` set to `cisco.nxos.nxos`, converts to `nxos` for pyATS. Alternately, you can set the OS with the `parser/os` option instead.
* Using a combination of the command and OS, the pyATS selects the following parser: <https://pubhub.devnetcloud.com/media/genie-feature-browser/docs/#/parsers/show%2520interface>.
* The `cli_parse` module sets `cisco.ios.ios` to `iosxe` for pyATS. You can override this with the `parser/os` option.
* `cli_parse` only uses the predefined parsers in pyATS. See the [pyATS documentation](https://developer.cisco.com/docs/pyats/) and the full list of [pyATS included parsers](https://pubhub.devnetcloud.com/media/genie-feature-browser/docs/#/parsers).

  Note

 Red Hat Ansible Automation Platform subscription support is limited to the use of the pyATS public APIs as documented.

  This task sets the following fact as the `interfaces` fact for the host:

 
```
mgmt0:
  admin_state: up
  auto_mdix: 'off'
  auto_negotiate: true
  bandwidth: 1000000
  counters:
    in_broadcast_pkts: 3
    in_multicast_pkts: 1652395
    in_octets: 556155103
    in_pkts: 2236713
    in_unicast_pkts: 584259
    rate:
      in_rate: 320
      in_rate_pkts: 0
      load_interval: 1
      out_rate: 48
      out_rate_pkts: 0
    rx: true
    tx: true
  delay: 10
  duplex_mode: full
  enabled: true
  encapsulations:
    encapsulation: arpa
  ethertype: '0x0000'
  ipv4:
    192.168.101.14/24:
      ip: 192.168.101.14
      prefix_length: '24'
  link_state: up
  <...>

```
 ### Parsing with textfsm

 `textfsm` is a Python module which implements a template-based state machine for parsing semi-formatted text.

 The following sample``textfsm`` template is stored as `templates/nxos_show_interface.textfsm`

 
```
Value Required INTERFACE (\S+)
Value LINK_STATUS (.+?)
Value ADMIN_STATE (.+?)
Value HARDWARE_TYPE (.\*)
Value ADDRESS ([a-zA-Z0-9]+.[a-zA-Z0-9]+.[a-zA-Z0-9]+)
Value BIA ([a-zA-Z0-9]+.[a-zA-Z0-9]+.[a-zA-Z0-9]+)
Value DESCRIPTION (.\*)
Value IP_ADDRESS (\d+\.\d+\.\d+\.\d+\/\d+)
Value MTU (\d+)
Value MODE (\S+)
Value DUPLEX (.+duplex?)
Value SPEED (.+?)
Value INPUT_PACKETS (\d+)
Value OUTPUT_PACKETS (\d+)
Value INPUT_ERRORS (\d+)
Value OUTPUT_ERRORS (\d+)
Value BANDWIDTH (\d+\s+\w+)
Value DELAY (\d+\s+\w+)
Value ENCAPSULATION (\w+)
Value LAST_LINK_FLAPPED (.+?)

Start
  ^\S+\s+is.+ -> Continue.Record
  ^${INTERFACE}\s+is\s+${LINK_STATUS},\sline\sprotocol\sis\s${ADMIN_STATE}$$
  ^${INTERFACE}\s+is\s+${LINK_STATUS}$$
  ^admin\s+state\s+is\s+${ADMIN_STATE},
  ^\s+Hardware(:|\s+is)\s+${HARDWARE_TYPE},\s+address(:|\s+is)\s+${ADDRESS}(.*bia\s+${BIA})*
  ^\s+Description:\s+${DESCRIPTION}
  ^\s+Internet\s+Address\s+is\s+${IP_ADDRESS}
  ^\s+Port\s+mode\s+is\s+${MODE}
  ^\s+${DUPLEX}, ${SPEED}(,|$$)
  ^\s+MTU\s+${MTU}.\*BW\s+${BANDWIDTH}.\*DLY\s+${DELAY}
  ^\s+Encapsulation\s+${ENCAPSULATION}
  ^\s+${INPUT_PACKETS}\s+input\s+packets\s+\d+\s+bytes\s\*$$
  ^\s+${INPUT_ERRORS}\s+input\s+error\s+\d+\s+short\s+frame\s+\d+\s+overrun\s+\d+\s+underrun\s+\d+\s+ignored\s\*$$
  ^\s+${OUTPUT_PACKETS}\s+output\s+packets\s+\d+\s+bytes\s\*$$
  ^\s+${OUTPUT_ERRORS}\s+output\s+error\s+\d+\s+collision\s+\d+\s+deferred\s+\d+\s+late\s+collision\s\*$$
  ^\s+Last\s+link\s+flapped\s+${LAST_LINK_FLAPPED}\s\*$$

```
 The following task uses the example template for `textfsm` with the `cli_parse` module.

 
```
- name: "Run command and parse with textfsm"
  ansible.netcommon.cli_parse:
    command: show interface
    parser:
      name: ansible.netcommon.textfsm
    set_fact: interfaces

```
 Taking a deeper dive into this task:

 * The `ansible_network_os` for the device (`cisco.nxos.nxos`) is converted to `nxos`. Alternately you can provide the OS in the `parser/os` option instead.
* The textfsm template name defaulted to `templates/nxos_show_interface.textfsm` using a combination of the OS and command run. Alternately you can override the generated template path with the `parser/template_path` option.
* See the [textfsm README](https://github.com/google/textfsm) for details.
* `textfsm` was previously made available as a filter plugin. Ansible users should transition to the `cli_parse` module.

  Note

 Red Hat Ansible Automation Platform subscription support is limited to the use of the `textfsm` public APIs as documented.

  This task sets the following fact as the `interfaces` fact for the host:

 
```
- ADDRESS: X254.005a.f8b5
  ADMIN_STATE: up
  BANDWIDTH: 1000000 Kbit
  BIA: X254.005a.f8b5
  DELAY: 10 usec
  DESCRIPTION: ''
  DUPLEX: full-duplex
  ENCAPSULATION: ARPA
  HARDWARE_TYPE: Ethernet
  INPUT_ERRORS: ''
  INPUT_PACKETS: ''
  INTERFACE: mgmt0
  IP_ADDRESS: 192.168.101.14/24
  LAST_LINK_FLAPPED: ''
  LINK_STATUS: up
  MODE: ''
  MTU: '1500'
  OUTPUT_ERRORS: ''
  OUTPUT_PACKETS: ''
  SPEED: 1000 Mb/s
- ADDRESS: X254.005a.f8bd
  ADMIN_STATE: up
  BANDWIDTH: 1000000 Kbit
  BIA: X254.005a.f8bd

```
 ### Parsing with TTP

 TTP is a Python library for semi-structured text parsing using templates. TTP uses a jinja-like syntax to limit the need for regular expressions. Users familiar with jinja templating may find the TTP template syntax familiar.

 The following is an example TTP template stored as `templates/nxos_show_interface.ttp`:

 
```
{{ interface }} is {{ state }}
admin state is {{ admin_state }}{{ ignore(".\*") }}

```
 The following task uses this template to parse the `show interface` command output:

 
```
- name: "Run command and parse with ttp"
  ansible.netcommon.cli_parse:
    command: show interface
    parser:
      name: ansible.netcommon.ttp
    set_fact: interfaces

```
 Taking a deeper dive in this task:

 * The default template path `templates/nxos_show_interface.ttp` was generated using the `ansible_network_os` for the host and `command` provided.
* TTP supports several additional variables that will be passed to the parser. These include:


	+ `parser/vars/ttp_init` - Additional parameter passed when the parser is initialized.
	+ `parser/vars/ttp_results` - Additional parameters used to influence the parser output.
	+ `parser/vars/ttp_vars` - Additional variables made available in the template.
* See the [TTP documentation](https://ttp.readthedocs.io) for details.

 The task sets the follow fact as the `interfaces` fact for the host:

 
```
- admin_state: up,
  interface: mgmt0
  state: up
- admin_state: up,
  interface: Ethernet1/1
  state: up
- admin_state: up,
  interface: Ethernet1/2
  state: up

```
 ### Parsing with JC

 JC is a python library that converts the output of dozens of common Linux/UNIX/macOS/Windows command-line tools and file types to python dictionaries or lists of dictionaries for easier parsing. JC is available as a filter plugin in the `community.general` collection.

 The following is an example using JC to parse the output of the `dig` command:

 
```
- name: "Run dig command and parse with jc"
  hosts: ubuntu
  tasks:
  - shell: dig example.com
    register: result
  - set_fact:
      myvar: "{{ result.stdout | community.general.jc('dig') }}"
  - debug:
      msg: "The IP is: {{ myvar[0].answer[0].data }}"

```
 * The JC project and documentation can be found [here](https://github.com/kellyjonbrazil/jc/).
* See this [blog entry](https://blog.kellybrazil.com/2020/08/30/parsing-command-output-in-ansible-with-jc/) for more information.

 ### Converting XML

 Although Ansible contains a number of plugins that can convert XML to Ansible native data structures, the `cli_parse` module runs the command on devices that return XML and returns the converted data in a single task.

 This example task runs the `show interface` command and parses the output as XML:

 
```
- name: "Run command and parse as xml"
    ansible.netcommon.cli_parse:
      command: show interface | xml
      parser:
        name: ansible.netcommon.xml
  set_fact: interfaces

```
  Note

 Red Hat Ansible Automation Platform subscription support is limited to the use of the `xmltodict` public APIs as documented.

  This task sets the `interfaces` fact for the host based on this returned output:

 
```
nf:rpc-reply:
  '@xmlns': http://www.cisco.com/nxos:1.0:if_manager
  '@xmlns:nf': urn:ietf:params:xml:ns:netconf:base:1.0
  nf:data:
    show:
      interface:
        __XML__OPT_Cmd_show_interface_quick:
          __XML__OPT_Cmd_show_interface___readonly__:
            __readonly__:
              TABLE_interface:
                ROW_interface:
                - admin_state: up
                  encapsulation: ARPA
                  eth_autoneg: 'on'
                  eth_bia_addr: x254.005a.f8b5
                  eth_bw: '1000000'

```
 Advanced use cases
------------------

 The `cli_parse` module supports several features to support more complex uses cases.

 ### Provide a full template path

 Use the `template_path` option to override the default template path in the task:

 
```
- name: "Run command and parse with native"
  ansible.netcommon.cli_parse:
    command: show interface
    parser:
      name: ansible.netcommon.native
      template_path: /home/user/templates/filename.yaml

```
 ### Provide command to parser different than the command run

 Use the `command` suboption for the `parser` to configure the command the parser expects if it is different from the command `cli_parse` runs:

 
```
- name: "Run command and parse with native"
  ansible.netcommon.cli_parse:
    command: sho int
    parser:
      name: ansible.netcommon.native
      command: show interface

```
 ### Provide a custom OS value

 Use the `os` suboption to the parser to directly set the OS instead of using `ansible_network_os` or `ansible_distribution` to generate the template path or with the specified parser engine:

 
```
- name: Use ios instead of iosxe for pyats
  ansible.netcommon.cli_parse:
    command: show something
    parser:
      name: ansible.netcommon.pyats
      os: ios

- name: Use linux instead of fedora from ansible_distribution
  ansible.netcommon.cli_parse:
    command: ps -ef
    parser:
      name: ansible.netcommon.native
      os: linux

```
 ### Parse existing text

 Use the `text` option instead of `command` to parse text collected earlier in the playbook.

 
```
# using /home/user/templates/filename.yaml
- name: "Parse text from previous task"
  ansible.netcommon.cli_parse:
    text: "{{ output['stdout'] }}"
    parser:
      name: ansible.netcommon.native
      template_path: /home/user/templates/filename.yaml

 # using /home/user/templates/filename.yaml
- name: "Parse text from file"
  ansible.netcommon.cli_parse:
    text: "{{ lookup('file', 'path/to/file.txt') }}"
    parser:
      name: ansible.netcommon.native
      template_path: /home/user/templates/filename.yaml

# using templates/nxos_show_version.yaml
- name: "Parse text from previous task"
  ansible.netcommon.cli_parse:
    text: "{{ sho_version['stdout'] }}"
    parser:
      name: ansible.netcommon.native
      os: nxos
      command: show version

```
  See also

 * [Developing cli\_parser plugins in a collection](../dev_guide/developing_plugins_network#develop-cli-parse-plugins)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/cli_parsing.html>

Working with command output and prompts in network modules
==========================================================

 * [Conditionals in networking modules](#conditionals-in-networking-modules)
* [Handling prompts in network modules](#handling-prompts-in-network-modules)

 Conditionals in networking modules
----------------------------------

 Ansible allows you to use conditionals to control the flow of your playbooks. Ansible networking command modules use the following unique conditional statements.

 * `eq` - Equal
* `neq` - Not equal
* `gt` - Greater than
* `ge` - Greater than or equal
* `lt` - Less than
* `le` - Less than or equal
* `contains` - Object contains specified item

 Conditional statements evaluate the results from the commands that are executed remotely on the device. Once the task executes the command set, the `wait_for` argument can be used to evaluate the results before returning control to the Ansible playbook.

 For example:

 
```
---
- name: wait for interface to be admin enabled
  arista.eos.eos_command:
      commands:
          - show interface Ethernet4 | json
      wait_for:
          - "result[0].interfaces.Ethernet4.interfaceStatus eq connected"

```
 In the above example task, the command `show interface Ethernet4 | json` is executed on the remote device and the results are evaluated. If the path `(result[0].interfaces.Ethernet4.interfaceStatus)` is not equal to “connected”, then the command is retried. This process continues until either the condition is satisfied or the number of retries has expired (by default, this is 10 retries at 1 second intervals).

 The commands module can also evaluate more than one set of command results in an interface. For instance:

 
```
---
- name: wait for interfaces to be admin enabled
  arista.eos.eos_command:
      commands:
          - show interface Ethernet4 | json
          - show interface Ethernet5 | json
      wait_for:
          - "result[0].interfaces.Ethernet4.interfaceStatus eq connected"
          - "result[1].interfaces.Ethernet5.interfaceStatus eq connected"

```
 In the above example, two commands are executed on the remote device, and the results are evaluated. By specifying the result index value (0 or 1), the correct result output is checked against the conditional.

 The `wait_for` argument must always start with result and then the command index in `[]`, where `0` is the first command in the commands list, `1` is the second command, `2` is the third and so on.

 Handling prompts in network modules
-----------------------------------

 Network devices may require that you answer a prompt before performing a change on the device. Individual network modules such as [cisco.ios.ios\_command](../../collections/cisco/ios/ios_command_module#ansible-collections-cisco-ios-ios-command-module) and [cisco.nxos.nxos\_command](../../collections/cisco/nxos/nxos_command_module#ansible-collections-cisco-nxos-nxos-command-module) can handle this with a `prompt` parameter.

  Note

 `prompt` is a Python regex. If you add special characters such as `?` in the `prompt` value, the prompt won’t match and you will get a timeout. To avoid this, ensure that the `prompt` value is a Python regex that matches the actual device prompt. Any special characters must be handled correctly in the `prompt` regex.

  You can also use the [ansible.netcommon.cli\_command](../../collections/ansible/netcommon/cli_command_module#ansible-collections-ansible-netcommon-cli-command-module) to handle multiple prompts.

 
```
---
- name: multiple prompt, multiple answer (mandatory check for all prompts)
  ansible.netcommon.cli_command:
    command: "copy sftp sftp://user@host//user/test.img"
    check_all: True
    prompt:
      - "Confirm download operation"
      - "Password"
      - "Do you want to change that to the standby image"
    answer:
      - 'y'
      - <password>
      - 'y'

```
 You must list the prompt and the answers in the same order (that is, prompt[0] is answered by answer[0]).

 In the above example, `check_all: True` ensures that the task gives the matching answer to each prompt. Without that setting, a task with multiple prompts would give the first answer to every prompt.

 In the following example, the second answer would be ignored and `y` would be the answer given to both prompts. That is, this task only works because both answers are identical. Also notice again that `prompt` must be a Python regex, which is why the `?` is escaped in the first prompt.

 
```
---
 - name: reboot ios device
   ansible.netcommon.cli_command:
     command: reload
     prompt:
       - Save\?
       - confirm
     answer:
       - y
       - y

```
  See also

  [Rebooting network devices with Ansible](https://www.ansible.com/blog/rebooting-network-devices-with-ansible)

Examples using `wait_for`, `wait_for_connection`, and `prompt` for network devices.

  [Deep dive on cli\_command](https://www.ansible.com/blog/deep-dive-on-cli-command-for-network-automation)

Detailed overview of how to use the `cli_command`.

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/network_working_with_command_output.html>

Ansible Network FAQ
===================

 * [How can I improve performance for network playbooks?](#how-can-i-improve-performance-for-network-playbooks)


	+ [Consider `strategy: free` if you are running on multiple hosts](#consider-strategy-free-if-you-are-running-on-multiple-hosts)
	+ [Execute `show running` only if you absolutely must](#execute-show-running-only-if-you-absolutely-must)
	+ [Use `ProxyCommand` only if you absolutely must](#use-proxycommand-only-if-you-absolutely-must)
	+ [Set `--forks` to match your needs](#set-forks-to-match-your-needs)
* [Why is my output sometimes replaced with `********`?](#why-is-my-output-sometimes-replaced-with)
* [Why do the `*_config` modules always return `changed=true` with abbreviated commands?](#why-do-the-config-modules-always-return-changed-true-with-abbreviated-commands)


How can I improve performance for network playbooks?
----------------------------------------------------

 ### Consider `strategy: free` if you are running on multiple hosts

 The `strategy` plugin tells Ansible how to order multiple tasks on multiple hosts. [Strategy](../../plugins/strategy#strategy-plugins) is set at the playbook level.

 The default strategy is `linear`. With strategy set to `linear`, Ansible waits until the current task has run on all hosts before starting the next task on any host. Ansible may have forks free, but will not use them until all hosts have completed the current task. If each task in your playbook must succeed on all hosts before you run the next task, use the `linear` strategy.

 Using the `free` strategy, Ansible uses available forks to execute tasks on each host as quickly as possible. Even if an earlier task is still running on one host, Ansible executes later tasks on other hosts. The `free` strategy uses available forks more efficiently. If your playbook stalls on each task, waiting for one slow host, consider using `strategy: free` to boost overall performance.

 ### Execute `show running` only if you absolutely must

 The `show running` command is the most resource-intensive command to execute on a network device, because of the way queries are handled by the network OS. Using the command in your Ansible playbook will slow performance significantly, especially on large devices; repeating it will multiply the performance hit. If you have a playbook that checks the running config, then executes changes, then checks the running config again, you should expect that playbook to be very slow.

 ### Use `ProxyCommand` only if you absolutely must

 Network modules support the use of a [proxy or jump host](network_debug_troubleshooting#network-delegate-to-vs-proxycommand) with the `ProxyCommand` parameter. However, when you use a jump host, Ansible must open a new SSH connection for every task, even if you are using a persistent connection type (`network_cli` or `netconf`). To maximize the performance benefits of the persistent connection types introduced in version 2.5, avoid using jump hosts whenever possible.

 ### Set `--forks` to match your needs

 Every time Ansible runs a task, it forks its own process. The `--forks` parameter defines the number of concurrent tasks - if you retain the default setting, which is `--forks=5`, and you are running a playbook on 10 hosts, five of those hosts will have to wait until a fork is available. Of course, the more forks you allow, the more memory and processing power Ansible will use. Since most network tasks are run on the control host, this means your laptop can quickly become cpu- or memory-bound.

 Why is my output sometimes replaced with `********`?
----------------------------------------------------

 Ansible replaces any string marked `no_log`, including passwords, with `********` in Ansible output. This is done by design, to protect your sensitive data. Most users are happy to have their passwords redacted. However, Ansible replaces every string that matches your password with `********`. If you use a common word for your password, this can be a problem. For example, if you choose `Admin` as your password, Ansible will replace every instance of the word `Admin` with `********` in your output. This may make your output harder to read. To avoid this problem, select a secure password that will not occur elsewhere in your Ansible output.

 Why do the `*_config` modules always return `changed=true` with abbreviated commands?
-------------------------------------------------------------------------------------

 When you issue commands directly on a network device, you can use abbreviated commands. For example, `int g1/0/11` and `interface GigabitEthernet1/0/11` do the same thing; `shut` and `shutdown` do the same thing. Ansible Network `*_command` modules work with abbreviations, because they run commands through the network OS.

 When committing configuration, however, the network OS converts abbreviations into long-form commands. Whether you use `shut` or `shutdown` on `GigabitEthernet1/0/11`, the result in the configuration is the same: `shutdown`.

 Ansible Network `*_config` modules compare the text of the commands you specify in `lines` to the text in the configuration. If you use `shut` in the `lines` section of your task, and the configuration reads `shutdown`, the module returns `changed=true` even though the configuration is already correct. Your task will update the configuration every time it runs.

 To avoid this problem, use long-form commands with the `*_config` modules:

 
```
---
- hosts: all
  gather_facts: no
  tasks:
    - cisco.ios.ios_config:
        lines:
          - shutdown
        parents: interface GigabitEthernet1/0/11

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/faq.html>

Developing network resource modules
===================================

 * [Understanding network and security resource modules](#understanding-network-and-security-resource-modules)
* [Developing network and security resource modules](#developing-network-and-security-resource-modules)


	+ [Understanding the model and resource module builder](#understanding-the-model-and-resource-module-builder)
	+ [Accessing the resource module builder](#accessing-the-resource-module-builder)
	+ [Creating a model](#creating-a-model)
	+ [Creating a collection scaffold from a resource model](#creating-a-collection-scaffold-from-a-resource-model)
* [Examples](#examples)


	+ [Collection directory layout](#collection-directory-layout)
	+ [Role directory layout](#role-directory-layout)
	+ [Using the collection](#using-the-collection)
	+ [Using the role](#using-the-role)
* [Resource module structure and workflow](#resource-module-structure-and-workflow)
* [Running `ansible-test sanity` and `tox` on resource modules](#running-ansible-test-sanity-and-tox-on-resource-modules)
* [Testing resource modules](#testing-resource-modules)


	+ [Resource module integration tests](#resource-module-integration-tests)
	+ [Unit test requirements](#unit-test-requirements)
* [Example: Unit testing Ansible network resource modules](#example-unit-testing-ansible-network-resource-modules)


	+ [Using mock objects to unit test Ansible network resource modules](#using-mock-objects-to-unit-test-ansible-network-resource-modules)
	+ [Mocking device data](#mocking-device-data)

 Understanding network and security resource modules
---------------------------------------------------

 Network and security devices separate configuration into sections (such as interfaces, VLANs, and so on) that apply to a network or security service. Ansible resource modules take advantage of this to allow users to configure subsections or resources within the device configuration. Resource modules provide a consistent experience across different network and security devices. For example, a network resource module may only update the configuration for a specific portion of the network interfaces, VLANs, ACLs, and so on for a network device. The resource module:

 1. Fetches a piece of the configuration (fact gathering), for example, the interfaces configuration.
2. Converts the returned configuration into key-value pairs.
3. Places those key-value pairs into an internal agnostic structured data format.

 Now that the configuration data is normalized, the user can update and modify the data and then use the resource module to send the configuration data back to the device. This results in a full round-trip configuration update without the need for manual parsing, data manipulation, and data model management.

 The resource module has two top-level keys - `config` and `state`:

 * `config` defines the resource configuration data model as key-value pairs. The type of the `config` option can be `dict` or `list of dict` based on the resource managed. That is, if the device has a single global configuration, it should be a `dict` (for example, a global LLDP configuration). If the device has multiple instances of configuration, it should be of type `list` with each element in the list of type `dict` (for example, interfaces configuration).
* `state` defines the action the resource module takes on the end device.

 The `state` for a new resource module should support the following values (as applicable for the devices that support them):

  merged

Ansible merges the on-device configuration with the provided configuration in the task.

  replaced

Ansible replaces the on-device configuration subsection with the provided configuration subsection in the task.

  overridden

Ansible overrides the on-device configuration for the resource with the provided configuration in the task. Use caution with this state as you could remove your access to the device (for example, by overriding the management interface configuration).

  deleted

Ansible deletes the on-device configuration subsection and restores any default settings.

  gathered

Ansible displays the resource details gathered from the network device and accessed with the `gathered` key in the result.

  rendered

Ansible renders the provided configuration in the task in the device-native format (for example, Cisco IOS CLI). Ansible returns this rendered configuration in the `rendered` key in the result. Note this state does not communicate with the network device and can be used offline.

  parsed

Ansible parses the configuration from the `running_configuration` option into Ansible structured data in the `parsed` key in the result. Note this does not gather the configuration from the network device so this state can be used offline.

   Modules in Ansible-maintained collections must support these state values. If you develop a module with only “present” and “absent” for state, you may submit it to a community collection.

  Note

 The states `rendered`, `gathered`, and `parsed` do not perform any change on the device.

   See also

  [Deep Dive on VLANs Resource Modules for Network Automation](https://www.ansible.com/blog/deep-dive-on-vlans-resource-modules-for-network-automation)

Walkthrough of how state values are implemented for VLANs.

    Developing network and security resource modules
------------------------------------------------

 The Ansible Engineering team ensures the module design and code pattern within Ansible-maintained collections is uniform across resources and across platforms to give a vendor-agnostic feel and deliver good quality code. We recommend you use the [resource module builder](https://github.com/ansible-network/resource_module_builder) to develop a resource module.

 The highlevel process for developing a resource module is:

 1. Create and share a resource model design in the [resource module models repository](https://github.com/ansible-network/resource_module_models) as a PR for review.
2. Download the latest version of the [resource module builder](https://github.com/ansible-network/resource_module_builder).
3. Run the `resource module builder` to create a collection scaffold from your approved resource model.
4. Write the code to implement your resource module.
5. Develop integration and unit tests to verify your resource module.
6. Create a PR to the appropriate collection that you want to add your new resource module to. See [Contributing to Ansible-maintained Collections](https://docs.ansible.com/ansible/latest/community/contributing_maintained_collections.html#contributing-maintained-collections) for details on determining the correct collection for your module.

 ### Understanding the model and resource module builder

 The resource module builder is an Ansible Playbook that helps developers scaffold and maintain an Ansible resource module. It uses a model as the single source of truth for the module. This model is a `yaml` file that is used for the module DOCUMENTATION section and the argument spec.

 The resource module builder has the following capabilities:

 * Uses a defined model to scaffold a resource module directory layout and initial class files.
* Scaffolds either an Ansible role or a collection.
* Subsequent uses of the resource module builder will only replace the module arspec and file containing the module docstring.
* Allows you to store complex examples along side the model in the same directory.
* Maintains the model as the source of truth for the module and use resource module builder to update the source files as needed.
* Generates working sample modules for both `<network_os>_<resource>` and `<network_os>_facts`.

 ### Accessing the resource module builder

 To access the resource module builder:

 1. clone the github repository:

 
```
git clone https://github.com/ansible-network/resource_module_builder.git

```
 2. Install the requirements:

 
```
pip install -r requirements.txt

```
 ### Creating a model

 You must create a model for your new resource. The model is the single source of truth for both the argspec and docstring, keeping them in sync. Once your model is approved, you can use the resource module builder to generate three items based on the model:

 * The scaffold for a new module
* The argspec for the new module
* The docstring for the new module

 For any subsequent changes to the functionality, update the model first and use the resource module builder to update the module argspec and docstring.

 For example, the resource model builder includes the `myos_interfaces.yml` sample in the `models` directory, as seen below:

 
```
---
GENERATOR_VERSION: '1.0'

NETWORK_OS: myos
RESOURCE: interfaces
COPYRIGHT: Copyright 2019 Red Hat
LICENSE: gpl-3.0.txt

DOCUMENTATION: |
  module: myos_interfaces
  version_added: 1.0.0
  short_description: 'Manages <xxxx> attributes of <network_os> <resource>'
  description: 'Manages <xxxx> attributes of <network_os> <resource>.'
  author: Ansible Network Engineer
 notes:
    - 'Tested against <network_os> <version>'
  options:
    config:
      description: The provided configuration
      type: list
      elements: dict
      suboptions:
        name:
          type: str
          description: The name of the <resource>
        some_string:
          type: str
          description:
          - The some_string_01
          choices:
          - choice_a
          - choice_b
          - choice_c
          default: choice_a
        some_bool:
          description:
          - The some_bool.
          type: bool
        some_int:
          description:
          - The some_int.
          type: int
          version_added: '1.1.0'
        some_dict:
          type: dict
          description:
          - The some_dict.
          suboptions:
            property_01:
              description:
              - The property_01
              type: str
    state:
      description:
      - The state of the configuration after module completion.
      type: str
      choices:
      - merged
      - replaced
      - overridden
      - deleted
      default: merged
EXAMPLES:
  - deleted_example_01.txt
  - merged_example_01.txt
  - overridden_example_01.txt
  - replaced_example_01.txt

```
 Notice that you should include examples for each of the states that the resource supports. The resource module builder also includes these in the sample model.

 Share this model as a PR for review at [resource module models repository](https://github.com/ansible-network/resource_module_models). You can also see more model examples at that location.

 ### Creating a collection scaffold from a resource model

 To use the resource module builder to create a collection scaffold from your approved resource model:

 
```
ansible-playbook -e rm_dest=<destination for modules and module utils> \
                 -e structure=collection \
                 -e collection_org=<collection_org> \
                 -e collection_name=<collection_name> \
                 -e model=<model> \
                 site.yml

```
 Where the parameters are as follows:

 * `rm_dest`: The directory where the resource module builder places the files and directories for the resource module and facts modules.
* `structure`: The directory layout type (role or collection)


	+ `role`: Generate a role directory layout.
	+ `collection`: Generate a collection directory layout.
* `collection_org`: The organization of the collection, required when `structure=collection`.
* `collection_name`: The name of the collection, required when `structure=collection`.
* `model`: The path to the model file.

 To use the resource module builder to create a role scaffold:

 
```
ansible-playbook -e rm_dest=<destination for modules and module utils> \
                 -e structure=role \
                 -e model=<model> \
                 site.yml

```
 Examples
--------

 ### Collection directory layout

 This example shows the directory layout for the following:

 * `network_os`: myos
* `resource`: interfaces

 
```
ansible-playbook -e rm_dest=~/github/rm_example \
                 -e structure=collection \
                 -e collection_org=cidrblock \
                 -e collection_name=my_collection \
                 -e model=models/myos/interfaces/myos_interfaces.yml \
                 site.yml

```
 
```
├── docs
├── LICENSE.txt
├── playbooks
├── plugins
|   ├── action
|   ├── filter
|   ├── inventory
|   ├── modules
|   |   ├── __init__.py
|   |   ├── myos_facts.py
|   |   └──  myos_interfaces.py
|   └──  module_utils
|       ├── __init__.py
|       └──  network
|           ├── __init__.py
|           └──  myos
|               ├── argspec
|               |   ├── facts
|               |   |   ├── facts.py
|               |   |   └──  __init__.py
|               |   ├── __init__.py
|               |   └──  interfaces
|               |       ├── __init__.py
|               |       └──  interfaces.py
|               ├── config
|               |   ├── __init__.py
|               |   └──  interfaces
|               |       ├── __init__.py
|               |       └──  interfaces.py
|               ├── facts
|               |   ├── facts.py
|               |   ├── __init__.py
|               |   └──  interfaces
|               |       ├── __init__.py
|               |       └──  interfaces.py
|               ├── __init__.py
|               └──  utils
|                   ├── __init__.py
|                   └──  utils.py
├── README.md
└──  roles

```
 ### Role directory layout

 This example displays the role directory layout for the following:

 * `network_os`: myos
* `resource`: interfaces

 
```
ansible-playbook -e rm_dest=~/github/rm_example/roles/my_role \
                 -e structure=role \
                 -e model=models/myos/interfaces/myos_interfaces.yml \
                 site.yml

```
 
```
roles
└── my_role
    ├── library
    │   ├── __init__.py
    │   ├── myos_facts.py
    │   └── myos_interfaces.py
    ├── LICENSE.txt
    ├── module_utils
    │   ├── __init__.py
    │   └── network
    │       ├── __init__.py
    │       └── myos
    │           ├── argspec
    │           │   ├── facts
    │           │   │   ├── facts.py
    │           │   │   └── __init__.py
    │           │   ├── __init__.py
    │           │   └── interfaces
    │           │       ├── __init__.py
    │           │       └── interfaces.py
    │           ├── config
    │           │   ├── __init__.py
    │           │   └── interfaces
    │           │       ├── __init__.py
    │           │       └── interfaces.py
    │           ├── facts
    │           │   ├── facts.py
    │           │   ├── __init__.py
    │           │   └── interfaces
    │           │       ├── __init__.py
    │           │       └── interfaces.py
    │           ├── __init__.py
    │           └── utils
    │               ├── __init__.py
    │               └── utils.py
    └── README.md

```
 ### Using the collection

 This example shows how to use the generated collection in a playbook:

 
```
----
- hosts: myos101
  gather_facts: False
  tasks:
  - cidrblock.my_collection.myos_interfaces:
    register: result
  - debug:
      var: result
  - cidrblock.my_collection.myos_facts:
  - debug:
      var: ansible_network_resources

```
 ### Using the role

 This example shows how to use the generated role in a playbook:

 
```
- hosts: myos101
  gather_facts: False
  roles:
  - my_role

- hosts: myos101
  gather_facts: False
  tasks:
  - myos_interfaces:
    register: result
  - debug:
      var: result
  - myos_facts:
  - debug:
      var: ansible_network_resources

```
 Resource module structure and workflow
--------------------------------------

 The resource module structure includes the following components:

  Module

* `library/<ansible_network_os>_<resource>.py`.
* Imports the `module_utils` resource package and calls `execute_module` API:

 
```
def main():
    result = <resource_package>(module).execute_module()

```
  Module argspec

* `module_utils/<ansible_network_os>/argspec/<resource>/`.
* Argspec for the resource.

  Facts

* `module_utils/<ansible_network_os>/facts/<resource>/`.
* Populate facts for the resource.
* Entry in `module_utils/<ansible_network_os>/facts/facts.py` for `get_facts` API to keep `<ansible_network_os>_facts` module and facts gathered for the resource module in sync for every subset.
* Entry of Resource subset in FACTS\_RESOURCE\_SUBSETS list in `module_utils/<ansible_network_os>/facts/facts.py` to make facts collection work.

  Module package in module\_utils

* `module_utils/<ansible_network_os>/<config>/<resource>/`.
* Implement `execute_module` API that loads the configuration to device and generates the result with `changed`, `commands`, `before` and `after` keys.
* Call `get_facts` API that returns the `<resource>` configuration facts or return the difference if the device has onbox diff support.
* Compare facts gathered and given key-values if diff is not supported.
* Generate final configuration.

  Utils

* `module_utils/<ansible_network_os>/utils`.
* Utilities for the `<ansible_network_os>` platform.

   Running `ansible-test sanity` and `tox` on resource modules
-----------------------------------------------------------

 You should run `ansible-test sanity` and `tox -elinters` from the collection root directory before pushing your PR to an Ansible-maintained collection. The CI runs both and will fail if these tests fail. See [Testing Ansible](https://docs.ansible.com/ansible/latest/dev_guide/testing.html#developing-testing) for details on `ansible-test sanity`.

 To install the necessary packages:

 1. Ensure you have a valid Ansible development environment configured. See [Preparing an environment for developing Ansible modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#environment-setup) for details.
2. Run `pip install -r requirements.txt` from the collection root directory.

 Running `tox -elinters`:

 * Reads `tox.ini` from the collection root directory and installs required dependencies (such as `black` and `flake8`).
* Runs these with preconfigured options (such as line-length and ignores.)
* Runs `black` in check mode to show which files will be formatted without actually formatting them.

 Testing resource modules
------------------------

 The tests rely on a role generated by the resource module builder. After changes to the resource module builder, the role should be regenerated and the tests modified and run as needed. To generate the role after changes:

 
```
rm -rf rmb_tests/roles/my_role
ansible-playbook -e rm_dest=./rmb_tests/roles/my_role \
                 -e structure=role \
                 -e model=models/myos/interfaces/myos_interfaces.yml \
                 site.yml

```
 ### Resource module integration tests

 High-level integration test requirements for new resource modules are as follows:

 1. Write a test case for every state.
2. Write additional test cases to test the behavior of the module when an empty `config.yaml` is given.
3. Add a round trip test case. This involves a `merge` operation, followed by `gather_facts`, a `merge` update with additional configuration, and then reverting back to the base configuration using the previously gathered facts with the `state` set to `overridden`.
4. Wherever applicable, assertions should check after and before `dicts` against a hard coded Source of Truth.

 We use Zuul as the CI to run the integration test.

 * To view the report, click Details on the CI comment in the PR
* To view a failure report, click ansible/check and select the failed test.
* To view logs while the test is running, check for your PR number in the [Zull status board](https://dashboard.zuul.ansible.com/t/ansible/status).
* To fix static test failure locally, run the **tox -e black** **inside the root folder of collection**.

 To view The Ansible run logs and debug test failures:

 1. Click the failed job to get the summary, and click Logs for the log.
2. Click console and scroll down to find the failed test.
3. Click > next to the failed test for complete details.

 #### Integration test structure

 Each test case should generally follow this pattern:

 * setup —> test —> assert —> test again (for idempotency) —> assert —> tear down (if needed) -> done. This keeps test playbooks from becoming monolithic and difficult to troubleshoot.
* Include a name for each task that is not an assertion. You can add names to assertions as well, but it is easier to identify the broken task within a failed test if you add a name for each task.
* Files containing test cases must end in `.yaml`

 #### Implementation

 For platforms that support `connection: local` *and* `connection: network_cli` use the following guidance:

 * Name the `targets/` directories after the module name.
* The `main.yaml` file should just reference the transport.

 The following example walks through the integration tests for the `vyos.vyos.vyos_l3_interfaces` module in the [vyos.vyos](https://github.com/ansible-collections/vyos.vyos/tree/master/tests/integration) collection:

 `test/integration/targets/vyos_l3_interfaces/tasks/main.yaml`

 
```
---
- include: cli.yaml
  tags:
    - cli

```
 `test/integration/targets/vyos_l3_interfaces/tasks/cli.yaml`

 
```
---
- name: collect all cli test cases
  find:
    paths: "{{ role_path }}/tests/cli"
    patterns: "{{ testcase }}.yaml"
  register: test_cases
  delegate_to: localhost

- name: set test_items
  set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

- name: run test cases (connection=network_cli)
  include: "{{ test_case_to_run }} ansible_connection=network_cli"
  with_items: "{{ test_items }}"
  loop_control:
    loop_var: test_case_to_run

- name: run test case (connection=local)
  include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no"
  with_first_found: "{{ test_items }}"
  loop_control:
    loop_var: test_case_to_run

```
 `test/integration/targets/vyos_l3_interfaces/tests/cli/overridden.yaml`

 
```
---
- debug:
 msg: START vyos_l3_interfaces merged integration tests on connection={{ ansible_connection
   }}

- include_tasks: _remove_config.yaml

- block:

 - include_tasks: _populate.yaml

 - name: Overrides all device configuration with provided configuration
   register: result
   vyos.vyos.vyos_l3_interfaces: &id001
     config:

       - name: eth0
         ipv4:

           - address: dhcp

       - name: eth1
         ipv4:

           - address: 192.0.2.15/24
     state: overridden

 - name: Assert that before dicts were correctly generated
   assert:
     that:
       - "{{ populate | symmetric_difference(result['before']) |length == 0 }}"

 - name: Assert that correct commands were generated
   assert:
     that:
       - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
         \ |length == 0 }}"

 - name: Assert that after dicts were correctly generated
   assert:
     that:
       - "{{ overridden['after'] | symmetric_difference(result['after']) |length\
         \ == 0 }}"

 - name: Overrides all device configuration with provided configurations (IDEMPOTENT)
   register: result
   vyos.vyos.vyos_l3_interfaces: *id001

 - name: Assert that the previous task was idempotent
   assert:
     that:
       - result['changed'] == false

 - name: Assert that before dicts were correctly generated
   assert:
     that:
       - "{{ overridden['after'] | symmetric_difference(result['before']) |length\
         \ == 0 }}"
always:

 - include_tasks: _remove_config.yaml

```
 #### Detecting test resources at runtime

 Your tests should detect resources (such as interfaces) at runtime rather than hard-coding them into the test. This allows the test to run on a variety of systems.

 For example:

 
```
- name: Collect interface list
  connection: ansible.netcommon.network_cli
  register: intout
  cisco.nxos.nxos_command:
    commands:
      - show interface brief | json

- set_fact:
    intdataraw: "{{ intout.stdout_lines[0]['TABLE_interface']['ROW_interface'] }}"

- set_fact:
    nxos_int1: '{{ intdataraw[1].interface }}'

- set_fact:
    nxos_int2: '{{ intdataraw[2].interface }}'

- set_fact:
    nxos_int3: '{{ intdataraw[3].interface }}'

```
 See the complete test example of this at <https://github.com/ansible-collections/cisco.nxos/blob/master/tests/integration/targets/prepare_nxos_tests/tasks/main.yml>.

 #### Running network integration tests

 Ansible uses Zuul to run an integration test suite on every PR, including new tests introduced by that PR. To find and fix problems in network modules, run the network integration test locally before you submit a PR.

 First, create an inventory file that points to your test machines. The inventory group should match the platform name (for example, `eos`, `ios`):

 
```
cd test/integration
cp inventory.network.template inventory.networking
${EDITOR:-vi} inventory.networking
# Add in machines for the platform(s) you wish to test

```
 To run these network integration tests, use `ansible-test network-integration --inventory </path/to/inventory> <tests_to_run>`:

 
```
ansible-test network-integration  --inventory ~/myinventory -vvv vyos_facts
ansible-test network-integration  --inventory ~/myinventory -vvv vyos_.*

```
 To run all network tests for a particular platform:

 
```
ansible-test network-integration --inventory  /path/to-collection-module/test/integration/inventory.networking vyos_.*

```
 This example will run against all `vyos` modules. Note that `vyos_.*` is a regex match, not a bash wildcard - include the `.` if you modify this example.

 To run integration tests for a specific module:

 
```
ansible-test network-integration --inventory  /path/to-collection-module/test/integration/inventory.networking vyos_l3_interfaces

```
 To run a single test case on a specific module:

 
```
# Only run vyos_l3_interfaces/tests/cli/gathered.yaml
ansible-test network-integration --inventory  /path/to-collection-module/test/integration/inventory.networking vyos_l3_interfaces --testcase gathered

```
 To run integration tests for a specific transport:

 
```
 # Only run nxapi test
ansible-test network-integration --inventory  /path/to-collection-module/test/integration/inventory.networking  --tags="nxapi" nxos_.*

# Skip any cli tests
 ansible-test network-integration --inventory  /path/to-collection-module/test/integration/inventory.networking  --skip-tags="cli" nxos_.*

```
 See [test/integration/targets/nxos\_bgp/tasks/main.yaml](https://github.com/ansible-collections/cisco.nxos/blob/master/tests/integration/targets/nxos_bgp/tasks/main.yaml) for how this is implemented in the tests.

 For more options:

 
```
ansible-test network-integration --help

```
 If you need additional help or feedback, reach out in the `#ansible-network` IRC channel on the [irc.libera.chat](https://libera.chat/) IRC network.

 ### Unit test requirements

 High-level unit test requirements that new resource modules should follow:

 1. Write test cases for all the states with all possible combinations of config values.
2. Write test cases to test the error conditions ( negative scenarios).
3. Check the value of `changed` and `commands` keys in every test case.

 We run all unit test cases on our Zuul test suite, on the latest python version supported by our CI setup.

 Use the [same procedure](#using-zuul-resource-modules) as the integration tests to view Zuul unit tests reports and logs.

 See [unit module testing](https://docs.ansible.com/ansible/latest/dev_guide/testing_units_modules.html#testing-units-modules) for general unit test details.

 Example: Unit testing Ansible network resource modules
------------------------------------------------------

 This section walks through an example of how to develop unit tests for Ansible resource modules.

 See [Unit Tests](https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html#testing-units) and [Unit Testing Ansible Modules](https://docs.ansible.com/ansible/latest/dev_guide/testing_units_modules.html#testing-units-modules) for general documentation on Ansible unit tests for modules. Please read those pages first to understand unit tests and why and when you should use them.

 ### Using mock objects to unit test Ansible network resource modules

 [Mock objects](https://docs.python.org/3/library/unittest.mock.html) can be very useful in building unit tests for special or difficult cases, but they can also lead to complex and confusing coding situations. One good use for mocks would be to simulate an API. The `mock` Python package is bundled with Ansible (use `import units.compat.mock`).

 You can mock the device connection and output from the device as follows:

 
```
self.mock_get_config = patch( "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
)
self.get_config = self.mock_get_config.start()

self.mock_load_config = patch(
"ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
)
self.load_config = self.mock_load_config.start()

self.mock_get_resource_connection_config = patch(
"ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base.get_resource_connection"
)
self.get_resource_connection_config = (self.mock_get_resource_connection_config.start())

self.mock_get_resource_connection_facts = patch(
"ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
)
self.get_resource_connection_facts = (self.mock_get_resource_connection_facts.start())

self.mock_edit_config = patch(
"ansible_collections.arista.eos.plugins.module_utils.network.eos.providers.providers.CliProvider.edit_config"
)
self.edit_config = self.mock_edit_config.start()

self.mock_execute_show_command = patch(
"ansible_collections.arista.eos.plugins.module_utils.network.eos.facts.l2_interfaces.l2_interfaces.L2_interfacesFacts.get_device_data"
)
self.execute_show_command = self.mock_execute_show_command.start()

```
 The facts file of the module now includes a new method, `get_device_data`. Call `get_device_data` here to emulate the device output.

 ### Mocking device data

 To mock fetching results from devices or provide other complex data structures that come from external libraries, you can use `fixtures` to read in pre-generated data. The text files for this pre-generated data live in `test/units/modules/network/PLATFORM/fixtures/`. See for example the [eos\_l2\_interfaces.cfg file](https://github.com/ansible-collections/arista.eos/blob/master/tests/unit/modules/network/eos/fixtures/eos_l2_interfaces_config.cfg).

 Load data using the `load_fixture` method and set this data as the return value of the `get_device_data` method in the facts file:

 
```
def load_fixtures(self, commands=None, transport='cli'):
    def load_from_file(*args, **kwargs):
        return load_fixture('eos_l2_interfaces_config.cfg')
    self.execute_show_command.side_effect = load_from_file

```
 See the unit test file [test\_eos\_l2\_interfaces](https://github.com/ansible-collections/arista.eos/blob/master/tests/unit/modules/network/eos/test_eos_l2_interfaces.py) for a practical example.

  See also

  [Unit Tests](https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html#testing-units)

Deep dive into developing unit tests for Ansible modules

  [Testing Ansible](https://docs.ansible.com/ansible/latest/dev_guide/testing_running_locally.html#testing-running-locally)

Running tests locally including gathering and reporting coverage data

  [Developing Ansible modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#developing-modules-general)

Get started developing a module

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/dev_guide/developing_resource_modules_network.html>

Developing network plugins
==========================

 You can extend the existing network modules with custom plugins in your collection.

 * [Network connection plugins](#network-connection-plugins)
* [Developing httpapi plugins](#developing-httpapi-plugins)


	+ [Making requests](#making-requests)
	+ [Authenticating](#authenticating)
	+ [Error handling](#error-handling)
* [Developing NETCONF plugins](#developing-netconf-plugins)
* [Developing network\_cli plugins](#developing-network-cli-plugins)
* [Developing cli\_parser plugins in a collection](#developing-cli-parser-plugins-in-a-collection)

 Network connection plugins
--------------------------

 Each network connection plugin has a set of its own plugins which provide a specification of the connection for a particular set of devices. The specific plugin used is selected at runtime based on the value of the `ansible_network_os` variable assigned to the host. This variable should be set to the same value as the name of the plugin to be loaded. Thus, `ansible_network_os=nxos` will try to load a plugin in a file named `nxos.py`, so it is important to name the plugin in a way that will be sensible to users.

 Public methods of these plugins may be called from a module or module\_utils with the connection proxy object just as other connection methods can. The following is a very simple example of using such a call in a module\_utils file so it may be shared with other modules.

 
```
from ansible.module_utils.connection import Connection

def get_config(module):
    # module is your AnsibleModule instance.
    connection = Connection(module._socket_path)

    # You can now call any method (that doesn't start with '_') of the connection
    # plugin or its platform-specific plugin
    return connection.get_config()

```
 Developing httpapi plugins
--------------------------

 [httpapi plugins](../../plugins/httpapi#httpapi-plugins) serve as adapters for various HTTP(S) APIs for use with the `httpapi` connection plugin. They should implement a minimal set of convenience methods tailored to the API you are attempting to use.

 Specifically, there are a few methods that the `httpapi` connection plugin expects to exist.

 ### Making requests

 The `httpapi` connection plugin has a `send()` method, but an httpapi plugin needs a `send_request(self, data, **message_kwargs)` method as a higher-level wrapper to `send()`. This method should prepare requests by adding fixed values like common headers or URL root paths. This method may do more complex work such as turning data into formatted payloads, or determining which path or method to request. It may then also unpack responses to be more easily consumed by the caller.

 
```
from ansible.module_utils.six.moves.urllib.error import HTTPError

def send_request(self, data, path, method='POST'):
    # Fixed headers for requests
    headers = {'Content-Type': 'application/json'}
    try:
        response, response_content = self.connection.send(path, data, method=method, headers=headers)
    except HTTPError as exc:
        return exc.code, exc.read()

    # handle_response (defined separately) will take the format returned by the device
    # and transform it into something more suitable for use by modules.
    # This may be JSON text to Python dictionaries, for example.
    return handle_response(response_content)

```
 ### Authenticating

 By default, all requests will authenticate with HTTP Basic authentication. If a request can return some kind of token to stand in place of HTTP Basic, the `update_auth(self, response, response_text)` method should be implemented to inspect responses for such tokens. If the token is meant to be included with the headers of each request, it is sufficient to return a dictionary which will be merged with the computed headers for each request. The default implementation of this method does exactly this for cookies. If the token is used in another way, say in a query string, you should instead save that token to an instance variable, where the `send_request()` method (above) can add it to each request

 
```
def update_auth(self, response, response_text):
    cookie = response.info().get('Set-Cookie')
    if cookie:
        return {'Cookie': cookie}

    return None

```
 If instead an explicit login endpoint needs to be requested to receive an authentication token, the `login(self, username, password)` method can be implemented to call that endpoint. If implemented, this method will be called once before requesting any other resources of the server. By default, it will also be attempted once when a HTTP 401 is returned from a request.

 
```
def login(self, username, password):
    login_path = '/my/login/path'
    data = {'user': username, 'password': password}

    response = self.send_request(data, path=login_path)
    try:
        # This is still sent as an HTTP header, so we can set our connection's _auth
        # variable manually. If the token is returned to the device in another way,
        # you will have to keep track of it another way and make sure that it is sent
        # with the rest of the request from send_request()
        self.connection._auth = {'X-api-token': response['token']}
    except KeyError:
        raise AnsibleAuthenticationFailure(message="Failed to acquire login token.")

```
 Similarly, `logout(self)` can be implemented to call an endpoint to invalidate and/or release the current token, if such an endpoint exists. This will be automatically called when the connection is closed (and, by extension, when reset).

 
```
def logout(self):
    logout_path = '/my/logout/path'
    self.send_request(None, path=logout_path)

    # Clean up tokens
    self.connection._auth = None

```
 ### Error handling

 The `handle_httperror(self, exception)` method can deal with status codes returned by the server. The return value indicates how the plugin will continue with the request:

 * A value of `true` means that the request can be retried. This my be used to indicate a transient error, or one that has been resolved. For example, the default implementation will try to call `login()` when presented with a 401, and return `true` if successful.
* A value of `false` means that the plugin is unable to recover from this response. The status code will be raised as an exception to the calling module.
* Any other value will be taken as a nonfatal response from the request. This may be useful if the server returns error messages in the body of the response. Returning the original exception is usually sufficient in this case, as HTTPError objects have the same interface as a successful response.

 For example httpapi plugins, see the [source code for the httpapi plugins](https://github.com/ansible/ansible/tree/devel/lib/ansible/plugins/httpapi) included with Ansible Core.

 Developing NETCONF plugins
--------------------------

 The [netconf](https://docs.ansible.com/ansible/2.9/plugins/connection/netconf.html#netconf-connection "(in Ansible v2.9)") connection plugin provides a connection to remote devices over the `SSH NETCONF` subsystem. Network devices typically use this connection plugin to send and receive `RPC` calls over `NETCONF`.

 The `netconf` connection plugin uses the `ncclient` Python library under the hood to initiate a NETCONF session with a NETCONF-enabled remote network device. `ncclient` also executes NETCONF RPC requests and receives responses. You must install the `ncclient` on the local Ansible controller.

 To use the `netconf` connection plugin for network devices that support standard NETCONF ([**RFC 6241**](https://tools.ietf.org/html/rfc6241.html)) operations such as `get`, `get-config`, `edit-config`, set `ansible_network_os=default`. You can use [netconf\_get](https://docs.ansible.com/ansible/2.9/modules/netconf_get_module.html#netconf-get-module "(in Ansible v2.9)"), [netconf\_config](https://docs.ansible.com/ansible/2.9/modules/netconf_config_module.html#netconf-config-module "(in Ansible v2.9)") and [netconf\_rpc](https://docs.ansible.com/ansible/2.9/modules/netconf_rpc_module.html#netconf-rpc-module "(in Ansible v2.9)") modules to talk to a NETCONF enabled remote host.

 As a contributor and user, you should be able to use all the methods under the `NetconfBase` class if your device supports standard NETCONF. You can contribute a new plugin if the device you are working with has a vendor specific NETCONF RPC. To support a vendor specific NETCONF RPC, add the implementation in the network OS specific NETCONF plugin.

 For Junos for example:

 * See the vendor-specific Junos RPC methods implemented in `plugins/netconf/junos.py`.
* Set the value of `ansible_network_os` to the name of the netconf plugin file, that is `junos` in this case.

 Developing network\_cli plugins
-------------------------------

 The [network\_cli](https://docs.ansible.com/ansible/2.9/plugins/connection/network_cli.html#network-cli-connection "(in Ansible v2.9)") connection type uses `paramiko_ssh` under the hood which creates a pseudo terminal to send commands and receive responses. `network_cli` loads two platform specific plugins based on the value of `ansible_network_os`:

 * Terminal plugin (for example `plugins/terminal/ios.py`) - Controls the parameters related to terminal, such as setting terminal length and width, page disabling and privilege escalation. Also defines regex to identify the command prompt and error prompts.
* [Cliconf Plugins](../../plugins/cliconf#cliconf-plugins) (for example, [ios cliconf](https://docs.ansible.com/ansible/2.9/plugins/cliconf/ios.html#ios-cliconf "(in Ansible v2.9)")) - Provides an abstraction layer for low level send and receive operations. For example, the `edit_config()` method ensures that the prompt is in `config` mode before executing configuration commands.

 To contribute a new network operating system to work with the `network_cli` connection, implement the `cliconf` and `terminal` plugins for that network OS.

 The plugins can reside in:

 * Adjacent to playbook in folders

 
```
cliconf_plugins/
terminal_plugins/

```
* Roles

 
```
myrole/cliconf_plugins/
myrole/terminal_plugins/

```
* Collections

 
```
myorg/mycollection/plugins/terminal/
myorg/mycollection/plugins/cliconf/

```

 The user can also set the [DEFAULT\_CLICONF\_PLUGIN\_PATH](../../reference_appendices/config#default-cliconf-plugin-path) to configure the `cliconf` plugin path.

 After adding the `cliconf` and `terminal` plugins in the expected locations, users can:

 * Use the [cli\_command](https://docs.ansible.com/ansible/2.9/modules/cli_command_module.html#cli-command-module "(in Ansible v2.9)") to run an arbitrary command on the network device.
* Use the [cli\_config](https://docs.ansible.com/ansible/2.9/modules/cli_config_module.html#cli-config-module "(in Ansible v2.9)") to implement configuration changes on the remote hosts without platform-specific modules.

 Developing cli\_parser plugins in a collection
----------------------------------------------

 You can use `cli_parse` as an entry point for a cli\_parser plugin in your own collection.

 The following sample shows the start of a custom cli\_parser plugin:

 
```
from ansible_collections.ansible.netcommon.plugins.module_utils.cli_parser.cli_parserbase import (
    CliParserBase,
)

class CliParser(CliParserBase):
    """ Sample cli_parser plugin
    """

    # Use the follow extention when loading a template
    DEFAULT_TEMPLATE_EXTENSION = "txt"
    # Provide the contents of the template to the parse function
    PROVIDE_TEMPLATE_CONTENTS = True

    def myparser(text, template_contents):
      # parse the text using the template contents
      return {...}

    def parse(self, *_args, **kwargs):
        """ Standard entry point for a cli_parse parse execution

        :return: Errors or parsed text as structured data
        :rtype: dict

        :example:

        The parse function of a parser should return a dict:
        {"errors": [a list of errors]}
        or
        {"parsed": obj}
        """
        template_contents = kwargs["template_contents"]
        text = self._task_args.get("text")
        try:
            parsed = myparser(text, template_contents)
        except Exception as exc:
            msg = "Custom parser returned an error while parsing. Error: {err}"
            return {"errors": [msg.format(err=to_native(exc))]}
        return {"parsed": parsed}

```
 The following task uses this custom cli\_parser plugin:

 
```
- name: Use a custom cli_parser
  ansible.netcommon.cli_parse:
    command: ls -l
    parser:
      name: my_organiztion.my_collection.custom_parser

```
 To develop a custom plugin: - Each cli\_parser plugin requires a `CliParser` class. - Each cli\_parser plugin requires a `parse` function. - Always return a dictionary with `errors` or `parsed`. - Place the custom cli\_parser in plugins/cli\_parsers directory of the collection. - See the [current cli\_parsers](https://github.com/ansible-collections/ansible.netcommon/tree/main/plugins/cli_parsers) for examples to follow.

  See also

 * [Parsing semi-structured text with Ansible](../user_guide/cli_parsing#cli-parsing)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/dev_guide/developing_plugins_network.html>

Documenting new network platforms
=================================

 * [Modifying the platform options table](#modifying-the-platform-options-table)
* [Adding a platform-specific options section](#adding-a-platform-specific-options-section)
* [Adding your new file to the table of contents](#adding-your-new-file-to-the-table-of-contents)

 When you create network modules for a new platform, or modify the connections provided by an existing network platform(such as `network_cli` and `httpapi`), you also need to update the [Settings by Platform](../user_guide/platform_index#settings-by-platform) table and add or modify the Platform Options file for your platform.

 You should already have documented each module as described in [Module format and documentation](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_documenting.html#developing-modules-documenting).

 Modifying the platform options table
------------------------------------

 The [Settings by Platform](../user_guide/platform_index#settings-by-platform) table is a convenient summary of the connections options provided by each network platform that has modules in Ansible. Add a row for your platform to this table, in alphabetical order. For example:

 
```
+-------------------+-------------------------+-------------+---------+---------+----------+
| My OS             | ``myos``                | ✓           | ✓       |         | ✓        |

```
 Ensure that the table stays formatted correctly. That is:

 * Each row is inserted in alphabetical order.
* The cell division `|` markers line up with the `+` markers.
* The check marks appear only for the connection types provided by the network modules.

 Adding a platform-specific options section
------------------------------------------

 The platform- specific sections are individual `.rst` files that provide more detailed information for the users of your network platform modules. Name your new file `platform_<name>.rst` (for example, `platform_myos.rst`). The platform name should match the module prefix. See [platform\_eos.rst](https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/network/user_guide/platform_eos.rst) and [EOS Platform Options](../user_guide/platform_eos#eos-platform-options) for an example of the details you should provide in your platform-specific options section.

 Your platform-specific section should include the following:

 * **Connections available table** - a deeper dive into each connection type, including details on credentials, indirect access, connections settings, and enable mode.
* **How to use each connection type** - with working examples of each connection type.

 If your network platform supports SSH connections, also include the following at the bottom of your `.rst` file:

 
```
.. include:: shared_snippets/SSH_warning.txt

```
 Adding your new file to the table of contents
---------------------------------------------

 As a final step, add your new file in alphabetical order in the `platform_index.rst` file. You should then build the documentation to verify your additions. See [Contributing to the Ansible Documentation](https://docs.ansible.com/ansible/latest/community/documentation_contributions.html#community-documentation-contributions) for more details.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/dev_guide/documenting_modules_network.html>

How to build your inventory
===========================

 Ansible works against multiple managed nodes or “hosts” in your infrastructure at the same time, using a list or group of lists known as inventory. Once your inventory is defined, you use [patterns](intro_patterns#intro-patterns) to select the hosts or groups you want Ansible to run against.

 The default location for inventory is a file called `/etc/ansible/hosts`. You can specify a different inventory file at the command line using the `-i <path>` option. You can also use multiple inventory files at the same time as described in [Using multiple inventory sources](#using-multiple-inventory-sources), and/or pull inventory from dynamic or cloud sources or different formats (YAML, ini, and so on), as described in [Working with dynamic inventory](intro_dynamic_inventory#intro-dynamic-inventory). Introduced in version 2.4, Ansible has [Inventory Plugins](../plugins/inventory#inventory-plugins) to make this flexible and customizable.

 * [Inventory basics: formats, hosts, and groups](#inventory-basics-formats-hosts-and-groups)


	+ [Default groups](#default-groups)
	+ [Hosts in multiple groups](#hosts-in-multiple-groups)
	+ [Adding ranges of hosts](#adding-ranges-of-hosts)
* [Adding variables to inventory](#adding-variables-to-inventory)
* [Assigning a variable to one machine: host variables](#assigning-a-variable-to-one-machine-host-variables)


	+ [Inventory aliases](#inventory-aliases)
* [Assigning a variable to many machines: group variables](#assigning-a-variable-to-many-machines-group-variables)


	+ [Inheriting variable values: group variables for groups of groups](#inheriting-variable-values-group-variables-for-groups-of-groups)
* [Organizing host and group variables](#organizing-host-and-group-variables)
* [How variables are merged](#how-variables-are-merged)
* [Using multiple inventory sources](#using-multiple-inventory-sources)
* [Connecting to hosts: behavioral inventory parameters](#connecting-to-hosts-behavioral-inventory-parameters)


	+ [Non-SSH connection types](#non-ssh-connection-types)
* [Inventory setup examples](#inventory-setup-examples)


	+ [Example: One inventory per environment](#example-one-inventory-per-environment)
	+ [Example: Group by function](#example-group-by-function)
	+ [Example: Group by location](#example-group-by-location)

 Inventory basics: formats, hosts, and groups
--------------------------------------------

 The inventory file can be in one of many formats, depending on the inventory plugins you have. The most common formats are INI and YAML. A basic INI `/etc/ansible/hosts` might look like this:

 
```
mail.example.com

[webservers]
foo.example.com
bar.example.com

[dbservers]
one.example.com
two.example.com
three.example.com

```
 The headings in brackets are group names, which are used in classifying hosts and deciding what hosts you are controlling at what times and for what purpose. Group names should follow the same guidelines as [Creating valid variable names](playbooks_variables#valid-variable-names).

 Here’s that same basic inventory file in YAML format:

 
```
all:
  hosts:
    mail.example.com:
  children:
    webservers:
      hosts:
        foo.example.com:
        bar.example.com:
    dbservers:
      hosts:
        one.example.com:
        two.example.com:
        three.example.com:

```
 ### Default groups

 There are two default groups: `all` and `ungrouped`. The `all` group contains every host. The `ungrouped` group contains all hosts that don’t have another group aside from `all`. Every host will always belong to at least 2 groups (`all` and `ungrouped` or `all` and some other group). Though `all` and `ungrouped` are always present, they can be implicit and not appear in group listings like `group_names`.

 ### Hosts in multiple groups

 You can (and probably will) put each host in more than one group. For example a production webserver in a datacenter in Atlanta might be included in groups called [prod] and [atlanta] and [webservers]. You can create groups that track:

 * What - An application, stack or microservice (for example, database servers, web servers, and so on).
* Where - A datacenter or region, to talk to local DNS, storage, and so on (for example, east, west).
* When - The development stage, to avoid testing on production resources (for example, prod, test).

 Extending the previous YAML inventory to include what, when, and where would look like:

 
```
all:
  hosts:
    mail.example.com:
  children:
    webservers:
      hosts:
        foo.example.com:
        bar.example.com:
    dbservers:
      hosts:
        one.example.com:
        two.example.com:
        three.example.com:
    east:
      hosts:
        foo.example.com:
        one.example.com:
        two.example.com:
    west:
      hosts:
        bar.example.com:
        three.example.com:
    prod:
      hosts:
        foo.example.com:
        one.example.com:
        two.example.com:
    test:
      hosts:
        bar.example.com:
        three.example.com:

```
 You can see that `one.example.com` exists in the `dbservers`, `east`, and `prod` groups.

 You can also use nested groups to simplify `prod` and `test` in this inventory, for the same result:

 
```
all:
  hosts:
    mail.example.com:
  children:
    webservers:
      hosts:
        foo.example.com:
        bar.example.com:
    dbservers:
      hosts:
        one.example.com:
        two.example.com:
        three.example.com:
    east:
      hosts:
        foo.example.com:
        one.example.com:
        two.example.com:
    west:
      hosts:
        bar.example.com:
        three.example.com:
    prod:
      children:
        east:
    test:
      children:
        west:

```
 You can find more examples on how to organize your inventories and group your hosts in [Inventory setup examples](#inventory-setup-examples).

 ### Adding ranges of hosts

 If you have a lot of hosts with a similar pattern, you can add them as a range rather than listing each hostname separately:

 In INI:

 
```
[webservers]
www[01:50].example.com

```
 In YAML:

 
```
...
  webservers:
    hosts:
      www[01:50].example.com:

```
 You can specify a stride (increments between sequence numbers) when defining a numeric range of hosts:

 In INI:

 
```
[webservers]
www[01:50:2].example.com

```
 In YAML:

 
```
...
  webservers:
    hosts:
      www[01:50:2].example.com:

```
 For numeric patterns, leading zeros can be included or removed, as desired. Ranges are inclusive. You can also define alphabetic ranges:

 
```
[databases]
db-[a:f].example.com

```
 Adding variables to inventory
-----------------------------

 You can store variable values that relate to a specific host or group in inventory. To start with, you may add variables directly to the hosts and groups in your main inventory file. As you add more and more managed nodes to your Ansible inventory, however, you will likely want to store variables in separate host and group variable files. See [Defining variables in inventory](playbooks_variables#define-variables-in-inventory) for details.

 Assigning a variable to one machine: host variables
---------------------------------------------------

 You can easily assign a variable to a single host, then use it later in playbooks. In INI:

 
```
[atlanta]
host1 http_port=80 maxRequestsPerChild=808
host2 http_port=303 maxRequestsPerChild=909

```
 In YAML:

 
```
atlanta:
  hosts:
    host1:
      http_port: 80
      maxRequestsPerChild: 808
    host2:
      http_port: 303
      maxRequestsPerChild: 909

```
 Unique values like non-standard SSH ports work well as host variables. You can add them to your Ansible inventory by adding the port number after the hostname with a colon:

 
```
badwolf.example.com:5309

```
 Connection variables also work well as host variables:

 
```
[targets]

localhost              ansible_connection=local
other1.example.com     ansible_connection=ssh        ansible_user=myuser
other2.example.com     ansible_connection=ssh        ansible_user=myotheruser

```
  Note

 If you list non-standard SSH ports in your SSH config file, the `openssh` connection will find and use them, but the `paramiko` connection will not.

  ### Inventory aliases

 You can also define aliases in your inventory:

 In INI:

 
```
jumper ansible_port=5555 ansible_host=192.0.2.50

```
 In YAML:

 
```
...
  hosts:
    jumper:
      ansible_port: 5555
      ansible_host: 192.0.2.50

```
 In the above example, running Ansible against the host alias “jumper” will connect to 192.0.2.50 on port 5555. See [behavioral inventory parameters](#behavioral-parameters) to further customize the connection to hosts.

  Note

 Values passed in the INI format using the `key=value` syntax are interpreted differently depending on where they are declared:

 * When declared inline with the host, INI values are interpreted as Python literal structures (strings, numbers, tuples, lists, dicts, booleans, None). Host lines accept multiple `key=value` parameters per line. Therefore they need a way to indicate that a space is part of a value rather than a separator.
* When declared in a `:vars` section, INI values are interpreted as strings. For example `var=FALSE` would create a string equal to ‘FALSE’. Unlike host lines, `:vars` sections accept only a single entry per line, so everything after the `=` must be the value for the entry.
* If a variable value set in an INI inventory must be a certain type (for example, a string or a boolean value), always specify the type with a filter in your task. Do not rely on types set in INI inventories when consuming variables.
* Consider using YAML format for inventory sources to avoid confusion on the actual type of a variable. The YAML inventory plugin processes variable values consistently and correctly.

  Generally speaking, this is not the best way to define variables that describe your system policy. Setting variables in the main inventory file is only a shorthand. See [Organizing host and group variables](#splitting-out-vars) for guidelines on storing variable values in individual files in the ‘host\_vars’ directory.

 Assigning a variable to many machines: group variables
------------------------------------------------------

 If all hosts in a group share a variable value, you can apply that variable to an entire group at once. In INI:

 
```
[atlanta]
host1
host2

[atlanta:vars]
ntp_server=ntp.atlanta.example.com
proxy=proxy.atlanta.example.com

```
 In YAML:

 
```
atlanta:
  hosts:
    host1:
    host2:
  vars:
    ntp_server: ntp.atlanta.example.com
    proxy: proxy.atlanta.example.com

```
 Group variables are a convenient way to apply variables to multiple hosts at once. Before executing, however, Ansible always flattens variables, including inventory variables, to the host level. If a host is a member of multiple groups, Ansible reads variable values from all of those groups. If you assign different values to the same variable in different groups, Ansible chooses which value to use based on internal [rules for merging](#how-we-merge).

 ### Inheriting variable values: group variables for groups of groups

 You can make groups of groups using the `:children` suffix in INI or the `children:` entry in YAML. You can apply variables to these groups of groups using `:vars` or `vars:`:

 In INI:

 
```
[atlanta]
host1
host2

[raleigh]
host2
host3

[southeast:children]
atlanta
raleigh

[southeast:vars]
some_server=foo.southeast.example.com
halon_system_timeout=30
self_destruct_countdown=60
escape_pods=2

[usa:children]
southeast
northeast
southwest
northwest

```
 In YAML:

 
```
all:
  children:
    usa:
      children:
        southeast:
          children:
            atlanta:
              hosts:
                host1:
                host2:
            raleigh:
              hosts:
                host2:
                host3:
          vars:
            some_server: foo.southeast.example.com
            halon_system_timeout: 30
            self_destruct_countdown: 60
            escape_pods: 2
        northeast:
        northwest:
        southwest:

```
 If you need to store lists or hash data, or prefer to keep host and group specific variables separate from the inventory file, see [Organizing host and group variables](#splitting-out-vars).

 Child groups have a couple of properties to note:

 * Any host that is member of a child group is automatically a member of the parent group.
* A child group’s variables will have higher precedence (override) a parent group’s variables.
* Groups can have multiple parents and children, but not circular relationships.
* Hosts can also be in multiple groups, but there will only be **one** instance of a host, merging the data from the multiple groups.

 Organizing host and group variables
-----------------------------------

 Although you can store variables in the main inventory file, storing separate host and group variables files may help you organize your variable values more easily. Host and group variable files must use YAML syntax. Valid file extensions include ‘.yml’, ‘.yaml’, ‘.json’, or no file extension. See [YAML Syntax](../reference_appendices/yamlsyntax#yaml-syntax) if you are new to YAML.

 Ansible loads host and group variable files by searching paths relative to the inventory file or the playbook file. If your inventory file at `/etc/ansible/hosts` contains a host named ‘foosball’ that belongs to two groups, ‘raleigh’ and ‘webservers’, that host will use variables in YAML files at the following locations:

 
```
/etc/ansible/group_vars/raleigh # can optionally end in '.yml', '.yaml', or '.json'
/etc/ansible/group_vars/webservers
/etc/ansible/host_vars/foosball

```
 For example, if you group hosts in your inventory by datacenter, and each datacenter uses its own NTP server and database server, you can create a file called `/etc/ansible/group_vars/raleigh` to store the variables for the `raleigh` group:

 
```
---
ntp_server: acme.example.org
database_server: storage.example.org

```
 You can also create *directories* named after your groups or hosts. Ansible will read all the files in these directories in lexicographical order. An example with the ‘raleigh’ group:

 
```
/etc/ansible/group_vars/raleigh/db_settings
/etc/ansible/group_vars/raleigh/cluster_settings

```
 All hosts in the ‘raleigh’ group will have the variables defined in these files available to them. This can be very useful to keep your variables organized when a single file gets too big, or when you want to use [Ansible Vault](vault#playbooks-vault) on some group variables.

 You can also add `group_vars/` and `host_vars/` directories to your playbook directory. The `ansible-playbook` command looks for these directories in the current working directory by default. Other Ansible commands (for example, `ansible`, `ansible-console`, and so on) will only look for `group_vars/` and `host_vars/` in the inventory directory. If you want other commands to load group and host variables from a playbook directory, you must provide the `--playbook-dir` option on the command line. If you load inventory files from both the playbook directory and the inventory directory, variables in the playbook directory will override variables set in the inventory directory.

 Keeping your inventory file and variables in a git repo (or other version control) is an excellent way to track changes to your inventory and host variables.

 How variables are merged
------------------------

 By default variables are merged/flattened to the specific host before a play is run. This keeps Ansible focused on the Host and Task, so groups don’t really survive outside of inventory and host matching. By default, Ansible overwrites variables including the ones defined for a group and/or host (see [DEFAULT\_HASH\_BEHAVIOUR](../reference_appendices/config#default-hash-behaviour)). The order/precedence is (from lowest to highest):

 * all group (because it is the ‘parent’ of all other groups)
* parent group
* child group
* host

 By default Ansible merges groups at the same parent/child level in ASCII order, and the last group loaded overwrites the previous groups. For example, an a\_group will be merged with b\_group and b\_group vars that match will overwrite the ones in a\_group.

 You can change this behavior by setting the group variable `ansible_group_priority` to change the merge order for groups of the same level (after the parent/child order is resolved). The larger the number, the later it will be merged, giving it higher priority. This variable defaults to `1` if not set. For example:

 
```
a_group:
  vars:
    testvar: a
    ansible_group_priority: 10
b_group:
  vars:
    testvar: b

```
 In this example, if both groups have the same priority, the result would normally have been `testvar == b`, but since we are giving the `a_group` a higher priority the result will be `testvar == a`.

  Note

 `ansible_group_priority` can only be set in the inventory source and not in group\_vars/, as the variable is used in the loading of group\_vars.

  Using multiple inventory sources
--------------------------------

 You can target multiple inventory sources (directories, dynamic inventory scripts or files supported by inventory plugins) at the same time by giving multiple inventory parameters from the command line or by configuring [`ANSIBLE_INVENTORY`](../reference_appendices/config#envvar-ANSIBLE_INVENTORY). This can be useful when you want to target normally separate environments, like staging and production, at the same time for a specific action.

 Target two sources from the command line like this:

 
```
ansible-playbook get_logs.yml -i staging -i production

```
 Keep in mind that if there are variable conflicts in the inventories, they are resolved according to the rules described in [How variables are merged](#how-we-merge) and [Variable precedence: Where should I put a variable?](playbooks_variables#ansible-variable-precedence). The merging order is controlled by the order of the inventory source parameters. If `[all:vars]` in staging inventory defines `myvar = 1`, but production inventory defines `myvar = 2`, the playbook will be run with `myvar = 2`. The result would be reversed if the playbook was run with `-i production -i staging`.

 **Aggregating inventory sources with a directory**

 You can also create an inventory by combining multiple inventory sources and source types under a directory. This can be useful for combining static and dynamic hosts and managing them as one inventory. The following inventory combines an inventory plugin source, a dynamic inventory script, and a file with static hosts:

 
```
inventory/
  openstack.yml          # configure inventory plugin to get hosts from Openstack cloud
  dynamic-inventory.py   # add additional hosts with dynamic inventory script
  static-inventory       # add static hosts and groups
  group_vars/
    all.yml              # assign variables to all hosts

```
 You can target this inventory directory simply like this:

 
```
ansible-playbook example.yml -i inventory

```
 It can be useful to control the merging order of the inventory sources if there’s variable conflicts or group of groups dependencies to the other inventory sources. The inventories are merged in ASCII order according to the filenames so the result can be controlled by adding prefixes to the files:

 
```
inventory/
  01-openstack.yml          # configure inventory plugin to get hosts from Openstack cloud
  02-dynamic-inventory.py   # add additional hosts with dynamic inventory script
  03-static-inventory       # add static hosts
  group_vars/
    all.yml                 # assign variables to all hosts

```
 If `01-openstack.yml` defines `myvar = 1` for the group `all`, `02-dynamic-inventory.py` defines `myvar = 2`, and `03-static-inventory` defines `myvar = 3`, the playbook will be run with `myvar = 3`.

 For more details on inventory plugins and dynamic inventory scripts see [Inventory Plugins](../plugins/inventory#inventory-plugins) and [Working with dynamic inventory](intro_dynamic_inventory#intro-dynamic-inventory).

 Connecting to hosts: behavioral inventory parameters
----------------------------------------------------

 As described above, setting the following variables control how Ansible interacts with remote hosts.

 Host connection:

  Note

 Ansible does not expose a channel to allow communication between the user and the ssh process to accept a password manually to decrypt an ssh key when using the ssh connection plugin (which is the default). The use of `ssh-agent` is highly recommended.

   ansible\_connection

Connection type to the host. This can be the name of any of ansible’s connection plugins. SSH protocol types are `smart`, `ssh` or `paramiko`. The default is smart. Non-SSH based types are described in the next section.

   General for all connections:

  ansible\_host

The name of the host to connect to, if different from the alias you wish to give to it.

  ansible\_port

The connection port number, if not the default (22 for ssh)

  ansible\_user

The user name to use when connecting to the host

  ansible\_password

The password to use to authenticate to the host (never store this variable in plain text; always use a vault. See [Keep vaulted variables safely visible](playbooks_best_practices#tip-for-variables-and-vaults))

   Specific to the SSH connection:

  ansible\_ssh\_private\_key\_file

Private key file used by ssh. Useful if using multiple keys and you don’t want to use SSH agent.

  ansible\_ssh\_common\_args

This setting is always appended to the default command line for **sftp**, **scp**, and **ssh**. Useful to configure a `ProxyCommand` for a certain host (or group).

  ansible\_sftp\_extra\_args

This setting is always appended to the default **sftp** command line.

  ansible\_scp\_extra\_args

This setting is always appended to the default **scp** command line.

  ansible\_ssh\_extra\_args

This setting is always appended to the default **ssh** command line.

  ansible\_ssh\_pipelining

Determines whether or not to use SSH pipelining. This can override the `pipelining` setting in `ansible.cfg`.

  ansible\_ssh\_executable (added in version 2.2)

This setting overrides the default behavior to use the system **ssh**. This can override the `ssh_executable` setting in `ansible.cfg`.

   Privilege escalation (see [Ansible Privilege Escalation](become#become) for further details):

  ansible\_become

Equivalent to `ansible_sudo` or `ansible_su`, allows to force privilege escalation

  ansible\_become\_method

Allows to set privilege escalation method

  ansible\_become\_user

Equivalent to `ansible_sudo_user` or `ansible_su_user`, allows to set the user you become through privilege escalation

  ansible\_become\_password

Equivalent to `ansible_sudo_password` or `ansible_su_password`, allows you to set the privilege escalation password (never store this variable in plain text; always use a vault. See [Keep vaulted variables safely visible](playbooks_best_practices#tip-for-variables-and-vaults))

  ansible\_become\_exe

Equivalent to `ansible_sudo_exe` or `ansible_su_exe`, allows you to set the executable for the escalation method selected

  ansible\_become\_flags

Equivalent to `ansible_sudo_flags` or `ansible_su_flags`, allows you to set the flags passed to the selected escalation method. This can be also set globally in `ansible.cfg` in the `sudo_flags` option

   Remote host environment parameters:

  ansible\_shell\_type

The shell type of the target system. You should not use this setting unless you have set the [ansible\_shell\_executable](#ansible-shell-executable) to a non-Bourne (sh) compatible shell. By default commands are formatted using `sh`-style syntax. Setting this to `csh` or `fish` will cause commands executed on target systems to follow those shell’s syntax instead.

    ansible\_python\_interpreter

The target host python path. This is useful for systems with more than one Python or not located at **/usr/bin/python** such as \*BSD, or where **/usr/bin/python** is not a 2.X series Python. We do not use the **/usr/bin/env** mechanism as that requires the remote user’s path to be set right and also assumes the **python** executable is named python, where the executable might be named something like **python2.6**.

  ansible\_\*\_interpreter

Works for anything such as ruby or perl and works just like [ansible\_python\_interpreter](#ansible-python-interpreter). This replaces shebang of modules which will run on that host.

    New in version 2.1.

   ansible\_shell\_executable

This sets the shell the ansible controller will use on the target machine, overrides `executable` in `ansible.cfg` which defaults to **/bin/sh**. You should really only change it if is not possible to use **/bin/sh** (in other words, if **/bin/sh** is not installed on the target machine or cannot be run from sudo.).

   Examples from an Ansible-INI host file:

 
```
some_host         ansible_port=2222     ansible_user=manager
aws_host          ansible_ssh_private_key_file=/home/example/.ssh/aws.pem
freebsd_host      ansible_python_interpreter=/usr/local/bin/python
ruby_module_host  ansible_ruby_interpreter=/usr/bin/ruby.1.9.3

```
 ### Non-SSH connection types

 As stated in the previous section, Ansible executes playbooks over SSH but it is not limited to this connection type. With the host specific parameter `ansible_connection=<connector>`, the connection type can be changed. The following non-SSH based connectors are available:

 **local**

 This connector can be used to deploy the playbook to the control machine itself.

 **docker**

 This connector deploys the playbook directly into Docker containers using the local Docker client. The following parameters are processed by this connector:

  ansible\_host

The name of the Docker container to connect to.

  ansible\_user

The user name to operate within the container. The user must exist inside the container.

  ansible\_become

If set to `true` the `become_user` will be used to operate within the container.

  ansible\_docker\_extra\_args

Could be a string with any additional arguments understood by Docker, which are not command specific. This parameter is mainly used to configure a remote Docker daemon to use.

   Here is an example of how to instantly deploy to created containers:

 
```
- name: Create a jenkins container
  community.general.docker_container:
    docker_host: myserver.net:4243
    name: my_jenkins
    image: jenkins

- name: Add the container to inventory
  ansible.builtin.add_host:
    name: my_jenkins
    ansible_connection: docker
    ansible_docker_extra_args: "--tlsverify --tlscacert=/path/to/ca.pem --tlscert=/path/to/client-cert.pem --tlskey=/path/to/client-key.pem -H=tcp://myserver.net:4243"
    ansible_user: jenkins
  changed_when: false

- name: Create a directory for ssh keys
  delegate_to: my_jenkins
  ansible.builtin.file:
    path: "/var/jenkins_home/.ssh/jupiter"
    state: directory

```
 For a full list with available plugins and examples, see [Plugin List](../plugins/connection#connection-plugin-list).

  Note

 If you’re reading the docs from the beginning, this may be the first example you’ve seen of an Ansible playbook. This is not an inventory file. Playbooks will be covered in great detail later in the docs.

  Inventory setup examples
------------------------

 See also [Sample Ansible setup](sample_setup#sample-setup), which shows inventory along with playbooks and other Ansible artifacts.

 ### Example: One inventory per environment

 If you need to manage multiple environments it’s sometimes prudent to have only hosts of a single environment defined per inventory. This way, it is harder to, for instance, accidentally change the state of nodes inside the “test” environment when you actually wanted to update some “staging” servers.

 For the example mentioned above you could have an `inventory_test` file:

 
```
[dbservers]
db01.test.example.com
db02.test.example.com

[appservers]
app01.test.example.com
app02.test.example.com
app03.test.example.com

```
 That file only includes hosts that are part of the “test” environment. Define the “staging” machines in another file called `inventory_staging`:

 
```
[dbservers]
db01.staging.example.com
db02.staging.example.com

[appservers]
app01.staging.example.com
app02.staging.example.com
app03.staging.example.com

```
 To apply a playbook called `site.yml` to all the app servers in the test environment, use the following command:

 
```
ansible-playbook -i inventory_test -l appservers site.yml

```
 ### Example: Group by function

 In the previous section you already saw an example for using groups in order to cluster hosts that have the same function. This allows you, for instance, to define firewall rules inside a playbook or role affecting only database servers:

 
```
- hosts: dbservers
  tasks:
  - name: Allow access from 10.0.0.1
    ansible.builtin.iptables:
      chain: INPUT
      jump: ACCEPT
      source: 10.0.0.1

```
 ### Example: Group by location

 Other tasks might be focused on where a certain host is located. Let’s say that `db01.test.example.com` and `app01.test.example.com` are located in DC1 while `db02.test.example.com` is in DC2:

 
```
[dc1]
db01.test.example.com
app01.test.example.com

[dc2]
db02.test.example.com

```
 In practice, you might even end up mixing all these setups as you might need to, on one day, update all nodes in a specific data center while, on another day, update all the application servers no matter their location.

  See also

  [Inventory Plugins](../plugins/inventory#inventory-plugins)

Pulling inventory from dynamic or static sources

  [Working with dynamic inventory](intro_dynamic_inventory#intro-dynamic-inventory)

Pulling inventory from dynamic sources, such as cloud providers

  [Introduction to ad hoc commands](intro_adhoc#intro-adhoc)

Examples of basic commands

  [Working with playbooks](playbooks#working-with-playbooks)

Learning Ansible’s configuration, deployment, and orchestration language.

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html>

Introduction to ad hoc commands
===============================

 An Ansible ad hoc command uses the `/usr/bin/ansible` command-line tool to automate a single task on one or more managed nodes. ad hoc commands are quick and easy, but they are not reusable. So why learn about ad hoc commands first? ad hoc commands demonstrate the simplicity and power of Ansible. The concepts you learn here will port over directly to the playbook language. Before reading and executing these examples, please read [How to build your inventory](intro_inventory#intro-inventory).

 * [Why use ad hoc commands?](#why-use-ad-hoc-commands)
* [Use cases for ad hoc tasks](#use-cases-for-ad-hoc-tasks)


	+ [Rebooting servers](#rebooting-servers)
	+ [Managing files](#managing-files)
	+ [Managing packages](#managing-packages)
	+ [Managing users and groups](#managing-users-and-groups)
	+ [Managing services](#managing-services)
	+ [Gathering facts](#gathering-facts)

 Why use ad hoc commands?
------------------------

 ad hoc commands are great for tasks you repeat rarely. For example, if you want to power off all the machines in your lab for Christmas vacation, you could execute a quick one-liner in Ansible without writing a playbook. An ad hoc command looks like this:

 
```
$ ansible [pattern] -m [module] -a "[module options]"

```
 You can learn more about [patterns](intro_patterns#intro-patterns) and [modules](modules#working-with-modules) on other pages.

 Use cases for ad hoc tasks
--------------------------

 ad hoc tasks can be used to reboot servers, copy files, manage packages and users, and much more. You can use any Ansible module in an ad hoc task. ad hoc tasks, like playbooks, use a declarative model, calculating and executing the actions required to reach a specified final state. They achieve a form of idempotence by checking the current state before they begin and doing nothing unless the current state is different from the specified final state.

 ### Rebooting servers

 The default module for the `ansible` command-line utility is the [ansible.builtin.command module](../collections/ansible/builtin/command_module#command-module). You can use an ad hoc task to call the command module and reboot all web servers in Atlanta, 10 at a time. Before Ansible can do this, you must have all servers in Atlanta listed in a group called [atlanta] in your inventory, and you must have working SSH credentials for each machine in that group. To reboot all the servers in the [atlanta] group:

 
```
$ ansible atlanta -a "/sbin/reboot"

```
 By default Ansible uses only 5 simultaneous processes. If you have more hosts than the value set for the fork count, Ansible will talk to them, but it will take a little longer. To reboot the [atlanta] servers with 10 parallel forks:

 
```
$ ansible atlanta -a "/sbin/reboot" -f 10

```
 /usr/bin/ansible will default to running from your user account. To connect as a different user:

 
```
$ ansible atlanta -a "/sbin/reboot" -f 10 -u username

```
 Rebooting probably requires privilege escalation. You can connect to the server as `username` and run the command as the `root` user by using the [become](become#become) keyword:

 
```
$ ansible atlanta -a "/sbin/reboot" -f 10 -u username --become [--ask-become-pass]

```
 If you add `--ask-become-pass` or `-K`, Ansible prompts you for the password to use for privilege escalation (sudo/su/pfexec/doas/etc).

  Note

 The [command module](../collections/ansible/builtin/command_module#command-module) does not support extended shell syntax like piping and redirects (although shell variables will always work). If your command requires shell-specific syntax, use the `shell` module instead. Read more about the differences on the [Working With Modules](modules#working-with-modules) page.

  So far all our examples have used the default ‘command’ module. To use a different module, pass `-m` for module name. For example, to use the [ansible.builtin.shell module](../collections/ansible/builtin/shell_module#shell-module):

 
```
$ ansible raleigh -m ansible.builtin.shell -a 'echo $TERM'

```
 When running any command with the Ansible *ad hoc* CLI (as opposed to [Playbooks](playbooks#working-with-playbooks)), pay particular attention to shell quoting rules, so the local shell retains the variable and passes it to Ansible. For example, using double rather than single quotes in the above example would evaluate the variable on the box you were on.

 ### Managing files

 An ad hoc task can harness the power of Ansible and SCP to transfer many files to multiple machines in parallel. To transfer a file directly to all servers in the [atlanta] group:

 
```
$ ansible atlanta -m ansible.builtin.copy -a "src=/etc/hosts dest=/tmp/hosts"

```
 If you plan to repeat a task like this, use the [ansible.builtin.template](../collections/ansible/builtin/template_module#template-module) module in a playbook.

 The [ansible.builtin.file](../collections/ansible/builtin/file_module#file-module) module allows changing ownership and permissions on files. These same options can be passed directly to the `copy` module as well:

 
```
$ ansible webservers -m ansible.builtin.file -a "dest=/srv/foo/a.txt mode=600"
$ ansible webservers -m ansible.builtin.file -a "dest=/srv/foo/b.txt mode=600 owner=mdehaan group=mdehaan"

```
 The `file` module can also create directories, similar to `mkdir -p`:

 
```
$ ansible webservers -m ansible.builtin.file -a "dest=/path/to/c mode=755 owner=mdehaan group=mdehaan state=directory"

```
 As well as delete directories (recursively) and delete files:

 
```
$ ansible webservers -m ansible.builtin.file -a "dest=/path/to/c state=absent"

```
 ### Managing packages

 You might also use an ad hoc task to install, update, or remove packages on managed nodes using a package management module like yum. To ensure a package is installed without updating it:

 
```
$ ansible webservers -m ansible.builtin.yum -a "name=acme state=present"

```
 To ensure a specific version of a package is installed:

 
```
$ ansible webservers -m ansible.builtin.yum -a "name=acme-1.5 state=present"

```
 To ensure a package is at the latest version:

 
```
$ ansible webservers -m ansible.builtin.yum -a "name=acme state=latest"

```
 To ensure a package is not installed:

 
```
$ ansible webservers -m ansible.builtin.yum -a "name=acme state=absent"

```
 Ansible has modules for managing packages under many platforms. If there is no module for your package manager, you can install packages using the command module or create a module for your package manager.

 ### Managing users and groups

 You can create, manage, and remove user accounts on your managed nodes with ad hoc tasks:

 
```
$ ansible all -m ansible.builtin.user -a "name=foo password=<crypted password here>"

$ ansible all -m ansible.builtin.user -a "name=foo state=absent"

```
 See the [ansible.builtin.user](../collections/ansible/builtin/user_module#user-module) module documentation for details on all of the available options, including how to manipulate groups and group membership.

 ### Managing services

 Ensure a service is started on all webservers:

 
```
$ ansible webservers -m ansible.builtin.service -a "name=httpd state=started"

```
 Alternatively, restart a service on all webservers:

 
```
$ ansible webservers -m ansible.builtin.service -a "name=httpd state=restarted"

```
 Ensure a service is stopped:

 
```
$ ansible webservers -m ansible.builtin.service -a "name=httpd state=stopped"

```
 ### Gathering facts

 Facts represent discovered variables about a system. You can use facts to implement conditional execution of tasks but also just to get ad hoc information about your systems. To see all facts:

 
```
$ ansible all -m ansible.builtin.setup

```
 You can also filter this output to display only certain facts, see the [ansible.builtin.setup](../collections/ansible/builtin/setup_module#setup-module) module documentation for details.

 Now that you understand the basic elements of Ansible execution, you are ready to learn to automate repetitive tasks using [Ansible Playbooks](playbooks_intro#playbooks-intro).

  See also

  [Configuring Ansible](../installation_guide/intro_configuration#intro-configuration)

All about the Ansible config file

  [Collection Index](../collections/index#list-of-collections)

Browse existing collections, modules, and plugins

  [Working with playbooks](playbooks#working-with-playbooks)

Using Ansible for configuration management & deployment

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/intro_adhoc.html>

Working with command line tools
===============================

 Most users are familiar with `ansible` and `ansible-playbook`, but those are not the only utilities Ansible provides. Below is a complete list of Ansible utilities. Each page contains a description of the utility and a listing of supported parameters.

 * [ansible](../cli/ansible)
* [ansible-config](../cli/ansible-config)
* [ansible-console](../cli/ansible-console)
* [ansible-doc](../cli/ansible-doc)
* [ansible-galaxy](../cli/ansible-galaxy)
* [ansible-inventory](../cli/ansible-inventory)
* [ansible-playbook](../cli/ansible-playbook)
* [ansible-pull](../cli/ansible-pull)
* [ansible-vault](../cli/ansible-vault)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/command_line_tools.html>

Intro to playbooks
==================

 Ansible Playbooks offer a repeatable, re-usable, simple configuration management and multi-machine deployment system, one that is well suited to deploying complex applications. If you need to execute a task with Ansible more than once, write a playbook and put it under source control. Then you can use the playbook to push out new configuration or confirm the configuration of remote systems. The playbooks in the [ansible-examples repository](https://github.com/ansible/ansible-examples) illustrate many useful techniques. You may want to look at these in another tab as you read the documentation.

 Playbooks can:

 * declare configurations
* orchestrate steps of any manual ordered process, on multiple sets of machines, in a defined order
* launch tasks synchronously or [asynchronously](playbooks_async#playbooks-async)

 * [Playbook syntax](#playbook-syntax)
* [Playbook execution](#playbook-execution)


	+ [Task execution](#task-execution)
	+ [Desired state and ‘idempotency’](#desired-state-and-idempotency)
	+ [Running playbooks](#running-playbooks)
* [Ansible-Pull](#ansible-pull)
* [Verifying playbooks](#verifying-playbooks)


	+ [ansible-lint](#ansible-lint)

 Playbook syntax
---------------

 Playbooks are expressed in YAML format with a minimum of syntax. If you are not familiar with YAML, look at our overview of [YAML Syntax](../reference_appendices/yamlsyntax#yaml-syntax) and consider installing an add-on for your text editor (see [Other Tools and Programs](https://docs.ansible.com/ansible/latest/community/other_tools_and_programs.html#other-tools-and-programs)) to help you write clean YAML syntax in your playbooks.

 A playbook is composed of one or more ‘plays’ in an ordered list. The terms ‘playbook’ and ‘play’ are sports analogies. Each play executes part of the overall goal of the playbook, running one or more tasks. Each task calls an Ansible module.

 Playbook execution
------------------

 A playbook runs in order from top to bottom. Within each play, tasks also run in order from top to bottom. Playbooks with multiple ‘plays’ can orchestrate multi-machine deployments, running one play on your webservers, then another play on your database servers, then a third play on your network infrastructure, and so on. At a minimum, each play defines two things:

 * the managed nodes to target, using a [pattern](intro_patterns#intro-patterns)
* at least one task to execute

  Note

 In Ansible 2.10 and later, we recommend you use the fully-qualified collection name in your playbooks to ensure the correct module is selected, because multiple collections can contain modules with the same name (for example, `user`). See [Using collections in a Playbook](collections_using#collections-using-playbook).

  In this example, the first play targets the web servers; the second play targets the database servers:

 
```
---
- name: Update web servers
  hosts: webservers
  remote_user: root

  tasks:
  - name: Ensure apache is at the latest version
    ansible.builtin.yum:
      name: httpd
      state: latest
  - name: Write the apache config file
    ansible.builtin.template:
      src: /srv/httpd.j2
      dest: /etc/httpd.conf

- name: Update db servers
  hosts: databases
  remote_user: root

  tasks:
  - name: Ensure postgresql is at the latest version
    ansible.builtin.yum:
      name: postgresql
      state: latest
  - name: Ensure that postgresql is started
    ansible.builtin.service:
      name: postgresql
      state: started

```
 Your playbook can include more than just a hosts line and tasks. For example, the playbook above sets a `remote_user` for each play. This is the user account for the SSH connection. You can add other [Playbook Keywords](../reference_appendices/playbooks_keywords#playbook-keywords) at the playbook, play, or task level to influence how Ansible behaves. Playbook keywords can control the [connection plugin](../plugins/connection#connection-plugins), whether to use [privilege escalation](become#become), how to handle errors, and more. To support a variety of environments, Ansible lets you set many of these parameters as command-line flags, in your Ansible configuration, or in your inventory. Learning the [precedence rules](../reference_appendices/general_precedence#general-precedence-rules) for these sources of data will help you as you expand your Ansible ecosystem.

 ### Task execution

 By default, Ansible executes each task in order, one at a time, against all machines matched by the host pattern. Each task executes a module with specific arguments. When a task has executed on all target machines, Ansible moves on to the next task. You can use [strategies](playbooks_strategies#playbooks-strategies) to change this default behavior. Within each play, Ansible applies the same task directives to all hosts. If a task fails on a host, Ansible takes that host out of the rotation for the rest of the playbook.

 When you run a playbook, Ansible returns information about connections, the `name` lines of all your plays and tasks, whether each task has succeeded or failed on each machine, and whether each task has made a change on each machine. At the bottom of the playbook execution, Ansible provides a summary of the nodes that were targeted and how they performed. General failures and fatal “unreachable” communication attempts are kept separate in the counts.

 ### Desired state and ‘idempotency’

 Most Ansible modules check whether the desired final state has already been achieved, and exit without performing any actions if that state has been achieved, so that repeating the task does not change the final state. Modules that behave this way are often called ‘idempotent.’ Whether you run a playbook once, or multiple times, the outcome should be the same. However, not all playbooks and not all modules behave this way. If you are unsure, test your playbooks in a sandbox environment before running them multiple times in production.

 ### Running playbooks

 To run your playbook, use the [ansible-playbook](../cli/ansible-playbook#ansible-playbook) command:

 
```
ansible-playbook playbook.yml -f 10

```
 Use the `--verbose` flag when running your playbook to see detailed output from successful modules as well as unsuccessful ones.

 Ansible-Pull
------------

 Should you want to invert the architecture of Ansible, so that nodes check in to a central location, instead of pushing configuration out to them, you can.

 The `ansible-pull` is a small script that will checkout a repo of configuration instructions from git, and then run `ansible-playbook` against that content.

 Assuming you load balance your checkout location, `ansible-pull` scales essentially infinitely.

 Run `ansible-pull --help` for details.

 There’s also a [clever playbook](https://github.com/ansible/ansible-examples/blob/master/language_features/ansible_pull.yml) available to configure `ansible-pull` via a crontab from push mode.

 Verifying playbooks
-------------------

 You may want to verify your playbooks to catch syntax errors and other problems before you run them. The [ansible-playbook](../cli/ansible-playbook#ansible-playbook) command offers several options for verification, including `--check`, `--diff`, `--list-hosts`, `--list-tasks`, and `--syntax-check`. The [Tools for validating playbooks](https://docs.ansible.com/ansible/latest/community/other_tools_and_programs.html#validate-playbook-tools) describes other tools for validating and testing playbooks.

 ### ansible-lint

 You can use [ansible-lint](https://docs.ansible.com/ansible-lint/index.html) for detailed, Ansible-specific feedback on your playbooks before you execute them. For example, if you run `ansible-lint` on the playbook called `verify-apache.yml` near the top of this page, you should get the following results:

 
```
$ ansible-lint verify-apache.yml
[403] Package installs should not use latest
verify-apache.yml:8
Task/Handler: ensure apache is at the latest version

```
 The [ansible-lint default rules](https://docs.ansible.com/ansible-lint/rules/default_rules.html) page describes each error. For `[403]`, the recommended fix is to change `state: latest` to `state: present` in the playbook.

  See also

  [ansible-lint](https://docs.ansible.com/ansible-lint/index.html)

Learn how to test Ansible Playbooks syntax

  [YAML Syntax](../reference_appendices/yamlsyntax#yaml-syntax)

Learn about YAML syntax

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips for managing playbooks in the real world

  [Collection Index](../collections/index#list-of-collections)

Browse existing collections, modules, and plugins

  [Should you develop a module?](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules.html#developing-modules)

Learn to extend Ansible by writing your own modules

  [Patterns: targeting hosts and groups](intro_patterns#intro-patterns)

Learn about how to select hosts

  [GitHub examples directory](https://github.com/ansible/ansible-examples)

Complete end-to-end playbook examples

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html>

Using Variables
===============

 Ansible uses variables to manage differences between systems. With Ansible, you can execute tasks and playbooks on multiple different systems with a single command. To represent the variations among those different systems, you can create variables with standard YAML syntax, including lists and dictionaries. You can define these variables in your playbooks, in your [inventory](intro_inventory#intro-inventory), in re-usable [files](playbooks_reuse#playbooks-reuse) or [roles](playbooks_reuse_roles#playbooks-reuse-roles), or at the command line. You can also create variables during a playbook run by registering the return value or values of a task as a new variable.

 After you create variables, either by defining them in a file, passing them at the command line, or registering the return value or values of a task as a new variable, you can use those variables in module arguments, in [conditional “when” statements](playbooks_conditionals#playbooks-conditionals), in [templates](playbooks_templating#playbooks-templating), and in [loops](playbooks_loops#playbooks-loops). The [ansible-examples github repository](https://github.com/ansible/ansible-examples) contains many examples of using variables in Ansible.

 Once you understand the concepts and examples on this page, read about [Ansible facts](playbooks_vars_facts#vars-and-facts), which are variables you retrieve from remote systems.

 * [Creating valid variable names](#creating-valid-variable-names)
* [Simple variables](#simple-variables)


	+ [Defining simple variables](#defining-simple-variables)
	+ [Referencing simple variables](#referencing-simple-variables)
* [When to quote variables (a YAML gotcha)](#when-to-quote-variables-a-yaml-gotcha)
* [List variables](#list-variables)


	+ [Defining variables as lists](#defining-variables-as-lists)
	+ [Referencing list variables](#referencing-list-variables)
* [Dictionary variables](#dictionary-variables)


	+ [Defining variables as key:value dictionaries](#defining-variables-as-key-value-dictionaries)
	+ [Referencing key:value dictionary variables](#referencing-key-value-dictionary-variables)
* [Registering variables](#registering-variables)
* [Referencing nested variables](#referencing-nested-variables)
* [Transforming variables with Jinja2 filters](#transforming-variables-with-jinja2-filters)
* [Where to set variables](#where-to-set-variables)


	+ [Defining variables in inventory](#defining-variables-in-inventory)
	+ [Defining variables in a play](#defining-variables-in-a-play)
	+ [Defining variables in included files and roles](#defining-variables-in-included-files-and-roles)
	+ [Defining variables at runtime](#defining-variables-at-runtime)
	
	
		- [key=value format](#key-value-format)
		- [JSON string format](#json-string-format)
		- [vars from a JSON or YAML file](#vars-from-a-json-or-yaml-file)
* [Variable precedence: Where should I put a variable?](#variable-precedence-where-should-i-put-a-variable)


	+ [Understanding variable precedence](#understanding-variable-precedence)
	+ [Scoping variables](#scoping-variables)
	+ [Tips on where to set variables](#tips-on-where-to-set-variables)
* [Using advanced variable syntax](#using-advanced-variable-syntax)

 Creating valid variable names
-----------------------------

 Not all strings are valid Ansible variable names. A variable name can only include letters, numbers, and underscores. [Python keywords](https://docs.python.org/3/reference/lexical_analysis.html#keywords) or [playbook keywords](../reference_appendices/playbooks_keywords#playbook-keywords) are not valid variable names. A variable name cannot begin with a number.

 Variable names can begin with an underscore. In many programming languages, variables that begin with an underscore are private. This is not true in Ansible. Variables that begin with an underscore are treated exactly the same as any other variable. Do not rely on this convention for privacy or security.

 This table gives examples of valid and invalid variable names:

 

| Valid variable names | Not valid |
| --- | --- |
| `foo` | `*foo`, [Python keywords](https://docs.python.org/3/reference/lexical_analysis.html#keywords) such as `async` and `lambda` |
| `foo_env` | [playbook keywords](../reference_appendices/playbooks_keywords#playbook-keywords) such as `environment` |
| `foo_port` | `foo-port`, `foo port`, `foo.port` |
| `foo5`, `_foo` | `5foo`, `12` |

 Simple variables
----------------

 Simple variables combine a variable name with a single value. You can use this syntax (and the syntax for lists and dictionaries shown below) in a variety of places. For details about setting variables in inventory, in playbooks, in reusable files, in roles, or at the command line, see [Where to set variables](#setting-variables).

 ### Defining simple variables

 You can define a simple variable using standard YAML syntax. For example:

 
```
remote_install_path: /opt/my_app_config

```
 ### Referencing simple variables

 After you define a variable, use Jinja2 syntax to reference it. Jinja2 variables use double curly braces. For example, the expression `My amp goes to {{ max_amp_value }}` demonstrates the most basic form of variable substitution. You can use Jinja2 syntax in playbooks. For example:

 
```
ansible.builtin.template:
  src: foo.cfg.j2
  dest: '{{ remote_install_path }}/foo.cfg'

```
 In this example, the variable defines the location of a file, which can vary from one system to another.

  Note

 Ansible allows Jinja2 loops and conditionals in [templates](playbooks_templating#playbooks-templating) but not in playbooks. You cannot create a loop of tasks. Ansible playbooks are pure machine-parseable YAML.

  When to quote variables (a YAML gotcha)
---------------------------------------

 If you start a value with `{{ foo }}`, you must quote the whole expression to create valid YAML syntax. If you do not quote the whole expression, the YAML parser cannot interpret the syntax - it might be a variable or it might be the start of a YAML dictionary. For guidance on writing YAML, see the [YAML Syntax](../reference_appendices/yamlsyntax#yaml-syntax) documentation.

 If you use a variable without quotes like this:

 
```
- hosts: app_servers
  vars:
      app_path: {{ base_path }}/22

```
 You will see: `ERROR! Syntax Error while loading YAML.` If you add quotes, Ansible works correctly:

 
```
- hosts: app_servers
  vars:
       app_path: "{{ base_path }}/22"

```
 List variables
--------------

 A list variable combines a variable name with multiple values. The multiple values can be stored as an itemized list or in square brackets `[]`, separated with commas.

 ### Defining variables as lists

 You can define variables with multiple values using YAML lists. For example:

 
```
region:
  - northeast
  - southeast
  - midwest

```
 ### Referencing list variables

 When you use variables defined as a list (also called an array), you can use individual, specific fields from that list. The first item in a list is item 0, the second item is item 1. For example:

 
```
region: "{{ region[0] }}"

```
 The value of this expression would be “northeast”.

 Dictionary variables
--------------------

 A dictionary stores the data in key-value pairs. Usually, dictionaries are used to store related data, such as the information contained in an ID or a user profile.

 ### Defining variables as key:value dictionaries

 You can define more complex variables using YAML dictionaries. A YAML dictionary maps keys to values. For example:

 
```
foo:
  field1: one
  field2: two

```
 ### Referencing key:value dictionary variables

 When you use variables defined as a key:value dictionary (also called a hash), you can use individual, specific fields from that dictionary using either bracket notation or dot notation:

 
```
foo['field1']
foo.field1

```
 Both of these examples reference the same value (“one”). Bracket notation always works. Dot notation can cause problems because some keys collide with attributes and methods of python dictionaries. Use bracket notation if you use keys which start and end with two underscores (which are reserved for special meanings in python) or are any of the known public attributes:

 `add`, `append`, `as_integer_ratio`, `bit_length`, `capitalize`, `center`, `clear`, `conjugate`, `copy`, `count`, `decode`, `denominator`, `difference`, `difference_update`, `discard`, `encode`, `endswith`, `expandtabs`, `extend`, `find`, `format`, `fromhex`, `fromkeys`, `get`, `has_key`, `hex`, `imag`, `index`, `insert`, `intersection`, `intersection_update`, `isalnum`, `isalpha`, `isdecimal`, `isdigit`, `isdisjoint`, `is_integer`, `islower`, `isnumeric`, `isspace`, `issubset`, `issuperset`, `istitle`, `isupper`, `items`, `iteritems`, `iterkeys`, `itervalues`, `join`, `keys`, `ljust`, `lower`, `lstrip`, `numerator`, `partition`, `pop`, `popitem`, `real`, `remove`, `replace`, `reverse`, `rfind`, `rindex`, `rjust`, `rpartition`, `rsplit`, `rstrip`, `setdefault`, `sort`, `split`, `splitlines`, `startswith`, `strip`, `swapcase`, `symmetric_difference`, `symmetric_difference_update`, `title`, `translate`, `union`, `update`, `upper`, `values`, `viewitems`, `viewkeys`, `viewvalues`, `zfill`.

 Registering variables
---------------------

 You can create variables from the output of an Ansible task with the task keyword `register`. You can use registered variables in any later tasks in your play. For example:

 
```
- hosts: web_servers

  tasks:

     - name: Run a shell command and register its output as a variable
       ansible.builtin.shell: /usr/bin/foo
       register: foo_result
       ignore_errors: true

     - name: Run a shell command using output of the previous task
       ansible.builtin.shell: /usr/bin/bar
       when: foo_result.rc == 5

```
 For more examples of using registered variables in conditions on later tasks, see [Conditionals](playbooks_conditionals#playbooks-conditionals). Registered variables may be simple variables, list variables, dictionary variables, or complex nested data structures. The documentation for each module includes a `RETURN` section describing the return values for that module. To see the values for a particular task, run your playbook with `-v`.

 Registered variables are stored in memory. You cannot cache registered variables for use in future plays. Registered variables are only valid on the host for the rest of the current playbook run.

 Registered variables are host-level variables. When you register a variable in a task with a loop, the registered variable contains a value for each item in the loop. The data structure placed in the variable during the loop will contain a `results` attribute, that is a list of all responses from the module. For a more in-depth example of how this works, see the [Loops](playbooks_loops#playbooks-loops) section on using register with a loop.

  Note

 If a task fails or is skipped, Ansible still registers a variable with a failure or skipped status, unless the task is skipped based on tags. See [Tags](playbooks_tags#tags) for information on adding and using tags.

  Referencing nested variables
----------------------------

 Many registered variables (and [facts](playbooks_vars_facts#vars-and-facts)) are nested YAML or JSON data structures. You cannot access values from these nested data structures with the simple `{{ foo }}` syntax. You must use either bracket notation or dot notation. For example, to reference an IP address from your facts using the bracket notation:

 
```
{{ ansible_facts["eth0"]["ipv4"]["address"] }}

```
 To reference an IP address from your facts using the dot notation:

 
```
{{ ansible_facts.eth0.ipv4.address }}

```
 Transforming variables with Jinja2 filters
------------------------------------------

 Jinja2 filters let you transform the value of a variable within a template expression. For example, the `capitalize` filter capitalizes any value passed to it; the `to_yaml` and `to_json` filters change the format of your variable values. Jinja2 includes many [built-in filters](https://jinja.palletsprojects.com/templates/#builtin-filters) and Ansible supplies many more filters. To find more examples of filters, see [Using filters to manipulate data](playbooks_filters#playbooks-filters).

 Where to set variables
----------------------

 You can define variables in a variety of places, such as in inventory, in playbooks, in reusable files, in roles, and at the command line. Ansible loads every possible variable it finds, then chooses the variable to apply based on [variable precedence rules](#ansible-variable-precedence).

 ### Defining variables in inventory

 You can define different variables for each individual host, or set shared variables for a group of hosts in your inventory. For example, if all machines in the `[Boston]` group use ‘boston.ntp.example.com’ as an NTP server, you can set a group variable. The [How to build your inventory](intro_inventory#intro-inventory) page has details on setting [host variables](intro_inventory#host-variables) and [group variables](intro_inventory#group-variables) in inventory.

 ### Defining variables in a play

 You can define variables directly in a playbook play:

 
```
- hosts: webservers
  vars:
    http_port: 80

```
 When you define variables in a play, they are only visible to tasks executed in that play.

 ### Defining variables in included files and roles

 You can define variables in reusable variables files and/or in reusable roles. When you define variables in reusable variable files, the sensitive variables are separated from playbooks. This separation enables you to store your playbooks in a source control software and even share the playbooks, without the risk of exposing passwords or other sensitive and personal data. For information about creating reusable files and roles, see [Re-using Ansible artifacts](playbooks_reuse#playbooks-reuse).

 This example shows how you can include variables defined in an external file:

 
```
---

- hosts: all
  remote_user: root
  vars:
    favcolor: blue
  vars_files:
    - /vars/external_vars.yml

  tasks:

  - name: This is just a placeholder
    ansible.builtin.command: /bin/echo foo

```
 The contents of each variables file is a simple YAML dictionary. For example:

 
```
---
# in the above example, this would be vars/external_vars.yml
somevar: somevalue
password: magic

```
  Note

 You can keep per-host and per-group variables in similar files. To learn about organizing your variables, see [Organizing host and group variables](intro_inventory#splitting-out-vars).

  ### Defining variables at runtime

 You can define variables when you run your playbook by passing variables at the command line using the `--extra-vars` (or `-e`) argument. You can also request user input with a `vars_prompt` (see [Interactive input: prompts](playbooks_prompts#playbooks-prompts)). When you pass variables at the command line, use a single quoted string, that contains one or more variables, in one of the formats below.

 #### key=value format

 Values passed in using the `key=value` syntax are interpreted as strings. Use the JSON format if you need to pass non-string values such as Booleans, integers, floats, lists, and so on.

 
```
ansible-playbook release.yml --extra-vars "version=1.23.45 other_variable=foo"

```
 #### JSON string format

 
```
ansible-playbook release.yml --extra-vars '{"version":"1.23.45","other_variable":"foo"}'
ansible-playbook arcade.yml --extra-vars '{"pacman":"mrs","ghosts":["inky","pinky","clyde","sue"]}'

```
 When passing variables with `--extra-vars`, you must escape quotes and other special characters appropriately for both your markup (for example, JSON), and for your shell:

 
```
ansible-playbook arcade.yml --extra-vars "{\"name\":\"Conan O\'Brien\"}"
ansible-playbook arcade.yml --extra-vars '{"name":"Conan O'\\\''Brien"}'
ansible-playbook script.yml --extra-vars "{\"dialog\":\"He said \\\"I just can\'t get enough of those single and double-quotes"\!"\\\"\"}"

```
 If you have a lot of special characters, use a JSON or YAML file containing the variable definitions.

 #### vars from a JSON or YAML file

 
```
ansible-playbook release.yml --extra-vars "@some_file.json"

```
 Variable precedence: Where should I put a variable?
---------------------------------------------------

 You can set multiple variables with the same name in many different places. When you do this, Ansible loads every possible variable it finds, then chooses the variable to apply based on variable precedence. In other words, the different variables will override each other in a certain order.

 Teams and projects that agree on guidelines for defining variables (where to define certain types of variables) usually avoid variable precedence concerns. We suggest that you define each variable in one place: figure out where to define a variable, and keep it simple. For examples, see [Tips on where to set variables](#variable-examples).

 Some behavioral parameters that you can set in variables you can also set in Ansible configuration, as command-line options, and using playbook keywords. For example, you can define the user Ansible uses to connect to remote devices as a variable with `ansible_user`, in a configuration file with `DEFAULT_REMOTE_USER`, as a command-line option with `-u`, and with the playbook keyword `remote_user`. If you define the same parameter in a variable and by another method, the variable overrides the other setting. This approach allows host-specific settings to override more general settings. For examples and more details on the precedence of these various settings, see [Controlling how Ansible behaves: precedence rules](../reference_appendices/general_precedence#general-precedence-rules).

 ### Understanding variable precedence

 Ansible does apply variable precedence, and you might have a use for it. Here is the order of precedence from least to greatest (the last listed variables override all other variables):

 1. command line values (for example, `-u my_user`, these are not variables)
2. role defaults (defined in role/defaults/main.yml) [1](#id13)
3. inventory file or script group vars [2](#id14)
4. inventory group\_vars/all [3](#id15)
5. playbook group\_vars/all [3](#id15)
6. inventory group\_vars/\* [3](#id15)
7. playbook group\_vars/\* [3](#id15)
8. inventory file or script host vars [2](#id14)
9. inventory host\_vars/\* [3](#id15)
10. playbook host\_vars/\* [3](#id15)
11. host facts / cached set\_facts [4](#id16)
12. play vars
13. play vars\_prompt
14. play vars\_files
15. role vars (defined in role/vars/main.yml)
16. block vars (only for tasks in block)
17. task vars (only for the task)
18. include\_vars
19. set\_facts / registered vars
20. role (and include\_role) params
21. include params
22. extra vars (for example, `-e "user=my_user"`)(always win precedence)

 In general, Ansible gives precedence to variables that were defined more recently, more actively, and with more explicit scope. Variables in the defaults folder inside a role are easily overridden. Anything in the vars directory of the role overrides previous versions of that variable in the namespace. Host and/or inventory variables override role defaults, but explicit includes such as the vars directory or an `include_vars` task override inventory variables.

 Ansible merges different variables set in inventory so that more specific settings override more generic settings. For example, `ansible_ssh_user` specified as a group\_var is overridden by `ansible_user` specified as a host\_var. For details about the precedence of variables set in inventory, see [How variables are merged](intro_inventory#how-we-merge).

 #### Footnotes

  
`1`  
Tasks in each role see their own role’s defaults. Tasks defined outside of a role see the last role’s defaults.

  
`2(1,2)`  
Variables defined in inventory file or provided by dynamic inventory.

  
`3(1,2,3,4,5,6)`  
Includes vars added by ‘vars plugins’ as well as host\_vars and group\_vars which are added by the default vars plugin shipped with Ansible.

  
`4`  
When created with set\_facts’s cacheable option, variables have the high precedence in the play, but are the same as a host facts precedence when they come from the cache.

    Note

 Within any section, redefining a var overrides the previous instance. If multiple groups have the same variable, the last one loaded wins. If you define a variable twice in a play’s `vars:` section, the second one wins.

   Note

 The previous describes the default config `hash_behaviour=replace`, switch to `merge` to only partially overwrite.

  ### Scoping variables

 You can decide where to set a variable based on the scope you want that value to have. Ansible has three main scopes:

 * Global: this is set by config, environment variables and the command line
* Play: each play and contained structures, vars entries (vars; vars\_files; vars\_prompt), role defaults and vars.
* Host: variables directly associated to a host, like inventory, include\_vars, facts or registered task outputs

 Inside a template, you automatically have access to all variables that are in scope for a host, plus any registered variables, facts, and magic variables.

 ### Tips on where to set variables

 You should choose where to define a variable based on the kind of control you might want over values.

 Set variables in inventory that deal with geography or behavior. Since groups are frequently the entity that maps roles onto hosts, you can often set variables on the group instead of defining them on a role. Remember: child groups override parent groups, and host variables override group variables. See [Defining variables in inventory](#define-variables-in-inventory) for details on setting host and group variables.

 Set common defaults in a `group_vars/all` file. See [Organizing host and group variables](intro_inventory#splitting-out-vars) for details on how to organize host and group variables in your inventory. Group variables are generally placed alongside your inventory file, but they can also be returned by dynamic inventory (see [Working with dynamic inventory](intro_dynamic_inventory#intro-dynamic-inventory)) or defined in AWX or on [Red Hat Ansible Automation Platform](https://docs.ansible.com/ansible/latest/reference_appendices/tower.html#ansible-platform) from the UI or API:

 
```
---
# file: /etc/ansible/group_vars/all
# this is the site wide default
ntp_server: default-time.example.com

```
 Set location-specific variables in `group_vars/my_location` files. All groups are children of the `all` group, so variables set here override those set in `group_vars/all`:

 
```
---
# file: /etc/ansible/group_vars/boston
ntp_server: boston-time.example.com

```
 If one host used a different NTP server, you could set that in a host\_vars file, which would override the group variable:

 
```
---
# file: /etc/ansible/host_vars/xyz.boston.example.com
ntp_server: override.example.com

```
 Set defaults in roles to avoid undefined-variable errors. If you share your roles, other users can rely on the reasonable defaults you added in the `roles/x/defaults/main.yml` file, or they can easily override those values in inventory or at the command line. See [Roles](playbooks_reuse_roles#playbooks-reuse-roles) for more info. For example:

 
```
---
# file: roles/x/defaults/main.yml
# if no other value is supplied in inventory or as a parameter, this value will be used
http_port: 80

```
 Set variables in roles to ensure a value is used in that role, and is not overridden by inventory variables. If you are not sharing your role with others, you can define app-specific behaviors like ports this way, in `roles/x/vars/main.yml`. If you are sharing roles with others, putting variables here makes them harder to override, although they still can by passing a parameter to the role or setting a variable with `-e`:

 
```
---
# file: roles/x/vars/main.yml
# this will absolutely be used in this role
http_port: 80

```
 Pass variables as parameters when you call roles for maximum clarity, flexibility, and visibility. This approach overrides any defaults that exist for a role. For example:

 
```
roles:
   - role: apache
     vars:
        http_port: 8080

```
 When you read this playbook it is clear that you have chosen to set a variable or override a default. You can also pass multiple values, which allows you to run the same role multiple times. See [Running a role multiple times in one playbook](playbooks_reuse_roles#run-role-twice) for more details. For example:

 
```
roles:
   - role: app_user
     vars:
        myname: Ian
   - role: app_user
     vars:
       myname: Terry
   - role: app_user
     vars:
       myname: Graham
   - role: app_user
     vars:
       myname: John

```
 Variables set in one role are available to later roles. You can set variables in a `roles/common_settings/vars/main.yml` file and use them in other roles and elsewhere in your playbook:

 
```
roles:
   - role: common_settings
   - role: something
     vars:
       foo: 12
   - role: something_else

```
  Note

 There are some protections in place to avoid the need to namespace variables. In this example, variables defined in ‘common\_settings’ are available to ‘something’ and ‘something\_else’ tasks, but tasks in ‘something’ have foo set at 12, even if ‘common\_settings’ sets foo to 20.

  Instead of worrying about variable precedence, we encourage you to think about how easily or how often you want to override a variable when deciding where to set it. If you are not sure what other variables are defined, and you need a particular value, use `--extra-vars` (`-e`) to override all other variables.

 Using advanced variable syntax
------------------------------

 For information about advanced YAML syntax used to declare variables and have more control over the data placed in YAML files used by Ansible, see [Advanced Syntax](playbooks_advanced_syntax#playbooks-advanced-syntax).

  See also

  [Intro to playbooks](playbooks_intro#about-playbooks)

An introduction to playbooks

  [Conditionals](playbooks_conditionals#playbooks-conditionals)

Conditional statements in playbooks

  [Using filters to manipulate data](playbooks_filters#playbooks-filters)

Jinja2 filters and their uses

  [Loops](playbooks_loops#playbooks-loops)

Looping in playbooks

  [Roles](playbooks_reuse_roles#playbooks-reuse-roles)

Playbook organization by roles

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [Special Variables](../reference_appendices/special_variables#special-variables)

List of special variables

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html>

ansible.builtin.set\_fact – Set host variable(s) and fact(s).
=============================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `set_fact` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 1.2: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * This action allows setting variables associated to the current host.
* These variables will be available to subsequent plays during an ansible-playbook run via the host they were set on.
* Set `cacheable` to `yes` to save variables across executions using a fact cache. Variables will keep the set\_fact precedence for the current run, but will used ‘cached fact’ precedence for subsequent ones.
* Per the standard Ansible variable precedence rules, other types of variables have a higher priority, so this value may be overridden.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cacheable**  boolean   added in 2.4 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | This boolean converts the variable into an actual 'fact' which will also be added to the fact cache, if fact caching is enabled. Normally this module creates 'host level variables' and has much higher precedence, this option changes the nature and precedence (by 7 steps) of the variable created. [https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_variables.html#variable-precedence-where-should-i-put-a-variable](../../../user_guide/playbooks_variables#variable-precedence-where-should-i-put-a-variable)
 This actually creates 2 copies of the variable, a normal 'set\_fact' host variable with high precedence and a lower 'ansible\_fact' one that is available for persistance via the facts cache plugin. This creates a possibly confusing interaction with `meta: clear_facts` as it will remove the 'ansible\_fact' but not the host variable. |
| **key\_value**  string / required  |  | The `set_fact` module takes ``key=value`` pairs or ``key: value``(YAML notation) as variables to set in the playbook scope. The 'key' is the resulting variable name and the value is, of course, the value of said variable. You can create multiple variables at once, by supplying multiple pairs, but do NOT mix notations. |

   
 Notes
-----

  Note

 * Because of the nature of tasks, set\_fact will produce ‘static’ values for a variable. Unlike normal ‘lazy’ variables, the value gets evaluated and templated on assignment.
* Some boolean values (yes, no, true, false) will always be converted to boolean type, unless `DEFAULT_JINJA2_NATIVE` is enabled. This is done so the `var=value` booleans, otherwise it would only be able to create strings, but it also prevents using those values to create YAML strings. Using the setting will restrict k=v to strings, but will allow you to specify string or boolean in YAML.
* To create lists/arrays or dictionary/hashes use YAML notation `var: [val1, val2]`.
* Since ‘cacheable’ is now a module param, ‘cacheable’ is no longer a valid fact name.
* This action does not use a connection and always executes on the controller.

  See Also
--------

  See also

  [ansible.builtin.include\_vars](include_vars_module#ansible-collections-ansible-builtin-include-vars-module)

The official documentation on the **ansible.builtin.include\_vars** module.

  [Variable precedence: Where should I put a variable?](../../../user_guide/playbooks_variables#ansible-variable-precedence)

More information related to variable precedence and which type of variable wins over others.

    Examples
--------

 
```
- name: Setting host facts using key=value pairs, this format can only create strings or booleans
  set_fact: one_fact="something" other_fact="{{ local_var }}"

- name: Setting host facts using complex arguments
  set_fact:
    one_fact: something
    other_fact: "{{ local_var * 2 }}"
    another_fact: "{{ some_registered_var.results | map(attribute='ansible_facts.some_fact') | list }}"

- name: Setting facts so that they will be persisted in the fact cache
  set_fact:
    one_fact: something
    other_fact: "{{ local_var * 2 }}"
    cacheable: yes

- name: Creating list and dictionary variables
  set_fact:
    one_dict:
        something: here
        other: there
    one_list:
        - a
        - b
        - c

- name: Creating list and dictionary variables using 'shorthand' YAML
  set_fact:
    two_dict: {'something': here2, 'other': somewhere}
    two_list: [1,2,3]

```
 ### Authors

 * Dag Wieers (@dagwieers)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/set_fact_module.html>

Using collections
=================

 Collections are a distribution format for Ansible content that can include playbooks, roles, modules, and plugins. As modules move from the core Ansible repository into collections, the module documentation will move to the [collections pages](../collections/index#list-of-collections).

 You can install and use collections through [Ansible Galaxy](https://galaxy.ansible.com).

 * For details on how to *develop* collections see [Developing collections](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html#developing-collections).
* For the current development status of Collections and FAQ see [Ansible Collections Community Guide](https://github.com/ansible-collections/overview/blob/main/README.rst).

 * [Installing collections](#installing-collections)


	+ [Installing collections with `ansible-galaxy`](#installing-collections-with-ansible-galaxy)
	+ [Installing an older version of a collection](#installing-an-older-version-of-a-collection)
	+ [Installing a collection from a git repository](#installing-a-collection-from-a-git-repository)
	+ [Install multiple collections with a requirements file](#install-multiple-collections-with-a-requirements-file)
	+ [Downloading a collection for offline use](#downloading-a-collection-for-offline-use)
	+ [Configuring the `ansible-galaxy` client](#configuring-the-ansible-galaxy-client)
* [Downloading collections](#downloading-collections)
* [Listing collections](#listing-collections)
* [Verifying collections](#verifying-collections)


	+ [Verifying collections with `ansible-galaxy`](#verifying-collections-with-ansible-galaxy)
* [Using collections in a Playbook](#using-collections-in-a-playbook)
* [Simplifying module names with the `collections` keyword](#simplifying-module-names-with-the-collections-keyword)


	+ [Using `collections` in roles](#using-collections-in-roles)
	+ [Using `collections` in playbooks](#using-collections-in-playbooks)
* [Using a playbook from a collection](#using-a-playbook-from-a-collection)

 Installing collections
----------------------

  Note

 If you install a collection manually as described in this paragraph, the collection will not be upgraded automatically when you upgrade the `ansible` package or `ansible-core`.

  ### Installing collections with `ansible-galaxy`

 By default, `ansible-galaxy collection install` uses <https://galaxy.ansible.com> as the Galaxy server (as listed in the `ansible.cfg` file under [GALAXY\_SERVER](../reference_appendices/config#galaxy-server)). You do not need any further configuration.

 See [Configuring the ansible-galaxy client](#galaxy-server-config) if you are using any other Galaxy server, such as Red Hat Automation Hub.

 To install a collection hosted in Galaxy:

 
```
ansible-galaxy collection install my_namespace.my_collection

```
 To upgrade a collection to the latest available version from the Galaxy server you can use the `--upgrade` option:

 
```
ansible-galaxy collection install my_namespace.my_collection --upgrade

```
 You can also directly use the tarball from your build:

 
```
ansible-galaxy collection install my_namespace-my_collection-1.0.0.tar.gz -p ./collections

```
 You can build and install a collection from a local source directory. The `ansible-galaxy` utility builds the collection using the `MANIFEST.json` or `galaxy.yml` metadata in the directory.

 
```
ansible-galaxy collection install /path/to/collection -p ./collections

```
 You can also install multiple collections in a namespace directory.

 
```
ns/
├── collection1/
│   ├── MANIFEST.json
│   └── plugins/
└── collection2/
    ├── galaxy.yml
    └── plugins/

```
 
```
ansible-galaxy collection install /path/to/ns -p ./collections

```
  Note

 The install command automatically appends the path `ansible_collections` to the one specified with the `-p` option unless the parent directory is already in a folder called `ansible_collections`.

  When using the `-p` option to specify the install path, use one of the values configured in [COLLECTIONS\_PATHS](../reference_appendices/config#collections-paths), as this is where Ansible itself will expect to find collections. If you don’t specify a path, `ansible-galaxy collection install` installs the collection to the first path defined in [COLLECTIONS\_PATHS](../reference_appendices/config#collections-paths), which by default is `~/.ansible/collections`

 You can also keep a collection adjacent to the current playbook, under a `collections/ansible_collections/` directory structure.

 
```
./
├── play.yml
├── collections/
│   └── ansible_collections/
│               └── my_namespace/
│                   └── my_collection/<collection structure lives here>

```
 See [Collection structure](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections_structure.html#collection-structure) for details on the collection directory structure.

 ### Installing an older version of a collection

 You can only have one version of a collection installed at a time. By default `ansible-galaxy` installs the latest available version. If you want to install a specific version, you can add a version range identifier. For example, to install the 1.0.0-beta.1 version of the collection:

 
```
ansible-galaxy collection install my_namespace.my_collection:==1.0.0-beta.1

```
 You can specify multiple range identifiers separated by `,`. Use single quotes so the shell passes the entire command, including `>`, `!`, and other operators, along. For example, to install the most recent version that is greater than or equal to 1.0.0 and less than 2.0.0:

 
```
ansible-galaxy collection install 'my_namespace.my_collection:>=1.0.0,<2.0.0'

```
 Ansible will always install the most recent version that meets the range identifiers you specify. You can use the following range identifiers:

 * `*`: The most recent version. This is the default.
* `!=`: Not equal to the version specified.
* `==`: Exactly the version specified.
* `>=`: Greater than or equal to the version specified.
* `>`: Greater than the version specified.
* `<=`: Less than or equal to the version specified.
* `<`: Less than the version specified.

  Note

 By default `ansible-galaxy` ignores pre-release versions. To install a pre-release version, you must use the `==` range identifier to require it explicitly.

  ### Installing a collection from a git repository

 You can install a collection from a git repository instead of from Galaxy or Automation Hub. As a developer, installing from a git repository lets you review your collection before you create the tarball and publish the collection. As a user, installing from a git repository lets you use collections or versions that are not in Galaxy or Automation Hub yet.

 The repository must contain a `galaxy.yml` or `MANIFEST.json` file. This file provides metadata such as the version number and namespace of the collection.

 #### Installing a collection from a git repository at the command line

 To install a collection from a git repository at the command line, use the URI of the repository instead of a collection name or path to a `tar.gz` file. Prefix the URI with `git+` (or with `git@` to use a private repository with ssh authentication). You can specify a branch, commit, or tag using the comma-separated [git commit-ish](https://git-scm.com/docs/gitglossary#def_commit-ish) syntax.

 For example:

 
```
# Install a collection in a repository using the latest commit on the branch 'devel'
ansible-galaxy collection install git+https://github.com/organization/repo_name.git,devel

# Install a collection from a private github repository
ansible-galaxy collection install git@github.com:organization/repo_name.git

# Install a collection from a local git repository
ansible-galaxy collection install git+file:///home/user/path/to/repo_name.git

```
  Warning

 Embedding credentials into a git URI is not secure. Use safe authentication options to prevent your credentials from being exposed in logs or elsewhere.

 * Use [SSH](https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh) authentication
* Use [netrc](https://linux.die.net/man/5/netrc) authentication
* Use [http.extraHeader](https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpextraHeader) in your git configuration
* Use [url.<base>.pushInsteadOf](https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtpushInsteadOf) in your git configuration

  #### Specifying the collection location within the git repository

 When you install a collection from a git repository, Ansible uses the collection `galaxy.yml` or `MANIFEST.json` metadata file to build the collection. By default, Ansible searches two paths for collection `galaxy.yml` or `MANIFEST.json` metadata files:

 * The top level of the repository.
* Each directory in the repository path (one level deep).

 If a `galaxy.yml` or `MANIFEST.json` file exists in the top level of the repository, Ansible uses the collection metadata in that file to install an individual collection.

 
```
├── galaxy.yml
├── plugins/
│   ├── lookup/
│   ├── modules/
│   └── module_utils/
└─── README.md

```
 If a `galaxy.yml` or `MANIFEST.json` file exists in one or more directories in the repository path (one level deep), Ansible installs each directory with a metadata file as a collection. For example, Ansible installs both collection1 and collection2 from this repository structure by default:

 
```
├── collection1
│   ├── docs/
│   ├── galaxy.yml
│   └── plugins/
│       ├── inventory/
│       └── modules/
└── collection2
    ├── docs/
    ├── galaxy.yml
    ├── plugins/
    |   ├── filter/
    |   └── modules/
    └── roles/

```
 If you have a different repository structure or only want to install a subset of collections, you can add a fragment to the end of your URI (before the optional comma-separated version) to indicate the location of the metadata file or files. The path should be a directory, not the metadata file itself. For example, to install only collection2 from the example repository with two collections:

 
```
ansible-galaxy collection install git+https://github.com/organization/repo_name.git#/collection2/

```
 In some repositories, the main directory corresponds to the namespace:

 
```
namespace/
├── collectionA/
|   ├── docs/
|   ├── galaxy.yml
|   ├── plugins/
|   │   ├── README.md
|   │   └── modules/
|   ├── README.md
|   └── roles/
└── collectionB/
    ├── docs/
    ├── galaxy.yml
    ├── plugins/
    │   ├── connection/
    │   └── modules/
    ├── README.md
    └── roles/

```
 You can install all collections in this repository, or install one collection from a specific commit:

 
```
# Install all collections in the namespace
ansible-galaxy collection install git+https://github.com/organization/repo_name.git#/namespace/

# Install an individual collection using a specific commit
ansible-galaxy collection install git+https://github.com/organization/repo_name.git#/namespace/collectionA/,7b60ddc245bc416b72d8ea6ed7b799885110f5e5

```
 ### Install multiple collections with a requirements file

 You can set up a `requirements.yml` file to install multiple collections in one command. This file is a YAML file in the format:

 
```
---
collections:
# With just the collection name
- my_namespace.my_collection

# With the collection name, version, and source options
- name: my_namespace.my_other_collection
  version: 'version range identifiers (default: ``*``)'
  source: 'The Galaxy URL to pull the collection from (default: ``--api-server`` from cmdline)'

```
 You can specify four keys for each collection entry:

 * `name`
* `version`
* `source`
* `type`

 The `version` key uses the same range identifier format documented in [Installing an older version of a collection](#collections-older-version).

 The `type` key can be set to `galaxy`, `url`, `file`, and `git`. If `type` is omitted, the `name` key is used to implicitly determine the source of the collection.

 When you install a collection with `type: git`, the `version` key can refer to a branch or to a [git commit-ish](https://git-scm.com/docs/gitglossary#def_commit-ish) object (commit or tag). For example:

 
```
collections:
  - name: https://github.com/organization/repo_name.git
    type: git
    version: devel

```
 You can also add roles to a `requirements.yml` file, under the `roles` key. The values follow the same format as a requirements file used in older Ansible releases.

 
```
---
roles:
  # Install a role from Ansible Galaxy.
  - name: geerlingguy.java
    version: 1.9.6

collections:
  # Install a collection from Ansible Galaxy.
  - name: geerlingguy.php_roles
    version: 0.9.3
    source: https://galaxy.ansible.com

```
 To install both roles and collections at the same time with one command, run the following:

 
```
$ ansible-galaxy install -r requirements.yml

```
 Running `ansible-galaxy collection install -r` or `ansible-galaxy role install -r` will only install collections, or roles respectively.

  Note

 Installing both roles and collections from the same requirements file will not work when specifying a custom collection or role install path. In this scenario the collections will be skipped and the command will process each like `ansible-galaxy role install` would.

  ### Downloading a collection for offline use

 To download the collection tarball from Galaxy for offline use:

 1. Navigate to the collection page.
2. Click on Download tarball.

 You may also need to manually download any dependent collections.

 ### Configuring the `ansible-galaxy` client

 By default, `ansible-galaxy` uses <https://galaxy.ansible.com> as the Galaxy server (as listed in the `ansible.cfg` file under [GALAXY\_SERVER](../reference_appendices/config#galaxy-server)).

 You can use either option below to configure `ansible-galaxy collection` to use other servers (such as Red Hat Automation Hub or a custom Galaxy server):

 * Set the server list in the [GALAXY\_SERVER\_LIST](../reference_appendices/config#galaxy-server-list) configuration option in [The configuration file](../reference_appendices/config#ansible-configuration-settings-locations).
* Use the `--server` command line argument to limit to an individual server.

 To configure a Galaxy server list in `ansible.cfg`:

 1. Add the `server_list` option under the `[galaxy]` section to one or more server names.
2. Create a new section for each server name.
3. Set the `url` option for each server name.
4. Optionally, set the API token for each server name. Go to <https://galaxy.ansible.com/me/preferences> and click Show API key.

  Note

 The `url` option for each server name must end with a forward slash `/`. If you do not set the API token in your Galaxy server list, use the `--api-key` argument to pass in the token to the `ansible-galaxy collection publish` command.

  For Automation Hub, you additionally need to:

 1. Set the `auth_url` option for each server name.
2. Set the API token for each server name. Go to <https://cloud.redhat.com/ansible/automation-hub/token/> and click :Get API token from the version dropdown to copy your API token.

 The following example shows how to configure multiple servers:

 
```
[galaxy]
server_list = automation_hub, my_org_hub, release_galaxy, test_galaxy

[galaxy_server.automation_hub]
url=https://cloud.redhat.com/api/automation-hub/
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
token=my_ah_token

[galaxy_server.my_org_hub]
url=https://automation.my_org/
username=my_user
password=my_pass

[galaxy_server.release_galaxy]
url=https://galaxy.ansible.com/
token=my_token

[galaxy_server.test_galaxy]
url=https://galaxy-dev.ansible.com/
token=my_test_token

```
  Note

 You can use the `--server` command line argument to select an explicit Galaxy server in the `server_list` and the value of this argument should match the name of the server. To use a server not in the server list, set the value to the URL to access that server (all servers in the server list will be ignored). Also you cannot use the `--api-key` argument for any of the predefined servers. You can only use the `api_key` argument if you did not define a server list or if you specify a URL in the `--server` argument.

  **Galaxy server list configuration options**

 The [GALAXY\_SERVER\_LIST](../reference_appendices/config#galaxy-server-list) option is a list of server identifiers in a prioritized order. When searching for a collection, the install process will search in that order, for example, `automation_hub` first, then `my_org_hub`, `release_galaxy`, and finally `test_galaxy` until the collection is found. The actual Galaxy instance is then defined under the section `[galaxy_server.{{ id }}]` where `{{ id }}` is the server identifier defined in the list. This section can then define the following keys:

 * `url`: The URL of the Galaxy instance to connect to. Required.
* `token`: An API token key to use for authentication against the Galaxy instance. Mutually exclusive with `username`.
* `username`: The username to use for basic authentication against the Galaxy instance. Mutually exclusive with `token`.
* `password`: The password to use, in conjunction with `username`, for basic authentication.
* `auth_url`: The URL of a Keycloak server ‘token\_endpoint’ if using SSO authentication (for example, Automation Hub). Mutually exclusive with `username`. Requires `token`.

 As well as defining these server options in the `ansible.cfg` file, you can also define them as environment variables. The environment variable is in the form `ANSIBLE_GALAXY_SERVER_{{ id }}_{{ key }}` where `{{ id }}` is the upper case form of the server identifier and `{{ key }}` is the key to define. For example I can define `token` for `release_galaxy` by setting `ANSIBLE_GALAXY_SERVER_RELEASE_GALAXY_TOKEN=secret_token`.

 For operations that use only one Galaxy server (for example, the `publish`, `info`, or `install` commands). the `ansible-galaxy collection` command uses the first entry in the `server_list`, unless you pass in an explicit server with the `--server` argument.

  Note

 Once a collection is found, any of its requirements are only searched within the same Galaxy instance as the parent collection. The install process will not search for a collection requirement in a different Galaxy instance.

  Downloading collections
-----------------------

 To download a collection and its dependencies for an offline install, run `ansible-galaxy collection download`. This downloads the collections specified and their dependencies to the specified folder and creates a `requirements.yml` file which can be used to install those collections on a host without access to a Galaxy server. All the collections are downloaded by default to the `./collections` folder.

 Just like the `install` command, the collections are sourced based on the [configured galaxy server config](#galaxy-server-config). Even if a collection to download was specified by a URL or path to a tarball, the collection will be redownloaded from the configured Galaxy server.

 Collections can be specified as one or multiple collections or with a `requirements.yml` file just like `ansible-galaxy collection install`.

 To download a single collection and its dependencies:

 
```
ansible-galaxy collection download my_namespace.my_collection

```
 To download a single collection at a specific version:

 
```
ansible-galaxy collection download my_namespace.my_collection:1.0.0

```
 To download multiple collections either specify multiple collections as command line arguments as shown above or use a requirements file in the format documented with [Install multiple collections with a requirements file](#collection-requirements-file).

 
```
ansible-galaxy collection download -r requirements.yml

```
 You can also download a source collection directory. The collection is built with the mandatory `galaxy.yml` file.

 
```
ansible-galaxy collection download /path/to/collection

ansible-galaxy collection download git+file:///path/to/collection/.git

```
 You can download multiple source collections from a single namespace by providing the path to the namespace.

 
```
ns/
├── collection1/
│   ├── galaxy.yml
│   └── plugins/
└── collection2/
    ├── galaxy.yml
    └── plugins/

```
 
```
ansible-galaxy collection install /path/to/ns

```
 All the collections are downloaded by default to the `./collections` folder but you can use `-p` or `--download-path` to specify another path:

 
```
ansible-galaxy collection download my_namespace.my_collection -p ~/offline-collections

```
 Once you have downloaded the collections, the folder contains the collections specified, their dependencies, and a `requirements.yml` file. You can use this folder as is with `ansible-galaxy collection install` to install the collections on a host without access to a Galaxy or Automation Hub server.

 
```
# This must be run from the folder that contains the offline collections and requirements.yml file downloaded
# by the internet-connected host
cd ~/offline-collections
ansible-galaxy collection install -r requirements.yml

```
 Listing collections
-------------------

 To list installed collections, run `ansible-galaxy collection list`. This shows all of the installed collections found in the configured collections search paths. It will also show collections under development which contain a galaxy.yml file instead of a MANIFEST.json. The path where the collections are located are displayed as well as version information. If no version information is available, a `*` is displayed for the version number.

 
```
# /home/astark/.ansible/collections/ansible_collections
Collection                 Version
-------------------------- -------
cisco.aci                  0.0.5
cisco.mso                  0.0.4
sandwiches.ham             *
splunk.es                  0.0.5

# /usr/share/ansible/collections/ansible_collections
Collection        Version
----------------- -------
fortinet.fortios  1.0.6
pureport.pureport 0.0.8
sensu.sensu_go    1.3.0

```
 Run with `-vvv` to display more detailed information.

 To list a specific collection, pass a valid fully qualified collection name (FQCN) to the command `ansible-galaxy collection list`. All instances of the collection will be listed.

 
```
> ansible-galaxy collection list fortinet.fortios

# /home/astark/.ansible/collections/ansible_collections
Collection       Version
---------------- -------
fortinet.fortios 1.0.1

# /usr/share/ansible/collections/ansible_collections
Collection       Version
---------------- -------
fortinet.fortios 1.0.6

```
 To search other paths for collections, use the `-p` option. Specify multiple search paths by separating them with a `:`. The list of paths specified on the command line will be added to the beginning of the configured collections search paths.

 
```
> ansible-galaxy collection list -p '/opt/ansible/collections:/etc/ansible/collections'

# /opt/ansible/collections/ansible_collections
Collection      Version
--------------- -------
sandwiches.club 1.7.2

# /etc/ansible/collections/ansible_collections
Collection     Version
-------------- -------
sandwiches.pbj 1.2.0

# /home/astark/.ansible/collections/ansible_collections
Collection                 Version
-------------------------- -------
cisco.aci                  0.0.5
cisco.mso                  0.0.4
fortinet.fortios           1.0.1
sandwiches.ham             *
splunk.es                  0.0.5

# /usr/share/ansible/collections/ansible_collections
Collection        Version
----------------- -------
fortinet.fortios  1.0.6
pureport.pureport 0.0.8
sensu.sensu_go    1.3.0

```
 Verifying collections
---------------------

 ### Verifying collections with `ansible-galaxy`

 Once installed, you can verify that the content of the installed collection matches the content of the collection on the server. This feature expects that the collection is installed in one of the configured collection paths and that the collection exists on one of the configured galaxy servers.

 
```
ansible-galaxy collection verify my_namespace.my_collection

```
 The output of the `ansible-galaxy collection verify` command is quiet if it is successful. If a collection has been modified, the altered files are listed under the collection name.

 
```
ansible-galaxy collection verify my_namespace.my_collection
Collection my_namespace.my_collection contains modified content in the following files:
my_namespace.my_collection
    plugins/inventory/my_inventory.py
    plugins/modules/my_module.py

```
 You can use the `-vvv` flag to display additional information, such as the version and path of the installed collection, the URL of the remote collection used for validation, and successful verification output.

 
```
ansible-galaxy collection verify my_namespace.my_collection -vvv
...
Verifying 'my_namespace.my_collection:1.0.0'.
Installed collection found at '/path/to/ansible_collections/my_namespace/my_collection/'
Remote collection found at 'https://galaxy.ansible.com/download/my_namespace-my_collection-1.0.0.tar.gz'
Successfully verified that checksums for 'my_namespace.my_collection:1.0.0' match the remote collection

```
 If you have a pre-release or non-latest version of a collection installed you should include the specific version to verify. If the version is omitted, the installed collection is verified against the latest version available on the server.

 
```
ansible-galaxy collection verify my_namespace.my_collection:1.0.0

```
 In addition to the `namespace.collection_name:version` format, you can provide the collections to verify in a `requirements.yml` file. Dependencies listed in `requirements.yml` are not included in the verify process and should be verified separately.

 
```
ansible-galaxy collection verify -r requirements.yml

```
 Verifying against `tar.gz` files is not supported. If your `requirements.yml` contains paths to tar files or URLs for installation, you can use the `--ignore-errors` flag to ensure that all collections using the `namespace.name` format in the file are processed.

 Using collections in a Playbook
-------------------------------

 Once installed, you can reference a collection content by its fully qualified collection name (FQCN):

 
```
- hosts: all
  tasks:
    - my_namespace.my_collection.mymodule:
        option1: value

```
 This works for roles or any type of plugin distributed within the collection:

 
```
- hosts: all
  tasks:
    - import_role:
        name: my_namespace.my_collection.role1

    - my_namespace.mycollection.mymodule:
        option1: value

    - debug:
        msg: '{{ lookup("my_namespace.my_collection.lookup1", 'param1')| my_namespace.my_collection.filter1 }}'

```
 Simplifying module names with the `collections` keyword
-------------------------------------------------------

 The `collections` keyword lets you define a list of collections that your role or playbook should search for unqualified module and action names. So you can use the `collections` keyword, then simply refer to modules and action plugins by their short-form names throughout that role or playbook.

  Warning

 If your playbook uses both the `collections` keyword and one or more roles, the roles do not inherit the collections set by the playbook. This is one of the reasons we recommend you always use FQCN. See below for roles details.

  ### Using `collections` in roles

 Within a role, you can control which collections Ansible searches for the tasks inside the role using the `collections` keyword in the role’s `meta/main.yml`. Ansible will use the collections list defined inside the role even if the playbook that calls the role defines different collections in a separate `collections` keyword entry. Roles defined inside a collection always implicitly search their own collection first, so you don’t need to use the `collections` keyword to access modules, actions, or other roles contained in the same collection.

 
```
# myrole/meta/main.yml
collections:
  - my_namespace.first_collection
  - my_namespace.second_collection
  - other_namespace.other_collection

```
 ### Using `collections` in playbooks

 In a playbook, you can control the collections Ansible searches for modules and action plugins to execute. However, any roles you call in your playbook define their own collections search order; they do not inherit the calling playbook’s settings. This is true even if the role does not define its own `collections` keyword.

 
```
- hosts: all
  collections:
    - my_namespace.my_collection

  tasks:
    - import_role:
        name: role1

    - mymodule:
        option1: value

    - debug:
        msg: '{{ lookup("my_namespace.my_collection.lookup1", "param1")| my_namespace.my_collection.filter1 }}'

```
 The `collections` keyword merely creates an ordered ‘search path’ for non-namespaced plugin and role references. It does not install content or otherwise change Ansible’s behavior around the loading of plugins or roles. Note that an FQCN is still required for non-action or module plugins (for example, lookups, filters, tests).

 Using a playbook from a collection
----------------------------------

  New in version 2.11.

  You can also distribute playbooks in your collection and invoke them using the same semantics you use for plugins:

 
```
ansible-playbook my_namespace.my_collection.playbook1 -i ./myinventory

```
 From inside a playbook:

 
```
- import_playbook: my_namespace.my_collection.playbookX

```
 A few recommendations when creating such playbooks, `hosts:` should be generic or at least have a variable input.

 
```
- hosts: all  # Use --limit or customized inventory to restrict hosts targeted

- hosts: localhost  # For things you want to restrict to the controller

- hosts: '{{target|default("webservers")}}'  # Assumes inventory provides a 'webservers' group, but can also use ``-e 'target=host1,host2'``

```
 This will have an implied entry in the `collections:` keyword of `my_namespace.my_collection` just as with roles.

  See also

  [Developing collections](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html#developing-collections)

Develop or modify a collection.

  [Collection Galaxy metadata structure](https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html#collections-galaxy-meta)

Understand the collections metadata structure.

  [Mailing List](https://groups.google.com/group/ansible-devel)

The development mailing list

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/collections_using.html>

CloudEngine OS Platform Options
===============================

 CloudEngine CE OS is part of the [community.network](https://galaxy.ansible.com/community/network) collection and supports multiple connections. This page offers details on how each connection works in Ansible and how to use it.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI inventory `[ce:vars]`](#example-cli-inventory-ce-vars)
	+ [Example CLI task](#example-cli-task)
* [Using NETCONF in Ansible](#using-netconf-in-ansible)


	+ [Enabling NETCONF](#enabling-netconf)
	+ [Example NETCONF inventory `[ce:vars]`](#example-netconf-inventory-ce-vars)
	+ [Example NETCONF task](#example-netconf-task)
* [Notes](#notes)


	+ [Modules that work with `ansible.netcommon.network_cli`](#modules-that-work-with-ansible-netcommon-network-cli)
	+ [Modules that work with `ansible.netcommon.netconf`](#modules-that-work-with-ansible-netcommon-netconf)

 Connections available
---------------------

 

|  | CLI | NETCONF |
| --- | --- | --- |
| Protocol | SSH | XML over SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) | via a bastion (jump host) |
| Connection Settings |  
`ansible_connection:` 

`ansible.netcommon.network_cli`   |  
`ansible_connection:` 

`ansible.netcommon.netconf`   |
| Enable Mode  (Privilege Escalation) | not supported by ce OS | not supported by ce OS |
| Returned Data Format | Refer to individual module documentation | Refer to individual module documentation |

 The `ansible_connection: local` has been deprecated. Please use `ansible_connection: ansible.netcommon.netconf` or `ansible_connection=ansible.netcommon.network_cli` instead.

 Using CLI in Ansible
--------------------

 ### Example CLI inventory `[ce:vars]`

 
```
[ce:vars]
ansible_connection=ansible.netcommon.network_cli
ansible_network_os=community.network.ce
ansible_user=myuser
ansible_password=!vault...
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Retrieve CE OS version
  community.network.ce_command:
    commands: display version
  when: ansible_network_os == 'community.network.ce'

```
 Using NETCONF in Ansible
------------------------

 ### Enabling NETCONF

 Before you can use NETCONF to connect to a switch, you must:

 * install the `ncclient` python package on your control node(s) with `pip install ncclient`
* enable NETCONF on the CloudEngine OS device(s)

 To enable NETCONF on a new switch using Ansible, use the `community.network.ce_config` module with the CLI connection. Set up your platform-level variables just like in the CLI example above, then run a playbook task like this:

 
```
- name: Enable NETCONF
  connection: ansible.netcommon.network_cli
  community.network.ce_config:
    lines:
      - snetconf server enable
  when: ansible_network_os == 'community.network.ce'

```
 Once NETCONF is enabled, change your variables to use the NETCONF connection.

 ### Example NETCONF inventory `[ce:vars]`

 
```
[ce:vars]
ansible_connection=ansible.netcommon.netconf
ansible_network_os=community.network.ce
ansible_user=myuser
ansible_password=!vault |
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 ### Example NETCONF task

 
```
- name: Create a vlan, id is 50(ce)
  community.network.ce_vlan:
    vlan_id: 50
    name: WEB
  when: ansible_network_os == 'community.network.ce'

```
 Notes
-----

 ### Modules that work with `ansible.netcommon.network_cli`

 
```
community.network.ce_acl_interface
community.network.ce_command
community.network.ce_config
community.network.ce_evpn_bgp
community.network.ce_evpn_bgp_rr
community.network.ce_evpn_global
community.network.ce_facts
community.network.ce_mlag_interface
community.network.ce_mtu
community.network.ce_netstream_aging
community.network.ce_netstream_export
community.network.ce_netstream_global
community.network.ce_netstream_template
community.network.ce_ntp_auth
community.network.ce_rollback
community.network.ce_snmp_contact
community.network.ce_snmp_location
community.network.ce_snmp_traps
community.network.ce_startup
community.network.ce_stp
community.network.ce_vxlan_arp
community.network.ce_vxlan_gateway
community.network.ce_vxlan_global

```
 ### Modules that work with `ansible.netcommon.netconf`

 
```
community.network.ce_aaa_server
community.network.ce_aaa_server_host
community.network.ce_acl
community.network.ce_acl_advance
community.network.ce_bfd_global
community.network.ce_bfd_session
community.network.ce_bfd_view
community.network.ce_bgp
community.network.ce_bgp_af
community.network.ce_bgp_neighbor
community.network.ce_bgp_neighbor_af
community.network.ce_dldp
community.network.ce_dldp_interface
community.network.ce_eth_trunk
community.network.ce_evpn_bd_vni
community.network.ce_file_copy
community.network.ce_info_center_debug
community.network.ce_info_center_global
community.network.ce_info_center_log
community.network.ce_info_center_trap
community.network.ce_interface
community.network.ce_interface_ospf
community.network.ce_ip_interface
community.network.ce_lacp
community.network.ce_link_status
community.network.ce_lldp
community.network.ce_lldp_interface
community.network.ce_mlag_config
community.network.ce_netconf
community.network.ce_ntp
community.network.ce_ospf
community.network.ce_ospf_vrf
community.network.ce_reboot
community.network.ce_sflow
community.network.ce_snmp_community
community.network.ce_snmp_target_host
community.network.ce_snmp_user
community.network.ce_static_route
community.network.ce_static_route_bfd
community.network.ce_switchport
community.network.ce_vlan
community.network.ce_vrf
community.network.ce_vrf_af
community.network.ce_vrf_interface
community.network.ce_vrrp
community.network.ce_vxlan_tunnel
community.network.ce_vxlan_vap

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_ce.html>

CNOS Platform Options
=====================

 CNOS is part of the [community.network](https://galaxy.ansible.com/community/network) collection and supports Enable Mode (Privilege Escalation). This page offers details on how to use Enable Mode on CNOS in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/cnos.yml`](#example-cli-group-vars-cnos-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | supported: use `ansible_become: yes` with `ansible_become_method: enable` and `ansible_become_password:` |
| Returned Data Format | `stdout[0].` |

 The `ansible_connection: local` has been deprecated. Please use `ansible_connection: ansible.netcommon.network_cli` instead.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/cnos.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: community.network.cnos
ansible_user: myuser
ansible_password: !vault...
ansible_become: yes
ansible_become_method: enable
ansible_become_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Retrieve CNOS OS version
  community.network.cnos_command:
    commands: show version
  when: ansible_network_os == 'community.network.cnos'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_cnos.html>

Dell OS6 Platform Options
=========================

 The [dellemc.os6](https://github.com/ansible-collections/dellemc.os6) collection supports Enable Mode (Privilege Escalation). This page offers details on how to use Enable Mode on OS6 in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/dellos6.yml`](#example-cli-group-vars-dellos6-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | supported: use `ansible_become: yes` with `ansible_become_method: enable` and `ansible_become_password:` |
| Returned Data Format | `stdout[0].` |

 The `ansible_connection: local` has been deprecated. Please use `ansible_connection: ansible.netcommon.network_cli` instead.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/dellos6.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: dellemc.os6.os6
ansible_user: myuser
ansible_password: !vault...
ansible_become: yes
ansible_become_method: enable
ansible_become_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Backup current switch config (dellos6)
  dellemc.os6.os6_config:
    backup: yes
  register: backup_dellso6_location
  when: ansible_network_os == 'dellemc.os6.os6'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_dellos6.html>

Dell OS9 Platform Options
=========================

 The [dellemc.os9](https://github.com/ansible-collections/dellemc.os9) collection supports Enable Mode (Privilege Escalation). This page offers details on how to use Enable Mode on OS9 in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/dellos9.yml`](#example-cli-group-vars-dellos9-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | supported: use `ansible_become: yes` with `ansible_become_method: enable` and `ansible_become_password:` |
| Returned Data Format | `stdout[0].` |

 The `ansible_connection: local` has been deprecated. Please use `ansible_connection: ansible.netcommon.network_cli` instead.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/dellos9.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: dellemc.os9.os9
ansible_user: myuser
ansible_password: !vault...
ansible_become: yes
ansible_become_method: enable
ansible_become_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Backup current switch config (dellos9)
  dellemc.os9.os9_config:
    backup: yes
  register: backup_dellos9_location
  when: ansible_network_os == 'dellemc.os9.os9'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_dellos9.html>

ansible.builtin.include\_vars – Load variables from files, dynamically within a task
====================================================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `include_vars` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 1.4: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Loads YAML/JSON variables dynamically from a file or directory, recursively, during task runtime.
* If loading a directory, the files are sorted alphabetically before being loaded.
* This module is also supported for Windows targets.
* To assign included variables to a different host than `inventory_hostname`, use `delegate_to` and set `delegate_facts=yes`.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **depth**  integer   added in 2.2 of ansible.builtin  | **Default:**0 | When using `dir`, this module will, by default, recursively go through each sub directory and load up the variables. By explicitly setting the depth, this module will only go as deep as the depth. |
| **dir**  path   added in 2.2 of ansible.builtin  |  | The directory name from which the variables should be loaded. If the path is relative and the task is inside a role, it will look inside the role's vars/ subdirectory. If the path is relative and not inside a role, it will be parsed relative to the playbook. |
| **extensions**  list / elements=string   added in 2.3 of ansible.builtin  | **Default:**["json", "yaml", "yml"] | List of file extensions to read when using `dir`. |
| **file**  path   added in 2.2 of ansible.builtin  |  | The file name from which variables should be loaded. If the path is relative, it will look for the file in vars/ subdirectory of a role or relative to playbook. |
| **files\_matching**  string   added in 2.2 of ansible.builtin  |  | Limit the files that are loaded within any directory to this regular expression. |
| **free-form**  string  |  | This module allows you to specify the 'file' option directly without any other options. There is no 'free-form' option, this is just an indicator, see example below. |
| **ignore\_files**  list / elements=string   added in 2.2 of ansible.builtin  |  | List of file names to ignore. |
| **ignore\_unknown\_extensions**  boolean   added in 2.7 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Ignore unknown file extensions within the directory. This allows users to specify a directory containing vars files that are intermingled with non-vars files extension types (e.g. a directory with a README in it and vars files). |
| **name**  string   added in 2.2 of ansible.builtin  |  | The name of a variable into which assign the included vars. If omitted (null) they will be made top level vars. |

   
 Notes
-----

  Note

 * This module is also supported for Windows targets.

  See Also
--------

  See also

  [ansible.builtin.set\_fact](set_fact_module#ansible-collections-ansible-builtin-set-fact-module)

The official documentation on the **ansible.builtin.set\_fact** module.

  [Controlling where tasks run: delegation and local actions](../../../user_guide/playbooks_delegation#playbooks-delegation)

More information related to task delegation.

    Examples
--------

 
```
- name: Include vars of stuff.yaml into the 'stuff' variable (2.2).
  include_vars:
    file: stuff.yaml
    name: stuff

- name: Conditionally decide to load in variables into 'plans' when x is 0, otherwise do not. (2.2)
  include_vars:
    file: contingency_plan.yaml
    name: plans
  when: x == 0

- name: Load a variable file based on the OS type, or a default if not found. Using free-form to specify the file.
  include_vars: "{{ lookup('first_found', params) }}"
  vars:
    params:
      files:
        - '{{ansible_distribution}}.yaml'
        - '{{ansible_os_family}}.yaml'
        - default.yaml
      paths:
        - 'vars'

- name: Bare include (free-form)
  include_vars: myvars.yaml

- name: Include all .json and .jsn files in vars/all and all nested directories (2.3)
  include_vars:
    dir: vars/all
    extensions:
      - 'json'
      - 'jsn'

- name: Include all default extension files in vars/all and all nested directories and save the output in test. (2.2)
  include_vars:
    dir: vars/all
    name: test

- name: Include default extension files in vars/services (2.2)
  include_vars:
    dir: vars/services
    depth: 1

- name: Include only files matching bastion.yaml (2.2)
  include_vars:
    dir: vars
    files_matching: bastion.yaml

- name: Include all .yaml files except bastion.yaml (2.3)
  include_vars:
    dir: vars
    ignore_files:
      - 'bastion.yaml'
    extensions:
      - 'yaml'

- name: Ignore warnings raised for files with unknown extensions while loading (2.7)
  include_vars:
    dir: vars
    ignore_unknown_extensions: True
    extensions:
      - ''
      - 'yaml'
      - 'yml'
      - 'json'

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_included\_var\_files**  list / elements=string  added in 2.4 of ansible.builtin | success | A list of files that were successfully included  **Sample:** ['/path/to/file.json', '/path/to/file.yaml'] |

   
  
 ### Authors

 * Allen Sanabria (@linuxdynasty)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/include_vars_module.html>

Roles
=====

 Roles let you automatically load related vars, files, tasks, handlers, and other Ansible artifacts based on a known file structure. After you group your content in roles, you can easily reuse them and share them with other users.

 * [Role directory structure](#role-directory-structure)
* [Storing and finding roles](#storing-and-finding-roles)
* [Using roles](#using-roles)


	+ [Using roles at the play level](#using-roles-at-the-play-level)
	+ [Including roles: dynamic reuse](#including-roles-dynamic-reuse)
	+ [Importing roles: static reuse](#importing-roles-static-reuse)
* [Role argument validation](#role-argument-validation)


	+ [Specification format](#specification-format)
	+ [Sample specification](#sample-specification)
* [Running a role multiple times in one playbook](#running-a-role-multiple-times-in-one-playbook)


	+ [Passing different parameters](#passing-different-parameters)
	+ [Using `allow_duplicates: true`](#using-allow-duplicates-true)
* [Using role dependencies](#using-role-dependencies)


	+ [Running role dependencies multiple times in one playbook](#running-role-dependencies-multiple-times-in-one-playbook)
* [Embedding modules and plugins in roles](#embedding-modules-and-plugins-in-roles)
* [Sharing roles: Ansible Galaxy](#sharing-roles-ansible-galaxy)

 Role directory structure
------------------------

 An Ansible role has a defined directory structure with eight main standard directories. You must include at least one of these directories in each role. You can omit any directories the role does not use. For example:

 
```
# playbooks
site.yml
webservers.yml
fooservers.yml
roles/
    common/
        tasks/
        handlers/
        library/
        files/
        templates/
        vars/
        defaults/
        meta/
    webservers/
        tasks/
        defaults/
        meta/

```
 By default Ansible will look in each directory within a role for a `main.yml` file for relevant content (also `main.yaml` and `main`):

 * `tasks/main.yml` - the main list of tasks that the role executes.
* `handlers/main.yml` - handlers, which may be used within or outside this role.
* `library/my_module.py` - modules, which may be used within this role (see [Embedding modules and plugins in roles](#embedding-modules-and-plugins-in-roles) for more information).
* `defaults/main.yml` - default variables for the role (see [Using Variables](playbooks_variables#playbooks-variables) for more information). These variables have the lowest priority of any variables available, and can be easily overridden by any other variable, including inventory variables.
* `vars/main.yml` - other variables for the role (see [Using Variables](playbooks_variables#playbooks-variables) for more information).
* `files/main.yml` - files that the role deploys.
* `templates/main.yml` - templates that the role deploys.
* `meta/main.yml` - metadata for the role, including role dependencies.

 You can add other YAML files in some directories. For example, you can place platform-specific tasks in separate files and refer to them in the `tasks/main.yml` file:

 
```
# roles/example/tasks/main.yml
- name: Install the correct web server for RHEL
  import_tasks: redhat.yml
  when: ansible_facts['os_family']|lower == 'redhat'

- name: Install the correct web server for Debian
  import_tasks: debian.yml
  when: ansible_facts['os_family']|lower == 'debian'

# roles/example/tasks/redhat.yml
- name: Install web server
  ansible.builtin.yum:
    name: "httpd"
    state: present

# roles/example/tasks/debian.yml
- name: Install web server
  ansible.builtin.apt:
    name: "apache2"
    state: present

```
 Roles may also include modules and other plugin types in a directory called `library`. For more information, please refer to [Embedding modules and plugins in roles](#embedding-modules-and-plugins-in-roles) below.

 Storing and finding roles
-------------------------

 By default, Ansible looks for roles in two locations:

 * in a directory called `roles/`, relative to the playbook file
* in `/etc/ansible/roles`

 If you store your roles in a different location, set the [roles\_path](../reference_appendices/config#default-roles-path) configuration option so Ansible can find your roles. Checking shared roles into a single location makes them easier to use in multiple playbooks. See [Configuring Ansible](../installation_guide/intro_configuration#intro-configuration) for details about managing settings in ansible.cfg.

 Alternatively, you can call a role with a fully qualified path:

 
```
---
- hosts: webservers
  roles:
    - role: '/path/to/my/roles/common'

```
 Using roles
-----------

 You can use roles in three ways:

 * at the play level with the `roles` option: This is the classic way of using roles in a play.
* at the tasks level with `include_role`: You can reuse roles dynamically anywhere in the `tasks` section of a play using `include_role`.
* at the tasks level with `import_role`: You can reuse roles statically anywhere in the `tasks` section of a play using `import_role`.

 ### Using roles at the play level

 The classic (original) way to use roles is with the `roles` option for a given play:

 
```
---
- hosts: webservers
  roles:
    - common
    - webservers

```
 When you use the `roles` option at the play level, for each role ‘x’:

 * If roles/x/tasks/main.yml exists, Ansible adds the tasks in that file to the play.
* If roles/x/handlers/main.yml exists, Ansible adds the handlers in that file to the play.
* If roles/x/vars/main.yml exists, Ansible adds the variables in that file to the play.
* If roles/x/defaults/main.yml exists, Ansible adds the variables in that file to the play.
* If roles/x/meta/main.yml exists, Ansible adds any role dependencies in that file to the list of roles.
* Any copy, script, template or include tasks (in the role) can reference files in roles/x/{files,templates,tasks}/ (dir depends on task) without having to path them relatively or absolutely.

 When you use the `roles` option at the play level, Ansible treats the roles as static imports and processes them during playbook parsing. Ansible executes your playbook in this order:

 * Any `pre_tasks` defined in the play.
* Any handlers triggered by pre\_tasks.
* Each role listed in `roles:`, in the order listed. Any role dependencies defined in the role’s `meta/main.yml` run first, subject to tag filtering and conditionals. See [Using role dependencies](#role-dependencies) for more details.
* Any `tasks` defined in the play.
* Any handlers triggered by the roles or tasks.
* Any `post_tasks` defined in the play.
* Any handlers triggered by post\_tasks.

  Note

 If using tags with tasks in a role, be sure to also tag your pre\_tasks, post\_tasks, and role dependencies and pass those along as well, especially if the pre/post tasks and role dependencies are used for monitoring outage window control or load balancing. See [Tags](playbooks_tags#tags) for details on adding and using tags.

  You can pass other keywords to the `roles` option:

 
```
---
- hosts: webservers
  roles:
    - common
    - role: foo_app_instance
      vars:
        dir: '/opt/a'
        app_port: 5000
      tags: typeA
    - role: foo_app_instance
      vars:
        dir: '/opt/b'
        app_port: 5001
      tags: typeB

```
 When you add a tag to the `role` option, Ansible applies the tag to ALL tasks within the role.

 When using `vars:` within the `roles:` section of a playbook, the variables are added to the play variables, making them available to all tasks within the play before and after the role. This behavior can be changed by [DEFAULT\_PRIVATE\_ROLE\_VARS](../reference_appendices/config#default-private-role-vars).

 ### Including roles: dynamic reuse

 You can reuse roles dynamically anywhere in the `tasks` section of a play using `include_role`. While roles added in a `roles` section run before any other tasks in a playbook, included roles run in the order they are defined. If there are other tasks before an `include_role` task, the other tasks will run first.

 To include a role:

 
```
---
- hosts: webservers
  tasks:
    - name: Print a message
      ansible.builtin.debug:
        msg: "this task runs before the example role"

    - name: Include the example role
      include_role:
        name: example

    - name: Print a message
      ansible.builtin.debug:
        msg: "this task runs after the example role"

```
 You can pass other keywords, including variables and tags, when including roles:

 
```
---
- hosts: webservers
  tasks:
    - name: Include the foo_app_instance role
      include_role:
        name: foo_app_instance
      vars:
        dir: '/opt/a'
        app_port: 5000
      tags: typeA
  ...

```
 When you add a [tag](playbooks_tags#tags) to an `include_role` task, Ansible applies the tag `only` to the include itself. This means you can pass `--tags` to run only selected tasks from the role, if those tasks themselves have the same tag as the include statement. See [Selectively running tagged tasks in re-usable files](playbooks_tags#selective-reuse) for details.

 You can conditionally include a role:

 
```
---
- hosts: webservers
  tasks:
    - name: Include the some_role role
      include_role:
        name: some_role
      when: "ansible_facts['os_family'] == 'RedHat'"

```
 ### Importing roles: static reuse

 You can reuse roles statically anywhere in the `tasks` section of a play using `import_role`. The behavior is the same as using the `roles` keyword. For example:

 
```
---
- hosts: webservers
  tasks:
    - name: Print a message
      ansible.builtin.debug:
        msg: "before we run our role"

    - name: Import the example role
      import_role:
        name: example

    - name: Print a message
      ansible.builtin.debug:
        msg: "after we ran our role"

```
 You can pass other keywords, including variables and tags, when importing roles:

 
```
---
- hosts: webservers
  tasks:
    - name: Import the foo_app_instance role
      import_role:
        name: foo_app_instance
      vars:
        dir: '/opt/a'
        app_port: 5000
  ...

```
 When you add a tag to an `import_role` statement, Ansible applies the tag to `all` tasks within the role. See [Tag inheritance: adding tags to multiple tasks](playbooks_tags#tag-inheritance) for details.

 Role argument validation
------------------------

 Beginning with version 2.11, you may choose to enable role argument validation based on an argument specification. This specification is defined in the `meta/argument_specs.yml` file (or with the `.yaml` file extension). When this argument specification is defined, a new task is inserted at the beginning of role execution that will validate the parameters supplied for the role against the specification. If the parameters fail validation, the role will fail execution.

  Note

 Ansible also supports role specifications defined in the role `meta/main.yml` file, as well. However, any role that defines the specs within this file will not work on versions below 2.11. For this reason, we recommend using the `meta/argument_specs.yml` file to maintain backward compatibility.

   Note

 When role argument validation is used on a role that has defined [dependencies](#role-dependencies), then validation on those dependencies will run before the dependent role, even if argument validation fails for the dependent role.

  ### Specification format

 The role argument specification must be defined in a top-level `argument_specs` block within the role `meta/argument_specs.yml` file. All fields are lower-case.

  entry-point-name 
* The name of the role entry point.
* This should be `main` in the case of an unspecified entry point.
* This will be the base name of the tasks file to execute, with no `.yml` or `.yaml` file extension.

  short\_description 
* A short, one-line description of the entry point.
* The `short_description` is displayed by `ansible-doc -t role -l`.

  description 
* A longer description that may contain multiple lines.

  author 
* Name of the entry point authors.
* Use a multi-line list if there is more than one author.

  options 
* Options are often called “parameters” or “arguments”. This section defines those options.
* For each role option (argument), you may include:

  option-name 
* The name of the option/argument.

  description 
* Detailed explanation of what this option does. It should be written in full sentences.

  type 
* The data type of the option. Default is `str`.
* If an option is of type `list`, `elements` should be specified.

  required 
* Only needed if `true`.
* If missing, the option is not required.

  default 
* If `required` is false/missing, `default` may be specified (assumed ‘null’ if missing).
* Ensure that the default value in the docs matches the default value in the code. The actual default for the role variable will always come from `defaults/main.yml`.
* The default field must not be listed as part of the description, unless it requires additional information or conditions.
* If the option is a boolean value, you can use any of the boolean values recognized by Ansible: (such as true/false or yes/no). Choose the one that reads better in the context of the option.

  choices 
* List of option values.
* Should be absent if empty.

  elements 
* Specifies the data type for list elements when type is `list`.

  options 
* If this option takes a dict or list of dicts, you can define the structure here.

       ### Sample specification

 
```
# roles/myapp/meta/argument_specs.yml
---
argument_specs:
  # roles/myapp/tasks/main.yml entry point
  main:
    short_description: The main entry point for the myapp role.
    options:
      myapp_int:
        type: "int"
        required: false
        default: 42
        description: "The integer value, defaulting to 42."

      myapp_str:
        type: "str"
        required: true
        description: "The string value"

  # roles/maypp/tasks/alternate.yml entry point
  alternate:
    short_description: The alternate entry point for the myapp role.
    options:
      myapp_int:
        type: "int"
        required: false
        default: 1024
        description: "The integer value, defaulting to 1024."

```
 Running a role multiple times in one playbook
---------------------------------------------

 Ansible only executes each role once, even if you define it multiple times, unless the parameters defined on the role are different for each definition. For example, Ansible only runs the role `foo` once in a play like this:

 
```
---
- hosts: webservers
  roles:
    - foo
    - bar
    - foo

```
 You have two options to force Ansible to run a role more than once.

 ### Passing different parameters

 If you pass different parameters in each role definition, Ansible runs the role more than once. Providing different variable values is not the same as passing different role parameters. You must use the `roles` keyword for this behavior, since `import_role` and `include_role` do not accept role parameters.

 This playbook runs the `foo` role twice:

 
```
---
- hosts: webservers
  roles:
    - { role: foo, message: "first" }
    - { role: foo, message: "second" }

```
 This syntax also runs the `foo` role twice;

 
```
---
- hosts: webservers
  roles:
    - role: foo
      message: "first"
    - role: foo
      message: "second"

```
 In these examples, Ansible runs `foo` twice because each role definition has different parameters.

 ### Using `allow_duplicates: true`

 Add `allow_duplicates: true` to the `meta/main.yml` file for the role:

 
```
# playbook.yml
---
- hosts: webservers
  roles:
    - foo
    - foo

# roles/foo/meta/main.yml
---
allow_duplicates: true

```
 In this example, Ansible runs `foo` twice because we have explicitly enabled it to do so.

 Using role dependencies
-----------------------

 Role dependencies let you automatically pull in other roles when using a role. Ansible does not execute role dependencies when you include or import a role. You must use the `roles` keyword if you want Ansible to execute role dependencies.

 Role dependencies are prerequisites, not true dependencies. The roles do not have a parent/child relationship. Ansible loads all listed roles, runs the roles listed under `dependencies` first, then runs the role that lists them. The play object is the parent of all roles, including roles called by a `dependencies` list.

 Role dependencies are stored in the `meta/main.yml` file within the role directory. This file should contain a list of roles and parameters to insert before the specified role. For example:

 
```
# roles/myapp/meta/main.yml
---
dependencies:
  - role: common
    vars:
      some_parameter: 3
  - role: apache
    vars:
      apache_port: 80
  - role: postgres
    vars:
      dbname: blarg
      other_parameter: 12

```
 Ansible always executes roles listed in `dependencies` before the role that lists them. Ansible executes this pattern recursively when you use the `roles` keyword. For example, if you list role `foo` under `roles:`, role `foo` lists role `bar` under `dependencies` in its meta/main.yml file, and role `bar` lists role `baz` under `dependencies` in its meta/main.yml, Ansible executes `baz`, then `bar`, then `foo`.

 ### Running role dependencies multiple times in one playbook

 Ansible treats duplicate role dependencies like duplicate roles listed under `roles:`: Ansible only executes role dependencies once, even if defined multiple times, unless the parameters, tags, or when clause defined on the role are different for each definition. If two roles in a playbook both list a third role as a dependency, Ansible only runs that role dependency once, unless you pass different parameters, tags, when clause, or use `allow_duplicates: true` in the role you want to run multiple times. See [Galaxy role dependencies](../galaxy/user_guide#galaxy-dependencies) for more details.

  Note

 Role deduplication does not consult the invocation signature of parent roles. Additionally, when using `vars:` instead of role params, there is a side effect of changing variable scoping. Using `vars:` results in those variables being scoped at the play level. In the below example, using `vars:` would cause `n` to be defined as `4` through the entire play, including roles called before it.

 In addition to the above, users should be aware that role de-duplication occurs before variable evaluation. This means that [Lazy Evaluation](https://docs.ansible.com/ansible/latest/reference_appendices/glossary.html#term-Lazy-Evaluation) may make seemingly different role invocations equivalently the same, preventing the role from running more than once.

  For example, a role named `car` depends on a role named `wheel` as follows:

 
```
---
dependencies:
  - role: wheel
    n: 1
  - role: wheel
    n: 2
  - role: wheel
    n: 3
  - role: wheel
    n: 4

```
 And the `wheel` role depends on two roles: `tire` and `brake`. The `meta/main.yml` for wheel would then contain the following:

 
```
---
dependencies:
  - role: tire
  - role: brake

```
 And the `meta/main.yml` for `tire` and `brake` would contain the following:

 
```
---
allow_duplicates: true

```
 The resulting order of execution would be as follows:

 
```
tire(n=1)
brake(n=1)
wheel(n=1)
tire(n=2)
brake(n=2)
wheel(n=2)
...
car

```
 To use `allow_duplicates: true` with role dependencies, you must specify it for the role listed under `dependencies`, not for the role that lists it. In the example above, `allow_duplicates: true` appears in the `meta/main.yml` of the `tire` and `brake` roles. The `wheel` role does not require `allow_duplicates: true`, because each instance defined by `car` uses different parameter values.

  Note

 See [Using Variables](playbooks_variables#playbooks-variables) for details on how Ansible chooses among variable values defined in different places (variable inheritance and scope).

  Embedding modules and plugins in roles
--------------------------------------

 If you write a custom module (see [Should you develop a module?](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules.html#developing-modules)) or a plugin (see [Developing plugins](https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html#developing-plugins)), you might wish to distribute it as part of a role. For example, if you write a module that helps configure your company’s internal software, and you want other people in your organization to use this module, but you do not want to tell everyone how to configure their Ansible library path, you can include the module in your internal\_config role.

 To add a module or a plugin to a role: Alongside the ‘tasks’ and ‘handlers’ structure of a role, add a directory named ‘library’ and then include the module directly inside the ‘library’ directory.

 Assuming you had this:

 
```
roles/
    my_custom_modules/
        library/
            module1
            module2

```
 The module will be usable in the role itself, as well as any roles that are called *after* this role, as follows:

 
```
---
- hosts: webservers
  roles:
    - my_custom_modules
    - some_other_role_using_my_custom_modules
    - yet_another_role_using_my_custom_modules

```
 If necessary, you can also embed a module in a role to modify a module in Ansible’s core distribution. For example, you can use the development version of a particular module before it is released in production releases by copying the module and embedding the copy in a role. Use this approach with caution, as API signatures may change in core components, and this workaround is not guaranteed to work.

 The same mechanism can be used to embed and distribute plugins in a role, using the same schema. For example, for a filter plugin:

 
```
roles/
    my_custom_filter/
        filter_plugins
            filter1
            filter2

```
 These filters can then be used in a Jinja template in any role called after ‘my\_custom\_filter’.

 Sharing roles: Ansible Galaxy
-----------------------------

 [Ansible Galaxy](https://galaxy.ansible.com) is a free site for finding, downloading, rating, and reviewing all kinds of community-developed Ansible roles and can be a great way to get a jumpstart on your automation projects.

 The client `ansible-galaxy` is included in Ansible. The Galaxy client allows you to download roles from Ansible Galaxy, and also provides an excellent default framework for creating your own roles.

 Read the [Ansible Galaxy documentation](https://galaxy.ansible.com/docs/) page for more information

  See also

  [Galaxy User Guide](../galaxy/user_guide#ansible-galaxy)

How to create new roles, share roles on Galaxy, role management

  [YAML Syntax](../reference_appendices/yamlsyntax#yaml-syntax)

Learn about YAML syntax

  [Working with playbooks](playbooks#working-with-playbooks)

Review the basic Playbook language features

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [Using Variables](playbooks_variables#playbooks-variables)

Variables in playbooks

  [Conditionals](playbooks_conditionals#playbooks-conditionals)

Conditionals in playbooks

  [Loops](playbooks_loops#playbooks-loops)

Loops in playbooks

  [Tags](playbooks_tags#tags)

Using tags to select or skip roles/tasks in long playbooks

  [Collection Index](../collections/index#list-of-collections)

Browse existing collections, modules, and plugins

  [Should you develop a module?](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules.html#developing-modules)

Extending Ansible by writing your own modules

  [GitHub Ansible examples](https://github.com/ansible/ansible-examples)

Complete playbook files from the GitHub project source

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html>

EXOS Platform Options
=====================

 Extreme EXOS is part of the [community.network](https://galaxy.ansible.com/community/network) collection and supports multiple connections. This page offers details on how each connection works in Ansible and how to use it.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/exos.yml`](#example-cli-group-vars-exos-yml)
	+ [Example CLI task](#example-cli-task)
* [Using EXOS-API in Ansible](#using-exos-api-in-ansible)


	+ [Example EXOS-API `group_vars/exos.yml`](#example-exos-api-group-vars-exos-yml)
	+ [Example EXOS-API task](#example-exos-api-task)

 Connections available
---------------------

 

|  | CLI | EXOS-API |
| --- | --- | --- |
| Protocol | SSH | HTTP(S) |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password | uses HTTPS certificates if present |
| Indirect Access | via a bastion (jump host) | via a web proxy |
| Connection Settings |  
`ansible_connection:` 

`ansible.netcommon.network_cli`   |  
`ansible_connection:` 

`ansible.netcommon.httpapi`   |
| Enable Mode  (Privilege Escalation) | not supported by EXOS | not supported by EXOS |
| Returned Data Format | `stdout[0].` | `stdout[0].messages[0].` |

 EXOS does not support `ansible_connection: local`. You must use `ansible_connection: ansible.netcommon.network_cli` or `ansible_connection: ansible.netcommon.httpapi`.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/exos.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: community.network.exos
ansible_user: myuser
ansible_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Retrieve EXOS OS version
  community.network.exos_command:
    commands: show version
  when: ansible_network_os == 'community.network.exos'

```
 Using EXOS-API in Ansible
-------------------------

 ### Example EXOS-API `group_vars/exos.yml`

 
```
ansible_connection: ansible.netcommon.httpapi
ansible_network_os: community.network.exos
ansible_user: myuser
ansible_password: !vault...
proxy_env:
  http_proxy: http://proxy.example.com:8080

```
 * If you are accessing your host directly (not through a web proxy) you can remove the `proxy_env` configuration.
* If you are accessing your host through a web proxy using `https`, change `http_proxy` to `https_proxy`.

 ### Example EXOS-API task

 
```
- name: Retrieve EXOS OS version
  community.network.exos_command:
    commands: show version
  when: ansible_network_os == 'community.network.exos'

```
 In this example the `proxy_env` variable defined in `group_vars` gets passed to the `environment` option of the module used in the task.

  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_exos.html>

ICX Platform Options
====================

 ICX is part of the [community.network](https://galaxy.ansible.com/community/network) collection supports Enable Mode (Privilege Escalation). This page offers details on how to use Enable Mode on ICX in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/icx.yml`](#example-cli-group-vars-icx-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | supported: use `ansible_become: yes` with `ansible_become_method: enable` and `ansible_become_password:` |
| Returned Data Format | `stdout[0].` |

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/icx.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: community.network.icx
ansible_user: myuser
ansible_password: !vault...
ansible_become: yes
ansible_become_method: enable
ansible_become_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Backup current switch config (icx)
  community.network.icx_config:
    backup: yes
  register: backup_icx_location
  when: ansible_network_os == 'community.network.icx'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_icx.html>

IronWare Platform Options
=========================

 IronWare is part of the [community.network](https://galaxy.ansible.com/community/network) collection and supports Enable Mode (Privilege Escalation). This page offers details on how to use Enable Mode on IronWare in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/mlx.yml`](#example-cli-group-vars-mlx-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | supported: use `ansible_become: yes` with `ansible_become_method: enable` and `ansible_become_password:` |
| Returned Data Format | `stdout[0].` |

 The `ansible_connection: local` has been deprecated. Please use `ansible_connection: ansible.netcommon.network_cli` instead.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/mlx.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: community.network.ironware
ansible_user: myuser
ansible_password: !vault...
ansible_become: yes
ansible_become_method: enable
ansible_become_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Backup current switch config (ironware)
  community.network.ironware_config:
    backup: yes
  register: backup_ironware_location
  when: ansible_network_os == 'community.network.ironware'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_ironware.html>

EOS Platform Options
====================

 The [Arista EOS](https://galaxy.ansible.com/arista/eos) collection supports multiple connections. This page offers details on how each connection works in Ansible and how to use it.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/eos.yml`](#example-cli-group-vars-eos-yml)
	+ [Example CLI task](#example-cli-task)
* [Using eAPI in Ansible](#using-eapi-in-ansible)


	+ [Enabling eAPI](#enabling-eapi)
	+ [Example eAPI `group_vars/eos.yml`](#example-eapi-group-vars-eos-yml)
	+ [Example eAPI task](#example-eapi-task)

 Connections available
---------------------

 

|  | CLI | eAPI |
| --- | --- | --- |
| Protocol | SSH | HTTP(S) |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password | uses HTTPS certificates if present |
| Indirect Access | via a bastion (jump host) | via a web proxy |
| Connection Settings | `ansible_connection:` `ansible.netcommon.network_cli` | `ansible_connection:` `ansible.netcommon.httpapi` |
| Enable Mode  (Privilege Escalation) | supported: * use `ansible_become: yes` with `ansible_become_method: enable`
 | supported: * `httpapi` uses `ansible_become: yes` with `ansible_become_method: enable`
 |
| Returned Data Format | `stdout[0].` | `stdout[0].messages[0].` |

 The `ansible_connection: local` has been deprecated. Please use `ansible_connection: ansible.netcommon.network_cli` or `ansible_connection: ansible.netcommon.httpapi` instead.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/eos.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: arista.eos.eos
ansible_user: myuser
ansible_password: !vault...
ansible_become: yes
ansible_become_method: enable
ansible_become_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Backup current switch config (eos)
  arista.eos.eos_config:
    backup: yes
  register: backup_eos_location
  when: ansible_network_os == 'arista.eos.eos'

```
 Using eAPI in Ansible
---------------------

 ### Enabling eAPI

 Before you can use eAPI to connect to a switch, you must enable eAPI. To enable eAPI on a new switch with Ansible, use the `arista.eos.eos_eapi` module through the CLI connection. Set up `group_vars/eos.yml` just like in the CLI example above, then run a playbook task like this:

 
```
- name: Enable eAPI
  arista.eos.eos_eapi:
    enable_http: yes
    enable_https: yes
  become: true
  become_method: enable
  when: ansible_network_os == 'arista.eos.eos'

```
 You can find more options for enabling HTTP/HTTPS connections in the [arista.eos.eos\_eapi](../../collections/arista/eos/eos_eapi_module#ansible-collections-arista-eos-eos-eapi-module) module documentation.

 Once eAPI is enabled, change your `group_vars/eos.yml` to use the eAPI connection.

 ### Example eAPI `group_vars/eos.yml`

 
```
ansible_connection: ansible.netcommon.httpapi
ansible_network_os: arista.eos.eos
ansible_user: myuser
ansible_password: !vault...
ansible_become: yes
ansible_become_method: enable
proxy_env:
  http_proxy: http://proxy.example.com:8080

```
 * If you are accessing your host directly (not through a web proxy) you can remove the `proxy_env` configuration.
* If you are accessing your host through a web proxy using `https`, change `http_proxy` to `https_proxy`.

 ### Example eAPI task

 
```
- name: Backup current switch config (eos)
  arista.eos.eos_config:
    backup: yes
  register: backup_eos_location
  environment: "{{ proxy_env }}"
  when: ansible_network_os == 'arista.eos.eos'

```
 In this example the `proxy_env` variable defined in `group_vars` gets passed to the `environment` option of the module in the task.

  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_eos.html>

IOS Platform Options
====================

 The [Cisco IOS](https://galaxy.ansible.com/cisco/ios) collection supports Enable Mode (Privilege Escalation). This page offers details on how to use Enable Mode on IOS in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/ios.yml`](#example-cli-group-vars-ios-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | supported: use `ansible_become: yes` with `ansible_become_method: enable` and `ansible_become_password:` |
| Returned Data Format | `stdout[0].` |

 The `ansible_connection: local` has been deprecated. Please use `ansible_connection: ansible.netcommon.network_cli` instead.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/ios.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: cisco.ios.ios
ansible_user: myuser
ansible_password: !vault...
ansible_become: yes
ansible_become_method: enable
ansible_become_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Backup current switch config (ios)
  cisco.ios.ios_config:
    backup: yes
  register: backup_ios_location
  when: ansible_network_os == 'cisco.ios.ios'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html>

FRR Platform Options
====================

 The [FRR](https://galaxy.ansible.com/frr/frr) collection supports the `ansible.netcommon.network_cli` connection. This section provides details on how to use this connection for Free Range Routing (FRR).

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/frr.yml`](#example-cli-group-vars-frr-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | not supported |
| Returned Data Format | `stdout[0].` |

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/frr.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: frr.frr.frr
ansible_user: frruser
ansible_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * The `ansible_user` should be a part of the `frrvty` group and should have the default shell set to `/bin/vtysh`.
* If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Gather FRR facts
  frr.frr.frr_facts:
    gather_subset:
     - config
     - hardware

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_frr.html>

IOS-XR Platform Options
=======================

 The [Cisco IOS-XR collection](https://galaxy.ansible.com/cisco/iosxr) supports multiple connections. This page offers details on how each connection works in Ansible and how to use it.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI inventory `[iosxr:vars]`](#example-cli-inventory-iosxr-vars)
	+ [Example CLI task](#example-cli-task)
* [Using NETCONF in Ansible](#using-netconf-in-ansible)


	+ [Enabling NETCONF](#enabling-netconf)
	+ [Example NETCONF inventory `[iosxr:vars]`](#example-netconf-inventory-iosxr-vars)
	+ [Example NETCONF task](#example-netconf-task)

 Connections available
---------------------

 

|  | CLI | NETCONF only for modules `iosxr_banner`, `iosxr_interface`, `iosxr_logging`, `iosxr_system`, `iosxr_user` |
| --- | --- | --- |
| Protocol | SSH | XML over SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) | via a bastion (jump host) |
| Connection Settings |  
`ansible_connection:` 

`ansible.netcommon.network_cli`   |  
`ansible_connection:` 

`ansible.netcommon.netconf`   |
| Enable Mode  (Privilege Escalation) | not supported | not supported |
| Returned Data Format | Refer to individual module documentation | Refer to individual module documentation |

 The `ansible_connection: local` has been deprecated. Please use `ansible_connection: ansible.netcommon.network_cli` or `ansible_connection: ansible.netcommon.netconf` instead.

 Using CLI in Ansible
--------------------

 ### Example CLI inventory `[iosxr:vars]`

 
```
[iosxr:vars]
ansible_connection=ansible.netcommon.network_cli
ansible_network_os=cisco.iosxr.iosxr
ansible_user=myuser
ansible_password=!vault...
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Retrieve IOS-XR version
  cisco.iosxr.iosxr_command:
    commands: show version
  when: ansible_network_os == 'cisco.iosxr.iosxr'

```
 Using NETCONF in Ansible
------------------------

 ### Enabling NETCONF

 Before you can use NETCONF to connect to a switch, you must:

 * install the `ncclient` python package on your control node(s) with `pip install ncclient`
* enable NETCONF on the Cisco IOS-XR device(s)

 To enable NETCONF on a new switch via Ansible, use the `cisco.iosxr.iosxr_netconf` module through the CLI connection. Set up your platform-level variables just like in the CLI example above, then run a playbook task like this:

 
```
- name: Enable NETCONF
  connection: ansible.netcommon.network_cli
  cisco.iosxr.iosxr_netconf:
  when: ansible_network_os == 'cisco.iosxr.iosxr'

```
 Once NETCONF is enabled, change your variables to use the NETCONF connection.

 ### Example NETCONF inventory `[iosxr:vars]`

 
```
[iosxr:vars]
ansible_connection=ansible.netcommon.netconf
ansible_network_os=cisco.iosxr.iosxr
ansible_user=myuser
ansible_password=!vault |
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 ### Example NETCONF task

 
```
- name: Configure hostname and domain-name
  cisco.iosxr.iosxr_system:
    hostname: iosxr01
    domain_name: test.example.com
    domain_search:
      - ansible.com
      - redhat.com
      - cisco.com

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_iosxr.html>

ERIC\_ECCLI Platform Options
============================

 Extreme ERIC\_ECCLI is part of the [community.network](https://galaxy.ansible.com/community/network) collection and only supports CLI connections today. This page offers details on how to use `ansible.netcommon.network_cli` on ERIC\_ECCLI in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/eric_eccli.yml`](#example-cli-group-vars-eric-eccli-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | not supported by ERIC\_ECCLI |
| Returned Data Format | `stdout[0].` |

 ERIC\_ECCLI does not support `ansible_connection: local`. You must use `ansible_connection: ansible.netcommon.network_cli`.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/eric_eccli.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: community.network.eric_eccli
ansible_user: myuser
ansible_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: run show version on remote devices (eric_eccli)
  community.network.eric_eccli_command:
     commands: show version
  when: ansible_network_os == 'community.network.eric_eccli'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_eric_eccli.html>

ENOS Platform Options
=====================

 ENOS is part of the [community.network](https://galaxy.ansible.com/community/network) collection and supports Enable Mode (Privilege Escalation). This page offers details on how to use Enable Mode on ENOS in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/enos.yml`](#example-cli-group-vars-enos-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | supported: use `ansible_become: yes` with `ansible_become_method: enable` and `ansible_become_password:` |
| Returned Data Format | `stdout[0].` |

 The `ansible_connection: local` has been deprecated. Please use `ansible_connection: ansible.netcommon.network_cli` instead.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/enos.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: community.network.enos
ansible_user: myuser
ansible_password: !vault...
ansible_become: yes
ansible_become_method: enable
ansible_become_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Retrieve ENOS OS version
  community.network.enos_command:
    commands: show version
  when: ansible_network_os == 'community.network.enos'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_enos.html>

Dell OS10 Platform Options
==========================

 The [dellemc.os10](https://galaxy.ansible.com/dellemc_networking/os10) collection supports Enable Mode (Privilege Escalation). This page offers details on how to use Enable Mode on OS10 in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/dellos10.yml`](#example-cli-group-vars-dellos10-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | supported: use `ansible_become: yes` with `ansible_become_method: enable` and `ansible_become_password:` |
| Returned Data Format | `stdout[0].` |

 The `ansible_connection: local` has been deprecated. Please use `ansible_connection: ansible.netcommon.network_cli` instead.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/dellos10.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: dellemc.os10.os10
ansible_user: myuser
ansible_password: !vault...
ansible_become: yes
ansible_become_method: enable
ansible_become_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Backup current switch config (dellos10)
  dellemc.os10.os10_config:
    backup: yes
  register: backup_dellos10_location
  when: ansible_network_os == 'dellemc.os10.os10'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_dellos10.html>

Junos OS Platform Options
=========================

 The [Juniper Junos OS](https://galaxy.ansible.com/junipernetworks/junos) supports multiple connections. This page offers details on how each connection works in Ansible and how to use it.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI inventory `[junos:vars]`](#example-cli-inventory-junos-vars)
	+ [Example CLI task](#example-cli-task)
* [Using NETCONF in Ansible](#using-netconf-in-ansible)


	+ [Enabling NETCONF](#enabling-netconf)
	+ [Example NETCONF inventory `[junos:vars]`](#example-netconf-inventory-junos-vars)
	+ [Example NETCONF task](#example-netconf-task)

 Connections available
---------------------

 

|  | CLI `junos_netconf` & `junos_command` modules only | NETCONF all modules except `junos_netconf`, which enables NETCONF |
| --- | --- | --- |
| Protocol | SSH | XML over SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) | via a bastion (jump host) |
| Connection Settings | `ansible_connection:
``ansible.netcommon.network_cli` | `ansible_connection:
``ansible.netcommon.netconf` |
| Enable Mode  (Privilege Escalation) | not supported by Junos OS | not supported by Junos OS |
| Returned Data Format | `stdout[0].` | * json: `result[0]['software-information'][0]['host-name'][0]['data'] foo lo0`
* text: `result[1].interface-information[0].physical-interface[0].name[0].data foo lo0`
* xml: `result[1].rpc-reply.interface-information[0].physical-interface[0].name[0].data foo lo0`
 |

 The `ansible_connection: local` has been deprecated. Please use `ansible_connection: ansible.netcommon.network_cli` or `ansible_connection: ansible.netcommon.netconf` instead.

 Using CLI in Ansible
--------------------

 ### Example CLI inventory `[junos:vars]`

 
```
[junos:vars]
ansible_connection=ansible.netcommon.network_cli
ansible_network_os=junipernetworks.junos.junos
ansible_user=myuser
ansible_password=!vault...
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Retrieve Junos OS version
  junipernetworks.junos.junos_command:
    commands: show version
  when: ansible_network_os == 'junipernetworks.junos.junos'

```
 Using NETCONF in Ansible
------------------------

 ### Enabling NETCONF

 Before you can use NETCONF to connect to a switch, you must:

 * install the `ncclient` python package on your control node(s) with `pip install ncclient`
* enable NETCONF on the Junos OS device(s)

 To enable NETCONF on a new switch via Ansible, use the `junipernetworks.junos.junos_netconf` module through the CLI connection. Set up your platform-level variables just like in the CLI example above, then run a playbook task like this:

 
```
- name: Enable NETCONF
  connection: ansible.netcommon.network_cli
  junipernetworks.junos.junos_netconf:
  when: ansible_network_os == 'junipernetworks.junos.junos'

```
 Once NETCONF is enabled, change your variables to use the NETCONF connection.

 ### Example NETCONF inventory `[junos:vars]`

 
```
[junos:vars]
ansible_connection=ansible.netcommon.netconf
ansible_network_os=junipernetworks.junos.junos
ansible_user=myuser
ansible_password=!vault |
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 ### Example NETCONF task

 
```
- name: Backup current switch config (junos)
  junipernetworks.junos.junos_config:
    backup: yes
  register: backup_junos_location
  when: ansible_network_os == 'junipernetworks.junos.junos'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_junos.html>

NXOS Platform Options
=====================

 The [Cisco NXOS](https://galaxy.ansible.com/cisco/nxos) supports multiple connections. This page offers details on how each connection works in Ansible and how to use it.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/nxos.yml`](#example-cli-group-vars-nxos-yml)
	+ [Example CLI task](#example-cli-task)
* [Using NX-API in Ansible](#using-nx-api-in-ansible)


	+ [Enabling NX-API](#enabling-nx-api)
	+ [Example NX-API `group_vars/nxos.yml`](#example-nx-api-group-vars-nxos-yml)
	+ [Example NX-API task](#example-nx-api-task)
* [Cisco Nexus platform support matrix](#cisco-nexus-platform-support-matrix)

 Connections available
---------------------

 

|  | CLI | NX-API |
| --- | --- | --- |
| Protocol | SSH | HTTP(S) |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password | uses HTTPS certificates if present |
| Indirect Access | via a bastion (jump host) | via a web proxy |
| Connection Settings |  
`ansible_connection:` 

`ansible.netcommon.network_cli`   |  
`ansible_connection:` 

`ansible.netcommon.httpapi`   |
| Enable Mode  (Privilege Escalation)  supported as of 2.5.3 | supported: use `ansible_become: yes` with `ansible_become_method: enable` and `ansible_become_password:` | not supported by NX-API |
| Returned Data Format | `stdout[0].` | `stdout[0].messages[0].` |

 The `ansible_connection: local` has been deprecated. Please use `ansible_connection: ansible.netcommon.network_cli` or `ansible_connection: ansible.netcommon.httpapi` instead.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/nxos.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: cisco.nxos.nxos
ansible_user: myuser
ansible_password: !vault...
ansible_become: yes
ansible_become_method: enable
ansible_become_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Backup current switch config (nxos)
  cisco.nxos.nxos_config:
    backup: yes
  register: backup_nxos_location
  when: ansible_network_os == 'cisco.nxos.nxos'

```
 Using NX-API in Ansible
-----------------------

 ### Enabling NX-API

 Before you can use NX-API to connect to a switch, you must enable NX-API. To enable NX-API on a new switch via Ansible, use the `nxos_nxapi` module via the CLI connection. Set up group\_vars/nxos.yml just like in the CLI example above, then run a playbook task like this:

 
```
- name: Enable NX-API
   cisco.nxos.nxos_nxapi:
       enable_http: yes
       enable_https: yes
   when: ansible_network_os == 'cisco.nxos.nxos'

```
 To find out more about the options for enabling HTTP/HTTPS and local http see the [nxos\_nxapi](https://docs.ansible.com/ansible/2.9/modules/nxos_nxapi_module.html#nxos-nxapi-module "(in Ansible v2.9)") module documentation.

 Once NX-API is enabled, change your `group_vars/nxos.yml` to use the NX-API connection.

 ### Example NX-API `group_vars/nxos.yml`

 
```
ansible_connection: ansible.netcommon.httpapi
ansible_network_os: cisco.nxos.nxos
ansible_user: myuser
ansible_password: !vault...
proxy_env:
  http_proxy: http://proxy.example.com:8080

```
 * If you are accessing your host directly (not through a web proxy) you can remove the `proxy_env` configuration.
* If you are accessing your host through a web proxy using `https`, change `http_proxy` to `https_proxy`.

 ### Example NX-API task

 
```
- name: Backup current switch config (nxos)
  cisco.nxos.nxos_config:
    backup: yes
  register: backup_nxos_location
  environment: "{{ proxy_env }}"
  when: ansible_network_os == 'cisco.nxos.nxos'

```
 In this example the `proxy_env` variable defined in `group_vars` gets passed to the `environment` option of the module used in the task.

  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

  Cisco Nexus platform support matrix
-----------------------------------

 The following platforms and software versions have been certified by Cisco to work with this version of Ansible.

 

Platform / Software Minimum Requirements| Supported Platforms | Minimum NX-OS Version |
| --- | --- |
| Cisco Nexus N3k | 7.0(3)I2(5) and later |
| Cisco Nexus N9k | 7.0(3)I2(5) and later |
| Cisco Nexus N5k | 7.3(0)N1(1) and later |
| Cisco Nexus N6k | 7.3(0)N1(1) and later |
| Cisco Nexus N7k | 7.3(0)D1(1) and later |
| Cisco Nexus MDS | 8.4(1) and later |

 

Platform Models| Platform | Description |
| --- | --- |
| N3k | Support includes N30xx, N31xx and N35xx models |
| N5k | Support includes all N5xxx models |
| N6k | Support includes all N6xxx models |
| N7k | Support includes all N7xxx models |
| N9k | Support includes all N9xxx models |
| MDS | Support includes all MDS 9xxx models |

  See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_nxos.html>

VOSS Platform Options
=====================

 Extreme VOSS is part of the [community.network](https://galaxy.ansible.com/community/network) collection and only supports CLI connections today. This page offers details on how to use `ansible.netcommon.network_cli` on VOSS in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/voss.yml`](#example-cli-group-vars-voss-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | supported: use `ansible_become: yes` with `ansible_become_method: enable` |
| Returned Data Format | `stdout[0].` |

 VOSS does not support `ansible_connection: local`. You must use `ansible_connection: ansible.netcommon.network_cli`.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/voss.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: community.network.voss
ansible_user: myuser
ansible_become: yes
ansible_become_method: enable
ansible_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Retrieve VOSS info
  community.network.voss_command:
    commands: show sys-info
  when: ansible_network_os == 'community.network.voss'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_voss.html>

SLX-OS Platform Options
=======================

 Extreme SLX-OS is part of the [community.network](https://galaxy.ansible.com/community/network) collection and only supports CLI connections today. `httpapi` modules may be added in future. This page offers details on how to use `ansible.netcommon.network_cli` on SLX-OS in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/slxos.yml`](#example-cli-group-vars-slxos-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | not supported by SLX-OS |
| Returned Data Format | `stdout[0].` |

 SLX-OS does not support `ansible_connection: local`. You must use `ansible_connection: ansible.netcommon.network_cli`.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/slxos.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: community.network.slxos
ansible_user: myuser
ansible_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Backup current switch config (slxos)
  community.network.slxos_config:
    backup: yes
  register: backup_slxos_location
  when: ansible_network_os == 'community.network.slxos'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_slxos.html>

Pluribus NETVISOR Platform Options
==================================

 Pluribus NETVISOR Ansible is part of the [community.network](https://galaxy.ansible.com/community/network) collection and only supports CLI connections today. `httpapi` modules may be added in future. This page offers details on how to use `ansible.netcommon.network_cli` on NETVISOR in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/netvisor.yml`](#example-cli-group-vars-netvisor-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | not supported by NETVISOR |
| Returned Data Format | `stdout[0].` |

 Pluribus NETVISOR does not support `ansible_connection: local`. You must use `ansible_connection: ansible.netcommon.network_cli`.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/netvisor.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: community.netcommon.netvisor
ansible_user: myuser
ansible_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Create access list
  community.network.pn_access_list:
    pn_name: "foo"
    pn_scope: "local"
    state: "present"
  register: acc_list
  when: ansible_network_os == 'community.network.netvisor'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_netvisor.html>

NOS Platform Options
====================

 Extreme NOS is part of the [community.network](https://galaxy.ansible.com/community/network) collection and only supports CLI connections today. `httpapi` modules may be added in future. This page offers details on how to use `ansible.netcommon.network_cli` on NOS in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/nos.yml`](#example-cli-group-vars-nos-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: community.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | not supported by NOS |
| Returned Data Format | `stdout[0].` |

 NOS does not support `ansible_connection: local`. You must use `ansible_connection: ansible.netcommon.network_cli`.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/nos.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: community.network.nos
ansible_user: myuser
ansible_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Get version information (nos)
  community.network.nos_command:
    commands: "show version"
  register: show_ver
  when: ansible_network_os == 'community.network.nos'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_nos.html>

Netconf enabled Platform Options
================================

 This page offers details on how the netconf connection works in Ansible and how to use it.

 * [Connections available](#connections-available)
* [Using NETCONF in Ansible](#using-netconf-in-ansible)


	+ [Enabling NETCONF](#enabling-netconf)
	+ [Example NETCONF inventory `[junos:vars]`](#example-netconf-inventory-junos-vars)
	+ [Example NETCONF task](#example-netconf-task)
	+ [Example NETCONF task with configurable variables](#example-netconf-task-with-configurable-variables)
	+ [Bastion/Jumphost configuration](#bastion-jumphost-configuration)
	+ [ansible\_network\_os auto-detection](#ansible-network-os-auto-detection)

 Connections available
---------------------

 

|  | NETCONF all modules except `junos_netconf`, which enables NETCONF |
| --- | --- |
| Protocol | XML over SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.netconf` |

 The `ansible_connection: local` has been deprecated. Please use `ansible_connection: ansible.netcommon.netconf` instead.

 Using NETCONF in Ansible
------------------------

 ### Enabling NETCONF

 Before you can use NETCONF to connect to a switch, you must:

 * install the `ncclient` Python package on your control node(s) with `pip install ncclient`
* enable NETCONF on the Junos OS device(s)

 To enable NETCONF on a new switch via Ansible, use the platform specific module via the CLI connection or set it manually. For example set up your platform-level variables just like in the CLI example above, then run a playbook task like this:

 
```
- name: Enable NETCONF
  connection: ansible.netcommon.network_cli
  junipernetworks.junos.junos_netconf:
  when: ansible_network_os == 'junipernetworks.junos.junos'

```
 Once NETCONF is enabled, change your variables to use the NETCONF connection.

 ### Example NETCONF inventory `[junos:vars]`

 
```
[junos:vars]
ansible_connection=ansible.netcommon.netconf
ansible_network_os=junipernetworks.junos.junos
ansible_user=myuser
ansible_password=!vault |

```
 ### Example NETCONF task

 
```
- name: Backup current switch config
  junipernetworks.junos.netconf_config:
    backup: yes
  register: backup_junos_location

```
 ### Example NETCONF task with configurable variables

 
```
- name: configure interface while providing different private key file path
  junipernetworks.junos.netconf_config:
    backup: yes
  register: backup_junos_location
  vars:
    ansible_private_key_file: /home/admin/.ssh/newprivatekeyfile

```
 Note: For netconf connection plugin configurable variables see [ansible.netcommon.netconf](../../collections/ansible/netcommon/netconf_connection#ansible-collections-ansible-netcommon-netconf-connection).

 ### Bastion/Jumphost configuration

 To use a jump host to connect to a NETCONF enabled device you must set the `ANSIBLE_NETCONF_SSH_CONFIG` environment variable.

  
`ANSIBLE_NETCONF_SSH_CONFIG can be set to either:` 

* 1 or TRUE (to trigger the use of the default SSH config file ~/.ssh/config)
* The absolute path to a custom SSH config file.

   The SSH config file should look something like:

 
```
Host *
  proxycommand ssh -o StrictHostKeyChecking=no -W %h:%p jumphost-username@jumphost.fqdn.com
  StrictHostKeyChecking no

```
 Authentication for the jump host must use key based authentication.

 You can either specify the private key used in the SSH config file:

 
```
IdentityFile "/absolute/path/to/private-key.pem"

```
 Or you can use an ssh-agent.

 ### ansible\_network\_os auto-detection

 If `ansible_network_os` is not specified for a host, then Ansible will attempt to automatically detect what `network_os` plugin to use.

 `ansible_network_os` auto-detection can also be triggered by using `auto` as the `ansible_network_os`. (Note: Previously `default` was used instead of `auto`).

  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_netconf_enabled.html>

Meraki Platform Options
=======================

 The [cisco.meraki](https://galaxy.ansible.com/cisco/meraki) collection only supports the `local` connection type at this time.

 * [Example Meraki task](#example-meraki-task)


Connections available
---------------------

 

|  | Dashboard API |
| --- | --- |
| Protocol | HTTP(S) |
| Credentials | uses API key from Dashboard |
| Connection Settings | `ansible_connection: localhost` |
| Returned Data Format | `data.` |

 ### Example Meraki task

 
```
cisco.meraki.meraki_organization:
  auth_key: abc12345
  org_name: YourOrg
  state: present
delegate_to: localhost

```
  See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_meraki.html>

VyOS Platform Options
=====================

 The [VyOS](https://galaxy.ansible.com/vyos/vyos) collection supports the `ansible.netcommon.network_cli` connection type. This page offers details on connection options to manage VyOS using Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/vyos.yml`](#example-cli-group-vars-vyos-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | not supported |
| Returned Data Format | Refer to individual module documentation |

 The `ansible_connection: local` has been deprecated. Please use `ansible_connection: ansible.netcommon.network_cli` instead.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/vyos.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: vyos.vyos.vyos
ansible_user: myuser
ansible_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Retrieve VyOS version info
  vyos.vyos.vyos_command:
    commands: show version
  when: ansible_network_os == 'vyos.vyos.vyos'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_vyos.html>

RouterOS Platform Options
=========================

 RouterOS is part of the [community.network](https://galaxy.ansible.com/community/network) collection and only supports CLI connections today. `httpapi` modules may be added in future. This page offers details on how to use `ansible.netcommon.network_cli` on RouterOS in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/routeros.yml`](#example-cli-group-vars-routeros-yml)
	+ [Example CLI task](#example-cli-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: ansible.network.network_cli` |
| Enable Mode  (Privilege Escalation) | not supported by RouterOS |
| Returned Data Format | `stdout[0].` |

 RouterOS does not support `ansible_connection: local`. You must use `ansible_connection: ansible.netcommon.network_cli`.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/routeros.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: community.network.routeros
ansible_user: myuser
ansible_password: !vault...
ansible_become: yes
ansible_become_method: enable
ansible_become_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.
* If you are getting timeout errors you may want to add `+cet1024w` suffix to your username which will disable console colors, enable “dumb” mode, tell RouterOS not to try detecting terminal capabilities and set terminal width to 1024 columns. See article [Console login process](https://wiki.mikrotik.com/wiki/Manual:Console_login_process) in MikroTik wiki for more information.

 ### Example CLI task

 
```
- name: Display resource statistics (routeros)
  community.network.routeros_command:
    commands: /system resource print
  register: routeros_resources
  when: ansible_network_os == 'community.network.routeros'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_routeros.html>

WeOS 4 Platform Options
=======================

 Westermo WeOS 4 is part of the [community.network](https://galaxy.ansible.com/community/network) collection and only supports CLI connections. This page offers details on how to use `ansible.netcommon.network_cli` on WeOS 4 in Ansible.

 * [Connections available](#connections-available)
* [Using CLI in Ansible](#using-cli-in-ansible)


	+ [Example CLI `group_vars/weos4.yml`](#example-cli-group-vars-weos4-yml)
	+ [Example CLI task](#example-cli-task)
	+ [Example Configuration task](#example-configuration-task)

 Connections available
---------------------

 

|  | CLI |
| --- | --- |
| Protocol | SSH |
| Credentials | uses SSH keys / SSH-agent if present accepts `-u myuser -k` if using password |
| Indirect Access | via a bastion (jump host) |
| Connection Settings | `ansible_connection: community.netcommon.network_cli` |
| Enable Mode  (Privilege Escalation) | not supported by WeOS 4 |
| Returned Data Format | `stdout[0].` |

 WeOS 4 does not support `ansible_connection: local`. You must use `ansible_connection: ansible.netcommon.network_cli`.

 Using CLI in Ansible
--------------------

 ### Example CLI `group_vars/weos4.yml`

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: community.network.weos4
ansible_user: myuser
ansible_password: !vault...
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'

```
 * If you are using SSH keys (including an ssh-agent) you can remove the `ansible_password` configuration.
* If you are accessing your host directly (not through a bastion/jump host) you can remove the `ansible_ssh_common_args` configuration.
* If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the `ProxyCommand` directive. To prevent secrets from leaking out (for example in `ps` output), SSH does not support providing passwords via environment variables.

 ### Example CLI task

 
```
- name: Get version information (WeOS 4)
  ansible.netcommon.cli_command:
    commands: "show version"
  register: show_ver
  when: ansible_network_os == 'community.network.weos4'

```
 ### Example Configuration task

 
```
- name: Replace configuration with file on ansible host (WeOS 4)
  ansible.netcommon.cli_config:
    config: "{{ lookup('file', 'westermo.conf') }}"
    replace: "yes"
    diff_match: exact
    diff_replace: config
  when: ansible_network_os == 'community.network.weos4'

```
  Warning

 Never store passwords in plain text. We recommend using SSH keys to authenticate SSH connections. Ansible supports ssh-agent to manage your SSH keys. If you must use passwords to authenticate SSH connections, we recommend encrypting them with [Ansible Vault](../../user_guide/vault#playbooks-vault).

   See also

 [Setting timeout options](../getting_started/network_connection_options#timeout-options)

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/user_guide/platform_weos4.html>

Oracle Cloud Infrastructure Guide
=================================

 Introduction
------------

 Oracle provides a number of Ansible modules to interact with Oracle Cloud Infrastructure (OCI). In this guide, we will explain how you can use these modules to orchestrate, provision and configure your infrastructure on OCI.

 Requirements
------------

 To use the OCI Ansible modules, you must have the following prerequisites on your control node, the computer from which Ansible playbooks are executed.

 1. [An Oracle Cloud Infrastructure account.](https://cloud.oracle.com/en_US/tryit)
2. A user created in that account, in a security group with a policy that grants the necessary permissions for working with resources in those compartments. For guidance, see [How Policies Work](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/policies.htm).
3. The necessary credentials and OCID information.

 Installation
------------

 1. Install the Oracle Cloud Infrastructure Python SDK ([detailed installation instructions](https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/installation.html)):

 
```
pip install oci

```
 2. Install the Ansible OCI Modules in one of two ways:

 1. From Galaxy:

 
```
ansible-galaxy install oracle.oci_ansible_modules

```
 2. From GitHub:

 
```
$ git clone https://github.com/oracle/oci-ansible-modules.git

```
 
```
$ cd oci-ansible-modules

```
 Run one of the following commands:

 * If Ansible is installed only for your user:

 
```
$ ./install.py

```
 * If Ansible is installed as root:

 
```
$ sudo ./install.py

```
 Configuration
-------------

 When creating and configuring Oracle Cloud Infrastructure resources, Ansible modules use the authentication information outlined [here](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/sdkconfig.htm). .

 Examples
--------

 ### Launch a compute instance

 This [sample launch playbook](https://github.com/oracle/oci-ansible-modules/tree/master/samples/compute/launch_compute_instance) launches a public Compute instance and then accesses the instance from an Ansible module over an SSH connection. The sample illustrates how to:

 * Generate a temporary, host-specific SSH key pair.
* Specify the public key from the key pair for connecting to the instance, and then launch the instance.
* Connect to the newly launched instance using SSH.

 ### Create and manage Autonomous Data Warehouses

 This [sample warehouse playbook](https://github.com/oracle/oci-ansible-modules/tree/master/samples/database/autonomous_data_warehouse) creates an Autonomous Data Warehouse and manage its lifecycle. The sample shows how to:

 * Set up an Autonomous Data Warehouse.
* List all of the Autonomous Data Warehouse instances available in a compartment, filtered by the display name.
* Get the “facts” for a specified Autonomous Data Warehouse.
* Stop and start an Autonomous Data Warehouse instance.
* Delete an Autonomous Data Warehouse instance.

 ### Create and manage Autonomous Transaction Processing

 This [sample playbook](https://github.com/oracle/oci-ansible-modules/tree/master/samples/database/autonomous_database) creates an Autonomous Transaction Processing database and manage its lifecycle. The sample shows how to:

 * Set up an Autonomous Transaction Processing database instance.
* List all of the Autonomous Transaction Processing instances in a compartment, filtered by the display name.
* Get the “facts” for a specified Autonomous Transaction Processing instance.
* Delete an Autonomous Transaction Processing database instance.

 You can find more examples here: [Sample Ansible Playbooks](https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/ansiblesamples.htm).



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_oracle.html>

Google Cloud Platform Guide
===========================

 Introduction
------------

 Ansible + Google have been working together on a set of auto-generated Ansible modules designed to consistently and comprehensively cover the entirety of the Google Cloud Platform (GCP).

 Ansible contains modules for managing Google Cloud Platform resources, including creating instances, controlling network access, working with persistent disks, managing load balancers, and a lot more.

 These new modules can be found under a new consistent name scheme “gcp\_\*” (Note: gcp\_target\_proxy and gcp\_url\_map are legacy modules, despite the “gcp\_\*” name. Please use gcp\_compute\_target\_proxy and gcp\_compute\_url\_map instead).

 Additionally, the gcp\_compute inventory plugin can discover all Google Compute Engine (GCE) instances and make them automatically available in your Ansible inventory.

 You may see a collection of other GCP modules that do not conform to this naming convention. These are the original modules primarily developed by the Ansible community. You will find some overlapping functionality such as with the “gce” module and the new “gcp\_compute\_instance” module. Either can be used, but you may experience issues trying to use them together.

 While the community GCP modules are not going away, Google is investing effort into the new “gcp\_\*” modules. Google is committed to ensuring the Ansible community has a great experience with GCP and therefore recommends adopting these new modules if possible.

 Requisites
----------

 The GCP modules require both the `requests` and the `google-auth` libraries to be installed.

 
```
$ pip install requests google-auth

```
 Alternatively for RHEL / CentOS, the `python-requests` package is also available to satisfy `requests` libraries.

 
```
$ yum install python-requests

```
 Credentials
-----------

 It’s easy to create a GCP account with credentials for Ansible. You have multiple options to get your credentials - here are two of the most common options:

 * Service Accounts (Recommended): Use JSON service accounts with specific permissions.
* Machine Accounts: Use the permissions associated with the GCP Instance you’re using Ansible on.

 For the following examples, we’ll be using service account credentials.

 To work with the GCP modules, you’ll first need to get some credentials in the JSON format:

 1. [Create a Service Account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount)
2. [Download JSON credentials](https://support.google.com/cloud/answer/6158849?hl=en&ref_topic=6262490#serviceaccounts)

 Once you have your credentials, there are two different ways to provide them to Ansible:

 * by specifying them directly as module parameters
* by setting environment variables

 ### Providing Credentials as Module Parameters

 For the GCE modules you can specify the credentials as arguments:

 * `auth_kind`: type of authentication being used (choices: machineaccount, serviceaccount, application)
* `service_account_email`: email associated with the project
* `service_account_file`: path to the JSON credentials file
* `project`: id of the project
* `scopes`: The specific scopes that you want the actions to use.

 For example, to create a new IP address using the `gcp_compute_address` module, you can use the following configuration:

 
```
- name: Create IP address
  hosts: localhost
  gather_facts: no

  vars:
    service_account_file: /home/my_account.json
    project: my-project
    auth_kind: serviceaccount
    scopes:
      - https://www.googleapis.com/auth/compute

  tasks:

   - name: Allocate an IP Address
     gcp_compute_address:
         state: present
         name: 'test-address1'
         region: 'us-west1'
         project: "{{ project }}"
         auth_kind: "{{ auth_kind }}"
         service_account_file: "{{ service_account_file }}"
         scopes: "{{ scopes }}"

```
 ### Providing Credentials as Environment Variables

 Set the following environment variables before running Ansible in order to configure your credentials:

 
```
GCP_AUTH_KIND
GCP_SERVICE_ACCOUNT_EMAIL
GCP_SERVICE_ACCOUNT_FILE
GCP_SCOPES

```
 GCE Dynamic Inventory
---------------------

 The best way to interact with your hosts is to use the gcp\_compute inventory plugin, which dynamically queries GCE and tells Ansible what nodes can be managed.

 To be able to use this GCE dynamic inventory plugin, you need to enable it first by specifying the following in the `ansible.cfg` file:

 
```
[inventory]
enable_plugins = gcp_compute

```
 Then, create a file that ends in `.gcp.yml` in your root directory.

 The gcp\_compute inventory script takes in the same authentication information as any module.

 Here’s an example of a valid inventory file:

 
```
plugin: gcp_compute
projects:
  - graphite-playground
auth_kind: serviceaccount
service_account_file: /home/alexstephen/my_account.json

```
 Executing `ansible-inventory --list -i <filename>.gcp.yml` will create a list of GCP instances that are ready to be configured using Ansible.

 ### Create an instance

 The full range of GCP modules provide the ability to create a wide variety of GCP resources with the full support of the entire GCP API.

 The following playbook creates a GCE Instance. This instance relies on other GCP resources like Disk. By creating other resources separately, we can give as much detail as necessary about how we want to configure the other resources, for example formatting of the Disk. By registering it to a variable, we can simply insert the variable into the instance task. The gcp\_compute\_instance module will figure out the rest.

 
```
- name: Create an instance
  hosts: localhost
  gather_facts: no
  vars:
      gcp_project: my-project
      gcp_cred_kind: serviceaccount
      gcp_cred_file: /home/my_account.json
      zone: "us-central1-a"
      region: "us-central1"

  tasks:
   - name: create a disk
     gcp_compute_disk:
         name: 'disk-instance'
         size_gb: 50
         source_image: 'projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts'
         zone: "{{ zone }}"
         project: "{{ gcp_project }}"
         auth_kind: "{{ gcp_cred_kind }}"
         service_account_file: "{{ gcp_cred_file }}"
         scopes:
           - https://www.googleapis.com/auth/compute
         state: present
     register: disk
   - name: create a address
     gcp_compute_address:
         name: 'address-instance'
         region: "{{ region }}"
         project: "{{ gcp_project }}"
         auth_kind: "{{ gcp_cred_kind }}"
         service_account_file: "{{ gcp_cred_file }}"
         scopes:
           - https://www.googleapis.com/auth/compute
         state: present
     register: address
   - name: create a instance
     gcp_compute_instance:
         state: present
         name: test-vm
         machine_type: n1-standard-1
         disks:
           - auto_delete: true
             boot: true
             source: "{{ disk }}"
         network_interfaces:
             - network: null # use default
               access_configs:
                 - name: 'External NAT'
                   nat_ip: "{{ address }}"
                   type: 'ONE_TO_ONE_NAT'
         zone: "{{ zone }}"
         project: "{{ gcp_project }}"
         auth_kind: "{{ gcp_cred_kind }}"
         service_account_file: "{{ gcp_cred_file }}"
         scopes:
           - https://www.googleapis.com/auth/compute
     register: instance

   - name: Wait for SSH to come up
     wait_for: host={{ address.address }} port=22 delay=10 timeout=60

   - name: Add host to groupname
     add_host: hostname={{ address.address }} groupname=new_instances


- name: Manage new instances
  hosts: new_instances
  connection: ssh
  become: True
  roles:
    - base_configuration
    - production_server

```
 Note that use of the “add\_host” module above creates a temporary, in-memory group. This means that a play in the same playbook can then manage machines in the ‘new\_instances’ group, if so desired. Any sort of arbitrary configuration is possible at this point.

 For more information about Google Cloud, please visit the [Google Cloud website](https://cloud.google.com).

 Migration Guides
----------------

 ### gce.py -> gcp\_compute\_instance.py

 As of Ansible 2.8, we’re encouraging everyone to move from the `gce` module to the `gcp_compute_instance` module. The `gcp_compute_instance` module has better support for all of GCP’s features, fewer dependencies, more flexibility, and better supports GCP’s authentication systems.

 The `gcp_compute_instance` module supports all of the features of the `gce` module (and more!). Below is a mapping of `gce` fields over to `gcp_compute_instance` fields.

 

| gce.py | gcp\_compute\_instance.py | Notes |
| --- | --- | --- |
| state | state/status | State on gce has multiple values: “present”, “absent”, “stopped”, “started”, “terminated”. State on gcp\_compute\_instance is used to describe if the instance exists (present) or does not (absent). Status is used to describe if the instance is “started”, “stopped” or “terminated”. |
| image | disks[].initialize\_params.source\_image | You’ll need to create a single disk using the disks[] parameter and set it to be the boot disk (disks[].boot = true) |
| image\_family | disks[].initialize\_params.source\_image | See above. |
| external\_projects | disks[].initialize\_params.source\_image | The name of the source\_image will include the name of the project. |
| instance\_names | Use a loop or multiple tasks. | Using loops is a more Ansible-centric way of creating multiple instances and gives you the most flexibility. |
| service\_account\_email | service\_accounts[].email | This is the service\_account email address that you want the instance to be associated with. It is not the service\_account email address that is used for the credentials necessary to create the instance. |
| service\_account\_permissions | service\_accounts[].scopes | These are the permissions you want to grant to the instance. |
| pem\_file | Not supported. | We recommend using JSON service account credentials instead of PEM files. |
| credentials\_file | service\_account\_file |  |
| project\_id | project |  |
| name | name | This field does not accept an array of names. Use a loop to create multiple instances. |
| num\_instances | Use a loop | For maximum flexibility, we’re encouraging users to use Ansible features to create multiple instances, rather than letting the module do it for you. |
| network | network\_interfaces[].network |  |
| subnetwork | network\_interfaces[].subnetwork |  |
| persistent\_boot\_disk | disks[].type = ‘PERSISTENT’ |  |
| disks | disks[] |  |
| ip\_forward | can\_ip\_forward |  |
| external\_ip | network\_interfaces[].access\_configs.nat\_ip | This field takes multiple types of values. You can create an IP address with `gcp_compute_address` and place the name/output of the address here. You can also place the string value of the IP address’s GCP name or the actual IP address. |
| disks\_auto\_delete | disks[].auto\_delete |  |
| preemptible | scheduling.preemptible |  |
| disk\_size | disks[].initialize\_params.disk\_size\_gb |  |

 An example playbook is below:

 
```
gcp_compute_instance:
    name: "{{ item }}"
    machine_type: n1-standard-1
    ... # any other settings
    zone: us-central1-a
    project: "my-project"
    auth_kind: "service_account_file"
    service_account_file: "~/my_account.json"
    state: present
loop:
  - instance-1
  - instance-2

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_gce.html>

Alibaba Cloud Compute Services Guide
====================================

 Introduction
------------

 Ansible contains several modules for controlling and managing Alibaba Cloud Compute Services (Alicloud). This guide explains how to use the Alicloud Ansible modules together.

 All Alicloud modules require `footmark` - install it on your control machine with `pip install footmark`.

 Cloud modules, including Alicloud modules, execute on your local machine (the control machine) with `connection: local`, rather than on remote machines defined in your hosts.

 Normally, you’ll use the following pattern for plays that provision Alicloud resources:

 
```
- hosts: localhost
  connection: local
  vars:
    - ...
  tasks:
    - ...

```
 Authentication
--------------

 You can specify your Alicloud authentication credentials (access key and secret key) by passing them as environment variables or by storing them in a vars file.

 To pass authentication credentials as environment variables:

 
```
export ALICLOUD_ACCESS_KEY='Alicloud123'
export ALICLOUD_SECRET_KEY='AlicloudSecret123'

```
 To store authentication credentials in a vars\_file, encrypt them with [Ansible Vault](../user_guide/vault#vault) to keep them secure, then list them:

 
```
---
alicloud_access_key: "--REMOVED--"
alicloud_secret_key: "--REMOVED--"

```
 Note that if you store your credentials in a vars\_file, you need to refer to them in each Alicloud module. For example:

 
```
- ali_instance:
    alicloud_access_key: "{{alicloud_access_key}}"
    alicloud_secret_key: "{{alicloud_secret_key}}"
    image_id: "..."

```
 Provisioning
------------

 Alicloud modules create Alicloud ECS instances, disks, virtual private clouds, virtual switches, security groups and other resources.

 You can use the `count` parameter to control the number of resources you create or terminate. For example, if you want exactly 5 instances tagged `NewECS`, set the `count` of instances to 5 and the `count_tag` to `NewECS`, as shown in the last task of the example playbook below. If there are no instances with the tag `NewECS`, the task creates 5 new instances. If there are 2 instances with that tag, the task creates 3 more. If there are 8 instances with that tag, the task terminates 3 of those instances.

 If you do not specify a `count_tag`, the task creates the number of instances you specify in `count` with the `instance_name` you provide.

 
```
# alicloud_setup.yml

- hosts: localhost
  connection: local

  tasks:

    - name: Create VPC
      ali_vpc:
        cidr_block: '{{ cidr_block }}'
        vpc_name: new_vpc
      register: created_vpc

    - name: Create VSwitch
      ali_vswitch:
        alicloud_zone: '{{ alicloud_zone }}'
        cidr_block: '{{ vsw_cidr }}'
        vswitch_name: new_vswitch
        vpc_id: '{{ created_vpc.vpc.id }}'
      register: created_vsw

    - name: Create security group
      ali_security_group:
        name: new_group
        vpc_id: '{{ created_vpc.vpc.id }}'
        rules:
          - proto: tcp
            port_range: 22/22
            cidr_ip: 0.0.0.0/0
            priority: 1
        rules_egress:
          - proto: tcp
            port_range: 80/80
            cidr_ip: 192.168.0.54/32
            priority: 1
      register: created_group

    - name: Create a set of instances
      ali_instance:
         security_groups: '{{ created_group.group_id }}'
         instance_type: ecs.n4.small
         image_id: "{{ ami_id }}"
         instance_name: "My-new-instance"
         instance_tags:
             Name: NewECS
             Version: 0.0.1
         count: 5
         count_tag:
             Name: NewECS
         allocate_public_ip: true
         max_bandwidth_out: 50
         vswitch_id: '{{ created_vsw.vswitch.id}}'
      register: create_instance

```
 In the example playbook above, data about the vpc, vswitch, group, and instances created by this playbook are saved in the variables defined by the “register” keyword in each task.

 Each Alicloud module offers a variety of parameter options. Not all options are demonstrated in the above example. See each individual module for further details and examples.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_alicloud.html>

Amazon Web Services Guide
=========================

 Introduction
------------

 Ansible contains a number of modules for controlling Amazon Web Services (AWS). The purpose of this section is to explain how to put Ansible modules together (and use inventory scripts) to use Ansible in AWS context.

 Requirements for the AWS modules are minimal.

 All of the modules require and are tested against recent versions of botocore and boto3. Starting with the 2.0 AWS collection releases, it is generally the policy of the collections to support the versions of these libraries released 12 months prior to the most recent major collection revision. Individual modules may require a more recent library version to support specific features or may require the boto library, check the module documentation for the minimum required version for each module. You must have the boto3 Python module installed on your control machine. You can install these modules from your OS distribution or using the python package installer: `pip install boto3`.

 Starting with the 2.0 releases of both collections, Python 2.7 support will be ended in accordance with AWS’ [end of Python 2.7 support](https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-python-2-7-in-aws-sdk-for-python-and-aws-cli-v1/) and Python 3.6 or greater will be required.

 Whereas classically Ansible will execute tasks in its host loop against multiple remote machines, most cloud-control steps occur on your local machine with reference to the regions to control.

 In your playbook steps we’ll typically be using the following pattern for provisioning steps:

 
```
- hosts: localhost
  gather_facts: False
  tasks:
    - ...

```
 Authentication
--------------

 Authentication with the AWS-related modules is handled by either specifying your access and secret key as ENV variables or module arguments.

 For environment variables:

 
```
export AWS_ACCESS_KEY_ID='AK123'
export AWS_SECRET_ACCESS_KEY='abc123'

```
 For storing these in a vars\_file, ideally encrypted with ansible-vault:

 
```
---
ec2_access_key: "--REMOVED--"
ec2_secret_key: "--REMOVED--"

```
 Note that if you store your credentials in vars\_file, you need to refer to them in each AWS-module. For example:

 
```
- ec2
  aws_access_key: "{{ec2_access_key}}"
  aws_secret_key: "{{ec2_secret_key}}"
  image: "..."

```
 Provisioning
------------

 The ec2 module provisions and de-provisions instances within EC2.

 An example of making sure there are only 5 instances tagged ‘Demo’ in EC2 follows.

 In the example below, the “exact\_count” of instances is set to 5. This means if there are 0 instances already existing, then 5 new instances would be created. If there were 2 instances, only 3 would be created, and if there were 8 instances, 3 instances would be terminated.

 What is being counted is specified by the “count\_tag” parameter. The parameter “instance\_tags” is used to apply tags to the newly created instance.:

 
```
# demo_setup.yml

- hosts: localhost
  gather_facts: False

  tasks:

    - name: Provision a set of instances
      ec2:
         key_name: my_key
         group: test
         instance_type: t2.micro
         image: "{{ ami_id }}"
         wait: true
         exact_count: 5
         count_tag:
            Name: Demo
         instance_tags:
            Name: Demo
      register: ec2

```
 The data about what instances are created is being saved by the “register” keyword in the variable named “ec2”.

 From this, we’ll use the add\_host module to dynamically create a host group consisting of these new instances. This facilitates performing configuration actions on the hosts immediately in a subsequent task.:

 
```
# demo_setup.yml

- hosts: localhost
  gather_facts: False

  tasks:

    - name: Provision a set of instances
      ec2:
         key_name: my_key
         group: test
         instance_type: t2.micro
         image: "{{ ami_id }}"
         wait: true
         exact_count: 5
         count_tag:
            Name: Demo
         instance_tags:
            Name: Demo
      register: ec2

   - name: Add all instance public IPs to host group
     add_host: hostname={{ item.public_ip }} groups=ec2hosts
     loop: "{{ ec2.instances }}"

```
 With the host group now created, a second play at the bottom of the same provisioning playbook file might now have some configuration steps:

 
```
# demo_setup.yml

- name: Provision a set of instances
  hosts: localhost
  # ... AS ABOVE ...

- hosts: ec2hosts
  name: configuration play
  user: ec2-user
  gather_facts: true

  tasks:

     - name: Check NTP service
       service: name=ntpd state=started

```
 Security Groups
---------------

 Security groups on AWS are stateful. The response of a request from your instance is allowed to flow in regardless of inbound security group rules and vice-versa. In case you only want allow traffic with AWS S3 service, you need to fetch the current IP ranges of AWS S3 for one region and apply them as an egress rule.:

 
```
- name: fetch raw ip ranges for aws s3
  set_fact:
    raw_s3_ranges: "{{ lookup('aws_service_ip_ranges', region='eu-central-1', service='S3', wantlist=True) }}"

- name: prepare list structure for ec2_group module
  set_fact:
    s3_ranges: "{{ s3_ranges | default([]) + [{'proto': 'all', 'cidr_ip': item, 'rule_desc': 'S3 Service IP range'}] }}"
  loop: "{{ raw_s3_ranges }}"

- name: set S3 IP ranges to egress rules
  ec2_group:
    name: aws_s3_ip_ranges
    description: allow outgoing traffic to aws S3 service
    region: eu-central-1
    state: present
    vpc_id: vpc-123456
    purge_rules: true
    purge_rules_egress: true
    rules: []
    rules_egress: "{{ s3_ranges }}"
    tags:
      Name: aws_s3_ip_ranges

```
 Host Inventory
--------------

 Once your nodes are spun up, you’ll probably want to talk to them again. With a cloud setup, it’s best to not maintain a static list of cloud hostnames in text files. Rather, the best way to handle this is to use the aws\_ec2 inventory plugin. See [Working with dynamic inventory](../user_guide/intro_dynamic_inventory#dynamic-inventory).

 The plugin will also return instances that were created outside of Ansible and allow Ansible to manage them.

 Tags And Groups And Variables
-----------------------------

 When using the inventory plugin, you can configure extra inventory structure based on the metadata returned by AWS.

 For instance, you might use `keyed_groups` to create groups from instance tags:

 
```
plugin: aws_ec2
keyed_groups:
  - prefix: tag
    key: tags

```
 You can then target all instances with a “class” tag where the value is “webserver” in a play:

 
```
- hosts: tag_class_webserver
  tasks:
    - ping

```
 You can also use these groups with ‘group\_vars’ to set variables that are automatically applied to matching instances. See [Organizing host and group variables](../user_guide/intro_inventory#splitting-out-vars).

 Autoscaling with Ansible Pull
-----------------------------

 Amazon Autoscaling features automatically increase or decrease capacity based on load. There are also Ansible modules shown in the cloud documentation that can configure autoscaling policy.

 When nodes come online, it may not be sufficient to wait for the next cycle of an ansible command to come along and configure that node.

 To do this, pre-bake machine images which contain the necessary ansible-pull invocation. Ansible-pull is a command line tool that fetches a playbook from a git server and runs it locally.

 One of the challenges of this approach is that there needs to be a centralized way to store data about the results of pull commands in an autoscaling context. For this reason, the autoscaling solution provided below in the next section can be a better approach.

 Read [ansible-pull](../cli/ansible-pull#ansible-pull) for more information on pull-mode playbooks.

 Autoscaling with Ansible Tower
------------------------------

 [Red Hat Ansible Tower](https://docs.ansible.com/ansible/3/reference_appendices/tower.html#ansible-tower "(in Ansible v3)") also contains a very nice feature for auto-scaling use cases. In this mode, a simple curl script can call a defined URL and the server will “dial out” to the requester and configure an instance that is spinning up. This can be a great way to reconfigure ephemeral nodes. See the Tower install and product documentation for more details.

 A benefit of using the callback in Tower over pull mode is that job results are still centrally recorded and less information has to be shared with remote hosts.

 Ansible With (And Versus) CloudFormation
----------------------------------------

 CloudFormation is a Amazon technology for defining a cloud stack as a JSON or YAML document.

 Ansible modules provide an easier to use interface than CloudFormation in many examples, without defining a complex JSON/YAML document. This is recommended for most users.

 However, for users that have decided to use CloudFormation, there is an Ansible module that can be used to apply a CloudFormation template to Amazon.

 When using Ansible with CloudFormation, typically Ansible will be used with a tool like Packer to build images, and CloudFormation will launch those images, or ansible will be invoked through user data once the image comes online, or a combination of the two.

 Please see the examples in the Ansible CloudFormation module for more details.

 AWS Image Building With Ansible
-------------------------------

 Many users may want to have images boot to a more complete configuration rather than configuring them entirely after instantiation. To do this, one of many programs can be used with Ansible playbooks to define and upload a base image, which will then get its own AMI ID for usage with the ec2 module or other Ansible AWS modules such as ec2\_asg or the cloudformation module. Possible tools include Packer, aminator, and Ansible’s ec2\_ami module.

 Generally speaking, we find most users using Packer.

 See the Packer documentation of the [Ansible local Packer provisioner](https://www.packer.io/docs/provisioners/ansible-local.html) and [Ansible remote Packer provisioner](https://www.packer.io/docs/provisioners/ansible.html).

 If you do not want to adopt Packer at this time, configuring a base-image with Ansible after provisioning (as shown above) is acceptable.

 Next Steps: Explore Modules
---------------------------

 Ansible ships with lots of modules for configuring a wide array of EC2 services. Browse the “Cloud” category of the module documentation for a full list with examples.

  See also

  [Collection Index](../collections/index#list-of-collections)

Browse existing collections, modules, and plugins

  [Working with playbooks](../user_guide/playbooks#working-with-playbooks)

An introduction to playbooks

  [Controlling where tasks run: delegation and local actions](../user_guide/playbooks_delegation#playbooks-delegation)

Delegation, useful for working with loud balancers, clouds, and locally executed steps.

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_aws.html>

CloudStack Cloud Guide
======================

 Introduction
------------

 The purpose of this section is to explain how to put Ansible modules together to use Ansible in a CloudStack context. You will find more usage examples in the details section of each module.

 Ansible contains a number of extra modules for interacting with CloudStack based clouds. All modules support check mode, are designed to be idempotent, have been created and tested, and are maintained by the community.

  Note

 Some of the modules will require domain admin or root admin privileges.

  Prerequisites
-------------

 Prerequisites for using the CloudStack modules are minimal. In addition to Ansible itself, all of the modules require the python library `cs` <https://pypi.org/project/cs/>

 You’ll need this Python module installed on the execution host, usually your workstation.

 
```
$ pip install cs

```
 Or alternatively starting with Debian 9 and Ubuntu 16.04:

 
```
$ sudo apt install python-cs

```
  Note

 cs also includes a command line interface for ad hoc interaction with the CloudStack API, for example `$ cs listVirtualMachines state=Running`.

  Limitations and Known Issues
----------------------------

 VPC support has been improved since Ansible 2.3 but is still not yet fully implemented. The community is working on the VPC integration.

 Credentials File
----------------

 You can pass credentials and the endpoint of your cloud as module arguments, however in most cases it is a far less work to store your credentials in the cloudstack.ini file.

 The python library cs looks for the credentials file in the following order (last one wins):

 * A `.cloudstack.ini` (note the dot) file in the home directory.
* A `CLOUDSTACK_CONFIG` environment variable pointing to an .ini file.
* A `cloudstack.ini` (without the dot) file in the current working directory, same directory as your playbooks are located.

 The structure of the ini file must look like this:

 
```
$ cat $HOME/.cloudstack.ini
[cloudstack]
endpoint = https://cloud.example.com/client/api
key = api key
secret = api secret
timeout = 30

```
  Note

 The section `[cloudstack]` is the default section. `CLOUDSTACK_REGION` environment variable can be used to define the default section.

   New in version 2.4.

  The ENV variables support `CLOUDSTACK_*` as written in the documentation of the library `cs`, like `CLOUDSTACK_TIMEOUT`, `CLOUDSTACK_METHOD`, and so on. has been implemented into Ansible. It is even possible to have some incomplete config in your cloudstack.ini:

 
```
$ cat $HOME/.cloudstack.ini
[cloudstack]
endpoint = https://cloud.example.com/client/api
timeout = 30

```
 and fulfill the missing data by either setting ENV variables or tasks params:

 
```
---
- name: provision our VMs
  hosts: cloud-vm
  tasks:
    - name: ensure VMs are created and running
      delegate_to: localhost
      cs_instance:
        api_key: your api key
        api_secret: your api secret
        ...

```
 Regions
-------

 If you use more than one CloudStack region, you can define as many sections as you want and name them as you like, for example:

 
```
$ cat $HOME/.cloudstack.ini
[exoscale]
endpoint = https://api.exoscale.ch/compute
key = api key
secret = api secret

[example_cloud_one]
endpoint = https://cloud-one.example.com/client/api
key = api key
secret = api secret

[example_cloud_two]
endpoint = https://cloud-two.example.com/client/api
key = api key
secret = api secret

```
  Hint

 Sections can also be used to for login into the same region using different accounts.

  By passing the argument `api_region` with the CloudStack modules, the region wanted will be selected.

 
```
- name: ensure my ssh public key exists on Exoscale
  cs_sshkeypair:
    name: my-ssh-key
    public_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
    api_region: exoscale
  delegate_to: localhost

```
 Or by looping over a regions list if you want to do the task in every region:

 
```
- name: ensure my ssh public key exists in all CloudStack regions
  local_action: cs_sshkeypair
    name: my-ssh-key
    public_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
    api_region: "{{ item }}"
    loop:
      - exoscale
      - example_cloud_one
      - example_cloud_two

```
 Environment Variables
---------------------

  New in version 2.3.

  Since Ansible 2.3 it is possible to use environment variables for domain (`CLOUDSTACK_DOMAIN`), account (`CLOUDSTACK_ACCOUNT`), project (`CLOUDSTACK_PROJECT`), VPC (`CLOUDSTACK_VPC`) and zone (`CLOUDSTACK_ZONE`). This simplifies the tasks by not repeating the arguments for every tasks.

 Below you see an example how it can be used in combination with Ansible’s block feature:

 
```
- hosts: cloud-vm
  tasks:
    - block:
        - name: ensure my ssh public key
          cs_sshkeypair:
            name: my-ssh-key
            public_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"

        - name: ensure my ssh public key
          cs_instance:
              display_name: "{{ inventory_hostname_short }}"
              template: Linux Debian 7 64-bit 20GB Disk
              service_offering: "{{ cs_offering }}"
              ssh_key: my-ssh-key
              state: running

      delegate_to: localhost
      environment:
        CLOUDSTACK_DOMAIN: root/customers
        CLOUDSTACK_PROJECT: web-app
        CLOUDSTACK_ZONE: sf-1

```
  Note

 You are still able overwrite the environment variables using the module arguments, for example `zone: sf-2`

   Note

 Unlike `CLOUDSTACK_REGION` these additional environment variables are ignored in the CLI `cs`.

  Use Cases
---------

 The following should give you some ideas how to use the modules to provision VMs to the cloud. As always, there isn’t only one way to do it. But as always: keep it simple for the beginning is always a good start.

 ### Use Case: Provisioning in a Advanced Networking CloudStack setup

 Our CloudStack cloud has an advanced networking setup, we would like to provision web servers, which get a static NAT and open firewall ports 80 and 443. Further we provision database servers, to which we do not give any access to. For accessing the VMs by SSH we use a SSH jump host.

 This is how our inventory looks like:

 
```
[cloud-vm:children]
webserver
db-server
jumphost

[webserver]
web-01.example.com  public_ip=198.51.100.20
web-02.example.com  public_ip=198.51.100.21

[db-server]
db-01.example.com
db-02.example.com

[jumphost]
jump.example.com  public_ip=198.51.100.22

```
 As you can see, the public IPs for our web servers and jumphost has been assigned as variable `public_ip` directly in the inventory.

 The configure the jumphost, web servers and database servers, we use `group_vars`. The `group_vars` directory contains 4 files for configuration of the groups: cloud-vm, jumphost, webserver and db-server. The cloud-vm is there for specifying the defaults of our cloud infrastructure.

 
```
# file: group_vars/cloud-vm
---
cs_offering: Small
cs_firewall: []

```
 Our database servers should get more CPU and RAM, so we define to use a `Large` offering for them.

 
```
# file: group_vars/db-server
---
cs_offering: Large

```
 The web servers should get a `Small` offering as we would scale them horizontally, which is also our default offering. We also ensure the known web ports are opened for the world.

 
```
# file: group_vars/webserver
---
cs_firewall:
  - { port: 80 }
  - { port: 443 }

```
 Further we provision a jump host which has only port 22 opened for accessing the VMs from our office IPv4 network.

 
```
# file: group_vars/jumphost
---
cs_firewall:
  - { port: 22, cidr: "17.17.17.0/24" }

```
 Now to the fun part. We create a playbook to create our infrastructure we call it `infra.yml`:

 
```
# file: infra.yaml
---
- name: provision our VMs
  hosts: cloud-vm
  tasks:
    - name: run all enclosed tasks from localhost
      delegate_to: localhost
      block:
        - name: ensure VMs are created and running
          cs_instance:
            name: "{{ inventory_hostname_short }}"
            template: Linux Debian 7 64-bit 20GB Disk
            service_offering: "{{ cs_offering }}"
            state: running

        - name: ensure firewall ports opened
          cs_firewall:
            ip_address: "{{ public_ip }}"
            port: "{{ item.port }}"
            cidr: "{{ item.cidr | default('0.0.0.0/0') }}"
          loop: "{{ cs_firewall }}"
          when: public_ip is defined

        - name: ensure static NATs
          cs_staticnat: vm="{{ inventory_hostname_short }}" ip_address="{{ public_ip }}"
          when: public_ip is defined

```
 In the above play we defined 3 tasks and use the group `cloud-vm` as target to handle all VMs in the cloud but instead SSH to these VMs, we use `delegate_to: localhost` to execute the API calls locally from our workstation.

 In the first task, we ensure we have a running VM created with the Debian template. If the VM is already created but stopped, it would just start it. If you like to change the offering on an existing VM, you must add `force: yes` to the task, which would stop the VM, change the offering and start the VM again.

 In the second task we ensure the ports are opened if we give a public IP to the VM.

 In the third task we add static NAT to the VMs having a public IP defined.

  Note

 The public IP addresses must have been acquired in advance, also see `cs_ip_address`

   Note

 For some modules, for example `cs_sshkeypair` you usually want this to be executed only once, not for every VM. Therefore you would make a separate play for it targeting localhost. You find an example in the use cases below.

  ### Use Case: Provisioning on a Basic Networking CloudStack setup

 A basic networking CloudStack setup is slightly different: Every VM gets a public IP directly assigned and security groups are used for access restriction policy.

 This is how our inventory looks like:

 
```
[cloud-vm:children]
webserver

[webserver]
web-01.example.com
web-02.example.com

```
 The default for your VMs looks like this:

 
```
# file: group_vars/cloud-vm
---
cs_offering: Small
cs_securitygroups: [ 'default']

```
 Our webserver will also be in security group `web`:

 
```
# file: group_vars/webserver
---
cs_securitygroups: [ 'default', 'web' ]

```
 The playbook looks like the following:

 
```
# file: infra.yaml
---
- name: cloud base setup
  hosts: localhost
  tasks:
  - name: upload ssh public key
    cs_sshkeypair:
      name: defaultkey
      public_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"

  - name: ensure security groups exist
    cs_securitygroup:
      name: "{{ item }}"
    loop:
      - default
      - web

  - name: add inbound SSH to security group default
    cs_securitygroup_rule:
      security_group: default
      start_port: "{{ item }}"
      end_port: "{{ item }}"
    loop:
      - 22

  - name: add inbound TCP rules to security group web
    cs_securitygroup_rule:
      security_group: web
      start_port: "{{ item }}"
      end_port: "{{ item }}"
    loop:
      - 80
      - 443

- name: install VMs in the cloud
  hosts: cloud-vm
  tasks:
  - delegate_to: localhost
    block:
    - name: create and run VMs on CloudStack
      cs_instance:
        name: "{{ inventory_hostname_short }}"
        template: Linux Debian 7 64-bit 20GB Disk
        service_offering: "{{ cs_offering }}"
        security_groups: "{{ cs_securitygroups }}"
        ssh_key: defaultkey
        state: Running
      register: vm

    - name: show VM IP
      debug: msg="VM {{ inventory_hostname }} {{ vm.default_ip }}"

    - name: assign IP to the inventory
      set_fact: ansible_ssh_host={{ vm.default_ip }}

    - name: waiting for SSH to come up
      wait_for: port=22 host={{ vm.default_ip }} delay=5

```
 In the first play we setup the security groups, in the second play the VMs will created be assigned to these groups. Further you see, that we assign the public IP returned from the modules to the host inventory. This is needed as we do not know the IPs we will get in advance. In a next step you would configure the DNS servers with these IPs for accessing the VMs with their DNS name.

 In the last task we wait for SSH to be accessible, so any later play would be able to access the VM by SSH without failure.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_cloudstack.html>

Online.net Guide
================

 Introduction
------------

 Online is a French hosting company mainly known for providing bare-metal servers named Dedibox. Check it out: <https://www.online.net/en>

 ### Dynamic inventory for Online resources

 Ansible has a dynamic inventory plugin that can list your resources.

 1. Create a YAML configuration such as `online_inventory.yml` with this content:

 
```
plugin: online

```
 2. `Set your ONLINE_TOKEN environment variable with your token.` 

You need to open an account and log into it before you can get a token. You can find your token at the following page: <https://console.online.net/en/api/access>
3. You can test that your inventory is working by running:

 
```
$ ansible-inventory -v -i online_inventory.yml --list

```
 4. Now you can run your playbook or any other module with this inventory:

 
```
$ ansible all -i online_inventory.yml -m ping
sd-96735 | SUCCESS => {
    "changed": false,
    "ping": "pong"
}

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_online.html>

Vultr Guide
===========

 Ansible offers a set of modules to interact with [Vultr](https://www.vultr.com) cloud platform.

 This set of module forms a framework that allows one to easily manage and orchestrate one’s infrastructure on Vultr cloud platform.

 Requirements
------------

 There is actually no technical requirement; simply an already created Vultr account.

 Configuration
-------------

 Vultr modules offer a rather flexible way with regard to configuration.

 Configuration is read in that order:

 * Environment Variables (eg. `VULTR_API_KEY`, `VULTR_API_TIMEOUT`)
* File specified by environment variable `VULTR_API_CONFIG`
* `vultr.ini` file located in current working directory
* `$HOME/.vultr.ini`

 Ini file are structured this way:

 
```
[default]
key = MY_API_KEY
timeout = 60

[personal_account]
key = MY_PERSONAL_ACCOUNT_API_KEY
timeout = 30

```
 If `VULTR_API_ACCOUNT` environment variable or `api_account` module parameter is not specified, modules will look for the section named “default”.

 Authentication
--------------

 Before using the Ansible modules to interact with Vultr, ones need an API key. If one doesn’t own one yet, log in to [Vultr](https://www.vultr.com) go to Account, then API, enable API then the API key should show up.

 Ensure you allow the usage of the API key from the proper IP addresses.

 Refer to the Configuration section to find out where to put this information.

 To check that everything is working properly run the following command:

 
```
#> VULTR_API_KEY=XXX ansible -m vultr_account_info localhost
localhost | SUCCESS => {
  "changed": false,
  "vultr_account_info": {
      "balance": -8.9,
      "last_payment_amount": -10.0,
      "last_payment_date": "2018-07-21 11:34:46",
      "pending_charges": 6.0
  },
  "vultr_api": {
      "api_account": "default",
      "api_endpoint": "https://api.vultr.com",
      "api_retries": 5,
      "api_timeout": 60
  }
}

```
 If a similar output displays then everything is setup properly, else please ensure the proper `VULTR_API_KEY` has been specified and that Access Control on Vultr > Account > API page are accurate.

 Usage
-----

 Since [Vultr](https://www.vultr.com) offers a public API, the execution of the module to manage the infrastructure on their platform will happen on localhost. This translates to:

 
```
---
- hosts: localhost
  tasks:
    - name: Create a 10G volume
      vultr_block_storage:
        name: my_disk
        size: 10
        region: New Jersey

```
 From that point on, only your creativity is the limit. Make sure to read the documentation of the [available modules](../modules/list_of_cloud_modules#vultr).

 Dynamic Inventory
-----------------

 Ansible provides a dynamic inventory plugin for [Vultr](https://www.vultr.com). The configuration process is exactly the same as the one for the modules.

 To be able to use it you need to enable it first by specifying the following in the `ansible.cfg` file:

 
```
[inventory]
enable_plugins=vultr

```
 And provide a configuration file to be used with the plugin, the minimal configuration file looks like this:

 
```
---
plugin: vultr

```
 To list the available hosts one can simply run:

 
```
#> ansible-inventory -i vultr.yml --list

```
 For example, this allows you to take action on nodes grouped by location or OS name:

 
```
---
- hosts: Amsterdam
  tasks:
    - name: Rebooting the machine
      shell: reboot
      become: True

```
 Integration tests
-----------------

 Ansible includes integration tests for all Vultr modules.

 These tests are meant to run against the public Vultr API and that is why they require a valid key to access the API.

 Prepare the test setup:

 
```
$ cd ansible # location the ansible source is
$ source ./hacking/env-setup

```
 Set the Vultr API key:

 
```
$ cd test/integration
$ cp cloud-config-vultr.ini.template cloud-config-vultr.ini
$ vi cloud-config-vultr.ini

```
 Run all Vultr tests:

 
```
$ ansible-test integration cloud/vultr/ -v --diff --allow-unsupported

```
 To run a specific test, for example vultr\_account\_info:

 
```
$ ansible-test integration cloud/vultr/vultr_account_info -v --diff --allow-unsupported

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_vultr.html>

Packet.net Guide
================

 Introduction
------------

 [Packet.net](https://packet.net) is a bare metal infrastructure host that’s supported by Ansible (>=2.3) via a dynamic inventory script and two cloud modules. The two modules are:

 * packet\_sshkey: adds a public SSH key from file or value to the Packet infrastructure. Every subsequently-created device will have this public key installed in .ssh/authorized\_keys.
* packet\_device: manages servers on Packet. You can use this module to create, restart and delete devices.

 Note, this guide assumes you are familiar with Ansible and how it works. If you’re not, have a look at their [docs](../index#ansible-documentation) before getting started.

 Requirements
------------

 The Packet modules and inventory script connect to the Packet API using the packet-python package. You can install it with pip:

 
```
$ pip install packet-python

```
 In order to check the state of devices created by Ansible on Packet, it’s a good idea to install one of the [Packet CLI clients](https://www.packet.net/developers/integrations/). Otherwise you can check them via the [Packet portal](https://app.packet.net/portal).

 To use the modules and inventory script you’ll need a Packet API token. You can generate an API token via the Packet portal [here](https://app.packet.net/portal#/api-keys). The simplest way to authenticate yourself is to set the Packet API token in an environment variable:

 
```
$ export PACKET_API_TOKEN=Bfse9F24SFtfs423Gsd3ifGsd43sSdfs

```
 If you’re not comfortable exporting your API token, you can pass it as a parameter to the modules.

 On Packet, devices and reserved IP addresses belong to [projects](https://www.packet.com/developers/api/#projects). In order to use the packet\_device module, you need to specify the UUID of the project in which you want to create or manage devices. You can find a project’s UUID in the Packet portal [here](https://app.packet.net/portal#/projects/list/table/) (it’s just under the project table) or via one of the available [CLIs](https://www.packet.net/developers/integrations/).

 If you want to use a new SSH keypair in this tutorial, you can generate it to `./id_rsa` and `./id_rsa.pub` as:

 
```
$ ssh-keygen -t rsa -f ./id_rsa

```
 If you want to use an existing keypair, just copy the private and public key over to the playbook directory.

 Device Creation
---------------

 The following code block is a simple playbook that creates one [Type 0](https://www.packet.com/cloud/servers/t1-small/) server (the ‘plan’ parameter). You have to supply ‘plan’ and ‘operating\_system’. ‘location’ defaults to ‘ewr1’ (Parsippany, NJ). You can find all the possible values for the parameters via a [CLI client](https://www.packet.net/developers/integrations/).

 
```
# playbook_create.yml

- name: create ubuntu device
  hosts: localhost
  tasks:

  - packet_sshkey:
      key_file: ./id_rsa.pub
      label: tutorial key

  - packet_device:
      project_id: <your_project_id>
      hostnames: myserver
      operating_system: ubuntu_16_04
      plan: baremetal_0
      facility: sjc1

```
 After running `ansible-playbook playbook_create.yml`, you should have a server provisioned on Packet. You can verify via a CLI or in the [Packet portal](https://app.packet.net/portal#/projects/list/table).

 If you get an error with the message “failed to set machine state present, error: Error 404: Not Found”, please verify your project UUID.

 Updating Devices
----------------

 The two parameters used to uniquely identify Packet devices are: “device\_ids” and “hostnames”. Both parameters accept either a single string (later converted to a one-element list), or a list of strings.

 The ‘device\_ids’ and ‘hostnames’ parameters are mutually exclusive. The following values are all acceptable:

 * device\_ids: a27b7a83-fc93-435b-a128-47a5b04f2dcf
* hostnames: mydev1
* device\_ids: [a27b7a83-fc93-435b-a128-47a5b04f2dcf, 4887130f-0ccd-49a0-99b0-323c1ceb527b]
* hostnames: [mydev1, mydev2]

 In addition, hostnames can contain a special ‘%d’ formatter along with a ‘count’ parameter that lets you easily expand hostnames that follow a simple name and number pattern; in other words, `hostnames: "mydev%d", count: 2` will expand to [mydev1, mydev2].

 If your playbook acts on existing Packet devices, you can only pass the ‘hostname’ and ‘device\_ids’ parameters. The following playbook shows how you can reboot a specific Packet device by setting the ‘hostname’ parameter:

 
```
# playbook_reboot.yml

- name: reboot myserver
  hosts: localhost
  tasks:

  - packet_device:
      project_id: <your_project_id>
      hostnames: myserver
      state: rebooted

```
 You can also identify specific Packet devices with the ‘device\_ids’ parameter. The device’s UUID can be found in the [Packet Portal](https://app.packet.net/portal) or by using a [CLI](https://www.packet.net/developers/integrations/). The following playbook removes a Packet device using the ‘device\_ids’ field:

 
```
# playbook_remove.yml

- name: remove a device
  hosts: localhost
  tasks:

  - packet_device:
      project_id: <your_project_id>
      device_ids: <myserver_device_id>
      state: absent

```
 More Complex Playbooks
----------------------

 In this example, we’ll create a CoreOS cluster with [user data](https://packet.com/developers/docs/servers/key-features/user-data/).

 The CoreOS cluster will use [etcd](https://etcd.io/) for discovery of other servers in the cluster. Before provisioning your servers, you’ll need to generate a discovery token for your cluster:

 
```
$ curl -w "\n" 'https://discovery.etcd.io/new?size=3'

```
 The following playbook will create an SSH key, 3 Packet servers, and then wait until SSH is ready (or until 5 minutes passed). Make sure to substitute the discovery token URL in ‘user\_data’, and the ‘project\_id’ before running `ansible-playbook`. Also, feel free to change ‘plan’ and ‘facility’.

 
```
# playbook_coreos.yml

- name: Start 3 CoreOS nodes in Packet and wait until SSH is ready
  hosts: localhost
  tasks:

  - packet_sshkey:
      key_file: ./id_rsa.pub
      label: new

  - packet_device:
      hostnames: [coreos-one, coreos-two, coreos-three]
      operating_system: coreos_beta
      plan: baremetal_0
      facility: ewr1
      project_id: <your_project_id>
      wait_for_public_IPv: 4
      user_data: |
        #cloud-config
        coreos:
          etcd2:
            discovery: https://discovery.etcd.io/<token>
            advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
            initial-advertise-peer-urls: http://$private_ipv4:2380
            listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
            listen-peer-urls: http://$private_ipv4:2380
          fleet:
            public-ip: $private_ipv4
          units:
            - name: etcd2.service
              command: start
            - name: fleet.service
              command: start
    register: newhosts

  - name: wait for ssh
    wait_for:
      delay: 1
      host: "{{ item.public_ipv4 }}"
      port: 22
      state: started
      timeout: 500
    loop: "{{ newhosts.results[0].devices }}"

```
 As with most Ansible modules, the default states of the Packet modules are idempotent, meaning the resources in your project will remain the same after re-runs of a playbook. Thus, we can keep the `packet_sshkey` module call in our playbook. If the public key is already in your Packet account, the call will have no effect.

 The second module call provisions 3 Packet Type 0 (specified using the ‘plan’ parameter) servers in the project identified via the ‘project\_id’ parameter. The servers are all provisioned with CoreOS beta (the ‘operating\_system’ parameter) and are customized with cloud-config user data passed to the ‘user\_data’ parameter.

 The `packet_device` module has a `wait_for_public_IPv` that is used to specify the version of the IP address to wait for (valid values are `4` or `6` for IPv4 or IPv6). If specified, Ansible will wait until the GET API call for a device contains an Internet-routeable IP address of the specified version. When referring to an IP address of a created device in subsequent module calls, it’s wise to use the `wait_for_public_IPv` parameter, or `state: active` in the packet\_device module call.

 Run the playbook:

 
```
$ ansible-playbook playbook_coreos.yml

```
 Once the playbook quits, your new devices should be reachable via SSH. Try to connect to one and check if etcd has started properly:

 
```
tomk@work $ ssh -i id_rsa core@$one_of_the_servers_ip
core@coreos-one ~ $ etcdctl cluster-health

```
 Once you create a couple of devices, you might appreciate the dynamic inventory script…

 Dynamic Inventory Script
------------------------

 The dynamic inventory script queries the Packet API for a list of hosts, and exposes it to Ansible so you can easily identify and act on Packet devices.

 You can find it in Ansible Community General Collection’s git repo at [scripts/inventory/packet\_net.py](https://raw.githubusercontent.com/ansible-community/contrib-scripts/main/inventory/packet_net.py).

 The inventory script is configurable via a [ini file](https://raw.githubusercontent.com/ansible-community/contrib-scripts/main/inventory/packet_net.ini).

 If you want to use the inventory script, you must first export your Packet API token to a PACKET\_API\_TOKEN environment variable.

 You can either copy the inventory and ini config out from the cloned git repo, or you can download it to your working directory like so:

 
```
$ wget https://raw.githubusercontent.com/ansible-community/contrib-scripts/main/inventory/packet_net.py
$ chmod +x packet_net.py
$ wget https://raw.githubusercontent.com/ansible-community/contrib-scripts/main/inventory/packet_net.ini

```
 In order to understand what the inventory script gives to Ansible you can run:

 
```
$ ./packet_net.py --list

```
 It should print a JSON document looking similar to following trimmed dictionary:

 
```
{
  "_meta": {
    "hostvars": {
      "147.75.64.169": {
        "packet_billing_cycle": "hourly",
        "packet_created_at": "2017-02-09T17:11:26Z",
        "packet_facility": "ewr1",
        "packet_hostname": "coreos-two",
        "packet_href": "/devices/d0ab8972-54a8-4bff-832b-28549d1bec96",
        "packet_id": "d0ab8972-54a8-4bff-832b-28549d1bec96",
        "packet_locked": false,
        "packet_operating_system": "coreos_beta",
        "packet_plan": "baremetal_0",
        "packet_state": "active",
        "packet_updated_at": "2017-02-09T17:16:35Z",
        "packet_user": "core",
        "packet_userdata": "#cloud-config\ncoreos:\n  etcd2:\n    discovery: https://discovery.etcd.io/e0c8a4a9b8fe61acd51ec599e2a4f68e\n    advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001\n    initial-advertise-peer-urls: http://$private_ipv4:2380\n    listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001\n    listen-peer-urls: http://$private_ipv4:2380\n  fleet:\n    public-ip: $private_ipv4\n  units:\n    - name: etcd2.service\n      command: start\n    - name: fleet.service\n      command: start"
      }
    }
  },
  "baremetal_0": [
    "147.75.202.255",
    "147.75.202.251",
    "147.75.202.249",
    "147.75.64.129",
    "147.75.192.51",
    "147.75.64.169"
  ],
  "coreos_beta": [
    "147.75.202.255",
    "147.75.202.251",
    "147.75.202.249",
    "147.75.64.129",
    "147.75.192.51",
    "147.75.64.169"
  ],
  "ewr1": [
    "147.75.64.129",
    "147.75.192.51",
    "147.75.64.169"
  ],
  "sjc1": [
    "147.75.202.255",
    "147.75.202.251",
    "147.75.202.249"
  ],
  "coreos-two": [
    "147.75.64.169"
  ],
  "d0ab8972-54a8-4bff-832b-28549d1bec96": [
    "147.75.64.169"
  ]
}

```
 In the `['_meta']['hostvars']` key, there is a list of devices (uniquely identified by their public IPv4 address) with their parameters. The other keys under `['_meta']` are lists of devices grouped by some parameter. Here, it is type (all devices are of type baremetal\_0), operating system, and facility (ewr1 and sjc1).

 In addition to the parameter groups, there are also one-item groups with the UUID or hostname of the device.

 You can now target groups in playbooks! The following playbook will install a role that supplies resources for an Ansible target into all devices in the “coreos\_beta” group:

 
```
# playbook_bootstrap.yml

- hosts: coreos_beta
  gather_facts: false
  roles:
    - defunctzombie.coreos-boostrap

```
 Don’t forget to supply the dynamic inventory in the `-i` argument!

 
```
$ ansible-playbook -u core -i packet_net.py playbook_bootstrap.yml

```
 If you have any questions or comments let us know! [help@packet.net](https://docs.ansible.com/cdn-cgi/l/email-protection#177f727b67313424202c313422252c3134232f2c6776747c7263313423212c797263)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_packet.html>

Vagrant Guide
=============

 Introduction
------------

 [Vagrant](https://www.vagrantup.com/) is a tool to manage virtual machine environments, and allows you to configure and use reproducible work environments on top of various virtualization and cloud platforms. It also has integration with Ansible as a provisioner for these virtual machines, and the two tools work together well.

 This guide will describe how to use Vagrant 1.7+ and Ansible together.

 If you’re not familiar with Vagrant, you should visit [the documentation](https://www.vagrantup.com/docs/).

 This guide assumes that you already have Ansible installed and working. Running from a Git checkout is fine. Follow the [Installing Ansible](../installation_guide/intro_installation#installation-guide) guide for more information.

 Vagrant Setup
-------------

 The first step once you’ve installed Vagrant is to create a `Vagrantfile` and customize it to suit your needs. This is covered in detail in the Vagrant documentation, but here is a quick example that includes a section to use the Ansible provisioner to manage a single machine:

 
```
# This guide is optimized for Vagrant 1.8 and above.
# Older versions of Vagrant put less info in the inventory they generate.
Vagrant.require_version ">= 1.8.0"

Vagrant.configure(2) do |config|

  config.vm.box = "ubuntu/bionic64"

  config.vm.provision "ansible" do |ansible|
    ansible.verbose = "v"
    ansible.playbook = "playbook.yml"
  end
end

```
 Notice the `config.vm.provision` section that refers to an Ansible playbook called `playbook.yml` in the same directory as the `Vagrantfile`. Vagrant runs the provisioner once the virtual machine has booted and is ready for SSH access.

 There are a lot of Ansible options you can configure in your `Vagrantfile`. Visit the [Ansible Provisioner documentation](https://www.vagrantup.com/docs/provisioning/ansible.html) for more information.

 
```
$ vagrant up

```
 This will start the VM, and run the provisioning playbook (on the first VM startup).

 To re-run a playbook on an existing VM, just run:

 
```
$ vagrant provision

```
 This will re-run the playbook against the existing VM.

 Note that having the `ansible.verbose` option enabled will instruct Vagrant to show the full `ansible-playbook` command used behind the scene, as illustrated by this example:

 
```
$ PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --connection=ssh --timeout=30 --limit="default" --inventory-file=/home/someone/coding-in-a-project/.vagrant/provisioners/ansible/inventory -v playbook.yml

```
 This information can be quite useful to debug integration issues and can also be used to manually execute Ansible from a shell, as explained in the next section.

 Running Ansible Manually
------------------------

 Sometimes you may want to run Ansible manually against the machines. This is faster than kicking `vagrant provision` and pretty easy to do.

 With our `Vagrantfile` example, Vagrant automatically creates an Ansible inventory file in `.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory`. This inventory is configured according to the SSH tunnel that Vagrant automatically creates. A typical automatically-created inventory file for a single machine environment may look something like this:

 
```
# Generated by Vagrant

default ansible_host=127.0.0.1 ansible_port=2222 ansible_user='vagrant' ansible_ssh_private_key_file='/home/someone/coding-in-a-project/.vagrant/machines/default/virtualbox/private_key'

```
 If you want to run Ansible manually, you will want to make sure to pass `ansible` or `ansible-playbook` commands the correct arguments, at least for the *inventory*.

 
```
$ ansible-playbook -i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory playbook.yml

```
 Advanced Usages
---------------

 The “Tips and Tricks” chapter of the [Ansible Provisioner documentation](https://www.vagrantup.com/docs/provisioning/ansible.html) provides detailed information about more advanced Ansible features like:

 * how to execute a playbook in parallel within a multi-machine environment
* how to integrate a local `ansible.cfg` configuration file

  See also

  [Vagrant Home](https://www.vagrantup.com/)

The Vagrant homepage with downloads

  [Vagrant Documentation](https://www.vagrantup.com/docs/)

Vagrant Documentation

  [Ansible Provisioner](https://www.vagrantup.com/docs/provisioning/ansible.html)

The Vagrant documentation for the Ansible provisioner

  [Vagrant Issue Tracker](https://github.com/hashicorp/vagrant/issues?q=is%3Aopen+is%3Aissue+label%3Aprovisioners%2Fansible)

The open issues for the Ansible provisioner in the Vagrant project

  [Working with playbooks](../user_guide/playbooks#working-with-playbooks)

An introduction to playbooks

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_vagrant.html>

Microsoft Azure Guide
=====================

 Ansible includes a suite of modules for interacting with Azure Resource Manager, giving you the tools to easily create and orchestrate infrastructure on the Microsoft Azure Cloud.

 Requirements
------------

 Using the Azure Resource Manager modules requires having specific Azure SDK modules installed on the host running Ansible.

 
```
$ pip install 'ansible[azure]'

```
 If you are running Ansible from source, you can install the dependencies from the root directory of the Ansible repo.

 
```
$ pip install .[azure]

```
 You can also directly run Ansible in [Azure Cloud Shell](https://shell.azure.com), where Ansible is pre-installed.

 Authenticating with Azure
-------------------------

 Using the Azure Resource Manager modules requires authenticating with the Azure API. You can choose from two authentication strategies:

 * Active Directory Username/Password
* Service Principal Credentials

 Follow the directions for the strategy you wish to use, then proceed to [Providing Credentials to Azure Modules](#providing-credentials-to-azure-modules) for instructions on how to actually use the modules and authenticate with the Azure API.

 ### Using Service Principal

 There is now a detailed official tutorial describing [how to create a service principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal).

 After stepping through the tutorial you will have:

 * Your Client ID, which is found in the “client id” box in the “Configure” page of your application in the Azure portal
* Your Secret key, generated when you created the application. You cannot show the key after creation. If you lost the key, you must create a new one in the “Configure” page of your application.
* And finally, a tenant ID. It’s a UUID (for example, ABCDEFGH-1234-ABCD-1234-ABCDEFGHIJKL) pointing to the AD containing your application. You will find it in the URL from within the Azure portal, or in the “view endpoints” of any given URL.

 ### Using Active Directory Username/Password

 To create an Active Directory username/password:

 * Connect to the Azure Classic Portal with your admin account
* Create a user in your default AAD. You must NOT activate Multi-Factor Authentication
* Go to Settings - Administrators
* Click on Add and enter the email of the new user.
* Check the checkbox of the subscription you want to test with this user.
* Login to Azure Portal with this new user to change the temporary password to a new one. You will not be able to use the temporary password for OAuth login.

 ### Providing Credentials to Azure Modules

 The modules offer several ways to provide your credentials. For a CI/CD tool such as Ansible AWX or Jenkins, you will most likely want to use environment variables. For local development you may wish to store your credentials in a file within your home directory. And of course, you can always pass credentials as parameters to a task within a playbook. The order of precedence is parameters, then environment variables, and finally a file found in your home directory.

 #### Using Environment Variables

 To pass service principal credentials via the environment, define the following variables:

 * AZURE\_CLIENT\_ID
* AZURE\_SECRET
* AZURE\_SUBSCRIPTION\_ID
* AZURE\_TENANT

 To pass Active Directory username/password via the environment, define the following variables:

 * AZURE\_AD\_USER
* AZURE\_PASSWORD
* AZURE\_SUBSCRIPTION\_ID

 To pass Active Directory username/password in ADFS via the environment, define the following variables:

 * AZURE\_AD\_USER
* AZURE\_PASSWORD
* AZURE\_CLIENT\_ID
* AZURE\_TENANT
* AZURE\_ADFS\_AUTHORITY\_URL

 “AZURE\_ADFS\_AUTHORITY\_URL” is optional. It’s necessary only when you have own ADFS authority like <https://yourdomain.com/adfs>.

 #### Storing in a File

 When working in a development environment, it may be desirable to store credentials in a file. The modules will look for credentials in `$HOME/.azure/credentials`. This file is an ini style file. It will look as follows:

 
```
[default]
subscription_id=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
client_id=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
secret=xxxxxxxxxxxxxxxxx
tenant=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

```
  Note

 If your secret values contain non-ASCII characters, you must [URL Encode](https://www.w3schools.com/tags/ref_urlencode.asp) them to avoid login errors.

  It is possible to store multiple sets of credentials within the credentials file by creating multiple sections. Each section is considered a profile. The modules look for the [default] profile automatically. Define AZURE\_PROFILE in the environment or pass a profile parameter to specify a specific profile.

 #### Passing as Parameters

 If you wish to pass credentials as parameters to a task, use the following parameters for service principal:

 * client\_id
* secret
* subscription\_id
* tenant

 Or, pass the following parameters for Active Directory username/password:

 * ad\_user
* password
* subscription\_id

 Or, pass the following parameters for ADFS username/password:

 * ad\_user
* password
* client\_id
* tenant
* adfs\_authority\_url

 “adfs\_authority\_url” is optional. It’s necessary only when you have own ADFS authority like <https://yourdomain.com/adfs>.

 Other Cloud Environments
------------------------

 To use an Azure Cloud other than the default public cloud (for example, Azure China Cloud, Azure US Government Cloud, Azure Stack), pass the “cloud\_environment” argument to modules, configure it in a credential profile, or set the “AZURE\_CLOUD\_ENVIRONMENT” environment variable. The value is either a cloud name as defined by the Azure Python SDK (for example, “AzureChinaCloud”, “AzureUSGovernment”; defaults to “AzureCloud”) or an Azure metadata discovery URL (for Azure Stack).

 Creating Virtual Machines
-------------------------

 There are two ways to create a virtual machine, both involving the azure\_rm\_virtualmachine module. We can either create a storage account, network interface, security group and public IP address and pass the names of these objects to the module as parameters, or we can let the module do the work for us and accept the defaults it chooses.

 ### Creating Individual Components

 An Azure module is available to help you create a storage account, virtual network, subnet, network interface, security group and public IP. Here is a full example of creating each of these and passing the names to the `azure.azcollection.azure_rm_virtualmachine` module at the end:

 
```
- name: Create storage account
  azure.azcollection.azure_rm_storageaccount:
    resource_group: Testing
    name: testaccount001
    account_type: Standard_LRS

- name: Create virtual network
  azure.azcollection.azure_rm_virtualnetwork:
    resource_group: Testing
    name: testvn001
    address_prefixes: "10.10.0.0/16"

- name: Add subnet
  azure.azcollection.azure_rm_subnet:
    resource_group: Testing
    name: subnet001
    address_prefix: "10.10.0.0/24"
    virtual_network: testvn001

- name: Create public ip
  azure.azcollection.azure_rm_publicipaddress:
    resource_group: Testing
    allocation_method: Static
    name: publicip001

- name: Create security group that allows SSH
  azure.azcollection.azure_rm_securitygroup:
    resource_group: Testing
    name: secgroup001
    rules:
      - name: SSH
        protocol: Tcp
        destination_port_range: 22
        access: Allow
        priority: 101
        direction: Inbound

- name: Create NIC
  azure.azcollection.azure_rm_networkinterface:
    resource_group: Testing
    name: testnic001
    virtual_network: testvn001
    subnet: subnet001
    public_ip_name: publicip001
    security_group: secgroup001

- name: Create virtual machine
  azure.azcollection.azure_rm_virtualmachine:
    resource_group: Testing
    name: testvm001
    vm_size: Standard_D1
    storage_account: testaccount001
    storage_container: testvm001
    storage_blob: testvm001.vhd
    admin_username: admin
    admin_password: Password!
    network_interfaces: testnic001
    image:
      offer: CentOS
      publisher: OpenLogic
      sku: '7.1'
      version: latest

```
 Each of the Azure modules offers a variety of parameter options. Not all options are demonstrated in the above example. See each individual module for further details and examples.

 ### Creating a Virtual Machine with Default Options

 If you simply want to create a virtual machine without specifying all the details, you can do that as well. The only caveat is that you will need a virtual network with one subnet already in your resource group. Assuming you have a virtual network already with an existing subnet, you can run the following to create a VM:

 
```
azure.azcollection.azure_rm_virtualmachine:
  resource_group: Testing
  name: testvm10
  vm_size: Standard_D1
  admin_username: chouseknecht
  ssh_password_enabled: false
  ssh_public_keys: "{{ ssh_keys }}"
  image:
    offer: CentOS
    publisher: OpenLogic
    sku: '7.1'
    version: latest

```
 ### Creating a Virtual Machine in Availability Zones

 If you want to create a VM in an availability zone, consider the following:

 * Both OS disk and data disk must be a ‘managed disk’, not an ‘unmanaged disk’.
* When creating a VM with the `azure.azcollection.azure_rm_virtualmachine` module, you need to explicitly set the `managed_disk_type` parameter to change the OS disk to a managed disk. Otherwise, the OS disk becomes an unmanaged disk.
* When you create a data disk with the `azure.azcollection.azure_rm_manageddisk` module, you need to explicitly specify the `storage_account_type` parameter to make it a managed disk. Otherwise, the data disk will be an unmanaged disk.
* A managed disk does not require a storage account or a storage container, unlike an unmanaged disk. In particular, note that once a VM is created on an unmanaged disk, an unnecessary storage container named “vhds” is automatically created.
* When you create an IP address with the `azure.azcollection.azure_rm_publicipaddress` module, you must set the `sku` parameter to `standard`. Otherwise, the IP address cannot be used in an availability zone.

 Dynamic Inventory Script
------------------------

 If you are not familiar with Ansible’s dynamic inventory scripts, check out [Intro to Dynamic Inventory](../user_guide/intro_dynamic_inventory#intro-dynamic-inventory).

 The Azure Resource Manager inventory script is called [azure\_rm.py](https://raw.githubusercontent.com/ansible-community/contrib-scripts/main/inventory/azure_rm.py). It authenticates with the Azure API exactly the same as the Azure modules, which means you will either define the same environment variables described above in [Using Environment Variables](#using-environment-variables), create a `$HOME/.azure/credentials` file (also described above in [Storing in a File](#storing-in-a-file)), or pass command line parameters. To see available command line options execute the following:

 
```
$ wget https://raw.githubusercontent.com/ansible-community/contrib-scripts/main/inventory/azure_rm.py
$ ./azure_rm.py --help

```
 As with all dynamic inventory scripts, the script can be executed directly, passed as a parameter to the ansible command, or passed directly to ansible-playbook using the -i option. No matter how it is executed the script produces JSON representing all of the hosts found in your Azure subscription. You can narrow this down to just hosts found in a specific set of Azure resource groups, or even down to a specific host.

 For a given host, the inventory script provides the following host variables:

 
```
{
  "ansible_host": "XXX.XXX.XXX.XXX",
  "computer_name": "computer_name2",
  "fqdn": null,
  "id": "/subscriptions/subscription-id/resourceGroups/galaxy-production/providers/Microsoft.Compute/virtualMachines/object-name",
  "image": {
    "offer": "CentOS",
    "publisher": "OpenLogic",
    "sku": "7.1",
    "version": "latest"
  },
  "location": "westus",
  "mac_address": "00-00-5E-00-53-FE",
  "name": "object-name",
  "network_interface": "interface-name",
  "network_interface_id": "/subscriptions/subscription-id/resourceGroups/galaxy-production/providers/Microsoft.Network/networkInterfaces/object-name1",
  "network_security_group": null,
  "network_security_group_id": null,
  "os_disk": {
    "name": "object-name",
    "operating_system_type": "Linux"
  },
  "plan": null,
  "powerstate": "running",
  "private_ip": "172.26.3.6",
  "private_ip_alloc_method": "Static",
  "provisioning_state": "Succeeded",
  "public_ip": "XXX.XXX.XXX.XXX",
  "public_ip_alloc_method": "Static",
  "public_ip_id": "/subscriptions/subscription-id/resourceGroups/galaxy-production/providers/Microsoft.Network/publicIPAddresses/object-name",
  "public_ip_name": "object-name",
  "resource_group": "galaxy-production",
  "security_group": "object-name",
  "security_group_id": "/subscriptions/subscription-id/resourceGroups/galaxy-production/providers/Microsoft.Network/networkSecurityGroups/object-name",
  "tags": {
    "db": "mysql"
  },
  "type": "Microsoft.Compute/virtualMachines",
  "virtual_machine_size": "Standard_DS4"
}

```
 ### Host Groups

 By default hosts are grouped by:

 * azure (all hosts)
* location name
* resource group name
* security group name
* tag key
* tag key\_value
* os\_disk operating\_system\_type (Windows/Linux)

 You can control host groupings and host selection by either defining environment variables or creating an azure\_rm.ini file in your current working directory.

 NOTE: An .ini file will take precedence over environment variables.

 NOTE: The name of the .ini file is the basename of the inventory script (in other words, ‘azure\_rm’) with a ‘.ini’ extension. This allows you to copy, rename and customize the inventory script and have matching .ini files all in the same directory.

 Control grouping using the following variables defined in the environment:

 * AZURE\_GROUP\_BY\_RESOURCE\_GROUP=yes
* AZURE\_GROUP\_BY\_LOCATION=yes
* AZURE\_GROUP\_BY\_SECURITY\_GROUP=yes
* AZURE\_GROUP\_BY\_TAG=yes
* AZURE\_GROUP\_BY\_OS\_FAMILY=yes

 Select hosts within specific resource groups by assigning a comma separated list to:

 * AZURE\_RESOURCE\_GROUPS=resource\_group\_a,resource\_group\_b

 Select hosts for specific tag key by assigning a comma separated list of tag keys to:

 * AZURE\_TAGS=key1,key2,key3

 Select hosts for specific locations by assigning a comma separated list of locations to:

 * AZURE\_LOCATIONS=eastus,eastus2,westus

 Or, select hosts for specific tag key:value pairs by assigning a comma separated list key:value pairs to:

 * AZURE\_TAGS=key1:value1,key2:value2

 If you don’t need the powerstate, you can improve performance by turning off powerstate fetching:

 * AZURE\_INCLUDE\_POWERSTATE=no

 A sample azure\_rm.ini file is included along with the inventory script in [here](https://raw.githubusercontent.com/ansible-community/contrib-scripts/main/inventory/azure_rm.ini). An .ini file will contain the following:

 
```
[azure]
# Control which resource groups are included. By default all resources groups are included.
# Set resource_groups to a comma separated list of resource groups names.
#resource_groups=

# Control which tags are included. Set tags to a comma separated list of keys or key:value pairs
#tags=

# Control which locations are included. Set locations to a comma separated list of locations.
#locations=

# Include powerstate. If you don't need powerstate information, turning it off improves runtime performance.
# Valid values: yes, no, true, false, True, False, 0, 1.
include_powerstate=yes

# Control grouping with the following boolean flags. Valid values: yes, no, true, false, True, False, 0, 1.
group_by_resource_group=yes
group_by_location=yes
group_by_security_group=yes
group_by_tag=yes
group_by_os_family=yes

```
 ### Examples

 Here are some examples using the inventory script:

 
```
# Download inventory script
$ wget https://raw.githubusercontent.com/ansible-community/contrib-scripts/main/inventory/azure_rm.py

# Execute /bin/uname on all instances in the Testing resource group
$ ansible -i azure_rm.py Testing -m shell -a "/bin/uname -a"

# Execute win_ping on all Windows instances
$ ansible -i azure_rm.py windows -m win_ping

# Execute ping on all Linux instances
$ ansible -i azure_rm.py linux -m ping

# Use the inventory script to print instance specific information
$ ./azure_rm.py --host my_instance_host_name --resource-groups=Testing --pretty

# Use the inventory script with ansible-playbook
$ ansible-playbook -i ./azure_rm.py test_playbook.yml

```
 Here is a simple playbook to exercise the Azure inventory script:

 
```
- name: Test the inventory script
  hosts: azure
  connection: local
  gather_facts: no
  tasks:
    - debug:
        msg: "{{ inventory_hostname }} has powerstate {{ powerstate }}"

```
 You can execute the playbook with something like:

 
```
$ ansible-playbook -i ./azure_rm.py test_azure_inventory.yml

```
 ### Disabling certificate validation on Azure endpoints

 When an HTTPS proxy is present, or when using Azure Stack, it may be necessary to disable certificate validation for Azure endpoints in the Azure modules. This is not a recommended security practice, but may be necessary when the system CA store cannot be altered to include the necessary CA certificate. Certificate validation can be controlled by setting the “cert\_validation\_mode” value in a credential profile, via the “AZURE\_CERT\_VALIDATION\_MODE” environment variable, or by passing the “cert\_validation\_mode” argument to any Azure module. The default value is “validate”; setting the value to “ignore” will prevent all certificate validation. The module argument takes precedence over a credential profile value, which takes precedence over the environment value.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_azure.html>

Rackspace Cloud Guide
=====================

 Introduction
------------

  Note

 This section of the documentation is under construction. We are in the process of adding more examples about the Rackspace modules and how they work together. Once complete, there will also be examples for Rackspace Cloud in [ansible-examples](https://github.com/ansible/ansible-examples/).

  Ansible contains a number of core modules for interacting with Rackspace Cloud.

 The purpose of this section is to explain how to put Ansible modules together (and use inventory scripts) to use Ansible in a Rackspace Cloud context.

 Prerequisites for using the rax modules are minimal. In addition to ansible itself, all of the modules require and are tested against pyrax 1.5 or higher. You’ll need this Python module installed on the execution host.

 `pyrax` is not currently available in many operating system package repositories, so you will likely need to install it via pip:

 
```
$ pip install pyrax

```
 Ansible creates an implicit localhost that executes in the same context as the `ansible-playbook` and the other CLI tools. If for any reason you need or want to have it in your inventory you should do something like the following:

 
```
[localhost]
localhost ansible_connection=local ansible_python_interpreter=/usr/local/bin/python2

```
 For more information see [Implicit Localhost](../inventory/implicit_localhost#implicit-localhost)

 In playbook steps, we’ll typically be using the following pattern:

 
```
- hosts: localhost
  gather_facts: False
  tasks:

```
 Credentials File
----------------

 The `rax.py` inventory script and all `rax` modules support a standard `pyrax` credentials file that looks like:

 
```
[rackspace_cloud]
username = myraxusername
api_key = d41d8cd98f00b204e9800998ecf8427e

```
 Setting the environment parameter `RAX_CREDS_FILE` to the path of this file will help Ansible find how to load this information.

 More information about this credentials file can be found at <https://github.com/pycontribs/pyrax/blob/master/docs/getting_started.md#authenticating>

 ### Running from a Python Virtual Environment (Optional)

 Most users will not be using virtualenv, but some users, particularly Python developers sometimes like to.

 There are special considerations when Ansible is installed to a Python virtualenv, rather than the default of installing at a global scope. Ansible assumes, unless otherwise instructed, that the python binary will live at /usr/bin/python. This is done via the interpreter line in modules, however when instructed by setting the inventory variable ‘ansible\_python\_interpreter’, Ansible will use this specified path instead to find Python. This can be a cause of confusion as one may assume that modules running on ‘localhost’, or perhaps running via ‘local\_action’, are using the virtualenv Python interpreter. By setting this line in the inventory, the modules will execute in the virtualenv interpreter and have available the virtualenv packages, specifically pyrax. If using virtualenv, you may wish to modify your localhost inventory definition to find this location as follows:

 
```
[localhost]
localhost ansible_connection=local ansible_python_interpreter=/path/to/ansible_venv/bin/python

```
  Note

 pyrax may be installed in the global Python package scope or in a virtual environment. There are no special considerations to keep in mind when installing pyrax.

  Provisioning
------------

 Now for the fun parts.

 The ‘rax’ module provides the ability to provision instances within Rackspace Cloud. Typically the provisioning task will be performed from your Ansible control server (in our example, localhost) against the Rackspace cloud API. This is done for several reasons:

 * Avoiding installing the pyrax library on remote nodes
* No need to encrypt and distribute credentials to remote nodes
* Speed and simplicity

  Note

 Authentication with the Rackspace-related modules is handled by either specifying your username and API key as environment variables or passing them as module arguments, or by specifying the location of a credentials file.

  Here is a basic example of provisioning an instance in ad hoc mode:

 
```
$ ansible localhost -m rax -a "name=awx flavor=4 image=ubuntu-1204-lts-precise-pangolin wait=yes"

```
 Here’s what it would look like in a playbook, assuming the parameters were defined in variables:

 
```
tasks:
  - name: Provision a set of instances
    rax:
        name: "{{ rax_name }}"
        flavor: "{{ rax_flavor }}"
        image: "{{ rax_image }}"
        count: "{{ rax_count }}"
        group: "{{ group }}"
        wait: yes
    register: rax
    delegate_to: localhost

```
 The rax module returns data about the nodes it creates, like IP addresses, hostnames, and login passwords. By registering the return value of the step, it is possible used this data to dynamically add the resulting hosts to inventory (temporarily, in memory). This facilitates performing configuration actions on the hosts in a follow-on task. In the following example, the servers that were successfully created using the above task are dynamically added to a group called “raxhosts”, with each nodes hostname, IP address, and root password being added to the inventory.

 
```
- name: Add the instances we created (by public IP) to the group 'raxhosts'
  add_host:
      hostname: "{{ item.name }}"
      ansible_host: "{{ item.rax_accessipv4 }}"
      ansible_password: "{{ item.rax_adminpass }}"
      groups: raxhosts
  loop: "{{ rax.success }}"
  when: rax.action == 'create'

```
 With the host group now created, the next play in this playbook could now configure servers belonging to the raxhosts group.

 
```
- name: Configuration play
  hosts: raxhosts
  user: root
  roles:
    - ntp
    - webserver

```
 The method above ties the configuration of a host with the provisioning step. This isn’t always what you want, and leads us to the next section.

 Host Inventory
--------------

 Once your nodes are spun up, you’ll probably want to talk to them again. The best way to handle this is to use the “rax” inventory plugin, which dynamically queries Rackspace Cloud and tells Ansible what nodes you have to manage. You might want to use this even if you are spinning up cloud instances via other tools, including the Rackspace Cloud user interface. The inventory plugin can be used to group resources by metadata, region, OS, and so on. Utilizing metadata is highly recommended in “rax” and can provide an easy way to sort between host groups and roles. If you don’t want to use the `rax.py` dynamic inventory script, you could also still choose to manually manage your INI inventory file, though this is less recommended.

 In Ansible it is quite possible to use multiple dynamic inventory plugins along with INI file data. Just put them in a common directory and be sure the scripts are chmod +x, and the INI-based ones are not.

 ### rax.py

 To use the Rackspace dynamic inventory script, copy `rax.py` into your inventory directory and make it executable. You can specify a credentials file for `rax.py` utilizing the `RAX_CREDS_FILE` environment variable.

  Note

 Dynamic inventory scripts (like `rax.py`) are saved in `/usr/share/ansible/inventory` if Ansible has been installed globally. If installed to a virtualenv, the inventory scripts are installed to `$VIRTUALENV/share/inventory`.

   Note

 Users of [Red Hat Ansible Automation Platform](https://docs.ansible.com/ansible/latest/reference_appendices/tower.html#ansible-platform) will note that dynamic inventory is natively supported by the controller in the platform, and all you have to do is associate a group with your Rackspace Cloud credentials, and it will easily synchronize without going through these steps:

 
```
$ RAX_CREDS_FILE=~/.raxpub ansible all -i rax.py -m setup

```
  `rax.py` also accepts a `RAX_REGION` environment variable, which can contain an individual region, or a comma separated list of regions.

 When using `rax.py`, you will not have a ‘localhost’ defined in the inventory.

 As mentioned previously, you will often be running most of these modules outside of the host loop, and will need ‘localhost’ defined. The recommended way to do this, would be to create an `inventory` directory, and place both the `rax.py` script and a file containing `localhost` in it.

 Executing `ansible` or `ansible-playbook` and specifying the `inventory` directory instead of an individual file, will cause ansible to evaluate each file in that directory for inventory.

 Let’s test our inventory script to see if it can talk to Rackspace Cloud.

 
```
$ RAX_CREDS_FILE=~/.raxpub ansible all -i inventory/ -m setup

```
 Assuming things are properly configured, the `rax.py` inventory script will output information similar to the following information, which will be utilized for inventory and variables.

 
```
{
    "ORD": [
        "test"
    ],
    "_meta": {
        "hostvars": {
            "test": {
                "ansible_host": "198.51.100.1",
                "rax_accessipv4": "198.51.100.1",
                "rax_accessipv6": "2001:DB8::2342",
                "rax_addresses": {
                    "private": [
                        {
                            "addr": "192.0.2.2",
                            "version": 4
                        }
                    ],
                    "public": [
                        {
                            "addr": "198.51.100.1",
                            "version": 4
                        },
                        {
                            "addr": "2001:DB8::2342",
                            "version": 6
                        }
                    ]
                },
                "rax_config_drive": "",
                "rax_created": "2013-11-14T20:48:22Z",
                "rax_flavor": {
                    "id": "performance1-1",
                    "links": [
                        {
                            "href": "https://ord.servers.api.rackspacecloud.com/111111/flavors/performance1-1",
                            "rel": "bookmark"
                        }
                    ]
                },
                "rax_hostid": "e7b6961a9bd943ee82b13816426f1563bfda6846aad84d52af45a4904660cde0",
                "rax_human_id": "test",
                "rax_id": "099a447b-a644-471f-87b9-a7f580eb0c2a",
                "rax_image": {
                    "id": "b211c7bf-b5b4-4ede-a8de-a4368750c653",
                    "links": [
                        {
                            "href": "https://ord.servers.api.rackspacecloud.com/111111/images/b211c7bf-b5b4-4ede-a8de-a4368750c653",
                            "rel": "bookmark"
                        }
                    ]
                },
                "rax_key_name": null,
                "rax_links": [
                    {
                        "href": "https://ord.servers.api.rackspacecloud.com/v2/111111/servers/099a447b-a644-471f-87b9-a7f580eb0c2a",
                        "rel": "self"
                    },
                    {
                        "href": "https://ord.servers.api.rackspacecloud.com/111111/servers/099a447b-a644-471f-87b9-a7f580eb0c2a",
                        "rel": "bookmark"
                    }
                ],
                "rax_metadata": {
                    "foo": "bar"
                },
                "rax_name": "test",
                "rax_name_attr": "name",
                "rax_networks": {
                    "private": [
                        "192.0.2.2"
                    ],
                    "public": [
                        "198.51.100.1",
                        "2001:DB8::2342"
                    ]
                },
                "rax_os-dcf_diskconfig": "AUTO",
                "rax_os-ext-sts_power_state": 1,
                "rax_os-ext-sts_task_state": null,
                "rax_os-ext-sts_vm_state": "active",
                "rax_progress": 100,
                "rax_status": "ACTIVE",
                "rax_tenant_id": "111111",
                "rax_updated": "2013-11-14T20:49:27Z",
                "rax_user_id": "22222"
            }
        }
    }
}

```
 ### Standard Inventory

 When utilizing a standard ini formatted inventory file (as opposed to the inventory plugin), it may still be advantageous to retrieve discoverable hostvar information from the Rackspace API.

 This can be achieved with the `rax_facts` module and an inventory file similar to the following:

 
```
[test_servers]
hostname1 rax_region=ORD
hostname2 rax_region=ORD

```
 
```
- name: Gather info about servers
  hosts: test_servers
  gather_facts: False
  tasks:
    - name: Get facts about servers
      rax_facts:
        credentials: ~/.raxpub
        name: "{{ inventory_hostname }}"
        region: "{{ rax_region }}"
      delegate_to: localhost
    - name: Map some facts
      set_fact:
        ansible_host: "{{ rax_accessipv4 }}"

```
 While you don’t need to know how it works, it may be interesting to know what kind of variables are returned.

 The `rax_facts` module provides facts as followings, which match the `rax.py` inventory script:

 
```
{
    "ansible_facts": {
        "rax_accessipv4": "198.51.100.1",
        "rax_accessipv6": "2001:DB8::2342",
        "rax_addresses": {
            "private": [
                {
                    "addr": "192.0.2.2",
                    "version": 4
                }
            ],
            "public": [
                {
                    "addr": "198.51.100.1",
                    "version": 4
                },
                {
                    "addr": "2001:DB8::2342",
                    "version": 6
                }
            ]
        },
        "rax_config_drive": "",
        "rax_created": "2013-11-14T20:48:22Z",
        "rax_flavor": {
            "id": "performance1-1",
            "links": [
                {
                    "href": "https://ord.servers.api.rackspacecloud.com/111111/flavors/performance1-1",
                    "rel": "bookmark"
                }
            ]
        },
        "rax_hostid": "e7b6961a9bd943ee82b13816426f1563bfda6846aad84d52af45a4904660cde0",
        "rax_human_id": "test",
        "rax_id": "099a447b-a644-471f-87b9-a7f580eb0c2a",
        "rax_image": {
            "id": "b211c7bf-b5b4-4ede-a8de-a4368750c653",
            "links": [
                {
                    "href": "https://ord.servers.api.rackspacecloud.com/111111/images/b211c7bf-b5b4-4ede-a8de-a4368750c653",
                    "rel": "bookmark"
                }
            ]
        },
        "rax_key_name": null,
        "rax_links": [
            {
                "href": "https://ord.servers.api.rackspacecloud.com/v2/111111/servers/099a447b-a644-471f-87b9-a7f580eb0c2a",
                "rel": "self"
            },
            {
                "href": "https://ord.servers.api.rackspacecloud.com/111111/servers/099a447b-a644-471f-87b9-a7f580eb0c2a",
                "rel": "bookmark"
            }
        ],
        "rax_metadata": {
            "foo": "bar"
        },
        "rax_name": "test",
        "rax_name_attr": "name",
        "rax_networks": {
            "private": [
                "192.0.2.2"
            ],
            "public": [
                "198.51.100.1",
                "2001:DB8::2342"
            ]
        },
        "rax_os-dcf_diskconfig": "AUTO",
        "rax_os-ext-sts_power_state": 1,
        "rax_os-ext-sts_task_state": null,
        "rax_os-ext-sts_vm_state": "active",
        "rax_progress": 100,
        "rax_status": "ACTIVE",
        "rax_tenant_id": "111111",
        "rax_updated": "2013-11-14T20:49:27Z",
        "rax_user_id": "22222"
    },
    "changed": false
}

```
 Use Cases
---------

 This section covers some additional usage examples built around a specific use case.

 ### Network and Server

 Create an isolated cloud network and build a server

 
```
- name: Build Servers on an Isolated Network
  hosts: localhost
  gather_facts: False
  tasks:
    - name: Network create request
      rax_network:
        credentials: ~/.raxpub
        label: my-net
        cidr: 192.168.3.0/24
        region: IAD
        state: present
      delegate_to: localhost

    - name: Server create request
      rax:
        credentials: ~/.raxpub
        name: web%04d.example.org
        flavor: 2
        image: ubuntu-1204-lts-precise-pangolin
        disk_config: manual
        networks:
          - public
          - my-net
        region: IAD
        state: present
        count: 5
        exact_count: yes
        group: web
        wait: yes
        wait_timeout: 360
      register: rax
      delegate_to: localhost

```
 ### Complete Environment

 Build a complete webserver environment with servers, custom networks and load balancers, install nginx and create a custom index.html

 
```
---
- name: Build environment
  hosts: localhost
  gather_facts: False
  tasks:
    - name: Load Balancer create request
      rax_clb:
        credentials: ~/.raxpub
        name: my-lb
        port: 80
        protocol: HTTP
        algorithm: ROUND_ROBIN
        type: PUBLIC
        timeout: 30
        region: IAD
        wait: yes
        state: present
        meta:
          app: my-cool-app
      register: clb

    - name: Network create request
      rax_network:
        credentials: ~/.raxpub
        label: my-net
        cidr: 192.168.3.0/24
        state: present
        region: IAD
      register: network

    - name: Server create request
      rax:
        credentials: ~/.raxpub
        name: web%04d.example.org
        flavor: performance1-1
        image: ubuntu-1204-lts-precise-pangolin
        disk_config: manual
        networks:
          - public
          - private
          - my-net
        region: IAD
        state: present
        count: 5
        exact_count: yes
        group: web
        wait: yes
      register: rax

    - name: Add servers to web host group
      add_host:
        hostname: "{{ item.name }}"
        ansible_host: "{{ item.rax_accessipv4 }}"
        ansible_password: "{{ item.rax_adminpass }}"
        ansible_user: root
        groups: web
      loop: "{{ rax.success }}"
      when: rax.action == 'create'

    - name: Add servers to Load balancer
      rax_clb_nodes:
        credentials: ~/.raxpub
        load_balancer_id: "{{ clb.balancer.id }}"
        address: "{{ item.rax_networks.private|first }}"
        port: 80
        condition: enabled
        type: primary
        wait: yes
        region: IAD
      loop: "{{ rax.success }}"
      when: rax.action == 'create'

- name: Configure servers
  hosts: web
  handlers:
    - name: restart nginx
      service: name=nginx state=restarted

  tasks:
    - name: Install nginx
      apt: pkg=nginx state=latest update_cache=yes cache_valid_time=86400
      notify:
        - restart nginx

    - name: Ensure nginx starts on boot
      service: name=nginx state=started enabled=yes

    - name: Create custom index.html
      copy: content="{{ inventory_hostname }}" dest=/usr/share/nginx/www/index.html
            owner=root group=root mode=0644

```
 ### RackConnect and Managed Cloud

 When using RackConnect version 2 or Rackspace Managed Cloud there are Rackspace automation tasks that are executed on the servers you create after they are successfully built. If your automation executes before the RackConnect or Managed Cloud automation, you can cause failures and unusable servers.

 These examples show creating servers, and ensuring that the Rackspace automation has completed before Ansible continues onwards.

 For simplicity, these examples are joined, however both are only needed when using RackConnect. When only using Managed Cloud, the RackConnect portion can be ignored.

 The RackConnect portions only apply to RackConnect version 2.

 #### Using a Control Machine

 
```
- name: Create an exact count of servers
  hosts: localhost
  gather_facts: False
  tasks:
    - name: Server build requests
      rax:
        credentials: ~/.raxpub
        name: web%03d.example.org
        flavor: performance1-1
        image: ubuntu-1204-lts-precise-pangolin
        disk_config: manual
        region: DFW
        state: present
        count: 1
        exact_count: yes
        group: web
        wait: yes
      register: rax

    - name: Add servers to in memory groups
      add_host:
        hostname: "{{ item.name }}"
        ansible_host: "{{ item.rax_accessipv4 }}"
        ansible_password: "{{ item.rax_adminpass }}"
        ansible_user: root
        rax_id: "{{ item.rax_id }}"
        groups: web,new_web
      loop: "{{ rax.success }}"
      when: rax.action == 'create'

- name: Wait for rackconnect and managed cloud automation to complete
  hosts: new_web
  gather_facts: false
  tasks:
    - name: ensure we run all tasks from localhost
      delegate_to: localhost
      block:
        - name: Wait for rackconnnect automation to complete
          rax_facts:
            credentials: ~/.raxpub
            id: "{{ rax_id }}"
            region: DFW
          register: rax_facts
          until: rax_facts.ansible_facts['rax_metadata']['rackconnect_automation_status']|default('') == 'DEPLOYED'
          retries: 30
          delay: 10

        - name: Wait for managed cloud automation to complete
          rax_facts:
            credentials: ~/.raxpub
            id: "{{ rax_id }}"
            region: DFW
          register: rax_facts
          until: rax_facts.ansible_facts['rax_metadata']['rax_service_level_automation']|default('') == 'Complete'
          retries: 30
          delay: 10

- name: Update new_web hosts with IP that RackConnect assigns
  hosts: new_web
  gather_facts: false
  tasks:
    - name: Get facts about servers
      rax_facts:
        name: "{{ inventory_hostname }}"
        region: DFW
      delegate_to: localhost
    - name: Map some facts
      set_fact:
        ansible_host: "{{ rax_accessipv4 }}"

- name: Base Configure Servers
  hosts: web
  roles:
    - role: users

    - role: openssh
      opensshd_PermitRootLogin: "no"

    - role: ntp

```
 #### Using Ansible Pull

 
```
---
- name: Ensure Rackconnect and Managed Cloud Automation is complete
  hosts: all
  tasks:
    - name: ensure we run all tasks from localhost
      delegate_to: localhost
      block:
        - name: Check for completed bootstrap
          stat:
            path: /etc/bootstrap_complete
          register: bootstrap

        - name: Get region
          command: xenstore-read vm-data/provider_data/region
          register: rax_region
          when: bootstrap.stat.exists != True

        - name: Wait for rackconnect automation to complete
          uri:
            url: "https://{{ rax_region.stdout|trim }}.api.rackconnect.rackspace.com/v1/automation_status?format=json"
            return_content: yes
          register: automation_status
          when: bootstrap.stat.exists != True
          until: automation_status['automation_status']|default('') == 'DEPLOYED'
          retries: 30
          delay: 10

        - name: Wait for managed cloud automation to complete
          wait_for:
            path: /tmp/rs_managed_cloud_automation_complete
            delay: 10
          when: bootstrap.stat.exists != True

        - name: Set bootstrap completed
          file:
            path: /etc/bootstrap_complete
            state: touch
            owner: root
            group: root
            mode: 0400

- name: Base Configure Servers
  hosts: all
  roles:
    - role: users

    - role: openssh
      opensshd_PermitRootLogin: "no"

    - role: ntp

```
 #### Using Ansible Pull with XenStore

 
```
---
- name: Ensure Rackconnect and Managed Cloud Automation is complete
  hosts: all
  tasks:
    - name: Check for completed bootstrap
      stat:
        path: /etc/bootstrap_complete
      register: bootstrap

    - name: Wait for rackconnect_automation_status xenstore key to exist
      command: xenstore-exists vm-data/user-metadata/rackconnect_automation_status
      register: rcas_exists
      when: bootstrap.stat.exists != True
      failed_when: rcas_exists.rc|int > 1
      until: rcas_exists.rc|int == 0
      retries: 30
      delay: 10

    - name: Wait for rackconnect automation to complete
      command: xenstore-read vm-data/user-metadata/rackconnect_automation_status
      register: rcas
      when: bootstrap.stat.exists != True
      until: rcas.stdout|replace('"', '') == 'DEPLOYED'
      retries: 30
      delay: 10

    - name: Wait for rax_service_level_automation xenstore key to exist
      command: xenstore-exists vm-data/user-metadata/rax_service_level_automation
      register: rsla_exists
      when: bootstrap.stat.exists != True
      failed_when: rsla_exists.rc|int > 1
      until: rsla_exists.rc|int == 0
      retries: 30
      delay: 10

    - name: Wait for managed cloud automation to complete
      command: xenstore-read vm-data/user-metadata/rackconnect_automation_status
      register: rsla
      when: bootstrap.stat.exists != True
      until: rsla.stdout|replace('"', '') == 'DEPLOYED'
      retries: 30
      delay: 10

    - name: Set bootstrap completed
      file:
        path: /etc/bootstrap_complete
        state: touch
        owner: root
        group: root
        mode: 0400

- name: Base Configure Servers
  hosts: all
  roles:
    - role: users

    - role: openssh
      opensshd_PermitRootLogin: "no"

    - role: ntp

```
 Advanced Usage
--------------

 ### Autoscaling with AWX or Red Hat Ansible Automation Platform

 The GUI component of [Red Hat Ansible Automation Platform](https://docs.ansible.com/ansible/3/reference_appendices/tower.html#ansible-tower "(in Ansible v3)") also contains a very nice feature for auto-scaling use cases. In this mode, a simple curl script can call a defined URL and the server will “dial out” to the requester and configure an instance that is spinning up. This can be a great way to reconfigure ephemeral nodes. See [the documentation on provisioning callbacks](https://docs.ansible.com/ansible-tower/latest/html/userguide/job_templates.html#provisioning-callbacks) for more details.

 A benefit of using the callback approach over pull mode is that job results are still centrally recorded and less information has to be shared with remote hosts.

 ### Orchestration in the Rackspace Cloud

 Ansible is a powerful orchestration tool, and rax modules allow you the opportunity to orchestrate complex tasks, deployments, and configurations. The key here is to automate provisioning of infrastructure, like any other piece of software in an environment. Complex deployments might have previously required manual manipulation of load balancers, or manual provisioning of servers. Utilizing the rax modules included with Ansible, one can make the deployment of additional nodes contingent on the current number of running nodes, or the configuration of a clustered application dependent on the number of nodes with common metadata. One could automate the following scenarios, for example:

 * Servers that are removed from a Cloud Load Balancer one-by-one, updated, verified, and returned to the load balancer pool
* Expansion of an already-online environment, where nodes are provisioned, bootstrapped, configured, and software installed
* A procedure where app log files are uploaded to a central location, like Cloud Files, before a node is decommissioned
* Servers and load balancers that have DNS records created and destroyed on creation and decommissioning, respectively



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_rax.html>

Scaleway Guide
==============

 Introduction
------------

 [Scaleway](https://scaleway.com) is a cloud provider supported by Ansible, version 2.6 or higher via a dynamic inventory plugin and modules. Those modules are:

 * [scaleway\_sshkey – Scaleway SSH keys management module](https://docs.ansible.com/ansible/2.9/modules/scaleway_sshkey_module.html#scaleway-sshkey-module "(in Ansible v2.9)"): adds a public SSH key from a file or value to the Packet infrastructure. Every subsequently-created device will have this public key installed in .ssh/authorized\_keys.
* [scaleway\_compute – Scaleway compute management module](https://docs.ansible.com/ansible/2.9/modules/scaleway_compute_module.html#scaleway-compute-module "(in Ansible v2.9)"): manages servers on Scaleway. You can use this module to create, restart and delete servers.
* [scaleway\_volume – Scaleway volumes management module](https://docs.ansible.com/ansible/2.9/modules/scaleway_volume_module.html#scaleway-volume-module "(in Ansible v2.9)"): manages volumes on Scaleway.

  Note

 This guide assumes you are familiar with Ansible and how it works. If you’re not, have a look at [ansible\_documentation](https://docs.ansible.com/ansible/3/index.html#ansible-documentation "(in Ansible v3)") before getting started.

  Requirements
------------

 The Scaleway modules and inventory script connect to the Scaleway API using [Scaleway REST API](https://developer.scaleway.com). To use the modules and inventory script you’ll need a Scaleway API token. You can generate an API token via the Scaleway console [here](https://cloud.scaleway.com/#/credentials). The simplest way to authenticate yourself is to set the Scaleway API token in an environment variable:

 
```
$ export SCW_TOKEN=00000000-1111-2222-3333-444444444444

```
 If you’re not comfortable exporting your API token, you can pass it as a parameter to the modules using the `api_token` argument.

 If you want to use a new SSH keypair in this tutorial, you can generate it to `./id_rsa` and `./id_rsa.pub` as:

 
```
$ ssh-keygen -t rsa -f ./id_rsa

```
 If you want to use an existing keypair, just copy the private and public key over to the playbook directory.

 How to add an SSH key?
----------------------

 Connection to Scaleway Compute nodes use Secure Shell. SSH keys are stored at the account level, which means that you can re-use the same SSH key in multiple nodes. The first step to configure Scaleway compute resources is to have at least one SSH key configured.

 [scaleway\_sshkey – Scaleway SSH keys management module](https://docs.ansible.com/ansible/2.9/modules/scaleway_sshkey_module.html#scaleway-sshkey-module "(in Ansible v2.9)") is a module that manages SSH keys on your Scaleway account. You can add an SSH key to your account by including the following task in a playbook:

 
```
- name: "Add SSH key"
  scaleway_sshkey:
    ssh_pub_key: "ssh-rsa AAAA..."
    state: "present"

```
 The `ssh_pub_key` parameter contains your ssh public key as a string. Here is an example inside a playbook:

 
```
- name: Test SSH key lifecycle on a Scaleway account
  hosts: localhost
  gather_facts: no
  environment:
    SCW_API_KEY: ""

  tasks:

    - scaleway_sshkey:
        ssh_pub_key: "ssh-rsa AAAAB...424242 developer@example.com"
        state: present
      register: result

    - assert:
        that:
          - result is success and result is changed

```
 How to create a compute instance?
---------------------------------

 Now that we have an SSH key configured, the next step is to spin up a server! [scaleway\_compute – Scaleway compute management module](https://docs.ansible.com/ansible/2.9/modules/scaleway_compute_module.html#scaleway-compute-module "(in Ansible v2.9)") is a module that can create, update and delete Scaleway compute instances:

 
```
- name: Create a server
  scaleway_compute:
    name: foobar
    state: present
    image: 00000000-1111-2222-3333-444444444444
    organization: 00000000-1111-2222-3333-444444444444
    region: ams1
    commercial_type: START1-S

```
 Here are the parameter details for the example shown above:

 * `name` is the name of the instance (the one that will show up in your web console).
* `image` is the UUID of the system image you would like to use. A list of all images is available for each availability zone.
* `organization` represents the organization that your account is attached to.
* `region` represents the Availability Zone which your instance is in (for this example, par1 and ams1).
* `commercial_type` represents the name of the commercial offers. You can check out the Scaleway pricing page to find which instance is right for you.

 Take a look at this short playbook to see a working example using `scaleway_compute`:

 
```
- name: Test compute instance lifecycle on a Scaleway account
  hosts: localhost
  gather_facts: no
  environment:
    SCW_API_KEY: ""

  tasks:

    - name: Create a server
      register: server_creation_task
      scaleway_compute:
        name: foobar
        state: present
        image: 00000000-1111-2222-3333-444444444444
        organization: 00000000-1111-2222-3333-444444444444
        region: ams1
        commercial_type: START1-S
        wait: true

    - debug: var=server_creation_task

    - assert:
        that:
          - server_creation_task is success
          - server_creation_task is changed

    - name: Run it
      scaleway_compute:
        name: foobar
        state: running
        image: 00000000-1111-2222-3333-444444444444
        organization: 00000000-1111-2222-3333-444444444444
        region: ams1
        commercial_type: START1-S
        wait: true
        tags:
          - web_server
      register: server_run_task

    - debug: var=server_run_task

    - assert:
        that:
          - server_run_task is success
          - server_run_task is changed

```
 Dynamic Inventory Script
------------------------

 Ansible ships with [scaleway – Scaleway inventory source](https://docs.ansible.com/ansible/2.9/plugins/inventory/scaleway.html#scaleway-inventory "(in Ansible v2.9)"). You can now get a complete inventory of your Scaleway resources through this plugin and filter it on different parameters (`regions` and `tags` are currently supported).

 Let’s create an example! Suppose that we want to get all hosts that got the tag web\_server. Create a file named `scaleway_inventory.yml` with the following content:

 
```
plugin: scaleway
regions:
  - ams1
  - par1
tags:
  - web_server

```
 This inventory means that we want all hosts that got the tag `web_server` on the zones `ams1` and `par1`. Once you have configured this file, you can get the information using the following command:

 
```
$ ansible-inventory --list -i scaleway_inventory.yml

```
 The output will be:

 
```
{
    "_meta": {
        "hostvars": {
            "dd8e3ae9-0c7c-459e-bc7b-aba8bfa1bb8d": {
                "ansible_verbosity": 6,
                "arch": "x86_64",
                "commercial_type": "START1-S",
                "hostname": "foobar",
                "ipv4": "192.0.2.1",
                "organization": "00000000-1111-2222-3333-444444444444",
                "state": "running",
                "tags": [
                    "web_server"
                ]
            }
        }
    },
    "all": {
        "children": [
            "ams1",
            "par1",
            "ungrouped",
            "web_server"
        ]
    },
    "ams1": {},
    "par1": {
        "hosts": [
            "dd8e3ae9-0c7c-459e-bc7b-aba8bfa1bb8d"
        ]
    },
    "ungrouped": {},
    "web_server": {
        "hosts": [
            "dd8e3ae9-0c7c-459e-bc7b-aba8bfa1bb8d"
        ]
    }
}

```
 As you can see, we get different groups of hosts. `par1` and `ams1` are groups based on location. `web_server` is a group based on a tag.

 In case a filter parameter is not defined, the plugin supposes all values possible are wanted. This means that for each tag that exists on your Scaleway compute nodes, a group based on each tag will be created.

 Scaleway S3 object storage
--------------------------

 [Object Storage](https://www.scaleway.com/object-storage) allows you to store any kind of objects (documents, images, videos, and so on). As the Scaleway API is S3 compatible, Ansible supports it natively through the modules: [s3\_bucket – Manage S3 buckets in AWS, DigitalOcean, Ceph, Walrus and FakeS3](https://docs.ansible.com/ansible/2.9/modules/s3_bucket_module.html#s3-bucket-module "(in Ansible v2.9)"), [aws\_s3 – manage objects in S3](https://docs.ansible.com/ansible/2.9/modules/aws_s3_module.html#aws-s3-module "(in Ansible v2.9)").

 You can find many examples in the [scaleway\_s3 integration tests](https://github.com/ansible/ansible-legacy-tests/tree/devel/test/legacy/roles/scaleway_s3).

 
```
- hosts: myserver
  vars:
    scaleway_region: nl-ams
    s3_url: https://s3.nl-ams.scw.cloud
  environment:
    # AWS_ACCESS_KEY matches your scaleway organization id available at https://cloud.scaleway.com/#/account
    AWS_ACCESS_KEY: 00000000-1111-2222-3333-444444444444
    # AWS_SECRET_KEY matches a secret token that you can retrieve at https://cloud.scaleway.com/#/credentials
    AWS_SECRET_KEY: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
  module_defaults:
    group/aws:
      s3_url: '{{ s3_url }}'
      region: '{{ scaleway_region }}'
  tasks:
   # use a fact instead of a variable, otherwise template is evaluate each time variable is used
    - set_fact:
        bucket_name: "{{ 99999999 | random | to_uuid }}"

    # "requester_pays:" is mandatory because Scaleway doesn't implement related API
    # another way is to use aws_s3 and "mode: create" !
    - s3_bucket:
        name: '{{ bucket_name }}'
        requester_pays:

    - name: Another way to create the bucket
      aws_s3:
        bucket: '{{ bucket_name }}'
        mode: create
        encrypt: false
      register: bucket_creation_check

    - name: add something in the bucket
      aws_s3:
        mode: put
        bucket: '{{ bucket_name }}'
        src: /tmp/test.txt  #  needs to be created before
        object: test.txt
        encrypt: false  # server side encryption must be disabled

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_scaleway.html>

VMware Guide
============

 Welcome to the Ansible for VMware Guide!

 The purpose of this guide is to teach you everything you need to know about using Ansible with VMware.

 To get started, please select one of the following topics.

 * [Introduction to Ansible for VMware](vmware_scenarios/vmware_intro)
* [Ansible for VMware Concepts](vmware_scenarios/vmware_concepts)
* [VMware Prerequisites](vmware_scenarios/vmware_requirements)
* [Using VMware dynamic inventory plugin](vmware_scenarios/vmware_inventory)
* [Using Virtual machine attributes in VMware dynamic inventory plugin](vmware_scenarios/vmware_inventory_vm_attributes)
* [Using VMware dynamic inventory plugin - Hostnames](vmware_scenarios/vmware_inventory_hostnames)
* [Using VMware dynamic inventory plugin - Filters](vmware_scenarios/vmware_inventory_filters)
* [Ansible for VMware Scenarios](vmware_scenarios/vmware_scenarios)
* [Troubleshooting Ansible for VMware](vmware_scenarios/vmware_troubleshooting)
* [Other useful VMware resources](vmware_scenarios/vmware_external_doc_links)
* [Ansible VMware FAQ](vmware_scenarios/faq)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_vmware.html>

Controlling where tasks run: delegation and local actions
=========================================================

 By default Ansible gathers facts and executes all tasks on the machines that match the `hosts` line of your playbook. This page shows you how to delegate tasks to a different machine or group, delegate facts to specific machines or groups, or run an entire playbook locally. Using these approaches, you can manage inter-related environments precisely and efficiently. For example, when updating your webservers, you might need to remove them from a load-balanced pool temporarily. You cannot perform this task on the webservers themselves. By delegating the task to localhost, you keep all the tasks within the same play.

 * [Tasks that cannot be delegated](#tasks-that-cannot-be-delegated)
* [Delegating tasks](#delegating-tasks)
* [Delegating facts](#delegating-facts)
* [Local playbooks](#local-playbooks)

 Tasks that cannot be delegated
------------------------------

 Some tasks always execute on the controller. These tasks, including `include`, `add_host`, and `debug`, cannot be delegated.

 Delegating tasks
----------------

 If you want to perform a task on one host with reference to other hosts, use the `delegate_to` keyword on a task. This is ideal for managing nodes in a load balanced pool or for controlling outage windows. You can use delegation with the [serial](playbooks_strategies#rolling-update-batch-size) keyword to control the number of hosts executing at one time:

 
```
---
- hosts: webservers
  serial: 5

  tasks:
    - name: Take out of load balancer pool
      ansible.builtin.command: /usr/bin/take_out_of_pool {{ inventory_hostname }}
      delegate_to: 127.0.0.1

    - name: Actual steps would go here
      ansible.builtin.yum:
        name: acme-web-stack
        state: latest

    - name: Add back to load balancer pool
      ansible.builtin.command: /usr/bin/add_back_to_pool {{ inventory_hostname }}
      delegate_to: 127.0.0.1

```
 The first and third tasks in this play run on 127.0.0.1, which is the machine running Ansible. There is also a shorthand syntax that you can use on a per-task basis: `local_action`. Here is the same playbook as above, but using the shorthand syntax for delegating to 127.0.0.1:

 
```
---
# ...

  tasks:
    - name: Take out of load balancer pool
      local_action: ansible.builtin.command /usr/bin/take_out_of_pool {{ inventory_hostname }}

# ...

    - name: Add back to load balancer pool
      local_action: ansible.builtin.command /usr/bin/add_back_to_pool {{ inventory_hostname }}

```
 You can use a local action to call ‘rsync’ to recursively copy files to the managed servers:

 
```
---
# ...

  tasks:
    - name: Recursively copy files from management server to target
      local_action: ansible.builtin.command rsync -a /path/to/files {{ inventory_hostname }}:/path/to/target/

```
 Note that you must have passphrase-less SSH keys or an ssh-agent configured for this to work, otherwise rsync asks for a passphrase.

 To specify more arguments, use the following syntax:

 
```
---
# ...

  tasks:
    - name: Send summary mail
      local_action:
        module: community.general.mail
        subject: "Summary Mail"
        to: "{{ mail_recipient }}"
        body: "{{ mail_body }}"
      run_once: True

```
 The `ansible_host` variable reflects the host a task is delegated to.

 Delegating facts
----------------

 Delegating Ansible tasks is like delegating tasks in the real world - your groceries belong to you, even if someone else delivers them to your home. Similarly, any facts gathered by a delegated task are assigned by default to the `inventory_hostname` (the current host), not to the host which produced the facts (the delegated to host). To assign gathered facts to the delegated host instead of the current host, set `delegate_facts` to `true`:

 
```
---
- hosts: app_servers

  tasks:
    - name: Gather facts from db servers
      ansible.builtin.setup:
      delegate_to: "{{ item }}"
      delegate_facts: true
      loop: "{{ groups['dbservers'] }}"

```
 This task gathers facts for the machines in the dbservers group and assigns the facts to those machines, even though the play targets the app\_servers group. This way you can lookup `hostvars[‘dbhost1’][‘ansible_default_ipv4’][‘address’]` even though dbservers were not part of the play, or left out by using `–limit`.

 Local playbooks
---------------

 It may be useful to use a playbook locally on a remote host, rather than by connecting over SSH. This can be useful for assuring the configuration of a system by putting a playbook in a crontab. This may also be used to run a playbook inside an OS installer, such as an Anaconda kickstart.

 To run an entire playbook locally, just set the `hosts:` line to `hosts: 127.0.0.1` and then run the playbook like so:

 
```
ansible-playbook playbook.yml --connection=local

```
 Alternatively, a local connection can be used in a single playbook play, even if other plays in the playbook use the default remote connection type:

 
```
---
- hosts: 127.0.0.1
  connection: local

```
  Note

 If you set the connection to local and there is no ansible\_python\_interpreter set, modules will run under /usr/bin/python and not under {{ ansible\_playbook\_python }}. Be sure to set ansible\_python\_interpreter: “{{ ansible\_playbook\_python }}” in host\_vars/localhost.yml, for example. You can avoid this issue by using `local_action` or `delegate_to: localhost` instead.

   See also

  [Intro to playbooks](playbooks_intro#playbooks-intro)

An introduction to playbooks

  [Controlling playbook execution: strategies and more](playbooks_strategies#playbooks-strategies)

More ways to control how and where Ansible executes

  [Ansible Examples on GitHub](https://github.com/ansible/ansible-examples)

Many examples of full-stack deployments

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_delegation.html>

Working with playbooks
======================

 Playbooks record and execute Ansible’s configuration, deployment, and orchestration functions. They can describe a policy you want your remote systems to enforce, or a set of steps in a general IT process.

 If Ansible modules are the tools in your workshop, playbooks are your instruction manuals, and your inventory of hosts are your raw material.

 At a basic level, playbooks can be used to manage configurations of and deployments to remote machines. At a more advanced level, they can sequence multi-tier rollouts involving rolling updates, and can delegate actions to other hosts, interacting with monitoring servers and load balancers along the way.

 Playbooks are designed to be human-readable and are developed in a basic text language. There are multiple ways to organize playbooks and the files they include, and we’ll offer up some suggestions on that and making the most out of Ansible.

 You should look at [Example Playbooks](https://github.com/ansible/ansible-examples) while reading along with the playbook documentation. These illustrate best practices as well as how to put many of the various concepts together.

 * [Templating (Jinja2)](playbooks_templating)
	+ [Using filters to manipulate data](playbooks_filters)
	+ [Tests](playbooks_tests)
	+ [Lookups](playbooks_lookups)
	+ [Python3 in templates](playbooks_python_version)
	+ [Get the current time](playbooks_templating#get-the-current-time)
* [Advanced playbooks features](playbooks_special_topics)
* [Playbook Example: Continuous Delivery and Rolling Upgrades](guide_rolling_upgrade)
	+ [What is continuous delivery?](guide_rolling_upgrade#what-is-continuous-delivery)
	+ [Site deployment](guide_rolling_upgrade#site-deployment)
	+ [Reusable content: roles](guide_rolling_upgrade#reusable-content-roles)
	+ [Configuration: group variables](guide_rolling_upgrade#configuration-group-variables)
	+ [The rolling upgrade](guide_rolling_upgrade#the-rolling-upgrade)
	+ [Managing other load balancers](guide_rolling_upgrade#managing-other-load-balancers)
	+ [Continuous delivery end-to-end](guide_rolling_upgrade#continuous-delivery-end-to-end)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks.html>

Docker Guide
============

 The content on this page has moved. Please see the updated [Docker Guide](../collections/community/docker/docsite/scenario_guide#ansible-collections-community-docker-docsite-scenario-guide) in the [community.docker collection](https://galaxy.ansible.com/community/docker).



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_docker.html>

Ansible concepts
================

 These concepts are common to all uses of Ansible. You need to understand them to use Ansible for any kind of automation. This basic introduction provides the background you need to follow the rest of the User Guide.

 * [Control node](#control-node)
* [Managed nodes](#managed-nodes)
* [Inventory](#inventory)
* [Collections](#collections)
* [Modules](#modules)
* [Tasks](#tasks)
* [Playbooks](#playbooks)

 Control node
------------

 Any machine with Ansible installed. You can run Ansible commands and playbooks by invoking the `ansible` or `ansible-playbook` command from any control node. You can use any computer that has a Python installation as a control node - laptops, shared desktops, and servers can all run Ansible. However, you cannot use a Windows machine as a control node. You can have multiple control nodes.

 Managed nodes
-------------

 The network devices (and/or servers) you manage with Ansible. Managed nodes are also sometimes called “hosts”. Ansible is not installed on managed nodes.

 Inventory
---------

 A list of managed nodes. An inventory file is also sometimes called a “hostfile”. Your inventory can specify information like IP address for each managed node. An inventory can also organize managed nodes, creating and nesting groups for easier scaling. To learn more about inventory, see [the Working with Inventory](intro_inventory#intro-inventory) section.

 Collections
-----------

 Collections are a distribution format for Ansible content that can include playbooks, roles, modules, and plugins. You can install and use collections through [Ansible Galaxy](https://galaxy.ansible.com). To learn more about collections, see [Using collections](collections_using#collections).

 Modules
-------

 The units of code Ansible executes. Each module has a particular use, from administering users on a specific type of database to managing VLAN interfaces on a specific type of network device. You can invoke a single module with a task, or invoke several different modules in a playbook. Starting in Ansible 2.10, modules are grouped in collections. For an idea of how many collections Ansible includes, take a look at the [Collection Index](../collections/index#list-of-collections).

 Tasks
-----

 The units of action in Ansible. You can execute a single task once with an ad hoc command.

 Playbooks
---------

 Ordered lists of tasks, saved so you can run those tasks in that order repeatedly. Playbooks can include variables as well as tasks. Playbooks are written in YAML and are easy to read, write, share and understand. To learn more about playbooks, see [Intro to playbooks](playbooks_intro#about-playbooks).



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/basic_concepts.html>

VMware REST Scenarios
=====================

 These scenarios teach you how to accomplish common VMware tasks using the REST API and the Ansible `vmware.vmware_rest` collection. To get started, please select the task you want to accomplish.

 * [How to install the vmware\_rest collection](vmware_rest_scenarios/installation)
* [How to configure the vmware\_rest collection](vmware_rest_scenarios/authentication)
* [How to collect information about your environment](vmware_rest_scenarios/collect_information)
* [How to create a Virtual Machine](vmware_rest_scenarios/create_vm)
* [Retrieve information from a specific VM](vmware_rest_scenarios/vm_info)
* [How to modify a virtual machine](vmware_rest_scenarios/vm_hardware_tuning)
* [How to run a virtual machine](vmware_rest_scenarios/run_a_vm)
* [How to get information from a running virtual machine](vmware_rest_scenarios/vm_tool_information)
* [How to configure the VMware tools of a running virtual machine](vmware_rest_scenarios/vm_tool_configuration)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_vmware_rest.html>

Infoblox Guide
==============

 * [Prerequisites](#prerequisites)
* [Credentials and authenticating](#credentials-and-authenticating)
* [NIOS lookup plugins](#nios-lookup-plugins)


	+ [Retrieving all network views](#retrieving-all-network-views)
	+ [Retrieving a host record](#retrieving-a-host-record)
* [Use cases with modules](#use-cases-with-modules)


	+ [Configuring an IPv4 network](#configuring-an-ipv4-network)
	+ [Creating a host record](#creating-a-host-record)
	+ [Creating a forward DNS zone](#creating-a-forward-dns-zone)
	+ [Creating a reverse DNS zone](#creating-a-reverse-dns-zone)
* [Dynamic inventory script](#dynamic-inventory-script)


This guide describes how to use Ansible with the Infoblox Network Identity Operating System (NIOS). With Ansible integration, you can use Ansible playbooks to automate Infoblox Core Network Services for IP address management (IPAM), DNS, and inventory tracking.

 You can review simple example tasks in the documentation for any of the [NIOS modules](https://docs.ansible.com/ansible/2.9/modules/list_of_net_tools_modules.html#nios-net-tools-modules "(in Ansible v2.9)") or look at the [Use cases with modules](#use-cases-with-modules) section for more elaborate examples. See the [Infoblox](https://www.infoblox.com/) website for more information on the Infoblox product.

  Note

 You can retrieve most of the example playbooks used in this guide from the [network-automation/infoblox\_ansible](https://github.com/network-automation/infoblox_ansible) GitHub repository.

  Prerequisites
-------------

 Before using Ansible `nios` modules with Infoblox, you must install the `infoblox-client` on your Ansible control node:

 
```
$ sudo pip install infoblox-client

```
  Note

 You need an NIOS account with the WAPI feature enabled to use Ansible with Infoblox.

  Credentials and authenticating
------------------------------

 To use Infoblox `nios` modules in playbooks, you need to configure the credentials to access your Infoblox system. The examples in this guide use credentials stored in `<playbookdir>/group_vars/nios.yml`. Replace these values with your Infoblox credentials:

 
```
---
nios_provider:
  host: 192.0.0.2
  username: admin
  password: ansible

```
 NIOS lookup plugins
-------------------

 Ansible includes the following lookup plugins for NIOS:

 * [nios](https://docs.ansible.com/ansible/2.9/plugins/lookup/nios.html#nios-lookup "(in Ansible v2.9)") Uses the Infoblox WAPI API to fetch NIOS specified objects, for example network views, DNS views, and host records.
* [nios\_next\_ip](https://docs.ansible.com/ansible/2.9/plugins/lookup/nios_next_ip.html#nios-next-ip-lookup "(in Ansible v2.9)") Provides the next available IP address from a network. You’ll see an example of this in [Creating a host record](#creating-a-host-record).
* [nios\_next\_network](https://docs.ansible.com/ansible/2.9/plugins/lookup/nios_next_network.html#nios-next-network-lookup "(in Ansible v2.9)") - Returns the next available network range for a network-container.

 You must run the NIOS lookup plugins locally by specifying `connection: local`. See [lookup plugins](../plugins/lookup#lookup-plugins) for more detail.

 ### Retrieving all network views

 To retrieve all network views and save them in a variable, use the [set\_fact](../collections/ansible/builtin/set_fact_module#set-fact-module) module with the [nios](https://docs.ansible.com/ansible/2.9/plugins/lookup/nios.html#nios-lookup "(in Ansible v2.9)") lookup plugin:

 
```
---
- hosts: nios
  connection: local
  tasks:
    - name: fetch all networkview objects
      set_fact:
        networkviews: "{{ lookup('nios', 'networkview', provider=nios_provider) }}"

    - name: check the networkviews
      debug:
        var: networkviews

```
 ### Retrieving a host record

 To retrieve a set of host records, use the `set_fact` module with the `nios` lookup plugin and include a filter for the specific hosts you want to retrieve:

 
```
---
- hosts: nios
  connection: local
  tasks:
    - name: fetch host leaf01
      set_fact:
         host: "{{ lookup('nios', 'record:host', filter={'name': 'leaf01.ansible.com'}, provider=nios_provider) }}"

    - name: check the leaf01 return variable
      debug:
        var: host

    - name: debug specific variable (ipv4 address)
      debug:
        var: host.ipv4addrs[0].ipv4addr

    - name: fetch host leaf02
      set_fact:
        host: "{{ lookup('nios', 'record:host', filter={'name': 'leaf02.ansible.com'}, provider=nios_provider) }}"

    - name: check the leaf02 return variable
      debug:
        var: host

```
 If you run this `get_host_record.yml` playbook, you should see results similar to the following:

 
```
$ ansible-playbook get_host_record.yml

PLAY [localhost] ***************************************************************************************

TASK [fetch host leaf01] ******************************************************************************
ok: [localhost]

TASK [check the leaf01 return variable] *************************************************************
ok: [localhost] => {
< ...output shortened...>
    "host": {
        "ipv4addrs": [
            {
                "configure_for_dhcp": false,
                "host": "leaf01.ansible.com",
            }
        ],
        "name": "leaf01.ansible.com",
        "view": "default"
    }
}

TASK [debug specific variable (ipv4 address)] ******************************************************
ok: [localhost] => {
    "host.ipv4addrs[0].ipv4addr": "192.168.1.11"
}

TASK [fetch host leaf02] ******************************************************************************
ok: [localhost]

TASK [check the leaf02 return variable] *************************************************************
ok: [localhost] => {
< ...output shortened...>
    "host": {
        "ipv4addrs": [
            {
                "configure_for_dhcp": false,
                "host": "leaf02.example.com",
                "ipv4addr": "192.168.1.12"
            }
        ],
    }
}

PLAY RECAP ******************************************************************************************
localhost                  : ok=5    changed=0    unreachable=0    failed=0

```
 The output above shows the host record for `leaf01.ansible.com` and `leaf02.ansible.com` that were retrieved by the `nios` lookup plugin. This playbook saves the information in variables which you can use in other playbooks. This allows you to use Infoblox as a single source of truth to gather and use information that changes dynamically. See [Using Variables](../user_guide/playbooks_variables#playbooks-variables) for more information on using Ansible variables. See the [nios](https://docs.ansible.com/ansible/2.9/plugins/lookup/nios.html#nios-lookup "(in Ansible v2.9)") examples for more data options that you can retrieve.

 You can access these playbooks at [Infoblox lookup playbooks](https://github.com/network-automation/infoblox_ansible/tree/master/lookup_playbooks).

 Use cases with modules
----------------------

 You can use the `nios` modules in tasks to simplify common Infoblox workflows. Be sure to set up your [NIOS credentials](#nios-credentials) before following these examples.

 ### Configuring an IPv4 network

 To configure an IPv4 network, use the [nios\_network](https://docs.ansible.com/ansible/2.9/modules/nios_network_module.html#nios-network-module "(in Ansible v2.9)") module:

 
```
---
- hosts: nios
  connection: local
  tasks:
    - name: Create a network on the default network view
      nios_network:
        network: 192.168.100.0/24
        comment: sets the IPv4 network
        options:
          - name: domain-name
            value: ansible.com
        state: present
        provider: "{{nios_provider}}"

```
 Notice the last parameter, `provider`, uses the variable `nios_provider` defined in the `group_vars/` directory.

 ### Creating a host record

 To create a host record named `leaf03.ansible.com` on the newly-created IPv4 network:

 
```
---
- hosts: nios
  connection: local
  tasks:
    - name: configure an IPv4 host record
      nios_host_record:
        name: leaf03.ansible.com
        ipv4addrs:
          - ipv4addr:
              "{{ lookup('nios_next_ip', '192.168.100.0/24', provider=nios_provider)[0] }}"
        state: present
provider: "{{nios_provider}}"

```
 Notice the IPv4 address in this example uses the [nios\_next\_ip](https://docs.ansible.com/ansible/2.9/plugins/lookup/nios_next_ip.html#nios-next-ip-lookup "(in Ansible v2.9)") lookup plugin to find the next available IPv4 address on the network.

 ### Creating a forward DNS zone

 To configure a forward DNS zone use, the `nios_zone` module:

 
```
---
- hosts: nios
  connection: local
  tasks:
    - name: Create a forward DNS zone called ansible-test.com
      nios_zone:
        name: ansible-test.com
        comment: local DNS zone
        state: present
        provider: "{{ nios_provider }}"

```
 ### Creating a reverse DNS zone

 To configure a reverse DNS zone:

 
```
---
- hosts: nios
  connection: local
  tasks:
    - name: configure a reverse mapping zone on the system using IPV6 zone format
      nios_zone:
        name: 100::1/128
        zone_format: IPV6
        state: present
        provider: "{{ nios_provider }}"

```
 Dynamic inventory script
------------------------

 You can use the Infoblox dynamic inventory script to import your network node inventory with Infoblox NIOS. To gather the inventory from Infoblox, you need two files:

 * [infoblox.yaml](https://raw.githubusercontent.com/ansible-community/contrib-scripts/main/inventory/infoblox.yaml) - A file that specifies the NIOS provider arguments and optional filters.
* [infoblox.py](https://raw.githubusercontent.com/ansible-community/contrib-scripts/main/inventory/infoblox.py) - The python script that retrieves the NIOS inventory.

  Note

 Please note that the inventory script only works when Ansible 2.9, 2.10 or 3 have been installed. The inventory script will eventually be removed from [community.general](https://galaxy.ansible.com/community/general), and will not work if `community.general` is only installed with `ansible-galaxy collection install`. Please use the inventory plugin from [infoblox.nios\_modules](https://galaxy.ansible.com/infoblox/nios_modules) instead.

  To use the Infoblox dynamic inventory script:

 1. Download the `infoblox.yaml` file and save it in the `/etc/ansible` directory.
2. Modify the `infoblox.yaml` file with your NIOS credentials.
3. Download the `infoblox.py` file and save it in the `/etc/ansible/hosts` directory.
4. Change the permissions on the `infoblox.py` file to make the file an executable:

 
```
$ sudo chmod +x /etc/ansible/hosts/infoblox.py

```
 You can optionally use `./infoblox.py --list` to test the script. After a few minutes, you should see your Infoblox inventory in JSON format. You can explicitly use the Infoblox dynamic inventory script as follows:

 
```
$ ansible -i infoblox.py all -m ping

```
 You can also implicitly use the Infoblox dynamic inventory script by including it in your inventory directory (`etc/ansible/hosts` by default). See [Working with dynamic inventory](../user_guide/intro_dynamic_inventory#dynamic-inventory) for more details.

  See also

  [Infoblox website](https://www.infoblox.com//)

The Infoblox website

  [Infoblox and Ansible Deployment Guide](https://www.infoblox.com/resources/deployment-guides/infoblox-and-ansible-integration)

The deployment guide for Ansible integration provided by Infoblox.

  [Infoblox Integration in Ansible 2.5](https://www.ansible.com/blog/infoblox-integration-in-ansible-2.5)

Ansible blog post about Infoblox.

  [Ansible NIOS modules](https://docs.ansible.com/ansible/2.9/modules/list_of_net_tools_modules.html#nios-net-tools-modules "(in Ansible v2.9)")

The list of supported NIOS modules, with examples.

  [Infoblox Ansible Examples](https://github.com/network-automation/infoblox_ansible)

Infoblox example playbooks.

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_infoblox.html>

Kubernetes Guide
================

 Welcome to the Ansible for Kubernetes Guide!

 The purpose of this guide is to teach you everything you need to know about using Ansible with Kubernetes.

 To get started, please select one of the following topics.

 * [Introduction to Ansible for Kubernetes](kubernetes_scenarios/k8s_intro)
* [Using Kubernetes dynamic inventory plugin](kubernetes_scenarios/k8s_inventory)
* [Ansible for Kubernetes Scenarios](kubernetes_scenarios/k8s_scenarios)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_kubernetes.html>

Getting Started
===============

 Now that you have read the [installation guide](../installation_guide/intro_installation#installation-guide) and installed Ansible on a control node, you are ready to learn how Ansible works. A basic Ansible command or playbook:

 * selects machines to execute against from inventory
* connects to those machines (or network devices, or other managed nodes), usually over SSH
* copies one or more modules to the remote machines and starts execution there

 Ansible can do much more, but you should understand the most common use case before exploring all the powerful configuration, deployment, and orchestration features of Ansible. This page illustrates the basic process with a simple inventory and an ad hoc command. Once you understand how Ansible works, you can read more details about [ad hoc commands](intro_adhoc#intro-adhoc), organize your infrastructure with [inventory](intro_inventory#intro-inventory), and harness the full power of Ansible with [playbooks](playbooks_intro#playbooks-intro).

 * [Selecting machines from inventory](#selecting-machines-from-inventory)


	+ [Action: create a basic inventory](#action-create-a-basic-inventory)
	+ [Beyond the basics](#beyond-the-basics)
* [Connecting to remote nodes](#connecting-to-remote-nodes)


	+ [Action: check your SSH connections](#action-check-your-ssh-connections)
	+ [Beyond the basics](#id1)
* [Copying and executing modules](#copying-and-executing-modules)


	+ [Action: run your first Ansible commands](#action-run-your-first-ansible-commands)
	+ [Action: Run your first playbook](#action-run-your-first-playbook)
	+ [Beyond the basics](#id2)
* [Resources](#resources)
* [Next steps](#next-steps)

 Selecting machines from inventory
---------------------------------

 Ansible reads information about which machines you want to manage from your inventory. Although you can pass an IP address to an ad hoc command, you need inventory to take advantage of the full flexibility and repeatability of Ansible.

 ### Action: create a basic inventory

 For this basic inventory, edit (or create) `/etc/ansible/hosts` and add a few remote systems to it. For this example, use either IP addresses or FQDNs:

 
```
192.0.2.50
aserver.example.org
bserver.example.org

```
 ### Beyond the basics

 Your inventory can store much more than IPs and FQDNs. You can create [aliases](intro_inventory#inventory-aliases), set variable values for a single host with [host vars](intro_inventory#host-variables), or set variable values for multiple hosts with [group vars](intro_inventory#group-variables).

 Connecting to remote nodes
--------------------------

 Ansible communicates with remote machines over the [SSH protocol](https://www.ssh.com/ssh/protocol/). By default, Ansible uses native OpenSSH and connects to remote machines using your current user name, just as SSH does.

 ### Action: check your SSH connections

 Confirm that you can connect using SSH to all the nodes in your inventory using the same username. If necessary, add your public SSH key to the `authorized_keys` file on those systems.

 ### Beyond the basics

 You can override the default remote user name in several ways, including:

 * passing the `-u` parameter at the command line
* setting user information in your inventory file
* setting user information in your configuration file
* setting environment variables

 See [Controlling how Ansible behaves: precedence rules](../reference_appendices/general_precedence#general-precedence-rules) for details on the (sometimes unintuitive) precedence of each method of passing user information. You can read more about connections in [Connection methods and details](connection_details#connections).

 Copying and executing modules
-----------------------------

 Once it has connected, Ansible transfers the modules required by your command or playbook to the remote machine(s) for execution.

 ### Action: run your first Ansible commands

 Use the ping module to ping all the nodes in your inventory:

 
```
$ ansible all -m ping

```
 You should see output for each host in your inventory, similar to this:

 
```
aserver.example.org | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "ping": "pong"
}

```
 You can use `-u` as one way to specify the user to connect as, by default Ansible uses SSH, which defaults to the ‘current user’.

 Now run a live command on all of your nodes:

 
```
$ ansible all -a "/bin/echo hello"

```
 You should see output for each host in your inventory, similar to this:

 
```
aserver.example.org | CHANGED | rc=0 >>
hello

```
 ### Action: Run your first playbook

 Playbooks are used to pull together tasks into reusable units.

 Ansible does not store playbooks for you; they are simply YAML documents that you store and manage, passing them to Ansible to run as needed.

 In a directory of your choice you can create your first playbook in a file called mytask.yml:

 
```
---
- name: My task
  hosts: all
  tasks:
     - name: Leaving a mark
       command: "touch /tmp/ansible_was_here"

```
 You can run this command as follows:

 
```
$ ansible-playbook mytask.yaml

```
 and may see output like this:

 
```
PLAY [My task] **************************************************************************************************************************

TASK [Gathering Facts] ******************************************************************************************************************
ok: [aserver.example.org]
ok: [aserver.example.org]
ok: [192.0.2.50]
fatal: [192.0.2.50]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: connect to host 192.0.2.50 port 22: No route to host", "unreachable": true}

TASK [Leaving a mark] *******************************************************************************************************************
[WARNING]: Consider using the file module with state=touch rather than running 'touch'.  If you need to use command because file is
insufficient you can add 'warn: false' to this command task or set 'command_warnings=False' in ansible.cfg to get rid of this message.
changed: [aserver.example.org]
changed: [bserver.example.org]

PLAY RECAP ******************************************************************************************************************************
aserver.example.org        : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
bserver.example.org        : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
192.0.2.50                 : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0

```
 Read on to learn more about controlling which nodes your playbooks execute on, more sophisticated tasks, and the meaning of the output.

 ### Beyond the basics

 By default Ansible uses SFTP to transfer files. If the machine or device you want to manage does not support SFTP, you can switch to SCP mode in [Configuring Ansible](../installation_guide/intro_configuration#intro-configuration). The files are placed in a temporary directory and executed from there.

 If you need privilege escalation (sudo and similar) to run a command, pass the `become` flags:

 
```
# as bruce
$ ansible all -m ping -u bruce
# as bruce, sudoing to root (sudo is default method)
$ ansible all -m ping -u bruce --become
# as bruce, sudoing to batman
$ ansible all -m ping -u bruce --become --become-user batman

```
 You can read more about privilege escalation in [Understanding privilege escalation: become](become#become).

 Congratulations! You have contacted your nodes using Ansible. You used a basic inventory file and an ad hoc command to direct Ansible to connect to specific remote nodes, copy a module file there and execute it, and return output. You have a fully working infrastructure.

 Resources
---------

 * [Product Demos](https://github.com/ansible/product-demos)
* [Katakoda](https://katacoda.com/rhel-labs)
* [Workshops](https://github.com/ansible/workshops)
* [Ansible Examples](https://github.com/ansible/ansible-examples)
* [Ansible Baseline](https://github.com/ansible/ansible-baseline)

 Next steps
----------

 Next you can read about more real-world cases in [Introduction to ad hoc commands](intro_adhoc#intro-adhoc), explore what you can do with different modules, or read about the Ansible [Working with playbooks](playbooks#working-with-playbooks) language. Ansible is not just about running commands, it also has powerful configuration management and deployment features.

  See also

  [How to build your inventory](intro_inventory#intro-inventory)

More information about inventory

  [Introduction to ad hoc commands](intro_adhoc#intro-adhoc)

Examples of basic commands

  [Working with playbooks](playbooks#working-with-playbooks)

Learning Ansible’s configuration management language

  [Ansible Demos](https://github.com/ansible/product-demos)

Demonstrations of different Ansible usecases

  [RHEL Labs](https://katacoda.com/rhel-labs)

Labs to provide further knowledge on different topics

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/intro_getting_started.html>

Error handling in playbooks
===========================

 When Ansible receives a non-zero return code from a command or a failure from a module, by default it stops executing on that host and continues on other hosts. However, in some circumstances you may want different behavior. Sometimes a non-zero return code indicates success. Sometimes you want a failure on one host to stop execution on all hosts. Ansible provides tools and settings to handle these situations and help you get the behavior, output, and reporting you want.

 * [Ignoring failed commands](#ignoring-failed-commands)
* [Ignoring unreachable host errors](#ignoring-unreachable-host-errors)
* [Resetting unreachable hosts](#resetting-unreachable-hosts)
* [Handlers and failure](#handlers-and-failure)
* [Defining failure](#defining-failure)
* [Defining “changed”](#defining-changed)
* [Ensuring success for command and shell](#ensuring-success-for-command-and-shell)
* [Aborting a play on all hosts](#aborting-a-play-on-all-hosts)


	+ [Aborting on the first error: any\_errors\_fatal](#aborting-on-the-first-error-any-errors-fatal)
	+ [Setting a maximum failure percentage](#setting-a-maximum-failure-percentage)
* [Controlling errors in blocks](#controlling-errors-in-blocks)

 Ignoring failed commands
------------------------

 By default Ansible stops executing tasks on a host when a task fails on that host. You can use `ignore_errors` to continue on in spite of the failure:

 
```
- name: Do not count this as a failure
  ansible.builtin.command: /bin/false
  ignore_errors: yes

```
 The `ignore_errors` directive only works when the task is able to run and returns a value of ‘failed’. It does not make Ansible ignore undefined variable errors, connection failures, execution issues (for example, missing packages), or syntax errors.

 Ignoring unreachable host errors
--------------------------------

  New in version 2.7.

  You can ignore a task failure due to the host instance being ‘UNREACHABLE’ with the `ignore_unreachable` keyword. Ansible ignores the task errors, but continues to execute future tasks against the unreachable host. For example, at the task level:

 
```
- name: This executes, fails, and the failure is ignored
  ansible.builtin.command: /bin/true
  ignore_unreachable: yes

- name: This executes, fails, and ends the play for this host
  ansible.builtin.command: /bin/true

```
 And at the playbook level:

 
```
- hosts: all
  ignore_unreachable: yes
  tasks:
  - name: This executes, fails, and the failure is ignored
    ansible.builtin.command: /bin/true

  - name: This executes, fails, and ends the play for this host
    ansible.builtin.command: /bin/true
    ignore_unreachable: no

```
 Resetting unreachable hosts
---------------------------

 If Ansible cannot connect to a host, it marks that host as ‘UNREACHABLE’ and removes it from the list of active hosts for the run. You can use `meta: clear_host_errors` to reactivate all hosts, so subsequent tasks can try to reach them again.

 Handlers and failure
--------------------

 Ansible runs [handlers](playbooks_handlers#handlers) at the end of each play. If a task notifies a handler but another task fails later in the play, by default the handler does *not* run on that host, which may leave the host in an unexpected state. For example, a task could update a configuration file and notify a handler to restart some service. If a task later in the same play fails, the configuration file might be changed but the service will not be restarted.

 You can change this behavior with the `--force-handlers` command-line option, by including `force_handlers: True` in a play, or by adding `force_handlers = True` to ansible.cfg. When handlers are forced, Ansible will run all notified handlers on all hosts, even hosts with failed tasks. (Note that certain errors could still prevent the handler from running, such as a host becoming unreachable.)

 Defining failure
----------------

 Ansible lets you define what “failure” means in each task using the `failed_when` conditional. As with all conditionals in Ansible, lists of multiple `failed_when` conditions are joined with an implicit `and`, meaning the task only fails when *all* conditions are met. If you want to trigger a failure when any of the conditions is met, you must define the conditions in a string with an explicit `or` operator.

 You may check for failure by searching for a word or phrase in the output of a command:

 
```
- name: Fail task when the command error output prints FAILED
  ansible.builtin.command: /usr/bin/example-command -x -y -z
  register: command_result
  failed_when: "'FAILED' in command_result.stderr"

```
 or based on the return code:

 
```
- name: Fail task when both files are identical
  ansible.builtin.raw: diff foo/file1 bar/file2
  register: diff_cmd
  failed_when: diff_cmd.rc == 0 or diff_cmd.rc >= 2

```
 You can also combine multiple conditions for failure. This task will fail if both conditions are true:

 
```
- name: Check if a file exists in temp and fail task if it does
  ansible.builtin.command: ls /tmp/this_should_not_be_here
  register: result
  failed_when:
    - result.rc == 0
    - '"No such" not in result.stdout'

```
 If you want the task to fail when only one condition is satisfied, change the `failed_when` definition to:

 
```
failed_when: result.rc == 0 or "No such" not in result.stdout

```
 If you have too many conditions to fit neatly into one line, you can split it into a multi-line yaml value with `>`:

 
```
- name: example of many failed_when conditions with OR
  ansible.builtin.shell: "./myBinary"
  register: ret
  failed_when: >
    ("No such file or directory" in ret.stdout) or
    (ret.stderr != '') or
    (ret.rc == 10)

```
 Defining “changed”
------------------

 Ansible lets you define when a particular task has “changed” a remote node using the `changed_when` conditional. This lets you determine, based on return codes or output, whether a change should be reported in Ansible statistics and whether a handler should be triggered or not. As with all conditionals in Ansible, lists of multiple `changed_when` conditions are joined with an implicit `and`, meaning the task only reports a change when *all* conditions are met. If you want to report a change when any of the conditions is met, you must define the conditions in a string with an explicit `or` operator. For example:

 
```
tasks:

  - name: Report 'changed' when the return code is not equal to 2
    ansible.builtin.shell: /usr/bin/billybass --mode="take me to the river"
    register: bass_result
    changed_when: "bass_result.rc != 2"

  - name: This will never report 'changed' status
    ansible.builtin.shell: wall 'beep'
    changed_when: False

```
 You can also combine multiple conditions to override “changed” result:

 
```
- name: Combine multiple conditions to override 'changed' result
  ansible.builtin.command: /bin/fake_command
  register: result
  ignore_errors: True
  changed_when:
    - '"ERROR" in result.stderr'
    - result.rc == 2

```
 See [Defining failure](#controlling-what-defines-failure) for more conditional syntax examples.

 Ensuring success for command and shell
--------------------------------------

 The [command](../collections/ansible/builtin/command_module#command-module) and [shell](../collections/ansible/builtin/shell_module#shell-module) modules care about return codes, so if you have a command whose successful exit code is not zero, you can do this:

 
```
tasks:
  - name: Run this command and ignore the result
    ansible.builtin.shell: /usr/bin/somecommand || /bin/true

```
 Aborting a play on all hosts
----------------------------

 Sometimes you want a failure on a single host, or failures on a certain percentage of hosts, to abort the entire play on all hosts. You can stop play execution after the first failure happens with `any_errors_fatal`. For finer-grained control, you can use `max_fail_percentage` to abort the run after a given percentage of hosts has failed.

 ### Aborting on the first error: any\_errors\_fatal

 If you set `any_errors_fatal` and a task returns an error, Ansible finishes the fatal task on all hosts in the current batch, then stops executing the play on all hosts. Subsequent tasks and plays are not executed. You can recover from fatal errors by adding a [rescue section](playbooks_blocks#block-error-handling) to the block. You can set `any_errors_fatal` at the play or block level:

 
```
- hosts: somehosts
  any_errors_fatal: true
  roles:
    - myrole

- hosts: somehosts
  tasks:
    - block:
        - include_tasks: mytasks.yml
      any_errors_fatal: true

```
 You can use this feature when all tasks must be 100% successful to continue playbook execution. For example, if you run a service on machines in multiple data centers with load balancers to pass traffic from users to the service, you want all load balancers to be disabled before you stop the service for maintenance. To ensure that any failure in the task that disables the load balancers will stop all other tasks:

 
```
---
- hosts: load_balancers_dc_a
  any_errors_fatal: true

  tasks:
    - name: Shut down datacenter 'A'
      ansible.builtin.command: /usr/bin/disable-dc

- hosts: frontends_dc_a

  tasks:
    - name: Stop service
      ansible.builtin.command: /usr/bin/stop-software

    - name: Update software
      ansible.builtin.command: /usr/bin/upgrade-software

- hosts: load_balancers_dc_a

  tasks:
    - name: Start datacenter 'A'
      ansible.builtin.command: /usr/bin/enable-dc

```
 In this example Ansible starts the software upgrade on the front ends only if all of the load balancers are successfully disabled.

 ### Setting a maximum failure percentage

 By default, Ansible continues to execute tasks as long as there are hosts that have not yet failed. In some situations, such as when executing a rolling update, you may want to abort the play when a certain threshold of failures has been reached. To achieve this, you can set a maximum failure percentage on a play:

 
```
---
- hosts: webservers
  max_fail_percentage: 30
  serial: 10

```
 The `max_fail_percentage` setting applies to each batch when you use it with [serial](playbooks_strategies#rolling-update-batch-size). In the example above, if more than 3 of the 10 servers in the first (or any) batch of servers failed, the rest of the play would be aborted.

  Note

 The percentage set must be exceeded, not equaled. For example, if serial were set to 4 and you wanted the task to abort the play when 2 of the systems failed, set the max\_fail\_percentage at 49 rather than 50.

  Controlling errors in blocks
----------------------------

 You can also use blocks to define responses to task errors. This approach is similar to exception handling in many programming languages. See [Handling errors with blocks](playbooks_blocks#block-error-handling) for details and examples.

  See also

  [Intro to playbooks](playbooks_intro#playbooks-intro)

An introduction to playbooks

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [Conditionals](playbooks_conditionals#playbooks-conditionals)

Conditional statements in playbooks

  [Using Variables](playbooks_variables#playbooks-variables)

All about variables

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html>

Tests
=====

 [Tests](http://jinja.pocoo.org/docs/dev/templates/#tests) in Jinja are a way of evaluating template expressions and returning True or False. Jinja ships with many of these. See [builtin tests](http://jinja.palletsprojects.com/templates/#builtin-tests) in the official Jinja template documentation.

 The main difference between tests and filters are that Jinja tests are used for comparisons, whereas filters are used for data manipulation, and have different applications in jinja. Tests can also be used in list processing filters, like `map()` and `select()` to choose items in the list.

 Like all templating, tests always execute on the Ansible controller, **not** on the target of a task, as they test local data.

 In addition to those Jinja2 tests, Ansible supplies a few more and users can easily create their own.

 * [Test syntax](#test-syntax)
* [Testing strings](#testing-strings)
* [Vault](#vault)
* [Testing truthiness](#testing-truthiness)
* [Comparing versions](#comparing-versions)
* [Set theory tests](#set-theory-tests)
* [Testing if a list contains a value](#testing-if-a-list-contains-a-value)
* [Testing if a list value is True](#testing-if-a-list-value-is-true)
* [Testing paths](#testing-paths)
* [Testing size formats](#testing-size-formats)


	+ [Human readable](#human-readable)
	+ [Human to bytes](#human-to-bytes)
* [Testing task results](#testing-task-results)

 Test syntax
-----------

 [Test syntax](http://jinja.pocoo.org/docs/dev/templates/#tests) varies from [filter syntax](http://jinja.pocoo.org/docs/dev/templates/#filters) (`variable | filter`). Historically Ansible has registered tests as both jinja tests and jinja filters, allowing for them to be referenced using filter syntax.

 As of Ansible 2.5, using a jinja test as a filter will generate a warning.

 The syntax for using a jinja test is as follows:

 
```
variable is test_name

```
 Such as:

 
```
result is failed

```
 Testing strings
---------------

 To match strings against a substring or a regular expression, use the `match`, `search` or `regex` tests:

 
```
vars:
  url: "http://example.com/users/foo/resources/bar"

tasks:
    - debug:
        msg: "matched pattern 1"
      when: url is match("http://example.com/users/.*/resources/")

    - debug:
        msg: "matched pattern 2"
      when: url is search("/users/.*/resources/.*")

    - debug:
        msg: "matched pattern 3"
      when: url is search("/users/")

    - debug:
        msg: "matched pattern 4"
      when: url is regex("example.com/\w+/foo")

```
 `match` succeeds if it finds the pattern at the beginning of the string, while `search` succeeds if it finds the pattern anywhere within string. By default, `regex` works like `search`, but `regex` can be configured to perform other tests as well, by passing the `match_type` keyword argument. In particular, `match_type` determines the `re` method that gets used to perform the search. The full list can be found in the relevant Python documentation [here](https://docs.python.org/3/library/re.html#regular-expression-objects).

 All of the string tests also take optional `ignorecase` and `multiline` arguments. These correspond to `re.I` and `re.M` from Python’s `re` library, respectively.

 Vault
-----

  New in version 2.10.

  You can test whether a variable is an inline single vault encrypted value using the `vault_encrypted` test.

 
```
vars:
  variable: !vault |
    $ANSIBLE_VAULT;1.2;AES256;dev
    61323931353866666336306139373937316366366138656131323863373866376666353364373761
    3539633234313836346435323766306164626134376564330a373530313635343535343133316133
    36643666306434616266376434363239346433643238336464643566386135356334303736353136
    6565633133366366360a326566323363363936613664616364623437336130623133343530333739
    3039

tasks:
  - debug:
      msg: '{{ (variable is vault_encrypted) | ternary("Vault encrypted", "Not vault encrypted") }}'

```
 Testing truthiness
------------------

  New in version 2.10.

  As of Ansible 2.10, you can now perform Python like truthy and falsy checks.

 
```
- debug:
    msg: "Truthy"
  when: value is truthy
  vars:
    value: "some string"

- debug:
    msg: "Falsy"
  when: value is falsy
  vars:
    value: ""

```
 Additionally, the `truthy` and `falsy` tests accept an optional parameter called `convert_bool` that will attempt to convert boolean indicators to actual booleans.

 
```
- debug:
    msg: "Truthy"
  when: value is truthy(convert_bool=True)
  vars:
    value: "yes"

- debug:
    msg: "Falsy"
  when: value is falsy(convert_bool=True)
  vars:
    value: "off"

```
 Comparing versions
------------------

  New in version 1.6.

   Note

 In 2.5 `version_compare` was renamed to `version`

  To compare a version number, such as checking if the `ansible_facts['distribution_version']` version is greater than or equal to ‘12.04’, you can use the `version` test.

 The `version` test can also be used to evaluate the `ansible_facts['distribution_version']`:

 
```
{{ ansible_facts['distribution_version'] is version('12.04', '>=') }}

```
 If `ansible_facts['distribution_version']` is greater than or equal to 12.04, this test returns True, otherwise False.

 The `version` test accepts the following operators:

 
```
<, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne

```
 This test also accepts a 3rd parameter, `strict` which defines if strict version parsing as defined by `distutils.version.StrictVersion` should be used. The default is `False` (using `distutils.version.LooseVersion`), `True` enables strict version parsing:

 
```
{{ sample_version_var is version('1.0', operator='lt', strict=True) }}

```
 As of Ansible 2.11 the `version` test accepts a `version_type` parameter which is mutually exclusive with `strict`, and accepts the following values:

 
```
loose, strict, semver, semantic

```
 Using `version_type` to compare a semantic version would be achieved like the following:

 
```
{{ sample_semver_var is version('2.0.0-rc.1+build.123', 'lt', version_type='semver') }}

```
 When using `version` in a playbook or role, don’t use `{{ }}` as described in the [FAQ](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#when-should-i-use-also-how-to-interpolate-variables-or-dynamic-variable-names):

 
```
vars:
    my_version: 1.2.3

tasks:
    - debug:
        msg: "my_version is higher than 1.0.0"
      when: my_version is version('1.0.0', '>')

```
 Set theory tests
----------------

  New in version 2.1.

   Note

 In 2.5 `issubset` and `issuperset` were renamed to `subset` and `superset`

  To see if a list includes or is included by another list, you can use ‘subset’ and ‘superset’:

 
```
vars:
    a: [1,2,3,4,5]
    b: [2,3]
tasks:
    - debug:
        msg: "A includes B"
      when: a is superset(b)

    - debug:
        msg: "B is included in A"
      when: b is subset(a)

```
 Testing if a list contains a value
----------------------------------

  New in version 2.8.

  Ansible includes a `contains` test which operates similarly, but in reverse of the Jinja2 provided `in` test. The `contains` test is designed to work with the `select`, `reject`, `selectattr`, and `rejectattr` filters:

 
```
vars:
  lacp_groups:
    - master: lacp0
      network: 10.65.100.0/24
      gateway: 10.65.100.1
      dns4:
        - 10.65.100.10
        - 10.65.100.11
      interfaces:
        - em1
        - em2

    - master: lacp1
      network: 10.65.120.0/24
      gateway: 10.65.120.1
      dns4:
        - 10.65.100.10
        - 10.65.100.11
      interfaces:
          - em3
          - em4

tasks:
  - debug:
      msg: "{{ (lacp_groups|selectattr('interfaces', 'contains', 'em1')|first).master }}"

```
  New in version 2.4.

  Testing if a list value is True
-------------------------------

 You can use `any` and `all` to check if any or all elements in a list are true or not:

 
```
vars:
  mylist:
      - 1
      - "{{ 3 == 3 }}"
      - True
  myotherlist:
      - False
      - True
tasks:

  - debug:
      msg: "all are true!"
    when: mylist is all

  - debug:
      msg: "at least one is true"
    when: myotherlist is any

```
 Testing paths
-------------

  Note

 In 2.5 the following tests were renamed to remove the `is_` prefix

  The following tests can provide information about a path on the controller:

 
```
- debug:
    msg: "path is a directory"
  when: mypath is directory

- debug:
    msg: "path is a file"
  when: mypath is file

- debug:
    msg: "path is a symlink"
  when: mypath is link

- debug:
    msg: "path already exists"
  when: mypath is exists

- debug:
    msg: "path is {{ (mypath is abs)|ternary('absolute','relative')}}"

- debug:
    msg: "path is the same file as path2"
  when: mypath is same_file(path2)

- debug:
    msg: "path is a mount"
  when: mypath is mount

```
 Testing size formats
--------------------

 The `human_readable` and `human_to_bytes` functions let you test your playbooks to make sure you are using the right size format in your tasks, and that you provide Byte format to computers and human-readable format to people.

 ### Human readable

 Asserts whether the given string is human readable or not.

 For example:

 
```
- name: "Human Readable"
  assert:
    that:
      - '"1.00 Bytes" == 1|human_readable'
      - '"1.00 bits" == 1|human_readable(isbits=True)'
      - '"10.00 KB" == 10240|human_readable'
      - '"97.66 MB" == 102400000|human_readable'
      - '"0.10 GB" == 102400000|human_readable(unit="G")'
      - '"0.10 Gb" == 102400000|human_readable(isbits=True, unit="G")'

```
 This would result in:

 
```
{ "changed": false, "msg": "All assertions passed" }

```
 ### Human to bytes

 Returns the given string in the Bytes format.

 For example:

 
```
- name: "Human to Bytes"
  assert:
    that:
      - "{{'0'|human_to_bytes}}        == 0"
      - "{{'0.1'|human_to_bytes}}      == 0"
      - "{{'0.9'|human_to_bytes}}      == 1"
      - "{{'1'|human_to_bytes}}        == 1"
      - "{{'10.00 KB'|human_to_bytes}} == 10240"
      - "{{   '11 MB'|human_to_bytes}} == 11534336"
      - "{{  '1.1 GB'|human_to_bytes}} == 1181116006"
      - "{{'10.00 Kb'|human_to_bytes(isbits=True)}} == 10240"

```
 This would result in:

 
```
{ "changed": false, "msg": "All assertions passed" }

```
 Testing task results
--------------------

 The following tasks are illustrative of the tests meant to check the status of tasks:

 
```
tasks:

  - shell: /usr/bin/foo
    register: result
    ignore_errors: True

  - debug:
      msg: "it failed"
    when: result is failed

  # in most cases you'll want a handler, but if you want to do something right now, this is nice
  - debug:
      msg: "it changed"
    when: result is changed

  - debug:
      msg: "it succeeded in Ansible >= 2.1"
    when: result is succeeded

  - debug:
      msg: "it succeeded"
    when: result is success

  - debug:
      msg: "it was skipped"
    when: result is skipped

```
  Note

 From 2.1, you can also use success, failure, change, and skip so that the grammar matches, for those who need to be strict about it.

   See also

  [Intro to playbooks](playbooks_intro#playbooks-intro)

An introduction to playbooks

  [Conditionals](playbooks_conditionals#playbooks-conditionals)

Conditional statements in playbooks

  [Using Variables](playbooks_variables#playbooks-variables)

All about variables

  [Loops](playbooks_loops#playbooks-loops)

Looping in playbooks

  [Roles](playbooks_reuse_roles#playbooks-reuse-roles)

Playbook organization by roles

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html>

Tips and tricks
===============

 These tips and tricks have helped us optimize our Ansible usage, and we offer them here as suggestions. We hope they will help you organize content, write playbooks, maintain inventory, and execute Ansible. Ultimately, though, you should use Ansible in the way that makes most sense for your organization and your goals.

 * [General tips](#general-tips)


	+ [Keep it simple](#keep-it-simple)
	+ [Use version control](#use-version-control)
* [Playbook tips](#playbook-tips)


	+ [Use whitespace](#use-whitespace)
	+ [Always name tasks](#always-name-tasks)
	+ [Always mention the state](#always-mention-the-state)
	+ [Use comments](#use-comments)
* [Inventory tips](#inventory-tips)


	+ [Use dynamic inventory with clouds](#use-dynamic-inventory-with-clouds)
	+ [Group inventory by function](#group-inventory-by-function)
	+ [Separate production and staging inventory](#separate-production-and-staging-inventory)
	+ [Keep vaulted variables safely visible](#keep-vaulted-variables-safely-visible)
* [Execution tricks](#execution-tricks)


	+ [Try it in staging first](#try-it-in-staging-first)
	+ [Update in batches](#update-in-batches)
	+ [Handling OS and distro differences](#handling-os-and-distro-differences)

 General tips
------------

 These concepts apply to all Ansible activities and artifacts.

 ### Keep it simple

 Whenever you can, do things simply. Use advanced features only when necessary, and select the feature that best matches your use case. For example, you will probably not need `vars`, `vars_files`, `vars_prompt` and `--extra-vars` all at once, while also using an external inventory file. If something feels complicated, it probably is. Take the time to look for a simpler solution.

 ### Use version control

 Keep your playbooks, roles, inventory, and variables files in git or another version control system and make commits to the repository when you make changes. Version control gives you an audit trail describing when and why you changed the rules that automate your infrastructure.

 Playbook tips
-------------

 These tips help make playbooks and roles easier to read, maintain, and debug.

 ### Use whitespace

 Generous use of whitespace, for example, a blank line before each block or task, makes a playbook easy to scan.

 ### Always name tasks

 Task names are optional, but extremely useful. In its output, Ansible shows you the name of each task it runs. Choose names that describe what each task does and why.

 ### Always mention the state

 For many modules, the ‘state’ parameter is optional. Different modules have different default settings for ‘state’, and some modules support several ‘state’ settings. Explicitly setting ‘state=present’ or ‘state=absent’ makes playbooks and roles clearer.

 ### Use comments

 Even with task names and explicit state, sometimes a part of a playbook or role (or inventory/variable file) needs more explanation. Adding a comment (any line starting with ‘#’) helps others (and possibly yourself in future) understand what a play or task (or variable setting) does, how it does it, and why.

 Inventory tips
--------------

 These tips help keep your inventory well organized.

 ### Use dynamic inventory with clouds

 With cloud providers and other systems that maintain canonical lists of your infrastructure, use [dynamic inventory](intro_dynamic_inventory#intro-dynamic-inventory) to retrieve those lists instead of manually updating static inventory files. With cloud resources, you can use tags to differentiate production and staging environments.

 ### Group inventory by function

 A system can be in multiple groups. See [How to build your inventory](intro_inventory#intro-inventory) and [Patterns: targeting hosts and groups](intro_patterns#intro-patterns). If you create groups named for the function of the nodes in the group, for example *webservers* or *dbservers*, your playbooks can target machines based on function. You can assign function-specific variables using the group variable system, and design Ansible roles to handle function-specific use cases. See [Roles](playbooks_reuse_roles#playbooks-reuse-roles).

 ### Separate production and staging inventory

 You can keep your production environment separate from development, test, and staging environments by using separate inventory files or directories for each environment. This way you pick with -i what you are targeting. Keeping all your environments in one file can lead to surprises!

 ### Keep vaulted variables safely visible

 You should encrypt sensitive or secret variables with Ansible Vault. However, encrypting the variable names as well as the variable values makes it hard to find the source of the values. You can keep the names of your variables accessible (by `grep`, for example) without exposing any secrets by adding a layer of indirection:

 1. Create a `group_vars/` subdirectory named after the group.
2. Inside this subdirectory, create two files named `vars` and `vault`.
3. In the `vars` file, define all of the variables needed, including any sensitive ones.
4. Copy all of the sensitive variables over to the `vault` file and prefix these variables with `vault_`.
5. Adjust the variables in the `vars` file to point to the matching `vault_` variables using jinja2 syntax: `db_password: {{ vault_db_password }}`.
6. Encrypt the `vault` file to protect its contents.
7. Use the variable name from the `vars` file in your playbooks.

 When running a playbook, Ansible finds the variables in the unencrypted file, which pulls the sensitive variable values from the encrypted file. There is no limit to the number of variable and vault files or their names.

 Execution tricks
----------------

 These tips apply to using Ansible, rather than to Ansible artifacts.

 ### Try it in staging first

 Testing changes in a staging environment before rolling them out in production is always a great idea. Your environments need not be the same size and you can use group variables to control the differences between those environments.

 ### Update in batches

 Use the ‘serial’ keyword to control how many machines you update at once in the batch. See [Controlling where tasks run: delegation and local actions](playbooks_delegation#playbooks-delegation).

 ### Handling OS and distro differences

 Group variables files and the `group_by` module work together to help Ansible execute across a range of operating systems and distributions that require different settings, packages, and tools. The `group_by` module creates a dynamic group of hosts matching certain criteria. This group does not need to be defined in the inventory file. This approach lets you execute different tasks on different operating systems or distributions. For example:

 
```
---

 - name: talk to all hosts just so we can learn about them
   hosts: all
   tasks:
     - name: Classify hosts depending on their OS distribution
       group_by:
         key: os_{{ ansible_facts['distribution'] }}

 # now just on the CentOS hosts...

 - hosts: os_CentOS
   gather_facts: False
   tasks:
     - # tasks that only happen on CentOS go in this play

```
 The first play categorizes all systems into dynamic groups based on the operating system name. Later plays can use these groups as patterns on the `hosts` line. You can also add group-specific settings in group vars files. All three names must match: the name created by the `group_by` task, the name of the pattern in subsequent plays, and the name of the group vars file. For example:

 
```
---
# file: group_vars/all
asdf: 10

---
# file: group_vars/os_CentOS.yml
asdf: 42

```
 In this example, CentOS machines get the value of ‘42’ for asdf, but other machines get ‘10’. This can be used not only to set variables, but also to apply certain roles to only certain systems.

 You can use the same setup with `include_vars` when you only need OS-specific variables, not tasks:

 
```
- hosts: all
  tasks:
    - name: Set OS distribution dependent variables
      include_vars: "os_{{ ansible_facts['distribution'] }}.yml"
    - debug:
        var: asdf

```
 This pulls in variables from the group\_vars/os\_CentOS.yml file.

  See also

  [YAML Syntax](../reference_appendices/yamlsyntax#yaml-syntax)

Learn about YAML syntax

  [Working with playbooks](playbooks#working-with-playbooks)

Review the basic playbook features

  [Collection Index](../collections/index#list-of-collections)

Browse existing collections, modules, and plugins

  [Should you develop a module?](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules.html#developing-modules)

Learn how to extend Ansible by writing your own modules

  [Patterns: targeting hosts and groups](intro_patterns#intro-patterns)

Learn about how to select hosts

  [GitHub examples directory](https://github.com/ansible/ansible-examples)

Complete playbook files from the github project source

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html>

Understanding privilege escalation: become
==========================================

 Ansible uses existing privilege escalation systems to execute tasks with root privileges or with another user’s permissions. Because this feature allows you to ‘become’ another user, different from the user that logged into the machine (remote user), we call it `become`. The `become` keyword leverages existing privilege escalation tools like `sudo`, `su`, `pfexec`, `doas`, `pbrun`, `dzdo`, `ksu`, `runas`, `machinectl` and others.

 * [Using become](#using-become)


	+ [Become directives](#become-directives)
	+ [Become connection variables](#become-connection-variables)
	+ [Become command-line options](#become-command-line-options)
* [Risks and limitations of become](#risks-and-limitations-of-become)


	+ [Risks of becoming an unprivileged user](#risks-of-becoming-an-unprivileged-user)
	+ [Not supported by all connection plugins](#not-supported-by-all-connection-plugins)
	+ [Only one method may be enabled per host](#only-one-method-may-be-enabled-per-host)
	+ [Privilege escalation must be general](#privilege-escalation-must-be-general)
	+ [May not access environment variables populated by pamd\_systemd](#may-not-access-environment-variables-populated-by-pamd-systemd)
* [Become and network automation](#become-and-network-automation)


	+ [Setting enable mode for all tasks](#setting-enable-mode-for-all-tasks)
	
	
		- [Passwords for enable mode](#passwords-for-enable-mode)
	+ [authorize and auth\_pass](#authorize-and-auth-pass)
* [Become and Windows](#become-and-windows)


	+ [Administrative rights](#administrative-rights)
	+ [Local service accounts](#local-service-accounts)
	+ [Become without setting a password](#become-without-setting-a-password)
	+ [Accounts without a password](#accounts-without-a-password)
	+ [Become flags for Windows](#become-flags-for-windows)
	+ [Limitations of become on Windows](#limitations-of-become-on-windows)

 Using become
------------

 You can control the use of `become` with play or task directives, connection variables, or at the command line. If you set privilege escalation properties in multiple ways, review the [general precedence rules](../reference_appendices/general_precedence#general-precedence-rules) to understand which settings will be used.

 A full list of all become plugins that are included in Ansible can be found in the [Plugin List](../plugins/become#become-plugin-list).

 ### Become directives

 You can set the directives that control `become` at the play or task level. You can override these by setting connection variables, which often differ from one host to another. These variables and directives are independent. For example, setting `become_user` does not set `become`.

  become

set to `yes` to activate privilege escalation.

  become\_user

set to user with desired privileges — the user you `become`, NOT the user you login as. Does NOT imply `become: yes`, to allow it to be set at host level. Default value is `root`.

  become\_method

(at play or task level) overrides the default method set in ansible.cfg, set to use any of the [Become Plugins](../plugins/become#become-plugins).

  become\_flags

(at play or task level) permit the use of specific flags for the tasks or role. One common use is to change the user to nobody when the shell is set to nologin. Added in Ansible 2.2.

   For example, to manage a system service (which requires `root` privileges) when connected as a non-`root` user, you can use the default value of `become_user` (`root`):

 
```
- name: Ensure the httpd service is running
  service:
    name: httpd
    state: started
  become: yes

```
 To run a command as the `apache` user:

 
```
- name: Run a command as the apache user
  command: somecommand
  become: yes
  become_user: apache

```
 To do something as the `nobody` user when the shell is nologin:

 
```
- name: Run a command as nobody
  command: somecommand
  become: yes
  become_method: su
  become_user: nobody
  become_flags: '-s /bin/sh'

```
 To specify a password for sudo, run `ansible-playbook` with `--ask-become-pass` (`-K` for short). If you run a playbook utilizing `become` and the playbook seems to hang, most likely it is stuck at the privilege escalation prompt. Stop it with `CTRL-c`, then execute the playbook with `-K` and the appropriate password.

 ### Become connection variables

 You can define different `become` options for each managed node or group. You can define these variables in inventory or use them as normal variables.

  ansible\_become

overrides the `become` directive, decides if privilege escalation is used or not.

  ansible\_become\_method

which privilege escalation method should be used

  ansible\_become\_user

set the user you become through privilege escalation; does not imply `ansible_become: yes`

  ansible\_become\_password

set the privilege escalation password. See [Using encrypted variables and files](vault#playbooks-vault) for details on how to avoid having secrets in plain text

  ansible\_common\_remote\_group

determines if Ansible should try to `chgrp` its temporary files to a group if `setfacl` and `chown` both fail. See [Risks of becoming an unprivileged user](#risks-of-becoming-an-unprivileged-user) for more information. Added in version 2.10.

   For example, if you want to run all tasks as `root` on a server named `webserver`, but you can only connect as the `manager` user, you could use an inventory entry like this:

 
```
webserver ansible_user=manager ansible_become=yes

```
  Note

 The variables defined above are generic for all become plugins but plugin specific ones can also be set instead. Please see the documentation for each plugin for a list of all options the plugin has and how they can be defined. A full list of become plugins in Ansible can be found at [Become Plugins](../plugins/become#become-plugins).

  ### Become command-line options

  `--ask-become-pass, -K` 
ask for privilege escalation password; does not imply become will be used. Note that this password will be used for all hosts.

  `--become, -b` 
run operations with become (no password implied)

  `--become-method=BECOME\_METHOD` 
privilege escalation method to use (default=sudo), valid choices: [ sudo | su | pbrun | pfexec | doas | dzdo | ksu | runas | machinectl ]

  `--become-user=BECOME\_USER` 
run operations as this user (default=root), does not imply –become/-b

   Risks and limitations of become
-------------------------------

 Although privilege escalation is mostly intuitive, there are a few limitations on how it works. Users should be aware of these to avoid surprises.

 ### Risks of becoming an unprivileged user

 Ansible modules are executed on the remote machine by first substituting the parameters into the module file, then copying the file to the remote machine, and finally executing it there.

 Everything is fine if the module file is executed without using `become`, when the `become_user` is root, or when the connection to the remote machine is made as root. In these cases Ansible creates the module file with permissions that only allow reading by the user and root, or only allow reading by the unprivileged user being switched to.

 However, when both the connection user and the `become_user` are unprivileged, the module file is written as the user that Ansible connects as (the `remote_user`), but the file needs to be readable by the user Ansible is set to `become`. The details of how Ansible solves this can vary based on platform. However, on POSIX systems, Ansible solves this problem in the following way:

 First, if **setfacl** is installed and available in the remote `PATH`, and the temporary directory on the remote host is mounted with POSIX.1e filesystem ACL support, Ansible will use POSIX ACLs to share the module file with the second unprivileged user.

 Next, if POSIX ACLs are **not** available or **setfacl** could not be run, Ansible will attempt to change ownership of the module file using **chown** for systems which support doing so as an unprivileged user.

 New in Ansible 2.11, at this point, Ansible will try **chmod +a** which is a macOS-specific way of setting ACLs on files.

 New in Ansible 2.10, if all of the above fails, Ansible will then check the value of the configuration setting `ansible_common_remote_group`. Many systems will allow a given user to change the group ownership of a file to a group the user is in. As a result, if the second unprivileged user (the `become_user`) has a UNIX group in common with the user Ansible is connected as (the `remote_user`), and if `ansible_common_remote_group` is defined to be that group, Ansible can try to change the group ownership of the module file to that group by using **chgrp**, thereby likely making it readable to the `become_user`.

 At this point, if `ansible_common_remote_group` was defined and a **chgrp** was attempted and returned successfully, Ansible assumes (but, importantly, does not check) that the new group ownership is enough and does not fall back further. That is, Ansible **does not check** that the `become_user` does in fact share a group with the `remote_user`; so long as the command exits successfully, Ansible considers the result successful and does not proceed to check `allow_world_readable_tmpfiles` per below.

 If `ansible_common_remote_group` is **not** set and the chown above it failed, or if `ansible_common_remote_group` *is* set but the **chgrp** (or following group-permissions **chmod**) returned a non-successful exit code, Ansible will lastly check the value of `allow_world_readable_tmpfiles`. If this is set, Ansible will place the module file in a world-readable temporary directory, with world-readable permissions to allow the `become_user` (and incidentally any other user on the system) to read the contents of the file. **If any of the parameters passed to the module are sensitive in nature, and you do not trust the remote machines, then this is a potential security risk.**

 Once the module is done executing, Ansible deletes the temporary file.

 Several ways exist to avoid the above logic flow entirely:

 * Use `pipelining`. When pipelining is enabled, Ansible does not save the module to a temporary file on the client. Instead it pipes the module to the remote python interpreter’s stdin. Pipelining does not work for python modules involving file transfer (for example: [copy](../collections/ansible/builtin/copy_module#copy-module), [fetch](../collections/ansible/builtin/fetch_module#fetch-module), [template](../collections/ansible/builtin/template_module#template-module)), or for non-python modules.
* Avoid becoming an unprivileged user. Temporary files are protected by UNIX file permissions when you `become` root or do not use `become`. In Ansible 2.1 and above, UNIX file permissions are also secure if you make the connection to the managed machine as root and then use `become` to access an unprivileged account.

  Warning

 Although the Solaris ZFS filesystem has filesystem ACLs, the ACLs are not POSIX.1e filesystem acls (they are NFSv4 ACLs instead). Ansible cannot use these ACLs to manage its temp file permissions so you may have to resort to `allow_world_readable_tmpfiles` if the remote machines use ZFS.

   Changed in version 2.1.

  Ansible makes it hard to unknowingly use `become` insecurely. Starting in Ansible 2.1, Ansible defaults to issuing an error if it cannot execute securely with `become`. If you cannot use pipelining or POSIX ACLs, must connect as an unprivileged user, must use `become` to execute as a different unprivileged user, and decide that your managed nodes are secure enough for the modules you want to run there to be world readable, you can turn on `allow_world_readable_tmpfiles` in the `ansible.cfg` file. Setting `allow_world_readable_tmpfiles` will change this from an error into a warning and allow the task to run as it did prior to 2.1.

  Changed in version 2.10.

  Ansible 2.10 introduces the above-mentioned `ansible_common_remote_group` fallback. As mentioned above, if enabled, it is used when `remote_user` and `become_user` are both unprivileged users. Refer to the text above for details on when this fallback happens.

  Warning

 As mentioned above, if `ansible_common_remote_group` and `allow_world_readable_tmpfiles` are both enabled, it is unlikely that the world-readable fallback will ever trigger, and yet Ansible might still be unable to access the module file. This is because after the group ownership change is successful, Ansible does not fall back any further, and also does not do any check to ensure that the `become_user` is actually a member of the “common group”. This is a design decision made by the fact that doing such a check would require another round-trip connection to the remote machine, which is a time-expensive operation. Ansible does, however, emit a warning in this case.

  ### Not supported by all connection plugins

 Privilege escalation methods must also be supported by the connection plugin used. Most connection plugins will warn if they do not support become. Some will just ignore it as they always run as root (jail, chroot, and so on).

 ### Only one method may be enabled per host

 Methods cannot be chained. You cannot use `sudo /bin/su -` to become a user, you need to have privileges to run the command as that user in sudo or be able to su directly to it (the same for pbrun, pfexec or other supported methods).

 ### Privilege escalation must be general

 You cannot limit privilege escalation permissions to certain commands. Ansible does not always use a specific command to do something but runs modules (code) from a temporary file name which changes every time. If you have ‘/sbin/service’ or ‘/bin/chmod’ as the allowed commands this will fail with ansible as those paths won’t match with the temporary file that Ansible creates to run the module. If you have security rules that constrain your sudo/pbrun/doas environment to running specific command paths only, use Ansible from a special account that does not have this constraint, or use AWX or the [Red Hat Ansible Automation Platform](https://docs.ansible.com/ansible/latest/reference_appendices/tower.html#ansible-platform) to manage indirect access to SSH credentials.

 ### May not access environment variables populated by pamd\_systemd

 For most Linux distributions using `systemd` as their init, the default methods used by `become` do not open a new “session”, in the sense of systemd. Because the `pam_systemd` module will not fully initialize a new session, you might have surprises compared to a normal session opened through ssh: some environment variables set by `pam_systemd`, most notably `XDG_RUNTIME_DIR`, are not populated for the new user and instead inherited or just emptied.

 This might cause trouble when trying to invoke systemd commands that depend on `XDG_RUNTIME_DIR` to access the bus:

 
```
$ echo $XDG_RUNTIME_DIR

$ systemctl --user status
Failed to connect to bus: Permission denied

```
 To force `become` to open a new systemd session that goes through `pam_systemd`, you can use `become_method: machinectl`.

 For more information, see [this systemd issue](https://github.com/systemd/systemd/issues/825#issuecomment-127917622).

 Become and network automation
-----------------------------

 As of version 2.6, Ansible supports `become` for privilege escalation (entering `enable` mode or privileged EXEC mode) on all Ansible-maintained network platforms that support `enable` mode. Using `become` replaces the `authorize` and `auth_pass` options in a `provider` dictionary.

 You must set the connection type to either `connection: ansible.netcommon.network_cli` or `connection: ansible.netcommon.httpapi` to use `become` for privilege escalation on network devices. Check the [Platform Options](../network/user_guide/platform_index#platform-options) documentation for details.

 You can use escalated privileges on only the specific tasks that need them, on an entire play, or on all plays. Adding `become: yes` and `become_method: enable` instructs Ansible to enter `enable` mode before executing the task, play, or playbook where those parameters are set.

 If you see this error message, the task that generated it requires `enable` mode to succeed:

 
```
Invalid input (privileged mode required)

```
 To set `enable` mode for a specific task, add `become` at the task level:

 
```
- name: Gather facts (eos)
  arista.eos.eos_facts:
    gather_subset:
      - "!hardware"
  become: yes
  become_method: enable

```
 To set enable mode for all tasks in a single play, add `become` at the play level:

 
```
- hosts: eos-switches
  become: yes
  become_method: enable
  tasks:
    - name: Gather facts (eos)
      arista.eos.eos_facts:
        gather_subset:
          - "!hardware"

```
 ### Setting enable mode for all tasks

 Often you wish for all tasks in all plays to run using privilege mode, that is best achieved by using `group_vars`:

 **group\_vars/eos.yml**

 
```
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: arista.eos.eos
ansible_user: myuser
ansible_become: yes
ansible_become_method: enable

```
 #### Passwords for enable mode

 If you need a password to enter `enable` mode, you can specify it in one of two ways:

 * providing the [`--ask-become-pass`](../cli/ansible-playbook#cmdoption-ansible-playbook-K) command line option
* setting the `ansible_become_password` connection variable

  Warning

 As a reminder passwords should never be stored in plain text. For information on encrypting your passwords and other secrets with Ansible Vault, see [Encrypting content with Ansible Vault](vault#vault).

  ### authorize and auth\_pass

 Ansible still supports `enable` mode with `connection: local` for legacy network playbooks. To enter `enable` mode with `connection: local`, use the module options `authorize` and `auth_pass`:

 
```
- hosts: eos-switches
  ansible_connection: local
  tasks:
    - name: Gather facts (eos)
      eos_facts:
        gather_subset:
          - "!hardware"
      provider:
        authorize: yes
        auth_pass: " {{ secret_auth_pass }}"

```
 We recommend updating your playbooks to use `become` for network-device `enable` mode consistently. The use of `authorize` and of `provider` dictionaries will be deprecated in future. Check the [Platform Options](../network/user_guide/platform_index#platform-options) and [Network modules](https://docs.ansible.com/ansible/2.9/modules/list_of_network_modules.html#network-modules "(in Ansible v2.9)") documentation for details.

 Become and Windows
------------------

 Since Ansible 2.3, `become` can be used on Windows hosts through the `runas` method. Become on Windows uses the same inventory setup and invocation arguments as `become` on a non-Windows host, so the setup and variable names are the same as what is defined in this document.

 While `become` can be used to assume the identity of another user, there are other uses for it with Windows hosts. One important use is to bypass some of the limitations that are imposed when running on WinRM, such as constrained network delegation or accessing forbidden system calls like the WUA API. You can use `become` with the same user as `ansible_user` to bypass these limitations and run commands that are not normally accessible in a WinRM session.

 ### Administrative rights

 Many tasks in Windows require administrative privileges to complete. When using the `runas` become method, Ansible will attempt to run the module with the full privileges that are available to the remote user. If it fails to elevate the user token, it will continue to use the limited token during execution.

 A user must have the `SeDebugPrivilege` to run a become process with elevated privileges. This privilege is assigned to Administrators by default. If the debug privilege is not available, the become process will run with a limited set of privileges and groups.

 To determine the type of token that Ansible was able to get, run the following task:

 
```
- Check my user name
  ansible.windows.win_whoami:
  become: yes

```
 The output will look something similar to the below:

 
```
ok: [windows] => {
    "account": {
        "account_name": "vagrant-domain",
        "domain_name": "DOMAIN",
        "sid": "S-1-5-21-3088887838-4058132883-1884671576-1105",
        "type": "User"
    },
    "authentication_package": "Kerberos",
    "changed": false,
    "dns_domain_name": "DOMAIN.LOCAL",
    "groups": [
        {
            "account_name": "Administrators",
            "attributes": [
                "Mandatory",
                "Enabled by default",
                "Enabled",
                "Owner"
            ],
            "domain_name": "BUILTIN",
            "sid": "S-1-5-32-544",
            "type": "Alias"
        },
        {
            "account_name": "INTERACTIVE",
            "attributes": [
                "Mandatory",
                "Enabled by default",
                "Enabled"
            ],
            "domain_name": "NT AUTHORITY",
            "sid": "S-1-5-4",
            "type": "WellKnownGroup"
        },
    ],
    "impersonation_level": "SecurityAnonymous",
    "label": {
        "account_name": "High Mandatory Level",
        "domain_name": "Mandatory Label",
        "sid": "S-1-16-12288",
        "type": "Label"
    },
    "login_domain": "DOMAIN",
    "login_time": "2018-11-18T20:35:01.9696884+00:00",
    "logon_id": 114196830,
    "logon_server": "DC01",
    "logon_type": "Interactive",
    "privileges": {
        "SeBackupPrivilege": "disabled",
        "SeChangeNotifyPrivilege": "enabled-by-default",
        "SeCreateGlobalPrivilege": "enabled-by-default",
        "SeCreatePagefilePrivilege": "disabled",
        "SeCreateSymbolicLinkPrivilege": "disabled",
        "SeDebugPrivilege": "enabled",
        "SeDelegateSessionUserImpersonatePrivilege": "disabled",
        "SeImpersonatePrivilege": "enabled-by-default",
        "SeIncreaseBasePriorityPrivilege": "disabled",
        "SeIncreaseQuotaPrivilege": "disabled",
        "SeIncreaseWorkingSetPrivilege": "disabled",
        "SeLoadDriverPrivilege": "disabled",
        "SeManageVolumePrivilege": "disabled",
        "SeProfileSingleProcessPrivilege": "disabled",
        "SeRemoteShutdownPrivilege": "disabled",
        "SeRestorePrivilege": "disabled",
        "SeSecurityPrivilege": "disabled",
        "SeShutdownPrivilege": "disabled",
        "SeSystemEnvironmentPrivilege": "disabled",
        "SeSystemProfilePrivilege": "disabled",
        "SeSystemtimePrivilege": "disabled",
        "SeTakeOwnershipPrivilege": "disabled",
        "SeTimeZonePrivilege": "disabled",
        "SeUndockPrivilege": "disabled"
    },
    "rights": [
        "SeNetworkLogonRight",
        "SeBatchLogonRight",
        "SeInteractiveLogonRight",
        "SeRemoteInteractiveLogonRight"
    ],
    "token_type": "TokenPrimary",
    "upn": "vagrant-domain@DOMAIN.LOCAL",
    "user_flags": []
}

```
 Under the `label` key, the `account_name` entry determines whether the user has Administrative rights. Here are the labels that can be returned and what they represent:

 * `Medium`: Ansible failed to get an elevated token and ran under a limited token. Only a subset of the privileges assigned to user are available during the module execution and the user does not have administrative rights.
* `High`: An elevated token was used and all the privileges assigned to the user are available during the module execution.
* `System`: The `NT AUTHORITY\System` account is used and has the highest level of privileges available.

 The output will also show the list of privileges that have been granted to the user. When the privilege value is `disabled`, the privilege is assigned to the logon token but has not been enabled. In most scenarios these privileges are automatically enabled when required.

 If running on a version of Ansible that is older than 2.5 or the normal `runas` escalation process fails, an elevated token can be retrieved by:

 * Set the `become_user` to `System` which has full control over the operating system.
* Grant `SeTcbPrivilege` to the user Ansible connects with on WinRM. `SeTcbPrivilege` is a high-level privilege that grants full control over the operating system. No user is given this privilege by default, and care should be taken if you grant this privilege to a user or group. For more information on this privilege, please see [Act as part of the operating system](https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn221957(v=ws.11)). You can use the below task to set this privilege on a Windows host:

 
```
- name: grant the ansible user the SeTcbPrivilege right
  ansible.windows.win_user_right:
    name: SeTcbPrivilege
    users: '{{ansible_user}}'
    action: add

```
* Turn UAC off on the host and reboot before trying to become the user. UAC is a security protocol that is designed to run accounts with the `least privilege` principle. You can turn UAC off by running the following tasks:

 
```
- name: turn UAC off
  win_regedit:
    path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system
    name: EnableLUA
    data: 0
    type: dword
    state: present
  register: uac_result

- name: reboot after disabling UAC
  win_reboot:
  when: uac_result is changed

```

  Note

 Granting the `SeTcbPrivilege` or turning UAC off can cause Windows security vulnerabilities and care should be given if these steps are taken.

  ### Local service accounts

 Prior to Ansible version 2.5, `become` only worked on Windows with a local or domain user account. Local service accounts like `System` or `NetworkService` could not be used as `become_user` in these older versions. This restriction has been lifted since the 2.5 release of Ansible. The three service accounts that can be set under `become_user` are:

 * System
* NetworkService
* LocalService

 Because local service accounts do not have passwords, the `ansible_become_password` parameter is not required and is ignored if specified.

 ### Become without setting a password

 As of Ansible 2.8, `become` can be used to become a Windows local or domain account without requiring a password for that account. For this method to work, the following requirements must be met:

 * The connection user has the `SeDebugPrivilege` privilege assigned
* The connection user is part of the `BUILTIN\Administrators` group
* The `become_user` has either the `SeBatchLogonRight` or `SeNetworkLogonRight` user right

 Using become without a password is achieved in one of two different methods:

 * Duplicating an existing logon session’s token if the account is already logged on
* Using S4U to generate a logon token that is valid on the remote host only

 In the first scenario, the become process is spawned from another logon of that user account. This could be an existing RDP logon, console logon, but this is not guaranteed to occur all the time. This is similar to the `Run only when user is logged on` option for a Scheduled Task.

 In the case where another logon of the become account does not exist, S4U is used to create a new logon and run the module through that. This is similar to the `Run whether user is logged on or not` with the `Do not store password` option for a Scheduled Task. In this scenario, the become process will not be able to access any network resources like a normal WinRM process.

 To make a distinction between using become with no password and becoming an account that has no password make sure to keep `ansible_become_password` as undefined or set `ansible_become_password:`.

  Note

 Because there are no guarantees an existing token will exist for a user when Ansible runs, there’s a high change the become process will only have access to local resources. Use become with a password if the task needs to access network resources

  ### Accounts without a password

  Warning

 As a general security best practice, you should avoid allowing accounts without passwords.

  Ansible can be used to become a Windows account that does not have a password (like the `Guest` account). To become an account without a password, set up the variables like normal but set `ansible_become_password: ''`.

 Before become can work on an account like this, the local policy [Accounts: Limit local account use of blank passwords to console logon only](https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj852174(v=ws.11)) must be disabled. This can either be done through a Group Policy Object (GPO) or with this Ansible task:

 
```
- name: allow blank password on become
  ansible.windows.win_regedit:
    path: HKLM:\SYSTEM\CurrentControlSet\Control\Lsa
    name: LimitBlankPasswordUse
    data: 0
    type: dword
    state: present

```
  Note

 This is only for accounts that do not have a password. You still need to set the account’s password under `ansible_become_password` if the become\_user has a password.

  ### Become flags for Windows

 Ansible 2.5 added the `become_flags` parameter to the `runas` become method. This parameter can be set using the `become_flags` task directive or set in Ansible’s configuration using `ansible_become_flags`. The two valid values that are initially supported for this parameter are `logon_type` and `logon_flags`.

  Note

 These flags should only be set when becoming a normal user account, not a local service account like LocalSystem.

  The key `logon_type` sets the type of logon operation to perform. The value can be set to one of the following:

 * `interactive`: The default logon type. The process will be run under a context that is the same as when running a process locally. This bypasses all WinRM restrictions and is the recommended method to use.
* `batch`: Runs the process under a batch context that is similar to a scheduled task with a password set. This should bypass most WinRM restrictions and is useful if the `become_user` is not allowed to log on interactively.
* `new_credentials`: Runs under the same credentials as the calling user, but outbound connections are run under the context of the `become_user` and `become_password`, similar to `runas.exe /netonly`. The `logon_flags` flag should also be set to `netcredentials_only`. Use this flag if the process needs to access a network resource (like an SMB share) using a different set of credentials.
* `network`: Runs the process under a network context without any cached credentials. This results in the same type of logon session as running a normal WinRM process without credential delegation, and operates under the same restrictions.
* `network_cleartext`: Like the `network` logon type, but instead caches the credentials so it can access network resources. This is the same type of logon session as running a normal WinRM process with credential delegation.

 For more information, see [dwLogonType](https://docs.microsoft.com/en-gb/windows/desktop/api/winbase/nf-winbase-logonusera).

 The `logon_flags` key specifies how Windows will log the user on when creating the new process. The value can be set to none or multiple of the following:

 * `with_profile`: The default logon flag set. The process will load the user’s profile in the `HKEY_USERS` registry key to `HKEY_CURRENT_USER`.
* `netcredentials_only`: The process will use the same token as the caller but will use the `become_user` and `become_password` when accessing a remote resource. This is useful in inter-domain scenarios where there is no trust relationship, and should be used with the `new_credentials` `logon_type`.

 By default `logon_flags=with_profile` is set, if the profile should not be loaded set `logon_flags=` or if the profile should be loaded with `netcredentials_only`, set `logon_flags=with_profile,netcredentials_only`.

 For more information, see [dwLogonFlags](https://docs.microsoft.com/en-gb/windows/desktop/api/winbase/nf-winbase-createprocesswithtokenw).

 Here are some examples of how to use `become_flags` with Windows tasks:

 
```
- name: copy a file from a fileshare with custom credentials
  ansible.windows.win_copy:
    src: \\server\share\data\file.txt
    dest: C:\temp\file.txt
    remote_src: yes
  vars:
    ansible_become: yes
    ansible_become_method: runas
    ansible_become_user: DOMAIN\user
    ansible_become_password: Password01
    ansible_become_flags: logon_type=new_credentials logon_flags=netcredentials_only

- name: run a command under a batch logon
  ansible.windows.win_whoami:
  become: yes
  become_flags: logon_type=batch

- name: run a command and not load the user profile
  ansible.windows.win_whomai:
  become: yes
  become_flags: logon_flags=

```
 ### Limitations of become on Windows

 * Running a task with `async` and `become` on Windows Server 2008, 2008 R2 and Windows 7 only works when using Ansible 2.7 or newer.
* By default, the become user logs on with an interactive session, so it must have the right to do so on the Windows host. If it does not inherit the `SeAllowLogOnLocally` privilege or inherits the `SeDenyLogOnLocally` privilege, the become process will fail. Either add the privilege or set the `logon_type` flag to change the logon type used.
* Prior to Ansible version 2.3, become only worked when `ansible_winrm_transport` was either `basic` or `credssp`. This restriction has been lifted since the 2.4 release of Ansible for all hosts except Windows Server 2008 (non R2 version).
* The Secondary Logon service `seclogon` must be running to use `ansible_become_method: runas`

  See also

  [Mailing List](https://groups.google.com/forum/#!forum/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/become.html>

Loops
=====

 Ansible offers the `loop`, `with_<lookup>`, and `until` keywords to execute a task multiple times. Examples of commonly-used loops include changing ownership on several files and/or directories with the [file module](../collections/ansible/builtin/file_module#file-module), creating multiple users with the [user module](../collections/ansible/builtin/user_module#user-module), and repeating a polling step until a certain result is reached.

  Note

 * We added `loop` in Ansible 2.5. It is not yet a full replacement for `with_<lookup>`, but we recommend it for most use cases.
* We have not deprecated the use of `with_<lookup>` - that syntax will still be valid for the foreseeable future.
* We are looking to improve `loop` syntax - watch this page and the [changelog](https://github.com/ansible/ansible/tree/devel/changelogs) for updates.

  * [Comparing `loop` and `with_*`](#comparing-loop-and-with)
* [Standard loops](#standard-loops)


	+ [Iterating over a simple list](#iterating-over-a-simple-list)
	+ [Iterating over a list of hashes](#iterating-over-a-list-of-hashes)
	+ [Iterating over a dictionary](#iterating-over-a-dictionary)
* [Registering variables with a loop](#registering-variables-with-a-loop)
* [Complex loops](#complex-loops)


	+ [Iterating over nested lists](#iterating-over-nested-lists)
	+ [Retrying a task until a condition is met](#retrying-a-task-until-a-condition-is-met)
	+ [Looping over inventory](#looping-over-inventory)
* [Ensuring list input for `loop`: using `query` rather than `lookup`](#ensuring-list-input-for-loop-using-query-rather-than-lookup)
* [Adding controls to loops](#adding-controls-to-loops)


	+ [Limiting loop output with `label`](#limiting-loop-output-with-label)
	+ [Pausing within a loop](#pausing-within-a-loop)
	+ [Tracking progress through a loop with `index_var`](#tracking-progress-through-a-loop-with-index-var)
	+ [Defining inner and outer variable names with `loop_var`](#defining-inner-and-outer-variable-names-with-loop-var)
	+ [Extended loop variables](#extended-loop-variables)
	+ [Accessing the name of your loop\_var](#accessing-the-name-of-your-loop-var)
* [Migrating from with\_X to loop](#migrating-from-with-x-to-loop)


	+ [with\_list](#with-list)
	+ [with\_items](#with-items)
	+ [with\_indexed\_items](#with-indexed-items)
	+ [with\_flattened](#with-flattened)
	+ [with\_together](#with-together)
	+ [with\_dict](#with-dict)
	+ [with\_sequence](#with-sequence)
	+ [with\_subelements](#with-subelements)
	+ [with\_nested/with\_cartesian](#with-nested-with-cartesian)
	+ [with\_random\_choice](#with-random-choice)

 Comparing `loop` and `with_*`
-----------------------------

 * The `with_<lookup>` keywords rely on [Lookup Plugins](../plugins/lookup#lookup-plugins) - even `items` is a lookup.
* The `loop` keyword is equivalent to `with_list`, and is the best choice for simple loops.
* The `loop` keyword will not accept a string as input, see [Ensuring list input for loop: using query rather than lookup](#query-vs-lookup).
* Generally speaking, any use of `with_*` covered in [Migrating from with\_X to loop](#migrating-to-loop) can be updated to use `loop`.
* Be careful when changing `with_items` to `loop`, as `with_items` performed implicit single-level flattening. You may need to use `flatten(1)` with `loop` to match the exact outcome. For example, to get the same output as:

 
```
with_items:
  - 1
  - [2,3]
  - 4

```
 you would need:

 
```
loop: "{{ [1, [2,3] ,4] | flatten(1) }}"

```
 * Any `with_*` statement that requires using `lookup` within a loop should not be converted to use the `loop` keyword. For example, instead of doing:

 
```
loop: "{{ lookup('fileglob', '*.txt', wantlist=True) }}"

```
 it’s cleaner to keep:

 
```
with_fileglob: '*.txt'

```
 Standard loops
--------------

 ### Iterating over a simple list

 Repeated tasks can be written as standard loops over a simple list of strings. You can define the list directly in the task:

 
```
- name: Add several users
  ansible.builtin.user:
    name: "{{ item }}"
    state: present
    groups: "wheel"
  loop:
     - testuser1
     - testuser2

```
 You can define the list in a variables file, or in the ‘vars’ section of your play, then refer to the name of the list in the task:

 
```
loop: "{{ somelist }}"

```
 Either of these examples would be the equivalent of:

 
```
- name: Add user testuser1
  ansible.builtin.user:
    name: "testuser1"
    state: present
    groups: "wheel"

- name: Add user testuser2
  ansible.builtin.user:
    name: "testuser2"
    state: present
    groups: "wheel"

```
 You can pass a list directly to a parameter for some plugins. Most of the packaging modules, like [yum](../collections/ansible/builtin/yum_module#yum-module) and [apt](../collections/ansible/builtin/apt_module#apt-module), have this capability. When available, passing the list to a parameter is better than looping over the task. For example:

 
```
- name: Optimal yum
  ansible.builtin.yum:
    name: "{{  list_of_packages  }}"
    state: present

- name: Non-optimal yum, slower and may cause issues with interdependencies
  ansible.builtin.yum:
    name: "{{  item  }}"
    state: present
  loop: "{{  list_of_packages  }}"

```
 Check the [module documentation](https://docs.ansible.com/ansible/2.9/modules/modules_by_category.html#modules-by-category "(in Ansible v2.9)") to see if you can pass a list to any particular module’s parameter(s).

 ### Iterating over a list of hashes

 If you have a list of hashes, you can reference subkeys in a loop. For example:

 
```
- name: Add several users
  ansible.builtin.user:
    name: "{{ item.name }}"
    state: present
    groups: "{{ item.groups }}"
  loop:
    - { name: 'testuser1', groups: 'wheel' }
    - { name: 'testuser2', groups: 'root' }

```
 When combining [conditionals](playbooks_conditionals#playbooks-conditionals) with a loop, the `when:` statement is processed separately for each item. See [Basic conditionals with when](playbooks_conditionals#the-when-statement) for examples.

 ### Iterating over a dictionary

 To loop over a dict, use the [dict2items](playbooks_filters#dict-filter):

 
```
- name: Using dict2items
  ansible.builtin.debug:
    msg: "{{ item.key }} - {{ item.value }}"
  loop: "{{ tag_data | dict2items }}"
  vars:
    tag_data:
      Environment: dev
      Application: payment

```
 Here, we are iterating over `tag_data` and printing the key and the value from it.

 Registering variables with a loop
---------------------------------

 You can register the output of a loop as a variable. For example:

 
```
- name: Register loop output as a variable
  ansible.builtin.shell: "echo {{ item }}"
  loop:
    - "one"
    - "two"
  register: echo

```
 When you use `register` with a loop, the data structure placed in the variable will contain a `results` attribute that is a list of all responses from the module. This differs from the data structure returned when using `register` without a loop:

 
```
{
    "changed": true,
    "msg": "All items completed",
    "results": [
        {
            "changed": true,
            "cmd": "echo \"one\" ",
            "delta": "0:00:00.003110",
            "end": "2013-12-19 12:00:05.187153",
            "invocation": {
                "module_args": "echo \"one\"",
                "module_name": "shell"
            },
            "item": "one",
            "rc": 0,
            "start": "2013-12-19 12:00:05.184043",
            "stderr": "",
            "stdout": "one"
        },
        {
            "changed": true,
            "cmd": "echo \"two\" ",
            "delta": "0:00:00.002920",
            "end": "2013-12-19 12:00:05.245502",
            "invocation": {
                "module_args": "echo \"two\"",
                "module_name": "shell"
            },
            "item": "two",
            "rc": 0,
            "start": "2013-12-19 12:00:05.242582",
            "stderr": "",
            "stdout": "two"
        }
    ]
}

```
 Subsequent loops over the registered variable to inspect the results may look like:

 
```
- name: Fail if return code is not 0
  ansible.builtin.fail:
    msg: "The command ({{ item.cmd }}) did not have a 0 return code"
  when: item.rc != 0
  loop: "{{ echo.results }}"

```
 During iteration, the result of the current item will be placed in the variable:

 
```
- name: Place the result of the current item in the variable
  ansible.builtin.shell: echo "{{ item }}"
  loop:
    - one
    - two
  register: echo
  changed_when: echo.stdout != "one"

```
 Complex loops
-------------

 ### Iterating over nested lists

 You can use Jinja2 expressions to iterate over complex lists. For example, a loop can combine nested lists:

 
```
- name: Give users access to multiple databases
  community.mysql.mysql_user:
    name: "{{ item[0] }}"
    priv: "{{ item[1] }}.*:ALL"
    append_privs: yes
    password: "foo"
  loop: "{{ ['alice', 'bob'] |product(['clientdb', 'employeedb', 'providerdb'])|list }}"

```
 ### Retrying a task until a condition is met

  New in version 1.4.

  You can use the `until` keyword to retry a task until a certain condition is met. Here’s an example:

 
```
- name: Retry a task until a certain condition is met
  ansible.builtin.shell: /usr/bin/foo
  register: result
  until: result.stdout.find("all systems go") != -1
  retries: 5
  delay: 10

```
 This task runs up to 5 times with a delay of 10 seconds between each attempt. If the result of any attempt has “all systems go” in its stdout, the task succeeds. The default value for “retries” is 3 and “delay” is 5.

 To see the results of individual retries, run the play with `-vv`.

 When you run a task with `until` and register the result as a variable, the registered variable will include a key called “attempts”, which records the number of the retries for the task.

  Note

 You must set the `until` parameter if you want a task to retry. If `until` is not defined, the value for the `retries` parameter is forced to 1.

  ### Looping over inventory

 To loop over your inventory, or just a subset of it, you can use a regular `loop` with the `ansible_play_batch` or `groups` variables:

 
```
- name: Show all the hosts in the inventory
  ansible.builtin.debug:
    msg: "{{ item }}"
  loop: "{{ groups['all'] }}"

- name: Show all the hosts in the current play
  ansible.builtin.debug:
    msg: "{{ item }}"
  loop: "{{ ansible_play_batch }}"

```
 There is also a specific lookup plugin `inventory_hostnames` that can be used like this:

 
```
- name: Show all the hosts in the inventory
  ansible.builtin.debug:
    msg: "{{ item }}"
  loop: "{{ query('inventory_hostnames', 'all') }}"

- name: Show all the hosts matching the pattern, ie all but the group www
  ansible.builtin.debug:
    msg: "{{ item }}"
  loop: "{{ query('inventory_hostnames', 'all:!www') }}"

```
 More information on the patterns can be found in [Patterns: targeting hosts and groups](intro_patterns#intro-patterns).

 Ensuring list input for `loop`: using `query` rather than `lookup`
------------------------------------------------------------------

 The `loop` keyword requires a list as input, but the `lookup` keyword returns a string of comma-separated values by default. Ansible 2.5 introduced a new Jinja2 function named [query](../plugins/lookup#query) that always returns a list, offering a simpler interface and more predictable output from lookup plugins when using the `loop` keyword.

 You can force `lookup` to return a list to `loop` by using `wantlist=True`, or you can use `query` instead.

 These examples do the same thing:

 
```
loop: "{{ query('inventory_hostnames', 'all') }}"

loop: "{{ lookup('inventory_hostnames', 'all', wantlist=True) }}"

```
 Adding controls to loops
------------------------

  New in version 2.1.

  The `loop_control` keyword lets you manage your loops in useful ways.

 ### Limiting loop output with `label`

  New in version 2.2.

  When looping over complex data structures, the console output of your task can be enormous. To limit the displayed output, use the `label` directive with `loop_control`:

 
```
- name: Create servers
  digital_ocean:
    name: "{{ item.name }}"
    state: present
  loop:
    - name: server1
      disks: 3gb
      ram: 15Gb
      network:
        nic01: 100Gb
        nic02: 10Gb
        ...
  loop_control:
    label: "{{ item.name }}"

```
 The output of this task will display just the `name` field for each `item` instead of the entire contents of the multi-line `{{ item }}` variable.

  Note

 This is for making console output more readable, not protecting sensitive data. If there is sensitive data in `loop`, set `no_log: yes` on the task to prevent disclosure.

  ### Pausing within a loop

  New in version 2.2.

  To control the time (in seconds) between the execution of each item in a task loop, use the `pause` directive with `loop_control`:

 
```
# main.yml
- name: Create servers, pause 3s before creating next
  community.digitalocean.digital_ocean:
    name: "{{ item }}"
    state: present
  loop:
    - server1
    - server2
  loop_control:
    pause: 3

```
 ### Tracking progress through a loop with `index_var`

  New in version 2.5.

  To keep track of where you are in a loop, use the `index_var` directive with `loop_control`. This directive specifies a variable name to contain the current loop index:

 
```
- name: Count our fruit
  ansible.builtin.debug:
    msg: "{{ item }} with index {{ my_idx }}"
  loop:
    - apple
    - banana
    - pear
  loop_control:
    index_var: my_idx

```
  Note

 `index_var` is 0 indexed.

  ### Defining inner and outer variable names with `loop_var`

  New in version 2.1.

  You can nest two looping tasks using `include_tasks`. However, by default Ansible sets the loop variable `item` for each loop. This means the inner, nested loop will overwrite the value of `item` from the outer loop. You can specify the name of the variable for each loop using `loop_var` with `loop_control`:

 
```
# main.yml
- include_tasks: inner.yml
  loop:
    - 1
    - 2
    - 3
  loop_control:
    loop_var: outer_item

# inner.yml
- name: Print outer and inner items
  ansible.builtin.debug:
    msg: "outer item={{ outer_item }} inner item={{ item }}"
  loop:
    - a
    - b
    - c

```
  Note

 If Ansible detects that the current loop is using a variable which has already been defined, it will raise an error to fail the task.

  ### Extended loop variables

  New in version 2.8.

  As of Ansible 2.8 you can get extended loop information using the `extended` option to loop control. This option will expose the following information.

 

|  |  |
| --- | --- |
| Variable | Description |
| `ansible_loop.allitems` | The list of all items in the loop |
| `ansible_loop.index` | The current iteration of the loop. (1 indexed) |
| `ansible_loop.index0` | The current iteration of the loop. (0 indexed) |
| `ansible_loop.revindex` | The number of iterations from the end of the loop (1 indexed) |
| `ansible_loop.revindex0` | The number of iterations from the end of the loop (0 indexed) |
| `ansible_loop.first` | `True` if first iteration |
| `ansible_loop.last` | `True` if last iteration |
| `ansible_loop.length` | The number of items in the loop |
| `ansible_loop.previtem` | The item from the previous iteration of the loop. Undefined during the first iteration. |
| `ansible_loop.nextitem` | The item from the following iteration of the loop. Undefined during the last iteration. |

 
```
loop_control:
  extended: yes

```
 ### Accessing the name of your loop\_var

  New in version 2.8.

  As of Ansible 2.8 you can get the name of the value provided to `loop_control.loop_var` using the `ansible_loop_var` variable

 For role authors, writing roles that allow loops, instead of dictating the required `loop_var` value, you can gather the value via:

 
```
"{{ lookup('vars', ansible_loop_var) }}"

```
 Migrating from with\_X to loop
------------------------------

 In most cases, loops work best with the `loop` keyword instead of `with_X` style loops. The `loop` syntax is usually best expressed using filters instead of more complex use of `query` or `lookup`.

 These examples show how to convert many common `with_` style loops to `loop` and filters.

 ### with\_list

 `with_list` is directly replaced by `loop`.

 
```
- name: with_list
  ansible.builtin.debug:
    msg: "{{ item }}"
  with_list:
    - one
    - two

- name: with_list -> loop
  ansible.builtin.debug:
    msg: "{{ item }}"
  loop:
    - one
    - two

```
 ### with\_items

 `with_items` is replaced by `loop` and the `flatten` filter.

 
```
- name: with_items
  ansible.builtin.debug:
    msg: "{{ item }}"
  with_items: "{{ items }}"

- name: with_items -> loop
  ansible.builtin.debug:
    msg: "{{ item }}"
  loop: "{{ items|flatten(levels=1) }}"

```
 ### with\_indexed\_items

 `with_indexed_items` is replaced by `loop`, the `flatten` filter and `loop_control.index_var`.

 
```
- name: with_indexed_items
  ansible.builtin.debug:
    msg: "{{ item.0 }} - {{ item.1 }}"
  with_indexed_items: "{{ items }}"

- name: with_indexed_items -> loop
  ansible.builtin.debug:
    msg: "{{ index }} - {{ item }}"
  loop: "{{ items|flatten(levels=1) }}"
  loop_control:
    index_var: index

```
 ### with\_flattened

 `with_flattened` is replaced by `loop` and the `flatten` filter.

 
```
- name: with_flattened
  ansible.builtin.debug:
    msg: "{{ item }}"
  with_flattened: "{{ items }}"

- name: with_flattened -> loop
  ansible.builtin.debug:
    msg: "{{ item }}"
  loop: "{{ items|flatten }}"

```
 ### with\_together

 `with_together` is replaced by `loop` and the `zip` filter.

 
```
- name: with_together
  ansible.builtin.debug:
    msg: "{{ item.0 }} - {{ item.1 }}"
  with_together:
    - "{{ list_one }}"
    - "{{ list_two }}"

- name: with_together -> loop
  ansible.builtin.debug:
    msg: "{{ item.0 }} - {{ item.1 }}"
  loop: "{{ list_one|zip(list_two)|list }}"

```
 Another example with complex data

 
```
- name: with_together -> loop
  ansible.builtin.debug:
    msg: "{{ item.0 }} - {{ item.1 }} - {{ item.2 }}"
  loop: "{{ data[0]|zip(*data[1:])|list }}"
  vars:
    data:
      - ['a', 'b', 'c']
      - ['d', 'e', 'f']
      - ['g', 'h', 'i']

```
 ### with\_dict

 `with_dict` can be substituted by `loop` and either the `dictsort` or `dict2items` filters.

 
```
- name: with_dict
  ansible.builtin.debug:
    msg: "{{ item.key }} - {{ item.value }}"
  with_dict: "{{ dictionary }}"

- name: with_dict -> loop (option 1)
  ansible.builtin.debug:
    msg: "{{ item.key }} - {{ item.value }}"
  loop: "{{ dictionary|dict2items }}"

- name: with_dict -> loop (option 2)
  ansible.builtin.debug:
    msg: "{{ item.0 }} - {{ item.1 }}"
  loop: "{{ dictionary|dictsort }}"

```
 ### with\_sequence

 `with_sequence` is replaced by `loop` and the `range` function, and potentially the `format` filter.

 
```
- name: with_sequence
  ansible.builtin.debug:
    msg: "{{ item }}"
  with_sequence: start=0 end=4 stride=2 format=testuser%02x

- name: with_sequence -> loop
  ansible.builtin.debug:
    msg: "{{ 'testuser%02x' | format(item) }}"
  # range is exclusive of the end point
  loop: "{{ range(0, 4 + 1, 2)|list }}"

```
 ### with\_subelements

 `with_subelements` is replaced by `loop` and the `subelements` filter.

 
```
- name: with_subelements
  ansible.builtin.debug:
    msg: "{{ item.0.name }} - {{ item.1 }}"
  with_subelements:
    - "{{ users }}"
    - mysql.hosts

- name: with_subelements -> loop
  ansible.builtin.debug:
    msg: "{{ item.0.name }} - {{ item.1 }}"
  loop: "{{ users|subelements('mysql.hosts') }}"

```
 ### with\_nested/with\_cartesian

 `with_nested` and `with_cartesian` are replaced by loop and the `product` filter.

 
```
- name: with_nested
  ansible.builtin.debug:
    msg: "{{ item.0 }} - {{ item.1 }}"
  with_nested:
    - "{{ list_one }}"
    - "{{ list_two }}"

- name: with_nested -> loop
  ansible.builtin.debug:
    msg: "{{ item.0 }} - {{ item.1 }}"
  loop: "{{ list_one|product(list_two)|list }}"

```
 ### with\_random\_choice

 `with_random_choice` is replaced by just use of the `random` filter, without need of `loop`.

 
```
- name: with_random_choice
  ansible.builtin.debug:
    msg: "{{ item }}"
  with_random_choice: "{{ my_list }}"

- name: with_random_choice -> loop (No loop is needed here)
  ansible.builtin.debug:
    msg: "{{ my_list|random }}"
  tags: random

```
  See also

  [Intro to playbooks](playbooks_intro#about-playbooks)

An introduction to playbooks

  [Roles](playbooks_reuse_roles#playbooks-reuse-roles)

Playbook organization by roles

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [Conditionals](playbooks_conditionals#playbooks-conditionals)

Conditional statements in playbooks

  [Using Variables](playbooks_variables#playbooks-variables)

All about variables

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html>

Conditionals
============

 In a playbook, you may want to execute different tasks, or have different goals, depending on the value of a fact (data about the remote system), a variable, or the result of a previous task. You may want the value of some variables to depend on the value of other variables. Or you may want to create additional groups of hosts based on whether the hosts match other criteria. You can do all of these things with conditionals.

 Ansible uses Jinja2 [tests](playbooks_tests#playbooks-tests) and [filters](playbooks_filters#playbooks-filters) in conditionals. Ansible supports all the standard tests and filters, and adds some unique ones as well.

  Note

 There are many options to control execution flow in Ansible. You can find more examples of supported conditionals at <https://jinja.palletsprojects.com/en/master/templates/#comparisons>.

  * [Basic conditionals with `when`](#basic-conditionals-with-when)


	+ [Conditionals based on ansible\_facts](#conditionals-based-on-ansible-facts)
	+ [Conditions based on registered variables](#conditions-based-on-registered-variables)
	+ [Conditionals based on variables](#conditionals-based-on-variables)
	+ [Using conditionals in loops](#using-conditionals-in-loops)
	+ [Loading custom facts](#loading-custom-facts)
	+ [Conditionals with re-use](#conditionals-with-re-use)
	
	
		- [Conditionals with imports](#conditionals-with-imports)
		- [Conditionals with includes](#conditionals-with-includes)
		- [Conditionals with roles](#conditionals-with-roles)
	+ [Selecting variables, files, or templates based on facts](#selecting-variables-files-or-templates-based-on-facts)
	
	
		- [Selecting variables files based on facts](#selecting-variables-files-based-on-facts)
		- [Selecting files and templates based on facts](#selecting-files-and-templates-based-on-facts)
* [Commonly-used facts](#commonly-used-facts)


	+ [ansible\_facts[‘distribution’]](#ansible-facts-distribution)
	+ [ansible\_facts[‘distribution\_major\_version’]](#ansible-facts-distribution-major-version)
	+ [ansible\_facts[‘os\_family’]](#ansible-facts-os-family)

 Basic conditionals with `when`
------------------------------

 The simplest conditional statement applies to a single task. Create the task, then add a `when` statement that applies a test. The `when` clause is a raw Jinja2 expression without double curly braces (see [group\_by\_module](https://docs.ansible.com/ansible/3/collections/ansible/builtin/group_by_module.html#group-by-module "(in Ansible v3)")). When you run the task or playbook, Ansible evaluates the test for all hosts. On any host where the test passes (returns a value of True), Ansible runs that task. For example, if you are installing mysql on multiple machines, some of which have SELinux enabled, you might have a task to configure SELinux to allow mysql to run. You would only want that task to run on machines that have SELinux enabled:

 
```
tasks:
  - name: Configure SELinux to start mysql on any port
    ansible.posix.seboolean:
      name: mysql_connect_any
      state: true
      persistent: yes
    when: ansible_selinux.status == "enabled"
    # all variables can be used directly in conditionals without double curly braces

```
 ### Conditionals based on ansible\_facts

 Often you want to execute or skip a task based on facts. Facts are attributes of individual hosts, including IP address, operating system, the status of a filesystem, and many more. With conditionals based on facts:

 * You can install a certain package only when the operating system is a particular version.
* You can skip configuring a firewall on hosts with internal IP addresses.
* You can perform cleanup tasks only when a filesystem is getting full.

 See [Commonly-used facts](#commonly-used-facts) for a list of facts that frequently appear in conditional statements. Not all facts exist for all hosts. For example, the ‘lsb\_major\_release’ fact used in an example below only exists when the lsb\_release package is installed on the target host. To see what facts are available on your systems, add a debug task to your playbook:

 
```
- name: Show facts available on the system
  ansible.builtin.debug:
    var: ansible_facts

```
 Here is a sample conditional based on a fact:

 
```
tasks:
  - name: Shut down Debian flavored systems
    ansible.builtin.command: /sbin/shutdown -t now
    when: ansible_facts['os_family'] == "Debian"

```
 If you have multiple conditions, you can group them with parentheses:

 
```
tasks:
  - name: Shut down CentOS 6 and Debian 7 systems
    ansible.builtin.command: /sbin/shutdown -t now
    when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "6") or
          (ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_major_version'] == "7")

```
 You can use [logical operators](https://jinja.palletsprojects.com/en/master/templates/#logic) to combine conditions. When you have multiple conditions that all need to be true (that is, a logical `and`), you can specify them as a list:

 
```
tasks:
  - name: Shut down CentOS 6 systems
    ansible.builtin.command: /sbin/shutdown -t now
    when:
      - ansible_facts['distribution'] == "CentOS"
      - ansible_facts['distribution_major_version'] == "6"

```
 If a fact or variable is a string, and you need to run a mathematical comparison on it, use a filter to ensure that Ansible reads the value as an integer:

 
```
tasks:
  - ansible.builtin.shell: echo "only on Red Hat 6, derivatives, and later"
    when: ansible_facts['os_family'] == "RedHat" and ansible_facts['lsb']['major_release'] | int >= 6

```
 ### Conditions based on registered variables

 Often in a playbook you want to execute or skip a task based on the outcome of an earlier task. For example, you might want to configure a service after it is upgraded by an earlier task. To create a conditional based on a registered variable:

 1. Register the outcome of the earlier task as a variable.
2. Create a conditional test based on the registered variable.

 You create the name of the registered variable using the `register` keyword. A registered variable always contains the status of the task that created it as well as any output that task generated. You can use registered variables in templates and action lines as well as in conditional `when` statements. You can access the string contents of the registered variable using `variable.stdout`. For example:

 
```
- name: Test play
  hosts: all

  tasks:

      - name: Register a variable
        ansible.builtin.shell: cat /etc/motd
        register: motd_contents

      - name: Use the variable in conditional statement
        ansible.builtin.shell: echo "motd contains the word hi"
        when: motd_contents.stdout.find('hi') != -1

```
 You can use registered results in the loop of a task if the variable is a list. If the variable is not a list, you can convert it into a list, with either `stdout_lines` or with `variable.stdout.split()`. You can also split the lines by other fields:

 
```
- name: Registered variable usage as a loop list
  hosts: all
  tasks:

    - name: Retrieve the list of home directories
      ansible.builtin.command: ls /home
      register: home_dirs

    - name: Add home dirs to the backup spooler
      ansible.builtin.file:
        path: /mnt/bkspool/{{ item }}
        src: /home/{{ item }}
        state: link
      loop: "{{ home_dirs.stdout_lines }}"
      # same as loop: "{{ home_dirs.stdout.split() }}"

```
 The string content of a registered variable can be empty. If you want to run another task only on hosts where the stdout of your registered variable is empty, check the registered variable’s string contents for emptiness:

 
```
- name: check registered variable for emptiness
  hosts: all

  tasks:

      - name: List contents of directory
        ansible.builtin.command: ls mydir
        register: contents

      - name: Check contents for emptiness
        ansible.builtin.debug:
          msg: "Directory is empty"
        when: contents.stdout == ""

```
 Ansible always registers something in a registered variable for every host, even on hosts where a task fails or Ansible skips a task because a condition is not met. To run a follow-up task on these hosts, query the registered variable for `is skipped` (not for “undefined” or “default”). See [Registering variables](playbooks_variables#registered-variables) for more information. Here are sample conditionals based on the success or failure of a task. Remember to ignore errors if you want Ansible to continue executing on a host when a failure occurs:

 
```
tasks:
  - name: Register a variable, ignore errors and continue
    ansible.builtin.command: /bin/false
    register: result
    ignore_errors: true

  - name: Run only if the task that registered the "result" variable fails
    ansible.builtin.command: /bin/something
    when: result is failed

  - name: Run only if the task that registered the "result" variable succeeds
    ansible.builtin.command: /bin/something_else
    when: result is succeeded

  - name: Run only if the task that registered the "result" variable is skipped
    ansible.builtin.command: /bin/still/something_else
    when: result is skipped

```
  Note

 Older versions of Ansible used `success` and `fail`, but `succeeded` and `failed` use the correct tense. All of these options are now valid.

  ### Conditionals based on variables

 You can also create conditionals based on variables defined in the playbooks or inventory. Because conditionals require boolean input (a test must evaluate as True to trigger the condition), you must apply the `| bool` filter to non boolean variables, such as string variables with content like ‘yes’, ‘on’, ‘1’, or ‘true’. You can define variables like this:

 
```
vars:
  epic: true
  monumental: "yes"

```
 With the variables above, Ansible would run one of these tasks and skip the other:

 
```
tasks:
    - name: Run the command if "epic" or "monumental" is true
      ansible.builtin.shell: echo "This certainly is epic!"
      when: epic or monumental | bool

    - name: Run the command if "epic" is false
      ansible.builtin.shell: echo "This certainly isn't epic!"
      when: not epic

```
 If a required variable has not been set, you can skip or fail using Jinja2’s `defined` test. For example:

 
```
tasks:
    - name: Run the command if "foo" is defined
      ansible.builtin.shell: echo "I've got '{{ foo }}' and am not afraid to use it!"
      when: foo is defined

    - name: Fail if "bar" is undefined
      ansible.builtin.fail: msg="Bailing out. This play requires 'bar'"
      when: bar is undefined

```
 This is especially useful in combination with the conditional import of vars files (see below). As the examples show, you do not need to use `{{ }}` to use variables inside conditionals, as these are already implied.

 ### Using conditionals in loops

 If you combine a `when` statement with a [loop](playbooks_loops#playbooks-loops), Ansible processes the condition separately for each item. This is by design, so you can execute the task on some items in the loop and skip it on other items. For example:

 
```
tasks:
    - name: Run with items greater than 5
      ansible.builtin.command: echo {{ item }}
      loop: [ 0, 2, 4, 6, 8, 10 ]
      when: item > 5

```
 If you need to skip the whole task when the loop variable is undefined, use the `|default` filter to provide an empty iterator. For example, when looping over a list:

 
```
- name: Skip the whole task when a loop variable is undefined
  ansible.builtin.command: echo {{ item }}
  loop: "{{ mylist|default([]) }}"
  when: item > 5

```
 You can do the same thing when looping over a dict:

 
```
- name: The same as above using a dict
  ansible.builtin.command: echo {{ item.key }}
  loop: "{{ query('dict', mydict|default({})) }}"
  when: item.value > 5

```
 ### Loading custom facts

 You can provide your own facts, as described in [Should you develop a module?](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules.html#developing-modules). To run them, just make a call to your own custom fact gathering module at the top of your list of tasks, and variables returned there will be accessible to future tasks:

 
```
tasks:
    - name: Gather site specific fact data
      action: site_facts

    - name: Use a custom fact
      ansible.builtin.command: /usr/bin/thingy
      when: my_custom_fact_just_retrieved_from_the_remote_system == '1234'

```
 ### Conditionals with re-use

 You can use conditionals with re-usable tasks files, playbooks, or roles. Ansible executes these conditional statements differently for dynamic re-use (includes) and for static re-use (imports). See [Re-using Ansible artifacts](playbooks_reuse#playbooks-reuse) for more information on re-use in Ansible.

 #### Conditionals with imports

 When you add a conditional to an import statement, Ansible applies the condition to all tasks within the imported file. This behavior is the equivalent of [Tag inheritance: adding tags to multiple tasks](playbooks_tags#tag-inheritance). Ansible applies the condition to every task, and evaluates each task separately. For example, you might have a playbook called `main.yml` and a tasks file called `other_tasks.yml`:

 
```
# all tasks within an imported file inherit the condition from the import statement
# main.yml
- import_tasks: other_tasks.yml # note "import"
  when: x is not defined

# other_tasks.yml
- name: Set a variable
  ansible.builtin.set_fact:
    x: foo

- name: Print a variable
  ansible.builtin.debug:
    var: x

```
 Ansible expands this at execution time to the equivalent of:

 
```
- name: Set a variable if not defined
  ansible.builtin.set_fact:
    x: foo
  when: x is not defined
  # this task sets a value for x

- name: Do the task if "x" is not defined
  ansible.builtin.debug:
    var: x
  when: x is not defined
  # Ansible skips this task, because x is now defined

```
 Thus if `x` is initially undefined, the `debug` task will be skipped. If this is not the behavior you want, use an `include_*` statement to apply a condition only to that statement itself.

 You can apply conditions to `import_playbook` as well as to the other `import_*` statements. When you use this approach, Ansible returns a ‘skipped’ message for every task on every host that does not match the criteria, creating repetitive output. In many cases the [group\_by module](../collections/ansible/builtin/group_by_module#group-by-module) can be a more streamlined way to accomplish the same objective; see [Handling OS and distro differences](playbooks_best_practices#os-variance).

 #### Conditionals with includes

 When you use a conditional on an `include_*` statement, the condition is applied only to the include task itself and not to any other tasks within the included file(s). To contrast with the example used for conditionals on imports above, look at the same playbook and tasks file, but using an include instead of an import:

 
```
# Includes let you re-use a file to define a variable when it is not already defined

# main.yml
- include_tasks: other_tasks.yml
  when: x is not defined

# other_tasks.yml
- name: Set a variable
  ansible.builtin.set_fact:
    x: foo

- name: Print a variable
  ansible.builtin.debug:
    var: x

```
 Ansible expands this at execution time to the equivalent of:

 
```
# main.yml
- include_tasks: other_tasks.yml
  when: x is not defined
  # if condition is met, Ansible includes other_tasks.yml

# other_tasks.yml
- name: Set a variable
  ansible.builtin.set_fact:
    x: foo
  # no condition applied to this task, Ansible sets the value of x to foo

- name: Print a variable
  ansible.builtin.debug:
    var: x
  # no condition applied to this task, Ansible prints the debug statement

```
 By using `include_tasks` instead of `import_tasks`, both tasks from `other_tasks.yml` will be executed as expected. For more information on the differences between `include` v `import` see [Re-using Ansible artifacts](playbooks_reuse#playbooks-reuse).

 #### Conditionals with roles

 There are three ways to apply conditions to roles:

 * Add the same condition or conditions to all tasks in the role by placing your `when` statement under the `roles` keyword. See the example in this section.
* Add the same condition or conditions to all tasks in the role by placing your `when` statement on a static `import_role` in your playbook.
* Add a condition or conditions to individual tasks or blocks within the role itself. This is the only approach that allows you to select or skip some tasks within the role based on your `when` statement. To select or skip tasks within the role, you must have conditions set on individual tasks or blocks, use the dynamic `include_role` in your playbook, and add the condition or conditions to the include. When you use this approach, Ansible applies the condition to the include itself plus any tasks in the role that also have that `when` statement.

 When you incorporate a role in your playbook statically with the `roles` keyword, Ansible adds the conditions you define to all the tasks in the role. For example:

 
```
- hosts: webservers
  roles:
     - role: debian_stock_config
       when: ansible_facts['os_family'] == 'Debian'

```
 ### Selecting variables, files, or templates based on facts

 Sometimes the facts about a host determine the values you want to use for certain variables or even the file or template you want to select for that host. For example, the names of packages are different on CentOS and on Debian. The configuration files for common services are also different on different OS flavors and versions. To load different variables file, templates, or other files based on a fact about the hosts:

 1. name your vars files, templates, or files to match the Ansible fact that differentiates them
2. select the correct vars file, template, or file for each host with a variable based on that Ansible fact

 Ansible separates variables from tasks, keeping your playbooks from turning into arbitrary code with nested conditionals. This approach results in more streamlined and auditable configuration rules because there are fewer decision points to track.

 #### Selecting variables files based on facts

 You can create a playbook that works on multiple platforms and OS versions with a minimum of syntax by placing your variable values in vars files and conditionally importing them. If you want to install Apache on some CentOS and some Debian servers, create variables files with YAML keys and values. For example:

 
```
---
# for vars/RedHat.yml
apache: httpd
somethingelse: 42

```
 Then import those variables files based on the facts you gather on the hosts in your playbook:

 
```
---
- hosts: webservers
  remote_user: root
  vars_files:
    - "vars/common.yml"
    - [ "vars/{{ ansible_facts['os_family'] }}.yml", "vars/os_defaults.yml" ]
  tasks:
  - name: Make sure apache is started
    ansible.builtin.service:
      name: '{{ apache }}'
      state: started

```
 Ansible gathers facts on the hosts in the webservers group, then interpolates the variable “ansible\_facts[‘os\_family’]” into a list of filenames. If you have hosts with Red Hat operating systems (CentOS, for example), Ansible looks for ‘vars/RedHat.yml’. If that file does not exist, Ansible attempts to load ‘vars/os\_defaults.yml’. For Debian hosts, Ansible first looks for ‘vars/Debian.yml’, before falling back on ‘vars/os\_defaults.yml’. If no files in the list are found, Ansible raises an error.

 #### Selecting files and templates based on facts

 You can use the same approach when different OS flavors or versions require different configuration files or templates. Select the appropriate file or template based on the variables assigned to each host. This approach is often much cleaner than putting a lot of conditionals into a single template to cover multiple OS or package versions.

 For example, you can template out a configuration file that is very different between, say, CentOS and Debian:

 
```
- name: Template a file
  ansible.builtin.template:
    src: "{{ item }}"
    dest: /etc/myapp/foo.conf
  loop: "{{ query('first_found', { 'files': myfiles, 'paths': mypaths}) }}"
  vars:
    myfiles:
      - "{{ ansible_facts['distribution'] }}.conf"
      -  default.conf
    mypaths: ['search_location_one/somedir/', '/opt/other_location/somedir/']

```
 Commonly-used facts
-------------------

 The following Ansible facts are frequently used in conditionals.

 ### ansible\_facts[‘distribution’]

 Possible values (sample, not complete list):

 
```
Alpine
Altlinux
Amazon
Archlinux
ClearLinux
Coreos
CentOS
Debian
Fedora
Gentoo
Mandriva
NA
OpenWrt
OracleLinux
RedHat
Slackware
SLES
SMGL
SUSE
Ubuntu
VMwareESX

```
 ### ansible\_facts[‘distribution\_major\_version’]

 The major version of the operating system. For example, the value is `16` for Ubuntu 16.04.

 ### ansible\_facts[‘os\_family’]

 Possible values (sample, not complete list):

 
```
AIX
Alpine
Altlinux
Archlinux
Darwin
Debian
FreeBSD
Gentoo
HP-UX
Mandrake
RedHat
SGML
Slackware
Solaris
Suse
Windows

```
  See also

  [Working with playbooks](playbooks#working-with-playbooks)

An introduction to playbooks

  [Roles](playbooks_reuse_roles#playbooks-reuse-roles)

Playbook organization by roles

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [Using Variables](playbooks_variables#playbooks-variables)

All about variables

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html>

Blocks
======

 Blocks create logical groups of tasks. Blocks also offer ways to handle task errors, similar to exception handling in many programming languages.

 * [Grouping tasks with blocks](#grouping-tasks-with-blocks)
* [Handling errors with blocks](#handling-errors-with-blocks)

 Grouping tasks with blocks
--------------------------

 All tasks in a block inherit directives applied at the block level. Most of what you can apply to a single task (with the exception of loops) can be applied at the block level, so blocks make it much easier to set data or directives common to the tasks. The directive does not affect the block itself, it is only inherited by the tasks enclosed by a block. For example, a `when` statement is applied to the tasks within a block, not to the block itself.

  Block example with named tasks inside the block 
```
 tasks:
   - name: Install, configure, and start Apache
     block:
       - name: Install httpd and memcached
         ansible.builtin.yum:
           name:
           - httpd
           - memcached
           state: present

       - name: Apply the foo config template
         ansible.builtin.template:
           src: templates/src.j2
           dest: /etc/foo.conf

       - name: Start service bar and enable it
         ansible.builtin.service:
           name: bar
           state: started
           enabled: True
     when: ansible_facts['distribution'] == 'CentOS'
     become: true
     become_user: root
     ignore_errors: yes

```
  In the example above, the ‘when’ condition will be evaluated before Ansible runs each of the three tasks in the block. All three tasks also inherit the privilege escalation directives, running as the root user. Finally, `ignore_errors: yes` ensures that Ansible continues to execute the playbook even if some of the tasks fail.

 Names for blocks have been available since Ansible 2.3. We recommend using names in all tasks, within blocks or elsewhere, for better visibility into the tasks being executed when you run the playbook.

 Handling errors with blocks
---------------------------

 You can control how Ansible responds to task errors using blocks with `rescue` and `always` sections.

 Rescue blocks specify tasks to run when an earlier task in a block fails. This approach is similar to exception handling in many programming languages. Ansible only runs rescue blocks after a task returns a ‘failed’ state. Bad task definitions and unreachable hosts will not trigger the rescue block.

  Block error handling example 
```
 tasks:
 - name: Handle the error
   block:
     - name: Print a message
       ansible.builtin.debug:
         msg: 'I execute normally'

     - name: Force a failure
       ansible.builtin.command: /bin/false

     - name: Never print this
       ansible.builtin.debug:
         msg: 'I never execute, due to the above task failing, :-('
   rescue:
     - name: Print when errors
       ansible.builtin.debug:
         msg: 'I caught an error, can do stuff here to fix it, :-)'

```
  You can also add an `always` section to a block. Tasks in the `always` section run no matter what the task status of the previous block is.

  Block with always section 
```
 - name: Always do X
   block:
     - name: Print a message
       ansible.builtin.debug:
         msg: 'I execute normally'

     - name: Force a failure
       ansible.builtin.command: /bin/false

     - name: Never print this
       ansible.builtin.debug:
         msg: 'I never execute :-('
   always:
     - name: Always do this
       ansible.builtin.debug:
         msg: "This always executes, :-)"

```
  Together, these elements offer complex error handling.

  Block with all sections 
```
- name: Attempt and graceful roll back demo
  block:
    - name: Print a message
      ansible.builtin.debug:
        msg: 'I execute normally'

    - name: Force a failure
      ansible.builtin.command: /bin/false

    - name: Never print this
      ansible.builtin.debug:
        msg: 'I never execute, due to the above task failing, :-('
  rescue:
    - name: Print when errors
      ansible.builtin.debug:
        msg: 'I caught an error'

    - name: Force a failure in middle of recovery! >:-)
      ansible.builtin.command: /bin/false

    - name: Never print this
      ansible.builtin.debug:
        msg: 'I also never execute :-('
  always:
    - name: Always do this
      ansible.builtin.debug:
        msg: "This always executes"

```
  The tasks in the `block` execute normally. If any tasks in the block return `failed`, the `rescue` section executes tasks to recover from the error. The `always` section runs regardless of the results of the `block` and `rescue` sections.

 If an error occurs in the block and the rescue task succeeds, Ansible reverts the failed status of the original task for the run and continues to run the play as if the original task had succeeded. The rescued task is considered successful, and does not trigger `max_fail_percentage` or `any_errors_fatal` configurations. However, Ansible still reports a failure in the playbook statistics.

 You can use blocks with `flush_handlers` in a rescue task to ensure that all handlers run even if an error occurs:

  Block run handlers in error handling 
```
 tasks:
   - name: Attempt and graceful roll back demo
     block:
       - name: Print a message
         ansible.builtin.debug:
           msg: 'I execute normally'
         changed_when: yes
         notify: run me even after an error

       - name: Force a failure
         ansible.builtin.command: /bin/false
     rescue:
       - name: Make sure all handlers run
         meta: flush_handlers
 handlers:
    - name: Run me even after an error
      ansible.builtin.debug:
        msg: 'This handler runs even on error'

```
   New in version 2.1.

  Ansible provides a couple of variables for tasks in the `rescue` portion of a block:

  ansible\_failed\_task

The task that returned ‘failed’ and triggered the rescue. For example, to get the name use `ansible_failed_task.name`.

  ansible\_failed\_result

The captured return result of the failed task that triggered the rescue. This would equate to having used this var in the `register` keyword.

    See also

  [Intro to playbooks](playbooks_intro#playbooks-intro)

An introduction to playbooks

  [Roles](playbooks_reuse_roles#playbooks-reuse-roles)

Playbook organization by roles

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_blocks.html>

Handlers: running operations on change
======================================

 Sometimes you want a task to run only when a change is made on a machine. For example, you may want to restart a service if a task updates the configuration of that service, but not if the configuration is unchanged. Ansible uses handlers to address this use case. Handlers are tasks that only run when notified. Each handler should have a globally unique name.

 * [Handler example](#handler-example)
* [Controlling when handlers run](#controlling-when-handlers-run)
* [Using variables with handlers](#using-variables-with-handlers)

 Handler example
---------------

 This playbook, `verify-apache.yml`, contains a single play with a handler:

 
```
---
- name: Verify apache installation
  hosts: webservers
  vars:
    http_port: 80
    max_clients: 200
  remote_user: root
  tasks:
  - name: Ensure apache is at the latest version
    ansible.builtin.yum:
      name: httpd
      state: latest

  - name: Write the apache config file
    ansible.builtin.template:
      src: /srv/httpd.j2
      dest: /etc/httpd.conf
    notify:
    - Restart apache

  - name: Ensure apache is running
    ansible.builtin.service:
      name: httpd
      state: started

  handlers:
    - name: Restart apache
      ansible.builtin.service:
        name: httpd
        state: restarted

```
 In this example playbook, the second task notifies the handler. A single task can notify more than one handler:

 
```
- name: Template configuration file
  ansible.builtin.template:
    src: template.j2
    dest: /etc/foo.conf
  notify:
    - Restart memcached
    - Restart apache

  handlers:
    - name: Restart memcached
      ansible.builtin.service:
        name: memcached
        state: restarted

    - name: Restart apache
      ansible.builtin.service:
        name: apache
        state: restarted

```
 Controlling when handlers run
-----------------------------

 By default, handlers run after all the tasks in a particular play have been completed. This approach is efficient, because the handler only runs once, regardless of how many tasks notify it. For example, if multiple tasks update a configuration file and notify a handler to restart Apache, Ansible only bounces Apache once to avoid unnecessary restarts.

 If you need handlers to run before the end of the play, add a task to flush them using the [meta module](../collections/ansible/builtin/meta_module#meta-module), which executes Ansible actions:

 
```
tasks:
  - name: Some tasks go here
    ansible.builtin.shell: ...

  - name: Flush handlers
    meta: flush_handlers

  - name: Some other tasks
    ansible.builtin.shell: ...

```
 The `meta: flush_handlers` task triggers any handlers that have been notified at that point in the play.

 Using variables with handlers
-----------------------------

 You may want your Ansible handlers to use variables. For example, if the name of a service varies slightly by distribution, you want your output to show the exact name of the restarted service for each target machine. Avoid placing variables in the name of the handler. Since handler names are templated early on, Ansible may not have a value available for a handler name like this:

 
```
handlers:
# This handler name may cause your play to fail!
- name: Restart "{{ web_service_name }}"

```
 If the variable used in the handler name is not available, the entire play fails. Changing that variable mid-play **will not** result in newly created handler.

 Instead, place variables in the task parameters of your handler. You can load the values using `include_vars` like this:

 
```
tasks:
  - name: Set host variables based on distribution
    include_vars: "{{ ansible_facts.distribution }}.yml"

handlers:
  - name: Restart web service
    ansible.builtin.service:
      name: "{{ web_service_name | default('httpd') }}"
      state: restarted

```
 Handlers can also “listen” to generic topics, and tasks can notify those topics as follows:

 
```
handlers:
  - name: Restart memcached
    ansible.builtin.service:
      name: memcached
      state: restarted
    listen: "restart web services"

  - name: Restart apache
    ansible.builtin.service:
      name: apache
      state: restarted
    listen: "restart web services"

tasks:
  - name: Restart everything
    ansible.builtin.command: echo "this task will restart the web services"
    notify: "restart web services"

```
 This use makes it much easier to trigger multiple handlers. It also decouples handlers from their names, making it easier to share handlers among playbooks and roles (especially when using 3rd party roles from a shared source like Galaxy).

  Note

 * Handlers always run in the order they are defined, not in the order listed in the notify-statement. This is also the case for handlers using `listen`.
* Handler names and `listen` topics live in a global namespace.
* Handler names are templatable and `listen` topics are not.
* Use unique handler names. If you trigger more than one handler with the same name, the first one(s) get overwritten. Only the last one defined will run.
* You can notify a handler defined inside a static include.
* You cannot notify a handler defined inside a dynamic include.
* A handler can not run import\_role or include\_role.

  When using handlers within roles, note that:

 * handlers notified within `pre_tasks`, `tasks`, and `post_tasks` sections are automatically flushed at the end of section where they were notified.
* handlers notified within `roles` section are automatically flushed at the end of `tasks` section, but before any `tasks` handlers.
* handlers are play scoped and as such can be used outside of the role they are defined in.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_handlers.html>

Setting the remote environment
==============================

  New in version 1.1.

  You can use the `environment` keyword at the play, block, or task level to set an environment variable for an action on a remote host. With this keyword, you can enable using a proxy for a task that does http requests, set the required environment variables for language-specific version managers, and more.

 When you set a value with `environment:` at the play or block level, it is available only to tasks within the play or block that are executed by the same user. The `environment:` keyword does not affect Ansible itself, Ansible configuration settings, the environment for other users, or the execution of other plugins like lookups and filters. Variables set with `environment:` do not automatically become Ansible facts, even when you set them at the play level. You must include an explicit `gather_facts` task in your playbook and set the `environment` keyword on that task to turn these values into Ansible facts.

 Setting the remote environment in a task
----------------------------------------

 You can set the environment directly at the task level:

 
```
- hosts: all
  remote_user: root

  tasks:

    - name: Install cobbler
      ansible.builtin.package:
        name: cobbler
        state: present
      environment:
        http_proxy: http://proxy.example.com:8080

```
 You can re-use environment settings by defining them as variables in your play and accessing them in a task as you would access any stored Ansible variable:

 
```
- hosts: all
  remote_user: root

  # create a variable named "proxy_env" that is a dictionary
  vars:
    proxy_env:
      http_proxy: http://proxy.example.com:8080

  tasks:

    - name: Install cobbler
      ansible.builtin.package:
        name: cobbler
        state: present
      environment: "{{ proxy_env }}"

```
 You can store environment settings for re-use in multiple playbooks by defining them in a group\_vars file:

 
```
---
# file: group_vars/boston

ntp_server: ntp.bos.example.com
backup: bak.bos.example.com
proxy_env:
  http_proxy: http://proxy.bos.example.com:8080
  https_proxy: http://proxy.bos.example.com:8080

```
 You can set the remote environment at the play level:

 
```
- hosts: testing

  roles:
     - php
     - nginx

  environment:
    http_proxy: http://proxy.example.com:8080

```
 These examples show proxy settings, but you can provide any number of settings this way.

 Working with language-specific version managers
===============================================

 Some language-specific version managers (such as rbenv and nvm) require you to set environment variables while these tools are in use. When using these tools manually, you usually source some environment variables from a script or from lines added to your shell configuration file. In Ansible, you can do this with the environment keyword at the play level:

 
```
---
### A playbook demonstrating a common npm workflow:
# - Check for package.json in the application directory
# - If package.json exists:
#   * Run npm prune
#   * Run npm install

- hosts: application
  become: false

  vars:
    node_app_dir: /var/local/my_node_app

  environment:
    NVM_DIR: /var/local/nvm
    PATH: /var/local/nvm/versions/node/v4.2.1/bin:{{ ansible_env.PATH }}

  tasks:
  - name: Check for package.json
    ansible.builtin.stat:
      path: '{{ node_app_dir }}/package.json'
    register: packagejson

  - name: Run npm prune
    ansible.builtin.command: npm prune
    args:
      chdir: '{{ node_app_dir }}'
    when: packagejson.stat.exists

  - name: Run npm install
    community.general.npm:
      path: '{{ node_app_dir }}'
    when: packagejson.stat.exists

```
  Note

 The example above uses `ansible_env` as part of the PATH. Basing variables on `ansible_env` is risky. Ansible populates `ansible_env` values by gathering facts, so the value of the variables depends on the remote\_user or become\_user Ansible used when gathering those facts. If you change remote\_user/become\_user the values in `ansible-env` may not be the ones you expect.

   Warning

 Environment variables are normally passed in clear text (shell plugin dependent) so they are not a recommended way of passing secrets to the module being executed.

  You can also specify the environment at the task level:

 
```
---
- name: Install ruby 2.3.1
  ansible.builtin.command: rbenv install {{ rbenv_ruby_version }}
  args:
    creates: '{{ rbenv_root }}/versions/{{ rbenv_ruby_version }}/bin/ruby'
  vars:
    rbenv_root: /usr/local/rbenv
    rbenv_ruby_version: 2.3.1
  environment:
    CONFIGURE_OPTS: '--disable-install-doc'
    RBENV_ROOT: '{{ rbenv_root }}'
    PATH: '{{ rbenv_root }}/bin:{{ rbenv_root }}/shims:{{ rbenv_plugins }}/ruby-build/bin:{{ ansible_env.PATH }}'

```
  See also

  [Intro to playbooks](playbooks_intro#playbooks-intro)

An introduction to playbooks

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_environment.html>

Including and importing
=======================

 The content on this page has been moved to [Re-using Ansible artifacts](playbooks_reuse#playbooks-reuse).

  See also

  [YAML Syntax](../reference_appendices/yamlsyntax#yaml-syntax)

Learn about YAML syntax

  [Working with playbooks](playbooks#working-with-playbooks)

Review the basic Playbook language features

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [Using Variables](playbooks_variables#playbooks-variables)

All about variables in playbooks

  [Conditionals](playbooks_conditionals#playbooks-conditionals)

Conditionals in playbooks

  [Loops](playbooks_loops#playbooks-loops)

Loops in playbooks

  [Collection Index](../collections/index#list-of-collections)

Browse existing collections, modules, and plugins

  [Should you develop a module?](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules.html#developing-modules)

Learn how to extend Ansible by writing your own modules

  [GitHub Ansible examples](https://github.com/ansible/ansible-examples)

Complete playbook files from the GitHub project source

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_includes.html>

Tags
====

 If you have a large playbook, it may be useful to run only specific parts of it instead of running the entire playbook. You can do this with Ansible tags. Using tags to execute or skip selected tasks is a two-step process:

 1. Add tags to your tasks, either individually or with tag inheritance from a block, play, role, or import.
2. Select or skip tags when you run your playbook.

 * [Adding tags with the tags keyword](#adding-tags-with-the-tags-keyword)


	+ [Adding tags to individual tasks](#adding-tags-to-individual-tasks)
	+ [Adding tags to includes](#adding-tags-to-includes)
	+ [Tag inheritance: adding tags to multiple tasks](#tag-inheritance-adding-tags-to-multiple-tasks)
	
	
		- [Adding tags to blocks](#adding-tags-to-blocks)
		- [Adding tags to plays](#adding-tags-to-plays)
		- [Adding tags to roles](#adding-tags-to-roles)
		- [Adding tags to imports](#adding-tags-to-imports)
		- [Tag inheritance for includes: blocks and the `apply` keyword](#tag-inheritance-for-includes-blocks-and-the-apply-keyword)
* [Special tags: always and never](#special-tags-always-and-never)
* [Selecting or skipping tags when you run a playbook](#selecting-or-skipping-tags-when-you-run-a-playbook)


	+ [Previewing the results of using tags](#previewing-the-results-of-using-tags)
	+ [Selectively running tagged tasks in re-usable files](#selectively-running-tagged-tasks-in-re-usable-files)
	+ [Configuring tags globally](#configuring-tags-globally)

 Adding tags with the tags keyword
---------------------------------

 You can add tags to a single task or include. You can also add tags to multiple tasks by defining them at the level of a block, play, role, or import. The keyword `tags` addresses all these use cases. The `tags` keyword always defines tags and adds them to tasks; it does not select or skip tasks for execution. You can only select or skip tasks based on tags at the command line when you run a playbook. See [Selecting or skipping tags when you run a playbook](#using-tags) for more details.

 ### Adding tags to individual tasks

 At the simplest level, you can apply one or more tags to an individual task. You can add tags to tasks in playbooks, in task files, or within a role. Here is an example that tags two tasks with different tags:

 
```
tasks:
- name: Install the servers
  ansible.builtin.yum:
    name:
    - httpd
    - memcached
    state: present
  tags:
  - packages
  - webservers

- name: Configure the service
  ansible.builtin.template:
    src: templates/src.j2
    dest: /etc/foo.conf
  tags:
  - configuration

```
 You can apply the same tag to more than one individual task. This example tags several tasks with the same tag, “ntp”:

 
```
---
# file: roles/common/tasks/main.yml

- name: Install ntp
  ansible.builtin.yum:
    name: ntp
    state: present
  tags: ntp

- name: Configure ntp
  ansible.builtin.template:
    src: ntp.conf.j2
    dest: /etc/ntp.conf
  notify:
  - restart ntpd
  tags: ntp

- name: Enable and run ntpd
  ansible.builtin.service:
    name: ntpd
    state: started
    enabled: yes
  tags: ntp

- name: Install NFS utils
  ansible.builtin.yum:
    name:
    - nfs-utils
    - nfs-util-lib
    state: present
  tags: filesharing

```
 If you ran these four tasks in a playbook with `--tags ntp`, Ansible would run the three tasks tagged `ntp` and skip the one task that does not have that tag.

 ### Adding tags to includes

 You can apply tags to dynamic includes in a playbook. As with tags on an individual task, tags on an `include_*` task apply only to the include itself, not to any tasks within the included file or role. If you add `mytag` to a dynamic include, then run that playbook with `--tags mytag`, Ansible runs the include itself, runs any tasks within the included file or role tagged with `mytag`, and skips any tasks within the included file or role without that tag. See [Selectively running tagged tasks in re-usable files](#selective-reuse) for more details.

 You add tags to includes the same way you add tags to any other task:

 
```
---
# file: roles/common/tasks/main.yml

- name: Dynamic re-use of database tasks
  include_tasks: db.yml
  tags: db

```
 You can add a tag only to the dynamic include of a role. In this example, the `foo` tag will `not` apply to tasks inside the `bar` role:

 
```
---
- hosts: webservers
  tasks:
    - name: Include the bar role
      include_role:
        name: bar
      tags:
        - foo

```
 With plays, blocks, the `role` keyword, and static imports, Ansible applies tag inheritance, adding the tags you define to every task inside the play, block, role, or imported file. However, tag inheritance does *not* apply to dynamic re-use with `include_role` and `include_tasks`. With dynamic re-use (includes), the tags you define apply only to the include itself. If you need tag inheritance, use a static import. If you cannot use an import because the rest of your playbook uses includes, see [Tag inheritance for includes: blocks and the apply keyword](#apply-keyword) for ways to work around this behavior.

 ### Tag inheritance: adding tags to multiple tasks

 If you want to apply the same tag or tags to multiple tasks without adding a `tags` line to every task, you can define the tags at the level of your play or block, or when you add a role or import a file. Ansible applies the tags down the dependency chain to all child tasks. With roles and imports, Ansible appends the tags set by the `roles` section or import to any tags set on individual tasks or blocks within the role or imported file. This is called tag inheritance. Tag inheritance is convenient, because you do not have to tag every task. However, the tags still apply to the tasks individually.

 #### Adding tags to blocks

 If you want to apply a tag to many, but not all, of the tasks in your play, use a [block](playbooks_blocks#playbooks-blocks) and define the tags at that level. For example, we could edit the NTP example shown above to use a block:

 
```
# myrole/tasks/main.yml
tasks:
- name: ntp tasks
  tags: ntp
  block:
  - name: Install ntp
    ansible.builtin.yum:
      name: ntp
      state: present

  - name: Configure ntp
    ansible.builtin.template:
      src: ntp.conf.j2
      dest: /etc/ntp.conf
    notify:
    - restart ntpd

  - name: Enable and run ntpd
    ansible.builtin.service:
      name: ntpd
      state: started
      enabled: yes

- name: Install NFS utils
  ansible.builtin.yum:
    name:
    - nfs-utils
    - nfs-util-lib
    state: present
  tags: filesharing

```
 #### Adding tags to plays

 If all the tasks in a play should get the same tag, you can add the tag at the level of the play. For example, if you had a play with only the NTP tasks, you could tag the entire play:

 
```
- hosts: all
  tags: ntp
  tasks:
  - name: Install ntp
    ansible.builtin.yum:
      name: ntp
      state: present

  - name: Configure ntp
    ansible.builtin.template:
      src: ntp.conf.j2
      dest: /etc/ntp.conf
    notify:
    - restart ntpd

  - name: Enable and run ntpd
    ansible.builtin.service:
      name: ntpd
      state: started
      enabled: yes

- hosts: fileservers
  tags: filesharing
  tasks:
  ...

```
 #### Adding tags to roles

 There are three ways to add tags to roles:

 1. Add the same tag or tags to all tasks in the role by setting tags under `roles`. See examples in this section.
2. Add the same tag or tags to all tasks in the role by setting tags on a static `import_role` in your playbook. See examples in [Adding tags to imports](#tags-on-imports).
3. Add a tag or tags to individual tasks or blocks within the role itself. This is the only approach that allows you to select or skip some tasks within the role. To select or skip tasks within the role, you must have tags set on individual tasks or blocks, use the dynamic `include_role` in your playbook, and add the same tag or tags to the include. When you use this approach, and then run your playbook with `--tags foo`, Ansible runs the include itself plus any tasks in the role that also have the tag `foo`. See [Adding tags to includes](#tags-on-includes) for details.

 When you incorporate a role in your playbook statically with the `roles` keyword, Ansible adds any tags you define to all the tasks in the role. For example:

 
```
roles:
  - role: webserver
    vars:
      port: 5000
    tags: [ web, foo ]

```
 or:

 
```
---
- hosts: webservers
  roles:
    - role: foo
      tags:
        - bar
        - baz
    # using YAML shorthand, this is equivalent to:
    # - { role: foo, tags: ["bar", "baz"] }

```
 #### Adding tags to imports

 You can also apply a tag or tags to all the tasks imported by the static `import_role` and `import_tasks` statements:

 
```
---
- hosts: webservers
  tasks:
    - name: Import the foo role
      import_role:
        name: foo
      tags:
        - bar
        - baz

    - name: Import tasks from foo.yml
      import_tasks: foo.yml
      tags: [ web, foo ]

```
 #### Tag inheritance for includes: blocks and the `apply` keyword

 By default, Ansible does not apply [tag inheritance](#tag-inheritance) to dynamic re-use with `include_role` and `include_tasks`. If you add tags to an include, they apply only to the include itself, not to any tasks in the included file or role. This allows you to execute selected tasks within a role or task file - see [Selectively running tagged tasks in re-usable files](#selective-reuse) when you run your playbook.

 If you want tag inheritance, you probably want to use imports. However, using both includes and imports in a single playbook can lead to difficult-to-diagnose bugs. For this reason, if your playbook uses `include_*` to re-use roles or tasks, and you need tag inheritance on one include, Ansible offers two workarounds. You can use the `apply` keyword:

 
```
- name: Apply the db tag to the include and to all tasks in db.yaml
  include_tasks:
    file: db.yml
    # adds 'db' tag to tasks within db.yml
    apply:
      tags: db
  # adds 'db' tag to this 'include_tasks' itself
  tags: db

```
 Or you can use a block:

 
```
- block:
   - name: Include tasks from db.yml
     include_tasks: db.yml
  tags: db

```
 Special tags: always and never
------------------------------

 Ansible reserves two tag names for special behavior: always and never. If you assign the `always` tag to a task or play, Ansible will always run that task or play, unless you specifically skip it (`--skip-tags always`).

 For example:

 
```
tasks:
- name: Print a message
  ansible.builtin.debug:
    msg: "Always runs"
  tags:
  - always

- name: Print a message
  ansible.builtin.debug:
    msg: "runs when you use tag1"
  tags:
  - tag1

```
  Warning

 * Fact gathering is tagged with ‘always’ by default. It is only skipped if you apply a tag and then use a different tag in `--tags` or the same tag in `--skip-tags`.

   Warning

 * The role argument specification validation task is tagged with ‘always’ by default. This validation will be skipped if you use `--skip-tags always`.

   New in version 2.5.

  If you assign the `never` tag to a task or play, Ansible will skip that task or play unless you specifically request it (`--tags never`).

 For example:

 
```
tasks:
  - name: Run the rarely-used debug task
    ansible.builtin.debug:
     msg: '{{ showmevar }}'
    tags: [ never, debug ]

```
 The rarely-used debug task in the example above only runs when you specifically request the `debug` or `never` tags.

 Selecting or skipping tags when you run a playbook
--------------------------------------------------

 Once you have added tags to your tasks, includes, blocks, plays, roles, and imports, you can selectively execute or skip tasks based on their tags when you run [ansible-playbook](../cli/ansible-playbook#ansible-playbook). Ansible runs or skips all tasks with tags that match the tags you pass at the command line. If you have added a tag at the block or play level, with `roles`, or with an import, that tag applies to every task within the block, play, role, or imported role or file. If you have a role with lots of tags and you want to call subsets of the role at different times, either [use it with dynamic includes](#selective-reuse), or split the role into multiple roles.

 [ansible-playbook](../cli/ansible-playbook#ansible-playbook) offers five tag-related command-line options:

 * `--tags all` - run all tasks, ignore tags (default behavior)
* `--tags [tag1, tag2]` - run only tasks with either the tag `tag1` or the tag `tag2`
* `--skip-tags [tag3, tag4]` - run all tasks except those with either the tag `tag3` or the tag `tag4`
* `--tags tagged` - run only tasks with at least one tag
* `--tags untagged` - run only tasks with no tags

 For example, to run only tasks and blocks tagged `configuration` and `packages` in a very long playbook:

 
```
ansible-playbook example.yml --tags "configuration,packages"

```
 To run all tasks except those tagged `packages`:

 
```
ansible-playbook example.yml --skip-tags "packages"

```
 ### Previewing the results of using tags

 When you run a role or playbook, you might not know or remember which tasks have which tags, or which tags exist at all. Ansible offers two command-line flags for [ansible-playbook](../cli/ansible-playbook#ansible-playbook) that help you manage tagged playbooks:

 * `--list-tags` - generate a list of available tags
* `--list-tasks` - when used with `--tags tagname` or `--skip-tags tagname`, generate a preview of tagged tasks

 For example, if you do not know whether the tag for configuration tasks is `config` or `conf` in a playbook, role, or tasks file, you can display all available tags without running any tasks:

 
```
ansible-playbook example.yml --list-tags

```
 If you do not know which tasks have the tags `configuration` and `packages`, you can pass those tags and add `--list-tasks`. Ansible lists the tasks but does not execute any of them.

 
```
ansible-playbook example.yml --tags "configuration,packages" --list-tasks

```
 These command-line flags have one limitation: they cannot show tags or tasks within dynamically included files or roles. See [Comparing includes and imports: dynamic and static re-use](playbooks_reuse#dynamic-vs-static) for more information on differences between static imports and dynamic includes.

 ### Selectively running tagged tasks in re-usable files

 If you have a role or a tasks file with tags defined at the task or block level, you can selectively run or skip those tagged tasks in a playbook if you use a dynamic include instead of a static import. You must use the same tag on the included tasks and on the include statement itself. For example you might create a file with some tagged and some untagged tasks:

 
```
# mixed.yml
tasks:
- name: Run the task with no tags
  ansible.builtin.debug:
    msg: this task has no tags

- name: Run the tagged task
  ansible.builtin.debug:
    msg: this task is tagged with mytag
  tags: mytag

- block:
  - name: Run the first block task with mytag
    ...
  - name: Run the second block task with mytag
    ...
  tags:
  - mytag

```
 And you might include the tasks file above in a playbook:

 
```
# myplaybook.yml
- hosts: all
  tasks:
  - name: Run tasks from mixed.yml
    include_tasks:
      name: mixed.yml
    tags: mytag

```
 When you run the playbook with `ansible-playbook -i hosts myplaybook.yml --tags "mytag"`, Ansible skips the task with no tags, runs the tagged individual task, and runs the two tasks in the block.

 ### Configuring tags globally

 If you run or skip certain tags by default, you can use the [TAGS\_RUN](../reference_appendices/config#tags-run) and [TAGS\_SKIP](../reference_appendices/config#tags-skip) options in Ansible configuration to set those defaults.

  See also

  [Intro to playbooks](playbooks_intro#playbooks-intro)

An introduction to playbooks

  [Roles](playbooks_reuse_roles#playbooks-reuse-roles)

Playbook organization by roles

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_tags.html>

Patterns: targeting hosts and groups
====================================

 When you execute Ansible through an ad hoc command or by running a playbook, you must choose which managed nodes or groups you want to execute against. Patterns let you run commands and playbooks against specific hosts and/or groups in your inventory. An Ansible pattern can refer to a single host, an IP address, an inventory group, a set of groups, or all hosts in your inventory. Patterns are highly flexible - you can exclude or require subsets of hosts, use wildcards or regular expressions, and more. Ansible executes on all inventory hosts included in the pattern.

 * [Using patterns](#using-patterns)
* [Common patterns](#common-patterns)
* [Limitations of patterns](#limitations-of-patterns)
* [Advanced pattern options](#advanced-pattern-options)


	+ [Using variables in patterns](#using-variables-in-patterns)
	+ [Using group position in patterns](#using-group-position-in-patterns)
	+ [Using regexes in patterns](#using-regexes-in-patterns)
* [Patterns and ansible-playbook flags](#patterns-and-ansible-playbook-flags)

 Using patterns
--------------

 You use a pattern almost any time you execute an ad hoc command or a playbook. The pattern is the only element of an [ad hoc command](intro_adhoc#intro-adhoc) that has no flag. It is usually the second element:

 
```
ansible <pattern> -m <module_name> -a "<module options>"

```
 For example:

 
```
ansible webservers -m service -a "name=httpd state=restarted"

```
 In a playbook the pattern is the content of the `hosts:` line for each play:

 
```
- name: <play_name>
  hosts: <pattern>

```
 For example:

 
```
- name: restart webservers
  hosts: webservers

```
 Since you often want to run a command or playbook against multiple hosts at once, patterns often refer to inventory groups. Both the ad hoc command and the playbook above will execute against all machines in the `webservers` group.

 Common patterns
---------------

 This table lists common patterns for targeting inventory hosts and groups.

 

| Description | Pattern(s) | Targets |
| --- | --- | --- |
| All hosts | all (or \*) |  |
| One host | host1 |  |
| Multiple hosts | host1:host2 (or host1,host2) |  |
| One group | webservers |  |
| Multiple groups | webservers:dbservers | all hosts in webservers plus all hosts in dbservers |
| Excluding groups | webservers:!atlanta | all hosts in webservers except those in atlanta |
| Intersection of groups | webservers:&staging | any hosts in webservers that are also in staging |

  Note

 You can use either a comma (`,`) or a colon (`:`) to separate a list of hosts. The comma is preferred when dealing with ranges and IPv6 addresses.

  Once you know the basic patterns, you can combine them. This example:

 
```
webservers:dbservers:&staging:!phoenix

```
 targets all machines in the groups ‘webservers’ and ‘dbservers’ that are also in the group ‘staging’, except any machines in the group ‘phoenix’.

 You can use wildcard patterns with FQDNs or IP addresses, as long as the hosts are named in your inventory by FQDN or IP address:

 
```
192.0.\*
\*.example.com
\*.com

```
 You can mix wildcard patterns and groups at the same time:

 
```
one*.com:dbservers

```
 Limitations of patterns
-----------------------

 Patterns depend on inventory. If a host or group is not listed in your inventory, you cannot use a pattern to target it. If your pattern includes an IP address or hostname that does not appear in your inventory, you will see an error like this:

 
```
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: Could not match supplied host pattern, ignoring: *.not_in_inventory.com

```
 Your pattern must match your inventory syntax. If you define a host as an [alias](intro_inventory#inventory-aliases):

 
```
atlanta:
  host1:
    http_port: 80
    maxRequestsPerChild: 808
    host: 127.0.0.2

```
 you must use the alias in your pattern. In the example above, you must use `host1` in your pattern. If you use the IP address, you will once again get the error:

 
```
[WARNING]: Could not match supplied host pattern, ignoring: 127.0.0.2

```
 Advanced pattern options
------------------------

 The common patterns described above will meet most of your needs, but Ansible offers several other ways to define the hosts and groups you want to target.

 ### Using variables in patterns

 You can use variables to enable passing group specifiers via the `-e` argument to ansible-playbook:

 
```
webservers:!{{ excluded }}:&{{ required }}

```
 ### Using group position in patterns

 You can define a host or subset of hosts by its position in a group. For example, given the following group:

 
```
[webservers]
cobweb
webbing
weber

```
 you can use subscripts to select individual hosts or ranges within the webservers group:

 
```
webservers[0]       # == cobweb
webservers[-1]      # == weber
webservers[0:2]     # == webservers[0],webservers[1]
                    # == cobweb,webbing
webservers[1:]      # == webbing,weber
webservers[:3]      # == cobweb,webbing,weber

```
 ### Using regexes in patterns

 You can specify a pattern as a regular expression by starting the pattern with `~`:

 
```
~(web|db).*\.example\.com

```
 Patterns and ansible-playbook flags
-----------------------------------

 You can change the behavior of the patterns defined in playbooks using command-line options. For example, you can run a playbook that defines `hosts: all` on a single host by specifying `-i 127.0.0.2,` (note the trailing comma). This works even if the host you target is not defined in your inventory. You can also limit the hosts you target on a particular run with the `--limit` flag:

 
```
ansible-playbook site.yml --limit datacenter2

```
 Finally, you can use `--limit` to read the list of hosts from a file by prefixing the file name with `@`:

 
```
ansible-playbook site.yml --limit @retry_hosts.txt

```
 If [RETRY\_FILES\_ENABLED](../reference_appendices/config#retry-files-enabled) is set to `True`, a `.retry` file will be created after the `ansible-playbook` run containing a list of failed hosts from all plays. This file is overwritten each time `ansible-playbook` finishes running.

 ansible-playbook site.yml –limit @site.retry

 To apply your knowledge of patterns with Ansible commands and playbooks, read [Introduction to ad hoc commands](intro_adhoc#intro-adhoc) and [Intro to playbooks](playbooks_intro#playbooks-intro).

  See also

  [Introduction to ad hoc commands](intro_adhoc#intro-adhoc)

Examples of basic commands

  [Working with playbooks](playbooks#working-with-playbooks)

Learning the Ansible configuration management language

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/intro_patterns.html>

Interactive input: prompts
==========================

 If you want your playbook to prompt the user for certain input, add a ‘vars\_prompt’ section. Prompting the user for variables lets you avoid recording sensitive data like passwords. In addition to security, prompts support flexibility. For example, if you use one playbook across multiple software releases, you could prompt for the particular release version.

 * [Encrypting values supplied by `vars_prompt`](#encrypting-values-supplied-by-vars-prompt)
* [Allowing special characters in `vars_prompt` values](#allowing-special-characters-in-vars-prompt-values)

 Here is a most basic example:

 
```
---
- hosts: all
  vars_prompt:

    - name: username
      prompt: What is your username?
      private: no

    - name: password
      prompt: What is your password?

  tasks:

    - name: Print a message
      ansible.builtin.debug:
        msg: 'Logging in as {{ username }}'

```
 The user input is hidden by default but it can be made visible by setting `private: no`.

  Note

 Prompts for individual `vars_prompt` variables will be skipped for any variable that is already defined through the command line `--extra-vars` option, or when running from a non-interactive session (such as cron or Ansible AWX). See [Defining variables at runtime](playbooks_variables#passing-variables-on-the-command-line).

  If you have a variable that changes infrequently, you can provide a default value that can be overridden:

 
```
vars_prompt:

  - name: release_version
    prompt: Product release version
    default: "1.0"

```
 Encrypting values supplied by `vars_prompt`
-------------------------------------------

 You can encrypt the entered value so you can use it, for instance, with the user module to define a password:

 
```
vars_prompt:

  - name: my_password2
    prompt: Enter password2
    private: yes
    encrypt: sha512_crypt
    confirm: yes
    salt_size: 7

```
 If you have [Passlib](https://passlib.readthedocs.io/en/stable/) installed, you can use any crypt scheme the library supports:

 * *des\_crypt* - DES Crypt
* *bsdi\_crypt* - BSDi Crypt
* *bigcrypt* - BigCrypt
* *crypt16* - Crypt16
* *md5\_crypt* - MD5 Crypt
* *bcrypt* - BCrypt
* *sha1\_crypt* - SHA-1 Crypt
* *sun\_md5\_crypt* - Sun MD5 Crypt
* *sha256\_crypt* - SHA-256 Crypt
* *sha512\_crypt* - SHA-512 Crypt
* *apr\_md5\_crypt* - Apache’s MD5-Crypt variant
* *phpass* - PHPass’ Portable Hash
* *pbkdf2\_digest* - Generic PBKDF2 Hashes
* *cta\_pbkdf2\_sha1* - Cryptacular’s PBKDF2 hash
* *dlitz\_pbkdf2\_sha1* - Dwayne Litzenberger’s PBKDF2 hash
* *scram* - SCRAM Hash
* *bsd\_nthash* - FreeBSD’s MCF-compatible nthash encoding

 The only parameters accepted are ‘salt’ or ‘salt\_size’. You can use your own salt by defining ‘salt’, or have one generated automatically using ‘salt\_size’. By default Ansible generates a salt of size 8.

  New in version 2.7.

  If you do not have Passlib installed, Ansible uses the [crypt](https://docs.python.org/2/library/crypt.html) library as a fallback. Ansible supports at most four crypt schemes, depending on your platform at most the following crypt schemes are supported:

 * *bcrypt* - BCrypt
* *md5\_crypt* - MD5 Crypt
* *sha256\_crypt* - SHA-256 Crypt
* *sha512\_crypt* - SHA-512 Crypt

  New in version 2.8.

  Allowing special characters in `vars_prompt` values
---------------------------------------------------

 Some special characters, such as `{` and `%` can create templating errors. If you need to accept special characters, use the `unsafe` option:

 
```
vars_prompt:
  - name: my_password_with_weird_chars
    prompt: Enter password
    unsafe: yes
    private: yes

```
  See also

  [Intro to playbooks](playbooks_intro#playbooks-intro)

An introduction to playbooks

  [Conditionals](playbooks_conditionals#playbooks-conditionals)

Conditional statements in playbooks

  [Using Variables](playbooks_variables#playbooks-variables)

All about variables

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_prompts.html>

Re-using Ansible artifacts
==========================

 You can write a simple playbook in one very large file, and most users learn the one-file approach first. However, breaking tasks up into different files is an excellent way to organize complex sets of tasks and reuse them. Smaller, more distributed artifacts let you re-use the same variables, tasks, and plays in multiple playbooks to address different use cases. You can use distributed artifacts across multiple parent playbooks or even multiple times within one playbook. For example, you might want to update your customer database as part of several different playbooks. If you put all the tasks related to updating your database in a tasks file, you can re-use them in many playbooks while only maintaining them in one place.

 * [Creating re-usable files and roles](#creating-re-usable-files-and-roles)
* [Re-using playbooks](#re-using-playbooks)
* [Re-using files and roles](#re-using-files-and-roles)


	+ [Includes: dynamic re-use](#includes-dynamic-re-use)
	+ [Imports: static re-use](#imports-static-re-use)
	+ [Comparing includes and imports: dynamic and static re-use](#comparing-includes-and-imports-dynamic-and-static-re-use)
* [Re-using tasks as handlers](#re-using-tasks-as-handlers)


	+ [Triggering included (dynamic) handlers](#triggering-included-dynamic-handlers)
	+ [Triggering imported (static) handlers](#triggering-imported-static-handlers)

 Creating re-usable files and roles
----------------------------------

 Ansible offers four distributed, re-usable artifacts: variables files, task files, playbooks, and roles.

 * A variables file contains only variables.
* A task file contains only tasks.
* A playbook contains at least one play, and may contain variables, tasks, and other content. You can re-use tightly focused playbooks, but you can only re-use them statically, not dynamically.
* A role contains a set of related tasks, variables, defaults, handlers, and even modules or other plugins in a defined file-tree. Unlike variables files, task files, or playbooks, roles can be easily uploaded and shared via Ansible Galaxy. See [Roles](playbooks_reuse_roles#playbooks-reuse-roles) for details about creating and using roles.

  New in version 2.4.

  Re-using playbooks
------------------

 You can incorporate multiple playbooks into a main playbook. However, you can only use imports to re-use playbooks. For example:

 
```
- import_playbook: webservers.yml
- import_playbook: databases.yml

```
 Importing incorporates playbooks in other playbooks statically. Ansible runs the plays and tasks in each imported playbook in the order they are listed, just as if they had been defined directly in the main playbook.

 Re-using files and roles
------------------------

 Ansible offers two ways to re-use files and roles in a playbook: dynamic and static.

 * For dynamic re-use, add an `include_*` task in the tasks section of a play:


	+ [include\_role](../collections/ansible/builtin/include_role_module#include-role-module)
	+ [include\_tasks](../collections/ansible/builtin/include_tasks_module#include-tasks-module)
	+ [include\_vars](../collections/ansible/builtin/include_vars_module#include-vars-module)
* For static re-use, add an `import_*` task in the tasks section of a play:


	+ [import\_role](../collections/ansible/builtin/import_role_module#import-role-module)
	+ [import\_tasks](../collections/ansible/builtin/import_tasks_module#import-tasks-module)

 Task include and import statements can be used at arbitrary depth.

 You can still use the bare [roles](playbooks_reuse_roles#roles-keyword) keyword at the play level to incorporate a role in a playbook statically. However, the bare [include](../collections/ansible/builtin/include_module#include-module) keyword, once used for both task files and playbook-level includes, is now deprecated.

 ### Includes: dynamic re-use

 Including roles, tasks, or variables adds them to a playbook dynamically. Ansible processes included files and roles as they come up in a playbook, so included tasks can be affected by the results of earlier tasks within the top-level playbook. Included roles and tasks are similar to handlers - they may or may not run, depending on the results of other tasks in the top-level playbook.

 The primary advantage of using `include_*` statements is looping. When a loop is used with an include, the included tasks or role will be executed once for each item in the loop.

 You can pass variables into includes. See [Variable precedence: Where should I put a variable?](playbooks_variables#ansible-variable-precedence) for more details on variable inheritance and precedence.

 ### Imports: static re-use

 Importing roles, tasks, or playbooks adds them to a playbook statically. Ansible pre-processes imported files and roles before it runs any tasks in a playbook, so imported content is never affected by other tasks within the top-level playbook.

 You can pass variables to imports. You must pass variables if you want to run an imported file more than once in a playbook. For example:

 
```
tasks:
- import_tasks: wordpress.yml
  vars:
    wp_user: timmy

- import_tasks: wordpress.yml
  vars:
    wp_user: alice

- import_tasks: wordpress.yml
  vars:
    wp_user: bob

```
 See [Variable precedence: Where should I put a variable?](playbooks_variables#ansible-variable-precedence) for more details on variable inheritance and precedence.

 ### Comparing includes and imports: dynamic and static re-use

 Each approach to re-using distributed Ansible artifacts has advantages and limitations. You may choose dynamic re-use for some playbooks and static re-use for others. Although you can use both dynamic and static re-use in a single playbook, it is best to select one approach per playbook. Mixing static and dynamic re-use can introduce difficult-to-diagnose bugs into your playbooks. This table summarizes the main differences so you can choose the best approach for each playbook you create.

 

|  | Include\_\* | Import\_\* |
| --- | --- | --- |
| Type of re-use | Dynamic | Static |
| When processed | At runtime, when encountered | Pre-processed during playbook parsing |
| Task or play | All includes are tasks | `import_playbook` cannot be a task |
| Task options | Apply only to include task itself | Apply to all child tasks in import |
| Calling from loops | Executed once for each loop item | Cannot be used in a loop |
| Using `--list-tags` | Tags within includes not listed | All tags appear with `--list-tags` |
| Using `--list-tasks` | Tasks within includes not listed | All tasks appear with `--list-tasks` |
| Notifying handlers | Cannot trigger handlers within includes | Can trigger individual imported handlers |
| Using `--start-at-task` | Cannot start at tasks within includes | Can start at imported tasks |
| Using inventory variables | Can `include_*: {{ inventory_var }}` | Cannot `import_*: {{ inventory_var }}` |
| With playbooks | No `include_playbook` | Can import full playbooks |
| With variables files | Can include variables files | Use `vars_files:` to import variables |

  Note

 * There are also big differences in resource consumption and performance, imports are quite lean and fast, while includes require a lot of management and accounting.

  Re-using tasks as handlers
--------------------------

 You can also use includes and imports in the [Handlers: running operations on change](playbooks_handlers#handlers) section of a playbook. For instance, if you want to define how to restart Apache, you only have to do that once for all of your playbooks. You might make a `restarts.yml` file that looks like:

 
```
# restarts.yml
- name: Restart apache
  ansible.builtin.service:
    name: apache
    state: restarted

- name: Restart mysql
  ansible.builtin.service:
    name: mysql
    state: restarted

```
 You can trigger handlers from either an import or an include, but the procedure is different for each method of re-use. If you include the file, you must notify the include itself, which triggers all the tasks in `restarts.yml`. If you import the file, you must notify the individual task(s) within `restarts.yml`. You can mix direct tasks and handlers with included or imported tasks and handlers.

 ### Triggering included (dynamic) handlers

 Includes are executed at run-time, so the name of the include exists during play execution, but the included tasks do not exist until the include itself is triggered. To use the `Restart apache` task with dynamic re-use, refer to the name of the include itself. This approach triggers all tasks in the included file as handlers. For example, with the task file shown above:

 
```
- name: Trigger an included (dynamic) handler
  hosts: localhost
  handlers:
    - name: Restart services
      include_tasks: restarts.yml
  tasks:
    - command: "true"
      notify: Restart services

```
 ### Triggering imported (static) handlers

 Imports are processed before the play begins, so the name of the import no longer exists during play execution, but the names of the individual imported tasks do exist. To use the `Restart apache` task with static re-use, refer to the name of each task or tasks within the imported file. For example, with the task file shown above:

 
```
- name: Trigger an imported (static) handler
  hosts: localhost
  handlers:
    - name: Restart services
      import_tasks: restarts.yml
  tasks:
    - command: "true"
      notify: Restart apache
    - command: "true"
      notify: Restart mysql

```
  See also

  [Utilities modules](https://docs.ansible.com/ansible/2.9/modules/list_of_utilities_modules.html#utilities-modules "(in Ansible v2.9)")

Documentation of the `include*` and `import*` modules discussed here.

  [Working with playbooks](playbooks#working-with-playbooks)

Review the basic Playbook language features

  [Using Variables](playbooks_variables#playbooks-variables)

All about variables in playbooks

  [Conditionals](playbooks_conditionals#playbooks-conditionals)

Conditionals in playbooks

  [Loops](playbooks_loops#playbooks-loops)

Loops in playbooks

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [Galaxy User Guide](../galaxy/user_guide#ansible-galaxy)

How to share roles on galaxy, role management

  [GitHub Ansible examples](https://github.com/ansible/ansible-examples)

Complete playbook files from the GitHub project source

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse.html>

Working with dynamic inventory
==============================

 * [Inventory script example: Cobbler](#inventory-script-example-cobbler)
* [Inventory script example: OpenStack](#inventory-script-example-openstack)


	+ [Explicit use of OpenStack inventory script](#explicit-use-of-openstack-inventory-script)
	+ [Implicit use of OpenStack inventory script](#implicit-use-of-openstack-inventory-script)
	+ [Refreshing the cache](#refreshing-the-cache)
* [Other inventory scripts](#other-inventory-scripts)
* [Using inventory directories and multiple inventory sources](#using-inventory-directories-and-multiple-inventory-sources)
* [Static groups of dynamic groups](#static-groups-of-dynamic-groups)

 If your Ansible inventory fluctuates over time, with hosts spinning up and shutting down in response to business demands, the static inventory solutions described in [How to build your inventory](intro_inventory#inventory) will not serve your needs. You may need to track hosts from multiple sources: cloud providers, LDAP, [Cobbler](https://cobbler.github.io), and/or enterprise CMDB systems.

 Ansible integrates all of these options through a dynamic external inventory system. Ansible supports two ways to connect with external inventory: [Inventory Plugins](../plugins/inventory#inventory-plugins) and `inventory scripts`.

 Inventory plugins take advantage of the most recent updates to the Ansible core code. We recommend plugins over scripts for dynamic inventory. You can [write your own plugin](https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html#developing-inventory) to connect to additional dynamic inventory sources.

 You can still use inventory scripts if you choose. When we implemented inventory plugins, we ensured backwards compatibility through the script inventory plugin. The examples below illustrate how to use inventory scripts.

 If you prefer a GUI for handling dynamic inventory, the inventory database on AWX or [Red Hat Ansible Automation Platform](https://docs.ansible.com/ansible/latest/reference_appendices/tower.html#ansible-platform) syncs with all your dynamic inventory sources, provides web and REST access to the results, and offers a graphical inventory editor. With a database record of all of your hosts, you can correlate past event history and see which hosts have had failures on their last playbook runs.

 Inventory script example: Cobbler
---------------------------------

 Ansible integrates seamlessly with [Cobbler](https://cobbler.github.io), a Linux installation server originally written by Michael DeHaan and now led by James Cammarata, who works for Ansible.

 While primarily used to kickoff OS installations and manage DHCP and DNS, Cobbler has a generic layer that can represent data for multiple configuration management systems (even at the same time) and serve as a ‘lightweight CMDB’.

 To tie your Ansible inventory to Cobbler, copy [this script](https://raw.githubusercontent.com/ansible-community/contrib-scripts/main/inventory/cobbler.py) to `/etc/ansible` and `chmod +x` the file. Run `cobblerd` any time you use Ansible and use the `-i` command line option (for example, `-i /etc/ansible/cobbler.py`) to communicate with Cobbler using Cobbler’s XMLRPC API.

 Add a `cobbler.ini` file in `/etc/ansible` so Ansible knows where the Cobbler server is and some cache improvements can be used. For example:

 
```
[cobbler]

# Set Cobbler's hostname or IP address
host = http://127.0.0.1/cobbler_api

# API calls to Cobbler can be slow. For this reason, we cache the results of an API
# call. Set this to the path you want cache files to be written to. Two files
# will be written to this directory:
#   - ansible-cobbler.cache
#   - ansible-cobbler.index

cache_path = /tmp

# The number of seconds a cache file is considered valid. After this many
# seconds, a new API call will be made, and the cache file will be updated.

cache_max_age = 900

```
 First test the script by running `/etc/ansible/cobbler.py` directly. You should see some JSON data output, but it may not have anything in it just yet.

 Let’s explore what this does. In Cobbler, assume a scenario somewhat like the following:

 
```
cobbler profile add --name=webserver --distro=CentOS6-x86_64
cobbler profile edit --name=webserver --mgmt-classes="webserver" --ksmeta="a=2 b=3"
cobbler system edit --name=foo --dns-name="foo.example.com" --mgmt-classes="atlanta" --ksmeta="c=4"
cobbler system edit --name=bar --dns-name="bar.example.com" --mgmt-classes="atlanta" --ksmeta="c=5"

```
 In the example above, the system ‘foo.example.com’ is addressable by ansible directly, but is also addressable when using the group names ‘webserver’ or ‘atlanta’. Since Ansible uses SSH, it contacts system foo over ‘foo.example.com’, only, never just ‘foo’. Similarly, if you tried “ansible foo”, it would not find the system… but “ansible ‘foo\*’” would do, because the system DNS name starts with ‘foo’.

 The script provides more than host and group info. In addition, as a bonus, when the ‘setup’ module is run (which happens automatically when using playbooks), the variables ‘a’, ‘b’, and ‘c’ will all be auto-populated in the templates:

 
```
# file: /srv/motd.j2
Welcome, I am templated with a value of a={{ a }}, b={{ b }}, and c={{ c }}

```
 Which could be executed just like this:

 
```
ansible webserver -m setup
ansible webserver -m template -a "src=/tmp/motd.j2 dest=/etc/motd"

```
  Note

 The name ‘webserver’ came from Cobbler, as did the variables for the config file. You can still pass in your own variables like normal in Ansible, but variables from the external inventory script will override any that have the same name.

  So, with the template above (`motd.j2`), this results in the following data being written to `/etc/motd` for system ‘foo’:

 
```
Welcome, I am templated with a value of a=2, b=3, and c=4

```
 And on system ‘bar’ (bar.example.com):

 
```
Welcome, I am templated with a value of a=2, b=3, and c=5

```
 And technically, though there is no major good reason to do it, this also works:

 
```
ansible webserver -m ansible.builtin.shell -a "echo {{ a }}"

```
 So, in other words, you can use those variables in arguments/actions as well.

 Inventory script example: OpenStack
-----------------------------------

 If you use an OpenStack-based cloud, instead of manually maintaining your own inventory file, you can use the `openstack_inventory.py` dynamic inventory to pull information about your compute instances directly from OpenStack.

 You can download the latest version of the OpenStack inventory script [here](https://raw.githubusercontent.com/openstack/ansible-collections-openstack/master/scripts/inventory/openstack_inventory.py).

 You can use the inventory script explicitly (by passing the `-i openstack_inventory.py` argument to Ansible) or implicitly (by placing the script at `/etc/ansible/hosts`).

 ### Explicit use of OpenStack inventory script

 Download the latest version of the OpenStack dynamic inventory script and make it executable:

 
```
wget https://raw.githubusercontent.com/openstack/ansible-collections-openstack/master/scripts/inventory/openstack_inventory.py
chmod +x openstack_inventory.py

```
  Note

 Do not name it `openstack.py`. This name will conflict with imports from openstacksdk.

  Source an OpenStack RC file:

 
```
source openstack.rc

```
  Note

 An OpenStack RC file contains the environment variables required by the client tools to establish a connection with the cloud provider, such as the authentication URL, user name, password and region name. For more information on how to download, create or source an OpenStack RC file, please refer to [Set environment variables using the OpenStack RC file](https://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html).

  You can confirm the file has been successfully sourced by running a simple command, such as `nova list` and ensuring it returns no errors.

  Note

 The OpenStack command line clients are required to run the `nova list` command. For more information on how to install them, please refer to [Install the OpenStack command-line clients](https://docs.openstack.org/user-guide/common/cli_install_openstack_command_line_clients.html).

  You can test the OpenStack dynamic inventory script manually to confirm it is working as expected:

 
```
./openstack_inventory.py --list

```
 After a few moments you should see some JSON output with information about your compute instances.

 Once you confirm the dynamic inventory script is working as expected, you can tell Ansible to use the `openstack_inventory.py` script as an inventory file, as illustrated below:

 
```
ansible -i openstack_inventory.py all -m ansible.builtin.ping

```
 ### Implicit use of OpenStack inventory script

 Download the latest version of the OpenStack dynamic inventory script, make it executable and copy it to `/etc/ansible/hosts`:

 
```
wget https://raw.githubusercontent.com/openstack/ansible-collections-openstack/master/scripts/inventory/openstack_inventory.py
chmod +x openstack_inventory.py
sudo cp openstack_inventory.py /etc/ansible/hosts

```
 Download the sample configuration file, modify it to suit your needs and copy it to `/etc/ansible/openstack.yml`:

 
```
wget https://raw.githubusercontent.com/openstack/ansible-collections-openstack/master/scripts/inventory/openstack.yml
vi openstack.yml
sudo cp openstack.yml /etc/ansible/

```
 You can test the OpenStack dynamic inventory script manually to confirm it is working as expected:

 
```
/etc/ansible/hosts --list

```
 After a few moments you should see some JSON output with information about your compute instances.

 ### Refreshing the cache

 Note that the OpenStack dynamic inventory script will cache results to avoid repeated API calls. To explicitly clear the cache, you can run the openstack\_inventory.py (or hosts) script with the `--refresh` parameter:

 
```
./openstack_inventory.py --refresh --list

```
 Other inventory scripts
-----------------------

 In Ansible 2.10 and later, inventory scripts moved to their associated collections. Many are now in the [community.general scripts/inventory directory](https://github.com/ansible-collections/community.general/tree/main/scripts/inventory). We recommend you use [Inventory Plugins](../plugins/inventory#inventory-plugins) instead.

 Using inventory directories and multiple inventory sources
----------------------------------------------------------

 If the location given to `-i` in Ansible is a directory (or as so configured in `ansible.cfg`), Ansible can use multiple inventory sources at the same time. When doing so, it is possible to mix both dynamic and statically managed inventory sources in the same ansible run. Instant hybrid cloud!

 In an inventory directory, executable files are treated as dynamic inventory sources and most other files as static sources. Files which end with any of the following are ignored:

 
```
~, .orig, .bak, .ini, .cfg, .retry, .pyc, .pyo

```
 You can replace this list with your own selection by configuring an `inventory_ignore_extensions` list in `ansible.cfg`, or setting the [`ANSIBLE_INVENTORY_IGNORE`](../reference_appendices/config#envvar-ANSIBLE_INVENTORY_IGNORE) environment variable. The value in either case must be a comma-separated list of patterns, as shown above.

 Any `group_vars` and `host_vars` subdirectories in an inventory directory are interpreted as expected, making inventory directories a powerful way to organize different sets of configurations. See [Using multiple inventory sources](intro_inventory#using-multiple-inventory-sources) for more information.

 Static groups of dynamic groups
-------------------------------

 When defining groups of groups in the static inventory file, the child groups must also be defined in the static inventory file, otherwise ansible returns an error. If you want to define a static group of dynamic child groups, define the dynamic groups as empty in the static inventory file. For example:

 
```
[tag_Name_staging_foo]

[tag_Name_staging_bar]

[staging:children]
tag_Name_staging_foo
tag_Name_staging_bar

```
  See also

  [How to build your inventory](intro_inventory#intro-inventory)

All about static inventory files

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/intro_dynamic_inventory.html>

Connection methods and details
==============================

 This section shows you how to expand and refine the connection methods Ansible uses for your inventory.

 ControlPersist and paramiko
---------------------------

 By default, Ansible uses native OpenSSH, because it supports ControlPersist (a performance feature), Kerberos, and options in `~/.ssh/config` such as Jump Host setup. If your control machine uses an older version of OpenSSH that does not support ControlPersist, Ansible will fallback to a Python implementation of OpenSSH called ‘paramiko’.

 Setting a remote user
---------------------

 By default, Ansible connects to all remote devices with the user name you are using on the control node. If that user name does not exist on a remote device, you can set a different user name for the connection. If you just need to do some tasks as a different user, look at [Understanding privilege escalation: become](become#become). You can set the connection user in a playbook:

 
```
---
- name: update webservers
  hosts: webservers
  remote_user: admin

  tasks:
  - name: thing to do first in this playbook
  . . .

```
 as a host variable in inventory:

 
```
other1.example.com     ansible_connection=ssh        ansible_user=myuser
other2.example.com     ansible_connection=ssh        ansible_user=myotheruser

```
 or as a group variable in inventory:

 
```
cloud:
  hosts:
    cloud1: my_backup.cloud.com
    cloud2: my_backup2.cloud.com
  vars:
    ansible_user: admin

```
 Setting up SSH keys
-------------------

 By default, Ansible assumes you are using SSH keys to connect to remote machines. SSH keys are encouraged, but you can use password authentication if needed with the `--ask-pass` option. If you need to provide a password for [privilege escalation](become#become) (sudo, pbrun, and so on), use `--ask-become-pass`.

  Note

 Ansible does not expose a channel to allow communication between the user and the ssh process to accept a password manually to decrypt an ssh key when using the ssh connection plugin (which is the default). The use of `ssh-agent` is highly recommended.

  To set up SSH agent to avoid retyping passwords, you can do:

 
```
$ ssh-agent bash
$ ssh-add ~/.ssh/id_rsa

```
 Depending on your setup, you may wish to use Ansible’s `--private-key` command line option to specify a pem file instead. You can also add the private key file:

 
```
$ ssh-agent bash
$ ssh-add ~/.ssh/keypair.pem

```
 Another way to add private key files without using ssh-agent is using `ansible_ssh_private_key_file` in an inventory file as explained here: [How to build your inventory](intro_inventory#intro-inventory).

 Running against localhost
-------------------------

 You can run commands against the control node by using “localhost” or “127.0.0.1” for the server name:

 
```
$ ansible localhost -m ping -e 'ansible_python_interpreter="/usr/bin/env python"'

```
 You can specify localhost explicitly by adding this to your inventory file:

 
```
localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python"

```
 Managing host key checking
--------------------------

 Ansible enables host key checking by default. Checking host keys guards against server spoofing and man-in-the-middle attacks, but it does require some maintenance.

 If a host is reinstalled and has a different key in ‘known\_hosts’, this will result in an error message until corrected. If a new host is not in ‘known\_hosts’ your control node may prompt for confirmation of the key, which results in an interactive experience if using Ansible, from say, cron. You might not want this.

 If you understand the implications and wish to disable this behavior, you can do so by editing `/etc/ansible/ansible.cfg` or `~/.ansible.cfg`:

 
```
[defaults]
host_key_checking = False

```
 Alternatively this can be set by the [`ANSIBLE_HOST_KEY_CHECKING`](../reference_appendices/config#envvar-ANSIBLE_HOST_KEY_CHECKING) environment variable:

 
```
$ export ANSIBLE_HOST_KEY_CHECKING=False

```
 Also note that host key checking in paramiko mode is reasonably slow, therefore switching to ‘ssh’ is also recommended when using this feature.

 Other connection methods
------------------------

 Ansible can use a variety of connection methods beyond SSH. You can select any connection plugin, including managing things locally and managing chroot, lxc, and jail containers. A mode called ‘ansible-pull’ can also invert the system and have systems ‘phone home’ via scheduled git checkouts to pull configuration directives from a central repository.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/connection_details.html>

Discovering variables: facts and magic variables
================================================

 With Ansible you can retrieve or discover certain variables containing information about your remote systems or about Ansible itself. Variables related to remote systems are called facts. With facts, you can use the behavior or state of one system as configuration on other systems. For example, you can use the IP address of one system as a configuration value on another system. Variables related to Ansible are called magic variables.

 * [Ansible facts](#ansible-facts)


	+ [Package requirements for fact gathering](#package-requirements-for-fact-gathering)
	+ [Caching facts](#caching-facts)
	+ [Disabling facts](#disabling-facts)
	+ [Adding custom facts](#adding-custom-facts)
	
	
		- [facts.d or local facts](#facts-d-or-local-facts)
* [Information about Ansible: magic variables](#information-about-ansible-magic-variables)


	+ [Ansible version](#ansible-version)

 Ansible facts
-------------

 Ansible facts are data related to your remote systems, including operating systems, IP addresses, attached filesystems, and more. You can access this data in the `ansible_facts` variable. By default, you can also access some Ansible facts as top-level variables with the `ansible_` prefix. You can disable this behavior using the [INJECT\_FACTS\_AS\_VARS](../reference_appendices/config#inject-facts-as-vars) setting. To see all available facts, add this task to a play:

 
```
- name: Print all available facts
  ansible.builtin.debug:
    var: ansible_facts

```
 To see the ‘raw’ information as gathered, run this command at the command line:

 
```
ansible <hostname> -m ansible.builtin.setup

```
 Facts include a large amount of variable data, which may look like this:

 
```
{
    "ansible_all_ipv4_addresses": [
        "REDACTED IP ADDRESS"
    ],
    "ansible_all_ipv6_addresses": [
        "REDACTED IPV6 ADDRESS"
    ],
    "ansible_apparmor": {
        "status": "disabled"
    },
    "ansible_architecture": "x86_64",
    "ansible_bios_date": "11/28/2013",
    "ansible_bios_version": "4.1.5",
    "ansible_cmdline": {
        "BOOT_IMAGE": "/boot/vmlinuz-3.10.0-862.14.4.el7.x86_64",
        "console": "ttyS0,115200",
        "no_timer_check": true,
        "nofb": true,
        "nomodeset": true,
        "ro": true,
        "root": "LABEL=cloudimg-rootfs",
        "vga": "normal"
    },
    "ansible_date_time": {
        "date": "2018-10-25",
        "day": "25",
        "epoch": "1540469324",
        "hour": "12",
        "iso8601": "2018-10-25T12:08:44Z",
        "iso8601_basic": "20181025T120844109754",
        "iso8601_basic_short": "20181025T120844",
        "iso8601_micro": "2018-10-25T12:08:44.109968Z",
        "minute": "08",
        "month": "10",
        "second": "44",
        "time": "12:08:44",
        "tz": "UTC",
        "tz_offset": "+0000",
        "weekday": "Thursday",
        "weekday_number": "4",
        "weeknumber": "43",
        "year": "2018"
    },
    "ansible_default_ipv4": {
        "address": "REDACTED",
        "alias": "eth0",
        "broadcast": "REDACTED",
        "gateway": "REDACTED",
        "interface": "eth0",
        "macaddress": "REDACTED",
        "mtu": 1500,
        "netmask": "255.255.255.0",
        "network": "REDACTED",
        "type": "ether"
    },
    "ansible_default_ipv6": {},
    "ansible_device_links": {
        "ids": {},
        "labels": {
            "xvda1": [
                "cloudimg-rootfs"
            ],
            "xvdd": [
                "config-2"
            ]
        },
        "masters": {},
        "uuids": {
            "xvda1": [
                "cac81d61-d0f8-4b47-84aa-b48798239164"
            ],
            "xvdd": [
                "2018-10-25-12-05-57-00"
            ]
        }
    },
    "ansible_devices": {
        "xvda": {
            "holders": [],
            "host": "",
            "links": {
                "ids": [],
                "labels": [],
                "masters": [],
                "uuids": []
            },
            "model": null,
            "partitions": {
                "xvda1": {
                    "holders": [],
                    "links": {
                        "ids": [],
                        "labels": [
                            "cloudimg-rootfs"
                        ],
                        "masters": [],
                        "uuids": [
                            "cac81d61-d0f8-4b47-84aa-b48798239164"
                        ]
                    },
                    "sectors": "83883999",
                    "sectorsize": 512,
                    "size": "40.00 GB",
                    "start": "2048",
                    "uuid": "cac81d61-d0f8-4b47-84aa-b48798239164"
                }
            },
            "removable": "0",
            "rotational": "0",
            "sas_address": null,
            "sas_device_handle": null,
            "scheduler_mode": "deadline",
            "sectors": "83886080",
            "sectorsize": "512",
            "size": "40.00 GB",
            "support_discard": "0",
            "vendor": null,
            "virtual": 1
        },
        "xvdd": {
            "holders": [],
            "host": "",
            "links": {
                "ids": [],
                "labels": [
                    "config-2"
                ],
                "masters": [],
                "uuids": [
                    "2018-10-25-12-05-57-00"
                ]
            },
            "model": null,
            "partitions": {},
            "removable": "0",
            "rotational": "0",
            "sas_address": null,
            "sas_device_handle": null,
            "scheduler_mode": "deadline",
            "sectors": "131072",
            "sectorsize": "512",
            "size": "64.00 MB",
            "support_discard": "0",
            "vendor": null,
            "virtual": 1
        },
        "xvde": {
            "holders": [],
            "host": "",
            "links": {
                "ids": [],
                "labels": [],
                "masters": [],
                "uuids": []
            },
            "model": null,
            "partitions": {
                "xvde1": {
                    "holders": [],
                    "links": {
                        "ids": [],
                        "labels": [],
                        "masters": [],
                        "uuids": []
                    },
                    "sectors": "167770112",
                    "sectorsize": 512,
                    "size": "80.00 GB",
                    "start": "2048",
                    "uuid": null
                }
            },
            "removable": "0",
            "rotational": "0",
            "sas_address": null,
            "sas_device_handle": null,
            "scheduler_mode": "deadline",
            "sectors": "167772160",
            "sectorsize": "512",
            "size": "80.00 GB",
            "support_discard": "0",
            "vendor": null,
            "virtual": 1
        }
    },
    "ansible_distribution": "CentOS",
    "ansible_distribution_file_parsed": true,
    "ansible_distribution_file_path": "/etc/redhat-release",
    "ansible_distribution_file_variety": "RedHat",
    "ansible_distribution_major_version": "7",
    "ansible_distribution_release": "Core",
    "ansible_distribution_version": "7.5.1804",
    "ansible_dns": {
        "nameservers": [
            "127.0.0.1"
        ]
    },
    "ansible_domain": "",
    "ansible_effective_group_id": 1000,
    "ansible_effective_user_id": 1000,
    "ansible_env": {
        "HOME": "/home/zuul",
        "LANG": "en_US.UTF-8",
        "LESSOPEN": "||/usr/bin/lesspipe.sh %s",
        "LOGNAME": "zuul",
        "MAIL": "/var/mail/zuul",
        "PATH": "/usr/local/bin:/usr/bin",
        "PWD": "/home/zuul",
        "SELINUX_LEVEL_REQUESTED": "",
        "SELINUX_ROLE_REQUESTED": "",
        "SELINUX_USE_CURRENT_RANGE": "",
        "SHELL": "/bin/bash",
        "SHLVL": "2",
        "SSH_CLIENT": "REDACTED 55672 22",
        "SSH_CONNECTION": "REDACTED 55672 REDACTED 22",
        "USER": "zuul",
        "XDG_RUNTIME_DIR": "/run/user/1000",
        "XDG_SESSION_ID": "1",
        "_": "/usr/bin/python2"
    },
    "ansible_eth0": {
        "active": true,
        "device": "eth0",
        "ipv4": {
            "address": "REDACTED",
            "broadcast": "REDACTED",
            "netmask": "255.255.255.0",
            "network": "REDACTED"
        },
        "ipv6": [
            {
                "address": "REDACTED",
                "prefix": "64",
                "scope": "link"
            }
        ],
        "macaddress": "REDACTED",
        "module": "xen_netfront",
        "mtu": 1500,
        "pciid": "vif-0",
        "promisc": false,
        "type": "ether"
    },
    "ansible_eth1": {
        "active": true,
        "device": "eth1",
        "ipv4": {
            "address": "REDACTED",
            "broadcast": "REDACTED",
            "netmask": "255.255.224.0",
            "network": "REDACTED"
        },
        "ipv6": [
            {
                "address": "REDACTED",
                "prefix": "64",
                "scope": "link"
            }
        ],
        "macaddress": "REDACTED",
        "module": "xen_netfront",
        "mtu": 1500,
        "pciid": "vif-1",
        "promisc": false,
        "type": "ether"
    },
    "ansible_fips": false,
    "ansible_form_factor": "Other",
    "ansible_fqdn": "centos-7-rax-dfw-0003427354",
    "ansible_hostname": "centos-7-rax-dfw-0003427354",
    "ansible_interfaces": [
        "lo",
        "eth1",
        "eth0"
    ],
    "ansible_is_chroot": false,
    "ansible_kernel": "3.10.0-862.14.4.el7.x86_64",
    "ansible_lo": {
        "active": true,
        "device": "lo",
        "ipv4": {
            "address": "127.0.0.1",
            "broadcast": "host",
            "netmask": "255.0.0.0",
            "network": "127.0.0.0"
        },
        "ipv6": [
            {
                "address": "::1",
                "prefix": "128",
                "scope": "host"
            }
        ],
        "mtu": 65536,
        "promisc": false,
        "type": "loopback"
    },
    "ansible_local": {},
    "ansible_lsb": {
        "codename": "Core",
        "description": "CentOS Linux release 7.5.1804 (Core)",
        "id": "CentOS",
        "major_release": "7",
        "release": "7.5.1804"
    },
    "ansible_machine": "x86_64",
    "ansible_machine_id": "2db133253c984c82aef2fafcce6f2bed",
    "ansible_memfree_mb": 7709,
    "ansible_memory_mb": {
        "nocache": {
            "free": 7804,
            "used": 173
        },
        "real": {
            "free": 7709,
            "total": 7977,
            "used": 268
        },
        "swap": {
            "cached": 0,
            "free": 0,
            "total": 0,
            "used": 0
        }
    },
    "ansible_memtotal_mb": 7977,
    "ansible_mounts": [
        {
            "block_available": 7220998,
            "block_size": 4096,
            "block_total": 9817227,
            "block_used": 2596229,
            "device": "/dev/xvda1",
            "fstype": "ext4",
            "inode_available": 10052341,
            "inode_total": 10419200,
            "inode_used": 366859,
            "mount": "/",
            "options": "rw,seclabel,relatime,data=ordered",
            "size_available": 29577207808,
            "size_total": 40211361792,
            "uuid": "cac81d61-d0f8-4b47-84aa-b48798239164"
        },
        {
            "block_available": 0,
            "block_size": 2048,
            "block_total": 252,
            "block_used": 252,
            "device": "/dev/xvdd",
            "fstype": "iso9660",
            "inode_available": 0,
            "inode_total": 0,
            "inode_used": 0,
            "mount": "/mnt/config",
            "options": "ro,relatime,mode=0700",
            "size_available": 0,
            "size_total": 516096,
            "uuid": "2018-10-25-12-05-57-00"
        }
    ],
    "ansible_nodename": "centos-7-rax-dfw-0003427354",
    "ansible_os_family": "RedHat",
    "ansible_pkg_mgr": "yum",
    "ansible_processor": [
        "0",
        "GenuineIntel",
        "Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
        "1",
        "GenuineIntel",
        "Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
        "2",
        "GenuineIntel",
        "Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
        "3",
        "GenuineIntel",
        "Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
        "4",
        "GenuineIntel",
        "Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
        "5",
        "GenuineIntel",
        "Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
        "6",
        "GenuineIntel",
        "Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
        "7",
        "GenuineIntel",
        "Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz"
    ],
    "ansible_processor_cores": 8,
    "ansible_processor_count": 8,
    "ansible_processor_nproc": 8,
    "ansible_processor_threads_per_core": 1,
    "ansible_processor_vcpus": 8,
    "ansible_product_name": "HVM domU",
    "ansible_product_serial": "REDACTED",
    "ansible_product_uuid": "REDACTED",
    "ansible_product_version": "4.1.5",
    "ansible_python": {
        "executable": "/usr/bin/python2",
        "has_sslcontext": true,
        "type": "CPython",
        "version": {
            "major": 2,
            "micro": 5,
            "minor": 7,
            "releaselevel": "final",
            "serial": 0
        },
        "version_info": [
            2,
            7,
            5,
            "final",
            0
        ]
    },
    "ansible_python_version": "2.7.5",
    "ansible_real_group_id": 1000,
    "ansible_real_user_id": 1000,
    "ansible_selinux": {
        "config_mode": "enforcing",
        "mode": "enforcing",
        "policyvers": 31,
        "status": "enabled",
        "type": "targeted"
    },
    "ansible_selinux_python_present": true,
    "ansible_service_mgr": "systemd",
    "ansible_ssh_host_key_ecdsa_public": "REDACTED KEY VALUE",
    "ansible_ssh_host_key_ed25519_public": "REDACTED KEY VALUE",
    "ansible_ssh_host_key_rsa_public": "REDACTED KEY VALUE",
    "ansible_swapfree_mb": 0,
    "ansible_swaptotal_mb": 0,
    "ansible_system": "Linux",
    "ansible_system_capabilities": [
        ""
    ],
    "ansible_system_capabilities_enforced": "True",
    "ansible_system_vendor": "Xen",
    "ansible_uptime_seconds": 151,
    "ansible_user_dir": "/home/zuul",
    "ansible_user_gecos": "",
    "ansible_user_gid": 1000,
    "ansible_user_id": "zuul",
    "ansible_user_shell": "/bin/bash",
    "ansible_user_uid": 1000,
    "ansible_userspace_architecture": "x86_64",
    "ansible_userspace_bits": "64",
    "ansible_virtualization_role": "guest",
    "ansible_virtualization_type": "xen",
    "gather_subset": [
        "all"
    ],
    "module_setup": true
}

```
 You can reference the model of the first disk in the facts shown above in a template or playbook as:

 
```
{{ ansible_facts['devices']['xvda']['model'] }}

```
 To reference the system hostname:

 
```
{{ ansible_facts['nodename'] }}

```
 You can use facts in conditionals (see [Conditionals](playbooks_conditionals#playbooks-conditionals)) and also in templates. You can also use facts to create dynamic groups of hosts that match particular criteria, see the [group\_by module](../collections/ansible/builtin/group_by_module#group-by-module) documentation for details.

 ### Package requirements for fact gathering

 On some distros, you may see missing fact values or facts set to default values because the packages that support gathering those facts are not installed by default. You can install the necessary packages on your remote hosts using the OS package manager. Known dependencies include:

 * Linux Network fact gathering - Depends on the `ip` binary, commonly included in the `iproute2` package.

 ### Caching facts

 Like registered variables, facts are stored in memory by default. However, unlike registered variables, facts can be gathered independently and cached for repeated use. With cached facts, you can refer to facts from one system when configuring a second system, even if Ansible executes the current play on the second system first. For example:

 
```
{{ hostvars['asdf.example.com']['ansible_facts']['os_family'] }}

```
 Caching is controlled by the cache plugins. By default, Ansible uses the memory cache plugin, which stores facts in memory for the duration of the current playbook run. To retain Ansible facts for repeated use, select a different cache plugin. See [Cache Plugins](../plugins/cache#cache-plugins) for details.

 Fact caching can improve performance. If you manage thousands of hosts, you can configure fact caching to run nightly, then manage configuration on a smaller set of servers periodically throughout the day. With cached facts, you have access to variables and information about all hosts even when you are only managing a small number of servers.

 ### Disabling facts

 By default, Ansible gathers facts at the beginning of each play. If you do not need to gather facts (for example, if you know everything about your systems centrally), you can turn off fact gathering at the play level to improve scalability. Disabling facts may particularly improve performance in push mode with very large numbers of systems, or if you are using Ansible on experimental platforms. To disable fact gathering:

 
```
- hosts: whatever
  gather_facts: no

```
 ### Adding custom facts

 The setup module in Ansible automatically discovers a standard set of facts about each host. If you want to add custom values to your facts, you can write a custom facts module, set temporary facts with a `ansible.builtin.set_fact` task, or provide permanent custom facts using the facts.d directory.

 #### facts.d or local facts

  New in version 1.3.

  You can add static custom facts by adding static files to facts.d, or add dynamic facts by adding executable scripts to facts.d. For example, you can add a list of all users on a host to your facts by creating and running a script in facts.d.

 To use facts.d, create an `/etc/ansible/facts.d` directory on the remote host or hosts. If you prefer a different directory, create it and specify it using the `fact_path` play keyword. Add files to the directory to supply your custom facts. All file names must end with `.fact`. The files can be JSON, INI, or executable files returning JSON.

 To add static facts, simply add a file with the `.fact` extension. For example, create `/etc/ansible/facts.d/preferences.fact` with this content:

 
```
[general]
asdf=1
bar=2

```
  Note

 Make sure the file is not executable as this will break the `ansible.builtin.setup` module.

  The next time fact gathering runs, your facts will include a hash variable fact named `general` with `asdf` and `bar` as members. To validate this, run the following:

 
```
ansible <hostname> -m ansible.builtin.setup -a "filter=ansible_local"

```
 And you will see your custom fact added:

 
```
"ansible_local": {
        "preferences": {
            "general": {
                "asdf" : "1",
                "bar"  : "2"
            }
        }
 }

```
 The ansible\_local namespace separates custom facts created by facts.d from system facts or variables defined elsewhere in the playbook, so variables will not override each other. You can access this custom fact in a template or playbook as:

 
```
{{ ansible_local['preferences']['general']['asdf'] }}

```
  Note

 The key part in the key=value pairs will be converted into lowercase inside the ansible\_local variable. Using the example above, if the ini file contained `XYZ=3` in the `[general]` section, then you should expect to access it as: `{{ ansible_local['preferences']['general']['xyz'] }}` and not `{{ ansible_local['preferences']['general']['XYZ'] }}`. This is because Ansible uses Python’s [ConfigParser](https://docs.python.org/2/library/configparser.html) which passes all option names through the [optionxform](https://docs.python.org/2/library/configparser.html#ConfigParser.RawConfigParser.optionxform) method and this method’s default implementation converts option names to lower case.

  You can also use facts.d to execute a script on the remote host, generating dynamic custom facts to the ansible\_local namespace. For example, you can generate a list of all users that exist on a remote host as a fact about that host. To generate dynamic custom facts using facts.d:

 1. Write and test a script to generate the JSON data you want.
2. Save the script in your facts.d directory.
3. Make sure your script has the `.fact` file extension.
4. Make sure your script is executable by the Ansible connection user.
5. Gather facts to execute the script and add the JSON output to ansible\_local.

 By default, fact gathering runs once at the beginning of each play. If you create a custom fact using facts.d in a playbook, it will be available in the next play that gathers facts. If you want to use it in the same play where you created it, you must explicitly re-run the setup module. For example:

 
```
- hosts: webservers
  tasks:

    - name: Create directory for ansible custom facts
      ansible.builtin.file:
        state: directory
        recurse: yes
        path: /etc/ansible/facts.d

    - name: Install custom ipmi fact
      ansible.builtin.copy:
        src: ipmi.fact
        dest: /etc/ansible/facts.d

    - name: Re-read facts after adding custom fact
      ansible.builtin.setup:
        filter: ansible_local

```
 If you use this pattern frequently, a custom facts module would be more efficient than facts.d.

 Information about Ansible: magic variables
------------------------------------------

 You can access information about Ansible operations, including the python version being used, the hosts and groups in inventory, and the directories for playbooks and roles, using “magic” variables. Like connection variables, magic variables are [Special Variables](../reference_appendices/special_variables#special-variables). Magic variable names are reserved - do not set variables with these names. The variable `environment` is also reserved.

 The most commonly used magic variables are `hostvars`, `groups`, `group_names`, and `inventory_hostname`. With `hostvars`, you can access variables defined for any host in the play, at any point in a playbook. You can access Ansible facts using the `hostvars` variable too, but only after you have gathered (or cached) facts.

 If you want to configure your database server using the value of a ‘fact’ from another node, or the value of an inventory variable assigned to another node, you can use `hostvars` in a template or on an action line:

 
```
{{ hostvars['test.example.com']['ansible_facts']['distribution'] }}

```
 With `groups`, a list of all the groups (and hosts) in the inventory, you can enumerate all hosts within a group. For example:

 
```
{% for host in groups['app_servers'] %}
   # something that applies to all app servers.
{% endfor %}

```
 You can use `groups` and `hostvars` together to find all the IP addresses in a group.

 
```
{% for host in groups['app_servers'] %}
   {{ hostvars[host]['ansible_facts']['eth0']['ipv4']['address'] }}
{% endfor %}

```
 You can use this approach to point a frontend proxy server to all the hosts in your app servers group, to set up the correct firewall rules between servers, and so on. You must either cache facts or gather facts for those hosts before the task that fills out the template.

 With `group_names`, a list (array) of all the groups the current host is in, you can create templated files that vary based on the group membership (or role) of the host:

 
```
{% if 'webserver' in group_names %}
   # some part of a configuration file that only applies to webservers
{% endif %}

```
 You can use the magic variable `inventory_hostname`, the name of the host as configured in your inventory, as an alternative to `ansible_hostname` when fact-gathering is disabled. If you have a long FQDN, you can use `inventory_hostname_short`, which contains the part up to the first period, without the rest of the domain.

 Other useful magic variables refer to the current play or playbook. These vars may be useful for filling out templates with multiple hostnames or for injecting the list into the rules for a load balancer.

 `ansible_play_hosts` is the list of all hosts still active in the current play.

 `ansible_play_batch` is a list of hostnames that are in scope for the current ‘batch’ of the play.

 The batch size is defined by `serial`, when not set it is equivalent to the whole play (making it the same as `ansible_play_hosts`).

 `ansible_playbook_python` is the path to the python executable used to invoke the Ansible command line tool.

 `inventory_dir` is the pathname of the directory holding Ansible’s inventory host file.

 `inventory_file` is the pathname and the filename pointing to the Ansible’s inventory host file.

 `playbook_dir` contains the playbook base directory.

 `role_path` contains the current role’s pathname and only works inside a role.

 `ansible_check_mode` is a boolean, set to `True` if you run Ansible with `--check`.

 ### Ansible version

  New in version 1.8.

  To adapt playbook behavior to different versions of Ansible, you can use the variable `ansible_version`, which has the following structure:

 
```
"ansible_version": {
    "full": "2.10.1",
    "major": 2,
    "minor": 10,
    "revision": 1,
    "string": "2.10.1"
}

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_vars_facts.html>

Encrypting content with Ansible Vault
=====================================

 Ansible Vault encrypts variables and files so you can protect sensitive content such as passwords or keys rather than leaving it visible as plaintext in playbooks or roles. To use Ansible Vault you need one or more passwords to encrypt and decrypt content. If you store your vault passwords in a third-party tool such as a secret manager, you need a script to access them. Use the passwords with the [ansible-vault](../cli/ansible-vault#ansible-vault) command-line tool to create and view encrypted variables, create encrypted files, encrypt existing files, or edit, re-key, or decrypt files. You can then place encrypted content under source control and share it more safely.

  Warning

 * Encryption with Ansible Vault ONLY protects ‘data at rest’. Once the content is decrypted (‘data in use’), play and plugin authors are responsible for avoiding any secret disclosure, see [no\_log](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#keep-secret-data) for details on hiding output and [Steps to secure your editor](#vault-securing-editor) for security considerations on editors you use with Ansible Vault.

  You can use encrypted variables and files in ad hoc commands and playbooks by supplying the passwords you used to encrypt them. You can modify your `ansible.cfg` file to specify the location of a password file or to always prompt for the password.

 * [Managing vault passwords](#managing-vault-passwords)


	+ [Choosing between a single password and multiple passwords](#choosing-between-a-single-password-and-multiple-passwords)
	+ [Managing multiple passwords with vault IDs](#managing-multiple-passwords-with-vault-ids)
	
	
		- [Limitations of vault IDs](#limitations-of-vault-ids)
		- [Enforcing vault ID matching](#enforcing-vault-id-matching)
	+ [Storing and accessing vault passwords](#storing-and-accessing-vault-passwords)
	
	
		- [Storing passwords in files](#storing-passwords-in-files)
		- [Storing passwords in third-party tools with vault password client scripts](#storing-passwords-in-third-party-tools-with-vault-password-client-scripts)
* [Encrypting content with Ansible Vault](#id1)


	+ [Encrypting individual variables with Ansible Vault](#encrypting-individual-variables-with-ansible-vault)
	
	
		- [Advantages and disadvantages of encrypting variables](#advantages-and-disadvantages-of-encrypting-variables)
		- [Creating encrypted variables](#creating-encrypted-variables)
		- [Viewing encrypted variables](#viewing-encrypted-variables)
	+ [Encrypting files with Ansible Vault](#encrypting-files-with-ansible-vault)
	
	
		- [Advantages and disadvantages of encrypting files](#advantages-and-disadvantages-of-encrypting-files)
		- [Creating encrypted files](#creating-encrypted-files)
		- [Encrypting existing files](#encrypting-existing-files)
		- [Viewing encrypted files](#viewing-encrypted-files)
		- [Editing encrypted files](#editing-encrypted-files)
		- [Changing the password and/or vault ID on encrypted files](#changing-the-password-and-or-vault-id-on-encrypted-files)
		- [Decrypting encrypted files](#decrypting-encrypted-files)
		- [Steps to secure your editor](#steps-to-secure-your-editor)
		
		
			* [vim](#vim)
			* [Emacs](#emacs)
* [Using encrypted variables and files](#using-encrypted-variables-and-files)


	+ [Passing a single password](#passing-a-single-password)
	+ [Passing vault IDs](#passing-vault-ids)
	+ [Passing multiple vault passwords](#passing-multiple-vault-passwords)
	+ [Using `--vault-id` without a vault ID](#using-vault-id-without-a-vault-id)
* [Configuring defaults for using encrypted content](#configuring-defaults-for-using-encrypted-content)


	+ [Setting a default vault ID](#setting-a-default-vault-id)
	+ [Setting a default password source](#setting-a-default-password-source)
* [When are encrypted files made visible?](#when-are-encrypted-files-made-visible)
* [Speeding up Ansible Vault](#speeding-up-ansible-vault)
* [Format of files encrypted with Ansible Vault](#format-of-files-encrypted-with-ansible-vault)


	+ [Ansible Vault payload format 1.1 - 1.2](#ansible-vault-payload-format-1-1-1-2)

 Managing vault passwords
------------------------

 Managing your encrypted content is easier if you develop a strategy for managing your vault passwords. A vault password can be any string you choose. There is no special command to create a vault password. However, you need to keep track of your vault passwords. Each time you encrypt a variable or file with Ansible Vault, you must provide a password. When you use an encrypted variable or file in a command or playbook, you must provide the same password that was used to encrypt it. To develop a strategy for managing vault passwords, start with two questions:

 * Do you want to encrypt all your content with the same password, or use different passwords for different needs?
* Where do you want to store your password or passwords?

 ### Choosing between a single password and multiple passwords

 If you have a small team or few sensitive values, you can use a single password for everything you encrypt with Ansible Vault. Store your vault password securely in a file or a secret manager as described below.

 If you have a larger team or many sensitive values, you can use multiple passwords. For example, you can use different passwords for different users or different levels of access. Depending on your needs, you might want a different password for each encrypted file, for each directory, or for each environment. For example, you might have a playbook that includes two vars files, one for the dev environment and one for the production environment, encrypted with two different passwords. When you run the playbook, select the correct vault password for the environment you are targeting, using a vault ID.

 ### Managing multiple passwords with vault IDs

 If you use multiple vault passwords, you can differentiate one password from another with vault IDs. You use the vault ID in three ways:

 * Pass it with [`--vault-id`](../cli/ansible-playbook#cmdoption-ansible-playbook-vault-id) to the [ansible-vault](../cli/ansible-vault#ansible-vault) command when you create encrypted content
* Include it wherever you store the password for that vault ID (see [Storing and accessing vault passwords](#storing-vault-passwords))
* Pass it with [`--vault-id`](../cli/ansible-playbook#cmdoption-ansible-playbook-vault-id) to the [ansible-playbook](../cli/ansible-playbook#ansible-playbook) command when you run a playbook that uses content you encrypted with that vault ID

 When you pass a vault ID as an option to the [ansible-vault](../cli/ansible-vault#ansible-vault) command, you add a label (a hint or nickname) to the encrypted content. This label documents which password you used to encrypt it. The encrypted variable or file includes the vault ID label in plain text in the header. The vault ID is the last element before the encrypted content. For example:

 
```
my_encrypted_var: !vault |
          $ANSIBLE_VAULT;1.2;AES256;dev
          30613233633461343837653833666333643061636561303338373661313838333565653635353162
          3263363434623733343538653462613064333634333464660a663633623939393439316636633863
          61636237636537333938306331383339353265363239643939666639386530626330633337633833
          6664656334373166630a363736393262666465663432613932613036303963343263623137386239
          6330

```
 In addition to the label, you must provide a source for the related password. The source can be a prompt, a file, or a script, depending on how you are storing your vault passwords. The pattern looks like this:

 
```
--vault-id label@source

```
 If your playbook uses multiple encrypted variables or files that you encrypted with different passwords, you must pass the vault IDs when you run that playbook. You can use [`--vault-id`](../cli/ansible-playbook#cmdoption-ansible-playbook-vault-id) by itself, with [`--vault-password-file`](../cli/ansible-playbook#cmdoption-ansible-playbook-vault-password-file), or with [`--ask-vault-pass`](../cli/ansible-playbook#cmdoption-ansible-playbook-ask-vault-password). The pattern is the same as when you create encrypted content: include the label and the source for the matching password.

 See below for examples of encrypting content with vault IDs and using content encrypted with vault IDs. The [`--vault-id`](../cli/ansible-playbook#cmdoption-ansible-playbook-vault-id) option works with any Ansible command that interacts with vaults, including [ansible-vault](../cli/ansible-vault#ansible-vault), [ansible-playbook](../cli/ansible-playbook#ansible-playbook), and so on.

 #### Limitations of vault IDs

 Ansible does not enforce using the same password every time you use a particular vault ID label. You can encrypt different variables or files with the same vault ID label but different passwords. This usually happens when you type the password at a prompt and make a mistake. It is possible to use different passwords with the same vault ID label on purpose. For example, you could use each label as a reference to a class of passwords, rather than a single password. In this scenario, you must always know which specific password or file to use in context. However, you are more likely to encrypt two files with the same vault ID label and different passwords by mistake. If you encrypt two files with the same label but different passwords by accident, you can [rekey](#rekeying-files) one file to fix the issue.

 #### Enforcing vault ID matching

 By default the vault ID label is only a hint to remind you which password you used to encrypt a variable or file. Ansible does not check that the vault ID in the header of the encrypted content matches the vault ID you provide when you use the content. Ansible decrypts all files and variables called by your command or playbook that are encrypted with the password you provide. To check the encrypted content and decrypt it only when the vault ID it contains matches the one you provide with `--vault-id`, set the config option [DEFAULT\_VAULT\_ID\_MATCH](../reference_appendices/config#default-vault-id-match). When you set [DEFAULT\_VAULT\_ID\_MATCH](../reference_appendices/config#default-vault-id-match), each password is only used to decrypt data that was encrypted with the same label. This is efficient, predictable, and can reduce errors when different values are encrypted with different passwords.

  Note

 Even with the [DEFAULT\_VAULT\_ID\_MATCH](../reference_appendices/config#default-vault-id-match) setting enabled, Ansible does not enforce using the same password every time you use a particular vault ID label.

  ### Storing and accessing vault passwords

 You can memorize your vault password, or manually copy vault passwords from any source and paste them at a command-line prompt, but most users store them securely and access them as needed from within Ansible. You have two options for storing vault passwords that work from within Ansible: in files, or in a third-party tool such as the system keyring or a secret manager. If you store your passwords in a third-party tool, you need a vault password client script to retrieve them from within Ansible.

 #### Storing passwords in files

 To store a vault password in a file, enter the password as a string on a single line in the file. Make sure the permissions on the file are appropriate. Do not add password files to source control.

 #### Storing passwords in third-party tools with vault password client scripts

 You can store your vault passwords on the system keyring, in a database, or in a secret manager and retrieve them from within Ansible using a vault password client script. Enter the password as a string on a single line. If your password has a vault ID, store it in a way that works with your password storage tool.

 To create a vault password client script:

 * Create a file with a name ending in either `-client` or `-client.EXTENSION`
* Make the file executable
* Within the script itself:


	+ Print the passwords to standard output
	+ Accept a `--vault-id` option
	+ If the script prompts for data (for example, a database password), send the prompts to standard error

 When you run a playbook that uses vault passwords stored in a third-party tool, specify the script as the source within the `--vault-id` flag. For example:

 
```
ansible-playbook --vault-id dev@contrib/vault/vault-keyring-client.py

```
 Ansible executes the client script with a `--vault-id` option so the script knows which vault ID label you specified. For example a script loading passwords from a secret manager can use the vault ID label to pick either the ‘dev’ or ‘prod’ password. The example command above results in the following execution of the client script:

 
```
contrib/vault/vault-keyring-client.py --vault-id dev

```
 For an example of a client script that loads passwords from the system keyring, see `contrib/vault/vault-keyring-client.py`.

 Encrypting content with Ansible Vault
-------------------------------------

 Once you have a strategy for managing and storing vault passwords, you can start encrypting content. You can encrypt two types of content with Ansible Vault: variables and files. Encrypted content always includes the `!vault` tag, which tells Ansible and YAML that the content needs to be decrypted, and a `|` character, which allows multi-line strings. Encrypted content created with `--vault-id` also contains the vault ID label. For more details about the encryption process and the format of content encrypted with Ansible Vault, see [Format of files encrypted with Ansible Vault](#vault-format). This table shows the main differences between encrypted variables and encrypted files:

 

|  | Encrypted variables | Encrypted files |
| --- | --- | --- |
| How much is encrypted? | Variables within a plaintext file | The entire file |
| When is it decrypted? | On demand, only when needed | Whenever loaded or referenced [1](#f1) |
| What can be encrypted? | Only variables | Any structured data file |

  
`1`  
Ansible cannot know if it needs content from an encrypted file unless it decrypts the file, so it decrypts all encrypted files referenced in your playbooks and roles.

   ### Encrypting individual variables with Ansible Vault

 You can encrypt single values inside a YAML file using the [ansible-vault encrypt\_string](../cli/ansible-vault#ansible-vault-encrypt-string) command. For one way to keep your vaulted variables safely visible, see [Keep vaulted variables safely visible](playbooks_best_practices#tip-for-variables-and-vaults).

 #### Advantages and disadvantages of encrypting variables

 With variable-level encryption, your files are still easily legible. You can mix plaintext and encrypted variables, even inline in a play or role. However, password rotation is not as simple as with file-level encryption. You cannot [rekey](#rekeying-files) encrypted variables. Also, variable-level encryption only works on variables. If you want to encrypt tasks or other content, you must encrypt the entire file.

 #### Creating encrypted variables

 The [ansible-vault encrypt\_string](../cli/ansible-vault#ansible-vault-encrypt-string) command encrypts and formats any string you type (or copy or generate) into a format that can be included in a playbook, role, or variables file. To create a basic encrypted variable, pass three options to the [ansible-vault encrypt\_string](../cli/ansible-vault#ansible-vault-encrypt-string) command:

 * a source for the vault password (prompt, file, or script, with or without a vault ID)
* the string to encrypt
* the string name (the name of the variable)

 The pattern looks like this:

 
```
ansible-vault encrypt_string <password_source> '<string_to_encrypt>' --name '<string_name_of_variable>'

```
 For example, to encrypt the string ‘foobar’ using the only password stored in ‘a\_password\_file’ and name the variable ‘the\_secret’:

 
```
ansible-vault encrypt_string --vault-password-file a_password_file 'foobar' --name 'the_secret'

```
 The command above creates this content:

 
```
the_secret: !vault |
      $ANSIBLE_VAULT;1.1;AES256
      62313365396662343061393464336163383764373764613633653634306231386433626436623361
      6134333665353966363534333632666535333761666131620a663537646436643839616531643561
      63396265333966386166373632626539326166353965363262633030333630313338646335303630
      3438626666666137650a353638643435666633633964366338633066623234616432373231333331
      6564

```
 To encrypt the string ‘foooodev’, add the vault ID label ‘dev’ with the ‘dev’ vault password stored in ‘a\_password\_file’, and call the encrypted variable ‘the\_dev\_secret’:

 
```
ansible-vault encrypt_string --vault-id dev@a_password_file 'foooodev' --name 'the_dev_secret'

```
 The command above creates this content:

 
```
the_dev_secret: !vault |
          $ANSIBLE_VAULT;1.2;AES256;dev
          30613233633461343837653833666333643061636561303338373661313838333565653635353162
          3263363434623733343538653462613064333634333464660a663633623939393439316636633863
          61636237636537333938306331383339353265363239643939666639386530626330633337633833
          6664656334373166630a363736393262666465663432613932613036303963343263623137386239
          6330

```
 To encrypt the string ‘letmein’ read from stdin, add the vault ID ‘dev’ using the ‘dev’ vault password stored in `a_password_file`, and name the variable ‘db\_password’:

 
```
echo -n 'letmein' | ansible-vault encrypt_string --vault-id dev@a_password_file --stdin-name 'db_password'

```
  Warning

 Typing secret content directly at the command line (without a prompt) leaves the secret string in your shell history. Do not do this outside of testing.

  The command above creates this output:

 
```
Reading plaintext input from stdin. (ctrl-d to end input, twice if your content does not already have a new line)
db_password: !vault |
          $ANSIBLE_VAULT;1.2;AES256;dev
          61323931353866666336306139373937316366366138656131323863373866376666353364373761
          3539633234313836346435323766306164626134376564330a373530313635343535343133316133
          36643666306434616266376434363239346433643238336464643566386135356334303736353136
          6565633133366366360a326566323363363936613664616364623437336130623133343530333739
          3039

```
 To be prompted for a string to encrypt, encrypt it with the ‘dev’ vault password from ‘a\_password\_file’, name the variable ‘new\_user\_password’ and give it the vault ID label ‘dev’:

 
```
ansible-vault encrypt_string --vault-id dev@a_password_file --stdin-name 'new_user_password'

```
 The command above triggers this prompt:

 
```
Reading plaintext input from stdin. (ctrl-d to end input, twice if your content does not already have a new line)

```
 Type the string to encrypt (for example, ‘hunter2’), hit ctrl-d, and wait.

  Warning

 Do not press `Enter` after supplying the string to encrypt. That will add a newline to the encrypted value.

  The sequence above creates this output:

 
```
new_user_password: !vault |
          $ANSIBLE_VAULT;1.2;AES256;dev
          37636561366636643464376336303466613062633537323632306566653533383833366462366662
          6565353063303065303831323539656138653863353230620a653638643639333133306331336365
          62373737623337616130386137373461306535383538373162316263386165376131623631323434
          3866363862363335620a376466656164383032633338306162326639643635663936623939666238
          3161

```
 You can add the output from any of the examples above to any playbook, variables file, or role for future use. Encrypted variables are larger than plain-text variables, but they protect your sensitive content while leaving the rest of the playbook, variables file, or role in plain text so you can easily read it.

 #### Viewing encrypted variables

 You can view the original value of an encrypted variable using the debug module. You must pass the password that was used to encrypt the variable. For example, if you stored the variable created by the last example above in a file called ‘vars.yml’, you could view the unencrypted value of that variable like this:

 
```
ansible localhost -m ansible.builtin.debug -a var="new_user_password" -e "@vars.yml" --vault-id dev@a_password_file

localhost | SUCCESS => {
    "new_user_password": "hunter2"
}

```
 ### Encrypting files with Ansible Vault

 Ansible Vault can encrypt any structured data file used by Ansible, including:

 * group variables files from inventory
* host variables files from inventory
* variables files passed to ansible-playbook with `-e @file.yml` or `-e @file.json`
* variables files loaded by `include_vars` or `vars_files`
* variables files in roles
* defaults files in roles
* tasks files
* handlers files
* binary files or other arbitrary files

 The full file is encrypted in the vault.

  Note

 Ansible Vault uses an editor to create or modify encrypted files. See [Steps to secure your editor](#vault-securing-editor) for some guidance on securing the editor.

  #### Advantages and disadvantages of encrypting files

 File-level encryption is easy to use. Password rotation for encrypted files is straightforward with the [rekey](#rekeying-files) command. Encrypting files can hide not only sensitive values, but the names of the variables you use. However, with file-level encryption the contents of files are no longer easy to access and read. This may be a problem with encrypted tasks files. When encrypting a variables file, see [Keep vaulted variables safely visible](playbooks_best_practices#tip-for-variables-and-vaults) for one way to keep references to these variables in a non-encrypted file. Ansible always decrypts the entire encrypted file when it is when loaded or referenced, because Ansible cannot know if it needs the content unless it decrypts it.

 #### Creating encrypted files

 To create a new encrypted data file called ‘foo.yml’ with the ‘test’ vault password from ‘multi\_password\_file’:

 
```
ansible-vault create --vault-id test@multi_password_file foo.yml

```
 The tool launches an editor (whatever editor you have defined with $EDITOR, default editor is vi). Add the content. When you close the editor session, the file is saved as encrypted data. The file header reflects the vault ID used to create it:

 
```
``$ANSIBLE_VAULT;1.2;AES256;test``

```
 To create a new encrypted data file with the vault ID ‘my\_new\_password’ assigned to it and be prompted for the password:

 
```
ansible-vault create --vault-id my_new_password@prompt foo.yml

```
 Again, add content to the file in the editor and save. Be sure to store the new password you created at the prompt, so you can find it when you want to decrypt that file.

 #### Encrypting existing files

 To encrypt an existing file, use the [ansible-vault encrypt](../cli/ansible-vault#ansible-vault-encrypt) command. This command can operate on multiple files at once. For example:

 
```
ansible-vault encrypt foo.yml bar.yml baz.yml

```
 To encrypt existing files with the ‘project’ ID and be prompted for the password:

 
```
ansible-vault encrypt --vault-id project@prompt foo.yml bar.yml baz.yml

```
 #### Viewing encrypted files

 To view the contents of an encrypted file without editing it, you can use the [ansible-vault view](../cli/ansible-vault#ansible-vault-view) command:

 
```
ansible-vault view foo.yml bar.yml baz.yml

```
 #### Editing encrypted files

 To edit an encrypted file in place, use the [ansible-vault edit](../cli/ansible-vault#ansible-vault-edit) command. This command decrypts the file to a temporary file, allows you to edit the content, then saves and re-encrypts the content and removes the temporary file when you close the editor. For example:

 
```
ansible-vault edit foo.yml

```
 To edit a file encrypted with the `vault2` password file and assigned the vault ID `pass2`:

 
```
ansible-vault edit --vault-id pass2@vault2 foo.yml

```
 #### Changing the password and/or vault ID on encrypted files

 To change the password on an encrypted file or files, use the [rekey](../cli/ansible-vault#ansible-vault-rekey) command:

 
```
ansible-vault rekey foo.yml bar.yml baz.yml

```
 This command can rekey multiple data files at once and will ask for the original password and also the new password. To set a different ID for the rekeyed files, pass the new ID to `--new-vault-id`. For example, to rekey a list of files encrypted with the ‘preprod1’ vault ID from the ‘ppold’ file to the ‘preprod2’ vault ID and be prompted for the new password:

 
```
ansible-vault rekey --vault-id preprod1@ppold --new-vault-id preprod2@prompt foo.yml bar.yml baz.yml

```
 #### Decrypting encrypted files

 If you have an encrypted file that you no longer want to keep encrypted, you can permanently decrypt it by running the [ansible-vault decrypt](../cli/ansible-vault#ansible-vault-decrypt) command. This command will save the file unencrypted to the disk, so be sure you do not want to [edit](../cli/ansible-vault#ansible-vault-edit) it instead.

 
```
ansible-vault decrypt foo.yml bar.yml baz.yml

```
 #### Steps to secure your editor

 Ansible Vault relies on your configured editor, which can be a source of disclosures. Most editors have ways to prevent loss of data, but these normally rely on extra plain text files that can have a clear text copy of your secrets. Consult your editor documentation to configure the editor to avoid disclosing secure data. The following sections provide some guidance on common editors but should not be taken as a complete guide to securing your editor.

 ##### vim

 You can set the following `vim` options in command mode to avoid cases of disclosure. There may be more settings you need to modify to ensure security, especially when using plugins, so consult the `vim` documentation.

 1. Disable swapfiles that act like an autosave in case of crash or interruption.

 
```
set noswapfile

```
 2. Disable creation of backup files.

 
```
set nobackup
set nowritebackup

```
 3. Disable the viminfo file from copying data from your current session.

 
```
set viminfo=

```
 4. Disable copying to the system clipboard.

 
```
set clipboard=

```
 You can optionally add these settings in `.vimrc` for all files, or just specific paths or extensions. See the `vim` manual for details.

 ##### Emacs

 You can set the following Emacs options to avoid cases of disclosure. There may be more settings you need to modify to ensure security, especially when using plugins, so consult the Emacs documentation.

 1. Do not copy data to the system clipboard.

 
```
(setq x-select-enable-clipboard nil)

```
 2. Disable creation of backup files.

 
```
(setq make-backup-files nil)

```
 3. Disable autosave files.

 
```
(setq auto-save-default nil)

```
 Using encrypted variables and files
-----------------------------------

 When you run a task or playbook that uses encrypted variables or files, you must provide the passwords to decrypt the variables or files. You can do this at the command line or in the playbook itself.

 ### Passing a single password

 If all the encrypted variables and files your task or playbook needs use a single password, you can use the [`--ask-vault-pass`](../cli/ansible-playbook#cmdoption-ansible-playbook-ask-vault-password) or [`--vault-password-file`](../cli/ansible-playbook#cmdoption-ansible-playbook-vault-password-file) cli options.

 To prompt for the password:

 
```
ansible-playbook --ask-vault-pass site.yml

```
 To retrieve the password from the `/path/to/my/vault-password-file` file:

 
```
ansible-playbook --vault-password-file /path/to/my/vault-password-file site.yml

```
 To get the password from the vault password client script `my-vault-password-client.py`:

 
```
ansible-playbook --vault-password-file my-vault-password-client.py

```
 ### Passing vault IDs

 You can also use the [`--vault-id`](../cli/ansible-playbook#cmdoption-ansible-playbook-vault-id) option to pass a single password with its vault label. This approach is clearer when multiple vaults are used within a single inventory.

 To prompt for the password for the ‘dev’ vault ID:

 
```
ansible-playbook --vault-id dev@prompt site.yml

```
 To retrieve the password for the ‘dev’ vault ID from the `dev-password` file:

 
```
ansible-playbook --vault-id dev@dev-password site.yml

```
 To get the password for the ‘dev’ vault ID from the vault password client script `my-vault-password-client.py`:

 
```
ansible-playbook --vault-id dev@my-vault-password-client.py

```
 ### Passing multiple vault passwords

 If your task or playbook requires multiple encrypted variables or files that you encrypted with different vault IDs, you must use the [`--vault-id`](../cli/ansible-playbook#cmdoption-ansible-playbook-vault-id) option, passing multiple `--vault-id` options to specify the vault IDs (‘dev’, ‘prod’, ‘cloud’, ‘db’) and sources for the passwords (prompt, file, script). . For example, to use a ‘dev’ password read from a file and to be prompted for the ‘prod’ password:

 
```
ansible-playbook --vault-id dev@dev-password --vault-id prod@prompt site.yml

```
 By default the vault ID labels (dev, prod and so on) are only hints. Ansible attempts to decrypt vault content with each password. The password with the same label as the encrypted data will be tried first, after that each vault secret will be tried in the order they were provided on the command line.

 Where the encrypted data has no label, or the label does not match any of the provided labels, the passwords will be tried in the order they are specified. In the example above, the ‘dev’ password will be tried first, then the ‘prod’ password for cases where Ansible doesn’t know which vault ID is used to encrypt something.

 ### Using `--vault-id` without a vault ID

 The [`--vault-id`](../cli/ansible-playbook#cmdoption-ansible-playbook-vault-id) option can also be used without specifying a vault-id. This behavior is equivalent to [`--ask-vault-pass`](../cli/ansible-playbook#cmdoption-ansible-playbook-ask-vault-password) or [`--vault-password-file`](../cli/ansible-playbook#cmdoption-ansible-playbook-vault-password-file) so is rarely used.

 For example, to use a password file `dev-password`:

 
```
ansible-playbook --vault-id dev-password site.yml

```
 To prompt for the password:

 
```
ansible-playbook --vault-id @prompt site.yml

```
 To get the password from an executable script `my-vault-password-client.py`:

 
```
ansible-playbook --vault-id my-vault-password-client.py

```
 Configuring defaults for using encrypted content
------------------------------------------------

 ### Setting a default vault ID

 If you use one vault ID more frequently than any other, you can set the config option [DEFAULT\_VAULT\_IDENTITY\_LIST](../reference_appendices/config#default-vault-identity-list) to specify a default vault ID and password source. Ansible will use the default vault ID and source any time you do not specify [`--vault-id`](../cli/ansible-playbook#cmdoption-ansible-playbook-vault-id). You can set multiple values for this option. Setting multiple values is equivalent to passing multiple [`--vault-id`](../cli/ansible-playbook#cmdoption-ansible-playbook-vault-id) cli options.

 ### Setting a default password source

 If you use one vault password file more frequently than any other, you can set the [DEFAULT\_VAULT\_PASSWORD\_FILE](../reference_appendices/config#default-vault-password-file) config option or the [`ANSIBLE_VAULT_PASSWORD_FILE`](../reference_appendices/config#envvar-ANSIBLE_VAULT_PASSWORD_FILE) environment variable to specify that file. For example, if you set `ANSIBLE_VAULT_PASSWORD_FILE=~/.vault_pass.txt`, Ansible will automatically search for the password in that file. This is useful if, for example, you use Ansible from a continuous integration system such as Jenkins.

 When are encrypted files made visible?
--------------------------------------

 In general, content you encrypt with Ansible Vault remains encrypted after execution. However, there is one exception. If you pass an encrypted file as the `src` argument to the [copy](../collections/ansible/builtin/copy_module#copy-module), [template](../collections/ansible/builtin/template_module#template-module), [unarchive](../collections/ansible/builtin/unarchive_module#unarchive-module), [script](../collections/ansible/builtin/script_module#script-module) or [assemble](../collections/ansible/builtin/assemble_module#assemble-module) module, the file will not be encrypted on the target host (assuming you supply the correct vault password when you run the play). This behavior is intended and useful. You can encrypt a configuration file or template to avoid sharing the details of your configuration, but when you copy that configuration to servers in your environment, you want it to be decrypted so local users and processes can access it.

 Speeding up Ansible Vault
-------------------------

 If you have many encrypted files, decrypting them at startup may cause a perceptible delay. To speed this up, install the cryptography package:

 
```
pip install cryptography

```
 Format of files encrypted with Ansible Vault
--------------------------------------------

 Ansible Vault creates UTF-8 encoded txt files. The file format includes a newline terminated header. For example:

 
```
$ANSIBLE_VAULT;1.1;AES256

```
 or:

 
```
$ANSIBLE_VAULT;1.2;AES256;vault-id-label

```
 The header contains up to four elements, separated by semi-colons (`;`).

 1. The format ID (`$ANSIBLE_VAULT`). Currently `$ANSIBLE_VAULT` is the only valid format ID. The format ID identifies content that is encrypted with Ansible Vault (via vault.is\_encrypted\_file()).
2. The vault format version (`1.X`). All supported versions of Ansible will currently default to ‘1.1’ or ‘1.2’ if a labeled vault ID is supplied. The ‘1.0’ format is supported for reading only (and will be converted automatically to the ‘1.1’ format on write). The format version is currently used as an exact string compare only (version numbers are not currently ‘compared’).
3. The cipher algorithm used to encrypt the data (`AES256`). Currently `AES256` is the only supported cipher algorithm. Vault format 1.0 used ‘AES’, but current code always uses ‘AES256’.
4. The vault ID label used to encrypt the data (optional, `vault-id-label`) For example, if you encrypt a file with `--vault-id dev@prompt`, the vault-id-label is `dev`.

 Note: In the future, the header could change. Fields after the format ID and format version depend on the format version, and future vault format versions may add more cipher algorithm options and/or additional fields.

 The rest of the content of the file is the ‘vaulttext’. The vaulttext is a text armored version of the encrypted ciphertext. Each line is 80 characters wide, except for the last line which may be shorter.

 ### Ansible Vault payload format 1.1 - 1.2

 The vaulttext is a concatenation of the ciphertext and a SHA256 digest with the result ‘hexlifyied’.

 ‘hexlify’ refers to the `hexlify()` method of the Python Standard Library’s [binascii](https://docs.python.org/3/library/binascii.html) module.

 hexlify()’ed result of:

 * hexlify()’ed string of the salt, followed by a newline (`0x0a`)
* hexlify()’ed string of the crypted HMAC, followed by a newline. The HMAC is:


	+ a [RFC2104](https://www.ietf.org/rfc/rfc2104.txt) style HMAC
	
	
		- inputs are:
		
		
			* The AES256 encrypted ciphertext
			* A PBKDF2 key. This key, the cipher key, and the cipher IV are generated from:
			
			
				+ the salt, in bytes
				+ 10000 iterations
				+ SHA256() algorithm
				+ the first 32 bytes are the cipher key
				+ the second 32 bytes are the HMAC key
				+ remaining 16 bytes are the cipher IV
* hexlify()’ed string of the ciphertext. The ciphertext is:

 * AES256 encrypted data. The data is encrypted using:


	+ AES-CTR stream cipher
	+ cipher key
	+ IV
	+ a 128 bit counter block seeded from an integer IV
	+ the plaintext
	
	
		- the original plaintext
		- padding up to the AES256 blocksize. (The data used for padding is based on [RFC5652](https://tools.ietf.org/html/rfc5652#section-6.3))



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/vault.html>

Using filters to manipulate data
================================

 Filters let you transform JSON data into YAML data, split a URL to extract the hostname, get the SHA1 hash of a string, add or multiply integers, and much more. You can use the Ansible-specific filters documented here to manipulate your data, or use any of the standard filters shipped with Jinja2 - see the list of [built-in filters](https://jinja.palletsprojects.com/en/3.0.x/templates/#builtin-filters "(in Jinja v3.0.x)") in the official Jinja2 template documentation. You can also use [Python methods](https://jinja.palletsprojects.com/en/3.0.x/templates/#python-methods "(in Jinja v3.0.x)") to transform data. You can [create custom Ansible filters as plugins](https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html#developing-filter-plugins), though we generally welcome new filters into the ansible-core repo so everyone can use them.

 Because templating happens on the Ansible controller, **not** on the target host, filters execute on the controller and transform data locally.

 * [Handling undefined variables](#handling-undefined-variables)


	+ [Providing default values](#providing-default-values)
	+ [Making variables optional](#making-variables-optional)
	+ [Defining mandatory values](#defining-mandatory-values)
* [Defining different values for true/false/null (ternary)](#defining-different-values-for-true-false-null-ternary)
* [Managing data types](#managing-data-types)


	+ [Discovering the data type](#discovering-the-data-type)
	+ [Transforming dictionaries into lists](#transforming-dictionaries-into-lists)
	+ [Transforming lists into dictionaries](#transforming-lists-into-dictionaries)
	+ [Forcing the data type](#forcing-the-data-type)
* [Formatting data: YAML and JSON](#formatting-data-yaml-and-json)


	+ [Filter `to_json` and Unicode support](#filter-to-json-and-unicode-support)
* [Combining and selecting data](#combining-and-selecting-data)


	+ [Combining items from multiple lists: zip and zip\_longest](#combining-items-from-multiple-lists-zip-and-zip-longest)
	+ [Combining objects and subelements](#combining-objects-and-subelements)
	+ [Combining hashes/dictionaries](#combining-hashes-dictionaries)
	+ [Selecting values from arrays or hashtables](#selecting-values-from-arrays-or-hashtables)
	+ [Combining lists](#combining-lists)
	
	
		- [permutations](#permutations)
		- [combinations](#combinations)
		- [products](#products)
	+ [Selecting JSON data: JSON queries](#selecting-json-data-json-queries)
* [Randomizing data](#randomizing-data)


	+ [Random MAC addresses](#random-mac-addresses)
	+ [Random items or numbers](#random-items-or-numbers)
	+ [Shuffling a list](#shuffling-a-list)
* [Managing list variables](#managing-list-variables)
* [Selecting from sets or lists (set theory)](#selecting-from-sets-or-lists-set-theory)
* [Calculating numbers (math)](#calculating-numbers-math)
* [Managing network interactions](#managing-network-interactions)


	+ [IP address filters](#ip-address-filters)
	+ [Network CLI filters](#network-cli-filters)
	+ [Network XML filters](#network-xml-filters)
	+ [Network VLAN filters](#network-vlan-filters)
* [Encrypting and checksumming strings and passwords](#encrypting-and-checksumming-strings-and-passwords)
* [Manipulating text](#manipulating-text)


	+ [Adding comments to files](#adding-comments-to-files)
	+ [URLEncode Variables](#urlencode-variables)
	+ [Splitting URLs](#splitting-urls)
	+ [Searching strings with regular expressions](#searching-strings-with-regular-expressions)
	+ [Managing file names and path names](#managing-file-names-and-path-names)
* [Manipulating strings](#manipulating-strings)
* [Managing UUIDs](#managing-uuids)
* [Handling dates and times](#handling-dates-and-times)
* [Getting Kubernetes resource names](#getting-kubernetes-resource-names)

 Handling undefined variables
----------------------------

 Filters can help you manage missing or undefined variables by providing defaults or making some variables optional. If you configure Ansible to ignore most undefined variables, you can mark some variables as requiring values with the `mandatory` filter.

 ### Providing default values

 You can provide default values for variables directly in your templates using the Jinja2 ‘default’ filter. This is often a better approach than failing if a variable is not defined:

 
```
{{ some_variable | default(5) }}

```
 In the above example, if the variable ‘some\_variable’ is not defined, Ansible uses the default value 5, rather than raising an “undefined variable” error and failing. If you are working within a role, you can also add a `defaults/main.yml` to define the default values for variables in your role.

 Beginning in version 2.8, attempting to access an attribute of an Undefined value in Jinja will return another Undefined value, rather than throwing an error immediately. This means that you can now simply use a default with a value in a nested data structure (in other words, `{{ foo.bar.baz | default('DEFAULT') }}`) when you do not know if the intermediate values are defined.

 If you want to use the default value when variables evaluate to false or an empty string you have to set the second parameter to `true`:

 
```
{{ lookup('env', 'MY_USER') | default('admin', true) }}

```
 ### Making variables optional

 By default Ansible requires values for all variables in a templated expression. However, you can make specific variables optional. For example, you might want to use a system default for some items and control the value for others. To make a variable optional, set the default value to the special variable `omit`:

 
```
- name: Touch files with an optional mode
  ansible.builtin.file:
    dest: "{{ item.path }}"
    state: touch
    mode: "{{ item.mode | default(omit) }}"
  loop:
    - path: /tmp/foo
    - path: /tmp/bar
    - path: /tmp/baz
      mode: "0444"

```
 In this example, the default mode for the files `/tmp/foo` and `/tmp/bar` is determined by the umask of the system. Ansible does not send a value for `mode`. Only the third file, `/tmp/baz`, receives the `mode=0444` option.

  Note

 If you are “chaining” additional filters after the `default(omit)` filter, you should instead do something like this: `"{{ foo | default(None) | some_filter or omit }}"`. In this example, the default `None` (Python null) value will cause the later filters to fail, which will trigger the `or omit` portion of the logic. Using `omit` in this manner is very specific to the later filters you are chaining though, so be prepared for some trial and error if you do this.

  ### Defining mandatory values

 If you configure Ansible to ignore undefined variables, you may want to define some values as mandatory. By default, Ansible fails if a variable in your playbook or command is undefined. You can configure Ansible to allow undefined variables by setting [DEFAULT\_UNDEFINED\_VAR\_BEHAVIOR](../reference_appendices/config#default-undefined-var-behavior) to `false`. In that case, you may want to require some variables to be defined. You can do this with:

 
```
{{ variable | mandatory }}

```
 The variable value will be used as is, but the template evaluation will raise an error if it is undefined.

 Defining different values for true/false/null (ternary)
-------------------------------------------------------

 You can create a test, then define one value to use when the test returns true and another when the test returns false (new in version 1.9):

 
```
{{ (status == 'needs_restart') | ternary('restart', 'continue') }}

```
 In addition, you can define a one value to use on true, one value on false and a third value on null (new in version 2.8):

 
```
{{ enabled | ternary('no shutdown', 'shutdown', omit) }}

```
 Managing data types
-------------------

 You might need to know, change, or set the data type on a variable. For example, a registered variable might contain a dictionary when your next task needs a list, or a user [prompt](playbooks_prompts#playbooks-prompts) might return a string when your playbook needs a boolean value. Use the `type_debug`, `dict2items`, and `items2dict` filters to manage data types. You can also use the data type itself to cast a value as a specific data type.

 ### Discovering the data type

  New in version 2.3.

  If you are unsure of the underlying Python type of a variable, you can use the `type_debug` filter to display it. This is useful in debugging when you need a particular type of variable:

 
```
{{ myvar | type_debug }}

```
 ### Transforming dictionaries into lists

  New in version 2.6.

  Use the `dict2items` filter to transform a dictionary into a list of items suitable for [looping](playbooks_loops#playbooks-loops):

 
```
{{ dict | dict2items }}

```
 Dictionary data (before applying the `dict2items` filter):

 
```
tags:
  Application: payment
  Environment: dev

```
 List data (after applying the `dict2items` filter):

 
```
- key: Application
  value: payment
- key: Environment
  value: dev

```
  New in version 2.8.

  The `dict2items` filter is the reverse of the `items2dict` filter.

 If you want to configure the names of the keys, the `dict2items` filter accepts 2 keyword arguments. Pass the `key_name` and `value_name` arguments to configure the names of the keys in the list output:

 
```
{{ files | dict2items(key_name='file', value_name='path') }}

```
 Dictionary data (before applying the `dict2items` filter):

 
```
files:
  users: /etc/passwd
  groups: /etc/group

```
 List data (after applying the `dict2items` filter):

 
```
- file: users
  path: /etc/passwd
- file: groups
  path: /etc/group

```
 ### Transforming lists into dictionaries

  New in version 2.7.

  Use the `items2dict` filter to transform a list into a dictionary, mapping the content into `key: value` pairs:

 
```
{{ tags | items2dict }}

```
 List data (before applying the `items2dict` filter):

 
```
tags:
  - key: Application
    value: payment
  - key: Environment
    value: dev

```
 Dictionary data (after applying the `items2dict` filter):

 
```
Application: payment
Environment: dev

```
 The `items2dict` filter is the reverse of the `dict2items` filter.

 Not all lists use `key` to designate keys and `value` to designate values. For example:

 
```
fruits:
  - fruit: apple
    color: red
  - fruit: pear
    color: yellow
  - fruit: grapefruit
    color: yellow

```
 In this example, you must pass the `key_name` and `value_name` arguments to configure the transformation. For example:

 
```
{{ tags | items2dict(key_name='fruit', value_name='color') }}

```
 If you do not pass these arguments, or do not pass the correct values for your list, you will see `KeyError: key` or `KeyError: my_typo`.

 ### Forcing the data type

 You can cast values as certain types. For example, if you expect the input “True” from a [vars\_prompt](playbooks_prompts#playbooks-prompts) and you want Ansible to recognize it as a boolean value instead of a string:

 
```
- debug:
  msg: test
  when: some_string_value | bool

```
 If you want to perform a mathematical comparison on a fact and you want Ansible to recognize it as an integer instead of a string:

 
```
- shell: echo "only on Red Hat 6, derivatives, and later"
  when: ansible_facts['os_family'] == "RedHat" and ansible_facts['lsb']['major_release'] | int >= 6

```
  New in version 1.6.

  Formatting data: YAML and JSON
------------------------------

 You can switch a data structure in a template from or to JSON or YAML format, with options for formatting, indenting, and loading data. The basic filters are occasionally useful for debugging:

 
```
{{ some_variable | to_json }}
{{ some_variable | to_yaml }}

```
 For human readable output, you can use:

 
```
{{ some_variable | to_nice_json }}
{{ some_variable | to_nice_yaml }}

```
 You can change the indentation of either format:

 
```
{{ some_variable | to_nice_json(indent=2) }}
{{ some_variable | to_nice_yaml(indent=8) }}

```
 The `to_yaml` and `to_nice_yaml` filters use the [PyYAML library](https://pyyaml.org/) which has a default 80 symbol string length limit. That causes unexpected line break after 80th symbol (if there is a space after 80th symbol) To avoid such behavior and generate long lines, use the `width` option. You must use a hardcoded number to define the width, instead of a construction like `float("inf")`, because the filter does not support proxying Python functions. For example:

 
```
{{ some_variable | to_yaml(indent=8, width=1337) }}
{{ some_variable | to_nice_yaml(indent=8, width=1337) }}

```
 The filter does support passing through other YAML parameters. For a full list, see the [PyYAML documentation](https://pyyaml.org/wiki/PyYAMLDocumentation).

 If you are reading in some already formatted data:

 
```
{{ some_variable | from_json }}
{{ some_variable | from_yaml }}

```
 for example:

 
```
tasks:
  - name: Register JSON output as a variable
    ansible.builtin.shell: cat /some/path/to/file.json
    register: result

  - name: Set a variable
    ansible.builtin.set_fact:
      myvar: "{{ result.stdout | from_json }}"

```
 ### Filter `to_json` and Unicode support

 By default `to_json` and `to_nice_json` will convert data received to ASCII, so:

 
```
{{ 'München'| to_json }}

```
 will return:

 
```
'M\u00fcnchen'

```
 To keep Unicode characters, pass the parameter `ensure_ascii=False` to the filter:

 
```
{{ 'München'| to_json(ensure_ascii=False) }}

'München'

```
  New in version 2.7.

  To parse multi-document YAML strings, the `from_yaml_all` filter is provided. The `from_yaml_all` filter will return a generator of parsed YAML documents.

 for example:

 
```
tasks:
  - name: Register a file content as a variable
    ansible.builtin.shell: cat /some/path/to/multidoc-file.yaml
    register: result

  - name: Print the transformed variable
    ansible.builtin.debug:
      msg: '{{ item }}'
    loop: '{{ result.stdout | from_yaml_all | list }}'

```
 Combining and selecting data
----------------------------

 You can combine data from multiple sources and types, and select values from large data structures, giving you precise control over complex data.

 ### Combining items from multiple lists: zip and zip\_longest

  New in version 2.3.

  To get a list combining the elements of other lists use `zip`:

 
```
- name: Give me list combo of two lists
  ansible.builtin.debug:
   msg: "{{ [1,2,3,4,5,6] | zip(['a','b','c','d','e','f']) | list }}"

# => [[1, "a"], [2, "b"], [3, "c"], [4, "d"], [5, "e"], [6, "f"]]

- name: Give me shortest combo of two lists
  ansible.builtin.debug:
    msg: "{{ [1,2,3] | zip(['a','b','c','d','e','f']) | list }}"

# => [[1, "a"], [2, "b"], [3, "c"]]

```
 To always exhaust all lists use `zip_longest`:

 
```
- name: Give me longest combo of three lists , fill with X
  ansible.builtin.debug:
    msg: "{{ [1,2,3] | zip_longest(['a','b','c','d','e','f'], [21, 22, 23], fillvalue='X') | list }}"

# => [[1, "a", 21], [2, "b", 22], [3, "c", 23], ["X", "d", "X"], ["X", "e", "X"], ["X", "f", "X"]]

```
 Similarly to the output of the `items2dict` filter mentioned above, these filters can be used to construct a `dict`:

 
```
{{ dict(keys_list | zip(values_list)) }}

```
 List data (before applying the `zip` filter):

 
```
keys_list:
  - one
  - two
values_list:
  - apple
  - orange

```
 Dictionary data (after applying the `zip` filter):

 
```
one: apple
two: orange

```
 ### Combining objects and subelements

  New in version 2.7.

  The `subelements` filter produces a product of an object and the subelement values of that object, similar to the `subelements` lookup. This lets you specify individual subelements to use in a template. For example, this expression:

 
```
{{ users | subelements('groups', skip_missing=True) }}

```
 Data before applying the `subelements` filter:

 
```
users:
- name: alice
  authorized:
  - /tmp/alice/onekey.pub
  - /tmp/alice/twokey.pub
  groups:
  - wheel
  - docker
- name: bob
  authorized:
  - /tmp/bob/id_rsa.pub
  groups:
  - docker

```
 Data after applying the `subelements` filter:

 
```
-
  - name: alice
    groups:
    - wheel
    - docker
    authorized:
    - /tmp/alice/onekey.pub
    - /tmp/alice/twokey.pub
  - wheel
-
  - name: alice
    groups:
    - wheel
    - docker
    authorized:
    - /tmp/alice/onekey.pub
    - /tmp/alice/twokey.pub
  - docker
-
  - name: bob
    authorized:
    - /tmp/bob/id_rsa.pub
    groups:
    - docker
  - docker

```
 You can use the transformed data with `loop` to iterate over the same subelement for multiple objects:

 
```
- name: Set authorized ssh key, extracting just that data from 'users'
  ansible.posix.authorized_key:
    user: "{{ item.0.name }}"
    key: "{{ lookup('file', item.1) }}"
  loop: "{{ users | subelements('authorized') }}"

```
 ### Combining hashes/dictionaries

  New in version 2.0.

  The `combine` filter allows hashes to be merged. For example, the following would override keys in one hash:

 
```
{{ {'a':1, 'b':2} | combine({'b':3}) }}

```
 The resulting hash would be:

 
```
{'a':1, 'b':3}

```
 The filter can also take multiple arguments to merge:

 
```
{{ a | combine(b, c, d) }}
{{ [a, b, c, d] | combine }}

```
 In this case, keys in `d` would override those in `c`, which would override those in `b`, and so on.

 The filter also accepts two optional parameters: `recursive` and `list_merge`.

  recursive

Is a boolean, default to `False`. Should the `combine` recursively merge nested hashes. Note: It does **not** depend on the value of the `hash_behaviour` setting in `ansible.cfg`.

  list\_merge

Is a string, its possible values are `replace` (default), `keep`, `append`, `prepend`, `append_rp` or `prepend_rp`. It modifies the behaviour of `combine` when the hashes to merge contain arrays/lists.

   
```
default:
  a:
    x: default
    y: default
  b: default
  c: default
patch:
  a:
    y: patch
    z: patch
  b: patch

```
 If `recursive=False` (the default), nested hash aren’t merged:

 
```
{{ default | combine(patch) }}

```
 This would result in:

 
```
a:
  y: patch
  z: patch
b: patch
c: default

```
 If `recursive=True`, recurse into nested hash and merge their keys:

 
```
{{ default | combine(patch, recursive=True) }}

```
 This would result in:

 
```
a:
  x: default
  y: patch
  z: patch
b: patch
c: default

```
 If `list_merge='replace'` (the default), arrays from the right hash will “replace” the ones in the left hash:

 
```
default:
  a:
    - default
patch:
  a:
    - patch

```
 
```
{{ default | combine(patch) }}

```
 This would result in:

 
```
a:
  - patch

```
 If `list_merge='keep'`, arrays from the left hash will be kept:

 
```
{{ default | combine(patch, list_merge='keep') }}

```
 This would result in:

 
```
a:
  - default

```
 If `list_merge='append'`, arrays from the right hash will be appended to the ones in the left hash:

 
```
{{ default | combine(patch, list_merge='append') }}

```
 This would result in:

 
```
a:
  - default
  - patch

```
 If `list_merge='prepend'`, arrays from the right hash will be prepended to the ones in the left hash:

 
```
{{ default | combine(patch, list_merge='prepend') }}

```
 This would result in:

 
```
a:
  - patch
  - default

```
 If `list_merge='append_rp'`, arrays from the right hash will be appended to the ones in the left hash. Elements of arrays in the left hash that are also in the corresponding array of the right hash will be removed (“rp” stands for “remove present”). Duplicate elements that aren’t in both hashes are kept:

 
```
default:
  a:
    - 1
    - 1
    - 2
    - 3
patch:
  a:
    - 3
    - 4
    - 5
    - 5

```
 
```
{{ default | combine(patch, list_merge='append_rp') }}

```
 This would result in:

 
```
a:
  - 1
  - 1
  - 2
  - 3
  - 4
  - 5
  - 5

```
 If `list_merge='prepend_rp'`, the behavior is similar to the one for `append_rp`, but elements of arrays in the right hash are prepended:

 
```
{{ default | combine(patch, list_merge='prepend_rp') }}

```
 This would result in:

 
```
a:
  - 3
  - 4
  - 5
  - 5
  - 1
  - 1
  - 2

```
 `recursive` and `list_merge` can be used together:

 
```
default:
  a:
    a':
      x: default_value
      y: default_value
      list:
        - default_value
  b:
    - 1
    - 1
    - 2
    - 3
patch:
  a:
    a':
      y: patch_value
      z: patch_value
      list:
        - patch_value
  b:
    - 3
    - 4
    - 4
    - key: value

```
 
```
{{ default | combine(patch, recursive=True, list_merge='append_rp') }}

```
 This would result in:

 
```
a:
  a':
    x: default_value
    y: patch_value
    z: patch_value
    list:
      - default_value
      - patch_value
b:
  - 1
  - 1
  - 2
  - 3
  - 4
  - 4
  - key: value

```
 ### Selecting values from arrays or hashtables

  New in version 2.1.

  The `extract` filter is used to map from a list of indices to a list of values from a container (hash or array):

 
```
{{ [0,2] | map('extract', ['x','y','z']) | list }}
{{ ['x','y'] | map('extract', {'x': 42, 'y': 31}) | list }}

```
 The results of the above expressions would be:

 
```
['x', 'z']
[42, 31]

```
 The filter can take another argument:

 
```
{{ groups['x'] | map('extract', hostvars, 'ec2_ip_address') | list }}

```
 This takes the list of hosts in group ‘x’, looks them up in `hostvars`, and then looks up the `ec2_ip_address` of the result. The final result is a list of IP addresses for the hosts in group ‘x’.

 The third argument to the filter can also be a list, for a recursive lookup inside the container:

 
```
{{ ['a'] | map('extract', b, ['x','y']) | list }}

```
 This would return a list containing the value of `b[‘a’][‘x’][‘y’]`.

 ### Combining lists

 This set of filters returns a list of combined lists.

 #### permutations

 To get permutations of a list:

 
```
- name: Give me largest permutations (order matters)
  ansible.builtin.debug:
    msg: "{{ [1,2,3,4,5] | ansible.builtin.permutations | list }}"

- name: Give me permutations of sets of three
  ansible.builtin.debug:
    msg: "{{ [1,2,3,4,5] | ansible.builtin.permutations(3) | list }}"

```
 #### combinations

 Combinations always require a set size:

 
```
- name: Give me combinations for sets of two
  ansible.builtin.debug:
    msg: "{{ [1,2,3,4,5] | ansible.builtin.combinations(2) | list }}"

```
 Also see the [Combining items from multiple lists: zip and zip\_longest](#zip-filter)

 #### products

 The product filter returns the [cartesian product](https://docs.python.org/3/library/itertools.html#itertools.product) of the input iterables. This is roughly equivalent to nested for-loops in a generator expression.

 For example:

 
```
- name: Generate multiple hostnames
  ansible.builtin.debug:
    msg: "{{ ['foo', 'bar'] | product(['com']) | map('join', '.') | join(',') }}"

```
 This would result in:

 
```
{ "msg": "foo.com,bar.com" }

```
 ### Selecting JSON data: JSON queries

 To select a single element or a data subset from a complex data structure in JSON format (for example, Ansible facts), use the `json_query` filter. The `json_query` filter lets you query a complex JSON structure and iterate over it using a loop structure.

  Note

 This filter has migrated to the [community.general](https://galaxy.ansible.com/community/general) collection. Follow the installation instructions to install that collection.

   Note

 You must manually install the **jmespath** dependency on the Ansible controller before using this filter. This filter is built upon **jmespath**, and you can use the same syntax. For examples, see [jmespath examples](http://jmespath.org/examples.html).

  Consider this data structure:

 
```
{
    "domain_definition": {
        "domain": {
            "cluster": [
                {
                    "name": "cluster1"
                },
                {
                    "name": "cluster2"
                }
            ],
            "server": [
                {
                    "name": "server11",
                    "cluster": "cluster1",
                    "port": "8080"
                },
                {
                    "name": "server12",
                    "cluster": "cluster1",
                    "port": "8090"
                },
                {
                    "name": "server21",
                    "cluster": "cluster2",
                    "port": "9080"
                },
                {
                    "name": "server22",
                    "cluster": "cluster2",
                    "port": "9090"
                }
            ],
            "library": [
                {
                    "name": "lib1",
                    "target": "cluster1"
                },
                {
                    "name": "lib2",
                    "target": "cluster2"
                }
            ]
        }
    }
}

```
 To extract all clusters from this structure, you can use the following query:

 
```
- name: Display all cluster names
  ansible.builtin.debug:
    var: item
  loop: "{{ domain_definition | community.general.json_query('domain.cluster[*].name') }}"

```
 To extract all server names:

 
```
- name: Display all server names
  ansible.builtin.debug:
    var: item
  loop: "{{ domain_definition | community.general.json_query('domain.server[*].name') }}"

```
 To extract ports from cluster1:

 
```
- name: Display all ports from cluster1
  ansible.builtin.debug:
    var: item
  loop: "{{ domain_definition | community.general.json_query(server_name_cluster1_query) }}"
  vars:
    server_name_cluster1_query: "domain.server[?cluster=='cluster1'].port"

```
  Note

 You can use a variable to make the query more readable.

  To print out the ports from cluster1 in a comma separated string:

 
```
- name: Display all ports from cluster1 as a string
  ansible.builtin.debug:
    msg: "{{ domain_definition | community.general.json_query('domain.server[?cluster==`cluster1`].port') | join(', ') }}"

```
  Note

 In the example above, quoting literals using backticks avoids escaping quotes and maintains readability.

  You can use YAML [single quote escaping](https://yaml.org/spec/current.html#id2534365):

 
```
- name: Display all ports from cluster1
  ansible.builtin.debug:
    var: item
  loop: "{{ domain_definition | community.general.json_query('domain.server[?cluster==''cluster1''].port') }}"

```
  Note

 Escaping single quotes within single quotes in YAML is done by doubling the single quote.

  To get a hash map with all ports and names of a cluster:

 
```
- name: Display all server ports and names from cluster1
  ansible.builtin.debug:
    var: item
  loop: "{{ domain_definition | community.general.json_query(server_name_cluster1_query) }}"
  vars:
    server_name_cluster1_query: "domain.server[?cluster=='cluster2'].{name: name, port: port}"

```
 To extract ports from all clusters with name starting with ‘server1’:

 
```
- name: Display all ports from cluster1
  ansible.builtin.debug:
    msg: "{{ domain_definition | to_json | from_json | community.general.json_query(server_name_query) }}"
  vars:
    server_name_query: "domain.server[?starts_with(name,'server1')].port"

```
 To extract ports from all clusters with name containing ‘server1’:

 
```
- name: Display all ports from cluster1
  ansible.builtin.debug:
    msg: "{{ domain_definition | to_json | from_json | community.general.json_query(server_name_query) }}"
  vars:
    server_name_query: "domain.server[?contains(name,'server1')].port"

```
  Note

 while using `starts_with` and `contains`, you have to use `` to\_json | from\_json `` filter for correct parsing of data structure.

  Randomizing data
----------------

 When you need a randomly generated value, use one of these filters.

 ### Random MAC addresses

  New in version 2.6.

  This filter can be used to generate a random MAC address from a string prefix.

  Note

 This filter has migrated to the [community.general](https://galaxy.ansible.com/community/general) collection. Follow the installation instructions to install that collection.

  To get a random MAC address from a string prefix starting with ‘52:54:00’:

 
```
"{{ '52:54:00' | community.general.random_mac }}"
# => '52:54:00:ef:1c:03'

```
 Note that if anything is wrong with the prefix string, the filter will issue an error.

  New in version 2.9.

  As of Ansible version 2.9, you can also initialize the random number generator from a seed to create random-but-idempotent MAC addresses:

 
```
"{{ '52:54:00' | community.general.random_mac(seed=inventory_hostname) }}"

```
 ### Random items or numbers

 The `random` filter in Ansible is an extension of the default Jinja2 random filter, and can be used to return a random item from a sequence of items or to generate a random number based on a range.

 To get a random item from a list:

 
```
"{{ ['a','b','c'] | random }}"
# => 'c'

```
 To get a random number between 0 (inclusive) and a specified integer (exclusive):

 
```
"{{ 60 | random }} * * * * root /script/from/cron"
# => '21 * * * * root /script/from/cron'

```
 To get a random number from 0 to 100 but in steps of 10:

 
```
{{ 101 | random(step=10) }}
# => 70

```
 To get a random number from 1 to 100 but in steps of 10:

 
```
{{ 101 | random(1, 10) }}
# => 31
{{ 101 | random(start=1, step=10) }}
# => 51

```
 You can initialize the random number generator from a seed to create random-but-idempotent numbers:

 
```
"{{ 60 | random(seed=inventory_hostname) }} * * * * root /script/from/cron"

```
  Note

 If you use the `seed` parameter, you will get a different result with Python 3 and Python 2. This may break procedures such as password generation when you upgrade the version of Python used on your Ansible controller.

  ### Shuffling a list

 The `shuffle` filter randomizes an existing list, giving a different order every invocation.

 To get a random list from an existing list:

 
```
{{ ['a','b','c'] | shuffle }}
# => ['c','a','b']
{{ ['a','b','c'] | shuffle }}
# => ['b','c','a']

```
 You can initialize the shuffle generator from a seed to generate a random-but-idempotent order:

 
```
{{ ['a','b','c'] | shuffle(seed=inventory_hostname) }}
# => ['b','a','c']

```
 The shuffle filter returns a list whenever possible. If you use it with a non ‘listable’ item, the filter does nothing.

  Note

 If you use the `seed` parameter, you will get a different result with Python 3 and Python 2. This may break procedures such as password generation when you upgrade the version of Python used on your Ansible controller.

  Managing list variables
-----------------------

 You can search for the minimum or maximum value in a list, or flatten a multi-level list.

 To get the minimum value from list of numbers:

 
```
{{ list1 | min }}

```
  New in version 2.11.

  To get the minimum value in a list of objects:

 
```
{{ [{'val': 1}, {'val': 2}] | min(attribute='val') }}

```
 To get the maximum value from a list of numbers:

 
```
{{ [3, 4, 2] | max }}

```
  New in version 2.11.

  To get the maximum value in a list of objects:

 
```
{{ [{'val': 1}, {'val': 2}] | max(attribute='val') }}

```
  New in version 2.5.

  Flatten a list (same thing the `flatten` lookup does):

 
```
{{ [3, [4, 2] ] | flatten }}
# => [3, 4, 2]

```
 Flatten only the first level of a list (akin to the `items` lookup):

 
```
{{ [3, [4, [2]] ] | flatten(levels=1) }}
# => [3, 4, [2]]

```
  New in version 2.11.

  Preserve nulls in a list, by default flatten removes them.

 
```
{{ [3, None, [4, [2]] ] | flatten(levels=1, skip_nulls=False) }}
# => [3, None, 4, [2]]

```
 Selecting from sets or lists (set theory)
-----------------------------------------

 You can select or combine items from sets or lists.

  New in version 1.4.

  To get a unique set from a list:

 
```
# list1: [1, 2, 5, 1, 3, 4, 10]
{{ list1 | unique }}
# => [1, 2, 5, 3, 4, 10]

```
 To get a union of two lists:

 
```
# list1: [1, 2, 5, 1, 3, 4, 10]
# list2: [1, 2, 3, 4, 5, 11, 99]
{{ list1 | union(list2) }}
# => [1, 2, 5, 1, 3, 4, 10, 11, 99]

```
 To get the intersection of 2 lists (unique list of all items in both):

 
```
# list1: [1, 2, 5, 3, 4, 10]
# list2: [1, 2, 3, 4, 5, 11, 99]
{{ list1 | intersect(list2) }}
# => [1, 2, 5, 3, 4]

```
 To get the difference of 2 lists (items in 1 that don’t exist in 2):

 
```
# list1: [1, 2, 5, 1, 3, 4, 10]
# list2: [1, 2, 3, 4, 5, 11, 99]
{{ list1 | difference(list2) }}
# => [10]

```
 To get the symmetric difference of 2 lists (items exclusive to each list):

 
```
# list1: [1, 2, 5, 1, 3, 4, 10]
# list2: [1, 2, 3, 4, 5, 11, 99]
{{ list1 | symmetric_difference(list2) }}
# => [10, 11, 99]

```
 Calculating numbers (math)
--------------------------

  New in version 1.9.

  You can calculate logs, powers, and roots of numbers with Ansible filters. Jinja2 provides other mathematical functions like abs() and round().

 Get the logarithm (default is e):

 
```
{{ 8 | log }}
# => 2.0794415416798357

```
 Get the base 10 logarithm:

 
```
{{ 8 | log(10) }}
# => 0.9030899869919435

```
 Give me the power of 2! (or 5):

 
```
{{ 8 | pow(5) }}
# => 32768.0

```
 Square root, or the 5th:

 
```
{{ 8 | root }}
# => 2.8284271247461903

{{ 8 | root(5) }}
# => 1.5157165665103982

```
 Managing network interactions
-----------------------------

 These filters help you with common network tasks.

  Note

 These filters have migrated to the [ansible.netcommon](https://galaxy.ansible.com/ansible/netcommon) collection. Follow the installation instructions to install that collection.

  ### IP address filters

  New in version 1.9.

  To test if a string is a valid IP address:

 
```
{{ myvar | ansible.netcommon.ipaddr }}

```
 You can also require a specific IP protocol version:

 
```
{{ myvar | ansible.netcommon.ipv4 }}
{{ myvar | ansible.netcommon.ipv6 }}

```
 IP address filter can also be used to extract specific information from an IP address. For example, to get the IP address itself from a CIDR, you can use:

 
```
{{ '192.0.2.1/24' | ansible.netcommon.ipaddr('address') }}
# => 192.168.0.1

```
 More information about `ipaddr` filter and complete usage guide can be found in [ipaddr filter](playbooks_filters_ipaddr#playbooks-filters-ipaddr).

 ### Network CLI filters

  New in version 2.4.

  To convert the output of a network device CLI command into structured JSON output, use the `parse_cli` filter:

 
```
{{ output | ansible.netcommon.parse_cli('path/to/spec') }}

```
 The `parse_cli` filter will load the spec file and pass the command output through it, returning JSON output. The YAML spec file defines how to parse the CLI output.

 The spec file should be valid formatted YAML. It defines how to parse the CLI output and return JSON data. Below is an example of a valid spec file that will parse the output from the `show vlan` command.

 
```
---
vars:
  vlan:
    vlan_id: "{{ item.vlan_id }}"
    name: "{{ item.name }}"
    enabled: "{{ item.state != 'act/lshut' }}"
    state: "{{ item.state }}"

keys:
  vlans:
    value: "{{ vlan }}"
    items: "^(?P<vlan_id>\\d+)\\s+(?P<name>\\w+)\\s+(?P<state>active|act/lshut|suspended)"
  state_static:
    value: present

```
 The spec file above will return a JSON data structure that is a list of hashes with the parsed VLAN information.

 The same command could be parsed into a hash by using the key and values directives. Here is an example of how to parse the output into a hash value using the same `show vlan` command.

 
```
---
vars:
  vlan:
    key: "{{ item.vlan_id }}"
    values:
      vlan_id: "{{ item.vlan_id }}"
      name: "{{ item.name }}"
      enabled: "{{ item.state != 'act/lshut' }}"
      state: "{{ item.state }}"

keys:
  vlans:
    value: "{{ vlan }}"
    items: "^(?P<vlan_id>\\d+)\\s+(?P<name>\\w+)\\s+(?P<state>active|act/lshut|suspended)"
  state_static:
    value: present

```
 Another common use case for parsing CLI commands is to break a large command into blocks that can be parsed. This can be done using the `start_block` and `end_block` directives to break the command into blocks that can be parsed.

 
```
---
vars:
  interface:
    name: "{{ item[0].match[0] }}"
    state: "{{ item[1].state }}"
    mode: "{{ item[2].match[0] }}"

keys:
  interfaces:
    value: "{{ interface }}"
    start_block: "^Ethernet.*$"
    end_block: "^$"
    items:
      - "^(?P<name>Ethernet\\d\\/\\d*)"
      - "admin state is (?P<state>.+),"
      - "Port mode is (.+)"

```
 The example above will parse the output of `show interface` into a list of hashes.

 The network filters also support parsing the output of a CLI command using the TextFSM library. To parse the CLI output with TextFSM use the following filter:

 
```
{{ output.stdout[0] | ansible.netcommon.parse_cli_textfsm('path/to/fsm') }}

```
 Use of the TextFSM filter requires the TextFSM library to be installed.

 ### Network XML filters

  New in version 2.5.

  To convert the XML output of a network device command into structured JSON output, use the `parse_xml` filter:

 
```
{{ output | ansible.netcommon.parse_xml('path/to/spec') }}

```
 The `parse_xml` filter will load the spec file and pass the command output through formatted as JSON.

 The spec file should be valid formatted YAML. It defines how to parse the XML output and return JSON data.

 Below is an example of a valid spec file that will parse the output from the `show vlan | display xml` command.

 
```
---
vars:
  vlan:
    vlan_id: "{{ item.vlan_id }}"
    name: "{{ item.name }}"
    desc: "{{ item.desc }}"
    enabled: "{{ item.state.get('inactive') != 'inactive' }}"
    state: "{% if item.state.get('inactive') == 'inactive'%} inactive {% else %} active {% endif %}"

keys:
  vlans:
    value: "{{ vlan }}"
    top: configuration/vlans/vlan
    items:
      vlan_id: vlan-id
      name: name
      desc: description
      state: ".[@inactive='inactive']"

```
 The spec file above will return a JSON data structure that is a list of hashes with the parsed VLAN information.

 The same command could be parsed into a hash by using the key and values directives. Here is an example of how to parse the output into a hash value using the same `show vlan | display xml` command.

 
```
---
vars:
  vlan:
    key: "{{ item.vlan_id }}"
    values:
        vlan_id: "{{ item.vlan_id }}"
        name: "{{ item.name }}"
        desc: "{{ item.desc }}"
        enabled: "{{ item.state.get('inactive') != 'inactive' }}"
        state: "{% if item.state.get('inactive') == 'inactive'%} inactive {% else %} active {% endif %}"

keys:
  vlans:
    value: "{{ vlan }}"
    top: configuration/vlans/vlan
    items:
      vlan_id: vlan-id
      name: name
      desc: description
      state: ".[@inactive='inactive']"

```
 The value of `top` is the XPath relative to the XML root node. In the example XML output given below, the value of `top` is `configuration/vlans/vlan`, which is an XPath expression relative to the root node (<rpc-reply>). `configuration` in the value of `top` is the outer most container node, and `vlan` is the inner-most container node.

 `items` is a dictionary of key-value pairs that map user-defined names to XPath expressions that select elements. The Xpath expression is relative to the value of the XPath value contained in `top`. For example, the `vlan_id` in the spec file is a user defined name and its value `vlan-id` is the relative to the value of XPath in `top`

 Attributes of XML tags can be extracted using XPath expressions. The value of `state` in the spec is an XPath expression used to get the attributes of the `vlan` tag in output XML.:

 
```
<rpc-reply>
  <configuration>
    <vlans>
      <vlan inactive="inactive">
       <name>vlan-1</name>
       <vlan-id>200</vlan-id>
       <description>This is vlan-1</description>
      </vlan>
    </vlans>
  </configuration>
</rpc-reply>

```
  Note

 For more information on supported XPath expressions, see [XPath Support](https://docs.python.org/2/library/xml.etree.elementtree.html#xpath-support).

  ### Network VLAN filters

  New in version 2.8.

  Use the `vlan_parser` filter to transform an unsorted list of VLAN integers into a sorted string list of integers according to IOS-like VLAN list rules. This list has the following properties:

 * Vlans are listed in ascending order.
* Three or more consecutive VLANs are listed with a dash.
* The first line of the list can be first\_line\_len characters long.
* Subsequent list lines can be other\_line\_len characters.

 To sort a VLAN list:

 
```
{{ [3003, 3004, 3005, 100, 1688, 3002, 3999] | ansible.netcommon.vlan_parser }}

```
 This example renders the following sorted list:

 
```
['100,1688,3002-3005,3999']

```
 Another example Jinja template:

 
```
{% set parsed_vlans = vlans | ansible.netcommon.vlan_parser %}
switchport trunk allowed vlan {{ parsed_vlans[0] }}
{% for i in range (1, parsed_vlans | count) %}
switchport trunk allowed vlan add {{ parsed_vlans[i] }}
{% endfor %}

```
 This allows for dynamic generation of VLAN lists on a Cisco IOS tagged interface. You can store an exhaustive raw list of the exact VLANs required for an interface and then compare that to the parsed IOS output that would actually be generated for the configuration.

 Encrypting and checksumming strings and passwords
-------------------------------------------------

  New in version 1.9.

  To get the sha1 hash of a string:

 
```
{{ 'test1' | hash('sha1') }}
# => "b444ac06613fc8d63795be9ad0beaf55011936ac"

```
 To get the md5 hash of a string:

 
```
{{ 'test1' | hash('md5') }}
# => "5a105e8b9d40e1329780d62ea2265d8a"

```
 Get a string checksum:

 
```
{{ 'test2' | checksum }}
# => "109f4b3c50d7b0df729d299bc6f8e9ef9066971f"

```
 Other hashes (platform dependent):

 
```
{{ 'test2' | hash('blowfish') }}

```
 To get a sha512 password hash (random salt):

 
```
{{ 'passwordsaresecret' | password_hash('sha512') }}
# => "$6$UIv3676O/ilZzWEE$ktEfFF19NQPF2zyxqxGkAceTnbEgpEKuGBtk6MlU4v2ZorWaVQUMyurgmHCh2Fr4wpmQ/Y.AlXMJkRnIS4RfH/"

```
 To get a sha256 password hash with a specific salt:

 
```
{{ 'secretpassword' | password_hash('sha256', 'mysecretsalt') }}
# => "$5$mysecretsalt$ReKNyDYjkKNqRVwouShhsEqZ3VOE8eoVO4exihOfvG4"

```
 An idempotent method to generate unique hashes per system is to use a salt that is consistent between runs:

 
```
{{ 'secretpassword' | password_hash('sha512', 65534 | random(seed=inventory_hostname) | string) }}
# => "$6$43927$lQxPKz2M2X.NWO.gK.t7phLwOKQMcSq72XxDZQ0XzYV6DlL1OD72h417aj16OnHTGxNzhftXJQBcjbunLEepM0"

```
  Note

 If you use the `seed` parameter, you will get a different result with Python 3 and Python 2. This may break procedures such as password generation when you upgrade the version of Python used on your Ansible controller.

  Hash types available depend on the control system running Ansible, ‘hash’ depends on [hashlib](https://docs.python.org/3.8/library/hashlib.html), password\_hash depends on [passlib](https://passlib.readthedocs.io/en/stable/lib/passlib.hash.html). The [crypt](https://docs.python.org/3.8/library/crypt.html) is used as a fallback if `passlib` is not installed.

  New in version 2.7.

  Some hash types allow providing a rounds parameter:

 
```
{{ 'secretpassword' | password_hash('sha256', 'mysecretsalt', rounds=10000) }}
# => "$5$rounds=10000$mysecretsalt$Tkm80llAxD4YHll6AgNIztKn0vzAACsuuEfYeGP7tm7"

```
 Manipulating text
-----------------

 Several filters work with text, including URLs, file names, and path names.

 ### Adding comments to files

 The `comment` filter lets you create comments in a file from text in a template, with a variety of comment styles. By default Ansible uses `#` to start a comment line and adds a blank comment line above and below your comment text. For example the following:

 
```
{{ "Plain style (default)" | comment }}

```
 produces this output:

 
```
#
# Plain style (default)
#

```
 Ansible offers styles for comments in C (`//...`), C block (`/*...*/`), Erlang (`%...`) and XML (`<!--...-->`):

 
```
{{ "C style" | comment('c') }}
{{ "C block style" | comment('cblock') }}
{{ "Erlang style" | comment('erlang') }}
{{ "XML style" | comment('xml') }}

```
 You can define a custom comment character. This filter:

 
```
{{ "My Special Case" | comment(decoration="! ") }}

```
 produces:

 
```
!
! My Special Case
!

```
 You can fully customize the comment style:

 
```
{{ "Custom style" | comment('plain', prefix='#######\n#', postfix='#\n#######\n   ###\n    #') }}

```
 That creates the following output:

 
```
#######
#
# Custom style
#
#######
   ###
    #

```
 The filter can also be applied to any Ansible variable. For example to make the output of the `ansible_managed` variable more readable, we can change the definition in the `ansible.cfg` file to this:

 
```
[defaults]

ansible_managed = This file is managed by Ansible.%n
  template: {file}
  date: %Y-%m-%d %H:%M:%S
  user: {uid}
  host: {host}

```
 and then use the variable with the `comment` filter:

 
```
{{ ansible_managed | comment }}

```
 which produces this output:

 
```
#
# This file is managed by Ansible.
#
# template: /home/ansible/env/dev/ansible_managed/roles/role1/templates/test.j2
# date: 2015-09-10 11:02:58
# user: ansible
# host: myhost
#

```
 ### URLEncode Variables

 The `urlencode` filter quotes data for use in a URL path or query using UTF-8:

 
```
{{ 'Trollhättan' | urlencode }}
# => 'Trollh%C3%A4ttan'

```
 ### Splitting URLs

  New in version 2.4.

  The `urlsplit` filter extracts the fragment, hostname, netloc, password, path, port, query, scheme, and username from an URL. With no arguments, returns a dictionary of all the fields:

 
```
{{ "http://user:password@www.acme.com:9000/dir/index.html?query=term#fragment" | urlsplit('hostname') }}
# => 'www.acme.com'

{{ "http://user:password@www.acme.com:9000/dir/index.html?query=term#fragment" | urlsplit('netloc') }}
# => 'user:password@www.acme.com:9000'

{{ "http://user:password@www.acme.com:9000/dir/index.html?query=term#fragment" | urlsplit('username') }}
# => 'user'

{{ "http://user:password@www.acme.com:9000/dir/index.html?query=term#fragment" | urlsplit('password') }}
# => 'password'

{{ "http://user:password@www.acme.com:9000/dir/index.html?query=term#fragment" | urlsplit('path') }}
# => '/dir/index.html'

{{ "http://user:password@www.acme.com:9000/dir/index.html?query=term#fragment" | urlsplit('port') }}
# => '9000'

{{ "http://user:password@www.acme.com:9000/dir/index.html?query=term#fragment" | urlsplit('scheme') }}
# => 'http'

{{ "http://user:password@www.acme.com:9000/dir/index.html?query=term#fragment" | urlsplit('query') }}
# => 'query=term'

{{ "http://user:password@www.acme.com:9000/dir/index.html?query=term#fragment" | urlsplit('fragment') }}
# => 'fragment'

{{ "http://user:password@www.acme.com:9000/dir/index.html?query=term#fragment" | urlsplit }}
# =>
#   {
#       "fragment": "fragment",
#       "hostname": "www.acme.com",
#       "netloc": "user:password@www.acme.com:9000",
#       "password": "password",
#       "path": "/dir/index.html",
#       "port": 9000,
#       "query": "query=term",
#       "scheme": "http",
#       "username": "user"
#   }

```
 ### Searching strings with regular expressions

 To search in a string or extract parts of a string with a regular expression, use the `regex_search` filter:

 
```
# Extracts the database name from a string
{{ 'server1/database42' | regex_search('database[0-9]+') }}
# => 'database42'

# Returns an empty string if it cannot find a match
{{ 'ansible' | regex_search('foobar') }}
# => ''

# Example for a case insensitive search in multiline mode
{{ 'foo\nBAR' | regex_search('^bar', multiline=True, ignorecase=True) }}
# => 'BAR'

# Extracts server and database id from a string
{{ 'server1/database42' | regex_search('server([0-9]+)/database([0-9]+)', '\\1', '\\2') }}
# => ['1', '42']

# Extracts dividend and divisor from a division
{{ '21/42' | regex_search('(?P<dividend>[0-9]+)/(?P<divisor>[0-9]+)', '\\g<dividend>', '\\g<divisor>') }}
# => ['21', '42']

```
 To extract all occurrences of regex matches in a string, use the `regex_findall` filter:

 
```
# Returns a list of all IPv4 addresses in the string
{{ 'Some DNS servers are 8.8.8.8 and 8.8.4.4' | regex_findall('\\b(?:[0-9]{1,3}\\.){3}[0-9]{1,3}\\b') }}
# => ['8.8.8.8', '8.8.4.4']

# Returns all lines that end with "ar"
{{ 'CAR\ntar\nfoo\nbar\n' | regex_findall('^.ar$', multiline=True, ignorecase=True) }}
# => ['CAR', 'tar', 'bar']

```
 To replace text in a string with regex, use the `regex_replace` filter:

 
```
# Convert "ansible" to "able"
{{ 'ansible' | regex_replace('^a.*i(.*)$', 'a\\1') }}
# => 'able'

# Convert "foobar" to "bar"
{{ 'foobar' | regex_replace('^f.*o(.*)$', '\\1') }}
# => 'bar'

# Convert "localhost:80" to "localhost, 80" using named groups
{{ 'localhost:80' | regex_replace('^(?P<host>.+):(?P<port>\\d+)$', '\\g<host>, \\g<port>') }}
# => 'localhost, 80'

# Convert "localhost:80" to "localhost"
{{ 'localhost:80' | regex_replace(':80') }}
# => 'localhost'

# Comment all lines that end with "ar"
{{ 'CAR\ntar\nfoo\nbar\n' | regex_replace('^(.ar)$', '#\\1', multiline=True, ignorecase=True) }}
# => '#CAR\n#tar\nfoo\n#bar\n'

```
  Note

 If you want to match the whole string and you are using `*` make sure to always wraparound your regular expression with the start/end anchors. For example `^(.*)$` will always match only one result, while `(.*)` on some Python versions will match the whole string and an empty string at the end, which means it will make two replacements:

 
```
# add "https://" prefix to each item in a list
GOOD:
{{ hosts | map('regex_replace', '^(.*)$', 'https://\\1') | list }}
{{ hosts | map('regex_replace', '(.+)', 'https://\\1') | list }}
{{ hosts | map('regex_replace', '^', 'https://') | list }}

BAD:
{{ hosts | map('regex_replace', '(.*)', 'https://\\1') | list }}

# append ':80' to each item in a list
GOOD:
{{ hosts | map('regex_replace', '^(.*)$', '\\1:80') | list }}
{{ hosts | map('regex_replace', '(.+)', '\\1:80') | list }}
{{ hosts | map('regex_replace', '$', ':80') | list }}

BAD:
{{ hosts | map('regex_replace', '(.*)', '\\1:80') | list }}

```
   Note

 Prior to ansible 2.0, if `regex_replace` filter was used with variables inside YAML arguments (as opposed to simpler ‘key=value’ arguments), then you needed to escape backreferences (for example, `\\1`) with 4 backslashes (`\\\\`) instead of 2 (`\\`).

   New in version 2.0.

  To escape special characters within a standard Python regex, use the `regex_escape` filter (using the default `re_type='python'` option):

 
```
# convert '^f.*o(.*)$' to '\^f\.\*o\(\.\*\)\$'
{{ '^f.*o(.*)$' | regex_escape() }}

```
  New in version 2.8.

  To escape special characters within a POSIX basic regex, use the `regex_escape` filter with the `re_type='posix_basic'` option:

 
```
# convert '^f.*o(.*)$' to '\^f\.\*o(\.\*)\$'
{{ '^f.*o(.*)$' | regex_escape('posix_basic') }}

```
 ### Managing file names and path names

 To get the last name of a file path, like ‘foo.txt’ out of ‘/etc/asdf/foo.txt’:

 
```
{{ path | basename }}

```
 To get the last name of a windows style file path (new in version 2.0):

 
```
{{ path | win_basename }}

```
 To separate the windows drive letter from the rest of a file path (new in version 2.0):

 
```
{{ path | win_splitdrive }}

```
 To get only the windows drive letter:

 
```
{{ path | win_splitdrive | first }}

```
 To get the rest of the path without the drive letter:

 
```
{{ path | win_splitdrive | last }}

```
 To get the directory from a path:

 
```
{{ path | dirname }}

```
 To get the directory from a windows path (new version 2.0):

 
```
{{ path | win_dirname }}

```
 To expand a path containing a tilde (`~`) character (new in version 1.5):

 
```
{{ path | expanduser }}

```
 To expand a path containing environment variables:

 
```
{{ path | expandvars }}

```
  Note

 `expandvars` expands local variables; using it on remote paths can lead to errors.

   New in version 2.6.

  To get the real path of a link (new in version 1.8):

 
```
{{ path | realpath }}

```
 To get the relative path of a link, from a start point (new in version 1.7):

 
```
{{ path | relpath('/etc') }}

```
 To get the root and extension of a path or file name (new in version 2.0):

 
```
# with path == 'nginx.conf' the return would be ('nginx', '.conf')
{{ path | splitext }}

```
 The `splitext` filter always returns a pair of strings. The individual components can be accessed by using the `first` and `last` filters:

 
```
# with path == 'nginx.conf' the return would be 'nginx'
{{ path | splitext | first }}

# with path == 'nginx.conf' the return would be '.conf'
{{ path | splitext | last }}

```
 To join one or more path components:

 
```
{{ ('/etc', path, 'subdir', file) | path_join }}

```
  New in version 2.10.

  Manipulating strings
--------------------

 To add quotes for shell usage:

 
```
- name: Run a shell command
  ansible.builtin.shell: echo {{ string_value | quote }}

```
 To concatenate a list into a string:

 
```
{{ list | join(" ") }}

```
 To split a sting into a list:

 
```
{{ csv_string | split(",") }}

```
  New in version 2.11.

  To work with Base64 encoded strings:

 
```
{{ encoded | b64decode }}
{{ decoded | string | b64encode }}

```
 As of version 2.6, you can define the type of encoding to use, the default is `utf-8`:

 
```
{{ encoded | b64decode(encoding='utf-16-le') }}
{{ decoded | string | b64encode(encoding='utf-16-le') }}

```
  Note

 The `string` filter is only required for Python 2 and ensures that text to encode is a unicode string. Without that filter before b64encode the wrong value will be encoded.

   New in version 2.6.

  Managing UUIDs
--------------

 To create a namespaced UUIDv5:

 
```
{{ string | to_uuid(namespace='11111111-2222-3333-4444-555555555555') }}

```
  New in version 2.10.

  To create a namespaced UUIDv5 using the default Ansible namespace ‘361E6D51-FAEC-444A-9079-341386DA8E2E’:

 
```
{{ string | to_uuid }}

```
  New in version 1.9.

  To make use of one attribute from each item in a list of complex variables, use the `Jinja2 map filter`:

 
```
# get a comma-separated list of the mount points (for example, "/,/mnt/stuff") on a host
{{ ansible_mounts | map(attribute='mount') | join(',') }}

```
 Handling dates and times
------------------------

 To get a date object from a string use the `to_datetime` filter:

 
```
# Get total amount of seconds between two dates. Default date format is %Y-%m-%d %H:%M:%S but you can pass your own format
{{ (("2016-08-14 20:00:12" | to_datetime) - ("2015-12-25" | to_datetime('%Y-%m-%d'))).total_seconds()  }}

# Get remaining seconds after delta has been calculated. NOTE: This does NOT convert years, days, hours, and so on to seconds. For that, use total_seconds()
{{ (("2016-08-14 20:00:12" | to_datetime) - ("2016-08-14 18:00:00" | to_datetime)).seconds  }}
# This expression evaluates to "12" and not "132". Delta is 2 hours, 12 seconds

# get amount of days between two dates. This returns only number of days and discards remaining hours, minutes, and seconds
{{ (("2016-08-14 20:00:12" | to_datetime) - ("2015-12-25" | to_datetime('%Y-%m-%d'))).days  }}

```
  Note

 For a full list of format codes for working with python date format strings, see <https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior>.

   New in version 2.4.

  To format a date using a string (like with the shell date command), use the “strftime” filter:

 
```
# Display year-month-day
{{ '%Y-%m-%d' | strftime }}
# => "2021-03-19"

# Display hour:min:sec
{{ '%H:%M:%S' | strftime }}
# => "21:51:04"

# Use ansible_date_time.epoch fact
{{ '%Y-%m-%d %H:%M:%S' | strftime(ansible_date_time.epoch) }}
# => "2021-03-19 21:54:09"

# Use arbitrary epoch value
{{ '%Y-%m-%d' | strftime(0) }}          # => 1970-01-01
{{ '%Y-%m-%d' | strftime(1441357287) }} # => 2015-09-04

```
  Note

 To get all string possibilities, check <https://docs.python.org/3/library/time.html#time.strftime>

  Getting Kubernetes resource names
---------------------------------

  Note

 These filters have migrated to the [kuberernetes.core](https://galaxy.ansible.com/kubernetes/core) collection. Follow the installation instructions to install that collection.

  Use the “k8s\_config\_resource\_name” filter to obtain the name of a Kubernetes ConfigMap or Secret, including its hash:

 
```
{{ configmap_resource_definition | kuberernetes.core.k8s_config_resource_name }}

```
 This can then be used to reference hashes in Pod specifications:

 
```
my_secret:
  kind: Secret
  metadata:
    name: my_secret_name

deployment_resource:
  kind: Deployment
  spec:
    template:
      spec:
        containers:
        - envFrom:
            - secretRef:
                name: {{ my_secret | kuberernetes.core.k8s_config_resource_name }}

```
  New in version 2.8.

   See also

  [Intro to playbooks](playbooks_intro#about-playbooks)

An introduction to playbooks

  [Conditionals](playbooks_conditionals#playbooks-conditionals)

Conditional statements in playbooks

  [Using Variables](playbooks_variables#playbooks-variables)

All about variables

  [Loops](playbooks_loops#playbooks-loops)

Looping in playbooks

  [Roles](playbooks_reuse_roles#playbooks-reuse-roles)

Playbook organization by roles

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html>

Lookups
=======

 Lookup plugins retrieve data from outside sources such as files, databases, key/value stores, APIs, and other services. Like all templating, lookups execute and are evaluated on the Ansible control machine. Ansible makes the data returned by a lookup plugin available using the standard templating system. Before Ansible 2.5, lookups were mostly used indirectly in `with_<lookup>` constructs for looping. Starting with Ansible 2.5, lookups are used more explicitly as part of Jinja2 expressions fed into the `loop` keyword.

 Using lookups in variables
--------------------------

 You can populate variables using lookups. Ansible evaluates the value each time it is executed in a task (or template):

 
```
vars:
  motd_value: "{{ lookup('file', '/etc/motd') }}"
tasks:
  - debug:
      msg: "motd value is {{ motd_value }}"

```
 For more details and a list of lookup plugins in ansible-core, see [Working With Plugins](../plugins/plugins#plugins-lookup). You may also find lookup plugins in collections. You can review a list of lookup plugins installed on your control machine with the command `ansible-doc -l -t lookup`.

  See also

  [Working with playbooks](playbooks#working-with-playbooks)

An introduction to playbooks

  [Conditionals](playbooks_conditionals#playbooks-conditionals)

Conditional statements in playbooks

  [Using Variables](playbooks_variables#playbooks-variables)

All about variables

  [Loops](playbooks_loops#playbooks-loops)

Looping in playbooks

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_lookups.html>

Module defaults
===============

 If you frequently call the same module with the same arguments, it can be useful to define default arguments for that particular module using the `module_defaults` keyword.

 Here is a basic example:

 
```
- hosts: localhost
  module_defaults:
    ansible.builtin.file:
      owner: root
      group: root
      mode: 0755
  tasks:
    - name: Create file1
      ansible.builtin.file:
        state: touch
        path: /tmp/file1

    - name: Create file2
      ansible.builtin.file:
        state: touch
        path: /tmp/file2

    - name: Create file3
      ansible.builtin.file:
        state: touch
        path: /tmp/file3

```
 The `module_defaults` keyword can be used at the play, block, and task level. Any module arguments explicitly specified in a task will override any established default for that module argument:

 
```
- block:
    - name: Print a message
      ansible.builtin.debug:
        msg: "Different message"
  module_defaults:
    ansible.builtin.debug:
      msg: "Default message"

```
 You can remove any previously established defaults for a module by specifying an empty dict:

 
```
- name: Create file1
  ansible.builtin.file:
    state: touch
    path: /tmp/file1
  module_defaults:
    file: {}

```
  Note

 Any module defaults set at the play level (and block/task level when using `include_role` or `import_role`) will apply to any roles used, which may cause unexpected behavior in the role.

  Here are some more realistic use cases for this feature.

 Interacting with an API that requires auth:

 
```
- hosts: localhost
  module_defaults:
    ansible.builtin.uri:
      force_basic_auth: true
      user: some_user
      password: some_password
  tasks:
    - name: Interact with a web service
      ansible.builtin.uri:
        url: http://some.api.host/v1/whatever1

    - name: Interact with a web service
      ansible.builtin.uri:
        url: http://some.api.host/v1/whatever2

    - name: Interact with a web service
      ansible.builtin.uri:
        url: http://some.api.host/v1/whatever3

```
 Setting a default AWS region for specific EC2-related modules:

 
```
- hosts: localhost
  vars:
    my_region: us-west-2
  module_defaults:
    amazon.aws.ec2:
      region: '{{ my_region }}'
    community.aws.ec2_instance_info:
      region: '{{ my_region }}'
    amazon.aws.ec2_vpc_net_info:
      region: '{{ my_region }}'

```
 Module defaults groups
----------------------

  New in version 2.7.

  Ansible 2.7 adds a preview-status feature to group together modules that share common sets of parameters. This makes it easier to author playbooks making heavy use of API-based modules such as cloud modules.

 

| Group | Purpose | Ansible Version |
| --- | --- | --- |
| aws | Amazon Web Services | 2.7 |
| azure | Azure | 2.7 |
| gcp | Google Cloud Platform | 2.7 |
| k8s | Kubernetes | 2.8 |
| os | OpenStack | 2.8 |
| acme | ACME | 2.10 |
| docker\* | Docker | 2.10 |
| ovirt | oVirt | 2.10 |
| vmware | VMware | 2.10 |

 * The [docker\_stack](docker_stack_module) module is not included in the `docker` defaults group.

 Use the groups with `module_defaults` by prefixing the group name with `group/` - for example `group/aws`.

 In a playbook, you can set module defaults for whole groups of modules, such as setting a common AWS region.

 
```
# example_play.yml
- hosts: localhost
  module_defaults:
    group/aws:
      region: us-west-2
  tasks:
  - name: Get info
    aws_s3_bucket_info:

  # now the region is shared between both info modules

  - name: Get info
    ec2_ami_info:
      filters:
        name: 'RHEL*7.5*'

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_module_defaults.html>

Executing playbooks for troubleshooting
=======================================

 When you are testing new plays or debugging playbooks, you may need to run the same play multiple times. To make this more efficient, Ansible offers two alternative ways to execute a playbook: start-at-task and step mode.

 start-at-task
-------------

 To start executing your playbook at a particular task (usually the task that failed on the previous run), use the `--start-at-task` option:

 
```
ansible-playbook playbook.yml --start-at-task="install packages"

```
 In this example, Ansible starts executing your playbook at a task named “install packages”. This feature does not work with tasks inside dynamically re-used roles or tasks (`include_*`), see [Comparing includes and imports: dynamic and static re-use](playbooks_reuse#dynamic-vs-static).

 Step mode
---------

 To execute a playbook interactively, use `--step`:

 
```
ansible-playbook playbook.yml --step

```
 With this option, Ansible stops on each task, and asks if it should execute that task. For example, if you have a task called “configure ssh”, the playbook run will stop and ask:

 
```
Perform task: configure ssh (y/n/c):

```
 Answer “y” to execute the task, answer “n” to skip the task, and answer “c” to exit step mode, executing all remaining tasks without asking.

  See also

  [Intro to playbooks](playbooks_intro#playbooks-intro)

An introduction to playbooks

  [Debugging tasks](playbooks_debugger#playbook-debugger)

Using the Ansible debugger

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_startnstep.html>

Validating tasks: check mode and diff mode
==========================================

 Ansible provides two modes of execution that validate tasks: check mode and diff mode. These modes can be used separately or together. They are useful when you are creating or editing a playbook or role and you want to know what it will do. In check mode, Ansible runs without making any changes on remote systems. Modules that support check mode report the changes they would have made. Modules that do not support check mode report nothing and do nothing. In diff mode, Ansible provides before-and-after comparisons. Modules that support diff mode display detailed information. You can combine check mode and diff mode for detailed validation of your playbook or role.

 * [Using check mode](#using-check-mode)


	+ [Enforcing or preventing check mode on tasks](#enforcing-or-preventing-check-mode-on-tasks)
	+ [Skipping tasks or ignoring errors in check mode](#skipping-tasks-or-ignoring-errors-in-check-mode)
* [Using diff mode](#using-diff-mode)


	+ [Enforcing or preventing diff mode on tasks](#enforcing-or-preventing-diff-mode-on-tasks)

 Using check mode
----------------

 Check mode is just a simulation. It will not generate output for tasks that use [conditionals based on registered variables](playbooks_conditionals#conditionals-registered-vars) (results of prior tasks). However, it is great for validating configuration management playbooks that run on one node at a time. To run a playbook in check mode:

 
```
ansible-playbook foo.yml --check

```
 ### Enforcing or preventing check mode on tasks

  New in version 2.2.

  If you want certain tasks to run in check mode always, or never, regardless of whether you run the playbook with or without `--check`, you can add the `check_mode` option to those tasks:

 * To force a task to run in check mode, even when the playbook is called without `--check`, set `check_mode: yes`.
* To force a task to run in normal mode and make changes to the system, even when the playbook is called with `--check`, set `check_mode: no`.

 For example:

 
```
tasks:
  - name: This task will always make changes to the system
    ansible.builtin.command: /something/to/run --even-in-check-mode
    check_mode: no

  - name: This task will never make changes to the system
    ansible.builtin.lineinfile:
      line: "important config"
      dest: /path/to/myconfig.conf
      state: present
    check_mode: yes
    register: changes_to_important_config

```
 Running single tasks with `check_mode: yes` can be useful for testing Ansible modules, either to test the module itself or to test the conditions under which a module would make changes. You can register variables (see [Conditionals](playbooks_conditionals#playbooks-conditionals)) on these tasks for even more detail on the potential changes.

  Note

 Prior to version 2.2 only the equivalent of `check_mode: no` existed. The notation for that was `always_run: yes`.

  ### Skipping tasks or ignoring errors in check mode

  New in version 2.1.

  If you want to skip a task or ignore errors on a task when you run Ansible in check mode, you can use a boolean magic variable `ansible_check_mode`, which is set to `True` when Ansible runs in check mode. For example:

 
```
tasks:

  - name: This task will be skipped in check mode
    ansible.builtin.git:
      repo: ssh://git@github.com/mylogin/hello.git
      dest: /home/mylogin/hello
    when: not ansible_check_mode

  - name: This task will ignore errors in check mode
    ansible.builtin.git:
      repo: ssh://git@github.com/mylogin/hello.git
      dest: /home/mylogin/hello
    ignore_errors: "{{ ansible_check_mode }}"

```
 Using diff mode
---------------

 The `--diff` option for ansible-playbook can be used alone or with `--check`. When you run in diff mode, any module that supports diff mode reports the changes made or, if used with `--check`, the changes that would have been made. Diff mode is most common in modules that manipulate files (for example, the template module) but other modules might also show ‘before and after’ information (for example, the user module).

 Diff mode produces a large amount of output, so it is best used when checking a single host at a time. For example:

 
```
ansible-playbook foo.yml --check --diff --limit foo.example.com

```
  New in version 2.4.

  ### Enforcing or preventing diff mode on tasks

 Because the `--diff` option can reveal sensitive information, you can disable it for a task by specifying `diff: no`. For example:

 
```
tasks:
  - name: This task will not report a diff when the file changes
    ansible.builtin.template:
      src: secret.conf.j2
      dest: /etc/secret.conf
      owner: root
      group: root
      mode: '0600'
    diff: no

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_checkmode.html>

Debugging tasks
===============

 Ansible offers a task debugger so you can fix errors during execution instead of editing your playbook and running it again to see if your change worked. You have access to all of the features of the debugger in the context of the task. You can check or set the value of variables, update module arguments, and re-run the task with the new variables and arguments. The debugger lets you resolve the cause of the failure and continue with playbook execution.

 * [Enabling the debugger](#enabling-the-debugger)


	+ [Enabling the debugger with the `debugger` keyword](#enabling-the-debugger-with-the-debugger-keyword)
	
	
		- [Examples of using the `debugger` keyword](#examples-of-using-the-debugger-keyword)
	+ [Enabling the debugger in configuration or an environment variable](#enabling-the-debugger-in-configuration-or-an-environment-variable)
	+ [Enabling the debugger as a strategy](#enabling-the-debugger-as-a-strategy)
* [Resolving errors in the debugger](#resolving-errors-in-the-debugger)
* [Available debug commands](#available-debug-commands)


	+ [Print command](#print-command)
	+ [Update args command](#update-args-command)
	+ [Update vars command](#update-vars-command)
	+ [Update task command](#update-task-command)
	+ [Redo command](#redo-command)
	+ [Continue command](#continue-command)
	+ [Quit command](#quit-command)
* [How the debugger interacts with the free strategy](#how-the-debugger-interacts-with-the-free-strategy)

 Enabling the debugger
---------------------

 The debugger is not enabled by default. If you want to invoke the debugger during playbook execution, you must enable it first.

 Use one of these three methods to enable the debugger:

 * with the debugger keyword
* in configuration or an environment variable, or
* as a strategy

 ### Enabling the debugger with the `debugger` keyword

  New in version 2.5.

  You can use the `debugger` keyword to enable (or disable) the debugger for a specific play, role, block, or task. This option is especially useful when developing or extending playbooks, plays, and roles. You can enable the debugger on new or updated tasks. If they fail, you can fix the errors efficiently. The `debugger` keyword accepts five values:

 

| Value | Result |
| --- | --- |
| always | Always invoke the debugger, regardless of the outcome |
| never | Never invoke the debugger, regardless of the outcome |
| on\_failed | Only invoke the debugger if a task fails |
| on\_unreachable | Only invoke the debugger if a host is unreachable |
| on\_skipped | Only invoke the debugger if the task is skipped |

 When you use the `debugger` keyword, the value you specify overrides any global configuration to enable or disable the debugger. If you define `debugger` at multiple levels, such as in a role and in a task, Ansible honors the most granular definition. The definition at the play or role level applies to all blocks and tasks within that play or role, unless they specify a different value. The definition at the block level overrides the definition at the play or role level, and applies to all tasks within that block, unless they specify a different value. The definition at the task level always applies to the task; it overrides the definitions at the block, play, or role level.

 #### Examples of using the `debugger` keyword

 Example of setting the `debugger` keyword on a task:

 
```
- name: Execute a command
  ansible.builtin.command: "false"
  debugger: on_failed

```
 Example of setting the `debugger` keyword on a play:

 
```
- name: My play
  hosts: all
  debugger: on_skipped
  tasks:
    - name: Execute a command
      ansible.builtin.command: "true"
      when: False

```
 Example of setting the `debugger` keyword at multiple levels:

 
```
- name: Play
  hosts: all
  debugger: never
  tasks:
    - name: Execute a command
      ansible.builtin.command: "false"
      debugger: on_failed

```
 In this example, the debugger is set to `never` at the play level and to `on_failed` at the task level. If the task fails, Ansible invokes the debugger, because the definition on the task overrides the definition on its parent play.

 ### Enabling the debugger in configuration or an environment variable

  New in version 2.5.

  You can enable the task debugger globally with a setting in ansible.cfg or with an environment variable. The only options are `True` or `False`. If you set the configuration option or environment variable to `True`, Ansible runs the debugger on failed tasks by default.

 To enable the task debugger from ansible.cfg, add this setting to the defaults section:

 
```
[defaults]
enable_task_debugger = True

```
 To enable the task debugger with an environment variable, pass the variable when you run your playbook:

 
```
ANSIBLE_ENABLE_TASK_DEBUGGER=True ansible-playbook -i hosts site.yml

```
 When you enable the debugger globally, every failed task invokes the debugger, unless the role, play, block, or task explicity disables the debugger. If you need more granular control over what conditions trigger the debugger, use the `debugger` keyword.

 ### Enabling the debugger as a strategy

 If you are running legacy playbooks or roles, you may see the debugger enabled as a [strategy](../plugins/strategy#strategy-plugins). You can do this at the play level, in ansible.cfg, or with the environment variable `ANSIBLE_STRATEGY=debug`. For example:

 
```
- hosts: test
  strategy: debug
  tasks:
  ...

```
 Or in ansible.cfg:

 
```
[defaults]
strategy = debug

```
  Note

 This backwards-compatible method, which matches Ansible versions before 2.5, may be removed in a future release.

  Resolving errors in the debugger
--------------------------------

 After Ansible invokes the debugger, you can use the seven [debugger commands](#available-commands) to resolve the error that Ansible encountered. Consider this example playbook, which defines the `var1` variable but uses the undefined `wrong_var` variable in a task by mistake.

 
```
- hosts: test
  debugger: on_failed
  gather_facts: no
  vars:
    var1: value1
  tasks:
    - name: Use a wrong variable
      ansible.builtin.ping: data={{ wrong_var }}

```
 If you run this playbook, Ansible invokes the debugger when the task fails. From the debug prompt, you can change the module arguments or the variables and run the task again.

 
```
PLAY ***************************************************************************

TASK [wrong variable] **********************************************************
fatal: [192.0.2.10]: FAILED! => {"failed": true, "msg": "ERROR! 'wrong_var' is undefined"}
Debugger invoked
[192.0.2.10] TASK: wrong variable (debug)> p result._result
{'failed': True,
 'msg': 'The task includes an option with an undefined variable. The error '
        "was: 'wrong_var' is undefined\n"
        '\n'
        'The error appears to have been in '
        "'playbooks/debugger.yml': line 7, "
        'column 7, but may\n'
        'be elsewhere in the file depending on the exact syntax problem.\n'
        '\n'
        'The offending line appears to be:\n'
        '\n'
        '  tasks:\n'
        '    - name: wrong variable\n'
        '      ^ here\n'}
[192.0.2.10] TASK: wrong variable (debug)> p task.args
{u'data': u'{{ wrong_var }}'}
[192.0.2.10] TASK: wrong variable (debug)> task.args['data'] = '{{ var1 }}'
[192.0.2.10] TASK: wrong variable (debug)> p task.args
{u'data': '{{ var1 }}'}
[192.0.2.10] TASK: wrong variable (debug)> redo
ok: [192.0.2.10]

PLAY RECAP *********************************************************************
192.0.2.10               : ok=1    changed=0    unreachable=0    failed=0

```
 Changing the task arguments in the debugger to use `var1` instead of `wrong_var` makes the task run successfully.

 Available debug commands
------------------------

 You can use these seven commands at the debug prompt:

 

| Command | Shortcut | Action |
| --- | --- | --- |
| print | p | Print information about the task |
| task.args[*key*] = *value* | no shortcut | Update module arguments |
| task\_vars[*key*] = *value* | no shortcut | Update task variables (you must `update_task` next) |
| update\_task | u | Recreate a task with updated task variables |
| redo | r | Run the task again |
| continue | c | Continue executing, starting with the next task |
| quit | q | Quit the debugger |

 For more details, see the individual descriptions and examples below.

 ### Print command

 `print *task/task.args/task_vars/host/result*` prints information about the task:

 
```
[192.0.2.10] TASK: install package (debug)> p task
TASK: install package
[192.0.2.10] TASK: install package (debug)> p task.args
{u'name': u'{{ pkg_name }}'}
[192.0.2.10] TASK: install package (debug)> p task_vars
{u'ansible_all_ipv4_addresses': [u'192.0.2.10'],
 u'ansible_architecture': u'x86_64',
 ...
}
[192.0.2.10] TASK: install package (debug)> p task_vars['pkg_name']
u'bash'
[192.0.2.10] TASK: install package (debug)> p host
192.0.2.10
[192.0.2.10] TASK: install package (debug)> p result._result
{'_ansible_no_log': False,
 'changed': False,
 u'failed': True,
 ...
 u'msg': u"No package matching 'not_exist' is available"}

```
 ### Update args command

 `task.args[*key*] = *value*` updates a module argument. This sample playbook has an invalid package name:

 
```
- hosts: test
  strategy: debug
  gather_facts: yes
  vars:
    pkg_name: not_exist
  tasks:
    - name: Install a package
      ansible.builtin.apt: name={{ pkg_name }}

```
 When you run the playbook, the invalid package name triggers an error, and Ansible invokes the debugger. You can fix the package name by viewing, then updating the module argument:

 
```
[192.0.2.10] TASK: install package (debug)> p task.args
{u'name': u'{{ pkg_name }}'}
[192.0.2.10] TASK: install package (debug)> task.args['name'] = 'bash'
[192.0.2.10] TASK: install package (debug)> p task.args
{u'name': 'bash'}
[192.0.2.10] TASK: install package (debug)> redo

```
 After you update the module argument, use `redo` to run the task again with the new args.

 ### Update vars command

 `task_vars[*key*] = *value*` updates the `task_vars`. You could fix the playbook above by viewing, then updating the task variables instead of the module args:

 
```
[192.0.2.10] TASK: install package (debug)> p task_vars['pkg_name']
u'not_exist'
[192.0.2.10] TASK: install package (debug)> task_vars['pkg_name'] = 'bash'
[192.0.2.10] TASK: install package (debug)> p task_vars['pkg_name']
'bash'
[192.0.2.10] TASK: install package (debug)> update_task
[192.0.2.10] TASK: install package (debug)> redo

```
 After you update the task variables, you must use `update_task` to load the new variables before using `redo` to run the task again.

  Note

 In 2.5 this was updated from `vars` to `task_vars` to avoid conflicts with the `vars()` python function.

  ### Update task command

  New in version 2.8.

  `u` or `update_task` recreates the task from the original task data structure and templates with updated task variables. See the entry [Update vars command](#update-vars-command) for an example of use.

 ### Redo command

 `r` or `redo` runs the task again.

 ### Continue command

 `c` or `continue` continues executing, starting with the next task.

 ### Quit command

 `q` or `quit` quits the debugger. The playbook execution is aborted.

 How the debugger interacts with the free strategy
-------------------------------------------------

 With the default `linear` strategy enabled, Ansible halts execution while the debugger is active, and runs the debugged task immediately after you enter the `redo` command. With the `free` strategy enabled, however, Ansible does not wait for all hosts, and may queue later tasks on one host before a task fails on another host. With the `free` strategy, Ansible does not queue or execute any tasks while the debugger is active. However, all queued tasks remain in the queue and run as soon as you exit the debugger. If you use `redo` to reschedule a task from the debugger, other queued tasks may execute before your rescheduled task. For more information about strategies, see [Controlling playbook execution: strategies and more](playbooks_strategies#playbooks-strategies).

  See also

  [Executing playbooks for troubleshooting](playbooks_startnstep#playbooks-start-and-step)

Running playbooks while debugging or testing

  [Intro to playbooks](playbooks_intro#playbooks-intro)

An introduction to playbooks

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_debugger.html>

Controlling playbook execution: strategies and more
===================================================

 By default, Ansible runs each task on all hosts affected by a play before starting the next task on any host, using 5 forks. If you want to change this default behavior, you can use a different strategy plugin, change the number of forks, or apply one of several keywords like `serial`.

 * [Selecting a strategy](#selecting-a-strategy)
* [Setting the number of forks](#setting-the-number-of-forks)
* [Using keywords to control execution](#using-keywords-to-control-execution)


	+ [Setting the batch size with `serial`](#setting-the-batch-size-with-serial)
	+ [Restricting execution with `throttle`](#restricting-execution-with-throttle)
	+ [Ordering execution based on inventory](#ordering-execution-based-on-inventory)
	+ [Running on a single machine with `run_once`](#running-on-a-single-machine-with-run-once)

 Selecting a strategy
--------------------

 The default behavior described above is the [linear strategy](../collections/ansible/builtin/linear_strategy#linear-strategy). Ansible offers other strategies, including the [debug strategy](../collections/ansible/builtin/debug_strategy#debug-strategy) (see also [Debugging tasks](playbooks_debugger#playbook-debugger)) and the [free strategy](../collections/ansible/builtin/free_strategy#free-strategy), which allows each host to run until the end of the play as fast as it can:

 
```
- hosts: all
  strategy: free
  tasks:
  ...

```
 You can select a different strategy for each play as shown above, or set your preferred strategy globally in `ansible.cfg`, under the `defaults` stanza:

 
```
[defaults]
strategy = free

```
 All strategies are implemented as [strategy plugins](../plugins/strategy#strategy-plugins). Please review the documentation for each strategy plugin for details on how it works.

 Setting the number of forks
---------------------------

 If you have the processing power available and want to use more forks, you can set the number in `ansible.cfg`:

 
```
[defaults]
forks = 30

```
 or pass it on the command line: `ansible-playbook -f 30 my_playbook.yml`.

 Using keywords to control execution
-----------------------------------

 In addition to strategies, several [keywords](../reference_appendices/playbooks_keywords#playbook-keywords) also affect play execution. You can set a number, a percentage, or a list of numbers of hosts you want to manage at a time with `serial`. Ansible completes the play on the specified number or percentage of hosts before starting the next batch of hosts. You can restrict the number of workers allotted to a block or task with `throttle`. You can control how Ansible selects the next host in a group to execute against with `order`. You can run a task on a single host with `run_once`. These keywords are not strategies. They are directives or options applied to a play, block, or task.

 ### Setting the batch size with `serial`

 By default, Ansible runs in parallel against all the hosts in the [pattern](intro_patterns#intro-patterns) you set in the `hosts:` field of each play. If you want to manage only a few machines at a time, for example during a rolling update, you can define how many hosts Ansible should manage at a single time using the `serial` keyword:

 
```
---
- name: test play
  hosts: webservers
  serial: 3
  gather_facts: False

  tasks:
    - name: first task
      command: hostname
    - name: second task
      command: hostname

```
 In the above example, if we had 6 hosts in the group ‘webservers’, Ansible would execute the play completely (both tasks) on 3 of the hosts before moving on to the next 3 hosts:

 
```
PLAY [webservers] ****************************************

TASK [first task] ****************************************
changed: [web3]
changed: [web2]
changed: [web1]

TASK [second task] ***************************************
changed: [web1]
changed: [web2]
changed: [web3]

PLAY [webservers] ****************************************

TASK [first task] ****************************************
changed: [web4]
changed: [web5]
changed: [web6]

TASK [second task] ***************************************
changed: [web4]
changed: [web5]
changed: [web2]

PLAY RECAP ***********************************************
web1      : ok=2    changed=2    unreachable=0    failed=0
web2      : ok=2    changed=2    unreachable=0    failed=0
web3      : ok=2    changed=2    unreachable=0    failed=0
web4      : ok=2    changed=2    unreachable=0    failed=0
web5      : ok=2    changed=2    unreachable=0    failed=0
web6      : ok=2    changed=2    unreachable=0    failed=0

```
 You can also specify a percentage with the `serial` keyword. Ansible applies the percentage to the total number of hosts in a play to determine the number of hosts per pass:

 
```
---
- name: test play
  hosts: webservers
  serial: "30%"

```
 If the number of hosts does not divide equally into the number of passes, the final pass contains the remainder. In this example, if you had 20 hosts in the webservers group, the first batch would contain 6 hosts, the second batch would contain 6 hosts, the third batch would contain 6 hosts, and the last batch would contain 2 hosts.

 You can also specify batch sizes as a list. For example:

 
```
---
- name: test play
  hosts: webservers
  serial:
    - 1
    - 5
    - 10

```
 In the above example, the first batch would contain a single host, the next would contain 5 hosts, and (if there are any hosts left), every following batch would contain either 10 hosts or all the remaining hosts, if fewer than 10 hosts remained.

 You can list multiple batch sizes as percentages:

 
```
---
- name: test play
  hosts: webservers
  serial:
    - "10%"
    - "20%"
    - "100%"

```
 You can also mix and match the values:

 
```
---
- name: test play
  hosts: webservers
  serial:
    - 1
    - 5
    - "20%"

```
  Note

 No matter how small the percentage, the number of hosts per pass will always be 1 or greater.

  ### Restricting execution with `throttle`

 The `throttle` keyword limits the number of workers for a particular task. It can be set at the block and task level. Use `throttle` to restrict tasks that may be CPU-intensive or interact with a rate-limiting API:

 
```
tasks:
- command: /path/to/cpu_intensive_command
  throttle: 1

```
 If you have already restricted the number of forks or the number of machines to execute against in parallel, you can reduce the number of workers with `throttle`, but you cannot increase it. In other words, to have an effect, your `throttle` setting must be lower than your `forks` or `serial` setting if you are using them together.

 ### Ordering execution based on inventory

 The `order` keyword controls the order in which hosts are run. Possible values for order are:

  inventory:

(default) The order provided in the inventory

  reverse\_inventory:

The reverse of the order provided by the inventory

  sorted:

Sorted alphabetically sorted by name

  reverse\_sorted:

Sorted by name in reverse alphabetical order

  shuffle:

Randomly ordered on each run

   Other keywords that affect play execution include `ignore_errors`, `ignore_unreachable`, and `any_errors_fatal`. These options are documented in [Error handling in playbooks](playbooks_error_handling#playbooks-error-handling).

 ### Running on a single machine with `run_once`

 If you want a task to run only on the first host in your batch of hosts, set `run_once` to true on that task:

 
```
---
# ...

  tasks:

    # ...

    - command: /opt/application/upgrade_db.py
      run_once: true

    # ...

```
 Ansible executes this task on the first host in the current batch and applies all results and facts to all the hosts in the same batch. This approach is similar to applying a conditional to a task such as:

 
```
- command: /opt/application/upgrade_db.py
  when: inventory_hostname == webservers[0]

```
 However, with `run_once`, the results are applied to all the hosts. To run the task on a specific host, instead of the first host in the batch, delegate the task:

 
```
- command: /opt/application/upgrade_db.py
  run_once: true
  delegate_to: web01.example.org

```
 As always with [delegation](playbooks_delegation#playbooks-delegation), the action will be executed on the delegated host, but the information is still that of the original host in the task.

  Note

 When used together with `serial`, tasks marked as `run_once` will be run on one host in *each* serial batch. If the task must run only once regardless of `serial` mode, use `when: inventory_hostname == ansible_play_hosts_all[0]` construct.

   Note

 Any conditional (in other words, `when:`) will use the variables of the ‘first host’ to decide if the task runs or not, no other hosts will be tested.

   Note

 If you want to avoid the default behavior of setting the fact for all hosts, set `delegate_facts: True` for the specific task or block.

   See also

  [Intro to playbooks](playbooks_intro#about-playbooks)

An introduction to playbooks

  [Controlling where tasks run: delegation and local actions](playbooks_delegation#playbooks-delegation)

Running tasks on or assigning facts to specific machines

  [Roles](playbooks_reuse_roles#playbooks-reuse-roles)

Playbook organization by roles

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_strategies.html>

Asynchronous actions and polling
================================

 By default Ansible runs tasks synchronously, holding the connection to the remote node open until the action is completed. This means within a playbook, each task blocks the next task by default, meaning subsequent tasks will not run until the current task completes. This behavior can create challenges. For example, a task may take longer to complete than the SSH session allows for, causing a timeout. Or you may want a long-running process to execute in the background while you perform other tasks concurrently. Asynchronous mode lets you control how long-running tasks execute.

 * [Asynchronous ad hoc tasks](#asynchronous-ad-hoc-tasks)
* [Asynchronous playbook tasks](#asynchronous-playbook-tasks)


	+ [Avoid connection timeouts: poll > 0](#avoid-connection-timeouts-poll-0)
	+ [Run tasks concurrently: poll = 0](#run-tasks-concurrently-poll-0)

 Asynchronous ad hoc tasks
-------------------------

 You can execute long-running operations in the background with [ad hoc tasks](intro_adhoc#intro-adhoc). For example, to execute `long_running_operation` asynchronously in the background, with a timeout (`-B`) of 3600 seconds, and without polling (`-P`):

 
```
$ ansible all -B 3600 -P 0 -a "/usr/bin/long_running_operation --do-stuff"

```
 To check on the job status later, use the `async_status` module, passing it the job ID that was returned when you ran the original job in the background:

 
```
$ ansible web1.example.com -m async_status -a "jid=488359678239.2844"

```
 Ansible can also check on the status of your long-running job automatically with polling. In most cases, Ansible will keep the connection to your remote node open between polls. To run for 30 minutes and poll for status every 60 seconds:

 
```
$ ansible all -B 1800 -P 60 -a "/usr/bin/long_running_operation --do-stuff"

```
 Poll mode is smart so all jobs will be started before polling begins on any machine. Be sure to use a high enough `--forks` value if you want to get all of your jobs started very quickly. After the time limit (in seconds) runs out (`-B`), the process on the remote nodes will be terminated.

 Asynchronous mode is best suited to long-running shell commands or software upgrades. Running the copy module asynchronously, for example, does not do a background file transfer.

 Asynchronous playbook tasks
---------------------------

 [Playbooks](playbooks#working-with-playbooks) also support asynchronous mode and polling, with a simplified syntax. You can use asynchronous mode in playbooks to avoid connection timeouts or to avoid blocking subsequent tasks. The behavior of asynchronous mode in a playbook depends on the value of `poll`.

 ### Avoid connection timeouts: poll > 0

 If you want to set a longer timeout limit for a certain task in your playbook, use `async` with `poll` set to a positive value. Ansible will still block the next task in your playbook, waiting until the async task either completes, fails or times out. However, the task will only time out if it exceeds the timeout limit you set with the `async` parameter.

 To avoid timeouts on a task, specify its maximum runtime and how frequently you would like to poll for status:

 
```
---

- hosts: all
  remote_user: root

  tasks:

  - name: Simulate long running op (15 sec), wait for up to 45 sec, poll every 5 sec
    ansible.builtin.command: /bin/sleep 15
    async: 45
    poll: 5

```
  Note

 The default poll value is set by the [DEFAULT\_POLL\_INTERVAL](../reference_appendices/config#default-poll-interval) setting. There is no default for the async time limit. If you leave off the ‘async’ keyword, the task runs synchronously, which is Ansible’s default.

   Note

 As of Ansible 2.3, async does not support check mode and will fail the task when run in check mode. See [Validating tasks: check mode and diff mode](playbooks_checkmode#check-mode-dry) on how to skip a task in check mode.

   Note

 When an async task completes with polling enabled, the temporary async job cache file (by default in ~/.ansible\_async/) is automatically removed.

  ### Run tasks concurrently: poll = 0

 If you want to run multiple tasks in a playbook concurrently, use `async` with `poll` set to 0. When you set `poll: 0`, Ansible starts the task and immediately moves on to the next task without waiting for a result. Each async task runs until it either completes, fails or times out (runs longer than its `async` value). The playbook run ends without checking back on async tasks.

 To run a playbook task asynchronously:

 
```
---

- hosts: all
  remote_user: root

  tasks:

  - name: Simulate long running op, allow to run for 45 sec, fire and forget
    ansible.builtin.command: /bin/sleep 15
    async: 45
    poll: 0

```
  Note

 Do not specify a poll value of 0 with operations that require exclusive locks (such as yum transactions) if you expect to run other commands later in the playbook against those same resources.

   Note

 Using a higher value for `--forks` will result in kicking off asynchronous tasks even faster. This also increases the efficiency of polling.

   Note

 When running with `poll: 0`, Ansible will not automatically cleanup the async job cache file. You will need to manually clean this up with the [async\_status](../collections/ansible/builtin/async_status_module#async-status-module) module with `mode: cleanup`.

  If you need a synchronization point with an async task, you can register it to obtain its job ID and use the [async\_status](../collections/ansible/builtin/async_status_module#async-status-module) module to observe it in a later task. For example:

 
```
- name: Run an async task
  ansible.builtin.yum:
    name: docker-io
    state: present
  async: 1000
  poll: 0
  register: yum_sleeper

- name: Check on an async task
  async_status:
    jid: "{{ yum_sleeper.ansible_job_id }}"
  register: job_result
  until: job_result.finished
  retries: 100
  delay: 10

```
  Note

 If the value of `async:` is not high enough, this will cause the “check on it later” task to fail because the temporary status file that the `async_status:` is looking for will not have been written or no longer exist

  To run multiple asynchronous tasks while limiting the number of tasks running concurrently:

 
```
#####################
# main.yml
#####################
- name: Run items asynchronously in batch of two items
  vars:
    sleep_durations:
      - 1
      - 2
      - 3
      - 4
      - 5
    durations: "{{ item }}"
  include_tasks: execute_batch.yml
  loop: "{{ sleep_durations | batch(2) | list }}"

#####################
# execute_batch.yml
#####################
- name: Async sleeping for batched_items
  ansible.builtin.command: sleep {{ async_item }}
  async: 45
  poll: 0
  loop: "{{ durations }}"
  loop_control:
    loop_var: "async_item"
  register: async_results

- name: Check sync status
  async_status:
    jid: "{{ async_result_item.ansible_job_id }}"
  loop: "{{ async_results.results }}"
  loop_control:
    loop_var: "async_result_item"
  register: async_poll_results
  until: async_poll_results.finished
  retries: 30

```
  See also

  [Controlling playbook execution: strategies and more](playbooks_strategies#playbooks-strategies)

Options for controlling playbook execution

  [Intro to playbooks](playbooks_intro#playbooks-intro)

An introduction to playbooks

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html>

Advanced Syntax
===============

 The advanced YAML syntax examples on this page give you more control over the data placed in YAML files used by Ansible. You can find additional information about Python-specific YAML in the official [PyYAML Documentation](https://pyyaml.org/wiki/PyYAMLDocumentation#YAMLtagsandPythontypes).

 * [Unsafe or raw strings](#unsafe-or-raw-strings)
* [YAML anchors and aliases: sharing variable values](#yaml-anchors-and-aliases-sharing-variable-values)

 Unsafe or raw strings
---------------------

 When handling values returned by lookup plugins, Ansible uses a data type called `unsafe` to block templating. Marking data as unsafe prevents malicious users from abusing Jinja2 templates to execute arbitrary code on target machines. The Ansible implementation ensures that unsafe values are never templated. It is more comprehensive than escaping Jinja2 with `{% raw %} ... {% endraw %}` tags.

 You can use the same `unsafe` data type in variables you define, to prevent templating errors and information disclosure. You can mark values supplied by [vars\_prompts](playbooks_prompts#unsafe-prompts) as unsafe. You can also use `unsafe` in playbooks. The most common use cases include passwords that allow special characters like `{` or `%`, and JSON arguments that look like templates but should not be templated. For example:

 
```
---
mypassword: !unsafe 234%234{435lkj{{lkjsdf

```
 In a playbook:

 
```
---
hosts: all
vars:
    my_unsafe_variable: !unsafe 'unsafe % value'
tasks:
    ...

```
 For complex variables such as hashes or arrays, use `!unsafe` on the individual elements:

 
```
---
my_unsafe_array:
    - !unsafe 'unsafe element'
    - 'safe element'

my_unsafe_hash:
    unsafe_key: !unsafe 'unsafe value'

```
 YAML anchors and aliases: sharing variable values
-------------------------------------------------

 [YAML anchors and aliases](https://yaml.org/spec/1.2/spec.html#id2765878) help you define, maintain, and use shared variable values in a flexible way. You define an anchor with `&`, then refer to it using an alias, denoted with `*`. Here’s an example that sets three values with an anchor, uses two of those values with an alias, and overrides the third value:

 
```
---
...
vars:
    app1:
        jvm: &jvm_opts
            opts: '-Xms1G -Xmx2G'
            port: 1000
            path: /usr/lib/app1
    app2:
        jvm:
            <<: *jvm_opts
            path: /usr/lib/app2
...

```
 Here, `app1` and `app2` share the values for `opts` and `port` using the anchor `&jvm_opts` and the alias `*jvm_opts`. The value for `path` is merged by `<<` or [merge operator](https://yaml.org/type/merge.html).

 Anchors and aliases also let you share complex sets of variable values, including nested variables. If you have one variable value that includes another variable value, you can define them separately:

 
```
vars:
  webapp_version: 1.0
  webapp_custom_name: ToDo_App-1.0

```
 This is inefficient and, at scale, means more maintenance. To incorporate the version value in the name, you can use an anchor in `app_version` and an alias in `custom_name`:

 
```
vars:
  webapp:
      version: &my_version 1.0
      custom_name:
          - "ToDo_App"
          - *my_version

```
 Now, you can re-use the value of `app_version` within the value of `custom_name` and use the output in a template:

 
```
---
- name: Using values nested inside dictionary
  hosts: localhost
  vars:
    webapp:
        version: &my_version 1.0
        custom_name:
            - "ToDo_App"
            - *my_version
  tasks:
  - name: Using Anchor value
    ansible.builtin.debug:
        msg: My app is called "{{ webapp.custom_name | join('-') }}".

```
 You’ve anchored the value of `version` with the `&my_version` anchor, and re-used it with the `*my_version` alias. Anchors and aliases let you access nested values inside dictionaries.

  See also

  [Using Variables](playbooks_variables#playbooks-variables)

All about variables

  [Data manipulation](complex_data_manipulation)

Doing complex data manipulation in Ansible

  [User Mailing List](https://groups.google.com/group/ansible-project)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_advanced_syntax.html>

Rejecting modules
=================

 If you want to avoid using certain modules, you can add them to a reject list to prevent Ansible from loading them. To reject plugins, create a yaml configuration file. The default location for this file is `/etc/ansible/plugin_filters.yml`. You can select a different path for the reject list using the [PLUGIN\_FILTERS\_CFG](../reference_appendices/config#plugin-filters-cfg) setting in the `defaults` section of your ansible.cfg. Here is an example reject list:

 
```
---
filter_version: '1.0'
module_rejectlist:
  # Deprecated
  - docker
  # We only allow pip, not easy_install
  - easy_install

```
 The file contains two fields:

 * A file version so that you can update the format while keeping backwards compatibility in the future. The present version should be the string, `"1.0"`
* A list of modules to reject. Ansible will not load any module in this list when it searches for a module to invoke for a task.

  Note

 The `stat` module is required for Ansible to run. Do not add this module to your reject list.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/plugin_filtering_config.html>

Working With Modules
====================

 * [Introduction to modules](modules_intro)
* [Module Maintenance & Support](modules_support)
* [Return Values](../reference_appendices/common_return_values)

 Ansible ships with a number of modules (called the ‘module library’) that can be executed directly on remote hosts or through [Playbooks](playbooks#working-with-playbooks).

 Users can also write their own modules. These modules can control system resources, like services, packages, or files (anything really), or handle executing system commands.

  See also

  [Introduction to ad hoc commands](intro_adhoc#intro-adhoc)

Examples of using modules in /usr/bin/ansible

  [Intro to playbooks](playbooks_intro#playbooks-intro)

Introduction to using modules with /usr/bin/ansible-playbook

  [Developing Ansible modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#developing-modules-general)

How to write your own modules

  [Python API](https://docs.ansible.com/ansible/latest/dev_guide/developing_api.html#developing-api)

Examples of using modules with the Python API

  [Interpreter Discovery](../reference_appendices/interpreter_discovery#interpreter-discovery)

Configuring the right Python interpreter on target hosts

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/modules.html>

Working With Plugins
====================

 Plugins are pieces of code that augment Ansible’s core functionality. Ansible uses a plugin architecture to enable a rich, flexible and expandable feature set.

 Ansible ships with a number of handy plugins, and you can easily write your own.

 This section covers the various types of plugins that are included with Ansible:

 * [Action Plugins](action)
* [Become Plugins](become)
* [Cache Plugins](cache)
* [Callback Plugins](callback)
* [Cliconf Plugins](cliconf)
* [Connection Plugins](connection)
* [Httpapi Plugins](httpapi)
* [Inventory Plugins](inventory)
* [Lookup Plugins](lookup)
* [Netconf Plugins](netconf)
* [Shell Plugins](shell)
* [Strategy Plugins](strategy)
* [Vars Plugins](vars)
* [Using filters to manipulate data](../user_guide/playbooks_filters)
* [Tests](../user_guide/playbooks_tests)
* [Rejecting modules](../user_guide/plugin_filtering_config)

  See also

  [Intro to playbooks](../user_guide/playbooks_intro#about-playbooks)

An introduction to playbooks

  [Ansible Configuration Settings](../reference_appendices/config#ansible-configuration-settings)

Ansible configuration documentation and settings

  [Working with command line tools](../user_guide/command_line_tools#command-line-tools)

Ansible tools, description and options

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/plugins/plugins.html>

Ansible and BSD
===============

 Managing BSD machines is different from managing other Unix-like machines. If you have managed nodes running BSD, review these topics.

 * [Connecting to BSD nodes](#connecting-to-bsd-nodes)
* [Bootstrapping BSD](#bootstrapping-bsd)
* [Setting the Python interpreter](#setting-the-python-interpreter)
* [Which modules are available?](#which-modules-are-available)
* [Using BSD as the control node](#using-bsd-as-the-control-node)
* [BSD facts](#bsd-facts)
* [BSD efforts and contributions](#bsd-efforts-and-contributions)

 Connecting to BSD nodes
-----------------------

 Ansible connects to managed nodes using OpenSSH by default. This works on BSD if you use SSH keys for authentication. However, if you use SSH passwords for authentication, Ansible relies on sshpass. Most versions of sshpass do not deal well with BSD login prompts, so when using SSH passwords against BSD machines, use `paramiko` to connect instead of OpenSSH. You can do this in ansible.cfg globally or you can set it as an inventory/group/host variable. For example:

 
```
[freebsd]
mybsdhost1 ansible_connection=paramiko

```
 Bootstrapping BSD
-----------------

 Ansible is agentless by default, however, it requires Python on managed nodes. Only the [raw](../collections/ansible/builtin/raw_module#raw-module) module will operate without Python. Although this module can be used to bootstrap Ansible and install Python on BSD variants (see below), it is very limited and the use of Python is required to make full use of Ansible’s features.

 The following example installs Python 2.7 which includes the json library required for full functionality of Ansible. On your control machine you can execute the following for most versions of FreeBSD:

 
```
ansible -m raw -a "pkg install -y python27" mybsdhost1

```
 Or for OpenBSD:

 
```
ansible -m raw -a "pkg_add python%3.7"

```
 Once this is done you can now use other Ansible modules apart from the `raw` module.

  Note

 This example demonstrated using pkg on FreeBSD and pkg\_add on OpenBSD, however you should be able to substitute the appropriate package tool for your BSD; the package name may also differ. Refer to the package list or documentation of the BSD variant you are using for the exact Python package name you intend to install.

  Setting the Python interpreter
------------------------------

 To support a variety of Unix-like operating systems and distributions, Ansible cannot always rely on the existing environment or `env` variables to locate the correct Python binary. By default, modules point at `/usr/bin/python` as this is the most common location. On BSD variants, this path may differ, so it is advised to inform Ansible of the binary’s location, through the `ansible_python_interpreter` inventory variable. For example:

 
```
[freebsd:vars]
ansible_python_interpreter=/usr/local/bin/python2.7
[openbsd:vars]
ansible_python_interpreter=/usr/local/bin/python3.7

```
 If you use additional plugins beyond those bundled with Ansible, you can set similar variables for `bash`, `perl` or `ruby`, depending on how the plugin is written. For example:

 
```
[freebsd:vars]
ansible_python_interpreter=/usr/local/bin/python
ansible_perl_interpreter=/usr/bin/perl5

```
 Which modules are available?
----------------------------

 The majority of the core Ansible modules are written for a combination of Unix-like machines and other generic services, so most should function well on the BSDs with the obvious exception of those that are aimed at Linux-only technologies (such as LVG).

 Using BSD as the control node
-----------------------------

 Using BSD as the control machine is as simple as installing the Ansible package for your BSD variant or by following the `pip` or ‘from source’ instructions.

 BSD facts
---------

 Ansible gathers facts from the BSDs in a similar manner to Linux machines, but since the data, names and structures can vary for network, disks and other devices, one should expect the output to be slightly different yet still familiar to a BSD administrator.

 BSD efforts and contributions
-----------------------------

 BSD support is important to us at Ansible. Even though the majority of our contributors use and target Linux we have an active BSD community and strive to be as BSD-friendly as possible. Please feel free to report any issues or incompatibilities you discover with BSD; pull requests with an included fix are also welcome!

  See also

  [Introduction to ad hoc commands](intro_adhoc#intro-adhoc)

Examples of basic commands

  [Working with playbooks](playbooks#working-with-playbooks)

Learning ansible’s configuration management language

  [Should you develop a module?](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules.html#developing-modules)

How to write modules

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/intro_bsd.html>

Data manipulation
=================

 In many cases, you need to do some complex operation with your variables, while Ansible is not recommended as a data processing/manipulation tool, you can use the existing Jinja2 templating in conjunction with the many added Ansible filters, lookups and tests to do some very complex transformations.

  Let’s start with a quick definition of each type of plugin:

* lookups: Mainly used to query ‘external data’, in Ansible these were the primary part of loops using the `with_<lookup>` construct, but they can be used independently to return data for processing. They normally return a list due to their primary function in loops as mentioned previously. Used with the `lookup` or `query` Jinja2 operators.
* filters: used to change/transform data, used with the `|` Jinja2 operator.
* tests: used to validate data, used with the `is` Jinja2 operator.

   Loops and list comprehensions
-----------------------------

 Most programming languages have loops (`for`, `while`, and so on) and list comprehensions to do transformations on lists including lists of objects. Jinja2 has a few filters that provide this functionality: `map`, `select`, `reject`, `selectattr`, `rejectattr`.

 * map: this is a basic for loop that just allows you to change every item in a list, using the ‘attribute’ keyword you can do the transformation based on attributes of the list elements.
* select/reject: this is a for loop with a condition, that allows you to create a subset of a list that matches (or not) based on the result of the condition.
* selectattr/rejectattr: very similar to the above but it uses a specific attribute of the list elements for the conditional statement.

 Use a loop to create exponential backoff for retries/until.

 
```
- name: retry ping 10 times with exponential backup delay
  ping:
  retries: 10
  delay: '{{item|int}}'
  loop: '{{ range(1, 10)|map('pow', 2) }}'

```
 ### Extract keys from a dictionary matching elements from a list

 The Python equivalent code would be:

 
```
chains = [1, 2]
for chain in chains:
    for config in chains_config[chain]['configs']:
        print(config['type'])

```
 There are several ways to do it in Ansible, this is just one example:

  Way to extract matching keys from a list of dictionaries 
```
 tasks:
   - name: Show extracted list of keys from a list of dictionaries
     ansible.builtin.debug:
       msg: "{{ chains | map('extract', chains_config) | map(attribute='configs') | flatten | map(attribute='type') | flatten }}"
     vars:
       chains: [1, 2]
       chains_config:
           1:
               foo: bar
               configs:
                   - type: routed
                     version: 0.1
                   - type: bridged
                     version: 0.2
           2:
               foo: baz
               configs:
                   - type: routed
                     version: 1.0
                   - type: bridged
                     version: 1.1

```
   Results of debug task, a list with the extracted keys 
```
   ok: [localhost] => {
       "msg": [
           "routed",
           "bridged",
           "routed",
           "bridged"
       ]
   }

```
   Get the unique list of values of a variable that vary per host 
```
   vars:
       unique_value_list: "{{ groups['all'] | map ('extract', hostvars, 'varname') | list | unique}}"

```
  ### Find mount point

 In this case, we want to find the mount point for a given path across our machines, since we already collect mount facts, we can use the following:

  Use selectattr to filter mounts into list I can then sort and select the last from 
```
  - hosts: all
    gather_facts: True
    vars:
       path: /var/lib/cache
    tasks:
    - name: The mount point for {{path}}, found using the Ansible mount facts, [-1] is the same as the 'last' filter
      ansible.builtin.debug:
       msg: "{{(ansible_facts.mounts | selectattr('mount', 'in', path) | list | sort(attribute='mount'))[-1]['mount']}}"

```
  ### Omit elements from a list

 The special `omit` variable ONLY works with module options, but we can still use it in other ways as an identifier to tailor a list of elements:

  Inline list filtering when feeding a module option 
```
   - name: Enable a list of Windows features, by name
     ansible.builtin.set_fact:
       win_feature_list: "{{ namestuff | reject('equalto', omit) | list }}"
     vars:
       namestuff:
         - "{{ (fs_installed_smb_v1 | default(False)) | ternary(omit, 'FS-SMB1') }}"
         - "foo"
         - "bar"

```
  Another way is to avoid adding elements to the list in the first place, so you can just use it directly:

  Using set\_fact in a loop to increment a list conditionally 
```
   - name: Build unique list with some items conditionally omitted
     ansible.builtin.set_fact:
        namestuff: ' {{ (namestuff | default([])) | union([item]) }}'
     when: item != omit
     loop:
         - "{{ (fs_installed_smb_v1 | default(False)) | ternary(omit, 'FS-SMB1') }}"
         - "foo"
         - "bar"

```
  ### Combine values from same list of dicts

 Combining positive and negative filters from examples above, you can get a ‘value when it exists’ and a ‘fallback’ when it doesn’t.

  Use selectattr and rejectattr to get the ansible\_host or inventory\_hostname as needed 
```
   - hosts: localhost
     tasks:
       - name: Check hosts in inventory that respond to ssh port
         wait_for:
           host: "{{ item }}"
           port: 22
         loop: '{{ has_ah + no_ah }}'
         vars:
           has_ah: '{{ hostvars|dictsort|selectattr("1.ansible_host", "defined")|map(attribute="1.ansible_host")|list }}'
           no_ah: '{{ hostvars|dictsort|rejectattr("1.ansible_host", "defined")|map(attribute="0")|list }}'

```
  ### Custom Fileglob Based on a Variable

 This example uses [Python argument list unpacking](https://docs.python.org/3/tutorial/controlflow.html#unpacking-argument-lists) to create a custom list of fileglobs based on a variable.

  Using fileglob with a list based on a variable. 
```
  - hosts: all
    vars:
      mygroups
        - prod
        - web
    tasks:
      - name: Copy a glob of files based on a list of groups
        copy:
          src: "{{ item }}"
          dest: "/tmp/{{ item }}"
        loop: '{{ q("fileglob", *globlist) }}'
        vars:
          globlist: '{{ mygroups | map("regex_replace", "^(.*)$", "files/\1/*.conf") | list }}'

```
  Complex Type transformations
----------------------------

 Jinja provides filters for simple data type transformations (`int`, `bool`, and so on), but when you want to transform data structures things are not as easy. You can use loops and list comprehensions as shown above to help, also other filters and lookups can be chained and leveraged to achieve more complex transformations.

 ### Create dictionary from list

 In most languages it is easy to create a dictionary (a.k.a. map/associative array/hash and so on) from a list of pairs, in Ansible there are a couple of ways to do it and the best one for you might depend on the source of your data.

 These example produces `{"a": "b", "c": "d"}`

  Simple list to dict by assuming the list is [key, value , key, value, …] 
```
 vars:
     single_list: [ 'a', 'b', 'c', 'd' ]
     mydict: "{{ dict(single_list | slice(2)) }}"

```
   It is simpler when we have a list of pairs: 
```
 vars:
     list_of_pairs: [ ['a', 'b'], ['c', 'd'] ]
     mydict: "{{ dict(list_of_pairs) }}"

```
  Both end up being the same thing, with `slice(2)` transforming `single_list` to a `list_of_pairs` generator.

 A bit more complex, using `set_fact` and a `loop` to create/update a dictionary with key value pairs from 2 lists:

  Using set\_fact to create a dictionary from a set of lists 
```
    - name: Uses 'combine' to update the dictionary and 'zip' to make pairs of both lists
      ansible.builtin.set_fact:
        mydict: "{{ mydict | default({}) | combine({item[0]: item[1]}) }}"
      loop: "{{ (keys | zip(values)) | list }}"
      vars:
        keys:
          - foo
          - var
          - bar
        values:
          - a
          - b
          - c

```
  This results in `{"foo": "a", "var": "b", "bar": "c"}`.

 You can even combine these simple examples with other filters and lookups to create a dictionary dynamically by matching patterns to variable names:

  Using ‘vars’ to define dictionary from a set of lists without needing a task 
```
   vars:
       myvarnames: "{{ q('varnames', '^my') }}"
       mydict: "{{ dict(myvarnames | zip(q('vars', *myvarnames))) }}"

```
  A quick explanation, since there is a lot to unpack from these two lines:

 * The `varnames` lookup returns a list of variables that match “begin with `my`”.
* Then feeding the list from the previous step into the `vars` lookup to get the list of values. The `*` is used to ‘dereference the list’ (a pythonism that works in Jinja), otherwise it would take the list as a single argument.
* Both lists get passed to the `zip` filter to pair them off into a unified list (key, value, key2, value2, …).
* The dict function then takes this ‘list of pairs’ to create the dictionary.

 An example on how to use facts to find a host’s data that meets condition X:

 
```
vars:
  uptime_of_host_most_recently_rebooted: "{{ansible_play_hosts_all | map('extract', hostvars, 'ansible_uptime_seconds') | sort | first}}"

```
 Using an example from @zoradache on reddit, to show the ‘uptime in days/hours/minutes’ (assumes facts where gathered). <https://www.reddit.com/r/ansible/comments/gj5a93/trying_to_get_uptime_from_seconds/fqj2qr3/>

 
```
- name: Show the uptime in a certain format
  ansible.builtin.debug:
   msg: Timedelta {{ now() - now().fromtimestamp(now(fmt='%s') | int - ansible_uptime_seconds) }}

```
  See also

  [Using filters to manipulate data](playbooks_filters)

Jinja2 filters included with Ansible

  [Tests](playbooks_tests)

Jinja2 tests included with Ansible

  [Jinja2 Docs](https://jinja.palletsprojects.com/)

Jinja2 documentation, includes lists for core filters and tests

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/complex_data_manipulation.html>

Sample Ansible setup
====================

 You have learned about playbooks, inventory, roles, and variables. This section pulls all those elements together, outlining a sample setup for automating a web service. You can find more example playbooks illustrating these patterns in our [ansible-examples repository](https://github.com/ansible/ansible-examples). (NOTE: These may not use all of the features in the latest release, but are still an excellent reference!).

 The sample setup organizes playbooks, roles, inventory, and variables files by function, with tags at the play and task level for greater granularity and control. This is a powerful and flexible approach, but there are other ways to organize Ansible content. Your usage of Ansible should fit your needs, not ours, so feel free to modify this approach and organize your content as you see fit.

 * [Sample directory layout](#sample-directory-layout)
* [Alternative directory layout](#alternative-directory-layout)
* [Sample group and host variables](#sample-group-and-host-variables)
* [Sample playbooks organized by function](#sample-playbooks-organized-by-function)
* [Sample task and handler files in a function-based role](#sample-task-and-handler-files-in-a-function-based-role)
* [What the sample setup enables](#what-the-sample-setup-enables)
* [Organizing for deployment or configuration](#organizing-for-deployment-or-configuration)
* [Using local Ansible modules](#using-local-ansible-modules)

 Sample directory layout
-----------------------

 This layout organizes most tasks in roles, with a single inventory file for each environment and a few playbooks in the top-level directory:

 
```
production                # inventory file for production servers
staging                   # inventory file for staging environment

group_vars/
   group1.yml             # here we assign variables to particular groups
   group2.yml
host_vars/
   hostname1.yml          # here we assign variables to particular systems
   hostname2.yml

library/                  # if any custom modules, put them here (optional)
module_utils/             # if any custom module_utils to support modules, put them here (optional)
filter_plugins/           # if any custom filter plugins, put them here (optional)

site.yml                  # main playbook
webservers.yml            # playbook for webserver tier
dbservers.yml             # playbook for dbserver tier
tasks/                    # task files included from playbooks
    webservers-extra.yml  # <-- avoids confusing playbook with task files

roles/
    common/               # this hierarchy represents a "role"
        tasks/            #
            main.yml      #  <-- tasks file can include smaller files if warranted
        handlers/         #
            main.yml      #  <-- handlers file
        templates/        #  <-- files for use with the template resource
            ntp.conf.j2   #  <------- templates end in .j2
        files/            #
            bar.txt       #  <-- files for use with the copy resource
            foo.sh        #  <-- script files for use with the script resource
        vars/             #
            main.yml      #  <-- variables associated with this role
        defaults/         #
            main.yml      #  <-- default lower priority variables for this role
        meta/             #
            main.yml      #  <-- role dependencies
        library/          # roles can also include custom modules
        module_utils/     # roles can also include custom module_utils
        lookup_plugins/   # or other types of plugins, like lookup in this case

    webtier/              # same kind of structure as "common" was above, done for the webtier role
    monitoring/           # ""
    fooapp/               # ""

```
 Alternative directory layout
----------------------------

 Alternatively you can put each inventory file with its `group_vars`/`host_vars` in a separate directory. This is particularly useful if your `group_vars`/`host_vars` don’t have that much in common in different environments. The layout could look something like this:

 
```
inventories/
   production/
      hosts               # inventory file for production servers
      group_vars/
         group1.yml       # here we assign variables to particular groups
         group2.yml
      host_vars/
         hostname1.yml    # here we assign variables to particular systems
         hostname2.yml

   staging/
      hosts               # inventory file for staging environment
      group_vars/
         group1.yml       # here we assign variables to particular groups
         group2.yml
      host_vars/
         stagehost1.yml   # here we assign variables to particular systems
         stagehost2.yml

library/
module_utils/
filter_plugins/

site.yml
webservers.yml
dbservers.yml

roles/
    common/
    webtier/
    monitoring/
    fooapp/

```
 This layout gives you more flexibility for larger environments, as well as a total separation of inventory variables between different environments. However, this approach is harder to maintain, because there are more files. For more information on organizing group and host variables, see [Organizing host and group variables](intro_inventory#splitting-out-vars).

 Sample group and host variables
-------------------------------

 These sample group and host variables files record the variable values that apply to each machine or group of machines. For instance, the data center in Atlanta has its own NTP servers, so when setting up ntp.conf, we should use them:

 
```
---
# file: group_vars/atlanta
ntp: ntp-atlanta.example.com
backup: backup-atlanta.example.com

```
 Similarly, the webservers have some configuration that does not apply to the database servers:

 
```
---
# file: group_vars/webservers
apacheMaxRequestsPerChild: 3000
apacheMaxClients: 900

```
 Default values, or values that are universally true, belong in a file called group\_vars/all:

 
```
---
# file: group_vars/all
ntp: ntp-boston.example.com
backup: backup-boston.example.com

```
 If necessary, you can define specific hardware variance in systems in a host\_vars file:

 
```
---
# file: host_vars/db-bos-1.example.com
foo_agent_port: 86
bar_agent_port: 99

```
 Again, if you are using [dynamic inventory](intro_dynamic_inventory#dynamic-inventory), Ansible creates many dynamic groups automatically. So a tag like “class:webserver” would load in variables from the file “group\_vars/ec2\_tag\_class\_webserver” automatically.

 Sample playbooks organized by function
--------------------------------------

 With this setup, a single playbook can define all the infrastructure. The site.yml playbook imports two other playbooks, one for the webservers and one for the database servers:

 
```
---
# file: site.yml
- import_playbook: webservers.yml
- import_playbook: dbservers.yml

```
 The webservers.yml file, also at the top level, maps the configuration of the webservers group to the roles related to the webservers group:

 
```
---
# file: webservers.yml
- hosts: webservers
  roles:
    - common
    - webtier

```
 With this setup, you can configure your whole infrastructure by “running” site.yml, or run a subset by running webservers.yml. This is analogous to the Ansible “–limit” parameter but a little more explicit:

 
```
ansible-playbook site.yml --limit webservers
ansible-playbook webservers.yml

```
 Sample task and handler files in a function-based role
------------------------------------------------------

 Ansible loads any file called `main.yml` in a role sub-directory. This sample `tasks/main.yml` file is simple - it sets up NTP, but it could do more if we wanted:

 
```
---
# file: roles/common/tasks/main.yml

- name: be sure ntp is installed
  yum:
    name: ntp
    state: present
  tags: ntp

- name: be sure ntp is configured
  template:
    src: ntp.conf.j2
    dest: /etc/ntp.conf
  notify:
    - restart ntpd
  tags: ntp

- name: be sure ntpd is running and enabled
  service:
    name: ntpd
    state: started
    enabled: yes
  tags: ntp

```
 Here is an example handlers file. As a review, handlers are only fired when certain tasks report changes, and are run at the end of each play:

 
```
---
# file: roles/common/handlers/main.yml
- name: restart ntpd
  service:
    name: ntpd
    state: restarted

```
 See [Roles](playbooks_reuse_roles#playbooks-reuse-roles) for more information.

 What the sample setup enables
-----------------------------

 The basic organizational structure described above enables a lot of different automation options. To reconfigure your entire infrastructure:

 
```
ansible-playbook -i production site.yml

```
 To reconfigure NTP on everything:

 
```
ansible-playbook -i production site.yml --tags ntp

```
 To reconfigure only the webservers:

 
```
ansible-playbook -i production webservers.yml

```
 To reconfigure only the webservers in Boston:

 
```
ansible-playbook -i production webservers.yml --limit boston

```
 To reconfigure only the first 10 webservers in Boston, and then the next 10:

 
```
ansible-playbook -i production webservers.yml --limit boston[0:9]
ansible-playbook -i production webservers.yml --limit boston[10:19]

```
 The sample setup also supports basic ad hoc commands:

 
```
ansible boston -i production -m ping
ansible boston -i production -m command -a '/sbin/reboot'

```
 To discover what tasks would run or what hostnames would be affected by a particular Ansible command:

 
```
# confirm what task names would be run if I ran this command and said "just ntp tasks"
ansible-playbook -i production webservers.yml --tags ntp --list-tasks

# confirm what hostnames might be communicated with if I said "limit to boston"
ansible-playbook -i production webservers.yml --limit boston --list-hosts

```
 Organizing for deployment or configuration
------------------------------------------

 The sample setup models a typical configuration topology. When doing multi-tier deployments, there are going to be some additional playbooks that hop between tiers to roll out an application. In this case, ‘site.yml’ may be augmented by playbooks like ‘deploy\_exampledotcom.yml’ but the general concepts still apply. Ansible allows you to deploy and configure using the same tool, so you would likely reuse groups and keep the OS configuration in separate playbooks or roles from the app deployment.

 Consider “playbooks” as a sports metaphor – you can have one set of plays to use against all your infrastructure and situational plays that you use at different times and for different purposes.

 Using local Ansible modules
---------------------------

 If a playbook has a `./library` directory relative to its YAML file, this directory can be used to add Ansible modules that will automatically be in the Ansible module path. This is a great way to keep modules that go with a playbook together. This is shown in the directory structure example at the start of this section.

  See also

  [YAML Syntax](../reference_appendices/yamlsyntax#yaml-syntax)

Learn about YAML syntax

  [Working with playbooks](playbooks#working-with-playbooks)

Review the basic playbook features

  [Collection Index](../collections/index#list-of-collections)

Browse existing collections, modules, and plugins

  [Should you develop a module?](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules.html#developing-modules)

Learn how to extend Ansible by writing your own modules

  [Patterns: targeting hosts and groups](intro_patterns#intro-patterns)

Learn about how to select hosts

  [GitHub examples directory](https://github.com/ansible/ansible-examples)

Complete playbook files from the github project source

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/sample_setup.html>

Collections in the Arista Namespace
===================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **arista** namespace.

 * [arista.eos](eos/index#plugins-in-arista-eos)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/arista/index.html>

Become Plugins
==============

 * [Enabling Become Plugins](#enabling-become-plugins)
* [Using Become Plugins](#using-become-plugins)
* [Plugin List](#plugin-list)

  New in version 2.8.

  Become plugins work to ensure that Ansible can use certain privilege escalation systems when running the basic commands to work with the target machine as well as the modules required to execute the tasks specified in the play.

 These utilities (`sudo`, `su`, `doas`, and so on) generally let you ‘become’ another user to execute a command with the permissions of that user.

 Enabling Become Plugins
-----------------------

 The become plugins shipped with Ansible are already enabled. Custom plugins can be added by placing them into a `become_plugins` directory adjacent to your play, inside a role, or by placing them in one of the become plugin directory sources configured in [ansible.cfg](../reference_appendices/config#ansible-configuration-settings).

 Using Become Plugins
--------------------

 In addition to the default configuration settings in [Ansible Configuration Settings](../reference_appendices/config#ansible-configuration-settings) or the `--become-method` command line option, you can use the `become_method` keyword in a play or, if you need to be ‘host specific’, the connection variable `ansible_become_method` to select the plugin to use.

 You can further control the settings for each plugin via other configuration options detailed in the plugin themselves (linked below).

 Plugin List
-----------

 You can use `ansible-doc -t become -l` to see the list of available plugins. Use `ansible-doc -t become <plugin name>` to see specific documentation and examples.

  See also

  [Intro to playbooks](../user_guide/playbooks_intro#about-playbooks)

An introduction to playbooks

  [Inventory Plugins](inventory#inventory-plugins)

Ansible inventory plugins

  [Callback Plugins](callback#callback-plugins)

Ansible callback plugins

  [Using filters to manipulate data](../user_guide/playbooks_filters#playbooks-filters)

Jinja2 filter plugins

  [Tests](../user_guide/playbooks_tests#playbooks-tests)

Jinja2 test plugins

  [Lookups](../user_guide/playbooks_lookups#playbooks-lookups)

Jinja2 lookup plugins

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/plugins/become.html>

Vars Plugins
============

 * [Enabling vars plugins](#enabling-vars-plugins)
* [Using vars plugins](#using-vars-plugins)
* [Plugin Lists](#plugin-lists)

 Vars plugins inject additional variable data into Ansible runs that did not come from an inventory source, playbook, or command line. Playbook constructs like ‘host\_vars’ and ‘group\_vars’ work using vars plugins.

 Vars plugins were partially implemented in Ansible 2.0 and rewritten to be fully implemented starting with Ansible 2.4.

 The [host\_group\_vars](../collections/ansible/builtin/host_group_vars_vars#host-group-vars-vars) plugin shipped with Ansible enables reading variables from [Assigning a variable to one machine: host variables](../user_guide/intro_inventory#host-variables) and [Assigning a variable to many machines: group variables](../user_guide/intro_inventory#group-variables).

 Enabling vars plugins
---------------------

 You can activate a custom vars plugin by either dropping it into a `vars_plugins` directory adjacent to your play, inside a role, or by putting it in one of the directory sources configured in [ansible.cfg](../reference_appendices/config#ansible-configuration-settings).

 Most vars plugins are disabled by default. To enable a vars plugin, set `vars_plugins_enabled` in the `defaults` section of [ansible.cfg](../reference_appendices/config#ansible-configuration-settings) or set the `ANSIBLE_VARS_ENABLED` environment variable to the list of vars plugins you want to execute. By default, the [host\_group\_vars](../collections/ansible/builtin/host_group_vars_vars#host-group-vars-vars) plugin shipped with Ansible is enabled.

 Starting in Ansible 2.10, you can use vars plugins in collections. All vars plugins in collections must be explicitly enabled and must use the fully qualified collection name in the format `namespace.collection_name.vars_plugin_name`.

 
```
[defaults]
vars_plugins_enabled = host_group_vars,namespace.collection_name.vars_plugin_name

```
 Using vars plugins
------------------

 By default, vars plugins are used on demand automatically after they are enabled.

 Starting in Ansible 2.10, vars plugins can be made to run at specific times. `ansible-inventory` does not use these settings, and always loads vars plugins.

 The global setting `RUN_VARS_PLUGINS` can be set in `ansible.cfg` using `run_vars_plugins` in the `defaults` section or by the `ANSIBLE_RUN_VARS_PLUGINS` environment variable. The default option, `demand`, runs any enabled vars plugins relative to inventory sources whenever variables are demanded by tasks. You can use the option `start` to run any enabled vars plugins relative to inventory sources after importing that inventory source instead.

 You can also control vars plugin execution on a per-plugin basis for vars plugins that support the `stage` option. To run the [host\_group\_vars](../collections/ansible/builtin/host_group_vars_vars#host-group-vars-vars) plugin after importing inventory you can add the following to [ansible.cfg](../reference_appendices/config#ansible-configuration-settings):

 
```
[vars_host_group_vars]
stage = inventory

```
 Plugin Lists
------------

 You can use `ansible-doc -t vars -l` to see the list of available plugins. Use `ansible-doc -t vars <plugin name>` to see specific plugin-specific documentation and examples.

  See also

  [Action Plugins](action#action-plugins)

Ansible Action plugins

  [Cache Plugins](cache#cache-plugins)

Ansible Cache plugins

  [Callback Plugins](callback#callback-plugins)

Ansible callback plugins

  [Connection Plugins](connection#connection-plugins)

Ansible connection plugins

  [Inventory Plugins](inventory#inventory-plugins)

Ansible inventory plugins

  [Shell Plugins](shell#shell-plugins)

Ansible Shell plugins

  [Strategy Plugins](strategy#strategy-plugins)

Ansible Strategy plugins

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/plugins/vars.html>

How to configure the VMware tools of a running virtual machine
==============================================================

 * [Introduction](#introduction)
* [Scenario requirements](#scenario-requirements)
* [How to change the upgrade policy](#how-to-change-the-upgrade-policy)


	+ [Change the upgrade policy to MANUAL](#change-the-upgrade-policy-to-manual)
	
	
		- [Result](#result)
	+ [Change the upgrade policy to UPGRADE\_AT\_POWER\_CYCLE](#change-the-upgrade-policy-to-upgrade-at-power-cycle)
	
	
		- [Result](#id1)

 Introduction
------------

 This section show you how to collection information from a running virtual machine.

 Scenario requirements
---------------------

 You’ve already followed [How to run a virtual machine](run_a_vm#vmware-rest-run-a-vm) and your virtual machine runs VMware Tools.

 How to change the upgrade policy
--------------------------------

 ### Change the upgrade policy to MANUAL

 You can adjust the VMware Tools upgrade policy with the `vcenter_vm_tools` module.

 
```
- name: Change vm-tools upgrade policy to MANUAL
  vmware.vmware_rest.vcenter_vm_tools:
    vm: '{{ test_vm1_info.id }}'
    upgrade_policy: MANUAL
  register: _result

```
 #### Result

 
```
{
    "id": null,
    "changed": true
}

```
 ### Change the upgrade policy to UPGRADE\_AT\_POWER\_CYCLE

 
```
- name: Change vm-tools upgrade policy to UPGRADE_AT_POWER_CYCLE
  vmware.vmware_rest.vcenter_vm_tools:
    vm: '{{ test_vm1_info.id }}'
    upgrade_policy: UPGRADE_AT_POWER_CYCLE
  register: _result

```
 #### Result

 
```
{
    "id": null,
    "changed": true
}

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_rest_scenarios/vm_tool_configuration.html>

Collections in the Amazon Namespace
===================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **amazon** namespace.

 * [amazon.aws](aws/index#plugins-in-amazon-aws)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/index.html>

Windows Guides
==============

 The following sections provide information on managing Windows hosts with Ansible.

 Because Windows is a non-POSIX-compliant operating system, there are differences between how Ansible interacts with them and the way Windows works. These guides will highlight some of the differences between Linux/Unix hosts and hosts running Windows.

 * [Setting up a Windows Host](windows_setup)
	+ [Host Requirements](windows_setup#host-requirements)
	+ [WinRM Setup](windows_setup#winrm-setup)
	+ [Windows SSH Setup](windows_setup#windows-ssh-setup)
* [Windows Remote Management](windows_winrm)
	+ [What is WinRM?](windows_winrm#what-is-winrm)
	+ [Authentication Options](windows_winrm#authentication-options)
	+ [Non-Administrator Accounts](windows_winrm#non-administrator-accounts)
	+ [WinRM Encryption](windows_winrm#winrm-encryption)
	+ [Inventory Options](windows_winrm#inventory-options)
	+ [IPv6 Addresses](windows_winrm#ipv6-addresses)
	+ [HTTPS Certificate Validation](windows_winrm#https-certificate-validation)
	+ [TLS 1.2 Support](windows_winrm#tls-1-2-support)
	+ [Limitations](windows_winrm#limitations)
* [Using Ansible and Windows](windows_usage)
	+ [Use Cases](windows_usage#use-cases)
	+ [Path Formatting for Windows](windows_usage#path-formatting-for-windows)
	+ [Limitations](windows_usage#limitations)
	+ [Developing Windows Modules](windows_usage#developing-windows-modules)
* [Desired State Configuration](windows_dsc)
	+ [What is Desired State Configuration?](windows_dsc#what-is-desired-state-configuration)
	+ [Host Requirements](windows_dsc#host-requirements)
	+ [Why Use DSC?](windows_dsc#why-use-dsc)
	+ [How to Use DSC?](windows_dsc#how-to-use-dsc)
	+ [Custom DSC Resources](windows_dsc#custom-dsc-resources)
	+ [Examples](windows_dsc#examples)
* [Windows performance](windows_performance)
	+ [Optimise PowerShell performance to reduce Ansible task overhead](windows_performance#optimise-powershell-performance-to-reduce-ansible-task-overhead)
	+ [Fix high-CPU-on-boot for VMs/cloud instances](windows_performance#fix-high-cpu-on-boot-for-vms-cloud-instances)
* [Windows Frequently Asked Questions](windows_faq)
	+ [Does Ansible work with Windows XP or Server 2003?](windows_faq#does-ansible-work-with-windows-xp-or-server-2003)
	+ [Are Server 2008, 2008 R2 and Windows 7 supported?](windows_faq#are-server-2008-2008-r2-and-windows-7-supported)
	+ [Can I manage Windows Nano Server with Ansible?](windows_faq#can-i-manage-windows-nano-server-with-ansible)
	+ [Can Ansible run on Windows?](windows_faq#can-ansible-run-on-windows)
	+ [Can I use SSH keys to authenticate to Windows hosts?](windows_faq#can-i-use-ssh-keys-to-authenticate-to-windows-hosts)
	+ [Why can I run a command locally that does not work under Ansible?](windows_faq#why-can-i-run-a-command-locally-that-does-not-work-under-ansible)
	+ [This program won’t install on Windows with Ansible](windows_faq#this-program-won-t-install-on-windows-with-ansible)
	+ [What Windows modules are available?](windows_faq#what-windows-modules-are-available)
	+ [Can I run Python modules on Windows hosts?](windows_faq#can-i-run-python-modules-on-windows-hosts)
	+ [Can I connect to Windows hosts over SSH?](windows_faq#can-i-connect-to-windows-hosts-over-ssh)
	+ [Why is connecting to a Windows host via SSH failing?](windows_faq#why-is-connecting-to-a-windows-host-via-ssh-failing)
	+ [Why are my credentials being rejected?](windows_faq#why-are-my-credentials-being-rejected)
	+ [Why am I getting an error SSL CERTIFICATE\_VERIFY\_FAILED?](windows_faq#why-am-i-getting-an-error-ssl-certificate-verify-failed)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/windows.html>

Collections in the Ansible Namespace
====================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **ansible** namespace.

 * [ansible.builtin](builtin/index#plugins-in-ansible-builtin)
* [ansible.netcommon](netcommon/index#plugins-in-ansible-netcommon)
* [ansible.posix](posix/index#plugins-in-ansible-posix)
* [ansible.utils](utils/index#plugins-in-ansible-utils)
* [ansible.windows](windows/index#plugins-in-ansible-windows)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/index.html>

Collections in the Awx Namespace
================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **awx** namespace.

 * [awx.awx](awx/index#plugins-in-awx-awx)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/awx/index.html>

Collections in the Check\_point Namespace
=========================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **check\_point** namespace.

 * [check\_point.mgmt](mgmt/index#plugins-in-check-point-mgmt)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/check_point/index.html>

Collections in the Cisco Namespace
==================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **cisco** namespace.

 * [cisco.aci](aci/index#plugins-in-cisco-aci)
* [cisco.asa](asa/index#plugins-in-cisco-asa)
* [cisco.intersight](intersight/index#plugins-in-cisco-intersight)
* [cisco.ios](ios/index#plugins-in-cisco-ios)
* [cisco.iosxr](iosxr/index#plugins-in-cisco-iosxr)
* [cisco.meraki](meraki/index#plugins-in-cisco-meraki)
* [cisco.mso](mso/index#plugins-in-cisco-mso)
* [cisco.nso](nso/index#plugins-in-cisco-nso)
* [cisco.nxos](nxos/index#plugins-in-cisco-nxos)
* [cisco.ucs](ucs/index#plugins-in-cisco-ucs)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/index.html>

Connection Plugins
==================

 * [`ssh` plugins](#ssh-plugins)
* [Adding connection plugins](#adding-connection-plugins)
* [Using connection plugins](#using-connection-plugins)
* [Plugin List](#plugin-list)

 Connection plugins allow Ansible to connect to the target hosts so it can execute tasks on them. Ansible ships with many connection plugins, but only one can be used per host at a time.

 By default, Ansible ships with several plugins. The most commonly used are the [paramiko SSH](https://docs.ansible.com/ansible/2.9/plugins/connection/paramiko_ssh.html#paramiko-ssh-connection "(in Ansible v2.9)"), native ssh (just called [ssh](../collections/ansible/builtin/ssh_connection#ssh-connection)), and [local](../collections/ansible/builtin/local_connection#local-connection) connection types. All of these can be used in playbooks and with **/usr/bin/ansible** to decide how you want to talk to remote machines.

 The basics of these connection types are covered in the [getting started](../user_guide/intro_getting_started#intro-getting-started) section.

 
`ssh` plugins
--------------

 Because ssh is the default protocol used in system administration and the protocol most used in Ansible, ssh options are included in the command line tools. See [ansible-playbook](../cli/ansible-playbook#ansible-playbook) for more details.

 Adding connection plugins
-------------------------

 You can extend Ansible to support other transports (such as SNMP or message bus) by dropping a custom plugin into the `connection_plugins` directory.

 Using connection plugins
------------------------

 You can set the connection plugin globally via [configuration](../reference_appendices/config#ansible-configuration-settings), at the command line (`-c`, `--connection`), as a [keyword](../reference_appendices/playbooks_keywords#playbook-keywords) in your play, or by setting a [variable](../user_guide/intro_inventory#behavioral-parameters), most often in your inventory. For example, for Windows machines you might want to set the [winrm](../collections/ansible/builtin/winrm_connection#winrm-connection) plugin as an inventory variable.

 Most connection plugins can operate with minimal configuration. By default they use the [inventory hostname](../collections/ansible/builtin/inventory_hostnames_lookup#inventory-hostnames-lookup) and defaults to find the target host.

 Plugins are self-documenting. Each plugin should document its configuration options. The following are connection variables common to most connection plugins:

  [ansible\_host](../user_guide/playbooks_vars_facts#magic-variables-and-hostvars)

The name of the host to connect to, if different from the [inventory](../user_guide/intro_inventory#intro-inventory) hostname.

  [ansible\_port](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#faq-setting-users-and-ports)

The ssh port number, for [ssh](../collections/ansible/builtin/ssh_connection#ssh-connection) and [paramiko\_ssh](https://docs.ansible.com/ansible/2.9/plugins/connection/paramiko_ssh.html#paramiko-ssh-connection "(in Ansible v2.9)") it defaults to 22.

  [ansible\_user](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#faq-setting-users-and-ports)

The default user name to use for log in. Most plugins default to the ‘current user running Ansible’.

   Each plugin might also have a specific version of a variable that overrides the general version. For example, `ansible_ssh_host` for the [ssh](../collections/ansible/builtin/ssh_connection#ssh-connection) plugin.

 Plugin List
-----------

 You can use `ansible-doc -t connection -l` to see the list of available plugins. Use `ansible-doc -t connection <plugin name>` to see detailed documentation and examples.

  See also

  [Working with Playbooks](../user_guide/playbooks#working-with-playbooks)

An introduction to playbooks

  [Callback Plugins](callback#callback-plugins)

Ansible callback plugins

  [Filters](../user_guide/playbooks_filters#playbooks-filters)

Jinja2 filter plugins

  [Tests](../user_guide/playbooks_tests#playbooks-tests)

Jinja2 test plugins

  [Lookups](../user_guide/playbooks_lookups#playbooks-lookups)

Jinja2 lookup plugins

  [Vars Plugins](vars#vars-plugins)

Ansible vars plugins

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/plugins/connection.html>

Collections in the Community Namespace
======================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **community** namespace.

 * [community.aws](aws/index#plugins-in-community-aws)
* [community.azure](azure/index#plugins-in-community-azure)
* [community.crypto](crypto/index#plugins-in-community-crypto)
* [community.digitalocean](digitalocean/index#plugins-in-community-digitalocean)
* [community.docker](docker/index#plugins-in-community-docker)
* [community.fortios](fortios/index#plugins-in-community-fortios)
* [community.general](general/index#plugins-in-community-general)
* [community.google](google/index#plugins-in-community-google)
* [community.grafana](grafana/index#plugins-in-community-grafana)
* [community.hashi\_vault](hashi_vault/index#plugins-in-community-hashi-vault)
* [community.hrobot](hrobot/index#plugins-in-community-hrobot)
* [community.kubernetes](kubernetes/index#plugins-in-community-kubernetes)
* [community.kubevirt](kubevirt/index#plugins-in-community-kubevirt)
* [community.libvirt](libvirt/index#plugins-in-community-libvirt)
* [community.mongodb](mongodb/index#plugins-in-community-mongodb)
* [community.mysql](mysql/index#plugins-in-community-mysql)
* [community.network](network/index#plugins-in-community-network)
* [community.okd](okd/index#plugins-in-community-okd)
* [community.postgresql](postgresql/index#plugins-in-community-postgresql)
* [community.proxysql](proxysql/index#plugins-in-community-proxysql)
* [community.rabbitmq](rabbitmq/index#plugins-in-community-rabbitmq)
* [community.routeros](routeros/index#plugins-in-community-routeros)
* [community.skydive](skydive/index#plugins-in-community-skydive)
* [community.sops](sops/index#plugins-in-community-sops)
* [community.vmware](vmware/index#plugins-in-community-vmware)
* [community.windows](windows/index#plugins-in-community-windows)
* [community.zabbix](zabbix/index#plugins-in-community-zabbix)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/index.html>

Collections in the Chocolatey Namespace
=======================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **chocolatey** namespace.

 * [chocolatey.chocolatey](chocolatey/index#plugins-in-chocolatey-chocolatey)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/chocolatey/index.html>

Collections in the Cloudscale\_ch Namespace
===========================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **cloudscale\_ch** namespace.

 * [cloudscale\_ch.cloud](cloud/index#plugins-in-cloudscale-ch-cloud)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cloudscale_ch/index.html>

Collections in the Cyberark Namespace
=====================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **cyberark** namespace.

 * [cyberark.conjur](conjur/index#plugins-in-cyberark-conjur)
* [cyberark.pas](pas/index#plugins-in-cyberark-pas)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cyberark/index.html>

Collections in the Frr Namespace
================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **frr** namespace.

 * [frr.frr](frr/index#plugins-in-frr-frr)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/frr/index.html>

Collections in the Azure Namespace
==================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **azure** namespace.

 * [azure.azcollection](azcollection/index#plugins-in-azure-azcollection)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/azure/index.html>

Collections in the Containers Namespace
=======================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **containers** namespace.

 * [containers.podman](podman/index#plugins-in-containers-podman)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/containers/index.html>

Collections in the Dellemc Namespace
====================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **dellemc** namespace.

 * [dellemc.enterprise\_sonic](enterprise_sonic/index#plugins-in-dellemc-enterprise-sonic)
* [dellemc.openmanage](openmanage/index#plugins-in-dellemc-openmanage)
* [dellemc.os10](os10/index#plugins-in-dellemc-os10)
* [dellemc.os6](os6/index#plugins-in-dellemc-os6)
* [dellemc.os9](os9/index#plugins-in-dellemc-os9)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/dellemc/index.html>

Collections in the Fortinet Namespace
=====================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **fortinet** namespace.

 * [fortinet.fortimanager](fortimanager/index#plugins-in-fortinet-fortimanager)
* [fortinet.fortios](fortios/index#plugins-in-fortinet-fortios)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/fortinet/index.html>

Collections in the F5networks Namespace
=======================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **f5networks** namespace.

 * [f5networks.f5\_modules](f5_modules/index#plugins-in-f5networks-f5-modules)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/f5networks/index.html>

Collections in the Google Namespace
===================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **google** namespace.

 * [google.cloud](cloud/index#plugins-in-google-cloud)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/google/index.html>

Collections in the Inspur Namespace
===================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **inspur** namespace.

 * [inspur.sm](sm/index#plugins-in-inspur-sm)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/inspur/index.html>

Collections in the Hetzner Namespace
====================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **hetzner** namespace.

 * [hetzner.hcloud](hcloud/index#plugins-in-hetzner-hcloud)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/hetzner/index.html>

Collections in the Netapp Namespace
===================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **netapp** namespace.

 * [netapp.aws](aws/index#plugins-in-netapp-aws)
* [netapp.azure](azure/index#plugins-in-netapp-azure)
* [netapp.cloudmanager](cloudmanager/index#plugins-in-netapp-cloudmanager)
* [netapp.elementsw](elementsw/index#plugins-in-netapp-elementsw)
* [netapp.ontap](ontap/index#plugins-in-netapp-ontap)
* [netapp.um\_info](um_info/index#plugins-in-netapp-um-info)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/netapp/index.html>

Collections in the Hpe Namespace
================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **hpe** namespace.

 * [hpe.nimble](nimble/index#plugins-in-hpe-nimble)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/hpe/index.html>

Collections in the Gluster Namespace
====================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **gluster** namespace.

 * [gluster.gluster](gluster/index#plugins-in-gluster-gluster)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/gluster/index.html>

Collections in the Netapp\_eseries Namespace
============================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **netapp\_eseries** namespace.

 * [netapp\_eseries.santricity](santricity/index#plugins-in-netapp-eseries-santricity)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/netapp_eseries/index.html>

Collections in the Ibm Namespace
================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **ibm** namespace.

 * [ibm.qradar](qradar/index#plugins-in-ibm-qradar)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ibm/index.html>

Collections in the Infinidat Namespace
======================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **infinidat** namespace.

 * [infinidat.infinibox](infinibox/index#plugins-in-infinidat-infinibox)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/infinidat/index.html>

Collections in the Junipernetworks Namespace
============================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **junipernetworks** namespace.

 * [junipernetworks.junos](junos/index#plugins-in-junipernetworks-junos)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/junipernetworks/index.html>

Collections in the Kubernetes Namespace
=======================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **kubernetes** namespace.

 * [kubernetes.core](core/index#plugins-in-kubernetes-core)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/kubernetes/index.html>

Collections in the Mellanox Namespace
=====================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **mellanox** namespace.

 * [mellanox.onyx](onyx/index#plugins-in-mellanox-onyx)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/mellanox/index.html>

Collections in the Openstack Namespace
======================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **openstack** namespace.

 * [openstack.cloud](cloud/index#plugins-in-openstack-cloud)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/openstack/index.html>

Collections in the Netbox Namespace
===================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **netbox** namespace.

 * [netbox.netbox](netbox/index#plugins-in-netbox-netbox)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/netbox/index.html>

Collections in the Ngine\_io Namespace
======================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **ngine\_io** namespace.

 * [ngine\_io.cloudstack](cloudstack/index#plugins-in-ngine-io-cloudstack)
* [ngine\_io.exoscale](exoscale/index#plugins-in-ngine-io-exoscale)
* [ngine\_io.vultr](vultr/index#plugins-in-ngine-io-vultr)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ngine_io/index.html>

Collections in the Ovirt Namespace
==================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **ovirt** namespace.

 * [ovirt.ovirt](ovirt/index#plugins-in-ovirt-ovirt)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ovirt/index.html>

Collections in the Purestorage Namespace
========================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **purestorage** namespace.

 * [purestorage.flasharray](flasharray/index#plugins-in-purestorage-flasharray)
* [purestorage.flashblade](flashblade/index#plugins-in-purestorage-flashblade)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/purestorage/index.html>

Collections in the Splunk Namespace
===================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **splunk** namespace.

 * [splunk.es](es/index#plugins-in-splunk-es)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/splunk/index.html>

Collections in the Sensu Namespace
==================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **sensu** namespace.

 * [sensu.sensu\_go](sensu_go/index#plugins-in-sensu-sensu-go)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/sensu/index.html>

Amazon.Aws
==========

 Collection version 1.5.1

 Plugin Index
------------

 These are the plugins in the amazon.aws collection

 ### Callback Plugins

 * [aws\_resource\_actions](aws_resource_actions_callback#ansible-collections-amazon-aws-aws-resource-actions-callback) – summarizes all “resource:actions” completed

 ### Inventory Plugins

 * [aws\_ec2](aws_ec2_inventory#ansible-collections-amazon-aws-aws-ec2-inventory) – EC2 inventory source
* [aws\_rds](aws_rds_inventory#ansible-collections-amazon-aws-aws-rds-inventory) – rds instance source

 ### Lookup Plugins

 * [aws\_account\_attribute](aws_account_attribute_lookup#ansible-collections-amazon-aws-aws-account-attribute-lookup) – Look up AWS account attributes.
* [aws\_secret](aws_secret_lookup#ansible-collections-amazon-aws-aws-secret-lookup) – Look up secrets stored in AWS Secrets Manager.
* [aws\_service\_ip\_ranges](aws_service_ip_ranges_lookup#ansible-collections-amazon-aws-aws-service-ip-ranges-lookup) – Look up the IP ranges for services provided in AWS such as EC2 and S3.
* [aws\_ssm](aws_ssm_lookup#ansible-collections-amazon-aws-aws-ssm-lookup) – Get the value for a SSM parameter or all parameters under a path.

 ### Modules

 * [aws\_az\_info](aws_az_info_module#ansible-collections-amazon-aws-aws-az-info-module) – Gather information about availability zones in AWS.
* [aws\_caller\_info](aws_caller_info_module#ansible-collections-amazon-aws-aws-caller-info-module) – Get information about the user and account being used to make AWS calls.
* [aws\_s3](aws_s3_module#ansible-collections-amazon-aws-aws-s3-module) – manage objects in S3.
* [cloudformation](cloudformation_module#ansible-collections-amazon-aws-cloudformation-module) – Create or delete an AWS CloudFormation stack
* [cloudformation\_info](cloudformation_info_module#ansible-collections-amazon-aws-cloudformation-info-module) – Obtain information about an AWS CloudFormation stack
* [ec2](ec2_module#ansible-collections-amazon-aws-ec2-module) – create, terminate, start or stop an instance in ec2
* [ec2\_ami](ec2_ami_module#ansible-collections-amazon-aws-ec2-ami-module) – Create or destroy an image (AMI) in ec2
* [ec2\_ami\_info](ec2_ami_info_module#ansible-collections-amazon-aws-ec2-ami-info-module) – Gather information about ec2 AMIs
* [ec2\_elb\_lb](ec2_elb_lb_module#ansible-collections-amazon-aws-ec2-elb-lb-module) – Creates, updates or destroys an Amazon ELB.
* [ec2\_eni](ec2_eni_module#ansible-collections-amazon-aws-ec2-eni-module) – Create and optionally attach an Elastic Network Interface (ENI) to an instance
* [ec2\_eni\_info](ec2_eni_info_module#ansible-collections-amazon-aws-ec2-eni-info-module) – Gather information about ec2 ENI interfaces in AWS
* [ec2\_group](ec2_group_module#ansible-collections-amazon-aws-ec2-group-module) – maintain an ec2 VPC security group.
* [ec2\_group\_info](ec2_group_info_module#ansible-collections-amazon-aws-ec2-group-info-module) – Gather information about ec2 security groups in AWS.
* [ec2\_key](ec2_key_module#ansible-collections-amazon-aws-ec2-key-module) – create or delete an ec2 key pair
* [ec2\_metadata\_facts](ec2_metadata_facts_module#ansible-collections-amazon-aws-ec2-metadata-facts-module) – gathers facts (instance metadata) about remote hosts within EC2
* [ec2\_snapshot](ec2_snapshot_module#ansible-collections-amazon-aws-ec2-snapshot-module) – Creates a snapshot from an existing volume
* [ec2\_snapshot\_info](ec2_snapshot_info_module#ansible-collections-amazon-aws-ec2-snapshot-info-module) – Gather information about ec2 volume snapshots in AWS
* [ec2\_tag](ec2_tag_module#ansible-collections-amazon-aws-ec2-tag-module) – create and remove tags on ec2 resources
* [ec2\_tag\_info](ec2_tag_info_module#ansible-collections-amazon-aws-ec2-tag-info-module) – list tags on ec2 resources
* [ec2\_vol](ec2_vol_module#ansible-collections-amazon-aws-ec2-vol-module) – Create and attach a volume, return volume id and device map
* [ec2\_vol\_info](ec2_vol_info_module#ansible-collections-amazon-aws-ec2-vol-info-module) – Gather information about ec2 volumes in AWS
* [ec2\_vpc\_dhcp\_option](ec2_vpc_dhcp_option_module#ansible-collections-amazon-aws-ec2-vpc-dhcp-option-module) – Manages DHCP Options, and can ensure the DHCP options for the given VPC match what’s requested
* [ec2\_vpc\_dhcp\_option\_info](ec2_vpc_dhcp_option_info_module#ansible-collections-amazon-aws-ec2-vpc-dhcp-option-info-module) – Gather information about dhcp options sets in AWS
* [ec2\_vpc\_net](ec2_vpc_net_module#ansible-collections-amazon-aws-ec2-vpc-net-module) – Configure AWS virtual private clouds
* [ec2\_vpc\_net\_info](ec2_vpc_net_info_module#ansible-collections-amazon-aws-ec2-vpc-net-info-module) – Gather information about ec2 VPCs in AWS
* [ec2\_vpc\_subnet](ec2_vpc_subnet_module#ansible-collections-amazon-aws-ec2-vpc-subnet-module) – Manage subnets in AWS virtual private clouds
* [ec2\_vpc\_subnet\_info](ec2_vpc_subnet_info_module#ansible-collections-amazon-aws-ec2-vpc-subnet-info-module) – Gather information about ec2 VPC subnets in AWS
* [s3\_bucket](s3_bucket_module#ansible-collections-amazon-aws-s3-bucket-module) – Manage S3 buckets in AWS, DigitalOcean, Ceph, Walrus, FakeS3 and StorageGRID

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/index.html>

Ansible.Netcommon
=================

 Collection version 2.4.0

 Plugin Index
------------

 These are the plugins in the ansible.netcommon collection

 ### Become Plugins

 * [enable](enable_become#ansible-collections-ansible-netcommon-enable-become) – Switch to elevated permissions on a network device

 ### Cache Plugins

 * [memory](memory_cache#ansible-collections-ansible-netcommon-memory-cache) – RAM backed, non persistent cache.

 ### Connection Plugins

 * [httpapi](httpapi_connection#ansible-collections-ansible-netcommon-httpapi-connection) – Use httpapi to run command on network appliances
* [libssh](libssh_connection#ansible-collections-ansible-netcommon-libssh-connection) – (Tech preview) Run tasks using libssh for ssh connection
* [napalm](napalm_connection#ansible-collections-ansible-netcommon-napalm-connection) – Provides persistent connection using NAPALM
* [netconf](netconf_connection#ansible-collections-ansible-netcommon-netconf-connection) – Provides a persistent connection using the netconf protocol
* [network\_cli](network_cli_connection#ansible-collections-ansible-netcommon-network-cli-connection) – Use network\_cli to run command on network appliances
* [persistent](persistent_connection#ansible-collections-ansible-netcommon-persistent-connection) – Use a persistent unix socket for connection

 ### Httpapi Plugins

 * [restconf](restconf_httpapi#ansible-collections-ansible-netcommon-restconf-httpapi) – HttpApi Plugin for devices supporting Restconf API

 ### Modules

 * [cli\_command](cli_command_module#ansible-collections-ansible-netcommon-cli-command-module) – Run a cli command on cli-based network devices
* [cli\_config](cli_config_module#ansible-collections-ansible-netcommon-cli-config-module) – Push text based configuration to network devices over network\_cli
* [cli\_parse](cli_parse_module#ansible-collections-ansible-netcommon-cli-parse-module) – Parse cli output or text using a variety of parsers
* [net\_banner](net_banner_module#ansible-collections-ansible-netcommon-net-banner-module) – (deprecated, removed after 2022-06-01) Manage multiline banners on network devices
* [net\_get](net_get_module#ansible-collections-ansible-netcommon-net-get-module) – Copy a file from a network device to Ansible Controller
* [net\_interface](net_interface_module#ansible-collections-ansible-netcommon-net-interface-module) – (deprecated, removed after 2022-06-01) Manage Interface on network devices
* [net\_l2\_interface](net_l2_interface_module#ansible-collections-ansible-netcommon-net-l2-interface-module) – (deprecated, removed after 2022-06-01) Manage Layer-2 interface on network devices
* [net\_l3\_interface](net_l3_interface_module#ansible-collections-ansible-netcommon-net-l3-interface-module) – (deprecated, removed after 2022-06-01) Manage L3 interfaces on network devices
* [net\_linkagg](net_linkagg_module#ansible-collections-ansible-netcommon-net-linkagg-module) – (deprecated, removed after 2022-06-01) Manage link aggregation groups on network devices
* [net\_lldp](net_lldp_module#ansible-collections-ansible-netcommon-net-lldp-module) – (deprecated, removed after 2022-06-01) Manage LLDP service configuration on network devices
* [net\_lldp\_interface](net_lldp_interface_module#ansible-collections-ansible-netcommon-net-lldp-interface-module) – (deprecated, removed after 2022-06-01) Manage LLDP interfaces configuration on network devices
* [net\_logging](net_logging_module#ansible-collections-ansible-netcommon-net-logging-module) – (deprecated, removed after 2022-06-01) Manage logging on network devices
* [net\_ping](net_ping_module#ansible-collections-ansible-netcommon-net-ping-module) – Tests reachability using ping from a network device
* [net\_put](net_put_module#ansible-collections-ansible-netcommon-net-put-module) – Copy a file from Ansible Controller to a network device
* [net\_static\_route](net_static_route_module#ansible-collections-ansible-netcommon-net-static-route-module) – (deprecated, removed after 2022-06-01) Manage static IP routes on network appliances (routers, switches et. al.)
* [net\_system](net_system_module#ansible-collections-ansible-netcommon-net-system-module) – (deprecated, removed after 2022-06-01) Manage the system attributes on network devices
* [net\_user](net_user_module#ansible-collections-ansible-netcommon-net-user-module) – (deprecated, removed after 2022-06-01) Manage the aggregate of local users on network device
* [net\_vlan](net_vlan_module#ansible-collections-ansible-netcommon-net-vlan-module) – (deprecated, removed after 2022-06-01) Manage VLANs on network devices
* [net\_vrf](net_vrf_module#ansible-collections-ansible-netcommon-net-vrf-module) – (deprecated, removed after 2022-06-01) Manage VRFs on network devices
* [netconf\_config](netconf_config_module#ansible-collections-ansible-netcommon-netconf-config-module) – netconf device configuration
* [netconf\_get](netconf_get_module#ansible-collections-ansible-netcommon-netconf-get-module) – Fetch configuration/state data from NETCONF enabled network devices.
* [netconf\_rpc](netconf_rpc_module#ansible-collections-ansible-netcommon-netconf-rpc-module) – Execute operations on NETCONF enabled network devices.
* [network\_resource](network_resource_module#ansible-collections-ansible-netcommon-network-resource-module) – Manage resource modules
* [restconf\_config](restconf_config_module#ansible-collections-ansible-netcommon-restconf-config-module) – Handles create, update, read and delete of configuration data on RESTCONF enabled devices.
* [restconf\_get](restconf_get_module#ansible-collections-ansible-netcommon-restconf-get-module) – Fetch configuration/state data from RESTCONF enabled devices.
* [telnet](telnet_module#ansible-collections-ansible-netcommon-telnet-module) – Executes a low-down and dirty telnet command

 ### Netconf Plugins

 * [default](default_netconf#ansible-collections-ansible-netcommon-default-netconf) – Use default netconf plugin to run standard netconf commands as per RFC

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/index.html>

Collections in the Openvswitch Namespace
========================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **openvswitch** namespace.

 * [openvswitch.openvswitch](openvswitch/index#plugins-in-openvswitch-openvswitch)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/openvswitch/index.html>

Collections in the T\_systems\_mms Namespace
============================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **t\_systems\_mms** namespace.

 * [t\_systems\_mms.icinga\_director](icinga_director/index#plugins-in-t-systems-mms-icinga-director)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/t_systems_mms/index.html>

Collections in the Servicenow Namespace
=======================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **servicenow** namespace.

 * [servicenow.servicenow](servicenow/index#plugins-in-servicenow-servicenow)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/servicenow/index.html>

Ansible.Windows
===============

 Collection version 1.7.3

 Plugin Index
------------

 These are the plugins in the ansible.windows collection

 ### Modules

 * [win\_acl](win_acl_module#ansible-collections-ansible-windows-win-acl-module) – Set file/directory/registry permissions for a system user or group
* [win\_acl\_inheritance](win_acl_inheritance_module#ansible-collections-ansible-windows-win-acl-inheritance-module) – Change ACL inheritance
* [win\_certificate\_store](win_certificate_store_module#ansible-collections-ansible-windows-win-certificate-store-module) – Manages the certificate store
* [win\_command](win_command_module#ansible-collections-ansible-windows-win-command-module) – Executes a command on a remote Windows node
* [win\_copy](win_copy_module#ansible-collections-ansible-windows-win-copy-module) – Copies files to remote locations on windows hosts
* [win\_dns\_client](win_dns_client_module#ansible-collections-ansible-windows-win-dns-client-module) – Configures DNS lookup on Windows hosts
* [win\_domain](win_domain_module#ansible-collections-ansible-windows-win-domain-module) – Ensures the existence of a Windows domain
* [win\_domain\_controller](win_domain_controller_module#ansible-collections-ansible-windows-win-domain-controller-module) – Manage domain controller/member server state for a Windows host
* [win\_domain\_membership](win_domain_membership_module#ansible-collections-ansible-windows-win-domain-membership-module) – Manage domain/workgroup membership for a Windows host
* [win\_dsc](win_dsc_module#ansible-collections-ansible-windows-win-dsc-module) – Invokes a PowerShell DSC configuration
* [win\_environment](win_environment_module#ansible-collections-ansible-windows-win-environment-module) – Modify environment variables on windows hosts
* [win\_feature](win_feature_module#ansible-collections-ansible-windows-win-feature-module) – Installs and uninstalls Windows Features on Windows Server
* [win\_file](win_file_module#ansible-collections-ansible-windows-win-file-module) – Creates, touches or removes files or directories
* [win\_find](win_find_module#ansible-collections-ansible-windows-win-find-module) – Return a list of files based on specific criteria
* [win\_get\_url](win_get_url_module#ansible-collections-ansible-windows-win-get-url-module) – Downloads file from HTTP, HTTPS, or FTP to node
* [win\_group](win_group_module#ansible-collections-ansible-windows-win-group-module) – Add and remove local groups
* [win\_group\_membership](win_group_membership_module#ansible-collections-ansible-windows-win-group-membership-module) – Manage Windows local group membership
* [win\_hostname](win_hostname_module#ansible-collections-ansible-windows-win-hostname-module) – Manages local Windows computer name
* [win\_optional\_feature](win_optional_feature_module#ansible-collections-ansible-windows-win-optional-feature-module) – Manage optional Windows features
* [win\_owner](win_owner_module#ansible-collections-ansible-windows-win-owner-module) – Set owner
* [win\_package](win_package_module#ansible-collections-ansible-windows-win-package-module) – Installs/uninstalls an installable package
* [win\_path](win_path_module#ansible-collections-ansible-windows-win-path-module) – Manage Windows path environment variables
* [win\_ping](win_ping_module#ansible-collections-ansible-windows-win-ping-module) – A windows version of the classic ping module
* [win\_powershell](win_powershell_module#ansible-collections-ansible-windows-win-powershell-module) – Run PowerShell scripts
* [win\_reboot](win_reboot_module#ansible-collections-ansible-windows-win-reboot-module) – Reboot a windows machine
* [win\_reg\_stat](win_reg_stat_module#ansible-collections-ansible-windows-win-reg-stat-module) – Get information about Windows registry keys
* [win\_regedit](win_regedit_module#ansible-collections-ansible-windows-win-regedit-module) – Add, change, or remove registry keys and values
* [win\_service](win_service_module#ansible-collections-ansible-windows-win-service-module) – Manage and query Windows services
* [win\_service\_info](win_service_info_module#ansible-collections-ansible-windows-win-service-info-module) – Gather information about Windows services
* [win\_share](win_share_module#ansible-collections-ansible-windows-win-share-module) – Manage Windows shares
* [win\_shell](win_shell_module#ansible-collections-ansible-windows-win-shell-module) – Execute shell commands on target hosts
* [win\_stat](win_stat_module#ansible-collections-ansible-windows-win-stat-module) – Get information about Windows files
* [win\_tempfile](win_tempfile_module#ansible-collections-ansible-windows-win-tempfile-module) – Creates temporary files and directories
* [win\_template](win_template_module#ansible-collections-ansible-windows-win-template-module) – Template a file out to a remote server
* [win\_updates](win_updates_module#ansible-collections-ansible-windows-win-updates-module) – Download and install Windows updates
* [win\_uri](win_uri_module#ansible-collections-ansible-windows-win-uri-module) – Interacts with webservices
* [win\_user](win_user_module#ansible-collections-ansible-windows-win-user-module) – Manages local Windows user accounts
* [win\_user\_right](win_user_right_module#ansible-collections-ansible-windows-win-user-right-module) – Manage Windows User Rights
* [win\_wait\_for](win_wait_for_module#ansible-collections-ansible-windows-win-wait-for-module) – Waits for a condition before continuing
* [win\_whoami](win_whoami_module#ansible-collections-ansible-windows-win-whoami-module) – Get information about the current user and process

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/index.html>

Arista.Eos
==========

 Collection version 2.2.0

 Plugin Index
------------

 These are the plugins in the arista.eos collection

 ### Cliconf Plugins

 * [eos](eos_cliconf#ansible-collections-arista-eos-eos-cliconf) – Use eos cliconf to run command on Arista EOS platform

 ### Httpapi Plugins

 * [eos](eos_httpapi#ansible-collections-arista-eos-eos-httpapi) – Use eAPI to run command on eos platform

 ### Modules

 * [eos\_acl\_interfaces](eos_acl_interfaces_module#ansible-collections-arista-eos-eos-acl-interfaces-module) – ACL interfaces resource module
* [eos\_acls](eos_acls_module#ansible-collections-arista-eos-eos-acls-module) – ACLs resource module
* [eos\_banner](eos_banner_module#ansible-collections-arista-eos-eos-banner-module) – Manage multiline banners on Arista EOS devices
* [eos\_bgp](eos_bgp_module#ansible-collections-arista-eos-eos-bgp-module) – (deprecated, removed after 2023-01-29) Configure global BGP protocol settings on Arista EOS.
* [eos\_bgp\_address\_family](eos_bgp_address_family_module#ansible-collections-arista-eos-eos-bgp-address-family-module) – Manages BGP address family resource module
* [eos\_bgp\_global](eos_bgp_global_module#ansible-collections-arista-eos-eos-bgp-global-module) – Manages BGP global resource module
* [eos\_command](eos_command_module#ansible-collections-arista-eos-eos-command-module) – Run arbitrary commands on an Arista EOS device
* [eos\_config](eos_config_module#ansible-collections-arista-eos-eos-config-module) – Manage Arista EOS configuration sections
* [eos\_eapi](eos_eapi_module#ansible-collections-arista-eos-eos-eapi-module) – Manage and configure Arista EOS eAPI.
* [eos\_facts](eos_facts_module#ansible-collections-arista-eos-eos-facts-module) – Collect facts from remote devices running Arista EOS
* [eos\_interface](eos_interface_module#ansible-collections-arista-eos-eos-interface-module) – (deprecated, removed after 2022-06-01) Manage Interface on Arista EOS network devices
* [eos\_interfaces](eos_interfaces_module#ansible-collections-arista-eos-eos-interfaces-module) – Interfaces resource module
* [eos\_l2\_interface](eos_l2_interface_module#ansible-collections-arista-eos-eos-l2-interface-module) – (deprecated, removed after 2022-06-01) Manage L2 interfaces on Arista EOS network devices.
* [eos\_l2\_interfaces](eos_l2_interfaces_module#ansible-collections-arista-eos-eos-l2-interfaces-module) – L2 interfaces resource module
* [eos\_l3\_interface](eos_l3_interface_module#ansible-collections-arista-eos-eos-l3-interface-module) – (deprecated, removed after 2022-06-01) Manage L3 interfaces on Arista EOS network devices.
* [eos\_l3\_interfaces](eos_l3_interfaces_module#ansible-collections-arista-eos-eos-l3-interfaces-module) – L3 interfaces resource module
* [eos\_lacp](eos_lacp_module#ansible-collections-arista-eos-eos-lacp-module) – LACP resource module
* [eos\_lacp\_interfaces](eos_lacp_interfaces_module#ansible-collections-arista-eos-eos-lacp-interfaces-module) – LACP interfaces resource module
* [eos\_lag\_interfaces](eos_lag_interfaces_module#ansible-collections-arista-eos-eos-lag-interfaces-module) – LAG interfaces resource module
* [eos\_linkagg](eos_linkagg_module#ansible-collections-arista-eos-eos-linkagg-module) – (deprecated, removed after 2022-06-01) Manage link aggregation groups on Arista EOS network devices
* [eos\_lldp](eos_lldp_module#ansible-collections-arista-eos-eos-lldp-module) – Manage LLDP configuration on Arista EOS network devices
* [eos\_lldp\_global](eos_lldp_global_module#ansible-collections-arista-eos-eos-lldp-global-module) – LLDP resource module
* [eos\_lldp\_interfaces](eos_lldp_interfaces_module#ansible-collections-arista-eos-eos-lldp-interfaces-module) – LLDP interfaces resource module
* [eos\_logging](eos_logging_module#ansible-collections-arista-eos-eos-logging-module) – Manage logging on network devices
* [eos\_ospf\_interfaces](eos_ospf_interfaces_module#ansible-collections-arista-eos-eos-ospf-interfaces-module) – OSPF Interfaces Resource Module.
* [eos\_ospfv2](eos_ospfv2_module#ansible-collections-arista-eos-eos-ospfv2-module) – OSPFv2 resource module
* [eos\_ospfv3](eos_ospfv3_module#ansible-collections-arista-eos-eos-ospfv3-module) – OSPFv3 resource module
* [eos\_prefix\_lists](eos_prefix_lists_module#ansible-collections-arista-eos-eos-prefix-lists-module) – Manages Prefix lists resource module
* [eos\_route\_maps](eos_route_maps_module#ansible-collections-arista-eos-eos-route-maps-module) – Manages Route Maps resource module
* [eos\_static\_route](eos_static_route_module#ansible-collections-arista-eos-eos-static-route-module) – (deprecated, removed after 2022-06-01) Manage static IP routes on Arista EOS network devices
* [eos\_static\_routes](eos_static_routes_module#ansible-collections-arista-eos-eos-static-routes-module) – Static routes resource module
* [eos\_system](eos_system_module#ansible-collections-arista-eos-eos-system-module) – Manage the system attributes on Arista EOS devices
* [eos\_user](eos_user_module#ansible-collections-arista-eos-eos-user-module) – Manage the collection of local users on EOS devices
* [eos\_vlan](eos_vlan_module#ansible-collections-arista-eos-eos-vlan-module) – (deprecated, removed after 2022-06-01) Manage VLANs on Arista EOS network devices
* [eos\_vlans](eos_vlans_module#ansible-collections-arista-eos-eos-vlans-module) – VLANs resource module
* [eos\_vrf](eos_vrf_module#ansible-collections-arista-eos-eos-vrf-module) – Manage VRFs on Arista EOS network devices

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/arista/eos/index.html>

Collections in the Wti Namespace
================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **wti** namespace.

 * [wti.remote](remote/index#plugins-in-wti-remote)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/wti/index.html>

Ansible.Posix
=============

 Collection version 1.3.0

 Plugin Index
------------

 These are the plugins in the ansible.posix collection

 ### Callback Plugins

 * [cgroup\_perf\_recap](cgroup_perf_recap_callback#ansible-collections-ansible-posix-cgroup-perf-recap-callback) – Profiles system activity of tasks and full execution using cgroups
* [debug](debug_callback#ansible-collections-ansible-posix-debug-callback) – formatted stdout/stderr display
* [json](json_callback#ansible-collections-ansible-posix-json-callback) – Ansible screen output as JSON
* [profile\_roles](profile_roles_callback#ansible-collections-ansible-posix-profile-roles-callback) – adds timing information to roles
* [profile\_tasks](profile_tasks_callback#ansible-collections-ansible-posix-profile-tasks-callback) – adds time information to tasks
* [skippy](skippy_callback#ansible-collections-ansible-posix-skippy-callback) – Ansible screen output that ignores skipped status
* [timer](timer_callback#ansible-collections-ansible-posix-timer-callback) – Adds time to play stats

 ### Modules

 * [acl](acl_module#ansible-collections-ansible-posix-acl-module) – Set and retrieve file ACL information.
* [at](at_module#ansible-collections-ansible-posix-at-module) – Schedule the execution of a command or script file via the at command
* [authorized\_key](authorized_key_module#ansible-collections-ansible-posix-authorized-key-module) – Adds or removes an SSH authorized key
* [firewalld](firewalld_module#ansible-collections-ansible-posix-firewalld-module) – Manage arbitrary ports/services with firewalld
* [firewalld\_info](firewalld_info_module#ansible-collections-ansible-posix-firewalld-info-module) – Gather information about firewalld
* [mount](mount_module#ansible-collections-ansible-posix-mount-module) – Control active and configured mount points
* [patch](patch_module#ansible-collections-ansible-posix-patch-module) – Apply patch files using the GNU patch tool
* [seboolean](seboolean_module#ansible-collections-ansible-posix-seboolean-module) – Toggles SELinux booleans
* [selinux](selinux_module#ansible-collections-ansible-posix-selinux-module) – Change policy and state of SELinux
* [synchronize](synchronize_module#ansible-collections-ansible-posix-synchronize-module) – A wrapper around rsync to make common tasks in your playbooks quick and easy
* [sysctl](sysctl_module#ansible-collections-ansible-posix-sysctl-module) – Manage entries in sysctl.conf.

 ### Shell Plugins

 * [csh](csh_shell#ansible-collections-ansible-posix-csh-shell) – C shell (/bin/csh)
* [fish](fish_shell#ansible-collections-ansible-posix-fish-shell) – fish shell (/bin/fish)

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/posix/index.html>

Collections in the Theforeman Namespace
=======================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **theforeman** namespace.

 * [theforeman.foreman](foreman/index#plugins-in-theforeman-foreman)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/theforeman/index.html>

Ansible.Builtin
===============

 Collection version 2.11.6.post0

 Plugin Index
------------

 These are the plugins in the ansible.builtin collection

 ### Become Plugins

 * [runas](runas_become#ansible-collections-ansible-builtin-runas-become) – Run As user
* [su](su_become#ansible-collections-ansible-builtin-su-become) – Substitute User
* [sudo](sudo_become#ansible-collections-ansible-builtin-sudo-become) – Substitute User DO

 ### Cache Plugins

 * [jsonfile](jsonfile_cache#ansible-collections-ansible-builtin-jsonfile-cache) – JSON formatted files.
* [memory](memory_cache#ansible-collections-ansible-builtin-memory-cache) – RAM backed, non persistent

 ### Callback Plugins

 * [default](default_callback#ansible-collections-ansible-builtin-default-callback) – default Ansible screen output
* [junit](junit_callback#ansible-collections-ansible-builtin-junit-callback) – write playbook output to a JUnit file.
* [minimal](minimal_callback#ansible-collections-ansible-builtin-minimal-callback) – minimal Ansible screen output
* [oneline](oneline_callback#ansible-collections-ansible-builtin-oneline-callback) – oneline Ansible screen output
* [tree](tree_callback#ansible-collections-ansible-builtin-tree-callback) – Save host events to files

 ### Connection Plugins

 * [local](local_connection#ansible-collections-ansible-builtin-local-connection) – execute on controller
* [paramiko\_ssh](paramiko_ssh_connection#ansible-collections-ansible-builtin-paramiko-ssh-connection) – Run tasks via python ssh (paramiko)
* [psrp](psrp_connection#ansible-collections-ansible-builtin-psrp-connection) – Run tasks over Microsoft PowerShell Remoting Protocol
* [ssh](ssh_connection#ansible-collections-ansible-builtin-ssh-connection) – connect via ssh client binary
* [winrm](winrm_connection#ansible-collections-ansible-builtin-winrm-connection) – Run tasks over Microsoft’s WinRM

 ### Inventory Plugins

 * [advanced\_host\_list](advanced_host_list_inventory#ansible-collections-ansible-builtin-advanced-host-list-inventory) – Parses a ‘host list’ with ranges
* [auto](auto_inventory#ansible-collections-ansible-builtin-auto-inventory) – Loads and executes an inventory plugin specified in a YAML config
* [constructed](constructed_inventory#ansible-collections-ansible-builtin-constructed-inventory) – Uses Jinja2 to construct vars and groups based on existing inventory.
* [generator](generator_inventory#ansible-collections-ansible-builtin-generator-inventory) – Uses Jinja2 to construct hosts and groups from patterns
* [host\_list](host_list_inventory#ansible-collections-ansible-builtin-host-list-inventory) – Parses a ‘host list’ string
* [ini](ini_inventory#ansible-collections-ansible-builtin-ini-inventory) – Uses an Ansible INI file as inventory source.
* [script](script_inventory#ansible-collections-ansible-builtin-script-inventory) – Executes an inventory script that returns JSON
* [toml](toml_inventory#ansible-collections-ansible-builtin-toml-inventory) – Uses a specific TOML file as an inventory source.
* [yaml](yaml_inventory#ansible-collections-ansible-builtin-yaml-inventory) – Uses a specific YAML file as an inventory source.

 ### Lookup Plugins

 * [config](config_lookup#ansible-collections-ansible-builtin-config-lookup) – Lookup current Ansible configuration values
* [csvfile](csvfile_lookup#ansible-collections-ansible-builtin-csvfile-lookup) – read data from a TSV or CSV file
* [dict](dict_lookup#ansible-collections-ansible-builtin-dict-lookup) – returns key/value pair items from dictionaries
* [env](env_lookup#ansible-collections-ansible-builtin-env-lookup) – Read the value of environment variables
* [file](file_lookup#ansible-collections-ansible-builtin-file-lookup) – read file contents
* [fileglob](fileglob_lookup#ansible-collections-ansible-builtin-fileglob-lookup) – list files matching a pattern
* [first\_found](first_found_lookup#ansible-collections-ansible-builtin-first-found-lookup) – return first file found from list
* [indexed\_items](indexed_items_lookup#ansible-collections-ansible-builtin-indexed-items-lookup) – rewrites lists to return ‘indexed items’
* [ini](ini_lookup#ansible-collections-ansible-builtin-ini-lookup) – read data from a ini file
* [inventory\_hostnames](inventory_hostnames_lookup#ansible-collections-ansible-builtin-inventory-hostnames-lookup) – list of inventory hosts matching a host pattern
* [items](items_lookup#ansible-collections-ansible-builtin-items-lookup) – list of items
* [lines](lines_lookup#ansible-collections-ansible-builtin-lines-lookup) – read lines from command
* [list](list_lookup#ansible-collections-ansible-builtin-list-lookup) – simply returns what it is given.
* [nested](nested_lookup#ansible-collections-ansible-builtin-nested-lookup) – composes a list with nested elements of other lists
* [password](password_lookup#ansible-collections-ansible-builtin-password-lookup) – retrieve or generate a random password, stored in a file
* [pipe](pipe_lookup#ansible-collections-ansible-builtin-pipe-lookup) – read output from a command
* [random\_choice](random_choice_lookup#ansible-collections-ansible-builtin-random-choice-lookup) – return random element from list
* [sequence](sequence_lookup#ansible-collections-ansible-builtin-sequence-lookup) – generate a list based on a number sequence
* [subelements](subelements_lookup#ansible-collections-ansible-builtin-subelements-lookup) – traverse nested key from a list of dictionaries
* [template](template_lookup#ansible-collections-ansible-builtin-template-lookup) – retrieve contents of file after templating with Jinja2
* [together](together_lookup#ansible-collections-ansible-builtin-together-lookup) – merges lists into synchronized list
* [unvault](unvault_lookup#ansible-collections-ansible-builtin-unvault-lookup) – read vaulted file(s) contents
* [url](url_lookup#ansible-collections-ansible-builtin-url-lookup) – return contents from URL
* [varnames](varnames_lookup#ansible-collections-ansible-builtin-varnames-lookup) – Lookup matching variable names
* [vars](vars_lookup#ansible-collections-ansible-builtin-vars-lookup) – Lookup templated value of variables

 ### Modules

 * [add\_host](add_host_module#ansible-collections-ansible-builtin-add-host-module) – Add a host (and alternatively a group) to the ansible-playbook in-memory inventory
* [apt](apt_module#ansible-collections-ansible-builtin-apt-module) – Manages apt-packages
* [apt\_key](apt_key_module#ansible-collections-ansible-builtin-apt-key-module) – Add or remove an apt key
* [apt\_repository](apt_repository_module#ansible-collections-ansible-builtin-apt-repository-module) – Add and remove APT repositories
* [assemble](assemble_module#ansible-collections-ansible-builtin-assemble-module) – Assemble configuration files from fragments
* [assert](assert_module#ansible-collections-ansible-builtin-assert-module) – Asserts given expressions are true
* [async\_status](async_status_module#ansible-collections-ansible-builtin-async-status-module) – Obtain status of asynchronous task
* [blockinfile](blockinfile_module#ansible-collections-ansible-builtin-blockinfile-module) – Insert/update/remove a text block surrounded by marker lines
* [command](command_module#ansible-collections-ansible-builtin-command-module) – Execute commands on targets
* [copy](copy_module#ansible-collections-ansible-builtin-copy-module) – Copy files to remote locations
* [cron](cron_module#ansible-collections-ansible-builtin-cron-module) – Manage cron.d and crontab entries
* [debconf](debconf_module#ansible-collections-ansible-builtin-debconf-module) – Configure a .deb package
* [debug](debug_module#ansible-collections-ansible-builtin-debug-module) – Print statements during execution
* [dnf](dnf_module#ansible-collections-ansible-builtin-dnf-module) – Manages packages with the *dnf* package manager
* [dpkg\_selections](dpkg_selections_module#ansible-collections-ansible-builtin-dpkg-selections-module) – Dpkg package selection selections
* [expect](expect_module#ansible-collections-ansible-builtin-expect-module) – Executes a command and responds to prompts
* [fail](fail_module#ansible-collections-ansible-builtin-fail-module) – Fail with custom message
* [fetch](fetch_module#ansible-collections-ansible-builtin-fetch-module) – Fetch files from remote nodes
* [file](file_module#ansible-collections-ansible-builtin-file-module) – Manage files and file properties
* [find](find_module#ansible-collections-ansible-builtin-find-module) – Return a list of files based on specific criteria
* [gather\_facts](gather_facts_module#ansible-collections-ansible-builtin-gather-facts-module) – Gathers facts about remote hosts
* [get\_url](get_url_module#ansible-collections-ansible-builtin-get-url-module) – Downloads files from HTTP, HTTPS, or FTP to node
* [getent](getent_module#ansible-collections-ansible-builtin-getent-module) – A wrapper to the unix getent utility
* [git](git_module#ansible-collections-ansible-builtin-git-module) – Deploy software (or files) from git checkouts
* [group](group_module#ansible-collections-ansible-builtin-group-module) – Add or remove groups
* [group\_by](group_by_module#ansible-collections-ansible-builtin-group-by-module) – Create Ansible groups based on facts
* [hostname](hostname_module#ansible-collections-ansible-builtin-hostname-module) – Manage hostname
* [import\_playbook](import_playbook_module#ansible-collections-ansible-builtin-import-playbook-module) – Import a playbook
* [import\_role](import_role_module#ansible-collections-ansible-builtin-import-role-module) – Import a role into a play
* [import\_tasks](import_tasks_module#ansible-collections-ansible-builtin-import-tasks-module) – Import a task list
* [include](include_module#ansible-collections-ansible-builtin-include-module) – Include a play or task list
* [include\_role](include_role_module#ansible-collections-ansible-builtin-include-role-module) – Load and execute a role
* [include\_tasks](include_tasks_module#ansible-collections-ansible-builtin-include-tasks-module) – Dynamically include a task list
* [include\_vars](include_vars_module#ansible-collections-ansible-builtin-include-vars-module) – Load variables from files, dynamically within a task
* [iptables](iptables_module#ansible-collections-ansible-builtin-iptables-module) – Modify iptables rules
* [known\_hosts](known_hosts_module#ansible-collections-ansible-builtin-known-hosts-module) – Add or remove a host from the `known_hosts` file
* [lineinfile](lineinfile_module#ansible-collections-ansible-builtin-lineinfile-module) – Manage lines in text files
* [meta](meta_module#ansible-collections-ansible-builtin-meta-module) – Execute Ansible ‘actions’
* [package](package_module#ansible-collections-ansible-builtin-package-module) – Generic OS package manager
* [package\_facts](package_facts_module#ansible-collections-ansible-builtin-package-facts-module) – Package information as facts
* [pause](pause_module#ansible-collections-ansible-builtin-pause-module) – Pause playbook execution
* [ping](ping_module#ansible-collections-ansible-builtin-ping-module) – Try to connect to host, verify a usable python and return `pong` on success
* [pip](pip_module#ansible-collections-ansible-builtin-pip-module) – Manages Python library dependencies
* [raw](raw_module#ansible-collections-ansible-builtin-raw-module) – Executes a low-down and dirty command
* [reboot](reboot_module#ansible-collections-ansible-builtin-reboot-module) – Reboot a machine
* [replace](replace_module#ansible-collections-ansible-builtin-replace-module) – Replace all instances of a particular string in a file using a back-referenced regular expression
* [rpm\_key](rpm_key_module#ansible-collections-ansible-builtin-rpm-key-module) – Adds or removes a gpg key from the rpm db
* [script](script_module#ansible-collections-ansible-builtin-script-module) – Runs a local script on a remote node after transferring it
* [service](service_module#ansible-collections-ansible-builtin-service-module) – Manage services
* [service\_facts](service_facts_module#ansible-collections-ansible-builtin-service-facts-module) – Return service state information as fact data
* [set\_fact](set_fact_module#ansible-collections-ansible-builtin-set-fact-module) – Set host variable(s) and fact(s).
* [set\_stats](set_stats_module#ansible-collections-ansible-builtin-set-stats-module) – Define and display stats for the current ansible run
* [setup](setup_module#ansible-collections-ansible-builtin-setup-module) – Gathers facts about remote hosts
* [shell](shell_module#ansible-collections-ansible-builtin-shell-module) – Execute shell commands on targets
* [slurp](slurp_module#ansible-collections-ansible-builtin-slurp-module) – Slurps a file from remote nodes
* [stat](stat_module#ansible-collections-ansible-builtin-stat-module) – Retrieve file or file system status
* [subversion](subversion_module#ansible-collections-ansible-builtin-subversion-module) – Deploys a subversion repository
* [systemd](systemd_module#ansible-collections-ansible-builtin-systemd-module) – Manage systemd units
* [sysvinit](sysvinit_module#ansible-collections-ansible-builtin-sysvinit-module) – Manage SysV services.
* [tempfile](tempfile_module#ansible-collections-ansible-builtin-tempfile-module) – Creates temporary files and directories
* [template](template_module#ansible-collections-ansible-builtin-template-module) – Template a file out to a target host
* [unarchive](unarchive_module#ansible-collections-ansible-builtin-unarchive-module) – Unpacks an archive after (optionally) copying it from the local machine
* [uri](uri_module#ansible-collections-ansible-builtin-uri-module) – Interacts with webservices
* [user](user_module#ansible-collections-ansible-builtin-user-module) – Manage user accounts
* [validate\_argument\_spec](validate_argument_spec_module#ansible-collections-ansible-builtin-validate-argument-spec-module) – Validate role argument specs.
* [wait\_for](wait_for_module#ansible-collections-ansible-builtin-wait-for-module) – Waits for a condition before continuing
* [wait\_for\_connection](wait_for_connection_module#ansible-collections-ansible-builtin-wait-for-connection-module) – Waits until remote system is reachable/usable
* [yum](yum_module#ansible-collections-ansible-builtin-yum-module) – Manages packages with the *yum* package manager
* [yum\_repository](yum_repository_module#ansible-collections-ansible-builtin-yum-repository-module) – Add or remove YUM repositories

 ### Shell Plugins

 * [cmd](cmd_shell#ansible-collections-ansible-builtin-cmd-shell) – Windows Command Prompt
* [powershell](powershell_shell#ansible-collections-ansible-builtin-powershell-shell) – Windows PowerShell
* [sh](sh_shell#ansible-collections-ansible-builtin-sh-shell) – POSIX shell (/bin/sh)

 ### Strategy Plugins

 * [debug](debug_strategy#ansible-collections-ansible-builtin-debug-strategy) – Executes tasks in interactive debug session.
* [free](free_strategy#ansible-collections-ansible-builtin-free-strategy) – Executes tasks without waiting for all hosts
* [host\_pinned](host_pinned_strategy#ansible-collections-ansible-builtin-host-pinned-strategy) – Executes tasks on each host without interruption
* [linear](linear_strategy#ansible-collections-ansible-builtin-linear-strategy) – Executes tasks in a linear fashion

 ### Vars Plugins

 * [host\_group\_vars](host_group_vars_vars#ansible-collections-ansible-builtin-host-group-vars-vars) – In charge of loading group\_vars and host\_vars

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/index.html>

Ansible.Utils
=============

 Collection version 2.4.2

 Plugin Index
------------

 These are the plugins in the ansible.utils collection

 ### Lookup Plugins

 * [get\_path](get_path_lookup#ansible-collections-ansible-utils-get-path-lookup) – Retrieve the value in a variable using a path
* [index\_of](index_of_lookup#ansible-collections-ansible-utils-index-of-lookup) – Find the indices of items in a list matching some criteria
* [to\_paths](to_paths_lookup#ansible-collections-ansible-utils-to-paths-lookup) – Flatten a complex object into a dictionary of paths and values
* [validate](validate_lookup#ansible-collections-ansible-utils-validate-lookup) – Validate data with provided criteria

 ### Modules

 * [cli\_parse](cli_parse_module#ansible-collections-ansible-utils-cli-parse-module) – Parse cli output or text using a variety of parsers
* [fact\_diff](fact_diff_module#ansible-collections-ansible-utils-fact-diff-module) – Find the difference between currently set facts
* [update\_fact](update_fact_module#ansible-collections-ansible-utils-update-fact-module) – Update currently set facts
* [validate](validate_module#ansible-collections-ansible-utils-validate-module) – Validate data with provided criteria

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/utils/index.html>

Azure.Azcollection
==================

 Collection version 1.10.0

 Plugin Index
------------

 These are the plugins in the azure.azcollection collection

 ### Inventory Plugins

 * [azure\_rm](azure_rm_inventory#ansible-collections-azure-azcollection-azure-rm-inventory) – Azure Resource Manager inventory plugin

 ### Modules

 * [azure\_rm\_adapplication](azure_rm_adapplication_module#ansible-collections-azure-azcollection-azure-rm-adapplication-module) – Manage Azure Active Directory application
* [azure\_rm\_adapplication\_info](azure_rm_adapplication_info_module#ansible-collections-azure-azcollection-azure-rm-adapplication-info-module) – Get Azure Active Directory application info
* [azure\_rm\_adgroup](azure_rm_adgroup_module#ansible-collections-azure-azcollection-azure-rm-adgroup-module) – Manage Azure Active Directory group
* [azure\_rm\_adgroup\_info](azure_rm_adgroup_info_module#ansible-collections-azure-azcollection-azure-rm-adgroup-info-module) – Get Azure Active Directory group info
* [azure\_rm\_adpassword](azure_rm_adpassword_module#ansible-collections-azure-azcollection-azure-rm-adpassword-module) – Manage application password
* [azure\_rm\_adpassword\_info](azure_rm_adpassword_info_module#ansible-collections-azure-azcollection-azure-rm-adpassword-info-module) – Get application password info
* [azure\_rm\_adserviceprincipal](azure_rm_adserviceprincipal_module#ansible-collections-azure-azcollection-azure-rm-adserviceprincipal-module) – Manage Azure Active Directory service principal
* [azure\_rm\_adserviceprincipal\_info](azure_rm_adserviceprincipal_info_module#ansible-collections-azure-azcollection-azure-rm-adserviceprincipal-info-module) – Get Azure Active Directory service principal info
* [azure\_rm\_aduser](azure_rm_aduser_module#ansible-collections-azure-azcollection-azure-rm-aduser-module) – Modify an Azure Active Directory user
* [azure\_rm\_aduser\_info](azure_rm_aduser_info_module#ansible-collections-azure-azcollection-azure-rm-aduser-info-module) – Get Azure Active Directory user info
* [azure\_rm\_aks](azure_rm_aks_module#ansible-collections-azure-azcollection-azure-rm-aks-module) – Manage a managed Azure Container Service (AKS) instance
* [azure\_rm\_aks\_info](azure_rm_aks_info_module#ansible-collections-azure-azcollection-azure-rm-aks-info-module) – Get Azure Kubernetes Service facts
* [azure\_rm\_aksupgrade\_info](azure_rm_aksupgrade_info_module#ansible-collections-azure-azcollection-azure-rm-aksupgrade-info-module) – Get the upgrade versions available for a AKS instance
* [azure\_rm\_aksversion\_info](azure_rm_aksversion_info_module#ansible-collections-azure-azcollection-azure-rm-aksversion-info-module) – Get available kubernetes versions supported by Azure Kubernetes Service
* [azure\_rm\_apimanagement](azure_rm_apimanagement_module#ansible-collections-azure-azcollection-azure-rm-apimanagement-module) – Manage Azure api instances
* [azure\_rm\_apimanagement\_info](azure_rm_apimanagement_info_module#ansible-collections-azure-azcollection-azure-rm-apimanagement-info-module) – Get the infomation of the API Instance
* [azure\_rm\_apimanagementservice](azure_rm_apimanagementservice_module#ansible-collections-azure-azcollection-azure-rm-apimanagementservice-module) – Manage Azure ApiManagementService instance
* [azure\_rm\_apimanagementservice\_info](azure_rm_apimanagementservice_info_module#ansible-collections-azure-azcollection-azure-rm-apimanagementservice-info-module) – Get ApiManagementService info
* [azure\_rm\_appgateway](azure_rm_appgateway_module#ansible-collections-azure-azcollection-azure-rm-appgateway-module) – Manage Application Gateway instance
* [azure\_rm\_applicationsecuritygroup](azure_rm_applicationsecuritygroup_module#ansible-collections-azure-azcollection-azure-rm-applicationsecuritygroup-module) – Manage Azure Application Security Group
* [azure\_rm\_applicationsecuritygroup\_info](azure_rm_applicationsecuritygroup_info_module#ansible-collections-azure-azcollection-azure-rm-applicationsecuritygroup-info-module) – Get Azure Application Security Group facts
* [azure\_rm\_appserviceplan](azure_rm_appserviceplan_module#ansible-collections-azure-azcollection-azure-rm-appserviceplan-module) – Manage App Service Plan
* [azure\_rm\_appserviceplan\_info](azure_rm_appserviceplan_info_module#ansible-collections-azure-azcollection-azure-rm-appserviceplan-info-module) – Get azure app service plan facts
* [azure\_rm\_automationaccount](azure_rm_automationaccount_module#ansible-collections-azure-azcollection-azure-rm-automationaccount-module) – Manage Azure Automation account
* [azure\_rm\_automationaccount\_info](azure_rm_automationaccount_info_module#ansible-collections-azure-azcollection-azure-rm-automationaccount-info-module) – Get Azure automation account facts
* [azure\_rm\_autoscale](azure_rm_autoscale_module#ansible-collections-azure-azcollection-azure-rm-autoscale-module) – Manage Azure autoscale setting
* [azure\_rm\_autoscale\_info](azure_rm_autoscale_info_module#ansible-collections-azure-azcollection-azure-rm-autoscale-info-module) – Get Azure Auto Scale Setting facts
* [azure\_rm\_availabilityset](azure_rm_availabilityset_module#ansible-collections-azure-azcollection-azure-rm-availabilityset-module) – Manage Azure Availability Set
* [azure\_rm\_availabilityset\_info](azure_rm_availabilityset_info_module#ansible-collections-azure-azcollection-azure-rm-availabilityset-info-module) – Get Azure Availability Set facts
* [azure\_rm\_azurefirewall](azure_rm_azurefirewall_module#ansible-collections-azure-azcollection-azure-rm-azurefirewall-module) – Manage Azure Firewall instance
* [azure\_rm\_azurefirewall\_info](azure_rm_azurefirewall_info_module#ansible-collections-azure-azcollection-azure-rm-azurefirewall-info-module) – Get AzureFirewall info
* [azure\_rm\_backupazurevm](azure_rm_backupazurevm_module#ansible-collections-azure-azcollection-azure-rm-backupazurevm-module) – Back up an Azure Virtual Machine using Azure Backup
* [azure\_rm\_backupazurevm\_info](azure_rm_backupazurevm_info_module#ansible-collections-azure-azcollection-azure-rm-backupazurevm-info-module) – Back up an Azure Virtual Machine using Azure Backup Information
* [azure\_rm\_backuppolicy](azure_rm_backuppolicy_module#ansible-collections-azure-azcollection-azure-rm-backuppolicy-module) – Manage Azure Backup Policy
* [azure\_rm\_backuppolicy\_info](azure_rm_backuppolicy_info_module#ansible-collections-azure-azcollection-azure-rm-backuppolicy-info-module) – Get Info on Azure Backup Policy
* [azure\_rm\_batchaccount](azure_rm_batchaccount_module#ansible-collections-azure-azcollection-azure-rm-batchaccount-module) – Manages a Batch Account on Azure
* [azure\_rm\_cdnendpoint](azure_rm_cdnendpoint_module#ansible-collections-azure-azcollection-azure-rm-cdnendpoint-module) – Manage a Azure CDN endpoint
* [azure\_rm\_cdnendpoint\_info](azure_rm_cdnendpoint_info_module#ansible-collections-azure-azcollection-azure-rm-cdnendpoint-info-module) – Get Azure CDN endpoint facts
* [azure\_rm\_cdnprofile](azure_rm_cdnprofile_module#ansible-collections-azure-azcollection-azure-rm-cdnprofile-module) – Manage a Azure CDN profile
* [azure\_rm\_cdnprofile\_info](azure_rm_cdnprofile_info_module#ansible-collections-azure-azcollection-azure-rm-cdnprofile-info-module) – Get Azure CDN profile facts
* [azure\_rm\_cognitivesearch](azure_rm_cognitivesearch_module#ansible-collections-azure-azcollection-azure-rm-cognitivesearch-module) – Manage Azure Cognitive Search service
* [azure\_rm\_cognitivesearch\_info](azure_rm_cognitivesearch_info_module#ansible-collections-azure-azcollection-azure-rm-cognitivesearch-info-module) – Get Azure Cognitive Search service info
* [azure\_rm\_containerinstance](azure_rm_containerinstance_module#ansible-collections-azure-azcollection-azure-rm-containerinstance-module) – Manage an Azure Container Instance
* [azure\_rm\_containerinstance\_info](azure_rm_containerinstance_info_module#ansible-collections-azure-azcollection-azure-rm-containerinstance-info-module) – Get Azure Container Instance facts
* [azure\_rm\_containerregistry](azure_rm_containerregistry_module#ansible-collections-azure-azcollection-azure-rm-containerregistry-module) – Manage an Azure Container Registry
* [azure\_rm\_containerregistry\_info](azure_rm_containerregistry_info_module#ansible-collections-azure-azcollection-azure-rm-containerregistry-info-module) – Get Azure Container Registry facts
* [azure\_rm\_containerregistryreplication](azure_rm_containerregistryreplication_module#ansible-collections-azure-azcollection-azure-rm-containerregistryreplication-module) – Manage Replication instance.
* [azure\_rm\_containerregistryreplication\_info](azure_rm_containerregistryreplication_info_module#ansible-collections-azure-azcollection-azure-rm-containerregistryreplication-info-module) – Get Replication facts.
* [azure\_rm\_containerregistrywebhook](azure_rm_containerregistrywebhook_module#ansible-collections-azure-azcollection-azure-rm-containerregistrywebhook-module) – Manage Webhook instance.
* [azure\_rm\_containerregistrywebhook\_info](azure_rm_containerregistrywebhook_info_module#ansible-collections-azure-azcollection-azure-rm-containerregistrywebhook-info-module) – Get Webhook facts.
* [azure\_rm\_cosmosdbaccount](azure_rm_cosmosdbaccount_module#ansible-collections-azure-azcollection-azure-rm-cosmosdbaccount-module) – Manage Azure Database Account instance
* [azure\_rm\_cosmosdbaccount\_info](azure_rm_cosmosdbaccount_info_module#ansible-collections-azure-azcollection-azure-rm-cosmosdbaccount-info-module) – Get Azure Cosmos DB Account facts
* [azure\_rm\_datalakestore](azure_rm_datalakestore_module#ansible-collections-azure-azcollection-azure-rm-datalakestore-module) – Manage Azure data lake store
* [azure\_rm\_datalakestore\_info](azure_rm_datalakestore_info_module#ansible-collections-azure-azcollection-azure-rm-datalakestore-info-module) – Get Azure Data Lake Store info
* [azure\_rm\_ddosprotectionplan](azure_rm_ddosprotectionplan_module#ansible-collections-azure-azcollection-azure-rm-ddosprotectionplan-module) – Manage DDoS protection plan
* [azure\_rm\_ddosprotectionplan\_info](azure_rm_ddosprotectionplan_info_module#ansible-collections-azure-azcollection-azure-rm-ddosprotectionplan-info-module) – Get Azure DDoS protection plan
* [azure\_rm\_deployment](azure_rm_deployment_module#ansible-collections-azure-azcollection-azure-rm-deployment-module) – Create or destroy Azure Resource Manager template deployments
* [azure\_rm\_deployment\_info](azure_rm_deployment_info_module#ansible-collections-azure-azcollection-azure-rm-deployment-info-module) – Get Azure Deployment facts
* [azure\_rm\_devtestlab](azure_rm_devtestlab_module#ansible-collections-azure-azcollection-azure-rm-devtestlab-module) – Manage Azure DevTest Lab instance
* [azure\_rm\_devtestlab\_info](azure_rm_devtestlab_info_module#ansible-collections-azure-azcollection-azure-rm-devtestlab-info-module) – Get Azure DevTest Lab facts
* [azure\_rm\_devtestlabarmtemplate\_info](azure_rm_devtestlabarmtemplate_info_module#ansible-collections-azure-azcollection-azure-rm-devtestlabarmtemplate-info-module) – Get Azure DevTest Lab ARM Template facts
* [azure\_rm\_devtestlabartifact\_info](azure_rm_devtestlabartifact_info_module#ansible-collections-azure-azcollection-azure-rm-devtestlabartifact-info-module) – Get Azure DevTest Lab Artifact facts
* [azure\_rm\_devtestlabartifactsource](azure_rm_devtestlabartifactsource_module#ansible-collections-azure-azcollection-azure-rm-devtestlabartifactsource-module) – Manage Azure DevTest Labs Artifacts Source instance
* [azure\_rm\_devtestlabartifactsource\_info](azure_rm_devtestlabartifactsource_info_module#ansible-collections-azure-azcollection-azure-rm-devtestlabartifactsource-info-module) – Get Azure DevTest Lab Artifact Source facts
* [azure\_rm\_devtestlabcustomimage](azure_rm_devtestlabcustomimage_module#ansible-collections-azure-azcollection-azure-rm-devtestlabcustomimage-module) – Manage Azure DevTest Lab Custom Image instance
* [azure\_rm\_devtestlabcustomimage\_info](azure_rm_devtestlabcustomimage_info_module#ansible-collections-azure-azcollection-azure-rm-devtestlabcustomimage-info-module) – Get Azure DevTest Lab Custom Image facts
* [azure\_rm\_devtestlabenvironment](azure_rm_devtestlabenvironment_module#ansible-collections-azure-azcollection-azure-rm-devtestlabenvironment-module) – Manage Azure DevTest Lab Environment instance
* [azure\_rm\_devtestlabenvironment\_info](azure_rm_devtestlabenvironment_info_module#ansible-collections-azure-azcollection-azure-rm-devtestlabenvironment-info-module) – Get Azure Environment facts
* [azure\_rm\_devtestlabpolicy](azure_rm_devtestlabpolicy_module#ansible-collections-azure-azcollection-azure-rm-devtestlabpolicy-module) – Manage Azure Policy instance
* [azure\_rm\_devtestlabpolicy\_info](azure_rm_devtestlabpolicy_info_module#ansible-collections-azure-azcollection-azure-rm-devtestlabpolicy-info-module) – Get Azure DTL Policy facts
* [azure\_rm\_devtestlabschedule](azure_rm_devtestlabschedule_module#ansible-collections-azure-azcollection-azure-rm-devtestlabschedule-module) – Manage Azure DevTest Lab Schedule instance
* [azure\_rm\_devtestlabschedule\_info](azure_rm_devtestlabschedule_info_module#ansible-collections-azure-azcollection-azure-rm-devtestlabschedule-info-module) – Get Azure Schedule facts
* [azure\_rm\_devtestlabvirtualmachine](azure_rm_devtestlabvirtualmachine_module#ansible-collections-azure-azcollection-azure-rm-devtestlabvirtualmachine-module) – Manage Azure DevTest Lab Virtual Machine instance
* [azure\_rm\_devtestlabvirtualmachine\_info](azure_rm_devtestlabvirtualmachine_info_module#ansible-collections-azure-azcollection-azure-rm-devtestlabvirtualmachine-info-module) – Get Azure DevTest Lab Virtual Machine facts
* [azure\_rm\_devtestlabvirtualnetwork](azure_rm_devtestlabvirtualnetwork_module#ansible-collections-azure-azcollection-azure-rm-devtestlabvirtualnetwork-module) – Manage Azure DevTest Lab Virtual Network instance
* [azure\_rm\_devtestlabvirtualnetwork\_info](azure_rm_devtestlabvirtualnetwork_info_module#ansible-collections-azure-azcollection-azure-rm-devtestlabvirtualnetwork-info-module) – Get Azure DevTest Lab Virtual Network facts
* [azure\_rm\_diskencryptionset](azure_rm_diskencryptionset_module#ansible-collections-azure-azcollection-azure-rm-diskencryptionset-module) – Create, delete and update Disk encryption set
* [azure\_rm\_diskencryptionset\_info](azure_rm_diskencryptionset_info_module#ansible-collections-azure-azcollection-azure-rm-diskencryptionset-info-module) – Get disk encryption set facts
* [azure\_rm\_dnsrecordset](azure_rm_dnsrecordset_module#ansible-collections-azure-azcollection-azure-rm-dnsrecordset-module) – Create, delete and update DNS record sets and records
* [azure\_rm\_dnsrecordset\_info](azure_rm_dnsrecordset_info_module#ansible-collections-azure-azcollection-azure-rm-dnsrecordset-info-module) – Get DNS Record Set facts
* [azure\_rm\_dnszone](azure_rm_dnszone_module#ansible-collections-azure-azcollection-azure-rm-dnszone-module) – Manage Azure DNS zones
* [azure\_rm\_dnszone\_info](azure_rm_dnszone_info_module#ansible-collections-azure-azcollection-azure-rm-dnszone-info-module) – Get DNS zone facts
* [azure\_rm\_eventhub](azure_rm_eventhub_module#ansible-collections-azure-azcollection-azure-rm-eventhub-module) – Manage Event Hub
* [azure\_rm\_eventhub\_info](azure_rm_eventhub_info_module#ansible-collections-azure-azcollection-azure-rm-eventhub-info-module) – Get Azure Event Hub
* [azure\_rm\_expressroute](azure_rm_expressroute_module#ansible-collections-azure-azcollection-azure-rm-expressroute-module) – Manage Express Route Circuits
* [azure\_rm\_expressroute\_info](azure_rm_expressroute_info_module#ansible-collections-azure-azcollection-azure-rm-expressroute-info-module) – Get Azure Express Route
* [azure\_rm\_functionapp](azure_rm_functionapp_module#ansible-collections-azure-azcollection-azure-rm-functionapp-module) – Manage Azure Function Apps
* [azure\_rm\_functionapp\_info](azure_rm_functionapp_info_module#ansible-collections-azure-azcollection-azure-rm-functionapp-info-module) – Get Azure Function App facts
* [azure\_rm\_gallery](azure_rm_gallery_module#ansible-collections-azure-azcollection-azure-rm-gallery-module) – Manage Azure Shared Image Gallery instance
* [azure\_rm\_gallery\_info](azure_rm_gallery_info_module#ansible-collections-azure-azcollection-azure-rm-gallery-info-module) – Get Azure Shared Image Gallery info
* [azure\_rm\_galleryimage](azure_rm_galleryimage_module#ansible-collections-azure-azcollection-azure-rm-galleryimage-module) – Manage Azure SIG Image instance
* [azure\_rm\_galleryimage\_info](azure_rm_galleryimage_info_module#ansible-collections-azure-azcollection-azure-rm-galleryimage-info-module) – Get Azure SIG Image info
* [azure\_rm\_galleryimageversion](azure_rm_galleryimageversion_module#ansible-collections-azure-azcollection-azure-rm-galleryimageversion-module) – Manage Azure SIG Image Version instance
* [azure\_rm\_galleryimageversion\_info](azure_rm_galleryimageversion_info_module#ansible-collections-azure-azcollection-azure-rm-galleryimageversion-info-module) – Get Azure SIG Image Version info
* [azure\_rm\_hdinsightcluster](azure_rm_hdinsightcluster_module#ansible-collections-azure-azcollection-azure-rm-hdinsightcluster-module) – Manage Azure HDInsight Cluster instance
* [azure\_rm\_hdinsightcluster\_info](azure_rm_hdinsightcluster_info_module#ansible-collections-azure-azcollection-azure-rm-hdinsightcluster-info-module) – Get Azure HDInsight Cluster facts
* [azure\_rm\_image](azure_rm_image_module#ansible-collections-azure-azcollection-azure-rm-image-module) – Manage Azure image
* [azure\_rm\_image\_info](azure_rm_image_info_module#ansible-collections-azure-azcollection-azure-rm-image-info-module) – Get facts about azure custom images
* [azure\_rm\_iotdevice](azure_rm_iotdevice_module#ansible-collections-azure-azcollection-azure-rm-iotdevice-module) – Manage Azure IoT hub device
* [azure\_rm\_iotdevice\_info](azure_rm_iotdevice_info_module#ansible-collections-azure-azcollection-azure-rm-iotdevice-info-module) – Facts of Azure IoT hub device
* [azure\_rm\_iotdevicemodule](azure_rm_iotdevicemodule_module#ansible-collections-azure-azcollection-azure-rm-iotdevicemodule-module) – Manage Azure IoT hub device module
* [azure\_rm\_iothub](azure_rm_iothub_module#ansible-collections-azure-azcollection-azure-rm-iothub-module) – Manage Azure IoT hub
* [azure\_rm\_iothub\_info](azure_rm_iothub_info_module#ansible-collections-azure-azcollection-azure-rm-iothub-info-module) – Get IoT Hub facts
* [azure\_rm\_iothubconsumergroup](azure_rm_iothubconsumergroup_module#ansible-collections-azure-azcollection-azure-rm-iothubconsumergroup-module) – Manage Azure IoT hub
* [azure\_rm\_ipgroup](azure_rm_ipgroup_module#ansible-collections-azure-azcollection-azure-rm-ipgroup-module) – Create, delete and update IP group
* [azure\_rm\_ipgroup\_info](azure_rm_ipgroup_info_module#ansible-collections-azure-azcollection-azure-rm-ipgroup-info-module) – Get IP group facts
* [azure\_rm\_keyvault](azure_rm_keyvault_module#ansible-collections-azure-azcollection-azure-rm-keyvault-module) – Manage Key Vault instance
* [azure\_rm\_keyvault\_info](azure_rm_keyvault_info_module#ansible-collections-azure-azcollection-azure-rm-keyvault-info-module) – Get Azure Key Vault facts
* [azure\_rm\_keyvaultkey](azure_rm_keyvaultkey_module#ansible-collections-azure-azcollection-azure-rm-keyvaultkey-module) – Use Azure KeyVault keys
* [azure\_rm\_keyvaultkey\_info](azure_rm_keyvaultkey_info_module#ansible-collections-azure-azcollection-azure-rm-keyvaultkey-info-module) – Get Azure Key Vault key facts
* [azure\_rm\_keyvaultsecret](azure_rm_keyvaultsecret_module#ansible-collections-azure-azcollection-azure-rm-keyvaultsecret-module) – Use Azure KeyVault Secrets
* [azure\_rm\_keyvaultsecret\_info](azure_rm_keyvaultsecret_info_module#ansible-collections-azure-azcollection-azure-rm-keyvaultsecret-info-module) – Get Azure Key Vault secret facts
* [azure\_rm\_loadbalancer](azure_rm_loadbalancer_module#ansible-collections-azure-azcollection-azure-rm-loadbalancer-module) – Manage Azure load balancers
* [azure\_rm\_loadbalancer\_info](azure_rm_loadbalancer_info_module#ansible-collections-azure-azcollection-azure-rm-loadbalancer-info-module) – Get load balancer facts
* [azure\_rm\_lock](azure_rm_lock_module#ansible-collections-azure-azcollection-azure-rm-lock-module) – Manage Azure locks
* [azure\_rm\_lock\_info](azure_rm_lock_info_module#ansible-collections-azure-azcollection-azure-rm-lock-info-module) – Manage Azure locks
* [azure\_rm\_loganalyticsworkspace](azure_rm_loganalyticsworkspace_module#ansible-collections-azure-azcollection-azure-rm-loganalyticsworkspace-module) – Manage Azure Log Analytics workspaces
* [azure\_rm\_loganalyticsworkspace\_info](azure_rm_loganalyticsworkspace_info_module#ansible-collections-azure-azcollection-azure-rm-loganalyticsworkspace-info-module) – Get facts of Azure Log Analytics workspaces
* [azure\_rm\_manageddisk](azure_rm_manageddisk_module#ansible-collections-azure-azcollection-azure-rm-manageddisk-module) – Manage Azure Manage Disks
* [azure\_rm\_manageddisk\_info](azure_rm_manageddisk_info_module#ansible-collections-azure-azcollection-azure-rm-manageddisk-info-module) – Get managed disk facts
* [azure\_rm\_managementgroup](azure_rm_managementgroup_module#ansible-collections-azure-azcollection-azure-rm-managementgroup-module) – Manage Azure ManagementGroup instance
* [azure\_rm\_managementgroup\_info](azure_rm_managementgroup_info_module#ansible-collections-azure-azcollection-azure-rm-managementgroup-info-module) – Get Azure Management Group facts
* [azure\_rm\_mariadbconfiguration](azure_rm_mariadbconfiguration_module#ansible-collections-azure-azcollection-azure-rm-mariadbconfiguration-module) – Manage Configuration instance
* [azure\_rm\_mariadbconfiguration\_info](azure_rm_mariadbconfiguration_info_module#ansible-collections-azure-azcollection-azure-rm-mariadbconfiguration-info-module) – Get Azure MariaDB Configuration facts
* [azure\_rm\_mariadbdatabase](azure_rm_mariadbdatabase_module#ansible-collections-azure-azcollection-azure-rm-mariadbdatabase-module) – Manage MariaDB Database instance
* [azure\_rm\_mariadbdatabase\_info](azure_rm_mariadbdatabase_info_module#ansible-collections-azure-azcollection-azure-rm-mariadbdatabase-info-module) – Get Azure MariaDB Database facts
* [azure\_rm\_mariadbfirewallrule](azure_rm_mariadbfirewallrule_module#ansible-collections-azure-azcollection-azure-rm-mariadbfirewallrule-module) – Manage MariaDB firewall rule instance
* [azure\_rm\_mariadbfirewallrule\_info](azure_rm_mariadbfirewallrule_info_module#ansible-collections-azure-azcollection-azure-rm-mariadbfirewallrule-info-module) – Get Azure MariaDB Firewall Rule facts
* [azure\_rm\_mariadbserver](azure_rm_mariadbserver_module#ansible-collections-azure-azcollection-azure-rm-mariadbserver-module) – Manage MariaDB Server instance
* [azure\_rm\_mariadbserver\_info](azure_rm_mariadbserver_info_module#ansible-collections-azure-azcollection-azure-rm-mariadbserver-info-module) – Get Azure MariaDB Server facts
* [azure\_rm\_monitorlogprofile](azure_rm_monitorlogprofile_module#ansible-collections-azure-azcollection-azure-rm-monitorlogprofile-module) – Manage Azure Monitor log profile
* [azure\_rm\_mysqlconfiguration](azure_rm_mysqlconfiguration_module#ansible-collections-azure-azcollection-azure-rm-mysqlconfiguration-module) – Manage Configuration instance
* [azure\_rm\_mysqlconfiguration\_info](azure_rm_mysqlconfiguration_info_module#ansible-collections-azure-azcollection-azure-rm-mysqlconfiguration-info-module) – Get Azure MySQL Configuration facts
* [azure\_rm\_mysqldatabase](azure_rm_mysqldatabase_module#ansible-collections-azure-azcollection-azure-rm-mysqldatabase-module) – Manage MySQL Database instance
* [azure\_rm\_mysqldatabase\_info](azure_rm_mysqldatabase_info_module#ansible-collections-azure-azcollection-azure-rm-mysqldatabase-info-module) – Get Azure MySQL Database facts
* [azure\_rm\_mysqlfirewallrule](azure_rm_mysqlfirewallrule_module#ansible-collections-azure-azcollection-azure-rm-mysqlfirewallrule-module) – Manage MySQL firewall rule instance
* [azure\_rm\_mysqlfirewallrule\_info](azure_rm_mysqlfirewallrule_info_module#ansible-collections-azure-azcollection-azure-rm-mysqlfirewallrule-info-module) – Get Azure MySQL Firewall Rule facts
* [azure\_rm\_mysqlserver](azure_rm_mysqlserver_module#ansible-collections-azure-azcollection-azure-rm-mysqlserver-module) – Manage MySQL Server instance
* [azure\_rm\_mysqlserver\_info](azure_rm_mysqlserver_info_module#ansible-collections-azure-azcollection-azure-rm-mysqlserver-info-module) – Get Azure MySQL Server facts
* [azure\_rm\_networkinterface](azure_rm_networkinterface_module#ansible-collections-azure-azcollection-azure-rm-networkinterface-module) – Manage Azure network interfaces
* [azure\_rm\_networkinterface\_info](azure_rm_networkinterface_info_module#ansible-collections-azure-azcollection-azure-rm-networkinterface-info-module) – Get network interface facts
* [azure\_rm\_notificationhub](azure_rm_notificationhub_module#ansible-collections-azure-azcollection-azure-rm-notificationhub-module) – Manage Notification Hub
* [azure\_rm\_notificationhub\_info](azure_rm_notificationhub_info_module#ansible-collections-azure-azcollection-azure-rm-notificationhub-info-module) – Get Azure Notification Hub
* [azure\_rm\_openshiftmanagedcluster](azure_rm_openshiftmanagedcluster_module#ansible-collections-azure-azcollection-azure-rm-openshiftmanagedcluster-module) – Manage Azure Red Hat OpenShift Managed Cluster instance
* [azure\_rm\_postgresqlconfiguration](azure_rm_postgresqlconfiguration_module#ansible-collections-azure-azcollection-azure-rm-postgresqlconfiguration-module) – Manage Azure PostgreSQL Configuration
* [azure\_rm\_postgresqlconfiguration\_info](azure_rm_postgresqlconfiguration_info_module#ansible-collections-azure-azcollection-azure-rm-postgresqlconfiguration-info-module) – Get Azure PostgreSQL Configuration facts
* [azure\_rm\_postgresqldatabase](azure_rm_postgresqldatabase_module#ansible-collections-azure-azcollection-azure-rm-postgresqldatabase-module) – Manage PostgreSQL Database instance
* [azure\_rm\_postgresqldatabase\_info](azure_rm_postgresqldatabase_info_module#ansible-collections-azure-azcollection-azure-rm-postgresqldatabase-info-module) – Get Azure PostgreSQL Database facts
* [azure\_rm\_postgresqlfirewallrule](azure_rm_postgresqlfirewallrule_module#ansible-collections-azure-azcollection-azure-rm-postgresqlfirewallrule-module) – Manage PostgreSQL firewall rule instance
* [azure\_rm\_postgresqlfirewallrule\_info](azure_rm_postgresqlfirewallrule_info_module#ansible-collections-azure-azcollection-azure-rm-postgresqlfirewallrule-info-module) – Get Azure PostgreSQL Firewall Rule facts
* [azure\_rm\_postgresqlserver](azure_rm_postgresqlserver_module#ansible-collections-azure-azcollection-azure-rm-postgresqlserver-module) – Manage PostgreSQL Server instance
* [azure\_rm\_postgresqlserver\_info](azure_rm_postgresqlserver_info_module#ansible-collections-azure-azcollection-azure-rm-postgresqlserver-info-module) – Get Azure PostgreSQL Server facts
* [azure\_rm\_privatednsrecordset](azure_rm_privatednsrecordset_module#ansible-collections-azure-azcollection-azure-rm-privatednsrecordset-module) – Create, delete and update Private DNS record sets and records
* [azure\_rm\_privatednsrecordset\_info](azure_rm_privatednsrecordset_info_module#ansible-collections-azure-azcollection-azure-rm-privatednsrecordset-info-module) – Get Private DNS Record Set facts
* [azure\_rm\_privatednszone](azure_rm_privatednszone_module#ansible-collections-azure-azcollection-azure-rm-privatednszone-module) – Manage Azure private DNS zones
* [azure\_rm\_privatednszone\_info](azure_rm_privatednszone_info_module#ansible-collections-azure-azcollection-azure-rm-privatednszone-info-module) – Get private DNS zone facts
* [azure\_rm\_privatednszonelink](azure_rm_privatednszonelink_module#ansible-collections-azure-azcollection-azure-rm-privatednszonelink-module) – Create, delete and update Virtual network link for Private DNS zone
* [azure\_rm\_privatednszonelink\_info](azure_rm_privatednszonelink_info_module#ansible-collections-azure-azcollection-azure-rm-privatednszonelink-info-module) – Get Virtual Network link facts for private DNS zone
* [azure\_rm\_privateendpoint](azure_rm_privateendpoint_module#ansible-collections-azure-azcollection-azure-rm-privateendpoint-module) – Manage Azure private endpoint
* [azure\_rm\_privateendpoint\_info](azure_rm_privateendpoint_info_module#ansible-collections-azure-azcollection-azure-rm-privateendpoint-info-module) – Get private endpoints info
* [azure\_rm\_proximityplacementgroup](azure_rm_proximityplacementgroup_module#ansible-collections-azure-azcollection-azure-rm-proximityplacementgroup-module) – Create, delete and update proximity placement group
* [azure\_rm\_proximityplacementgroup\_info](azure_rm_proximityplacementgroup_info_module#ansible-collections-azure-azcollection-azure-rm-proximityplacementgroup-info-module) – Get proximity placement group facts
* [azure\_rm\_publicipaddress](azure_rm_publicipaddress_module#ansible-collections-azure-azcollection-azure-rm-publicipaddress-module) – Manage Azure Public IP Addresses
* [azure\_rm\_publicipaddress\_info](azure_rm_publicipaddress_info_module#ansible-collections-azure-azcollection-azure-rm-publicipaddress-info-module) – Get public IP facts
* [azure\_rm\_recoveryservicesvault](azure_rm_recoveryservicesvault_module#ansible-collections-azure-azcollection-azure-rm-recoveryservicesvault-module) – Create and Delete Azure Recovery Services vault
* [azure\_rm\_recoveryservicesvault\_info](azure_rm_recoveryservicesvault_info_module#ansible-collections-azure-azcollection-azure-rm-recoveryservicesvault-info-module) – Get Azure Recovery Services vault Details
* [azure\_rm\_rediscache](azure_rm_rediscache_module#ansible-collections-azure-azcollection-azure-rm-rediscache-module) – Manage Azure Cache for Redis instance
* [azure\_rm\_rediscache\_info](azure_rm_rediscache_info_module#ansible-collections-azure-azcollection-azure-rm-rediscache-info-module) – Get Azure Cache for Redis instance facts
* [azure\_rm\_rediscachefirewallrule](azure_rm_rediscachefirewallrule_module#ansible-collections-azure-azcollection-azure-rm-rediscachefirewallrule-module) – Manage Azure Cache for Redis Firewall rules
* [azure\_rm\_registrationassignment](azure_rm_registrationassignment_module#ansible-collections-azure-azcollection-azure-rm-registrationassignment-module) – Manage Azure RegistrationAssignment instance
* [azure\_rm\_registrationassignment\_info](azure_rm_registrationassignment_info_module#ansible-collections-azure-azcollection-azure-rm-registrationassignment-info-module) – Get RegistrationAssignment info
* [azure\_rm\_registrationdefinition](azure_rm_registrationdefinition_module#ansible-collections-azure-azcollection-azure-rm-registrationdefinition-module) – Manage Azure RegistrationDefinition instance
* [azure\_rm\_registrationdefinition\_info](azure_rm_registrationdefinition_info_module#ansible-collections-azure-azcollection-azure-rm-registrationdefinition-info-module) – Get RegistrationDefinition info
* [azure\_rm\_resource](azure_rm_resource_module#ansible-collections-azure-azcollection-azure-rm-resource-module) – Create any Azure resource
* [azure\_rm\_resource\_info](azure_rm_resource_info_module#ansible-collections-azure-azcollection-azure-rm-resource-info-module) – Generic facts of Azure resources
* [azure\_rm\_resourcegroup](azure_rm_resourcegroup_module#ansible-collections-azure-azcollection-azure-rm-resourcegroup-module) – Manage Azure resource groups
* [azure\_rm\_resourcegroup\_info](azure_rm_resourcegroup_info_module#ansible-collections-azure-azcollection-azure-rm-resourcegroup-info-module) – Get resource group facts
* [azure\_rm\_roleassignment](azure_rm_roleassignment_module#ansible-collections-azure-azcollection-azure-rm-roleassignment-module) – Manage Azure Role Assignment
* [azure\_rm\_roleassignment\_info](azure_rm_roleassignment_info_module#ansible-collections-azure-azcollection-azure-rm-roleassignment-info-module) – Gets Azure Role Assignment facts
* [azure\_rm\_roledefinition](azure_rm_roledefinition_module#ansible-collections-azure-azcollection-azure-rm-roledefinition-module) – Manage Azure Role Definition
* [azure\_rm\_roledefinition\_info](azure_rm_roledefinition_info_module#ansible-collections-azure-azcollection-azure-rm-roledefinition-info-module) – Get Azure Role Definition facts
* [azure\_rm\_route](azure_rm_route_module#ansible-collections-azure-azcollection-azure-rm-route-module) – Manage Azure route resource
* [azure\_rm\_route\_info](azure_rm_route_info_module#ansible-collections-azure-azcollection-azure-rm-route-info-module) – Get Route info
* [azure\_rm\_routetable](azure_rm_routetable_module#ansible-collections-azure-azcollection-azure-rm-routetable-module) – Manage Azure route table resource
* [azure\_rm\_routetable\_info](azure_rm_routetable_info_module#ansible-collections-azure-azcollection-azure-rm-routetable-info-module) – Get route table facts
* [azure\_rm\_securitygroup](azure_rm_securitygroup_module#ansible-collections-azure-azcollection-azure-rm-securitygroup-module) – Manage Azure network security groups
* [azure\_rm\_securitygroup\_info](azure_rm_securitygroup_info_module#ansible-collections-azure-azcollection-azure-rm-securitygroup-info-module) – Get security group facts
* [azure\_rm\_servicebus](azure_rm_servicebus_module#ansible-collections-azure-azcollection-azure-rm-servicebus-module) – Manage Azure Service Bus
* [azure\_rm\_servicebus\_info](azure_rm_servicebus_info_module#ansible-collections-azure-azcollection-azure-rm-servicebus-info-module) – Get servicebus facts
* [azure\_rm\_servicebusqueue](azure_rm_servicebusqueue_module#ansible-collections-azure-azcollection-azure-rm-servicebusqueue-module) – Manage Azure Service Bus queue
* [azure\_rm\_servicebussaspolicy](azure_rm_servicebussaspolicy_module#ansible-collections-azure-azcollection-azure-rm-servicebussaspolicy-module) – Manage Azure Service Bus SAS policy
* [azure\_rm\_servicebustopic](azure_rm_servicebustopic_module#ansible-collections-azure-azcollection-azure-rm-servicebustopic-module) – Manage Azure Service Bus
* [azure\_rm\_servicebustopicsubscription](azure_rm_servicebustopicsubscription_module#ansible-collections-azure-azcollection-azure-rm-servicebustopicsubscription-module) – Manage Azure Service Bus subscription
* [azure\_rm\_snapshot](azure_rm_snapshot_module#ansible-collections-azure-azcollection-azure-rm-snapshot-module) – Manage Azure Snapshot instance.
* [azure\_rm\_sqldatabase](azure_rm_sqldatabase_module#ansible-collections-azure-azcollection-azure-rm-sqldatabase-module) – Manage SQL Database instance
* [azure\_rm\_sqldatabase\_info](azure_rm_sqldatabase_info_module#ansible-collections-azure-azcollection-azure-rm-sqldatabase-info-module) – Get Azure SQL Database facts
* [azure\_rm\_sqlfirewallrule](azure_rm_sqlfirewallrule_module#ansible-collections-azure-azcollection-azure-rm-sqlfirewallrule-module) – Manage Firewall Rule instance
* [azure\_rm\_sqlfirewallrule\_info](azure_rm_sqlfirewallrule_info_module#ansible-collections-azure-azcollection-azure-rm-sqlfirewallrule-info-module) – Get Azure SQL Firewall Rule facts
* [azure\_rm\_sqlserver](azure_rm_sqlserver_module#ansible-collections-azure-azcollection-azure-rm-sqlserver-module) – Manage SQL Server instance
* [azure\_rm\_sqlserver\_info](azure_rm_sqlserver_info_module#ansible-collections-azure-azcollection-azure-rm-sqlserver-info-module) – Get SQL Server facts
* [azure\_rm\_storageaccount](azure_rm_storageaccount_module#ansible-collections-azure-azcollection-azure-rm-storageaccount-module) – Manage Azure storage accounts
* [azure\_rm\_storageaccount\_info](azure_rm_storageaccount_info_module#ansible-collections-azure-azcollection-azure-rm-storageaccount-info-module) – Get storage account facts
* [azure\_rm\_storageblob](azure_rm_storageblob_module#ansible-collections-azure-azcollection-azure-rm-storageblob-module) – Manage blob containers and blob objects
* [azure\_rm\_subnet](azure_rm_subnet_module#ansible-collections-azure-azcollection-azure-rm-subnet-module) – Manage Azure subnets
* [azure\_rm\_subnet\_info](azure_rm_subnet_info_module#ansible-collections-azure-azcollection-azure-rm-subnet-info-module) – Get Azure Subnet facts
* [azure\_rm\_subscription\_info](azure_rm_subscription_info_module#ansible-collections-azure-azcollection-azure-rm-subscription-info-module) – Get Azure Subscription facts
* [azure\_rm\_trafficmanager](azure_rm_trafficmanager_module#ansible-collections-azure-azcollection-azure-rm-trafficmanager-module) – Manage a Traffic Manager profile.
* [azure\_rm\_trafficmanagerendpoint](azure_rm_trafficmanagerendpoint_module#ansible-collections-azure-azcollection-azure-rm-trafficmanagerendpoint-module) – Manage Azure Traffic Manager endpoint
* [azure\_rm\_trafficmanagerendpoint\_info](azure_rm_trafficmanagerendpoint_info_module#ansible-collections-azure-azcollection-azure-rm-trafficmanagerendpoint-info-module) – Get Azure Traffic Manager endpoint facts
* [azure\_rm\_trafficmanagerprofile](azure_rm_trafficmanagerprofile_module#ansible-collections-azure-azcollection-azure-rm-trafficmanagerprofile-module) – Manage Azure Traffic Manager profile
* [azure\_rm\_trafficmanagerprofile\_info](azure_rm_trafficmanagerprofile_info_module#ansible-collections-azure-azcollection-azure-rm-trafficmanagerprofile-info-module) – Get Azure Traffic Manager profile facts
* [azure\_rm\_virtualmachine](azure_rm_virtualmachine_module#ansible-collections-azure-azcollection-azure-rm-virtualmachine-module) – Manage Azure virtual machines
* [azure\_rm\_virtualmachine\_info](azure_rm_virtualmachine_info_module#ansible-collections-azure-azcollection-azure-rm-virtualmachine-info-module) – Get virtual machine facts
* [azure\_rm\_virtualmachineextension](azure_rm_virtualmachineextension_module#ansible-collections-azure-azcollection-azure-rm-virtualmachineextension-module) – Managed Azure Virtual Machine extension
* [azure\_rm\_virtualmachineextension\_info](azure_rm_virtualmachineextension_info_module#ansible-collections-azure-azcollection-azure-rm-virtualmachineextension-info-module) – Get Azure Virtual Machine Extension facts
* [azure\_rm\_virtualmachineimage\_info](azure_rm_virtualmachineimage_info_module#ansible-collections-azure-azcollection-azure-rm-virtualmachineimage-info-module) – Get virtual machine image facts
* [azure\_rm\_virtualmachinescaleset](azure_rm_virtualmachinescaleset_module#ansible-collections-azure-azcollection-azure-rm-virtualmachinescaleset-module) – Manage Azure virtual machine scale sets
* [azure\_rm\_virtualmachinescaleset\_info](azure_rm_virtualmachinescaleset_info_module#ansible-collections-azure-azcollection-azure-rm-virtualmachinescaleset-info-module) – Get Virtual Machine Scale Set facts
* [azure\_rm\_virtualmachinescalesetextension](azure_rm_virtualmachinescalesetextension_module#ansible-collections-azure-azcollection-azure-rm-virtualmachinescalesetextension-module) – Manage Azure Virtual Machine Scale Set (VMSS) extensions
* [azure\_rm\_virtualmachinescalesetextension\_info](azure_rm_virtualmachinescalesetextension_info_module#ansible-collections-azure-azcollection-azure-rm-virtualmachinescalesetextension-info-module) – Get Azure Virtual Machine Scale Set Extension facts
* [azure\_rm\_virtualmachinescalesetinstance](azure_rm_virtualmachinescalesetinstance_module#ansible-collections-azure-azcollection-azure-rm-virtualmachinescalesetinstance-module) – Get Azure Virtual Machine Scale Set Instance facts
* [azure\_rm\_virtualmachinescalesetinstance\_info](azure_rm_virtualmachinescalesetinstance_info_module#ansible-collections-azure-azcollection-azure-rm-virtualmachinescalesetinstance-info-module) – Get Azure Virtual Machine Scale Set Instance facts
* [azure\_rm\_virtualmachinesize\_info](azure_rm_virtualmachinesize_info_module#ansible-collections-azure-azcollection-azure-rm-virtualmachinesize-info-module) – Get facts for virtual machine sizes
* [azure\_rm\_virtualnetwork](azure_rm_virtualnetwork_module#ansible-collections-azure-azcollection-azure-rm-virtualnetwork-module) – Manage Azure virtual networks
* [azure\_rm\_virtualnetwork\_info](azure_rm_virtualnetwork_info_module#ansible-collections-azure-azcollection-azure-rm-virtualnetwork-info-module) – Get virtual network facts
* [azure\_rm\_virtualnetworkgateway](azure_rm_virtualnetworkgateway_module#ansible-collections-azure-azcollection-azure-rm-virtualnetworkgateway-module) – Manage Azure virtual network gateways
* [azure\_rm\_virtualnetworkpeering](azure_rm_virtualnetworkpeering_module#ansible-collections-azure-azcollection-azure-rm-virtualnetworkpeering-module) – Manage Azure Virtual Network Peering
* [azure\_rm\_virtualnetworkpeering\_info](azure_rm_virtualnetworkpeering_info_module#ansible-collections-azure-azcollection-azure-rm-virtualnetworkpeering-info-module) – Get facts of Azure Virtual Network Peering
* [azure\_rm\_virtualwan](azure_rm_virtualwan_module#ansible-collections-azure-azcollection-azure-rm-virtualwan-module) – Manage Azure VirtualWan instance
* [azure\_rm\_virtualwan\_info](azure_rm_virtualwan_info_module#ansible-collections-azure-azcollection-azure-rm-virtualwan-info-module) – Get VirtualWan info
* [azure\_rm\_vmbackuppolicy](azure_rm_vmbackuppolicy_module#ansible-collections-azure-azcollection-azure-rm-vmbackuppolicy-module) – Create or Delete Azure VM Backup Policy
* [azure\_rm\_vmbackuppolicy\_info](azure_rm_vmbackuppolicy_info_module#ansible-collections-azure-azcollection-azure-rm-vmbackuppolicy-info-module) – Fetch Backup Policy Details
* [azure\_rm\_vpnsite](azure_rm_vpnsite_module#ansible-collections-azure-azcollection-azure-rm-vpnsite-module) – Manage Azure VpnSite instance
* [azure\_rm\_vpnsite\_info](azure_rm_vpnsite_info_module#ansible-collections-azure-azcollection-azure-rm-vpnsite-info-module) – Get VpnSite info
* [azure\_rm\_vpnsitelink\_info](azure_rm_vpnsitelink_info_module#ansible-collections-azure-azcollection-azure-rm-vpnsitelink-info-module) – Get VpnSiteLink info
* [azure\_rm\_webapp](azure_rm_webapp_module#ansible-collections-azure-azcollection-azure-rm-webapp-module) – Manage Web App instances
* [azure\_rm\_webapp\_info](azure_rm_webapp_info_module#ansible-collections-azure-azcollection-azure-rm-webapp-info-module) – Get Azure web app facts
* [azure\_rm\_webappaccessrestriction](azure_rm_webappaccessrestriction_module#ansible-collections-azure-azcollection-azure-rm-webappaccessrestriction-module) – Manage web app network access restrictions
* [azure\_rm\_webappaccessrestriction\_info](azure_rm_webappaccessrestriction_info_module#ansible-collections-azure-azcollection-azure-rm-webappaccessrestriction-info-module) – Retrieve web app network access restriction facts
* [azure\_rm\_webappslot](azure_rm_webappslot_module#ansible-collections-azure-azcollection-azure-rm-webappslot-module) – Manage Azure Web App slot
* [azure\_rm\_webappvnetconnection](azure_rm_webappvnetconnection_module#ansible-collections-azure-azcollection-azure-rm-webappvnetconnection-module) – Manage web app virtual network connection
* [azure\_rm\_webappvnetconnection\_info](azure_rm_webappvnetconnection_info_module#ansible-collections-azure-azcollection-azure-rm-webappvnetconnection-info-module) – Get Azure web app virtual network connection facts

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/azure/azcollection/index.html>

Collections in the Vyos Namespace
=================================

 These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **vyos** namespace.

 * [vyos.vyos](vyos/index#plugins-in-vyos-vyos)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/vyos/index.html>

Awx.Awx
=======

 Collection version 19.4.0

 Plugin Index
------------

 These are the plugins in the awx.awx collection

 ### Inventory Plugins

 * [controller](controller_inventory#ansible-collections-awx-awx-controller-inventory) –

 ### Lookup Plugins

 * [controller\_api](controller_api_lookup#ansible-collections-awx-awx-controller-api-lookup) –
* [schedule\_rrule](schedule_rrule_lookup#ansible-collections-awx-awx-schedule-rrule-lookup) – Generate an rrule string which can be used for Schedules

 ### Modules

 * [ad\_hoc\_command](ad_hoc_command_module#ansible-collections-awx-awx-ad-hoc-command-module) – create, update, or destroy Automation Platform Controller ad hoc commands.
* [ad\_hoc\_command\_cancel](ad_hoc_command_cancel_module#ansible-collections-awx-awx-ad-hoc-command-cancel-module) – Cancel an Ad Hoc Command.
* [ad\_hoc\_command\_wait](ad_hoc_command_wait_module#ansible-collections-awx-awx-ad-hoc-command-wait-module) – Wait for Automation Platform Controller Ad Hoc Command to finish.
* [application](application_module#ansible-collections-awx-awx-application-module) – create, update, or destroy Automation Platform Controller applications
* [controller\_meta](controller_meta_module#ansible-collections-awx-awx-controller-meta-module) – Returns metadata about the collection this module lives in.
* [credential](credential_module#ansible-collections-awx-awx-credential-module) – create, update, or destroy Automation Platform Controller credential.
* [credential\_input\_source](credential_input_source_module#ansible-collections-awx-awx-credential-input-source-module) – create, update, or destroy Automation Platform Controller credential input sources.
* [credential\_type](credential_type_module#ansible-collections-awx-awx-credential-type-module) – Create, update, or destroy custom Automation Platform Controller credential type.
* [execution\_environment](execution_environment_module#ansible-collections-awx-awx-execution-environment-module) – create, update, or destroy Execution Environments in Automation Platform Controller.
* [export](export_module#ansible-collections-awx-awx-export-module) – export resources from Automation Platform Controller.
* [group](group_module#ansible-collections-awx-awx-group-module) – create, update, or destroy Automation Platform Controller group.
* [host](host_module#ansible-collections-awx-awx-host-module) – create, update, or destroy Automation Platform Controller host.
* [import](import_module#ansible-collections-awx-awx-import-module) – import resources into Automation Platform Controller.
* [instance\_group](instance_group_module#ansible-collections-awx-awx-instance-group-module) – create, update, or destroy Automation Platform Controller instance groups.
* [inventory](inventory_module#ansible-collections-awx-awx-inventory-module) – create, update, or destroy Automation Platform Controller inventory.
* [inventory\_source](inventory_source_module#ansible-collections-awx-awx-inventory-source-module) – create, update, or destroy Automation Platform Controller inventory source.
* [inventory\_source\_update](inventory_source_update_module#ansible-collections-awx-awx-inventory-source-update-module) – Update inventory source(s).
* [job\_cancel](job_cancel_module#ansible-collections-awx-awx-job-cancel-module) – Cancel an Automation Platform Controller Job.
* [job\_launch](job_launch_module#ansible-collections-awx-awx-job-launch-module) – Launch an Ansible Job.
* [job\_list](job_list_module#ansible-collections-awx-awx-job-list-module) – List Automation Platform Controller jobs.
* [job\_template](job_template_module#ansible-collections-awx-awx-job-template-module) – create, update, or destroy Automation Platform Controller job templates.
* [job\_wait](job_wait_module#ansible-collections-awx-awx-job-wait-module) – Wait for Automation Platform Controller job to finish.
* [label](label_module#ansible-collections-awx-awx-label-module) – create, update, or destroy Automation Platform Controller labels.
* [license](license_module#ansible-collections-awx-awx-license-module) – Set the license for Automation Platform Controller
* [notification\_template](notification_template_module#ansible-collections-awx-awx-notification-template-module) – create, update, or destroy Automation Platform Controller notification.
* [organization](organization_module#ansible-collections-awx-awx-organization-module) – create, update, or destroy Automation Platform Controller organizations
* [project](project_module#ansible-collections-awx-awx-project-module) – create, update, or destroy Automation Platform Controller projects
* [project\_update](project_update_module#ansible-collections-awx-awx-project-update-module) – Update a Project in Automation Platform Controller
* [role](role_module#ansible-collections-awx-awx-role-module) – grant or revoke an Automation Platform Controller role.
* [schedule](schedule_module#ansible-collections-awx-awx-schedule-module) – create, update, or destroy Automation Platform Controller schedules.
* [settings](settings_module#ansible-collections-awx-awx-settings-module) – Modify Automation Platform Controller settings.
* [team](team_module#ansible-collections-awx-awx-team-module) – create, update, or destroy Automation Platform Controller team.
* [token](token_module#ansible-collections-awx-awx-token-module) – create, update, or destroy Automation Platform Controller tokens.
* [user](user_module#ansible-collections-awx-awx-user-module) – create, update, or destroy Automation Platform Controller users.
* [workflow\_approval](workflow_approval_module#ansible-collections-awx-awx-workflow-approval-module) – Approve an approval node in a workflow job.
* [workflow\_job\_template](workflow_job_template_module#ansible-collections-awx-awx-workflow-job-template-module) – create, update, or destroy Automation Platform Controller workflow job templates.
* [workflow\_job\_template\_node](workflow_job_template_node_module#ansible-collections-awx-awx-workflow-job-template-node-module) – create, update, or destroy Automation Platform Controller workflow job template nodes.
* [workflow\_launch](workflow_launch_module#ansible-collections-awx-awx-workflow-launch-module) – Run a workflow in Automation Platform Controller
* [workflow\_node\_wait](workflow_node_wait_module#ansible-collections-awx-awx-workflow-node-wait-module) – Approve an approval node in a workflow job.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/awx/awx/index.html>

Check\_Point.Mgmt
=================

 Collection version 2.1.1

 Plugin Index
------------

 These are the plugins in the check\_point.mgmt collection

 ### Httpapi Plugins

 * [checkpoint](checkpoint_httpapi#ansible-collections-check-point-mgmt-checkpoint-httpapi) – HttpApi Plugin for Checkpoint devices

 ### Modules

 * [checkpoint\_access\_layer\_facts](checkpoint_access_layer_facts_module#ansible-collections-check-point-mgmt-checkpoint-access-layer-facts-module) – Get access layer facts on Check Point over Web Services API
* [checkpoint\_access\_rule](checkpoint_access_rule_module#ansible-collections-check-point-mgmt-checkpoint-access-rule-module) – Manages access rules on Check Point over Web Services API
* [checkpoint\_access\_rule\_facts](checkpoint_access_rule_facts_module#ansible-collections-check-point-mgmt-checkpoint-access-rule-facts-module) – Get access rules objects facts on Check Point over Web Services API
* [checkpoint\_host](checkpoint_host_module#ansible-collections-check-point-mgmt-checkpoint-host-module) – Manages host objects on Check Point over Web Services API
* [checkpoint\_host\_facts](checkpoint_host_facts_module#ansible-collections-check-point-mgmt-checkpoint-host-facts-module) – Get host objects facts on Check Point over Web Services API
* [checkpoint\_object\_facts](checkpoint_object_facts_module#ansible-collections-check-point-mgmt-checkpoint-object-facts-module) – Get object facts on Check Point over Web Services API
* [checkpoint\_run\_script](checkpoint_run_script_module#ansible-collections-check-point-mgmt-checkpoint-run-script-module) – Run scripts on Check Point devices over Web Services API
* [checkpoint\_session](checkpoint_session_module#ansible-collections-check-point-mgmt-checkpoint-session-module) – Manages session objects on Check Point over Web Services API
* [checkpoint\_task\_facts](checkpoint_task_facts_module#ansible-collections-check-point-mgmt-checkpoint-task-facts-module) – Get task objects facts on Check Point over Web Services API
* [cp\_mgmt\_access\_layer](cp_mgmt_access_layer_module#ansible-collections-check-point-mgmt-cp-mgmt-access-layer-module) – Manages access-layer objects on Check Point over Web Services API
* [cp\_mgmt\_access\_layer\_facts](cp_mgmt_access_layer_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-access-layer-facts-module) – Get access-layer objects facts on Check Point over Web Services API
* [cp\_mgmt\_access\_role](cp_mgmt_access_role_module#ansible-collections-check-point-mgmt-cp-mgmt-access-role-module) – Manages access-role objects on Check Point over Web Services API
* [cp\_mgmt\_access\_role\_facts](cp_mgmt_access_role_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-access-role-facts-module) – Get access-role objects facts on Check Point over Web Services API
* [cp\_mgmt\_access\_rule](cp_mgmt_access_rule_module#ansible-collections-check-point-mgmt-cp-mgmt-access-rule-module) – Manages access-rule objects on Check Point over Web Services API
* [cp\_mgmt\_access\_rule\_facts](cp_mgmt_access_rule_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-access-rule-facts-module) – Get access-rule objects facts on Check Point over Web Services API
* [cp\_mgmt\_access\_section](cp_mgmt_access_section_module#ansible-collections-check-point-mgmt-cp-mgmt-access-section-module) – Manages access-section objects on Checkpoint over Web Services API
* [cp\_mgmt\_add\_api\_key](cp_mgmt_add_api_key_module#ansible-collections-check-point-mgmt-cp-mgmt-add-api-key-module) – Add API key for administrator, to enable login with it. For the key to be valid publish is needed.
* [cp\_mgmt\_add\_data\_center\_object](cp_mgmt_add_data_center_object_module#ansible-collections-check-point-mgmt-cp-mgmt-add-data-center-object-module) – Imports a Data Center Object from a Data Center Server.<br> Data Center Object represents an object in the cloud environment.
* [cp\_mgmt\_add\_domain](cp_mgmt_add_domain_module#ansible-collections-check-point-mgmt-cp-mgmt-add-domain-module) – Create new object
* [cp\_mgmt\_add\_nat\_rule](cp_mgmt_add_nat_rule_module#ansible-collections-check-point-mgmt-cp-mgmt-add-nat-rule-module) – Create new object.
* [cp\_mgmt\_address\_range](cp_mgmt_address_range_module#ansible-collections-check-point-mgmt-cp-mgmt-address-range-module) – Manages address-range objects on Check Point over Web Services API
* [cp\_mgmt\_address\_range\_facts](cp_mgmt_address_range_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-address-range-facts-module) – Get address-range objects facts on Check Point over Web Services API
* [cp\_mgmt\_administrator](cp_mgmt_administrator_module#ansible-collections-check-point-mgmt-cp-mgmt-administrator-module) – Manages administrator objects on Checkpoint over Web Services API
* [cp\_mgmt\_administrator\_facts](cp_mgmt_administrator_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-administrator-facts-module) – Get administrator objects facts on Checkpoint over Web Services API
* [cp\_mgmt\_application\_site](cp_mgmt_application_site_module#ansible-collections-check-point-mgmt-cp-mgmt-application-site-module) – Manages application-site objects on Check Point over Web Services API
* [cp\_mgmt\_application\_site\_category](cp_mgmt_application_site_category_module#ansible-collections-check-point-mgmt-cp-mgmt-application-site-category-module) – Manages application-site-category objects on Check Point over Web Services API
* [cp\_mgmt\_application\_site\_category\_facts](cp_mgmt_application_site_category_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-application-site-category-facts-module) – Get application-site-category objects facts on Check Point over Web Services API
* [cp\_mgmt\_application\_site\_facts](cp_mgmt_application_site_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-application-site-facts-module) – Get application-site objects facts on Check Point over Web Services API
* [cp\_mgmt\_application\_site\_group](cp_mgmt_application_site_group_module#ansible-collections-check-point-mgmt-cp-mgmt-application-site-group-module) – Manages application-site-group objects on Check Point over Web Services API
* [cp\_mgmt\_application\_site\_group\_facts](cp_mgmt_application_site_group_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-application-site-group-facts-module) – Get application-site-group objects facts on Check Point over Web Services API
* [cp\_mgmt\_assign\_global\_assignment](cp_mgmt_assign_global_assignment_module#ansible-collections-check-point-mgmt-cp-mgmt-assign-global-assignment-module) – assign global assignment on Check Point over Web Services API
* [cp\_mgmt\_data\_center\_object\_facts](cp_mgmt_data_center_object_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-data-center-object-facts-module) – Get data-center-object objects facts on Checkpoint over Web Services API
* [cp\_mgmt\_delete\_api\_key](cp_mgmt_delete_api_key_module#ansible-collections-check-point-mgmt-cp-mgmt-delete-api-key-module) – Delete the API key. For the key to be invalid publish is needed.
* [cp\_mgmt\_delete\_data\_center\_object](cp_mgmt_delete_data_center_object_module#ansible-collections-check-point-mgmt-cp-mgmt-delete-data-center-object-module) – Delete existing object using object name or uid.
* [cp\_mgmt\_delete\_domain](cp_mgmt_delete_domain_module#ansible-collections-check-point-mgmt-cp-mgmt-delete-domain-module) – Delete existing object using object name or uid.
* [cp\_mgmt\_delete\_nat\_rule](cp_mgmt_delete_nat_rule_module#ansible-collections-check-point-mgmt-cp-mgmt-delete-nat-rule-module) – Delete existing object using object name or uid.
* [cp\_mgmt\_discard](cp_mgmt_discard_module#ansible-collections-check-point-mgmt-cp-mgmt-discard-module) – All changes done by user are discarded and removed from database.
* [cp\_mgmt\_dns\_domain](cp_mgmt_dns_domain_module#ansible-collections-check-point-mgmt-cp-mgmt-dns-domain-module) – Manages dns-domain objects on Check Point over Web Services API
* [cp\_mgmt\_dns\_domain\_facts](cp_mgmt_dns_domain_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-dns-domain-facts-module) – Get dns-domain objects facts on Check Point over Web Services API
* [cp\_mgmt\_domain\_facts](cp_mgmt_domain_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-domain-facts-module) – Get domain objects facts on Checkpoint over Web Services API
* [cp\_mgmt\_dynamic\_object](cp_mgmt_dynamic_object_module#ansible-collections-check-point-mgmt-cp-mgmt-dynamic-object-module) – Manages dynamic-object objects on Check Point over Web Services API
* [cp\_mgmt\_dynamic\_object\_facts](cp_mgmt_dynamic_object_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-dynamic-object-facts-module) – Get dynamic-object objects facts on Check Point over Web Services API
* [cp\_mgmt\_exception\_group](cp_mgmt_exception_group_module#ansible-collections-check-point-mgmt-cp-mgmt-exception-group-module) – Manages exception-group objects on Check Point over Web Services API
* [cp\_mgmt\_exception\_group\_facts](cp_mgmt_exception_group_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-exception-group-facts-module) – Get exception-group objects facts on Check Point over Web Services API
* [cp\_mgmt\_global\_assignment](cp_mgmt_global_assignment_module#ansible-collections-check-point-mgmt-cp-mgmt-global-assignment-module) – Manages global-assignment objects on Check Point over Web Services API
* [cp\_mgmt\_global\_assignment\_facts](cp_mgmt_global_assignment_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-global-assignment-facts-module) – Get global-assignment objects facts on Check Point over Web Services API
* [cp\_mgmt\_group](cp_mgmt_group_module#ansible-collections-check-point-mgmt-cp-mgmt-group-module) – Manages group objects on Check Point over Web Services API
* [cp\_mgmt\_group\_facts](cp_mgmt_group_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-group-facts-module) – Get group objects facts on Check Point over Web Services API
* [cp\_mgmt\_group\_with\_exclusion](cp_mgmt_group_with_exclusion_module#ansible-collections-check-point-mgmt-cp-mgmt-group-with-exclusion-module) – Manages group-with-exclusion objects on Check Point over Web Services API
* [cp\_mgmt\_group\_with\_exclusion\_facts](cp_mgmt_group_with_exclusion_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-group-with-exclusion-facts-module) – Get group-with-exclusion objects facts on Check Point over Web Services API
* [cp\_mgmt\_host](cp_mgmt_host_module#ansible-collections-check-point-mgmt-cp-mgmt-host-module) – Manages host objects on Check Point over Web Services API
* [cp\_mgmt\_host\_facts](cp_mgmt_host_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-host-facts-module) – Get host objects facts on Check Point over Web Services API
* [cp\_mgmt\_https\_section](cp_mgmt_https_section_module#ansible-collections-check-point-mgmt-cp-mgmt-https-section-module) – Manages https-section objects on Checkpoint over Web Services API
* [cp\_mgmt\_identity\_tag](cp_mgmt_identity_tag_module#ansible-collections-check-point-mgmt-cp-mgmt-identity-tag-module) – Manages identity-tag objects on Checkpoint over Web Services API
* [cp\_mgmt\_identity\_tag\_facts](cp_mgmt_identity_tag_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-identity-tag-facts-module) – Get identity-tag objects facts on Checkpoint over Web Services API
* [cp\_mgmt\_install\_database](cp_mgmt_install_database_module#ansible-collections-check-point-mgmt-cp-mgmt-install-database-module) – Copies the user database and network objects information to specified targets.
* [cp\_mgmt\_install\_policy](cp_mgmt_install_policy_module#ansible-collections-check-point-mgmt-cp-mgmt-install-policy-module) – install policy on Check Point over Web Services API
* [cp\_mgmt\_install\_software\_package](cp_mgmt_install_software_package_module#ansible-collections-check-point-mgmt-cp-mgmt-install-software-package-module) – Installs the software package on target machines.
* [cp\_mgmt\_mds](cp_mgmt_mds_module#ansible-collections-check-point-mgmt-cp-mgmt-mds-module) – Manages mds objects on Checkpoint over Web Services API
* [cp\_mgmt\_mds\_facts](cp_mgmt_mds_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-mds-facts-module) – Get Multi-Domain Server (mds) objects facts on Check Point over Web Services API
* [cp\_mgmt\_multicast\_address\_range](cp_mgmt_multicast_address_range_module#ansible-collections-check-point-mgmt-cp-mgmt-multicast-address-range-module) – Manages multicast-address-range objects on Check Point over Web Services API
* [cp\_mgmt\_multicast\_address\_range\_facts](cp_mgmt_multicast_address_range_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-multicast-address-range-facts-module) – Get multicast-address-range objects facts on Check Point over Web Services API
* [cp\_mgmt\_nat\_rule\_facts](cp_mgmt_nat_rule_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-nat-rule-facts-module) – Get nat-rule objects facts on Checkpoint over Web Services API
* [cp\_mgmt\_nat\_section](cp_mgmt_nat_section_module#ansible-collections-check-point-mgmt-cp-mgmt-nat-section-module) – Manages nat-section objects on Checkpoint over Web Services API
* [cp\_mgmt\_network](cp_mgmt_network_module#ansible-collections-check-point-mgmt-cp-mgmt-network-module) – Manages network objects on Check Point over Web Services API
* [cp\_mgmt\_network\_facts](cp_mgmt_network_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-network-facts-module) – Get network objects facts on Check Point over Web Services API
* [cp\_mgmt\_package](cp_mgmt_package_module#ansible-collections-check-point-mgmt-cp-mgmt-package-module) – Manages package objects on Check Point over Web Services API
* [cp\_mgmt\_package\_facts](cp_mgmt_package_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-package-facts-module) – Get package objects facts on Check Point over Web Services API
* [cp\_mgmt\_publish](cp_mgmt_publish_module#ansible-collections-check-point-mgmt-cp-mgmt-publish-module) – All the changes done by this user will be seen by all users only after publish is called.
* [cp\_mgmt\_put\_file](cp_mgmt_put_file_module#ansible-collections-check-point-mgmt-cp-mgmt-put-file-module) – put file on Check Point over Web Services API
* [cp\_mgmt\_run\_ips\_update](cp_mgmt_run_ips_update_module#ansible-collections-check-point-mgmt-cp-mgmt-run-ips-update-module) – Runs IPS database update. If “package-path” is not provided server will try to get the latest package from the User Center.
* [cp\_mgmt\_run\_script](cp_mgmt_run_script_module#ansible-collections-check-point-mgmt-cp-mgmt-run-script-module) – Executes the script on a given list of targets.
* [cp\_mgmt\_security\_zone](cp_mgmt_security_zone_module#ansible-collections-check-point-mgmt-cp-mgmt-security-zone-module) – Manages security-zone objects on Check Point over Web Services API
* [cp\_mgmt\_security\_zone\_facts](cp_mgmt_security_zone_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-security-zone-facts-module) – Get security-zone objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_dce\_rpc](cp_mgmt_service_dce_rpc_module#ansible-collections-check-point-mgmt-cp-mgmt-service-dce-rpc-module) – Manages service-dce-rpc objects on Check Point over Web Services API
* [cp\_mgmt\_service\_dce\_rpc\_facts](cp_mgmt_service_dce_rpc_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-dce-rpc-facts-module) – Get service-dce-rpc objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_group](cp_mgmt_service_group_module#ansible-collections-check-point-mgmt-cp-mgmt-service-group-module) – Manages service-group objects on Check Point over Web Services API
* [cp\_mgmt\_service\_group\_facts](cp_mgmt_service_group_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-group-facts-module) – Get service-group objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_icmp](cp_mgmt_service_icmp_module#ansible-collections-check-point-mgmt-cp-mgmt-service-icmp-module) – Manages service-icmp objects on Check Point over Web Services API
* [cp\_mgmt\_service\_icmp6](cp_mgmt_service_icmp6_module#ansible-collections-check-point-mgmt-cp-mgmt-service-icmp6-module) – Manages service-icmp6 objects on Check Point over Web Services API
* [cp\_mgmt\_service\_icmp6\_facts](cp_mgmt_service_icmp6_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-icmp6-facts-module) – Get service-icmp6 objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_icmp\_facts](cp_mgmt_service_icmp_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-icmp-facts-module) – Get service-icmp objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_other](cp_mgmt_service_other_module#ansible-collections-check-point-mgmt-cp-mgmt-service-other-module) – Manages service-other objects on Check Point over Web Services API
* [cp\_mgmt\_service\_other\_facts](cp_mgmt_service_other_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-other-facts-module) – Get service-other objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_rpc](cp_mgmt_service_rpc_module#ansible-collections-check-point-mgmt-cp-mgmt-service-rpc-module) – Manages service-rpc objects on Check Point over Web Services API
* [cp\_mgmt\_service\_rpc\_facts](cp_mgmt_service_rpc_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-rpc-facts-module) – Get service-rpc objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_sctp](cp_mgmt_service_sctp_module#ansible-collections-check-point-mgmt-cp-mgmt-service-sctp-module) – Manages service-sctp objects on Check Point over Web Services API
* [cp\_mgmt\_service\_sctp\_facts](cp_mgmt_service_sctp_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-sctp-facts-module) – Get service-sctp objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_tcp](cp_mgmt_service_tcp_module#ansible-collections-check-point-mgmt-cp-mgmt-service-tcp-module) – Manages service-tcp objects on Check Point over Web Services API
* [cp\_mgmt\_service\_tcp\_facts](cp_mgmt_service_tcp_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-tcp-facts-module) – Get service-tcp objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_udp](cp_mgmt_service_udp_module#ansible-collections-check-point-mgmt-cp-mgmt-service-udp-module) – Manages service-udp objects on Check Point over Web Services API
* [cp\_mgmt\_service\_udp\_facts](cp_mgmt_service_udp_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-udp-facts-module) – Get service-udp objects facts on Check Point over Web Services API
* [cp\_mgmt\_session\_facts](cp_mgmt_session_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-session-facts-module) – Get session objects facts on Check Point over Web Services API
* [cp\_mgmt\_set\_domain](cp_mgmt_set_domain_module#ansible-collections-check-point-mgmt-cp-mgmt-set-domain-module) – Edit existing object using object name or uid.
* [cp\_mgmt\_set\_nat\_rule](cp_mgmt_set_nat_rule_module#ansible-collections-check-point-mgmt-cp-mgmt-set-nat-rule-module) – Edit existing object using object name or uid.
* [cp\_mgmt\_set\_session](cp_mgmt_set_session_module#ansible-collections-check-point-mgmt-cp-mgmt-set-session-module) – Edit user’s current session.
* [cp\_mgmt\_show\_access\_section](cp_mgmt_show_access_section_module#ansible-collections-check-point-mgmt-cp-mgmt-show-access-section-module) – Retrieve existing object using object name or uid.
* [cp\_mgmt\_show\_https\_section](cp_mgmt_show_https_section_module#ansible-collections-check-point-mgmt-cp-mgmt-show-https-section-module) – Retrieve existing HTTPS Inspection section using section name or uid and layer name.
* [cp\_mgmt\_show\_logs](cp_mgmt_show_logs_module#ansible-collections-check-point-mgmt-cp-mgmt-show-logs-module) – Showing logs according to the given filter.
* [cp\_mgmt\_show\_nat\_section](cp_mgmt_show_nat_section_module#ansible-collections-check-point-mgmt-cp-mgmt-show-nat-section-module) – Retrieve existing object using object name or uid.
* [cp\_mgmt\_show\_software\_package\_details](cp_mgmt_show_software_package_details_module#ansible-collections-check-point-mgmt-cp-mgmt-show-software-package-details-module) – Gets the software package information from the cloud.
* [cp\_mgmt\_show\_task](cp_mgmt_show_task_module#ansible-collections-check-point-mgmt-cp-mgmt-show-task-module) – Show task progress and details.
* [cp\_mgmt\_show\_tasks](cp_mgmt_show_tasks_module#ansible-collections-check-point-mgmt-cp-mgmt-show-tasks-module) – Retrieve all tasks and show their progress and details.
* [cp\_mgmt\_simple\_gateway](cp_mgmt_simple_gateway_module#ansible-collections-check-point-mgmt-cp-mgmt-simple-gateway-module) – Manages simple-gateway objects on Check Point over Web Services API
* [cp\_mgmt\_simple\_gateway\_facts](cp_mgmt_simple_gateway_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-simple-gateway-facts-module) – Get simple-gateway objects facts on Check Point over Web Services API
* [cp\_mgmt\_tag](cp_mgmt_tag_module#ansible-collections-check-point-mgmt-cp-mgmt-tag-module) – Manages tag objects on Check Point over Web Services API
* [cp\_mgmt\_tag\_facts](cp_mgmt_tag_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-tag-facts-module) – Get tag objects facts on Check Point over Web Services API
* [cp\_mgmt\_threat\_exception](cp_mgmt_threat_exception_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-exception-module) – Manages threat-exception objects on Check Point over Web Services API
* [cp\_mgmt\_threat\_exception\_facts](cp_mgmt_threat_exception_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-exception-facts-module) – Get threat-exception objects facts on Check Point over Web Services API
* [cp\_mgmt\_threat\_indicator](cp_mgmt_threat_indicator_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-indicator-module) – Manages threat-indicator objects on Check Point over Web Services API
* [cp\_mgmt\_threat\_indicator\_facts](cp_mgmt_threat_indicator_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-indicator-facts-module) – Get threat-indicator objects facts on Check Point over Web Services API
* [cp\_mgmt\_threat\_layer](cp_mgmt_threat_layer_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-layer-module) – Manages threat-layer objects on Check Point over Web Services API
* [cp\_mgmt\_threat\_layer\_facts](cp_mgmt_threat_layer_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-layer-facts-module) – Get threat-layer objects facts on Check Point over Web Services API
* [cp\_mgmt\_threat\_profile](cp_mgmt_threat_profile_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-profile-module) – Manages threat-profile objects on Check Point over Web Services API
* [cp\_mgmt\_threat\_profile\_facts](cp_mgmt_threat_profile_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-profile-facts-module) – Get threat-profile objects facts on Check Point over Web Services API
* [cp\_mgmt\_threat\_protection\_override](cp_mgmt_threat_protection_override_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-protection-override-module) – Edit existing object using object name or uid.
* [cp\_mgmt\_threat\_rule](cp_mgmt_threat_rule_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-rule-module) – Manages threat-rule objects on Check Point over Web Services API
* [cp\_mgmt\_threat\_rule\_facts](cp_mgmt_threat_rule_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-rule-facts-module) – Get threat-rule objects facts on Check Point over Web Services API
* [cp\_mgmt\_time](cp_mgmt_time_module#ansible-collections-check-point-mgmt-cp-mgmt-time-module) – Manages time objects on Check Point over Web Services API
* [cp\_mgmt\_time\_facts](cp_mgmt_time_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-time-facts-module) – Get time objects facts on Check Point over Web Services API
* [cp\_mgmt\_trusted\_client](cp_mgmt_trusted_client_module#ansible-collections-check-point-mgmt-cp-mgmt-trusted-client-module) – Manages trusted-client objects on Checkpoint over Web Services API
* [cp\_mgmt\_trusted\_client\_facts](cp_mgmt_trusted_client_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-trusted-client-facts-module) – Get trusted-client objects facts on Checkpoint over Web Services API
* [cp\_mgmt\_uninstall\_software\_package](cp_mgmt_uninstall_software_package_module#ansible-collections-check-point-mgmt-cp-mgmt-uninstall-software-package-module) – Uninstalls the software package from target machines.
* [cp\_mgmt\_verify\_policy](cp_mgmt_verify_policy_module#ansible-collections-check-point-mgmt-cp-mgmt-verify-policy-module) – Verifies the policy of the selected package.
* [cp\_mgmt\_verify\_software\_package](cp_mgmt_verify_software_package_module#ansible-collections-check-point-mgmt-cp-mgmt-verify-software-package-module) – Verifies the software package on target machines.
* [cp\_mgmt\_vpn\_community\_meshed](cp_mgmt_vpn_community_meshed_module#ansible-collections-check-point-mgmt-cp-mgmt-vpn-community-meshed-module) – Manages vpn-community-meshed objects on Check Point over Web Services API
* [cp\_mgmt\_vpn\_community\_meshed\_facts](cp_mgmt_vpn_community_meshed_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-vpn-community-meshed-facts-module) – Get vpn-community-meshed objects facts on Check Point over Web Services API
* [cp\_mgmt\_vpn\_community\_star](cp_mgmt_vpn_community_star_module#ansible-collections-check-point-mgmt-cp-mgmt-vpn-community-star-module) – Manages vpn-community-star objects on Check Point over Web Services API
* [cp\_mgmt\_vpn\_community\_star\_facts](cp_mgmt_vpn_community_star_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-vpn-community-star-facts-module) – Get vpn-community-star objects facts on Check Point over Web Services API
* [cp\_mgmt\_wildcard](cp_mgmt_wildcard_module#ansible-collections-check-point-mgmt-cp-mgmt-wildcard-module) – Manages wildcard objects on Check Point over Web Services API
* [cp\_mgmt\_wildcard\_facts](cp_mgmt_wildcard_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-wildcard-facts-module) – Get wildcard objects facts on Check Point over Web Services API

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/check_point/mgmt/index.html>

Chocolatey.Chocolatey
=====================

 Collection version 1.1.0

 Plugin Index
------------

 These are the plugins in the chocolatey.chocolatey collection

 ### Modules

 * [win\_chocolatey](win_chocolatey_module#ansible-collections-chocolatey-chocolatey-win-chocolatey-module) – Manage packages using chocolatey
* [win\_chocolatey\_config](win_chocolatey_config_module#ansible-collections-chocolatey-chocolatey-win-chocolatey-config-module) – Manages Chocolatey config settings
* [win\_chocolatey\_facts](win_chocolatey_facts_module#ansible-collections-chocolatey-chocolatey-win-chocolatey-facts-module) – Create a facts collection for Chocolatey
* [win\_chocolatey\_feature](win_chocolatey_feature_module#ansible-collections-chocolatey-chocolatey-win-chocolatey-feature-module) – Manages Chocolatey features
* [win\_chocolatey\_source](win_chocolatey_source_module#ansible-collections-chocolatey-chocolatey-win-chocolatey-source-module) – Manages Chocolatey sources

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/chocolatey/chocolatey/index.html>

Cisco.Aci
=========

 Collection version 2.1.0

 Plugin Index
------------

 These are the plugins in the cisco.aci collection

 ### Modules

 * [aci\_aaa\_user](aci_aaa_user_module#ansible-collections-cisco-aci-aci-aaa-user-module) – Manage AAA users (aaa:User)
* [aci\_aaa\_user\_certificate](aci_aaa_user_certificate_module#ansible-collections-cisco-aci-aci-aaa-user-certificate-module) – Manage AAA user certificates (aaa:UserCert)
* [aci\_access\_port\_block\_to\_access\_port](aci_access_port_block_to_access_port_module#ansible-collections-cisco-aci-aci-access-port-block-to-access-port-module) – Manage port blocks of Fabric interface policy leaf profile interface selectors (infra:HPortS, infra:PortBlk)
* [aci\_access\_port\_to\_interface\_policy\_leaf\_profile](aci_access_port_to_interface_policy_leaf_profile_module#ansible-collections-cisco-aci-aci-access-port-to-interface-policy-leaf-profile-module) – Manage Fabric interface policy leaf profile interface selectors (infra:HPortS, infra:RsAccBaseGrp, infra:PortBlk)
* [aci\_access\_sub\_port\_block\_to\_access\_port](aci_access_sub_port_block_to_access_port_module#ansible-collections-cisco-aci-aci-access-sub-port-block-to-access-port-module) – Manage sub port blocks of Fabric interface policy leaf profile interface selectors (infra:HPortS, infra:SubPortBlk)
* [aci\_aep](aci_aep_module#ansible-collections-cisco-aci-aci-aep-module) – Manage attachable Access Entity Profile (AEP) objects (infra:AttEntityP, infra:ProvAcc)
* [aci\_aep\_to\_domain](aci_aep_to_domain_module#ansible-collections-cisco-aci-aci-aep-to-domain-module) – Bind AEPs to Physical or Virtual Domains (infra:RsDomP)
* [aci\_aep\_to\_epg](aci_aep_to_epg_module#ansible-collections-cisco-aci-aci-aep-to-epg-module) – Bind EPG to AEP (infra:RsFuncToEpg).
* [aci\_ap](aci_ap_module#ansible-collections-cisco-aci-aci-ap-module) – Manage top level Application Profile (AP) objects (fv:Ap)
* [aci\_bd](aci_bd_module#ansible-collections-cisco-aci-aci-bd-module) – Manage Bridge Domains (BD) objects (fv:BD)
* [aci\_bd\_dhcp\_label](aci_bd_dhcp_label_module#ansible-collections-cisco-aci-aci-bd-dhcp-label-module) – Manage DHCP Labels (dhcp:Lbl)
* [aci\_bd\_subnet](aci_bd_subnet_module#ansible-collections-cisco-aci-aci-bd-subnet-module) – Manage Subnets (fv:Subnet)
* [aci\_bd\_to\_l3out](aci_bd_to_l3out_module#ansible-collections-cisco-aci-aci-bd-to-l3out-module) – Bind Bridge Domain to L3 Out (fv:RsBDToOut)
* [aci\_cloud\_ap](aci_cloud_ap_module#ansible-collections-cisco-aci-aci-cloud-ap-module) – Manage Cloud Application Profile (AP) (cloud:App)
* [aci\_cloud\_aws\_provider](aci_cloud_aws_provider_module#ansible-collections-cisco-aci-aci-cloud-aws-provider-module) – Manage Cloud AWS Provider (cloud:AwsProvider)
* [aci\_cloud\_bgp\_asn](aci_cloud_bgp_asn_module#ansible-collections-cisco-aci-aci-cloud-bgp-asn-module) – Manage Cloud APIC BGP Autonomous System Profile (cloud:BgpAsP)
* [aci\_cloud\_cidr](aci_cloud_cidr_module#ansible-collections-cisco-aci-aci-cloud-cidr-module) – Manage CIDR under Cloud Context Profile (cloud:Cidr)
* [aci\_cloud\_ctx\_profile](aci_cloud_ctx_profile_module#ansible-collections-cisco-aci-aci-cloud-ctx-profile-module) – Manage Cloud Context Profile (cloud:CtxProfile)
* [aci\_cloud\_epg](aci_cloud_epg_module#ansible-collections-cisco-aci-aci-cloud-epg-module) – Manage Cloud EPG (cloud:EPg)
* [aci\_cloud\_epg\_selector](aci_cloud_epg_selector_module#ansible-collections-cisco-aci-aci-cloud-epg-selector-module) – Manage Cloud Endpoint Selector (cloud:EPSelector)
* [aci\_cloud\_external\_epg](aci_cloud_external_epg_module#ansible-collections-cisco-aci-aci-cloud-external-epg-module) – Manage Cloud External EPG (cloud:ExtEPg)
* [aci\_cloud\_external\_epg\_selector](aci_cloud_external_epg_selector_module#ansible-collections-cisco-aci-aci-cloud-external-epg-selector-module) – Manage Cloud Endpoint Selector for External EPGs (cloud:ExtEPSelector)
* [aci\_cloud\_provider](aci_cloud_provider_module#ansible-collections-cisco-aci-aci-cloud-provider-module) – Query Cloud Provider information (cloud:ProvP)
* [aci\_cloud\_region](aci_cloud_region_module#ansible-collections-cisco-aci-aci-cloud-region-module) – Manage Cloud Providers Region (cloud:Region)
* [aci\_cloud\_subnet](aci_cloud_subnet_module#ansible-collections-cisco-aci-aci-cloud-subnet-module) – Manage Cloud Subnet (cloud:Subnet)
* [aci\_cloud\_vpn\_gateway](aci_cloud_vpn_gateway_module#ansible-collections-cisco-aci-aci-cloud-vpn-gateway-module) – Manage cloudRouterP in Cloud Context Profile (cloud:cloudRouterP)
* [aci\_cloud\_zone](aci_cloud_zone_module#ansible-collections-cisco-aci-aci-cloud-zone-module) – Manage Cloud Availability Zone (cloud:Zone)
* [aci\_config\_rollback](aci_config_rollback_module#ansible-collections-cisco-aci-aci-config-rollback-module) – Provides rollback and rollback preview functionality (config:ImportP)
* [aci\_config\_snapshot](aci_config_snapshot_module#ansible-collections-cisco-aci-aci-config-snapshot-module) – Manage Config Snapshots (config:Snapshot, config:ExportP)
* [aci\_contract](aci_contract_module#ansible-collections-cisco-aci-aci-contract-module) – Manage contract resources (vz:BrCP)
* [aci\_contract\_export](aci_contract_export_module#ansible-collections-cisco-aci-aci-contract-export-module) – Manage contract interfaces (vz:CPIf)
* [aci\_contract\_subject](aci_contract_subject_module#ansible-collections-cisco-aci-aci-contract-subject-module) – Manage initial Contract Subjects (vz:Subj)
* [aci\_contract\_subject\_to\_filter](aci_contract_subject_to_filter_module#ansible-collections-cisco-aci-aci-contract-subject-to-filter-module) – Bind Contract Subjects to Filters (vz:RsSubjFiltAtt)
* [aci\_contract\_subject\_to\_service\_graph](aci_contract_subject_to_service_graph_module#ansible-collections-cisco-aci-aci-contract-subject-to-service-graph-module) – Bind contract subject to service graph (vz:RsSubjGraphAtt).
* [aci\_domain](aci_domain_module#ansible-collections-cisco-aci-aci-domain-module) – Manage physical, virtual, bridged, routed or FC domain profiles (phys:DomP, vmm:DomP, l2ext:DomP, l3ext:DomP, fc:DomP)
* [aci\_domain\_to\_encap\_pool](aci_domain_to_encap_pool_module#ansible-collections-cisco-aci-aci-domain-to-encap-pool-module) – Bind Domain to Encap Pools (infra:RsVlanNs)
* [aci\_domain\_to\_vlan\_pool](aci_domain_to_vlan_pool_module#ansible-collections-cisco-aci-aci-domain-to-vlan-pool-module) – Bind Domain to VLAN Pools (infra:RsVlanNs)
* [aci\_encap\_pool](aci_encap_pool_module#ansible-collections-cisco-aci-aci-encap-pool-module) – Manage encap pools (fvns:VlanInstP, fvns:VxlanInstP, fvns:VsanInstP)
* [aci\_encap\_pool\_range](aci_encap_pool_range_module#ansible-collections-cisco-aci-aci-encap-pool-range-module) – Manage encap ranges assigned to pools (fvns:EncapBlk, fvns:VsanEncapBlk)
* [aci\_epg](aci_epg_module#ansible-collections-cisco-aci-aci-epg-module) – Manage End Point Groups (EPG) objects (fv:AEPg)
* [aci\_epg\_monitoring\_policy](aci_epg_monitoring_policy_module#ansible-collections-cisco-aci-aci-epg-monitoring-policy-module) – Manage monitoring policies (mon:EPGPol)
* [aci\_epg\_to\_contract](aci_epg_to_contract_module#ansible-collections-cisco-aci-aci-epg-to-contract-module) – Bind EPGs to Contracts (fv:RsCons, fv:RsProv)
* [aci\_epg\_to\_contract\_master](aci_epg_to_contract_master_module#ansible-collections-cisco-aci-aci-epg-to-contract-master-module) – Manage End Point Group (EPG) contract master relationships (fv:RsSecInherited)
* [aci\_epg\_to\_domain](aci_epg_to_domain_module#ansible-collections-cisco-aci-aci-epg-to-domain-module) – Bind EPGs to Domains (fv:RsDomAtt)
* [aci\_fabric\_node](aci_fabric_node_module#ansible-collections-cisco-aci-aci-fabric-node-module) – Manage Fabric Node Members (fabric:NodeIdentP)
* [aci\_fabric\_scheduler](aci_fabric_scheduler_module#ansible-collections-cisco-aci-aci-fabric-scheduler-module) – This modules creates ACI schedulers.
* [aci\_fabric\_spine\_profile](aci_fabric_spine_profile_module#ansible-collections-cisco-aci-aci-fabric-spine-profile-module) – Manage fabric spine profiles (fabric:SpineP).
* [aci\_fabric\_spine\_switch\_assoc](aci_fabric_spine_switch_assoc_module#ansible-collections-cisco-aci-aci-fabric-spine-switch-assoc-module) – Manage spine switch bindings to profiles and policy groups (fabric:SpineS and fabric:RsSpNodePGrp).
* [aci\_fabric\_switch\_block](aci_fabric_switch_block_module#ansible-collections-cisco-aci-aci-fabric-switch-block-module) – Manage switch blocks (fabric:NodeBlk).
* [aci\_filter](aci_filter_module#ansible-collections-cisco-aci-aci-filter-module) – Manages top level filter objects (vz:Filter)
* [aci\_filter\_entry](aci_filter_entry_module#ansible-collections-cisco-aci-aci-filter-entry-module) – Manage filter entries (vz:Entry)
* [aci\_firmware\_group](aci_firmware_group_module#ansible-collections-cisco-aci-aci-firmware-group-module) – This module creates a firmware group
* [aci\_firmware\_group\_node](aci_firmware_group_node_module#ansible-collections-cisco-aci-aci-firmware-group-node-module) – This modules adds and remove nodes from the firmware group
* [aci\_firmware\_policy](aci_firmware_policy_module#ansible-collections-cisco-aci-aci-firmware-policy-module) – This creates a firmware policy
* [aci\_firmware\_source](aci_firmware_source_module#ansible-collections-cisco-aci-aci-firmware-source-module) – Manage firmware image sources (firmware:OSource)
* [aci\_interface\_blacklist](aci_interface_blacklist_module#ansible-collections-cisco-aci-aci-interface-blacklist-module) – Enabling or Disabling physical interfaces.
* [aci\_interface\_description](aci_interface_description_module#ansible-collections-cisco-aci-aci-interface-description-module) – Setting and removing description on physical interfaces.
* [aci\_interface\_policy\_cdp](aci_interface_policy_cdp_module#ansible-collections-cisco-aci-aci-interface-policy-cdp-module) – Manage CDP interface policies (cdp:IfPol)
* [aci\_interface\_policy\_fc](aci_interface_policy_fc_module#ansible-collections-cisco-aci-aci-interface-policy-fc-module) – Manage Fibre Channel interface policies (fc:IfPol)
* [aci\_interface\_policy\_l2](aci_interface_policy_l2_module#ansible-collections-cisco-aci-aci-interface-policy-l2-module) – Manage Layer 2 interface policies (l2:IfPol)
* [aci\_interface\_policy\_leaf\_breakout\_port\_group](aci_interface_policy_leaf_breakout_port_group_module#ansible-collections-cisco-aci-aci-interface-policy-leaf-breakout-port-group-module) – Manage fabric interface policy leaf breakout port group (infra:BrkoutPortGrp)
* [aci\_interface\_policy\_leaf\_policy\_group](aci_interface_policy_leaf_policy_group_module#ansible-collections-cisco-aci-aci-interface-policy-leaf-policy-group-module) – Manage fabric interface policy leaf policy groups (infra:AccBndlGrp, infra:AccPortGrp)
* [aci\_interface\_policy\_leaf\_profile](aci_interface_policy_leaf_profile_module#ansible-collections-cisco-aci-aci-interface-policy-leaf-profile-module) – Manage fabric interface policy leaf profiles (infra:AccPortP)
* [aci\_interface\_policy\_link\_level](aci_interface_policy_link_level_module#ansible-collections-cisco-aci-aci-interface-policy-link-level-module) – Manage Link Level interface policies (fabric:HIfPol)
* [aci\_interface\_policy\_lldp](aci_interface_policy_lldp_module#ansible-collections-cisco-aci-aci-interface-policy-lldp-module) – Manage LLDP interface policies (lldp:IfPol)
* [aci\_interface\_policy\_mcp](aci_interface_policy_mcp_module#ansible-collections-cisco-aci-aci-interface-policy-mcp-module) – Manage MCP interface policies (mcp:IfPol)
* [aci\_interface\_policy\_ospf](aci_interface_policy_ospf_module#ansible-collections-cisco-aci-aci-interface-policy-ospf-module) – Manage OSPF interface policies (ospf:IfPol)
* [aci\_interface\_policy\_port\_channel](aci_interface_policy_port_channel_module#ansible-collections-cisco-aci-aci-interface-policy-port-channel-module) – Manage port channel interface policies (lacp:LagPol)
* [aci\_interface\_policy\_port\_security](aci_interface_policy_port_security_module#ansible-collections-cisco-aci-aci-interface-policy-port-security-module) – Manage port security (l2:PortSecurityPol)
* [aci\_interface\_selector\_to\_switch\_policy\_leaf\_profile](aci_interface_selector_to_switch_policy_leaf_profile_module#ansible-collections-cisco-aci-aci-interface-selector-to-switch-policy-leaf-profile-module) – Bind interface selector profiles to switch policy leaf profiles (infra:RsAccPortP)
* [aci\_l2out](aci_l2out_module#ansible-collections-cisco-aci-aci-l2out-module) – Manage Layer2 Out (L2Out) objects.
* [aci\_l2out\_extepg](aci_l2out_extepg_module#ansible-collections-cisco-aci-aci-l2out-extepg-module) – Manage External Network Instance (L2Out External EPG) objects (l2extInstP).
* [aci\_l2out\_extepg\_to\_contract](aci_l2out_extepg_to_contract_module#ansible-collections-cisco-aci-aci-l2out-extepg-to-contract-module) – Bind Contracts to L2 External End Point Groups (EPGs)
* [aci\_l2out\_logical\_interface\_path](aci_l2out_logical_interface_path_module#ansible-collections-cisco-aci-aci-l2out-logical-interface-path-module) – Manage Layer 2 Outside (L2Out) logical interface path (l2extRsPathL2OutAtt)
* [aci\_l2out\_logical\_interface\_profile](aci_l2out_logical_interface_profile_module#ansible-collections-cisco-aci-aci-l2out-logical-interface-profile-module) – Manage Layer 2 Outside (L2Out) interface profiles (l2ext:LIfP)
* [aci\_l2out\_logical\_node\_profile](aci_l2out_logical_node_profile_module#ansible-collections-cisco-aci-aci-l2out-logical-node-profile-module) – Manage Layer 2 Outside (L2Out) logical node profiles (l2ext:LNodeP)
* [aci\_l3out](aci_l3out_module#ansible-collections-cisco-aci-aci-l3out-module) – Manage Layer 3 Outside (L3Out) objects (l3ext:Out)
* [aci\_l3out\_bgp\_peer](aci_l3out_bgp_peer_module#ansible-collections-cisco-aci-aci-l3out-bgp-peer-module) – Manage Layer 3 Outside (L3Out) BGP Peers (bgp:PeerP)
* [aci\_l3out\_extepg](aci_l3out_extepg_module#ansible-collections-cisco-aci-aci-l3out-extepg-module) – Manage External Network Instance Profile (ExtEpg) objects (l3extInstP:instP)
* [aci\_l3out\_extepg\_to\_contract](aci_l3out_extepg_to_contract_module#ansible-collections-cisco-aci-aci-l3out-extepg-to-contract-module) – Bind Contracts to External End Point Groups (EPGs)
* [aci\_l3out\_extsubnet](aci_l3out_extsubnet_module#ansible-collections-cisco-aci-aci-l3out-extsubnet-module) – Manage External Subnet objects (l3extSubnet:extsubnet)
* [aci\_l3out\_interface](aci_l3out_interface_module#ansible-collections-cisco-aci-aci-l3out-interface-module) – Manage Layer 3 Outside (L3Out) interfaces (l3ext:RsPathL3OutAtt)
* [aci\_l3out\_logical\_interface\_profile](aci_l3out_logical_interface_profile_module#ansible-collections-cisco-aci-aci-l3out-logical-interface-profile-module) – Manage Layer 3 Outside (L3Out) logical interface profiles (l3ext:LIfP)
* [aci\_l3out\_logical\_interface\_vpc\_member](aci_l3out_logical_interface_vpc_member_module#ansible-collections-cisco-aci-aci-l3out-logical-interface-vpc-member-module) – Manage Member Node objects (l3extMember:Member)
* [aci\_l3out\_logical\_node](aci_l3out_logical_node_module#ansible-collections-cisco-aci-aci-l3out-logical-node-module) – Manage Layer 3 Outside (L3Out) logical node profile nodes (l3ext:RsNodeL3OutAtt)
* [aci\_l3out\_logical\_node\_profile](aci_l3out_logical_node_profile_module#ansible-collections-cisco-aci-aci-l3out-logical-node-profile-module) – Manage Layer 3 Outside (L3Out) logical node profiles (l3extLNodeP:lnodep)
* [aci\_l3out\_route\_tag\_policy](aci_l3out_route_tag_policy_module#ansible-collections-cisco-aci-aci-l3out-route-tag-policy-module) – Manage route tag policies (l3ext:RouteTagPol)
* [aci\_l3out\_static\_routes](aci_l3out_static_routes_module#ansible-collections-cisco-aci-aci-l3out-static-routes-module) – Manage Static routes object (l3ext:ipRouteP)
* [aci\_l3out\_static\_routes\_nexthop](aci_l3out_static_routes_nexthop_module#ansible-collections-cisco-aci-aci-l3out-static-routes-nexthop-module) – Manage nexthops for static routes (ip:NexthopP)
* [aci\_maintenance\_group](aci_maintenance_group_module#ansible-collections-cisco-aci-aci-maintenance-group-module) – This creates an ACI maintenance group
* [aci\_maintenance\_group\_node](aci_maintenance_group_node_module#ansible-collections-cisco-aci-aci-maintenance-group-node-module) – Manage maintenance group nodes
* [aci\_maintenance\_policy](aci_maintenance_policy_module#ansible-collections-cisco-aci-aci-maintenance-policy-module) – Manage firmware maintenance policies
* [aci\_node\_mgmt\_epg](aci_node_mgmt_epg_module#ansible-collections-cisco-aci-aci-node-mgmt-epg-module) – In band or Out of band management EPGs
* [aci\_rest](aci_rest_module#ansible-collections-cisco-aci-aci-rest-module) – Direct access to the Cisco APIC REST API
* [aci\_snmp\_client](aci_snmp_client_module#ansible-collections-cisco-aci-aci-snmp-client-module) – Manage SNMP clients (<snmp:ClientP>).
* [aci\_snmp\_client\_group](aci_snmp_client_group_module#ansible-collections-cisco-aci-aci-snmp-client-group-module) – Manage SNMP client groups (<snmp:ClientGrpP>).
* [aci\_snmp\_community\_policy](aci_snmp_community_policy_module#ansible-collections-cisco-aci-aci-snmp-community-policy-module) – Manage SNMP community policies (<snmp:CommunityP>).
* [aci\_snmp\_policy](aci_snmp_policy_module#ansible-collections-cisco-aci-aci-snmp-policy-module) – Manage Syslog groups (<snmp:Pol>).
* [aci\_snmp\_user](aci_snmp_user_module#ansible-collections-cisco-aci-aci-snmp-user-module) – Manage SNMP v3 Users (<snmp:UserP>).
* [aci\_static\_binding\_to\_epg](aci_static_binding_to_epg_module#ansible-collections-cisco-aci-aci-static-binding-to-epg-module) – Bind static paths to EPGs (fv:RsPathAtt)
* [aci\_static\_node\_mgmt\_address](aci_static_node_mgmt_address_module#ansible-collections-cisco-aci-aci-static-node-mgmt-address-module) – In band or Out of band management IP address
* [aci\_switch\_leaf\_selector](aci_switch_leaf_selector_module#ansible-collections-cisco-aci-aci-switch-leaf-selector-module) – Bind leaf selectors to switch policy leaf profiles (infra:LeafS, infra:NodeBlk, infra:RsAccNodePGrep)
* [aci\_switch\_policy\_leaf\_profile](aci_switch_policy_leaf_profile_module#ansible-collections-cisco-aci-aci-switch-policy-leaf-profile-module) – Manage switch policy leaf profiles (infra:NodeP)
* [aci\_switch\_policy\_vpc\_protection\_group](aci_switch_policy_vpc_protection_group_module#ansible-collections-cisco-aci-aci-switch-policy-vpc-protection-group-module) – Manage switch policy explicit vPC protection groups (fabric:ExplicitGEp, fabric:NodePEp).
* [aci\_syslog\_group](aci_syslog_group_module#ansible-collections-cisco-aci-aci-syslog-group-module) – Manage Syslog groups (syslog:Group, syslog:Console, syslog:File and syslog:Prof).
* [aci\_syslog\_remote\_dest](aci_syslog_remote_dest_module#ansible-collections-cisco-aci-aci-syslog-remote-dest-module) – Manage Syslog Remote Destinations (syslog:RemoteDest).
* [aci\_syslog\_source](aci_syslog_source_module#ansible-collections-cisco-aci-aci-syslog-source-module) – Manage Syslog Source objects (syslog:Src)
* [aci\_system](aci_system_module#ansible-collections-cisco-aci-aci-system-module) – Query the ACI system information (top:System)
* [aci\_taboo\_contract](aci_taboo_contract_module#ansible-collections-cisco-aci-aci-taboo-contract-module) – Manage taboo contracts (vz:BrCP)
* [aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) – Manage tenants (fv:Tenant)
* [aci\_tenant\_action\_rule\_profile](aci_tenant_action_rule_profile_module#ansible-collections-cisco-aci-aci-tenant-action-rule-profile-module) – Manage action rule profiles (rtctrl:AttrP)
* [aci\_tenant\_ep\_retention\_policy](aci_tenant_ep_retention_policy_module#ansible-collections-cisco-aci-aci-tenant-ep-retention-policy-module) – Manage End Point (EP) retention protocol policies (fv:EpRetPol)
* [aci\_tenant\_span\_dst\_group](aci_tenant_span_dst_group_module#ansible-collections-cisco-aci-aci-tenant-span-dst-group-module) – Manage SPAN destination groups (span:DestGrp)
* [aci\_tenant\_span\_src\_group](aci_tenant_span_src_group_module#ansible-collections-cisco-aci-aci-tenant-span-src-group-module) – Manage SPAN source groups (span:SrcGrp)
* [aci\_tenant\_span\_src\_group\_to\_dst\_group](aci_tenant_span_src_group_to_dst_group_module#ansible-collections-cisco-aci-aci-tenant-span-src-group-to-dst-group-module) – Bind SPAN source groups to destination groups (span:SpanLbl)
* [aci\_vlan\_pool](aci_vlan_pool_module#ansible-collections-cisco-aci-aci-vlan-pool-module) – Manage VLAN pools (fvns:VlanInstP)
* [aci\_vlan\_pool\_encap\_block](aci_vlan_pool_encap_block_module#ansible-collections-cisco-aci-aci-vlan-pool-encap-block-module) – Manage encap blocks assigned to VLAN pools (fvns:EncapBlk)
* [aci\_vmm\_controller](aci_vmm_controller_module#ansible-collections-cisco-aci-aci-vmm-controller-module) – Manage VMM Controller for virtual domains profiles (vmm:CtrlrP)
* [aci\_vmm\_credential](aci_vmm_credential_module#ansible-collections-cisco-aci-aci-vmm-credential-module) – Manage virtual domain credential profiles (vmm:UsrAccP)
* [aci\_vmm\_vswitch\_policy](aci_vmm_vswitch_policy_module#ansible-collections-cisco-aci-aci-vmm-vswitch-policy-module) – Manage vSwitch policy for VMware virtual domains profiles (vmm:DomP)
* [aci\_vrf](aci_vrf_module#ansible-collections-cisco-aci-aci-vrf-module) – Manage contexts or VRFs (fv:Ctx)
* [aci\_vzany\_to\_contract](aci_vzany_to_contract_module#ansible-collections-cisco-aci-aci-vzany-to-contract-module) – Attach contracts to vzAny (vz:RsAnyToProv, vz:RsAnyToCons, vz:RsAnyToConsIf)

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/aci/index.html>

Cisco.Asa
=========

 Collection version 2.1.0

 Plugin Index
------------

 These are the plugins in the cisco.asa collection

 ### Cliconf Plugins

 * [asa](asa_cliconf#ansible-collections-cisco-asa-asa-cliconf) – Use asa cliconf to run command on Cisco ASA platform

 ### Modules

 * [asa\_acl](asa_acl_module#ansible-collections-cisco-asa-asa-acl-module) – (deprecated, removed after 2022-06-01) Manage access-lists on a Cisco ASA
* [asa\_acls](asa_acls_module#ansible-collections-cisco-asa-asa-acls-module) – Access-Lists resource module
* [asa\_command](asa_command_module#ansible-collections-cisco-asa-asa-command-module) – Run arbitrary commands on Cisco ASA devices
* [asa\_config](asa_config_module#ansible-collections-cisco-asa-asa-config-module) – Manage configuration sections on Cisco ASA devices
* [asa\_facts](asa_facts_module#ansible-collections-cisco-asa-asa-facts-module) – Collect facts from remote devices running Cisco ASA
* [asa\_og](asa_og_module#ansible-collections-cisco-asa-asa-og-module) – (deprecated, removed after 2022-06-01) Manage object groups on a Cisco ASA
* [asa\_ogs](asa_ogs_module#ansible-collections-cisco-asa-asa-ogs-module) – Object Group resource module

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/asa/index.html>

Cisco.Intersight
================

 Collection version 1.0.17

 Plugin Index
------------

 These are the plugins in the cisco.intersight collection

 ### Modules

 * [intersight\_boot\_order\_policy](intersight_boot_order_policy_module#ansible-collections-cisco-intersight-intersight-boot-order-policy-module) –
* [intersight\_imc\_access\_policy](intersight_imc_access_policy_module#ansible-collections-cisco-intersight-intersight-imc-access-policy-module) – IMC Access Policy configuration for Cisco Intersight
* [intersight\_info](intersight_info_module#ansible-collections-cisco-intersight-intersight-info-module) – Gather information about Intersight
* [intersight\_ntp\_policy](intersight_ntp_policy_module#ansible-collections-cisco-intersight-intersight-ntp-policy-module) – NTP policy configuration for Cisco Intersight
* [intersight\_rest\_api](intersight_rest_api_module#ansible-collections-cisco-intersight-intersight-rest-api-module) – REST API configuration for Cisco Intersight
* [intersight\_server\_profile](intersight_server_profile_module#ansible-collections-cisco-intersight-intersight-server-profile-module) – Server Profile configuration for Cisco Intersight
* [intersight\_target\_claim](intersight_target_claim_module#ansible-collections-cisco-intersight-intersight-target-claim-module) – Target claim configuraiton for Cisco Intersight
* [intersight\_virtual\_media\_policy](intersight_virtual_media_policy_module#ansible-collections-cisco-intersight-intersight-virtual-media-policy-module) – Virtual Media policy configuration for Cisco Intersight

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/intersight/index.html>

Cisco.Ios
=========

 Collection version 2.5.0

 Plugin Index
------------

 These are the plugins in the cisco.ios collection

 ### Cliconf Plugins

 * [ios](ios_cliconf#ansible-collections-cisco-ios-ios-cliconf) – Use ios cliconf to run command on Cisco IOS platform

 ### Modules

 * [ios\_acl\_interfaces](ios_acl_interfaces_module#ansible-collections-cisco-ios-ios-acl-interfaces-module) – ACL interfaces resource module
* [ios\_acls](ios_acls_module#ansible-collections-cisco-ios-ios-acls-module) – ACLs resource module
* [ios\_banner](ios_banner_module#ansible-collections-cisco-ios-ios-banner-module) – Manage multiline banners on Cisco IOS devices
* [ios\_bgp](ios_bgp_module#ansible-collections-cisco-ios-ios-bgp-module) – Configure global BGP protocol settings on Cisco IOS.
* [ios\_bgp\_address\_family](ios_bgp_address_family_module#ansible-collections-cisco-ios-ios-bgp-address-family-module) – BGP Address family resource module
* [ios\_bgp\_global](ios_bgp_global_module#ansible-collections-cisco-ios-ios-bgp-global-module) – Global BGP resource module
* [ios\_command](ios_command_module#ansible-collections-cisco-ios-ios-command-module) – Run commands on remote devices running Cisco IOS
* [ios\_config](ios_config_module#ansible-collections-cisco-ios-ios-config-module) – Manage Cisco IOS configuration sections
* [ios\_facts](ios_facts_module#ansible-collections-cisco-ios-ios-facts-module) – Collect facts from remote devices running Cisco IOS
* [ios\_interface](ios_interface_module#ansible-collections-cisco-ios-ios-interface-module) – (deprecated, removed after 2022-06-01) Manage Interface on Cisco IOS network devices
* [ios\_interfaces](ios_interfaces_module#ansible-collections-cisco-ios-ios-interfaces-module) – Interfaces resource module
* [ios\_l2\_interface](ios_l2_interface_module#ansible-collections-cisco-ios-ios-l2-interface-module) – (deprecated, removed after 2022-06-01) Manage Layer-2 interface on Cisco IOS devices.
* [ios\_l2\_interfaces](ios_l2_interfaces_module#ansible-collections-cisco-ios-ios-l2-interfaces-module) – L2 interfaces resource module
* [ios\_l3\_interface](ios_l3_interface_module#ansible-collections-cisco-ios-ios-l3-interface-module) – (deprecated, removed after 2022-06-01) Manage Layer-3 interfaces on Cisco IOS network devices.
* [ios\_l3\_interfaces](ios_l3_interfaces_module#ansible-collections-cisco-ios-ios-l3-interfaces-module) – L3 interfaces resource module
* [ios\_lacp](ios_lacp_module#ansible-collections-cisco-ios-ios-lacp-module) – LACP resource module
* [ios\_lacp\_interfaces](ios_lacp_interfaces_module#ansible-collections-cisco-ios-ios-lacp-interfaces-module) – LACP interfaces resource module
* [ios\_lag\_interfaces](ios_lag_interfaces_module#ansible-collections-cisco-ios-ios-lag-interfaces-module) – LAG interfaces resource module
* [ios\_linkagg](ios_linkagg_module#ansible-collections-cisco-ios-ios-linkagg-module) – Manage link aggregation groups on Cisco IOS network devices
* [ios\_lldp](ios_lldp_module#ansible-collections-cisco-ios-ios-lldp-module) – Manage LLDP configuration on Cisco IOS network devices.
* [ios\_lldp\_global](ios_lldp_global_module#ansible-collections-cisco-ios-ios-lldp-global-module) – LLDP resource module
* [ios\_lldp\_interfaces](ios_lldp_interfaces_module#ansible-collections-cisco-ios-ios-lldp-interfaces-module) – LLDP interfaces resource module
* [ios\_logging](ios_logging_module#ansible-collections-cisco-ios-ios-logging-module) – (deprecated, removed after 2023-06-01) Manage logging on network devices
* [ios\_logging\_global](ios_logging_global_module#ansible-collections-cisco-ios-ios-logging-global-module) – Logging resource module
* [ios\_ntp](ios_ntp_module#ansible-collections-cisco-ios-ios-ntp-module) – Manages core NTP configuration.
* [ios\_ntp\_global](ios_ntp_global_module#ansible-collections-cisco-ios-ios-ntp-global-module) – ntp\_global resource module
* [ios\_ospf\_interfaces](ios_ospf_interfaces_module#ansible-collections-cisco-ios-ios-ospf-interfaces-module) – OSPF\_Interfaces resource module
* [ios\_ospfv2](ios_ospfv2_module#ansible-collections-cisco-ios-ios-ospfv2-module) – OSPFv2 resource module
* [ios\_ospfv3](ios_ospfv3_module#ansible-collections-cisco-ios-ios-ospfv3-module) – OSPFv3 resource module
* [ios\_ping](ios_ping_module#ansible-collections-cisco-ios-ios-ping-module) – Tests reachability using ping from Cisco IOS network devices
* [ios\_prefix\_lists](ios_prefix_lists_module#ansible-collections-cisco-ios-ios-prefix-lists-module) – Prefix Lists resource module
* [ios\_route\_maps](ios_route_maps_module#ansible-collections-cisco-ios-ios-route-maps-module) – Route maps resource module
* [ios\_static\_route](ios_static_route_module#ansible-collections-cisco-ios-ios-static-route-module) – (deprecated, removed after 2022-06-01) Manage static IP routes on Cisco IOS network devices
* [ios\_static\_routes](ios_static_routes_module#ansible-collections-cisco-ios-ios-static-routes-module) – Static routes resource module
* [ios\_system](ios_system_module#ansible-collections-cisco-ios-ios-system-module) – Manage the system attributes on Cisco IOS devices
* [ios\_user](ios_user_module#ansible-collections-cisco-ios-ios-user-module) – Manage the aggregate of local users on Cisco IOS device
* [ios\_vlan](ios_vlan_module#ansible-collections-cisco-ios-ios-vlan-module) – (deprecated, removed after 2022-06-01) Manage VLANs on IOS network devices
* [ios\_vlans](ios_vlans_module#ansible-collections-cisco-ios-ios-vlans-module) – VLANs resource module
* [ios\_vrf](ios_vrf_module#ansible-collections-cisco-ios-ios-vrf-module) – Manage the collection of VRF definitions on Cisco IOS devices

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/ios/index.html>

Cisco.Iosxr
===========

 Collection version 2.5.0

 Plugin Index
------------

 These are the plugins in the cisco.iosxr collection

 ### Cliconf Plugins

 * [iosxr](iosxr_cliconf#ansible-collections-cisco-iosxr-iosxr-cliconf) – Use iosxr cliconf to run command on Cisco IOS XR platform

 ### Modules

 * [iosxr\_acl\_interfaces](iosxr_acl_interfaces_module#ansible-collections-cisco-iosxr-iosxr-acl-interfaces-module) – ACL interfaces resource module
* [iosxr\_acls](iosxr_acls_module#ansible-collections-cisco-iosxr-iosxr-acls-module) – ACLs resource module
* [iosxr\_banner](iosxr_banner_module#ansible-collections-cisco-iosxr-iosxr-banner-module) – Manage multiline banners on Cisco IOS XR devices
* [iosxr\_bgp](iosxr_bgp_module#ansible-collections-cisco-iosxr-iosxr-bgp-module) – Configure global BGP protocol settings on Cisco IOS-XR
* [iosxr\_bgp\_address\_family](iosxr_bgp_address_family_module#ansible-collections-cisco-iosxr-iosxr-bgp-address-family-module) – Manages BGP Address Family resource module.
* [iosxr\_bgp\_global](iosxr_bgp_global_module#ansible-collections-cisco-iosxr-iosxr-bgp-global-module) – Manages BGP global resource module.
* [iosxr\_bgp\_neighbor\_address\_family](iosxr_bgp_neighbor_address_family_module#ansible-collections-cisco-iosxr-iosxr-bgp-neighbor-address-family-module) – Manages BGP neighbor address family resource module.
* [iosxr\_command](iosxr_command_module#ansible-collections-cisco-iosxr-iosxr-command-module) – Run commands on remote devices running Cisco IOS XR
* [iosxr\_config](iosxr_config_module#ansible-collections-cisco-iosxr-iosxr-config-module) – Manage Cisco IOS XR configuration sections
* [iosxr\_facts](iosxr_facts_module#ansible-collections-cisco-iosxr-iosxr-facts-module) – Get facts about iosxr devices.
* [iosxr\_interface](iosxr_interface_module#ansible-collections-cisco-iosxr-iosxr-interface-module) – (deprecated, removed after 2022-06-01) Manage Interface on Cisco IOS XR network devices
* [iosxr\_interfaces](iosxr_interfaces_module#ansible-collections-cisco-iosxr-iosxr-interfaces-module) – Interfaces resource module
* [iosxr\_l2\_interfaces](iosxr_l2_interfaces_module#ansible-collections-cisco-iosxr-iosxr-l2-interfaces-module) – L2 interfaces resource module
* [iosxr\_l3\_interfaces](iosxr_l3_interfaces_module#ansible-collections-cisco-iosxr-iosxr-l3-interfaces-module) – L3 interfaces resource module
* [iosxr\_lacp](iosxr_lacp_module#ansible-collections-cisco-iosxr-iosxr-lacp-module) – LACP resource module
* [iosxr\_lacp\_interfaces](iosxr_lacp_interfaces_module#ansible-collections-cisco-iosxr-iosxr-lacp-interfaces-module) – LACP interfaces resource module
* [iosxr\_lag\_interfaces](iosxr_lag_interfaces_module#ansible-collections-cisco-iosxr-iosxr-lag-interfaces-module) – LAG interfaces resource module
* [iosxr\_lldp\_global](iosxr_lldp_global_module#ansible-collections-cisco-iosxr-iosxr-lldp-global-module) – LLDP resource module
* [iosxr\_lldp\_interfaces](iosxr_lldp_interfaces_module#ansible-collections-cisco-iosxr-iosxr-lldp-interfaces-module) – LLDP interfaces resource module
* [iosxr\_logging](iosxr_logging_module#ansible-collections-cisco-iosxr-iosxr-logging-module) – Configuration management of system logging services on network devices
* [iosxr\_logging\_global](iosxr_logging_global_module#ansible-collections-cisco-iosxr-iosxr-logging-global-module) – Manages logging attributes of Cisco IOSXR network devices
* [iosxr\_netconf](iosxr_netconf_module#ansible-collections-cisco-iosxr-iosxr-netconf-module) – Configures NetConf sub-system service on Cisco IOS-XR devices
* [iosxr\_ntp\_global](iosxr_ntp_global_module#ansible-collections-cisco-iosxr-iosxr-ntp-global-module) – Manages ntp resource module
* [iosxr\_ospf\_interfaces](iosxr_ospf_interfaces_module#ansible-collections-cisco-iosxr-iosxr-ospf-interfaces-module) – OSPF Interfaces Resource Module.
* [iosxr\_ospfv2](iosxr_ospfv2_module#ansible-collections-cisco-iosxr-iosxr-ospfv2-module) – OSPFv2 resource module
* [iosxr\_ospfv3](iosxr_ospfv3_module#ansible-collections-cisco-iosxr-iosxr-ospfv3-module) – ospfv3 resource module
* [iosxr\_prefix\_lists](iosxr_prefix_lists_module#ansible-collections-cisco-iosxr-iosxr-prefix-lists-module) – Prefix-Lists resource module.
* [iosxr\_static\_routes](iosxr_static_routes_module#ansible-collections-cisco-iosxr-iosxr-static-routes-module) – Static routes resource module
* [iosxr\_system](iosxr_system_module#ansible-collections-cisco-iosxr-iosxr-system-module) – Manage the system attributes on Cisco IOS XR devices
* [iosxr\_user](iosxr_user_module#ansible-collections-cisco-iosxr-iosxr-user-module) – Manage the aggregate of local users on Cisco IOS XR device

 ### Netconf Plugins

 * [iosxr](iosxr_netconf#ansible-collections-cisco-iosxr-iosxr-netconf) – Use iosxr netconf plugin to run netconf commands on Cisco IOSXR platform

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/iosxr/index.html>

Cisco.Meraki
============

 Collection version 2.5.0

 Plugin Index
------------

 These are the plugins in the cisco.meraki collection

 ### Modules

 * [meraki\_admin](meraki_admin_module#ansible-collections-cisco-meraki-meraki-admin-module) – Manage administrators in the Meraki cloud
* [meraki\_alert](meraki_alert_module#ansible-collections-cisco-meraki-meraki-alert-module) – Manage alerts in the Meraki cloud
* [meraki\_config\_template](meraki_config_template_module#ansible-collections-cisco-meraki-meraki-config-template-module) – Manage configuration templates in the Meraki cloud
* [meraki\_device](meraki_device_module#ansible-collections-cisco-meraki-meraki-device-module) – Manage devices in the Meraki cloud
* [meraki\_firewalled\_services](meraki_firewalled_services_module#ansible-collections-cisco-meraki-meraki-firewalled-services-module) – Edit firewall policies for administrative network services
* [meraki\_management\_interface](meraki_management_interface_module#ansible-collections-cisco-meraki-meraki-management-interface-module) – Configure Meraki management interfaces
* [meraki\_mr\_l3\_firewall](meraki_mr_l3_firewall_module#ansible-collections-cisco-meraki-meraki-mr-l3-firewall-module) – Manage MR access point layer 3 firewalls in the Meraki cloud
* [meraki\_mr\_rf\_profile](meraki_mr_rf_profile_module#ansible-collections-cisco-meraki-meraki-mr-rf-profile-module) – Manage RF profiles for Meraki wireless networks
* [meraki\_mr\_settings](meraki_mr_settings_module#ansible-collections-cisco-meraki-meraki-mr-settings-module) – Manage general settings for Meraki wireless networks
* [meraki\_mr\_ssid](meraki_mr_ssid_module#ansible-collections-cisco-meraki-meraki-mr-ssid-module) – Manage wireless SSIDs in the Meraki cloud
* [meraki\_ms\_access\_list](meraki_ms_access_list_module#ansible-collections-cisco-meraki-meraki-ms-access-list-module) – Manage access lists for Meraki switches in the Meraki cloud
* [meraki\_ms\_l3\_interface](meraki_ms_l3_interface_module#ansible-collections-cisco-meraki-meraki-ms-l3-interface-module) – Manage routed interfaces on MS switches
* [meraki\_ms\_link\_aggregation](meraki_ms_link_aggregation_module#ansible-collections-cisco-meraki-meraki-ms-link-aggregation-module) – Manage link aggregations on MS switches
* [meraki\_ms\_ospf](meraki_ms_ospf_module#ansible-collections-cisco-meraki-meraki-ms-ospf-module) – Manage OSPF configuration on MS switches
* [meraki\_ms\_stack](meraki_ms_stack_module#ansible-collections-cisco-meraki-meraki-ms-stack-module) – Modify switch stacking configuration in Meraki.
* [meraki\_ms\_stack\_l3\_interface](meraki_ms_stack_l3_interface_module#ansible-collections-cisco-meraki-meraki-ms-stack-l3-interface-module) – Manage routed interfaces on MS switches
* [meraki\_ms\_storm\_control](meraki_ms_storm_control_module#ansible-collections-cisco-meraki-meraki-ms-storm-control-module) – Manage storm control configuration on a switch in the Meraki cloud
* [meraki\_ms\_switchport](meraki_ms_switchport_module#ansible-collections-cisco-meraki-meraki-ms-switchport-module) – Manage switchports on a switch in the Meraki cloud
* [meraki\_mx\_content\_filtering](meraki_mx_content_filtering_module#ansible-collections-cisco-meraki-meraki-mx-content-filtering-module) – Edit Meraki MX content filtering policies
* [meraki\_mx\_intrusion\_prevention](meraki_mx_intrusion_prevention_module#ansible-collections-cisco-meraki-meraki-mx-intrusion-prevention-module) – Manage intrustion prevention in the Meraki cloud
* [meraki\_mx\_l2\_interface](meraki_mx_l2_interface_module#ansible-collections-cisco-meraki-meraki-mx-l2-interface-module) – Configure MX layer 2 interfaces
* [meraki\_mx\_l3\_firewall](meraki_mx_l3_firewall_module#ansible-collections-cisco-meraki-meraki-mx-l3-firewall-module) – Manage MX appliance layer 3 firewalls in the Meraki cloud
* [meraki\_mx\_l7\_firewall](meraki_mx_l7_firewall_module#ansible-collections-cisco-meraki-meraki-mx-l7-firewall-module) – Manage MX appliance layer 7 firewalls in the Meraki cloud
* [meraki\_mx\_malware](meraki_mx_malware_module#ansible-collections-cisco-meraki-meraki-mx-malware-module) – Manage Malware Protection in the Meraki cloud
* [meraki\_mx\_nat](meraki_mx_nat_module#ansible-collections-cisco-meraki-meraki-mx-nat-module) – Manage NAT rules in Meraki cloud
* [meraki\_mx\_site\_to\_site\_firewall](meraki_mx_site_to_site_firewall_module#ansible-collections-cisco-meraki-meraki-mx-site-to-site-firewall-module) – Manage MX appliance firewall rules for site-to-site VPNs
* [meraki\_mx\_site\_to\_site\_vpn](meraki_mx_site_to_site_vpn_module#ansible-collections-cisco-meraki-meraki-mx-site-to-site-vpn-module) – Manage AutoVPN connections in Meraki
* [meraki\_mx\_static\_route](meraki_mx_static_route_module#ansible-collections-cisco-meraki-meraki-mx-static-route-module) – Manage static routes in the Meraki cloud
* [meraki\_mx\_uplink\_bandwidth](meraki_mx_uplink_bandwidth_module#ansible-collections-cisco-meraki-meraki-mx-uplink-bandwidth-module) – Manage uplinks on Meraki MX appliances
* [meraki\_mx\_vlan](meraki_mx_vlan_module#ansible-collections-cisco-meraki-meraki-mx-vlan-module) – Manage VLANs in the Meraki cloud
* [meraki\_network](meraki_network_module#ansible-collections-cisco-meraki-meraki-network-module) – Manage networks in the Meraki cloud
* [meraki\_organization](meraki_organization_module#ansible-collections-cisco-meraki-meraki-organization-module) – Manage organizations in the Meraki cloud
* [meraki\_snmp](meraki_snmp_module#ansible-collections-cisco-meraki-meraki-snmp-module) – Manage organizations in the Meraki cloud
* [meraki\_syslog](meraki_syslog_module#ansible-collections-cisco-meraki-meraki-syslog-module) – Manage syslog server settings in the Meraki cloud.
* [meraki\_webhook](meraki_webhook_module#ansible-collections-cisco-meraki-meraki-webhook-module) – Manage webhooks configured in the Meraki cloud

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/meraki/index.html>

Cisco.Mso
=========

 Collection version 1.2.0

 Plugin Index
------------

 These are the plugins in the cisco.mso collection

 ### Httpapi Plugins

 * [mso](mso_httpapi#ansible-collections-cisco-mso-mso-httpapi) – MSO Ansible HTTPAPI Plugin.

 ### Modules

 * [mso\_backup](mso_backup_module#ansible-collections-cisco-mso-mso-backup-module) – Manages backups
* [mso\_dhcp\_option\_policy](mso_dhcp_option_policy_module#ansible-collections-cisco-mso-mso-dhcp-option-policy-module) – Manage DHCP Option policies.
* [mso\_dhcp\_option\_policy\_option](mso_dhcp_option_policy_option_module#ansible-collections-cisco-mso-mso-dhcp-option-policy-option-module) – Manage DHCP options in a DHCP Option policy.
* [mso\_dhcp\_relay\_policy](mso_dhcp_relay_policy_module#ansible-collections-cisco-mso-mso-dhcp-relay-policy-module) – Manage DHCP Relay policies.
* [mso\_dhcp\_relay\_policy\_provider](mso_dhcp_relay_policy_provider_module#ansible-collections-cisco-mso-mso-dhcp-relay-policy-provider-module) – Manage DHCP providers in a DHCP Relay policy.
* [mso\_label](mso_label_module#ansible-collections-cisco-mso-mso-label-module) – Manage labels
* [mso\_rest](mso_rest_module#ansible-collections-cisco-mso-mso-rest-module) – Direct access to the Cisco MSO REST API
* [mso\_role](mso_role_module#ansible-collections-cisco-mso-mso-role-module) – Manage roles
* [mso\_schema](mso_schema_module#ansible-collections-cisco-mso-mso-schema-module) – Manage schemas
* [mso\_schema\_clone](mso_schema_clone_module#ansible-collections-cisco-mso-mso-schema-clone-module) – Clone schemas
* [mso\_schema\_site](mso_schema_site_module#ansible-collections-cisco-mso-mso-schema-site-module) – Manage sites in schemas
* [mso\_schema\_site\_anp](mso_schema_site_anp_module#ansible-collections-cisco-mso-mso-schema-site-anp-module) – Manage site-local Application Network Profiles (ANPs) in schema template
* [mso\_schema\_site\_anp\_epg](mso_schema_site_anp_epg_module#ansible-collections-cisco-mso-mso-schema-site-anp-epg-module) – Manage site-local Endpoint Groups (EPGs) in schema template
* [mso\_schema\_site\_anp\_epg\_domain](mso_schema_site_anp_epg_domain_module#ansible-collections-cisco-mso-mso-schema-site-anp-epg-domain-module) – Manage site-local EPG domains in schema template
* [mso\_schema\_site\_anp\_epg\_selector](mso_schema_site_anp_epg_selector_module#ansible-collections-cisco-mso-mso-schema-site-anp-epg-selector-module) – Manage site-local EPG selector in schema templates
* [mso\_schema\_site\_anp\_epg\_staticleaf](mso_schema_site_anp_epg_staticleaf_module#ansible-collections-cisco-mso-mso-schema-site-anp-epg-staticleaf-module) – Manage site-local EPG static leafs in schema template
* [mso\_schema\_site\_anp\_epg\_staticport](mso_schema_site_anp_epg_staticport_module#ansible-collections-cisco-mso-mso-schema-site-anp-epg-staticport-module) – Manage site-local EPG static ports in schema template
* [mso\_schema\_site\_anp\_epg\_subnet](mso_schema_site_anp_epg_subnet_module#ansible-collections-cisco-mso-mso-schema-site-anp-epg-subnet-module) – Manage site-local EPG subnets in schema template
* [mso\_schema\_site\_bd](mso_schema_site_bd_module#ansible-collections-cisco-mso-mso-schema-site-bd-module) – Manage site-local Bridge Domains (BDs) in schema template
* [mso\_schema\_site\_bd\_l3out](mso_schema_site_bd_l3out_module#ansible-collections-cisco-mso-mso-schema-site-bd-l3out-module) – Manage site-local BD l3out’s in schema template
* [mso\_schema\_site\_bd\_subnet](mso_schema_site_bd_subnet_module#ansible-collections-cisco-mso-mso-schema-site-bd-subnet-module) – Manage site-local BD subnets in schema template
* [mso\_schema\_site\_external\_epg](mso_schema_site_external_epg_module#ansible-collections-cisco-mso-mso-schema-site-external-epg-module) – Manage External EPG in schema of sites
* [mso\_schema\_site\_external\_epg\_selector](mso_schema_site_external_epg_selector_module#ansible-collections-cisco-mso-mso-schema-site-external-epg-selector-module) – Manage External EPG selector in schema of cloud sites
* [mso\_schema\_site\_l3out](mso_schema_site_l3out_module#ansible-collections-cisco-mso-mso-schema-site-l3out-module) – Manage site-local layer3 Out (L3Outs) in schema template
* [mso\_schema\_site\_vrf](mso_schema_site_vrf_module#ansible-collections-cisco-mso-mso-schema-site-vrf-module) – Manage site-local VRFs in schema template
* [mso\_schema\_site\_vrf\_region](mso_schema_site_vrf_region_module#ansible-collections-cisco-mso-mso-schema-site-vrf-region-module) – Manage site-local VRF regions in schema template
* [mso\_schema\_site\_vrf\_region\_cidr](mso_schema_site_vrf_region_cidr_module#ansible-collections-cisco-mso-mso-schema-site-vrf-region-cidr-module) – Manage site-local VRF region CIDRs in schema template
* [mso\_schema\_site\_vrf\_region\_cidr\_subnet](mso_schema_site_vrf_region_cidr_subnet_module#ansible-collections-cisco-mso-mso-schema-site-vrf-region-cidr-subnet-module) – Manage site-local VRF regions in schema template
* [mso\_schema\_site\_vrf\_region\_hub\_network](mso_schema_site_vrf_region_hub_network_module#ansible-collections-cisco-mso-mso-schema-site-vrf-region-hub-network-module) – Manage site-local VRF region hub network in schema template
* [mso\_schema\_template](mso_schema_template_module#ansible-collections-cisco-mso-mso-schema-template-module) – Manage templates in schemas
* [mso\_schema\_template\_anp](mso_schema_template_anp_module#ansible-collections-cisco-mso-mso-schema-template-anp-module) – Manage Application Network Profiles (ANPs) in schema templates
* [mso\_schema\_template\_anp\_epg](mso_schema_template_anp_epg_module#ansible-collections-cisco-mso-mso-schema-template-anp-epg-module) – Manage Endpoint Groups (EPGs) in schema templates
* [mso\_schema\_template\_anp\_epg\_contract](mso_schema_template_anp_epg_contract_module#ansible-collections-cisco-mso-mso-schema-template-anp-epg-contract-module) – Manage EPG contracts in schema templates
* [mso\_schema\_template\_anp\_epg\_selector](mso_schema_template_anp_epg_selector_module#ansible-collections-cisco-mso-mso-schema-template-anp-epg-selector-module) – Manage EPG selector in schema templates
* [mso\_schema\_template\_anp\_epg\_subnet](mso_schema_template_anp_epg_subnet_module#ansible-collections-cisco-mso-mso-schema-template-anp-epg-subnet-module) – Manage EPG subnets in schema templates
* [mso\_schema\_template\_bd](mso_schema_template_bd_module#ansible-collections-cisco-mso-mso-schema-template-bd-module) – Manage Bridge Domains (BDs) in schema templates
* [mso\_schema\_template\_bd\_dhcp\_policy](mso_schema_template_bd_dhcp_policy_module#ansible-collections-cisco-mso-mso-schema-template-bd-dhcp-policy-module) – Manage BD DHCP Policy in schema templates
* [mso\_schema\_template\_bd\_subnet](mso_schema_template_bd_subnet_module#ansible-collections-cisco-mso-mso-schema-template-bd-subnet-module) – Manage BD subnets in schema templates
* [mso\_schema\_template\_clone](mso_schema_template_clone_module#ansible-collections-cisco-mso-mso-schema-template-clone-module) – Clone templates
* [mso\_schema\_template\_contract\_filter](mso_schema_template_contract_filter_module#ansible-collections-cisco-mso-mso-schema-template-contract-filter-module) – Manage contract filters in schema templates
* [mso\_schema\_template\_deploy](mso_schema_template_deploy_module#ansible-collections-cisco-mso-mso-schema-template-deploy-module) – Deploy schema templates to sites
* [mso\_schema\_template\_deploy\_status](mso_schema_template_deploy_status_module#ansible-collections-cisco-mso-mso-schema-template-deploy-status-module) – Check query of objects before deployment to site
* [mso\_schema\_template\_external\_epg](mso_schema_template_external_epg_module#ansible-collections-cisco-mso-mso-schema-template-external-epg-module) – Manage external EPGs in schema templates
* [mso\_schema\_template\_external\_epg\_contract](mso_schema_template_external_epg_contract_module#ansible-collections-cisco-mso-mso-schema-template-external-epg-contract-module) – Manage Extrnal EPG contracts in schema templates
* [mso\_schema\_template\_external\_epg\_selector](mso_schema_template_external_epg_selector_module#ansible-collections-cisco-mso-mso-schema-template-external-epg-selector-module) – Manage External EPG selector in schema templates
* [mso\_schema\_template\_external\_epg\_subnet](mso_schema_template_external_epg_subnet_module#ansible-collections-cisco-mso-mso-schema-template-external-epg-subnet-module) – Manage External EPG subnets in schema templates
* [mso\_schema\_template\_filter\_entry](mso_schema_template_filter_entry_module#ansible-collections-cisco-mso-mso-schema-template-filter-entry-module) – Manage filter entries in schema templates
* [mso\_schema\_template\_l3out](mso_schema_template_l3out_module#ansible-collections-cisco-mso-mso-schema-template-l3out-module) – Manage l3outs in schema templates
* [mso\_schema\_template\_migrate](mso_schema_template_migrate_module#ansible-collections-cisco-mso-mso-schema-template-migrate-module) – Migrate Bridge Domains (BDs) and EPGs between templates
* [mso\_schema\_template\_vrf](mso_schema_template_vrf_module#ansible-collections-cisco-mso-mso-schema-template-vrf-module) – Manage VRFs in schema templates
* [mso\_schema\_template\_vrf\_contract](mso_schema_template_vrf_contract_module#ansible-collections-cisco-mso-mso-schema-template-vrf-contract-module) – Manage vrf contracts in schema templates
* [mso\_site](mso_site_module#ansible-collections-cisco-mso-mso-site-module) – Manage sites
* [mso\_tenant](mso_tenant_module#ansible-collections-cisco-mso-mso-tenant-module) – Manage tenants
* [mso\_tenant\_site](mso_tenant_site_module#ansible-collections-cisco-mso-mso-tenant-site-module) – Manage tenants with cloud sites.
* [mso\_user](mso_user_module#ansible-collections-cisco-mso-mso-user-module) – Manage users
* [mso\_version](mso_version_module#ansible-collections-cisco-mso-mso-version-module) – Get version of MSO

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/mso/index.html>

Cisco.Nso
=========

 Collection version 1.0.3

 Plugin Index
------------

 These are the plugins in the cisco.nso collection

 ### Modules

 * [nso\_action](nso_action_module#ansible-collections-cisco-nso-nso-action-module) – Executes Cisco NSO actions and verifies output.
* [nso\_config](nso_config_module#ansible-collections-cisco-nso-nso-config-module) – Manage Cisco NSO configuration and service synchronization.
* [nso\_query](nso_query_module#ansible-collections-cisco-nso-nso-query-module) – Query data from Cisco NSO.
* [nso\_show](nso_show_module#ansible-collections-cisco-nso-nso-show-module) – Displays data from Cisco NSO.
* [nso\_verify](nso_verify_module#ansible-collections-cisco-nso-nso-verify-module) – Verifies Cisco NSO configuration.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/nso/index.html>

Cisco.Nxos
==========

 Collection version 2.7.0

 Plugin Index
------------

 These are the plugins in the cisco.nxos collection

 ### Cliconf Plugins

 * [nxos](nxos_cliconf#ansible-collections-cisco-nxos-nxos-cliconf) – Use NX-OS cliconf to run commands on Cisco NX-OS platform

 ### Httpapi Plugins

 * [nxos](nxos_httpapi#ansible-collections-cisco-nxos-nxos-httpapi) – Use NX-API to run commands on Cisco NX-OS platform

 ### Modules

 * [nxos\_aaa\_server](nxos_aaa_server_module#ansible-collections-cisco-nxos-nxos-aaa-server-module) – Manages AAA server global configuration.
* [nxos\_aaa\_server\_host](nxos_aaa_server_host_module#ansible-collections-cisco-nxos-nxos-aaa-server-host-module) – Manages AAA server host-specific configuration.
* [nxos\_acl](nxos_acl_module#ansible-collections-cisco-nxos-nxos-acl-module) – (deprecated, removed after 2022-06-01) Manages access list entries for ACLs.
* [nxos\_acl\_interface](nxos_acl_interface_module#ansible-collections-cisco-nxos-nxos-acl-interface-module) – (deprecated, removed after 2022-06-01) Manages applying ACLs to interfaces.
* [nxos\_acl\_interfaces](nxos_acl_interfaces_module#ansible-collections-cisco-nxos-nxos-acl-interfaces-module) – ACL interfaces resource module
* [nxos\_acls](nxos_acls_module#ansible-collections-cisco-nxos-nxos-acls-module) – ACLs resource module
* [nxos\_banner](nxos_banner_module#ansible-collections-cisco-nxos-nxos-banner-module) – Manage multiline banners on Cisco NXOS devices
* [nxos\_bfd\_global](nxos_bfd_global_module#ansible-collections-cisco-nxos-nxos-bfd-global-module) – Bidirectional Forwarding Detection (BFD) global-level configuration
* [nxos\_bfd\_interfaces](nxos_bfd_interfaces_module#ansible-collections-cisco-nxos-nxos-bfd-interfaces-module) – BFD interfaces resource module
* [nxos\_bgp](nxos_bgp_module#ansible-collections-cisco-nxos-nxos-bgp-module) – (deprecated, removed after 2023-01-27) Manages BGP configuration.
* [nxos\_bgp\_address\_family](nxos_bgp_address_family_module#ansible-collections-cisco-nxos-nxos-bgp-address-family-module) – BGP Address Family resource module.
* [nxos\_bgp\_af](nxos_bgp_af_module#ansible-collections-cisco-nxos-nxos-bgp-af-module) – (deprecated, removed after 2023-02-24) Manages BGP Address-family configuration.
* [nxos\_bgp\_global](nxos_bgp_global_module#ansible-collections-cisco-nxos-nxos-bgp-global-module) – BGP Global resource module.
* [nxos\_bgp\_neighbor](nxos_bgp_neighbor_module#ansible-collections-cisco-nxos-nxos-bgp-neighbor-module) – (deprecated, removed after 2023-01-27) Manages BGP neighbors configurations.
* [nxos\_bgp\_neighbor\_address\_family](nxos_bgp_neighbor_address_family_module#ansible-collections-cisco-nxos-nxos-bgp-neighbor-address-family-module) – BGP Neighbor Address Family resource module.
* [nxos\_bgp\_neighbor\_af](nxos_bgp_neighbor_af_module#ansible-collections-cisco-nxos-nxos-bgp-neighbor-af-module) – (deprecated, removed after 2023-02-24) Manages BGP address-family’s neighbors configuration.
* [nxos\_command](nxos_command_module#ansible-collections-cisco-nxos-nxos-command-module) – Run arbitrary command on Cisco NXOS devices
* [nxos\_config](nxos_config_module#ansible-collections-cisco-nxos-nxos-config-module) – Manage Cisco NXOS configuration sections
* [nxos\_devicealias](nxos_devicealias_module#ansible-collections-cisco-nxos-nxos-devicealias-module) – Configuration of device alias for Cisco NXOS MDS Switches.
* [nxos\_evpn\_global](nxos_evpn_global_module#ansible-collections-cisco-nxos-nxos-evpn-global-module) – Handles the EVPN control plane for VXLAN.
* [nxos\_evpn\_vni](nxos_evpn_vni_module#ansible-collections-cisco-nxos-nxos-evpn-vni-module) – Manages Cisco EVPN VXLAN Network Identifier (VNI).
* [nxos\_facts](nxos_facts_module#ansible-collections-cisco-nxos-nxos-facts-module) – Gets facts about NX-OS switches
* [nxos\_feature](nxos_feature_module#ansible-collections-cisco-nxos-nxos-feature-module) – Manage features in NX-OS switches.
* [nxos\_file\_copy](nxos_file_copy_module#ansible-collections-cisco-nxos-nxos-file-copy-module) – Copy a file to a remote NXOS device.
* [nxos\_gir](nxos_gir_module#ansible-collections-cisco-nxos-nxos-gir-module) – Trigger a graceful removal or insertion (GIR) of the switch.
* [nxos\_gir\_profile\_management](nxos_gir_profile_management_module#ansible-collections-cisco-nxos-nxos-gir-profile-management-module) – Create a maintenance-mode or normal-mode profile for GIR.
* [nxos\_hsrp](nxos_hsrp_module#ansible-collections-cisco-nxos-nxos-hsrp-module) – Manages HSRP configuration on NX-OS switches.
* [nxos\_hsrp\_interfaces](nxos_hsrp_interfaces_module#ansible-collections-cisco-nxos-nxos-hsrp-interfaces-module) – HSRP interfaces resource module
* [nxos\_igmp](nxos_igmp_module#ansible-collections-cisco-nxos-nxos-igmp-module) – Manages IGMP global configuration.
* [nxos\_igmp\_interface](nxos_igmp_interface_module#ansible-collections-cisco-nxos-nxos-igmp-interface-module) – Manages IGMP interface configuration.
* [nxos\_igmp\_snooping](nxos_igmp_snooping_module#ansible-collections-cisco-nxos-nxos-igmp-snooping-module) – Manages IGMP snooping global configuration.
* [nxos\_install\_os](nxos_install_os_module#ansible-collections-cisco-nxos-nxos-install-os-module) – Set boot options like boot, kickstart image and issu.
* [nxos\_interface](nxos_interface_module#ansible-collections-cisco-nxos-nxos-interface-module) – (deprecated, removed after 2022-06-01) Manages physical attributes of interfaces.
* [nxos\_interface\_ospf](nxos_interface_ospf_module#ansible-collections-cisco-nxos-nxos-interface-ospf-module) – (deprecated, removed after 2022-10-26) Manages configuration of an OSPF interface instance.
* [nxos\_interfaces](nxos_interfaces_module#ansible-collections-cisco-nxos-nxos-interfaces-module) – Interfaces resource module
* [nxos\_l2\_interface](nxos_l2_interface_module#ansible-collections-cisco-nxos-nxos-l2-interface-module) – (deprecated, removed after 2022-06-01) Manage Layer-2 interface on Cisco NXOS devices.
* [nxos\_l2\_interfaces](nxos_l2_interfaces_module#ansible-collections-cisco-nxos-nxos-l2-interfaces-module) – L2 interfaces resource module
* [nxos\_l3\_interface](nxos_l3_interface_module#ansible-collections-cisco-nxos-nxos-l3-interface-module) – (deprecated, removed after 2022-06-01) Manage L3 interfaces on Cisco NXOS network devices
* [nxos\_l3\_interfaces](nxos_l3_interfaces_module#ansible-collections-cisco-nxos-nxos-l3-interfaces-module) – L3 interfaces resource module
* [nxos\_lacp](nxos_lacp_module#ansible-collections-cisco-nxos-nxos-lacp-module) – LACP resource module
* [nxos\_lacp\_interfaces](nxos_lacp_interfaces_module#ansible-collections-cisco-nxos-nxos-lacp-interfaces-module) – LACP interfaces resource module
* [nxos\_lag\_interfaces](nxos_lag_interfaces_module#ansible-collections-cisco-nxos-nxos-lag-interfaces-module) – LAG interfaces resource module
* [nxos\_linkagg](nxos_linkagg_module#ansible-collections-cisco-nxos-nxos-linkagg-module) – (deprecated, removed after 2022-06-01) Manage link aggregation groups on Cisco NXOS devices.
* [nxos\_lldp](nxos_lldp_module#ansible-collections-cisco-nxos-nxos-lldp-module) – (deprecated, removed after 2022-06-01) Manage LLDP configuration on Cisco NXOS network devices.
* [nxos\_lldp\_global](nxos_lldp_global_module#ansible-collections-cisco-nxos-nxos-lldp-global-module) – LLDP resource module
* [nxos\_lldp\_interfaces](nxos_lldp_interfaces_module#ansible-collections-cisco-nxos-nxos-lldp-interfaces-module) – LLDP interfaces resource module
* [nxos\_logging](nxos_logging_module#ansible-collections-cisco-nxos-nxos-logging-module) – Manage logging on network devices
* [nxos\_logging\_global](nxos_logging_global_module#ansible-collections-cisco-nxos-nxos-logging-global-module) – Logging resource module.
* [nxos\_ntp](nxos_ntp_module#ansible-collections-cisco-nxos-nxos-ntp-module) – Manages core NTP configuration.
* [nxos\_ntp\_auth](nxos_ntp_auth_module#ansible-collections-cisco-nxos-nxos-ntp-auth-module) – Manages NTP authentication.
* [nxos\_ntp\_global](nxos_ntp_global_module#ansible-collections-cisco-nxos-nxos-ntp-global-module) – NTP Global resource module.
* [nxos\_ntp\_options](nxos_ntp_options_module#ansible-collections-cisco-nxos-nxos-ntp-options-module) – Manages NTP options.
* [nxos\_nxapi](nxos_nxapi_module#ansible-collections-cisco-nxos-nxos-nxapi-module) – Manage NXAPI configuration on an NXOS device.
* [nxos\_ospf](nxos_ospf_module#ansible-collections-cisco-nxos-nxos-ospf-module) – (deprecated, removed after 2022-06-01) Manages configuration of an ospf instance.
* [nxos\_ospf\_interfaces](nxos_ospf_interfaces_module#ansible-collections-cisco-nxos-nxos-ospf-interfaces-module) – OSPF Interfaces Resource Module.
* [nxos\_ospf\_vrf](nxos_ospf_vrf_module#ansible-collections-cisco-nxos-nxos-ospf-vrf-module) – (deprecated, removed after 2022-10-01)Manages a VRF for an OSPF router.
* [nxos\_ospfv2](nxos_ospfv2_module#ansible-collections-cisco-nxos-nxos-ospfv2-module) – OSPFv2 resource module
* [nxos\_ospfv3](nxos_ospfv3_module#ansible-collections-cisco-nxos-nxos-ospfv3-module) – OSPFv3 resource module
* [nxos\_overlay\_global](nxos_overlay_global_module#ansible-collections-cisco-nxos-nxos-overlay-global-module) – Configures anycast gateway MAC of the switch.
* [nxos\_pim](nxos_pim_module#ansible-collections-cisco-nxos-nxos-pim-module) – Manages configuration of a PIM instance.
* [nxos\_pim\_interface](nxos_pim_interface_module#ansible-collections-cisco-nxos-nxos-pim-interface-module) – Manages PIM interface configuration.
* [nxos\_pim\_rp\_address](nxos_pim_rp_address_module#ansible-collections-cisco-nxos-nxos-pim-rp-address-module) – Manages configuration of an PIM static RP address instance.
* [nxos\_ping](nxos_ping_module#ansible-collections-cisco-nxos-nxos-ping-module) – Tests reachability using ping from Nexus switch.
* [nxos\_prefix\_lists](nxos_prefix_lists_module#ansible-collections-cisco-nxos-nxos-prefix-lists-module) – Prefix-Lists resource module.
* [nxos\_reboot](nxos_reboot_module#ansible-collections-cisco-nxos-nxos-reboot-module) – Reboot a network device.
* [nxos\_rollback](nxos_rollback_module#ansible-collections-cisco-nxos-nxos-rollback-module) – Set a checkpoint or rollback to a checkpoint.
* [nxos\_route\_maps](nxos_route_maps_module#ansible-collections-cisco-nxos-nxos-route-maps-module) – Route Maps resource module.
* [nxos\_rpm](nxos_rpm_module#ansible-collections-cisco-nxos-nxos-rpm-module) – Install patch or feature rpms on Cisco NX-OS devices.
* [nxos\_smu](nxos_smu_module#ansible-collections-cisco-nxos-nxos-smu-module) – (deprecated, removed after 2022-10-01) Perform SMUs on Cisco NX-OS devices.
* [nxos\_snapshot](nxos_snapshot_module#ansible-collections-cisco-nxos-nxos-snapshot-module) – Manage snapshots of the running states of selected features.
* [nxos\_snmp\_community](nxos_snmp_community_module#ansible-collections-cisco-nxos-nxos-snmp-community-module) – Manages SNMP community configs.
* [nxos\_snmp\_contact](nxos_snmp_contact_module#ansible-collections-cisco-nxos-nxos-snmp-contact-module) – Manages SNMP contact info.
* [nxos\_snmp\_host](nxos_snmp_host_module#ansible-collections-cisco-nxos-nxos-snmp-host-module) – Manages SNMP host configuration.
* [nxos\_snmp\_location](nxos_snmp_location_module#ansible-collections-cisco-nxos-nxos-snmp-location-module) – Manages SNMP location information.
* [nxos\_snmp\_traps](nxos_snmp_traps_module#ansible-collections-cisco-nxos-nxos-snmp-traps-module) – Manages SNMP traps.
* [nxos\_snmp\_user](nxos_snmp_user_module#ansible-collections-cisco-nxos-nxos-snmp-user-module) – Manages SNMP users for monitoring.
* [nxos\_static\_route](nxos_static_route_module#ansible-collections-cisco-nxos-nxos-static-route-module) – (deprecated, removed after 2022-06-01) Manages static route configuration
* [nxos\_static\_routes](nxos_static_routes_module#ansible-collections-cisco-nxos-nxos-static-routes-module) – Static routes resource module
* [nxos\_system](nxos_system_module#ansible-collections-cisco-nxos-nxos-system-module) – Manage the system attributes on Cisco NXOS devices
* [nxos\_telemetry](nxos_telemetry_module#ansible-collections-cisco-nxos-nxos-telemetry-module) – TELEMETRY resource module
* [nxos\_udld](nxos_udld_module#ansible-collections-cisco-nxos-nxos-udld-module) – Manages UDLD global configuration params.
* [nxos\_udld\_interface](nxos_udld_interface_module#ansible-collections-cisco-nxos-nxos-udld-interface-module) – Manages UDLD interface configuration params.
* [nxos\_user](nxos_user_module#ansible-collections-cisco-nxos-nxos-user-module) – Manage the collection of local users on Nexus devices
* [nxos\_vlan](nxos_vlan_module#ansible-collections-cisco-nxos-nxos-vlan-module) – (deprecated, removed after 2022-06-01) Manages VLAN resources and attributes.
* [nxos\_vlans](nxos_vlans_module#ansible-collections-cisco-nxos-nxos-vlans-module) – VLANs resource module
* [nxos\_vpc](nxos_vpc_module#ansible-collections-cisco-nxos-nxos-vpc-module) – Manages global VPC configuration
* [nxos\_vpc\_interface](nxos_vpc_interface_module#ansible-collections-cisco-nxos-nxos-vpc-interface-module) – Manages interface VPC configuration
* [nxos\_vrf](nxos_vrf_module#ansible-collections-cisco-nxos-nxos-vrf-module) – Manages global VRF configuration.
* [nxos\_vrf\_af](nxos_vrf_af_module#ansible-collections-cisco-nxos-nxos-vrf-af-module) – Manages VRF AF.
* [nxos\_vrf\_interface](nxos_vrf_interface_module#ansible-collections-cisco-nxos-nxos-vrf-interface-module) – Manages interface specific VRF configuration.
* [nxos\_vrrp](nxos_vrrp_module#ansible-collections-cisco-nxos-nxos-vrrp-module) – Manages VRRP configuration on NX-OS switches.
* [nxos\_vsan](nxos_vsan_module#ansible-collections-cisco-nxos-nxos-vsan-module) – Configuration of vsan for Cisco NXOS MDS Switches.
* [nxos\_vtp\_domain](nxos_vtp_domain_module#ansible-collections-cisco-nxos-nxos-vtp-domain-module) – Manages VTP domain configuration.
* [nxos\_vtp\_password](nxos_vtp_password_module#ansible-collections-cisco-nxos-nxos-vtp-password-module) – Manages VTP password configuration.
* [nxos\_vtp\_version](nxos_vtp_version_module#ansible-collections-cisco-nxos-nxos-vtp-version-module) – Manages VTP version configuration.
* [nxos\_vxlan\_vtep](nxos_vxlan_vtep_module#ansible-collections-cisco-nxos-nxos-vxlan-vtep-module) – Manages VXLAN Network Virtualization Endpoint (NVE).
* [nxos\_vxlan\_vtep\_vni](nxos_vxlan_vtep_vni_module#ansible-collections-cisco-nxos-nxos-vxlan-vtep-vni-module) – Creates a Virtual Network Identifier member (VNI)
* [nxos\_zone\_zoneset](nxos_zone_zoneset_module#ansible-collections-cisco-nxos-nxos-zone-zoneset-module) – Configuration of zone/zoneset for Cisco NXOS MDS Switches.

 ### Netconf Plugins

 * [nxos](nxos_netconf#ansible-collections-cisco-nxos-nxos-netconf) – Use nxos netconf plugin to run netconf commands on Cisco NX-OS platform.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/nxos/index.html>

Cisco.Ucs
=========

 Collection version 1.6.0

 Plugin Index
------------

 These are the plugins in the cisco.ucs collection

 ### Modules

 * [ucs\_disk\_group\_policy](ucs_disk_group_policy_module#ansible-collections-cisco-ucs-ucs-disk-group-policy-module) – Configures disk group policies on Cisco UCS Manager
* [ucs\_dns\_server](ucs_dns_server_module#ansible-collections-cisco-ucs-ucs-dns-server-module) – Configure DNS servers on Cisco UCS Manager
* [ucs\_graphics\_card\_policy](ucs_graphics_card_policy_module#ansible-collections-cisco-ucs-ucs-graphics-card-policy-module) – Manages UCS Graphics Card Policies on UCS Manager
* [ucs\_ip\_pool](ucs_ip_pool_module#ansible-collections-cisco-ucs-ucs-ip-pool-module) – Configures IP address pools on Cisco UCS Manager
* [ucs\_lan\_connectivity](ucs_lan_connectivity_module#ansible-collections-cisco-ucs-ucs-lan-connectivity-module) – Configures LAN Connectivity Policies on Cisco UCS Manager
* [ucs\_mac\_pool](ucs_mac_pool_module#ansible-collections-cisco-ucs-ucs-mac-pool-module) – Configures MAC address pools on Cisco UCS Manager
* [ucs\_managed\_objects](ucs_managed_objects_module#ansible-collections-cisco-ucs-ucs-managed-objects-module) – Configures Managed Objects on Cisco UCS Manager
* [ucs\_ntp\_server](ucs_ntp_server_module#ansible-collections-cisco-ucs-ucs-ntp-server-module) – Configures NTP server on Cisco UCS Manager
* [ucs\_org](ucs_org_module#ansible-collections-cisco-ucs-ucs-org-module) – Manages UCS Organizations for UCS Manager
* [ucs\_query](ucs_query_module#ansible-collections-cisco-ucs-ucs-query-module) – Queries UCS Manager objects by class or distinguished name
* [ucs\_san\_connectivity](ucs_san_connectivity_module#ansible-collections-cisco-ucs-ucs-san-connectivity-module) – Configures SAN Connectivity Policies on Cisco UCS Manager
* [ucs\_scrub\_policy](ucs_scrub_policy_module#ansible-collections-cisco-ucs-ucs-scrub-policy-module) – Manages UCS Scrub Policies on UCS Manager
* [ucs\_serial\_over\_lan\_policy](ucs_serial_over_lan_policy_module#ansible-collections-cisco-ucs-ucs-serial-over-lan-policy-module) – Manages UCS Serial Over Lan Policies on UCS Manager
* [ucs\_server\_maintenance](ucs_server_maintenance_module#ansible-collections-cisco-ucs-ucs-server-maintenance-module) – Creates Server Maintenance Policy on Cisco UCS Manager
* [ucs\_service\_profile\_association](ucs_service_profile_association_module#ansible-collections-cisco-ucs-ucs-service-profile-association-module) – Configures Service Profile Association on Cisco UCS Manager
* [ucs\_service\_profile\_from\_template](ucs_service_profile_from_template_module#ansible-collections-cisco-ucs-ucs-service-profile-from-template-module) – Configures Service Profiles from templates on Cisco UCS Manager
* [ucs\_service\_profile\_template](ucs_service_profile_template_module#ansible-collections-cisco-ucs-ucs-service-profile-template-module) – Configures Service Profile Templates on Cisco UCS Manager
* [ucs\_sp\_vnic\_order](ucs_sp_vnic_order_module#ansible-collections-cisco-ucs-ucs-sp-vnic-order-module) – Configures vNIC order for service profiles and templates on Cisco UCS Manager
* [ucs\_storage\_profile](ucs_storage_profile_module#ansible-collections-cisco-ucs-ucs-storage-profile-module) – Configures storage profiles on Cisco UCS Manager
* [ucs\_system\_qos](ucs_system_qos_module#ansible-collections-cisco-ucs-ucs-system-qos-module) – Configures system QoS settings
* [ucs\_timezone](ucs_timezone_module#ansible-collections-cisco-ucs-ucs-timezone-module) – Configures timezone on Cisco UCS Manager
* [ucs\_uuid\_pool](ucs_uuid_pool_module#ansible-collections-cisco-ucs-ucs-uuid-pool-module) – Configures server UUID pools on Cisco UCS Manager
* [ucs\_vhba\_template](ucs_vhba_template_module#ansible-collections-cisco-ucs-ucs-vhba-template-module) – Configures vHBA templates on Cisco UCS Manager
* [ucs\_vlan\_find](ucs_vlan_find_module#ansible-collections-cisco-ucs-ucs-vlan-find-module) – Find VLANs on Cisco UCS Manager
* [ucs\_vlan\_to\_group](ucs_vlan_to_group_module#ansible-collections-cisco-ucs-ucs-vlan-to-group-module) – Add VLANs to a VLAN Group. Requires VLAN and VLAN Group to already be created on UCS prior to running module.
* [ucs\_vlans](ucs_vlans_module#ansible-collections-cisco-ucs-ucs-vlans-module) – Configures VLANs on Cisco UCS Manager
* [ucs\_vnic\_template](ucs_vnic_template_module#ansible-collections-cisco-ucs-ucs-vnic-template-module) – Configures vNIC templates on Cisco UCS Manager
* [ucs\_vsans](ucs_vsans_module#ansible-collections-cisco-ucs-ucs-vsans-module) – Configures VSANs on Cisco UCS Manager
* [ucs\_wwn\_pool](ucs_wwn_pool_module#ansible-collections-cisco-ucs-ucs-wwn-pool-module) – Configures WWNN or WWPN pools on Cisco UCS Manager

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/ucs/index.html>

Cloudscale\_Ch.Cloud
====================

 Collection version 2.2.0

 Plugin Index
------------

 These are the plugins in the cloudscale\_ch.cloud collection

 ### Inventory Plugins

 * [inventory](inventory_inventory#ansible-collections-cloudscale-ch-cloud-inventory-inventory) – cloudscale.ch inventory source

 ### Modules

 * [custom\_image](custom_image_module#ansible-collections-cloudscale-ch-cloud-custom-image-module) – Manage custom images on the cloudscale.ch IaaS service
* [floating\_ip](floating_ip_module#ansible-collections-cloudscale-ch-cloud-floating-ip-module) – Manages floating IPs on the cloudscale.ch IaaS service
* [network](network_module#ansible-collections-cloudscale-ch-cloud-network-module) – Manages networks on the cloudscale.ch IaaS service
* [objects\_user](objects_user_module#ansible-collections-cloudscale-ch-cloud-objects-user-module) – Manages objects users on the cloudscale.ch IaaS service
* [server](server_module#ansible-collections-cloudscale-ch-cloud-server-module) – Manages servers on the cloudscale.ch IaaS service
* [server\_group](server_group_module#ansible-collections-cloudscale-ch-cloud-server-group-module) – Manages server groups on the cloudscale.ch IaaS service
* [subnet](subnet_module#ansible-collections-cloudscale-ch-cloud-subnet-module) – Manages subnets on the cloudscale.ch IaaS service
* [volume](volume_module#ansible-collections-cloudscale-ch-cloud-volume-module) – Manages volumes on the cloudscale.ch IaaS service.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cloudscale_ch/cloud/index.html>

Community.Aws
=============

 Collection version 1.5.0

 Plugin Index
------------

 These are the plugins in the community.aws collection

 ### Connection Plugins

 * [aws\_ssm](aws_ssm_connection#ansible-collections-community-aws-aws-ssm-connection) – execute via AWS Systems Manager

 ### Modules

 * [aws\_acm](aws_acm_module#ansible-collections-community-aws-aws-acm-module) – Upload and delete certificates in the AWS Certificate Manager service
* [aws\_acm\_info](aws_acm_info_module#ansible-collections-community-aws-aws-acm-info-module) – Retrieve certificate information from AWS Certificate Manager service
* [aws\_api\_gateway](aws_api_gateway_module#ansible-collections-community-aws-aws-api-gateway-module) – Manage AWS API Gateway APIs
* [aws\_application\_scaling\_policy](aws_application_scaling_policy_module#ansible-collections-community-aws-aws-application-scaling-policy-module) – Manage Application Auto Scaling Scaling Policies
* [aws\_batch\_compute\_environment](aws_batch_compute_environment_module#ansible-collections-community-aws-aws-batch-compute-environment-module) – Manage AWS Batch Compute Environments
* [aws\_batch\_job\_definition](aws_batch_job_definition_module#ansible-collections-community-aws-aws-batch-job-definition-module) – Manage AWS Batch Job Definitions
* [aws\_batch\_job\_queue](aws_batch_job_queue_module#ansible-collections-community-aws-aws-batch-job-queue-module) – Manage AWS Batch Job Queues
* [aws\_codebuild](aws_codebuild_module#ansible-collections-community-aws-aws-codebuild-module) – Create or delete an AWS CodeBuild project
* [aws\_codecommit](aws_codecommit_module#ansible-collections-community-aws-aws-codecommit-module) – Manage repositories in AWS CodeCommit
* [aws\_codepipeline](aws_codepipeline_module#ansible-collections-community-aws-aws-codepipeline-module) – Create or delete AWS CodePipelines
* [aws\_config\_aggregation\_authorization](aws_config_aggregation_authorization_module#ansible-collections-community-aws-aws-config-aggregation-authorization-module) – Manage cross-account AWS Config authorizations
* [aws\_config\_aggregator](aws_config_aggregator_module#ansible-collections-community-aws-aws-config-aggregator-module) – Manage AWS Config aggregations across multiple accounts
* [aws\_config\_delivery\_channel](aws_config_delivery_channel_module#ansible-collections-community-aws-aws-config-delivery-channel-module) – Manage AWS Config delivery channels
* [aws\_config\_recorder](aws_config_recorder_module#ansible-collections-community-aws-aws-config-recorder-module) – Manage AWS Config Recorders
* [aws\_config\_rule](aws_config_rule_module#ansible-collections-community-aws-aws-config-rule-module) – Manage AWS Config resources
* [aws\_direct\_connect\_confirm\_connection](aws_direct_connect_confirm_connection_module#ansible-collections-community-aws-aws-direct-connect-confirm-connection-module) – Confirms the creation of a hosted DirectConnect connection.
* [aws\_direct\_connect\_connection](aws_direct_connect_connection_module#ansible-collections-community-aws-aws-direct-connect-connection-module) – Creates, deletes, modifies a DirectConnect connection
* [aws\_direct\_connect\_gateway](aws_direct_connect_gateway_module#ansible-collections-community-aws-aws-direct-connect-gateway-module) – Manage AWS Direct Connect gateway
* [aws\_direct\_connect\_link\_aggregation\_group](aws_direct_connect_link_aggregation_group_module#ansible-collections-community-aws-aws-direct-connect-link-aggregation-group-module) – Manage Direct Connect LAG bundles
* [aws\_direct\_connect\_virtual\_interface](aws_direct_connect_virtual_interface_module#ansible-collections-community-aws-aws-direct-connect-virtual-interface-module) – Manage Direct Connect virtual interfaces
* [aws\_eks\_cluster](aws_eks_cluster_module#ansible-collections-community-aws-aws-eks-cluster-module) – Manage Elastic Kubernetes Service Clusters
* [aws\_elasticbeanstalk\_app](aws_elasticbeanstalk_app_module#ansible-collections-community-aws-aws-elasticbeanstalk-app-module) – Create, update, and delete an elastic beanstalk application
* [aws\_glue\_connection](aws_glue_connection_module#ansible-collections-community-aws-aws-glue-connection-module) – Manage an AWS Glue connection
* [aws\_glue\_job](aws_glue_job_module#ansible-collections-community-aws-aws-glue-job-module) – Manage an AWS Glue job
* [aws\_inspector\_target](aws_inspector_target_module#ansible-collections-community-aws-aws-inspector-target-module) – Create, Update and Delete Amazon Inspector Assessment Targets
* [aws\_kms](aws_kms_module#ansible-collections-community-aws-aws-kms-module) – Perform various KMS management tasks.
* [aws\_kms\_info](aws_kms_info_module#ansible-collections-community-aws-aws-kms-info-module) – Gather information about AWS KMS keys
* [aws\_region\_info](aws_region_info_module#ansible-collections-community-aws-aws-region-info-module) – Gather information about AWS regions.
* [aws\_s3\_bucket\_info](aws_s3_bucket_info_module#ansible-collections-community-aws-aws-s3-bucket-info-module) – lists S3 buckets in AWS
* [aws\_s3\_cors](aws_s3_cors_module#ansible-collections-community-aws-aws-s3-cors-module) – Manage CORS for S3 buckets in AWS
* [aws\_secret](aws_secret_module#ansible-collections-community-aws-aws-secret-module) – Manage secrets stored in AWS Secrets Manager.
* [aws\_ses\_identity](aws_ses_identity_module#ansible-collections-community-aws-aws-ses-identity-module) – Manages SES email and domain identity
* [aws\_ses\_identity\_policy](aws_ses_identity_policy_module#ansible-collections-community-aws-aws-ses-identity-policy-module) – Manages SES sending authorization policies
* [aws\_ses\_rule\_set](aws_ses_rule_set_module#ansible-collections-community-aws-aws-ses-rule-set-module) – Manages SES inbound receipt rule sets
* [aws\_sgw\_info](aws_sgw_info_module#ansible-collections-community-aws-aws-sgw-info-module) – Fetch AWS Storage Gateway information
* [aws\_ssm\_parameter\_store](aws_ssm_parameter_store_module#ansible-collections-community-aws-aws-ssm-parameter-store-module) – Manage key-value pairs in aws parameter store.
* [aws\_step\_functions\_state\_machine](aws_step_functions_state_machine_module#ansible-collections-community-aws-aws-step-functions-state-machine-module) – Manage AWS Step Functions state machines
* [aws\_step\_functions\_state\_machine\_execution](aws_step_functions_state_machine_execution_module#ansible-collections-community-aws-aws-step-functions-state-machine-execution-module) – Start or stop execution of an AWS Step Functions state machine.
* [aws\_waf\_condition](aws_waf_condition_module#ansible-collections-community-aws-aws-waf-condition-module) – Create and delete WAF Conditions
* [aws\_waf\_info](aws_waf_info_module#ansible-collections-community-aws-aws-waf-info-module) – Retrieve information for WAF ACLs, Rule , Conditions and Filters.
* [aws\_waf\_rule](aws_waf_rule_module#ansible-collections-community-aws-aws-waf-rule-module) – Create and delete WAF Rules
* [aws\_waf\_web\_acl](aws_waf_web_acl_module#ansible-collections-community-aws-aws-waf-web-acl-module) – Create and delete WAF Web ACLs.
* [cloudformation\_exports\_info](cloudformation_exports_info_module#ansible-collections-community-aws-cloudformation-exports-info-module) – Read a value from CloudFormation Exports
* [cloudformation\_stack\_set](cloudformation_stack_set_module#ansible-collections-community-aws-cloudformation-stack-set-module) – Manage groups of CloudFormation stacks
* [cloudfront\_distribution](cloudfront_distribution_module#ansible-collections-community-aws-cloudfront-distribution-module) – Create, update and delete AWS CloudFront distributions.
* [cloudfront\_info](cloudfront_info_module#ansible-collections-community-aws-cloudfront-info-module) – Obtain facts about an AWS CloudFront distribution
* [cloudfront\_invalidation](cloudfront_invalidation_module#ansible-collections-community-aws-cloudfront-invalidation-module) – create invalidations for AWS CloudFront distributions
* [cloudfront\_origin\_access\_identity](cloudfront_origin_access_identity_module#ansible-collections-community-aws-cloudfront-origin-access-identity-module) – Create, update and delete origin access identities for a CloudFront distribution
* [cloudtrail](cloudtrail_module#ansible-collections-community-aws-cloudtrail-module) – manage CloudTrail create, delete, update
* [cloudwatchevent\_rule](cloudwatchevent_rule_module#ansible-collections-community-aws-cloudwatchevent-rule-module) – Manage CloudWatch Event rules and targets
* [cloudwatchlogs\_log\_group](cloudwatchlogs_log_group_module#ansible-collections-community-aws-cloudwatchlogs-log-group-module) – create or delete log\_group in CloudWatchLogs
* [cloudwatchlogs\_log\_group\_info](cloudwatchlogs_log_group_info_module#ansible-collections-community-aws-cloudwatchlogs-log-group-info-module) – Get information about log\_group in CloudWatchLogs
* [cloudwatchlogs\_log\_group\_metric\_filter](cloudwatchlogs_log_group_metric_filter_module#ansible-collections-community-aws-cloudwatchlogs-log-group-metric-filter-module) – Manage CloudWatch log group metric filter
* [data\_pipeline](data_pipeline_module#ansible-collections-community-aws-data-pipeline-module) – Create and manage AWS Datapipelines
* [dms\_endpoint](dms_endpoint_module#ansible-collections-community-aws-dms-endpoint-module) – Creates or destroys a data migration services endpoint
* [dms\_replication\_subnet\_group](dms_replication_subnet_group_module#ansible-collections-community-aws-dms-replication-subnet-group-module) – creates or destroys a data migration services subnet group
* [dynamodb\_table](dynamodb_table_module#ansible-collections-community-aws-dynamodb-table-module) – Create, update or delete AWS Dynamo DB tables
* [dynamodb\_ttl](dynamodb_ttl_module#ansible-collections-community-aws-dynamodb-ttl-module) – Set TTL for a given DynamoDB table
* [ec2\_ami\_copy](ec2_ami_copy_module#ansible-collections-community-aws-ec2-ami-copy-module) – copies AMI between AWS regions, return new image id
* [ec2\_asg](ec2_asg_module#ansible-collections-community-aws-ec2-asg-module) – Create or delete AWS AutoScaling Groups (ASGs)
* [ec2\_asg\_info](ec2_asg_info_module#ansible-collections-community-aws-ec2-asg-info-module) – Gather information about ec2 Auto Scaling Groups (ASGs) in AWS
* [ec2\_asg\_lifecycle\_hook](ec2_asg_lifecycle_hook_module#ansible-collections-community-aws-ec2-asg-lifecycle-hook-module) – Create, delete or update AWS ASG Lifecycle Hooks.
* [ec2\_customer\_gateway](ec2_customer_gateway_module#ansible-collections-community-aws-ec2-customer-gateway-module) – Manage an AWS customer gateway
* [ec2\_customer\_gateway\_info](ec2_customer_gateway_info_module#ansible-collections-community-aws-ec2-customer-gateway-info-module) – Gather information about customer gateways in AWS
* [ec2\_eip](ec2_eip_module#ansible-collections-community-aws-ec2-eip-module) – manages EC2 elastic IP (EIP) addresses.
* [ec2\_eip\_info](ec2_eip_info_module#ansible-collections-community-aws-ec2-eip-info-module) – List EC2 EIP details
* [ec2\_elb](ec2_elb_module#ansible-collections-community-aws-ec2-elb-module) – De-registers or registers instances from EC2 ELBs
* [ec2\_elb\_info](ec2_elb_info_module#ansible-collections-community-aws-ec2-elb-info-module) – Gather information about EC2 Elastic Load Balancers in AWS
* [ec2\_instance](ec2_instance_module#ansible-collections-community-aws-ec2-instance-module) – Create & manage EC2 instances
* [ec2\_instance\_info](ec2_instance_info_module#ansible-collections-community-aws-ec2-instance-info-module) – Gather information about ec2 instances in AWS
* [ec2\_launch\_template](ec2_launch_template_module#ansible-collections-community-aws-ec2-launch-template-module) – Manage EC2 launch templates
* [ec2\_lc](ec2_lc_module#ansible-collections-community-aws-ec2-lc-module) – Create or delete AWS Autoscaling Launch Configurations
* [ec2\_lc\_find](ec2_lc_find_module#ansible-collections-community-aws-ec2-lc-find-module) – Find AWS Autoscaling Launch Configurations
* [ec2\_lc\_info](ec2_lc_info_module#ansible-collections-community-aws-ec2-lc-info-module) – Gather information about AWS Autoscaling Launch Configurations.
* [ec2\_metric\_alarm](ec2_metric_alarm_module#ansible-collections-community-aws-ec2-metric-alarm-module) – Create/update or delete AWS Cloudwatch ‘metric alarms’
* [ec2\_placement\_group](ec2_placement_group_module#ansible-collections-community-aws-ec2-placement-group-module) – Create or delete an EC2 Placement Group
* [ec2\_placement\_group\_info](ec2_placement_group_info_module#ansible-collections-community-aws-ec2-placement-group-info-module) – List EC2 Placement Group(s) details
* [ec2\_scaling\_policy](ec2_scaling_policy_module#ansible-collections-community-aws-ec2-scaling-policy-module) – Create or delete AWS scaling policies for Autoscaling groups
* [ec2\_snapshot\_copy](ec2_snapshot_copy_module#ansible-collections-community-aws-ec2-snapshot-copy-module) – Copies an EC2 snapshot and returns the new Snapshot ID.
* [ec2\_transit\_gateway](ec2_transit_gateway_module#ansible-collections-community-aws-ec2-transit-gateway-module) – Create and delete AWS Transit Gateways
* [ec2\_transit\_gateway\_info](ec2_transit_gateway_info_module#ansible-collections-community-aws-ec2-transit-gateway-info-module) – Gather information about ec2 transit gateways in AWS
* [ec2\_vpc\_egress\_igw](ec2_vpc_egress_igw_module#ansible-collections-community-aws-ec2-vpc-egress-igw-module) – Manage an AWS VPC Egress Only Internet gateway
* [ec2\_vpc\_endpoint](ec2_vpc_endpoint_module#ansible-collections-community-aws-ec2-vpc-endpoint-module) – Create and delete AWS VPC Endpoints.
* [ec2\_vpc\_endpoint\_info](ec2_vpc_endpoint_info_module#ansible-collections-community-aws-ec2-vpc-endpoint-info-module) – Retrieves AWS VPC endpoints details using AWS methods.
* [ec2\_vpc\_endpoint\_service\_info](ec2_vpc_endpoint_service_info_module#ansible-collections-community-aws-ec2-vpc-endpoint-service-info-module) – retrieves AWS VPC endpoint service details
* [ec2\_vpc\_igw](ec2_vpc_igw_module#ansible-collections-community-aws-ec2-vpc-igw-module) – Manage an AWS VPC Internet gateway
* [ec2\_vpc\_igw\_info](ec2_vpc_igw_info_module#ansible-collections-community-aws-ec2-vpc-igw-info-module) – Gather information about internet gateways in AWS
* [ec2\_vpc\_nacl](ec2_vpc_nacl_module#ansible-collections-community-aws-ec2-vpc-nacl-module) – create and delete Network ACLs.
* [ec2\_vpc\_nacl\_info](ec2_vpc_nacl_info_module#ansible-collections-community-aws-ec2-vpc-nacl-info-module) – Gather information about Network ACLs in an AWS VPC
* [ec2\_vpc\_nat\_gateway](ec2_vpc_nat_gateway_module#ansible-collections-community-aws-ec2-vpc-nat-gateway-module) – Manage AWS VPC NAT Gateways.
* [ec2\_vpc\_nat\_gateway\_info](ec2_vpc_nat_gateway_info_module#ansible-collections-community-aws-ec2-vpc-nat-gateway-info-module) – Retrieves AWS VPC Managed Nat Gateway details using AWS methods.
* [ec2\_vpc\_peer](ec2_vpc_peer_module#ansible-collections-community-aws-ec2-vpc-peer-module) – create, delete, accept, and reject VPC peering connections between two VPCs.
* [ec2\_vpc\_peering\_info](ec2_vpc_peering_info_module#ansible-collections-community-aws-ec2-vpc-peering-info-module) – Retrieves AWS VPC Peering details using AWS methods.
* [ec2\_vpc\_route\_table](ec2_vpc_route_table_module#ansible-collections-community-aws-ec2-vpc-route-table-module) – Manage route tables for AWS virtual private clouds
* [ec2\_vpc\_route\_table\_info](ec2_vpc_route_table_info_module#ansible-collections-community-aws-ec2-vpc-route-table-info-module) – Gather information about ec2 VPC route tables in AWS
* [ec2\_vpc\_vgw](ec2_vpc_vgw_module#ansible-collections-community-aws-ec2-vpc-vgw-module) – Create and delete AWS VPN Virtual Gateways.
* [ec2\_vpc\_vgw\_info](ec2_vpc_vgw_info_module#ansible-collections-community-aws-ec2-vpc-vgw-info-module) – Gather information about virtual gateways in AWS
* [ec2\_vpc\_vpn](ec2_vpc_vpn_module#ansible-collections-community-aws-ec2-vpc-vpn-module) – Create, modify, and delete EC2 VPN connections.
* [ec2\_vpc\_vpn\_info](ec2_vpc_vpn_info_module#ansible-collections-community-aws-ec2-vpc-vpn-info-module) – Gather information about VPN Connections in AWS.
* [ec2\_win\_password](ec2_win_password_module#ansible-collections-community-aws-ec2-win-password-module) – Gets the default administrator password for ec2 windows instances
* [ecs\_attribute](ecs_attribute_module#ansible-collections-community-aws-ecs-attribute-module) – manage ecs attributes
* [ecs\_cluster](ecs_cluster_module#ansible-collections-community-aws-ecs-cluster-module) – Create or terminate ECS clusters.
* [ecs\_ecr](ecs_ecr_module#ansible-collections-community-aws-ecs-ecr-module) – Manage Elastic Container Registry repositories
* [ecs\_service](ecs_service_module#ansible-collections-community-aws-ecs-service-module) – Create, terminate, start or stop a service in ECS
* [ecs\_service\_info](ecs_service_info_module#ansible-collections-community-aws-ecs-service-info-module) – List or describe services in ECS
* [ecs\_tag](ecs_tag_module#ansible-collections-community-aws-ecs-tag-module) – create and remove tags on Amazon ECS resources
* [ecs\_task](ecs_task_module#ansible-collections-community-aws-ecs-task-module) – Run, start or stop a task in ecs
* [ecs\_taskdefinition](ecs_taskdefinition_module#ansible-collections-community-aws-ecs-taskdefinition-module) – register a task definition in ecs
* [ecs\_taskdefinition\_info](ecs_taskdefinition_info_module#ansible-collections-community-aws-ecs-taskdefinition-info-module) – Describe a task definition in ECS
* [efs](efs_module#ansible-collections-community-aws-efs-module) – create and maintain EFS file systems
* [efs\_info](efs_info_module#ansible-collections-community-aws-efs-info-module) – Get information about Amazon EFS file systems
* [elasticache](elasticache_module#ansible-collections-community-aws-elasticache-module) – Manage cache clusters in Amazon ElastiCache
* [elasticache\_info](elasticache_info_module#ansible-collections-community-aws-elasticache-info-module) – Retrieve information for AWS ElastiCache clusters
* [elasticache\_parameter\_group](elasticache_parameter_group_module#ansible-collections-community-aws-elasticache-parameter-group-module) – Manage cache parameter groups in Amazon ElastiCache.
* [elasticache\_snapshot](elasticache_snapshot_module#ansible-collections-community-aws-elasticache-snapshot-module) – Manage cache snapshots in Amazon ElastiCache
* [elasticache\_subnet\_group](elasticache_subnet_group_module#ansible-collections-community-aws-elasticache-subnet-group-module) – manage ElastiCache subnet groups
* [elb\_application\_lb](elb_application_lb_module#ansible-collections-community-aws-elb-application-lb-module) – Manage an Application Load Balancer
* [elb\_application\_lb\_info](elb_application_lb_info_module#ansible-collections-community-aws-elb-application-lb-info-module) – Gather information about application ELBs in AWS
* [elb\_classic\_lb](elb_classic_lb_module#ansible-collections-community-aws-elb-classic-lb-module) – Creates or destroys Amazon ELB.
* [elb\_classic\_lb\_info](elb_classic_lb_info_module#ansible-collections-community-aws-elb-classic-lb-info-module) – Gather information about EC2 Elastic Load Balancers in AWS
* [elb\_instance](elb_instance_module#ansible-collections-community-aws-elb-instance-module) – De-registers or registers instances from EC2 ELBs
* [elb\_network\_lb](elb_network_lb_module#ansible-collections-community-aws-elb-network-lb-module) – Manage a Network Load Balancer
* [elb\_target](elb_target_module#ansible-collections-community-aws-elb-target-module) – Manage a target in a target group
* [elb\_target\_group](elb_target_group_module#ansible-collections-community-aws-elb-target-group-module) – Manage a target group for an Application or Network load balancer
* [elb\_target\_group\_info](elb_target_group_info_module#ansible-collections-community-aws-elb-target-group-info-module) – Gather information about ELB target groups in AWS
* [elb\_target\_info](elb_target_info_module#ansible-collections-community-aws-elb-target-info-module) – Gathers which target groups a target is associated with.
* [execute\_lambda](execute_lambda_module#ansible-collections-community-aws-execute-lambda-module) – Execute an AWS Lambda function
* [iam](iam_module#ansible-collections-community-aws-iam-module) – Manage IAM users, groups, roles and keys
* [iam\_cert](iam_cert_module#ansible-collections-community-aws-iam-cert-module) – Manage server certificates for use on ELBs and CloudFront
* [iam\_group](iam_group_module#ansible-collections-community-aws-iam-group-module) – Manage AWS IAM groups
* [iam\_managed\_policy](iam_managed_policy_module#ansible-collections-community-aws-iam-managed-policy-module) – Manage User Managed IAM policies
* [iam\_mfa\_device\_info](iam_mfa_device_info_module#ansible-collections-community-aws-iam-mfa-device-info-module) – List the MFA (Multi-Factor Authentication) devices registered for a user
* [iam\_password\_policy](iam_password_policy_module#ansible-collections-community-aws-iam-password-policy-module) – Update an IAM Password Policy
* [iam\_policy](iam_policy_module#ansible-collections-community-aws-iam-policy-module) – Manage inline IAM policies for users, groups, and roles
* [iam\_policy\_info](iam_policy_info_module#ansible-collections-community-aws-iam-policy-info-module) – Retrieve inline IAM policies for users, groups, and roles
* [iam\_role](iam_role_module#ansible-collections-community-aws-iam-role-module) – Manage AWS IAM roles
* [iam\_role\_info](iam_role_info_module#ansible-collections-community-aws-iam-role-info-module) – Gather information on IAM roles
* [iam\_saml\_federation](iam_saml_federation_module#ansible-collections-community-aws-iam-saml-federation-module) – Maintain IAM SAML federation configuration.
* [iam\_server\_certificate\_info](iam_server_certificate_info_module#ansible-collections-community-aws-iam-server-certificate-info-module) – Retrieve the information of a server certificate
* [iam\_user](iam_user_module#ansible-collections-community-aws-iam-user-module) – Manage AWS IAM users
* [iam\_user\_info](iam_user_info_module#ansible-collections-community-aws-iam-user-info-module) – Gather IAM user(s) facts in AWS
* [kinesis\_stream](kinesis_stream_module#ansible-collections-community-aws-kinesis-stream-module) – Manage a Kinesis Stream.
* [lambda](lambda_module#ansible-collections-community-aws-lambda-module) – Manage AWS Lambda functions
* [lambda\_alias](lambda_alias_module#ansible-collections-community-aws-lambda-alias-module) – Creates, updates or deletes AWS Lambda function aliases
* [lambda\_event](lambda_event_module#ansible-collections-community-aws-lambda-event-module) – Creates, updates or deletes AWS Lambda function event mappings
* [lambda\_facts](lambda_facts_module#ansible-collections-community-aws-lambda-facts-module) – Gathers AWS Lambda function details as Ansible facts
* [lambda\_info](lambda_info_module#ansible-collections-community-aws-lambda-info-module) – Gathers AWS Lambda function details
* [lambda\_policy](lambda_policy_module#ansible-collections-community-aws-lambda-policy-module) – Creates, updates or deletes AWS Lambda policy statements.
* [lightsail](lightsail_module#ansible-collections-community-aws-lightsail-module) – Manage instances in AWS Lightsail
* [rds](rds_module#ansible-collections-community-aws-rds-module) – create, delete, or modify Amazon rds instances, rds snapshots, and related facts
* [rds\_instance](rds_instance_module#ansible-collections-community-aws-rds-instance-module) – Manage RDS instances
* [rds\_instance\_info](rds_instance_info_module#ansible-collections-community-aws-rds-instance-info-module) – obtain information about one or more RDS instances
* [rds\_param\_group](rds_param_group_module#ansible-collections-community-aws-rds-param-group-module) – manage RDS parameter groups
* [rds\_snapshot](rds_snapshot_module#ansible-collections-community-aws-rds-snapshot-module) – manage Amazon RDS snapshots.
* [rds\_snapshot\_info](rds_snapshot_info_module#ansible-collections-community-aws-rds-snapshot-info-module) – obtain information about one or more RDS snapshots
* [rds\_subnet\_group](rds_subnet_group_module#ansible-collections-community-aws-rds-subnet-group-module) – manage RDS database subnet groups
* [redshift](redshift_module#ansible-collections-community-aws-redshift-module) – create, delete, or modify an Amazon Redshift instance
* [redshift\_cross\_region\_snapshots](redshift_cross_region_snapshots_module#ansible-collections-community-aws-redshift-cross-region-snapshots-module) – Manage Redshift Cross Region Snapshots
* [redshift\_info](redshift_info_module#ansible-collections-community-aws-redshift-info-module) – Gather information about Redshift cluster(s)
* [redshift\_subnet\_group](redshift_subnet_group_module#ansible-collections-community-aws-redshift-subnet-group-module) – manage Redshift cluster subnet groups
* [route53](route53_module#ansible-collections-community-aws-route53-module) – add or delete entries in Amazons Route 53 DNS service
* [route53\_health\_check](route53_health_check_module#ansible-collections-community-aws-route53-health-check-module) – Add or delete health-checks in Amazons Route53 DNS service
* [route53\_info](route53_info_module#ansible-collections-community-aws-route53-info-module) – Retrieves route53 details using AWS methods
* [route53\_zone](route53_zone_module#ansible-collections-community-aws-route53-zone-module) – add or delete Route53 zones
* [s3\_bucket\_notification](s3_bucket_notification_module#ansible-collections-community-aws-s3-bucket-notification-module) – Creates, updates or deletes S3 Bucket notification for lambda
* [s3\_lifecycle](s3_lifecycle_module#ansible-collections-community-aws-s3-lifecycle-module) – Manage S3 bucket lifecycle rules in AWS
* [s3\_logging](s3_logging_module#ansible-collections-community-aws-s3-logging-module) – Manage logging facility of an s3 bucket in AWS
* [s3\_metrics\_configuration](s3_metrics_configuration_module#ansible-collections-community-aws-s3-metrics-configuration-module) – Manage s3 bucket metrics configuration in AWS
* [s3\_sync](s3_sync_module#ansible-collections-community-aws-s3-sync-module) – Efficiently upload multiple files to S3
* [s3\_website](s3_website_module#ansible-collections-community-aws-s3-website-module) – Configure an s3 bucket as a website
* [sns](sns_module#ansible-collections-community-aws-sns-module) – Send Amazon Simple Notification Service messages
* [sns\_topic](sns_topic_module#ansible-collections-community-aws-sns-topic-module) – Manages AWS SNS topics and subscriptions
* [sqs\_queue](sqs_queue_module#ansible-collections-community-aws-sqs-queue-module) – Creates or deletes AWS SQS queues
* [sts\_assume\_role](sts_assume_role_module#ansible-collections-community-aws-sts-assume-role-module) – Assume a role using AWS Security Token Service and obtain temporary credentials
* [sts\_session\_token](sts_session_token_module#ansible-collections-community-aws-sts-session-token-module) – Obtain a session token from the AWS Security Token Service
* [wafv2\_ip\_set](wafv2_ip_set_module#ansible-collections-community-aws-wafv2-ip-set-module) – wafv2\_ip\_set
* [wafv2\_ip\_set\_info](wafv2_ip_set_info_module#ansible-collections-community-aws-wafv2-ip-set-info-module) – Get information about wafv2 ip sets
* [wafv2\_resources](wafv2_resources_module#ansible-collections-community-aws-wafv2-resources-module) – wafv2\_web\_acl
* [wafv2\_resources\_info](wafv2_resources_info_module#ansible-collections-community-aws-wafv2-resources-info-module) – wafv2\_resources\_info
* [wafv2\_rule\_group](wafv2_rule_group_module#ansible-collections-community-aws-wafv2-rule-group-module) – wafv2\_web\_acl
* [wafv2\_rule\_group\_info](wafv2_rule_group_info_module#ansible-collections-community-aws-wafv2-rule-group-info-module) – wafv2\_web\_acl\_info
* [wafv2\_web\_acl](wafv2_web_acl_module#ansible-collections-community-aws-wafv2-web-acl-module) – wafv2\_web\_acl
* [wafv2\_web\_acl\_info](wafv2_web_acl_info_module#ansible-collections-community-aws-wafv2-web-acl-info-module) – wafv2\_web\_acl

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/aws/index.html>

Community.Crypto
================

 Collection version 1.9.6

 Scenario Guides
---------------

 * [How to create self-signed certificates](docsite/guide_selfsigned)
* [How to create a small CA](docsite/guide_ownca)

 Plugin Index
------------

 These are the plugins in the community.crypto collection

 ### Modules

 * [acme\_account](acme_account_module#ansible-collections-community-crypto-acme-account-module) – Create, modify or delete ACME accounts
* [acme\_account\_info](acme_account_info_module#ansible-collections-community-crypto-acme-account-info-module) – Retrieves information on ACME accounts
* [acme\_certificate](acme_certificate_module#ansible-collections-community-crypto-acme-certificate-module) – Create SSL/TLS certificates with the ACME protocol
* [acme\_certificate\_revoke](acme_certificate_revoke_module#ansible-collections-community-crypto-acme-certificate-revoke-module) – Revoke certificates with the ACME protocol
* [acme\_challenge\_cert\_helper](acme_challenge_cert_helper_module#ansible-collections-community-crypto-acme-challenge-cert-helper-module) – Prepare certificates required for ACME challenges such as `tls-alpn-01`
* [acme\_inspect](acme_inspect_module#ansible-collections-community-crypto-acme-inspect-module) – Send direct requests to an ACME server
* [certificate\_complete\_chain](certificate_complete_chain_module#ansible-collections-community-crypto-certificate-complete-chain-module) – Complete certificate chain given a set of untrusted and root certificates
* [ecs\_certificate](ecs_certificate_module#ansible-collections-community-crypto-ecs-certificate-module) – Request SSL/TLS certificates with the Entrust Certificate Services (ECS) API
* [ecs\_domain](ecs_domain_module#ansible-collections-community-crypto-ecs-domain-module) – Request validation of a domain with the Entrust Certificate Services (ECS) API
* [get\_certificate](get_certificate_module#ansible-collections-community-crypto-get-certificate-module) – Get a certificate from a host:port
* [luks\_device](luks_device_module#ansible-collections-community-crypto-luks-device-module) – Manage encrypted (LUKS) devices
* [openssh\_cert](openssh_cert_module#ansible-collections-community-crypto-openssh-cert-module) – Generate OpenSSH host or user certificates.
* [openssh\_keypair](openssh_keypair_module#ansible-collections-community-crypto-openssh-keypair-module) – Generate OpenSSH private and public keys
* [openssl\_csr](openssl_csr_module#ansible-collections-community-crypto-openssl-csr-module) – Generate OpenSSL Certificate Signing Request (CSR)
* [openssl\_csr\_info](openssl_csr_info_module#ansible-collections-community-crypto-openssl-csr-info-module) – Provide information of OpenSSL Certificate Signing Requests (CSR)
* [openssl\_csr\_pipe](openssl_csr_pipe_module#ansible-collections-community-crypto-openssl-csr-pipe-module) – Generate OpenSSL Certificate Signing Request (CSR)
* [openssl\_dhparam](openssl_dhparam_module#ansible-collections-community-crypto-openssl-dhparam-module) – Generate OpenSSL Diffie-Hellman Parameters
* [openssl\_pkcs12](openssl_pkcs12_module#ansible-collections-community-crypto-openssl-pkcs12-module) – Generate OpenSSL PKCS#12 archive
* [openssl\_privatekey](openssl_privatekey_module#ansible-collections-community-crypto-openssl-privatekey-module) – Generate OpenSSL private keys
* [openssl\_privatekey\_info](openssl_privatekey_info_module#ansible-collections-community-crypto-openssl-privatekey-info-module) – Provide information for OpenSSL private keys
* [openssl\_privatekey\_pipe](openssl_privatekey_pipe_module#ansible-collections-community-crypto-openssl-privatekey-pipe-module) – Generate OpenSSL private keys without disk access
* [openssl\_publickey](openssl_publickey_module#ansible-collections-community-crypto-openssl-publickey-module) – Generate an OpenSSL public key from its private key.
* [openssl\_publickey\_info](openssl_publickey_info_module#ansible-collections-community-crypto-openssl-publickey-info-module) – Provide information for OpenSSL public keys
* [openssl\_signature](openssl_signature_module#ansible-collections-community-crypto-openssl-signature-module) – Sign data with openssl
* [openssl\_signature\_info](openssl_signature_info_module#ansible-collections-community-crypto-openssl-signature-info-module) – Verify signatures with openssl
* [x509\_certificate](x509_certificate_module#ansible-collections-community-crypto-x509-certificate-module) – Generate and/or check OpenSSL certificates
* [x509\_certificate\_info](x509_certificate_info_module#ansible-collections-community-crypto-x509-certificate-info-module) – Provide information of OpenSSL X.509 certificates
* [x509\_certificate\_pipe](x509_certificate_pipe_module#ansible-collections-community-crypto-x509-certificate-pipe-module) – Generate and/or check OpenSSL certificates
* [x509\_crl](x509_crl_module#ansible-collections-community-crypto-x509-crl-module) – Generate Certificate Revocation Lists (CRLs)
* [x509\_crl\_info](x509_crl_info_module#ansible-collections-community-crypto-x509-crl-info-module) – Retrieve information on Certificate Revocation Lists (CRLs)

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/crypto/index.html>

Community.Digitalocean
======================

 Collection version 1.11.0

 Plugin Index
------------

 These are the plugins in the community.digitalocean collection

 ### Inventory Plugins

 * [digitalocean](digitalocean_inventory#ansible-collections-community-digitalocean-digitalocean-inventory) – DigitalOcean Inventory Plugin

 ### Modules

 * [digital\_ocean](digital_ocean_module#ansible-collections-community-digitalocean-digital-ocean-module) – Create/delete a droplet/SSH\_key in DigitalOcean
* [digital\_ocean\_account\_info](digital_ocean_account_info_module#ansible-collections-community-digitalocean-digital-ocean-account-info-module) – Gather information about DigitalOcean User account
* [digital\_ocean\_balance\_info](digital_ocean_balance_info_module#ansible-collections-community-digitalocean-digital-ocean-balance-info-module) – Display DigitalOcean customer balance
* [digital\_ocean\_block\_storage](digital_ocean_block_storage_module#ansible-collections-community-digitalocean-digital-ocean-block-storage-module) – Create/destroy or attach/detach Block Storage volumes in DigitalOcean
* [digital\_ocean\_cdn\_endpoints](digital_ocean_cdn_endpoints_module#ansible-collections-community-digitalocean-digital-ocean-cdn-endpoints-module) – Create, update, and delete DigitalOcean CDN Endpoints
* [digital\_ocean\_cdn\_endpoints\_info](digital_ocean_cdn_endpoints_info_module#ansible-collections-community-digitalocean-digital-ocean-cdn-endpoints-info-module) – Display DigitalOcean CDN Endpoints
* [digital\_ocean\_certificate](digital_ocean_certificate_module#ansible-collections-community-digitalocean-digital-ocean-certificate-module) – Manage certificates in DigitalOcean
* [digital\_ocean\_certificate\_info](digital_ocean_certificate_info_module#ansible-collections-community-digitalocean-digital-ocean-certificate-info-module) – Gather information about DigitalOcean certificates
* [digital\_ocean\_database](digital_ocean_database_module#ansible-collections-community-digitalocean-digital-ocean-database-module) – Create and delete a DigitalOcean database
* [digital\_ocean\_database\_info](digital_ocean_database_info_module#ansible-collections-community-digitalocean-digital-ocean-database-info-module) – Gather information about DigitalOcean databases
* [digital\_ocean\_domain](digital_ocean_domain_module#ansible-collections-community-digitalocean-digital-ocean-domain-module) – Create/delete a DNS domain in DigitalOcean
* [digital\_ocean\_domain\_info](digital_ocean_domain_info_module#ansible-collections-community-digitalocean-digital-ocean-domain-info-module) – Gather information about DigitalOcean Domains
* [digital\_ocean\_domain\_record](digital_ocean_domain_record_module#ansible-collections-community-digitalocean-digital-ocean-domain-record-module) – Manage DigitalOcean domain records
* [digital\_ocean\_droplet](digital_ocean_droplet_module#ansible-collections-community-digitalocean-digital-ocean-droplet-module) – Create and delete a DigitalOcean droplet
* [digital\_ocean\_droplet\_info](digital_ocean_droplet_info_module#ansible-collections-community-digitalocean-digital-ocean-droplet-info-module) – Gather information about DigitalOcean Droplets
* [digital\_ocean\_firewall](digital_ocean_firewall_module#ansible-collections-community-digitalocean-digital-ocean-firewall-module) – Manage cloud firewalls within DigitalOcean
* [digital\_ocean\_firewall\_info](digital_ocean_firewall_info_module#ansible-collections-community-digitalocean-digital-ocean-firewall-info-module) – Gather information about DigitalOcean firewalls
* [digital\_ocean\_floating\_ip](digital_ocean_floating_ip_module#ansible-collections-community-digitalocean-digital-ocean-floating-ip-module) – Manage DigitalOcean Floating IPs
* [digital\_ocean\_floating\_ip\_info](digital_ocean_floating_ip_info_module#ansible-collections-community-digitalocean-digital-ocean-floating-ip-info-module) – DigitalOcean Floating IPs information
* [digital\_ocean\_image\_info](digital_ocean_image_info_module#ansible-collections-community-digitalocean-digital-ocean-image-info-module) – Gather information about DigitalOcean images
* [digital\_ocean\_kubernetes](digital_ocean_kubernetes_module#ansible-collections-community-digitalocean-digital-ocean-kubernetes-module) – Create and delete a DigitalOcean Kubernetes cluster
* [digital\_ocean\_kubernetes\_info](digital_ocean_kubernetes_info_module#ansible-collections-community-digitalocean-digital-ocean-kubernetes-info-module) – Returns information about an existing DigitalOcean Kubernetes cluster
* [digital\_ocean\_load\_balancer](digital_ocean_load_balancer_module#ansible-collections-community-digitalocean-digital-ocean-load-balancer-module) – Manage DigitalOcean Load Balancers
* [digital\_ocean\_load\_balancer\_info](digital_ocean_load_balancer_info_module#ansible-collections-community-digitalocean-digital-ocean-load-balancer-info-module) – Gather information about DigitalOcean load balancers
* [digital\_ocean\_monitoring\_alerts](digital_ocean_monitoring_alerts_module#ansible-collections-community-digitalocean-digital-ocean-monitoring-alerts-module) – Programmatically retrieve metrics as well as configure alert policies based on these metrics
* [digital\_ocean\_monitoring\_alerts\_info](digital_ocean_monitoring_alerts_info_module#ansible-collections-community-digitalocean-digital-ocean-monitoring-alerts-info-module) – Programmatically retrieve metrics as well as configure alert policies based on these metrics
* [digital\_ocean\_project](digital_ocean_project_module#ansible-collections-community-digitalocean-digital-ocean-project-module) – Manage a DigitalOcean project
* [digital\_ocean\_project\_info](digital_ocean_project_info_module#ansible-collections-community-digitalocean-digital-ocean-project-info-module) – Gather information about DigitalOcean Projects
* [digital\_ocean\_region\_info](digital_ocean_region_info_module#ansible-collections-community-digitalocean-digital-ocean-region-info-module) – Gather information about DigitalOcean regions
* [digital\_ocean\_size\_info](digital_ocean_size_info_module#ansible-collections-community-digitalocean-digital-ocean-size-info-module) – Gather information about DigitalOcean Droplet sizes
* [digital\_ocean\_snapshot](digital_ocean_snapshot_module#ansible-collections-community-digitalocean-digital-ocean-snapshot-module) – Create and delete DigitalOcean snapshots
* [digital\_ocean\_snapshot\_info](digital_ocean_snapshot_info_module#ansible-collections-community-digitalocean-digital-ocean-snapshot-info-module) – Gather information about DigitalOcean Snapshot
* [digital\_ocean\_sshkey](digital_ocean_sshkey_module#ansible-collections-community-digitalocean-digital-ocean-sshkey-module) – Manage DigitalOcean SSH keys
* [digital\_ocean\_sshkey\_info](digital_ocean_sshkey_info_module#ansible-collections-community-digitalocean-digital-ocean-sshkey-info-module) – Gather information about DigitalOcean SSH keys
* [digital\_ocean\_tag](digital_ocean_tag_module#ansible-collections-community-digitalocean-digital-ocean-tag-module) – Create and remove tag(s) to DigitalOcean resource.
* [digital\_ocean\_tag\_info](digital_ocean_tag_info_module#ansible-collections-community-digitalocean-digital-ocean-tag-info-module) – Gather information about DigitalOcean tags
* [digital\_ocean\_volume\_info](digital_ocean_volume_info_module#ansible-collections-community-digitalocean-digital-ocean-volume-info-module) – Gather information about DigitalOcean volumes
* [digital\_ocean\_vpc](digital_ocean_vpc_module#ansible-collections-community-digitalocean-digital-ocean-vpc-module) – Create and delete DigitalOcean VPCs
* [digital\_ocean\_vpc\_info](digital_ocean_vpc_info_module#ansible-collections-community-digitalocean-digital-ocean-vpc-info-module) – Gather information about DigitalOcean VPCs

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/digitalocean/index.html>

Community.Azure
===============

 Collection version 1.1.0

 Plugin Index
------------

 These are the plugins in the community.azure collection

 ### Modules

 * [azure\_rm\_aks\_info](azure_rm_aks_info_module#ansible-collections-community-azure-azure-rm-aks-info-module) – Get Azure Kubernetes Service facts
* [azure\_rm\_aksversion\_info](azure_rm_aksversion_info_module#ansible-collections-community-azure-azure-rm-aksversion-info-module) – Get available kubernetes versions supported by Azure Kubernetes Service
* [azure\_rm\_applicationsecuritygroup\_info](azure_rm_applicationsecuritygroup_info_module#ansible-collections-community-azure-azure-rm-applicationsecuritygroup-info-module) – Get Azure Application Security Group facts
* [azure\_rm\_appserviceplan\_info](azure_rm_appserviceplan_info_module#ansible-collections-community-azure-azure-rm-appserviceplan-info-module) – Get azure app service plan facts
* [azure\_rm\_automationaccount\_info](azure_rm_automationaccount_info_module#ansible-collections-community-azure-azure-rm-automationaccount-info-module) – Get Azure automation account facts
* [azure\_rm\_autoscale\_info](azure_rm_autoscale_info_module#ansible-collections-community-azure-azure-rm-autoscale-info-module) – Get Azure Auto Scale Setting facts
* [azure\_rm\_availabilityset\_info](azure_rm_availabilityset_info_module#ansible-collections-community-azure-azure-rm-availabilityset-info-module) – Get Azure Availability Set facts
* [azure\_rm\_cdnendpoint\_info](azure_rm_cdnendpoint_info_module#ansible-collections-community-azure-azure-rm-cdnendpoint-info-module) – Get Azure CDN endpoint facts
* [azure\_rm\_cdnprofile\_info](azure_rm_cdnprofile_info_module#ansible-collections-community-azure-azure-rm-cdnprofile-info-module) – Get Azure CDN profile facts
* [azure\_rm\_containerinstance\_info](azure_rm_containerinstance_info_module#ansible-collections-community-azure-azure-rm-containerinstance-info-module) – Get Azure Container Instance facts
* [azure\_rm\_containerregistry\_info](azure_rm_containerregistry_info_module#ansible-collections-community-azure-azure-rm-containerregistry-info-module) – Get Azure Container Registry facts
* [azure\_rm\_cosmosdbaccount\_info](azure_rm_cosmosdbaccount_info_module#ansible-collections-community-azure-azure-rm-cosmosdbaccount-info-module) – Get Azure Cosmos DB Account facts
* [azure\_rm\_deployment\_info](azure_rm_deployment_info_module#ansible-collections-community-azure-azure-rm-deployment-info-module) – Get Azure Deployment facts
* [azure\_rm\_devtestlab\_info](azure_rm_devtestlab_info_module#ansible-collections-community-azure-azure-rm-devtestlab-info-module) – Get Azure DevTest Lab facts
* [azure\_rm\_devtestlabarmtemplate\_info](azure_rm_devtestlabarmtemplate_info_module#ansible-collections-community-azure-azure-rm-devtestlabarmtemplate-info-module) – Get Azure DevTest Lab ARM Template facts
* [azure\_rm\_devtestlabartifact\_info](azure_rm_devtestlabartifact_info_module#ansible-collections-community-azure-azure-rm-devtestlabartifact-info-module) – Get Azure DevTest Lab Artifact facts
* [azure\_rm\_devtestlabartifactsource\_info](azure_rm_devtestlabartifactsource_info_module#ansible-collections-community-azure-azure-rm-devtestlabartifactsource-info-module) – Get Azure DevTest Lab Artifact Source facts
* [azure\_rm\_devtestlabcustomimage\_info](azure_rm_devtestlabcustomimage_info_module#ansible-collections-community-azure-azure-rm-devtestlabcustomimage-info-module) – Get Azure DevTest Lab Custom Image facts
* [azure\_rm\_devtestlabenvironment\_info](azure_rm_devtestlabenvironment_info_module#ansible-collections-community-azure-azure-rm-devtestlabenvironment-info-module) – Get Azure Environment facts
* [azure\_rm\_devtestlabpolicy\_info](azure_rm_devtestlabpolicy_info_module#ansible-collections-community-azure-azure-rm-devtestlabpolicy-info-module) – Get Azure DTL Policy facts
* [azure\_rm\_devtestlabschedule\_info](azure_rm_devtestlabschedule_info_module#ansible-collections-community-azure-azure-rm-devtestlabschedule-info-module) – Get Azure Schedule facts
* [azure\_rm\_devtestlabvirtualmachine\_info](azure_rm_devtestlabvirtualmachine_info_module#ansible-collections-community-azure-azure-rm-devtestlabvirtualmachine-info-module) – Get Azure DevTest Lab Virtual Machine facts
* [azure\_rm\_devtestlabvirtualnetwork\_info](azure_rm_devtestlabvirtualnetwork_info_module#ansible-collections-community-azure-azure-rm-devtestlabvirtualnetwork-info-module) – Get Azure DevTest Lab Virtual Network facts
* [azure\_rm\_dnsrecordset\_info](azure_rm_dnsrecordset_info_module#ansible-collections-community-azure-azure-rm-dnsrecordset-info-module) – Get DNS Record Set facts
* [azure\_rm\_dnszone\_info](azure_rm_dnszone_info_module#ansible-collections-community-azure-azure-rm-dnszone-info-module) – Get DNS zone facts
* [azure\_rm\_functionapp\_info](azure_rm_functionapp_info_module#ansible-collections-community-azure-azure-rm-functionapp-info-module) – Get Azure Function App facts
* [azure\_rm\_hdinsightcluster\_info](azure_rm_hdinsightcluster_info_module#ansible-collections-community-azure-azure-rm-hdinsightcluster-info-module) – Get Azure HDInsight Cluster facts
* [azure\_rm\_image\_info](azure_rm_image_info_module#ansible-collections-community-azure-azure-rm-image-info-module) – Get facts about azure custom images
* [azure\_rm\_loadbalancer\_info](azure_rm_loadbalancer_info_module#ansible-collections-community-azure-azure-rm-loadbalancer-info-module) – Get load balancer facts
* [azure\_rm\_lock\_info](azure_rm_lock_info_module#ansible-collections-community-azure-azure-rm-lock-info-module) – Manage Azure locks
* [azure\_rm\_loganalyticsworkspace\_info](azure_rm_loganalyticsworkspace_info_module#ansible-collections-community-azure-azure-rm-loganalyticsworkspace-info-module) – Get facts of Azure Log Analytics workspaces
* [azure\_rm\_manageddisk](azure_rm_manageddisk_module#ansible-collections-community-azure-azure-rm-manageddisk-module) – Manage Azure Manage Disks
* [azure\_rm\_manageddisk\_info](azure_rm_manageddisk_info_module#ansible-collections-community-azure-azure-rm-manageddisk-info-module) – Get managed disk facts
* [azure\_rm\_mariadbconfiguration\_info](azure_rm_mariadbconfiguration_info_module#ansible-collections-community-azure-azure-rm-mariadbconfiguration-info-module) – Get Azure MariaDB Configuration facts
* [azure\_rm\_mariadbdatabase\_info](azure_rm_mariadbdatabase_info_module#ansible-collections-community-azure-azure-rm-mariadbdatabase-info-module) – Get Azure MariaDB Database facts
* [azure\_rm\_mariadbfirewallrule\_info](azure_rm_mariadbfirewallrule_info_module#ansible-collections-community-azure-azure-rm-mariadbfirewallrule-info-module) – Get Azure MariaDB Firewall Rule facts
* [azure\_rm\_mariadbserver\_info](azure_rm_mariadbserver_info_module#ansible-collections-community-azure-azure-rm-mariadbserver-info-module) – Get Azure MariaDB Server facts
* [azure\_rm\_mysqlconfiguration\_info](azure_rm_mysqlconfiguration_info_module#ansible-collections-community-azure-azure-rm-mysqlconfiguration-info-module) – Get Azure MySQL Configuration facts
* [azure\_rm\_mysqldatabase\_info](azure_rm_mysqldatabase_info_module#ansible-collections-community-azure-azure-rm-mysqldatabase-info-module) – Get Azure MySQL Database facts
* [azure\_rm\_mysqlfirewallrule\_info](azure_rm_mysqlfirewallrule_info_module#ansible-collections-community-azure-azure-rm-mysqlfirewallrule-info-module) – Get Azure MySQL Firewall Rule facts
* [azure\_rm\_mysqlserver\_info](azure_rm_mysqlserver_info_module#ansible-collections-community-azure-azure-rm-mysqlserver-info-module) – Get Azure MySQL Server facts
* [azure\_rm\_networkinterface\_info](azure_rm_networkinterface_info_module#ansible-collections-community-azure-azure-rm-networkinterface-info-module) – Get network interface facts
* [azure\_rm\_postgresqlconfiguration\_info](azure_rm_postgresqlconfiguration_info_module#ansible-collections-community-azure-azure-rm-postgresqlconfiguration-info-module) – Get Azure PostgreSQL Configuration facts
* [azure\_rm\_postgresqldatabase\_info](azure_rm_postgresqldatabase_info_module#ansible-collections-community-azure-azure-rm-postgresqldatabase-info-module) – Get Azure PostgreSQL Database facts
* [azure\_rm\_postgresqlfirewallrule\_info](azure_rm_postgresqlfirewallrule_info_module#ansible-collections-community-azure-azure-rm-postgresqlfirewallrule-info-module) – Get Azure PostgreSQL Firewall Rule facts
* [azure\_rm\_postgresqlserver\_info](azure_rm_postgresqlserver_info_module#ansible-collections-community-azure-azure-rm-postgresqlserver-info-module) – Get Azure PostgreSQL Server facts
* [azure\_rm\_publicipaddress\_info](azure_rm_publicipaddress_info_module#ansible-collections-community-azure-azure-rm-publicipaddress-info-module) – Get public IP facts
* [azure\_rm\_rediscache\_info](azure_rm_rediscache_info_module#ansible-collections-community-azure-azure-rm-rediscache-info-module) – Get Azure Cache for Redis instance facts
* [azure\_rm\_resource\_info](azure_rm_resource_info_module#ansible-collections-community-azure-azure-rm-resource-info-module) – Generic facts of Azure resources
* [azure\_rm\_resourcegroup\_info](azure_rm_resourcegroup_info_module#ansible-collections-community-azure-azure-rm-resourcegroup-info-module) – Get resource group facts
* [azure\_rm\_roleassignment\_info](azure_rm_roleassignment_info_module#ansible-collections-community-azure-azure-rm-roleassignment-info-module) – Gets Azure Role Assignment facts
* [azure\_rm\_roledefinition\_info](azure_rm_roledefinition_info_module#ansible-collections-community-azure-azure-rm-roledefinition-info-module) – Get Azure Role Definition facts
* [azure\_rm\_routetable\_info](azure_rm_routetable_info_module#ansible-collections-community-azure-azure-rm-routetable-info-module) – Get route table facts
* [azure\_rm\_securitygroup\_info](azure_rm_securitygroup_info_module#ansible-collections-community-azure-azure-rm-securitygroup-info-module) – Get security group facts
* [azure\_rm\_servicebus\_info](azure_rm_servicebus_info_module#ansible-collections-community-azure-azure-rm-servicebus-info-module) – Get servicebus facts
* [azure\_rm\_sqldatabase\_info](azure_rm_sqldatabase_info_module#ansible-collections-community-azure-azure-rm-sqldatabase-info-module) – Get Azure SQL Database facts
* [azure\_rm\_sqlfirewallrule\_info](azure_rm_sqlfirewallrule_info_module#ansible-collections-community-azure-azure-rm-sqlfirewallrule-info-module) – Get Azure SQL Firewall Rule facts
* [azure\_rm\_sqlserver\_info](azure_rm_sqlserver_info_module#ansible-collections-community-azure-azure-rm-sqlserver-info-module) – Get SQL Server facts
* [azure\_rm\_storageaccount\_info](azure_rm_storageaccount_info_module#ansible-collections-community-azure-azure-rm-storageaccount-info-module) – Get storage account facts
* [azure\_rm\_subnet\_info](azure_rm_subnet_info_module#ansible-collections-community-azure-azure-rm-subnet-info-module) – Get Azure Subnet facts
* [azure\_rm\_trafficmanagerendpoint\_info](azure_rm_trafficmanagerendpoint_info_module#ansible-collections-community-azure-azure-rm-trafficmanagerendpoint-info-module) – Get Azure Traffic Manager endpoint facts
* [azure\_rm\_trafficmanagerprofile\_info](azure_rm_trafficmanagerprofile_info_module#ansible-collections-community-azure-azure-rm-trafficmanagerprofile-info-module) – Get Azure Traffic Manager profile facts
* [azure\_rm\_virtualmachine\_info](azure_rm_virtualmachine_info_module#ansible-collections-community-azure-azure-rm-virtualmachine-info-module) – Get virtual machine facts
* [azure\_rm\_virtualmachineextension](azure_rm_virtualmachineextension_module#ansible-collections-community-azure-azure-rm-virtualmachineextension-module) – Managed Azure Virtual Machine extension
* [azure\_rm\_virtualmachineextension\_info](azure_rm_virtualmachineextension_info_module#ansible-collections-community-azure-azure-rm-virtualmachineextension-info-module) – Get Azure Virtual Machine Extension facts
* [azure\_rm\_virtualmachineimage\_info](azure_rm_virtualmachineimage_info_module#ansible-collections-community-azure-azure-rm-virtualmachineimage-info-module) – Get virtual machine image facts
* [azure\_rm\_virtualmachinescaleset](azure_rm_virtualmachinescaleset_module#ansible-collections-community-azure-azure-rm-virtualmachinescaleset-module) – Manage Azure virtual machine scale sets
* [azure\_rm\_virtualmachinescaleset\_info](azure_rm_virtualmachinescaleset_info_module#ansible-collections-community-azure-azure-rm-virtualmachinescaleset-info-module) – Get Virtual Machine Scale Set facts
* [azure\_rm\_virtualmachinescalesetextension\_info](azure_rm_virtualmachinescalesetextension_info_module#ansible-collections-community-azure-azure-rm-virtualmachinescalesetextension-info-module) – Get Azure Virtual Machine Scale Set Extension facts
* [azure\_rm\_virtualmachinescalesetinstance\_info](azure_rm_virtualmachinescalesetinstance_info_module#ansible-collections-community-azure-azure-rm-virtualmachinescalesetinstance-info-module) – Get Azure Virtual Machine Scale Set Instance facts
* [azure\_rm\_virtualnetwork\_info](azure_rm_virtualnetwork_info_module#ansible-collections-community-azure-azure-rm-virtualnetwork-info-module) – Get virtual network facts
* [azure\_rm\_virtualnetworkpeering\_info](azure_rm_virtualnetworkpeering_info_module#ansible-collections-community-azure-azure-rm-virtualnetworkpeering-info-module) – Get facts of Azure Virtual Network Peering
* [azure\_rm\_webapp\_info](azure_rm_webapp_info_module#ansible-collections-community-azure-azure-rm-webapp-info-module) – Get Azure web app facts

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/azure/index.html>

Community.Docker
================

 Collection version 1.10.0

 Scenario Guide
--------------

 * [Docker Guide](docsite/scenario_guide)

 Plugin Index
------------

 These are the plugins in the community.docker collection

 ### Connection Plugins

 * [docker](docker_connection#ansible-collections-community-docker-docker-connection) – Run tasks in docker containers
* [docker\_api](docker_api_connection#ansible-collections-community-docker-docker-api-connection) – Run tasks in docker containers
* [nsenter](nsenter_connection#ansible-collections-community-docker-nsenter-connection) – execute on host running controller container

 ### Inventory Plugins

 * [docker\_containers](docker_containers_inventory#ansible-collections-community-docker-docker-containers-inventory) – Ansible dynamic inventory plugin for Docker containers.
* [docker\_machine](docker_machine_inventory#ansible-collections-community-docker-docker-machine-inventory) – Docker Machine inventory source
* [docker\_swarm](docker_swarm_inventory#ansible-collections-community-docker-docker-swarm-inventory) – Ansible dynamic inventory plugin for Docker swarm nodes.

 ### Modules

 * [current\_container\_facts](current_container_facts_module#ansible-collections-community-docker-current-container-facts-module) – Return facts about whether the module runs in a Docker container
* [docker\_compose](docker_compose_module#ansible-collections-community-docker-docker-compose-module) – Manage multi-container Docker applications with Docker Compose.
* [docker\_config](docker_config_module#ansible-collections-community-docker-docker-config-module) – Manage docker configs.
* [docker\_container](docker_container_module#ansible-collections-community-docker-docker-container-module) – manage docker containers
* [docker\_container\_exec](docker_container_exec_module#ansible-collections-community-docker-docker-container-exec-module) – Execute command in a docker container
* [docker\_container\_info](docker_container_info_module#ansible-collections-community-docker-docker-container-info-module) – Retrieves facts about docker container
* [docker\_host\_info](docker_host_info_module#ansible-collections-community-docker-docker-host-info-module) – Retrieves facts about docker host and lists of objects of the services.
* [docker\_image](docker_image_module#ansible-collections-community-docker-docker-image-module) – Manage docker images
* [docker\_image\_info](docker_image_info_module#ansible-collections-community-docker-docker-image-info-module) – Inspect docker images
* [docker\_image\_load](docker_image_load_module#ansible-collections-community-docker-docker-image-load-module) – Load docker image(s) from archives
* [docker\_login](docker_login_module#ansible-collections-community-docker-docker-login-module) – Log into a Docker registry.
* [docker\_network](docker_network_module#ansible-collections-community-docker-docker-network-module) – Manage Docker networks
* [docker\_network\_info](docker_network_info_module#ansible-collections-community-docker-docker-network-info-module) – Retrieves facts about docker network
* [docker\_node](docker_node_module#ansible-collections-community-docker-docker-node-module) – Manage Docker Swarm node
* [docker\_node\_info](docker_node_info_module#ansible-collections-community-docker-docker-node-info-module) – Retrieves facts about docker swarm node from Swarm Manager
* [docker\_plugin](docker_plugin_module#ansible-collections-community-docker-docker-plugin-module) – Manage Docker plugins
* [docker\_prune](docker_prune_module#ansible-collections-community-docker-docker-prune-module) – Allows to prune various docker objects
* [docker\_secret](docker_secret_module#ansible-collections-community-docker-docker-secret-module) – Manage docker secrets.
* [docker\_stack](docker_stack_module#ansible-collections-community-docker-docker-stack-module) – docker stack module
* [docker\_stack\_info](docker_stack_info_module#ansible-collections-community-docker-docker-stack-info-module) – Return information on a docker stack
* [docker\_stack\_task\_info](docker_stack_task_info_module#ansible-collections-community-docker-docker-stack-task-info-module) – Return information of the tasks on a docker stack
* [docker\_swarm](docker_swarm_module#ansible-collections-community-docker-docker-swarm-module) – Manage Swarm cluster
* [docker\_swarm\_info](docker_swarm_info_module#ansible-collections-community-docker-docker-swarm-info-module) – Retrieves facts about Docker Swarm cluster.
* [docker\_swarm\_service](docker_swarm_service_module#ansible-collections-community-docker-docker-swarm-service-module) – docker swarm service
* [docker\_swarm\_service\_info](docker_swarm_service_info_module#ansible-collections-community-docker-docker-swarm-service-info-module) – Retrieves information about docker services from a Swarm Manager
* [docker\_volume](docker_volume_module#ansible-collections-community-docker-docker-volume-module) – Manage Docker volumes
* [docker\_volume\_info](docker_volume_info_module#ansible-collections-community-docker-docker-volume-info-module) – Retrieve facts about Docker volumes

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/docker/index.html>

Community.Kubernetes
====================

 Collection version 1.2.1

 Plugin Index
------------

 These are the plugins in the community.kubernetes collection

 ### Connection Plugins

 * [kubectl](kubectl_connection#ansible-collections-community-kubernetes-kubectl-connection) – Execute tasks in pods running on Kubernetes.

 ### Inventory Plugins

 * [k8s](k8s_inventory#ansible-collections-community-kubernetes-k8s-inventory) – Kubernetes (K8s) inventory source
* [openshift](openshift_inventory#ansible-collections-community-kubernetes-openshift-inventory) – OpenShift inventory source

 ### Lookup Plugins

 * [k8s](k8s_lookup#ansible-collections-community-kubernetes-k8s-lookup) – Query the K8s API

 ### Modules

 * [helm](helm_module#ansible-collections-community-kubernetes-helm-module) – Manages Kubernetes packages with the Helm package manager
* [helm\_info](helm_info_module#ansible-collections-community-kubernetes-helm-info-module) – Get information from Helm package deployed inside the cluster
* [helm\_plugin](helm_plugin_module#ansible-collections-community-kubernetes-helm-plugin-module) – Manage Helm plugins
* [helm\_plugin\_info](helm_plugin_info_module#ansible-collections-community-kubernetes-helm-plugin-info-module) – Gather information about Helm plugins
* [helm\_repository](helm_repository_module#ansible-collections-community-kubernetes-helm-repository-module) – Manage Helm repositories.
* [helm\_template](helm_template_module#ansible-collections-community-kubernetes-helm-template-module) – Render chart templates
* [k8s](k8s_module#ansible-collections-community-kubernetes-k8s-module) – Manage Kubernetes (K8s) objects
* [k8s\_auth](k8s_auth_module#ansible-collections-community-kubernetes-k8s-auth-module) – Authenticate to Kubernetes clusters which require an explicit login step
* [k8s\_cluster\_info](k8s_cluster_info_module#ansible-collections-community-kubernetes-k8s-cluster-info-module) – Describe Kubernetes (K8s) cluster, APIs available and their respective versions
* [k8s\_exec](k8s_exec_module#ansible-collections-community-kubernetes-k8s-exec-module) – Execute command in Pod
* [k8s\_info](k8s_info_module#ansible-collections-community-kubernetes-k8s-info-module) – Describe Kubernetes (K8s) objects
* [k8s\_log](k8s_log_module#ansible-collections-community-kubernetes-k8s-log-module) – Fetch logs from Kubernetes resources
* [k8s\_rollback](k8s_rollback_module#ansible-collections-community-kubernetes-k8s-rollback-module) – Rollback Kubernetes (K8S) Deployments and DaemonSets
* [k8s\_scale](k8s_scale_module#ansible-collections-community-kubernetes-k8s-scale-module) – Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
* [k8s\_service](k8s_service_module#ansible-collections-community-kubernetes-k8s-service-module) – Manage Services on Kubernetes

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/kubernetes/index.html>

Community.Libvirt
=================

 Collection version 1.0.2

 Plugin Index
------------

 These are the plugins in the community.libvirt collection

 ### Connection Plugins

 * [libvirt\_lxc](libvirt_lxc_connection#ansible-collections-community-libvirt-libvirt-lxc-connection) – Run tasks in lxc containers via libvirt
* [libvirt\_qemu](libvirt_qemu_connection#ansible-collections-community-libvirt-libvirt-qemu-connection) – Run tasks on libvirt/qemu virtual machines

 ### Inventory Plugins

 * [libvirt](libvirt_inventory#ansible-collections-community-libvirt-libvirt-inventory) – Libvirt inventory source

 ### Modules

 * [virt](virt_module#ansible-collections-community-libvirt-virt-module) – Manages virtual machines supported by libvirt
* [virt\_net](virt_net_module#ansible-collections-community-libvirt-virt-net-module) – Manage libvirt network configuration
* [virt\_pool](virt_pool_module#ansible-collections-community-libvirt-virt-pool-module) – Manage libvirt storage pools

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/libvirt/index.html>

Community.Fortios
=================

 Collection version 1.0.0

 Plugin Index
------------

 These are the plugins in the community.fortios collection

 ### Httpapi Plugins

 * [fortianalyzer](fortianalyzer_httpapi#ansible-collections-community-fortios-fortianalyzer-httpapi) – HttpApi Plugin for Fortinet FortiAnalyzer Appliance or VM.
* [fortimanager](fortimanager_httpapi#ansible-collections-community-fortios-fortimanager-httpapi) – HttpApi Plugin for Fortinet FortiManager Appliance or VM.

 ### Modules

 * [faz\_device](faz_device_module#ansible-collections-community-fortios-faz-device-module) – Add or remove device
* [fmgr\_device](fmgr_device_module#ansible-collections-community-fortios-fmgr-device-module) – Add or remove device from FortiManager.
* [fmgr\_device\_config](fmgr_device_config_module#ansible-collections-community-fortios-fmgr-device-config-module) – Edit device configurations
* [fmgr\_device\_group](fmgr_device_group_module#ansible-collections-community-fortios-fmgr-device-group-module) – Alter FortiManager device groups.
* [fmgr\_device\_provision\_template](fmgr_device_provision_template_module#ansible-collections-community-fortios-fmgr-device-provision-template-module) – Manages Device Provisioning Templates in FortiManager.
* [fmgr\_fwobj\_address](fmgr_fwobj_address_module#ansible-collections-community-fortios-fmgr-fwobj-address-module) – Allows the management of firewall objects in FortiManager
* [fmgr\_fwobj\_ippool](fmgr_fwobj_ippool_module#ansible-collections-community-fortios-fmgr-fwobj-ippool-module) – Allows the editing of IP Pool Objects within FortiManager.
* [fmgr\_fwobj\_ippool6](fmgr_fwobj_ippool6_module#ansible-collections-community-fortios-fmgr-fwobj-ippool6-module) – Allows the editing of IP Pool Objects within FortiManager.
* [fmgr\_fwobj\_service](fmgr_fwobj_service_module#ansible-collections-community-fortios-fmgr-fwobj-service-module) – Manages FortiManager Firewall Service Objects.
* [fmgr\_fwobj\_vip](fmgr_fwobj_vip_module#ansible-collections-community-fortios-fmgr-fwobj-vip-module) – Manages Virtual IPs objects in FortiManager
* [fmgr\_fwpol\_ipv4](fmgr_fwpol_ipv4_module#ansible-collections-community-fortios-fmgr-fwpol-ipv4-module) – Allows the add/delete of Firewall Policies on Packages in FortiManager.
* [fmgr\_fwpol\_package](fmgr_fwpol_package_module#ansible-collections-community-fortios-fmgr-fwpol-package-module) – Manages FortiManager Firewall Policies Packages.
* [fmgr\_ha](fmgr_ha_module#ansible-collections-community-fortios-fmgr-ha-module) – Manages the High-Availability State of FortiManager Clusters and Nodes.
* [fmgr\_provisioning](fmgr_provisioning_module#ansible-collections-community-fortios-fmgr-provisioning-module) – Provision devices via FortiMananger
* [fmgr\_query](fmgr_query_module#ansible-collections-community-fortios-fmgr-query-module) – Query FortiManager data objects for use in Ansible workflows.
* [fmgr\_script](fmgr_script_module#ansible-collections-community-fortios-fmgr-script-module) – Add/Edit/Delete and execute scripts
* [fmgr\_secprof\_appctrl](fmgr_secprof_appctrl_module#ansible-collections-community-fortios-fmgr-secprof-appctrl-module) – Manage application control security profiles
* [fmgr\_secprof\_av](fmgr_secprof_av_module#ansible-collections-community-fortios-fmgr-secprof-av-module) – Manage security profile
* [fmgr\_secprof\_dns](fmgr_secprof_dns_module#ansible-collections-community-fortios-fmgr-secprof-dns-module) – Manage DNS security profiles in FortiManager
* [fmgr\_secprof\_ips](fmgr_secprof_ips_module#ansible-collections-community-fortios-fmgr-secprof-ips-module) – Managing IPS security profiles in FortiManager
* [fmgr\_secprof\_profile\_group](fmgr_secprof_profile_group_module#ansible-collections-community-fortios-fmgr-secprof-profile-group-module) – Manage security profiles within FortiManager
* [fmgr\_secprof\_proxy](fmgr_secprof_proxy_module#ansible-collections-community-fortios-fmgr-secprof-proxy-module) – Manage proxy security profiles in FortiManager
* [fmgr\_secprof\_spam](fmgr_secprof_spam_module#ansible-collections-community-fortios-fmgr-secprof-spam-module) – spam filter profile for FMG
* [fmgr\_secprof\_ssl\_ssh](fmgr_secprof_ssl_ssh_module#ansible-collections-community-fortios-fmgr-secprof-ssl-ssh-module) – Manage SSL and SSH security profiles in FortiManager
* [fmgr\_secprof\_voip](fmgr_secprof_voip_module#ansible-collections-community-fortios-fmgr-secprof-voip-module) – VOIP security profiles in FMG
* [fmgr\_secprof\_waf](fmgr_secprof_waf_module#ansible-collections-community-fortios-fmgr-secprof-waf-module) – FortiManager web application firewall security profile
* [fmgr\_secprof\_wanopt](fmgr_secprof_wanopt_module#ansible-collections-community-fortios-fmgr-secprof-wanopt-module) – WAN optimization
* [fmgr\_secprof\_web](fmgr_secprof_web_module#ansible-collections-community-fortios-fmgr-secprof-web-module) – Manage web filter security profiles in FortiManager

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/fortios/index.html>

Community.Grafana
=================

 Collection version 1.2.3

 Plugin Index
------------

 These are the plugins in the community.grafana collection

 ### Callback Plugins

 * [grafana\_annotations](grafana_annotations_callback#ansible-collections-community-grafana-grafana-annotations-callback) – send ansible events as annotations on charts to grafana over http api.

 ### Lookup Plugins

 * [grafana\_dashboard](grafana_dashboard_lookup#ansible-collections-community-grafana-grafana-dashboard-lookup) – list or search grafana dashboards

 ### Modules

 * [grafana\_dashboard](grafana_dashboard_module#ansible-collections-community-grafana-grafana-dashboard-module) – Manage Grafana dashboards
* [grafana\_datasource](grafana_datasource_module#ansible-collections-community-grafana-grafana-datasource-module) – Manage Grafana datasources
* [grafana\_folder](grafana_folder_module#ansible-collections-community-grafana-grafana-folder-module) – Manage Grafana Folders
* [grafana\_notification\_channel](grafana_notification_channel_module#ansible-collections-community-grafana-grafana-notification-channel-module) – Manage Grafana Notification Channels
* [grafana\_plugin](grafana_plugin_module#ansible-collections-community-grafana-grafana-plugin-module) – Manage Grafana plugins via grafana-cli
* [grafana\_team](grafana_team_module#ansible-collections-community-grafana-grafana-team-module) – Manage Grafana Teams
* [grafana\_user](grafana_user_module#ansible-collections-community-grafana-grafana-user-module) – Manage Grafana User

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/grafana/index.html>

Community.Hrobot
================

 Collection version 1.2.0

 Plugin Index
------------

 These are the plugins in the community.hrobot collection

 ### Inventory Plugins

 * [robot](robot_inventory#ansible-collections-community-hrobot-robot-inventory) – Hetzner Robot inventory source

 ### Modules

 * [boot](boot_module#ansible-collections-community-hrobot-boot-module) – Set boot configuration
* [failover\_ip](failover_ip_module#ansible-collections-community-hrobot-failover-ip-module) – Manage Hetzner’s failover IPs
* [failover\_ip\_info](failover_ip_info_module#ansible-collections-community-hrobot-failover-ip-info-module) – Retrieve information on Hetzner’s failover IPs
* [firewall](firewall_module#ansible-collections-community-hrobot-firewall-module) – Manage Hetzner’s dedicated server firewall
* [firewall\_info](firewall_info_module#ansible-collections-community-hrobot-firewall-info-module) – Manage Hetzner’s dedicated server firewall
* [reset](reset_module#ansible-collections-community-hrobot-reset-module) – Reset a dedicated server
* [reverse\_dns](reverse_dns_module#ansible-collections-community-hrobot-reverse-dns-module) – Set or remove reverse DNS entry for IP
* [server](server_module#ansible-collections-community-hrobot-server-module) – Update server information
* [server\_info](server_info_module#ansible-collections-community-hrobot-server-info-module) – Query information on one or more servers
* [ssh\_key](ssh_key_module#ansible-collections-community-hrobot-ssh-key-module) – Add, remove or update SSH key
* [ssh\_key\_info](ssh_key_info_module#ansible-collections-community-hrobot-ssh-key-info-module) – Query information on SSH keys

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/hrobot/index.html>

Community.Kubevirt
==================

 Collection version 1.0.0

 Plugin Index
------------

 These are the plugins in the community.kubevirt collection

 ### Inventory Plugins

 * [kubevirt](kubevirt_inventory#ansible-collections-community-kubevirt-kubevirt-inventory) – KubeVirt inventory source

 ### Modules

 * [kubevirt\_cdi\_upload](kubevirt_cdi_upload_module#ansible-collections-community-kubevirt-kubevirt-cdi-upload-module) – Upload local VM images to CDI Upload Proxy.
* [kubevirt\_preset](kubevirt_preset_module#ansible-collections-community-kubevirt-kubevirt-preset-module) – Manage KubeVirt virtual machine presets
* [kubevirt\_pvc](kubevirt_pvc_module#ansible-collections-community-kubevirt-kubevirt-pvc-module) – Manage PVCs on Kubernetes
* [kubevirt\_rs](kubevirt_rs_module#ansible-collections-community-kubevirt-kubevirt-rs-module) – Manage KubeVirt virtual machine replica sets
* [kubevirt\_template](kubevirt_template_module#ansible-collections-community-kubevirt-kubevirt-template-module) – Manage KubeVirt templates
* [kubevirt\_vm](kubevirt_vm_module#ansible-collections-community-kubevirt-kubevirt-vm-module) – Manage KubeVirt virtual machine

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/kubevirt/index.html>

Community.Mongodb
=================

 Collection version 1.3.1

 Plugin Index
------------

 These are the plugins in the community.mongodb collection

 ### Cache Plugins

 * [mongodb](mongodb_cache#ansible-collections-community-mongodb-mongodb-cache) –

 ### Lookup Plugins

 * [mongodb](mongodb_lookup#ansible-collections-community-mongodb-mongodb-lookup) –

 ### Modules

 * [mongodb\_balancer](mongodb_balancer_module#ansible-collections-community-mongodb-mongodb-balancer-module) – Manages the MongoDB Sharded Cluster Balancer.
* [mongodb\_index](mongodb_index_module#ansible-collections-community-mongodb-mongodb-index-module) – Creates or drops indexes on MongoDB collections.
* [mongodb\_info](mongodb_info_module#ansible-collections-community-mongodb-mongodb-info-module) – Gather information about MongoDB instance.
* [mongodb\_maintenance](mongodb_maintenance_module#ansible-collections-community-mongodb-mongodb-maintenance-module) – Enables or disables maintenance mode for a secondary member.
* [mongodb\_monitoring](mongodb_monitoring_module#ansible-collections-community-mongodb-mongodb-monitoring-module) – Manages the free monitoring feature.
* [mongodb\_oplog](mongodb_oplog_module#ansible-collections-community-mongodb-mongodb-oplog-module) – Resizes the MongoDB oplog.
* [mongodb\_parameter](mongodb_parameter_module#ansible-collections-community-mongodb-mongodb-parameter-module) – Change an administrative parameter on a MongoDB server
* [mongodb\_replicaset](mongodb_replicaset_module#ansible-collections-community-mongodb-mongodb-replicaset-module) – Initialises a MongoDB replicaset.
* [mongodb\_schema](mongodb_schema_module#ansible-collections-community-mongodb-mongodb-schema-module) – Manages MongoDB Document Schema Validators.
* [mongodb\_shard](mongodb_shard_module#ansible-collections-community-mongodb-mongodb-shard-module) – Add or remove shards from a MongoDB Cluster
* [mongodb\_shard\_tag](mongodb_shard_tag_module#ansible-collections-community-mongodb-mongodb-shard-tag-module) – Manage Shard Tags.
* [mongodb\_shard\_zone](mongodb_shard_zone_module#ansible-collections-community-mongodb-mongodb-shard-zone-module) – Manage Shard Zones.
* [mongodb\_shell](mongodb_shell_module#ansible-collections-community-mongodb-mongodb-shell-module) – Run commands via the MongoDB shell.
* [mongodb\_shutdown](mongodb_shutdown_module#ansible-collections-community-mongodb-mongodb-shutdown-module) – Cleans up all database resources and then terminates the mongod/mongos process.
* [mongodb\_status](mongodb_status_module#ansible-collections-community-mongodb-mongodb-status-module) – Validates the status of the replicaset.
* [mongodb\_stepdown](mongodb_stepdown_module#ansible-collections-community-mongodb-mongodb-stepdown-module) – Step down the MongoDB node from a PRIMARY state.
* [mongodb\_user](mongodb_user_module#ansible-collections-community-mongodb-mongodb-user-module) – Adds or removes a user from a MongoDB database

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/mongodb/index.html>

Community.Mysql
===============

 Collection version 2.3.1

 Plugin Index
------------

 These are the plugins in the community.mysql collection

 ### Modules

 * [mysql\_db](mysql_db_module#ansible-collections-community-mysql-mysql-db-module) – Add or remove MySQL databases from a remote host
* [mysql\_info](mysql_info_module#ansible-collections-community-mysql-mysql-info-module) – Gather information about MySQL servers
* [mysql\_query](mysql_query_module#ansible-collections-community-mysql-mysql-query-module) – Run MySQL queries
* [mysql\_replication](mysql_replication_module#ansible-collections-community-mysql-mysql-replication-module) – Manage MySQL replication
* [mysql\_role](mysql_role_module#ansible-collections-community-mysql-mysql-role-module) – Adds, removes, or updates a MySQL role
* [mysql\_user](mysql_user_module#ansible-collections-community-mysql-mysql-user-module) – Adds or removes a user from a MySQL database
* [mysql\_variables](mysql_variables_module#ansible-collections-community-mysql-mysql-variables-module) – Manage MySQL global variables

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/mysql/index.html>

Community.Google
================

 Collection version 1.0.0

 Plugin Index
------------

 These are the plugins in the community.google collection

 ### Lookup Plugins

 * [gcp\_storage\_file](gcp_storage_file_lookup#ansible-collections-community-google-gcp-storage-file-lookup) – Return GC Storage content

 ### Modules

 * [gc\_storage](gc_storage_module#ansible-collections-community-google-gc-storage-module) – This module manages objects/buckets in Google Cloud Storage.
* [gce\_eip](gce_eip_module#ansible-collections-community-google-gce-eip-module) – Create or Destroy Global or Regional External IP addresses.
* [gce\_img](gce_img_module#ansible-collections-community-google-gce-img-module) – utilize GCE image resources
* [gce\_instance\_template](gce_instance_template_module#ansible-collections-community-google-gce-instance-template-module) – create or destroy instance templates of Compute Engine of GCP.
* [gce\_labels](gce_labels_module#ansible-collections-community-google-gce-labels-module) – Create, Update or Destroy GCE Labels.
* [gce\_lb](gce_lb_module#ansible-collections-community-google-gce-lb-module) – create/destroy GCE load-balancer resources
* [gce\_mig](gce_mig_module#ansible-collections-community-google-gce-mig-module) – Create, Update or Destroy a Managed Instance Group (MIG).
* [gce\_net](gce_net_module#ansible-collections-community-google-gce-net-module) – create/destroy GCE networks and firewall rules
* [gce\_pd](gce_pd_module#ansible-collections-community-google-gce-pd-module) – utilize GCE persistent disk resources
* [gce\_snapshot](gce_snapshot_module#ansible-collections-community-google-gce-snapshot-module) – Create or destroy snapshots for GCE storage volumes
* [gce\_tag](gce_tag_module#ansible-collections-community-google-gce-tag-module) – add or remove tag(s) to/from GCE instances
* [gcpubsub](gcpubsub_module#ansible-collections-community-google-gcpubsub-module) – Create and Delete Topics/Subscriptions, Publish and pull messages on PubSub
* [gcpubsub\_info](gcpubsub_info_module#ansible-collections-community-google-gcpubsub-info-module) – List Topics/Subscriptions and Messages from Google PubSub.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/google/index.html>

Community.Hashi\_Vault
======================

 Collection version 1.4.1

 Guides
------

 * [User guide](docsite/user_guide)
* [Contributor guide](docsite/contributor_guide)
* [localenv developer guide](docsite/localenv_developer_guide)

 Plugin Index
------------

 These are the plugins in the community.hashi\_vault collection

 ### Lookup Plugins

 * [hashi\_vault](hashi_vault_lookup#ansible-collections-community-hashi-vault-hashi-vault-lookup) – Retrieve secrets from HashiCorp’s Vault
* [vault\_read](vault_read_lookup#ansible-collections-community-hashi-vault-vault-read-lookup) – Perform a read operation against HashiCorp Vault

 ### Modules

 * [vault\_read](vault_read_module#ansible-collections-community-hashi-vault-vault-read-module) – Perform a read operation against HashiCorp Vault

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/hashi_vault/index.html>

Community.General
=================

 Collection version 3.8.1

 Guides
------

 * [community.general Filter Guide](docsite/filter_guide)

 Plugin Index
------------

 These are the plugins in the community.general collection

 ### Become Plugins

 * [doas](doas_become#ansible-collections-community-general-doas-become) – Do As user
* [dzdo](dzdo_become#ansible-collections-community-general-dzdo-become) – Centrify’s Direct Authorize
* [ksu](ksu_become#ansible-collections-community-general-ksu-become) – Kerberos substitute user
* [machinectl](machinectl_become#ansible-collections-community-general-machinectl-become) – Systemd’s machinectl privilege escalation
* [pbrun](pbrun_become#ansible-collections-community-general-pbrun-become) – PowerBroker run
* [pfexec](pfexec_become#ansible-collections-community-general-pfexec-become) – profile based execution
* [pmrun](pmrun_become#ansible-collections-community-general-pmrun-become) – Privilege Manager run
* [sesu](sesu_become#ansible-collections-community-general-sesu-become) – CA Privileged Access Manager
* [sudosu](sudosu_become#ansible-collections-community-general-sudosu-become) – Run tasks using sudo su -

 ### Cache Plugins

 * [memcached](memcached_cache#ansible-collections-community-general-memcached-cache) – Use memcached DB for cache
* [pickle](pickle_cache#ansible-collections-community-general-pickle-cache) – Pickle formatted files.
* [redis](redis_cache#ansible-collections-community-general-redis-cache) – Use Redis DB for cache
* [yaml](yaml_cache#ansible-collections-community-general-yaml-cache) – YAML formatted files.

 ### Callback Plugins

 * [cgroup\_memory\_recap](cgroup_memory_recap_callback#ansible-collections-community-general-cgroup-memory-recap-callback) – Profiles maximum memory usage of tasks and full execution using cgroups
* [context\_demo](context_demo_callback#ansible-collections-community-general-context-demo-callback) – demo callback that adds play/task context
* [counter\_enabled](counter_enabled_callback#ansible-collections-community-general-counter-enabled-callback) – adds counters to the output items (tasks and hosts/task)
* [dense](dense_callback#ansible-collections-community-general-dense-callback) – minimal stdout output
* [diy](diy_callback#ansible-collections-community-general-diy-callback) – Customize the output
* [elastic](elastic_callback#ansible-collections-community-general-elastic-callback) – Create distributed traces for each Ansible task in Elastic APM
* [hipchat](hipchat_callback#ansible-collections-community-general-hipchat-callback) – post task events to hipchat
* [jabber](jabber_callback#ansible-collections-community-general-jabber-callback) – post task events to a jabber server
* [log\_plays](log_plays_callback#ansible-collections-community-general-log-plays-callback) – write playbook output to log file
* [loganalytics](loganalytics_callback#ansible-collections-community-general-loganalytics-callback) – Posts task results to Azure Log Analytics
* [logdna](logdna_callback#ansible-collections-community-general-logdna-callback) – Sends playbook logs to LogDNA
* [logentries](logentries_callback#ansible-collections-community-general-logentries-callback) – Sends events to Logentries
* [logstash](logstash_callback#ansible-collections-community-general-logstash-callback) – Sends events to Logstash
* [mail](mail_callback#ansible-collections-community-general-mail-callback) – Sends failure events via email
* [nrdp](nrdp_callback#ansible-collections-community-general-nrdp-callback) – Post task results to a Nagios server through nrdp
* [null](null_callback#ansible-collections-community-general-null-callback) – Don’t display stuff to screen
* [opentelemetry](opentelemetry_callback#ansible-collections-community-general-opentelemetry-callback) – Create distributed traces with OpenTelemetry
* [say](say_callback#ansible-collections-community-general-say-callback) – notify using software speech synthesizer
* [selective](selective_callback#ansible-collections-community-general-selective-callback) – only print certain tasks
* [slack](slack_callback#ansible-collections-community-general-slack-callback) – Sends play events to a Slack channel
* [splunk](splunk_callback#ansible-collections-community-general-splunk-callback) – Sends task result events to Splunk HTTP Event Collector
* [sumologic](sumologic_callback#ansible-collections-community-general-sumologic-callback) – Sends task result events to Sumologic
* [syslog\_json](syslog_json_callback#ansible-collections-community-general-syslog-json-callback) – sends JSON events to syslog
* [unixy](unixy_callback#ansible-collections-community-general-unixy-callback) – condensed Ansible output
* [yaml](yaml_callback#ansible-collections-community-general-yaml-callback) – yaml-ized Ansible screen output

 ### Connection Plugins

 * [chroot](chroot_connection#ansible-collections-community-general-chroot-connection) – Interact with local chroot
* [funcd](funcd_connection#ansible-collections-community-general-funcd-connection) – Use funcd to connect to target
* [iocage](iocage_connection#ansible-collections-community-general-iocage-connection) – Run tasks in iocage jails
* [jail](jail_connection#ansible-collections-community-general-jail-connection) – Run tasks in jails
* [lxc](lxc_connection#ansible-collections-community-general-lxc-connection) – Run tasks in lxc containers via lxc python library
* [lxd](lxd_connection#ansible-collections-community-general-lxd-connection) – Run tasks in lxc containers via lxc CLI
* [qubes](qubes_connection#ansible-collections-community-general-qubes-connection) – Interact with an existing QubesOS AppVM
* [saltstack](saltstack_connection#ansible-collections-community-general-saltstack-connection) – Allow ansible to piggyback on salt minions
* [zone](zone_connection#ansible-collections-community-general-zone-connection) – Run tasks in a zone instance

 ### Inventory Plugins

 * [cobbler](cobbler_inventory#ansible-collections-community-general-cobbler-inventory) – Cobbler inventory source
* [gitlab\_runners](gitlab_runners_inventory#ansible-collections-community-general-gitlab-runners-inventory) – Ansible dynamic inventory plugin for GitLab runners.
* [icinga2](icinga2_inventory#ansible-collections-community-general-icinga2-inventory) – Icinga2 inventory source
* [linode](linode_inventory#ansible-collections-community-general-linode-inventory) – Ansible dynamic inventory plugin for Linode.
* [lxd](lxd_inventory#ansible-collections-community-general-lxd-inventory) – Returns Ansible inventory from lxd host
* [nmap](nmap_inventory#ansible-collections-community-general-nmap-inventory) – Uses nmap to find hosts to target
* [online](online_inventory#ansible-collections-community-general-online-inventory) – Scaleway (previously Online SAS or Online.net) inventory source
* [opennebula](opennebula_inventory#ansible-collections-community-general-opennebula-inventory) – OpenNebula inventory source
* [proxmox](proxmox_inventory#ansible-collections-community-general-proxmox-inventory) – Proxmox inventory source
* [scaleway](scaleway_inventory#ansible-collections-community-general-scaleway-inventory) – Scaleway inventory source
* [stackpath\_compute](stackpath_compute_inventory#ansible-collections-community-general-stackpath-compute-inventory) – StackPath Edge Computing inventory source
* [virtualbox](virtualbox_inventory#ansible-collections-community-general-virtualbox-inventory) – virtualbox inventory source

 ### Lookup Plugins

 * [cartesian](cartesian_lookup#ansible-collections-community-general-cartesian-lookup) – returns the cartesian product of lists
* [chef\_databag](chef_databag_lookup#ansible-collections-community-general-chef-databag-lookup) – fetches data from a Chef Databag
* [consul\_kv](consul_kv_lookup#ansible-collections-community-general-consul-kv-lookup) – Fetch metadata from a Consul key value store.
* [credstash](credstash_lookup#ansible-collections-community-general-credstash-lookup) – retrieve secrets from Credstash on AWS
* [cyberarkpassword](cyberarkpassword_lookup#ansible-collections-community-general-cyberarkpassword-lookup) – get secrets from CyberArk AIM
* [dependent](dependent_lookup#ansible-collections-community-general-dependent-lookup) – Composes a list with nested elements of other lists or dicts which can depend on previous loop variables
* [dig](dig_lookup#ansible-collections-community-general-dig-lookup) – query DNS using the dnspython library
* [dnstxt](dnstxt_lookup#ansible-collections-community-general-dnstxt-lookup) – query a domain(s)’s DNS txt fields
* [dsv](dsv_lookup#ansible-collections-community-general-dsv-lookup) – Get secrets from Thycotic DevOps Secrets Vault
* [etcd](etcd_lookup#ansible-collections-community-general-etcd-lookup) – get info from an etcd server
* [etcd3](etcd3_lookup#ansible-collections-community-general-etcd3-lookup) – Get key values from etcd3 server
* [filetree](filetree_lookup#ansible-collections-community-general-filetree-lookup) – recursively match all files in a directory tree
* [flattened](flattened_lookup#ansible-collections-community-general-flattened-lookup) – return single list completely flattened
* [hiera](hiera_lookup#ansible-collections-community-general-hiera-lookup) – get info from hiera data
* [keyring](keyring_lookup#ansible-collections-community-general-keyring-lookup) – grab secrets from the OS keyring
* [lastpass](lastpass_lookup#ansible-collections-community-general-lastpass-lookup) – fetch data from lastpass
* [lmdb\_kv](lmdb_kv_lookup#ansible-collections-community-general-lmdb-kv-lookup) – fetch data from LMDB
* [manifold](manifold_lookup#ansible-collections-community-general-manifold-lookup) – get credentials from Manifold.co
* [nios](nios_lookup#ansible-collections-community-general-nios-lookup) – Query Infoblox NIOS objects
* [nios\_next\_ip](nios_next_ip_lookup#ansible-collections-community-general-nios-next-ip-lookup) – Return the next available IP address for a network
* [nios\_next\_network](nios_next_network_lookup#ansible-collections-community-general-nios-next-network-lookup) – Return the next available network range for a network-container
* [onepassword](onepassword_lookup#ansible-collections-community-general-onepassword-lookup) – fetch field values from 1Password
* [onepassword\_raw](onepassword_raw_lookup#ansible-collections-community-general-onepassword-raw-lookup) – fetch an entire item from 1Password
* [passwordstore](passwordstore_lookup#ansible-collections-community-general-passwordstore-lookup) – manage passwords with passwordstore.org’s pass utility
* [random\_pet](random_pet_lookup#ansible-collections-community-general-random-pet-lookup) – Generates random pet names
* [random\_string](random_string_lookup#ansible-collections-community-general-random-string-lookup) – Generates random string
* [redis](redis_lookup#ansible-collections-community-general-redis-lookup) – fetch data from Redis
* [shelvefile](shelvefile_lookup#ansible-collections-community-general-shelvefile-lookup) – read keys from Python shelve file
* [tss](tss_lookup#ansible-collections-community-general-tss-lookup) – Get secrets from Thycotic Secret Server

 ### Modules

 * [aerospike\_migrations](aerospike_migrations_module#ansible-collections-community-general-aerospike-migrations-module) – Check or wait for migrations between nodes
* [airbrake\_deployment](airbrake_deployment_module#ansible-collections-community-general-airbrake-deployment-module) – Notify airbrake about app deployments
* [aix\_devices](aix_devices_module#ansible-collections-community-general-aix-devices-module) – Manages AIX devices
* [aix\_filesystem](aix_filesystem_module#ansible-collections-community-general-aix-filesystem-module) – Configure LVM and NFS file systems for AIX
* [aix\_inittab](aix_inittab_module#ansible-collections-community-general-aix-inittab-module) – Manages the inittab on AIX
* [aix\_lvg](aix_lvg_module#ansible-collections-community-general-aix-lvg-module) – Manage LVM volume groups on AIX
* [aix\_lvol](aix_lvol_module#ansible-collections-community-general-aix-lvol-module) – Configure AIX LVM logical volumes
* [ali\_instance](ali_instance_module#ansible-collections-community-general-ali-instance-module) – Create, Start, Stop, Restart or Terminate an Instance in ECS. Add or Remove Instance to/from a Security Group.
* [ali\_instance\_info](ali_instance_info_module#ansible-collections-community-general-ali-instance-info-module) – Gather information on instances of Alibaba Cloud ECS.
* [alternatives](alternatives_module#ansible-collections-community-general-alternatives-module) – Manages alternative programs for common commands
* [ansible\_galaxy\_install](ansible_galaxy_install_module#ansible-collections-community-general-ansible-galaxy-install-module) – Install Ansible roles or collections using ansible-galaxy
* [apache2\_mod\_proxy](apache2_mod_proxy_module#ansible-collections-community-general-apache2-mod-proxy-module) – Set and/or get members’ attributes of an Apache httpd 2.4 mod\_proxy balancer pool
* [apache2\_module](apache2_module_module#ansible-collections-community-general-apache2-module-module) – Enables/disables a module of the Apache2 webserver.
* [apk](apk_module#ansible-collections-community-general-apk-module) – Manages apk packages
* [apt\_repo](apt_repo_module#ansible-collections-community-general-apt-repo-module) – Manage APT repositories via apt-repo
* [apt\_rpm](apt_rpm_module#ansible-collections-community-general-apt-rpm-module) – apt\_rpm package manager
* [archive](archive_module#ansible-collections-community-general-archive-module) – Creates a compressed archive of one or more files or trees
* [atomic\_container](atomic_container_module#ansible-collections-community-general-atomic-container-module) – Manage the containers on the atomic host platform
* [atomic\_host](atomic_host_module#ansible-collections-community-general-atomic-host-module) – Manage the atomic host platform
* [atomic\_image](atomic_image_module#ansible-collections-community-general-atomic-image-module) – Manage the container images on the atomic host platform
* [awall](awall_module#ansible-collections-community-general-awall-module) – Manage awall policies
* [beadm](beadm_module#ansible-collections-community-general-beadm-module) – Manage ZFS boot environments on FreeBSD/Solaris/illumos systems.
* [bearychat](bearychat_module#ansible-collections-community-general-bearychat-module) – Send BearyChat notifications
* [bigpanda](bigpanda_module#ansible-collections-community-general-bigpanda-module) – Notify BigPanda about deployments
* [bitbucket\_access\_key](bitbucket_access_key_module#ansible-collections-community-general-bitbucket-access-key-module) – Manages Bitbucket repository access keys
* [bitbucket\_pipeline\_key\_pair](bitbucket_pipeline_key_pair_module#ansible-collections-community-general-bitbucket-pipeline-key-pair-module) – Manages Bitbucket pipeline SSH key pair
* [bitbucket\_pipeline\_known\_host](bitbucket_pipeline_known_host_module#ansible-collections-community-general-bitbucket-pipeline-known-host-module) – Manages Bitbucket pipeline known hosts
* [bitbucket\_pipeline\_variable](bitbucket_pipeline_variable_module#ansible-collections-community-general-bitbucket-pipeline-variable-module) – Manages Bitbucket pipeline variables
* [bower](bower_module#ansible-collections-community-general-bower-module) – Manage bower packages with bower
* [bundler](bundler_module#ansible-collections-community-general-bundler-module) – Manage Ruby Gem dependencies with Bundler
* [bzr](bzr_module#ansible-collections-community-general-bzr-module) – Deploy software (or files) from bzr branches
* [campfire](campfire_module#ansible-collections-community-general-campfire-module) – Send a message to Campfire
* [capabilities](capabilities_module#ansible-collections-community-general-capabilities-module) – Manage Linux capabilities
* [catapult](catapult_module#ansible-collections-community-general-catapult-module) – Send a sms / mms using the catapult bandwidth api
* [circonus\_annotation](circonus_annotation_module#ansible-collections-community-general-circonus-annotation-module) – create an annotation in circonus
* [cisco\_webex](cisco_webex_module#ansible-collections-community-general-cisco-webex-module) – Send a message to a Cisco Webex Teams Room or Individual
* [clc\_aa\_policy](clc_aa_policy_module#ansible-collections-community-general-clc-aa-policy-module) – Create or Delete Anti Affinity Policies at CenturyLink Cloud.
* [clc\_alert\_policy](clc_alert_policy_module#ansible-collections-community-general-clc-alert-policy-module) – Create or Delete Alert Policies at CenturyLink Cloud.
* [clc\_blueprint\_package](clc_blueprint_package_module#ansible-collections-community-general-clc-blueprint-package-module) – deploys a blue print package on a set of servers in CenturyLink Cloud.
* [clc\_firewall\_policy](clc_firewall_policy_module#ansible-collections-community-general-clc-firewall-policy-module) – Create/delete/update firewall policies
* [clc\_group](clc_group_module#ansible-collections-community-general-clc-group-module) – Create/delete Server Groups at Centurylink Cloud
* [clc\_loadbalancer](clc_loadbalancer_module#ansible-collections-community-general-clc-loadbalancer-module) – Create, Delete shared loadbalancers in CenturyLink Cloud.
* [clc\_modify\_server](clc_modify_server_module#ansible-collections-community-general-clc-modify-server-module) – modify servers in CenturyLink Cloud.
* [clc\_publicip](clc_publicip_module#ansible-collections-community-general-clc-publicip-module) – Add and Delete public ips on servers in CenturyLink Cloud.
* [clc\_server](clc_server_module#ansible-collections-community-general-clc-server-module) – Create, Delete, Start and Stop servers in CenturyLink Cloud.
* [clc\_server\_snapshot](clc_server_snapshot_module#ansible-collections-community-general-clc-server-snapshot-module) – Create, Delete and Restore server snapshots in CenturyLink Cloud.
* [cloud\_init\_data\_facts](cloud_init_data_facts_module#ansible-collections-community-general-cloud-init-data-facts-module) – Retrieve facts of cloud-init.
* [cloudflare\_dns](cloudflare_dns_module#ansible-collections-community-general-cloudflare-dns-module) – Manage Cloudflare DNS records
* [cobbler\_sync](cobbler_sync_module#ansible-collections-community-general-cobbler-sync-module) – Sync Cobbler
* [cobbler\_system](cobbler_system_module#ansible-collections-community-general-cobbler-system-module) – Manage system objects in Cobbler
* [composer](composer_module#ansible-collections-community-general-composer-module) – Dependency Manager for PHP
* [consul](consul_module#ansible-collections-community-general-consul-module) – Add, modify & delete services within a consul cluster.
* [consul\_acl](consul_acl_module#ansible-collections-community-general-consul-acl-module) – Manipulate Consul ACL keys and rules
* [consul\_kv](consul_kv_module#ansible-collections-community-general-consul-kv-module) – Manipulate entries in the key/value store of a consul cluster
* [consul\_session](consul_session_module#ansible-collections-community-general-consul-session-module) – Manipulate consul sessions
* [copr](copr_module#ansible-collections-community-general-copr-module) – Manage one of the Copr repositories
* [cpanm](cpanm_module#ansible-collections-community-general-cpanm-module) – Manages Perl library dependencies.
* [cronvar](cronvar_module#ansible-collections-community-general-cronvar-module) – Manage variables in crontabs
* [crypttab](crypttab_module#ansible-collections-community-general-crypttab-module) – Encrypted Linux block devices
* [datadog\_downtime](datadog_downtime_module#ansible-collections-community-general-datadog-downtime-module) – Manages Datadog downtimes
* [datadog\_event](datadog_event_module#ansible-collections-community-general-datadog-event-module) – Posts events to Datadog service
* [datadog\_monitor](datadog_monitor_module#ansible-collections-community-general-datadog-monitor-module) – Manages Datadog monitors
* [dconf](dconf_module#ansible-collections-community-general-dconf-module) – Modify and read dconf database
* [deploy\_helper](deploy_helper_module#ansible-collections-community-general-deploy-helper-module) – Manages some of the steps common in deploying projects.
* [dimensiondata\_network](dimensiondata_network_module#ansible-collections-community-general-dimensiondata-network-module) – Create, update, and delete MCP 1.0 & 2.0 networks
* [dimensiondata\_vlan](dimensiondata_vlan_module#ansible-collections-community-general-dimensiondata-vlan-module) – Manage a VLAN in a Cloud Control network domain.
* [discord](discord_module#ansible-collections-community-general-discord-module) – Send Discord messages
* [django\_manage](django_manage_module#ansible-collections-community-general-django-manage-module) – Manages a Django application.
* [dnsimple](dnsimple_module#ansible-collections-community-general-dnsimple-module) – Interface with dnsimple.com (a DNS hosting service)
* [dnsmadeeasy](dnsmadeeasy_module#ansible-collections-community-general-dnsmadeeasy-module) – Interface with dnsmadeeasy.com (a DNS hosting service).
* [dpkg\_divert](dpkg_divert_module#ansible-collections-community-general-dpkg-divert-module) – Override a debian package’s version of a file
* [easy\_install](easy_install_module#ansible-collections-community-general-easy-install-module) – Installs Python libraries
* [ejabberd\_user](ejabberd_user_module#ansible-collections-community-general-ejabberd-user-module) – Manages users for ejabberd servers
* [elasticsearch\_plugin](elasticsearch_plugin_module#ansible-collections-community-general-elasticsearch-plugin-module) – Manage Elasticsearch plugins
* [emc\_vnx\_sg\_member](emc_vnx_sg_member_module#ansible-collections-community-general-emc-vnx-sg-member-module) – Manage storage group member on EMC VNX
* [etcd3](etcd3_module#ansible-collections-community-general-etcd3-module) – Set or delete key value pairs from an etcd3 cluster
* [facter](facter_module#ansible-collections-community-general-facter-module) – Runs the discovery program *facter* on the remote system
* [filesize](filesize_module#ansible-collections-community-general-filesize-module) – Create a file with a given size, or resize it if it exists
* [filesystem](filesystem_module#ansible-collections-community-general-filesystem-module) – Makes a filesystem
* [flatpak](flatpak_module#ansible-collections-community-general-flatpak-module) – Manage flatpaks
* [flatpak\_remote](flatpak_remote_module#ansible-collections-community-general-flatpak-remote-module) – Manage flatpak repository remotes
* [flowdock](flowdock_module#ansible-collections-community-general-flowdock-module) – Send a message to a flowdock
* [gandi\_livedns](gandi_livedns_module#ansible-collections-community-general-gandi-livedns-module) – Manage Gandi LiveDNS records
* [gconftool2](gconftool2_module#ansible-collections-community-general-gconftool2-module) – Edit GNOME Configurations
* [gem](gem_module#ansible-collections-community-general-gem-module) – Manage Ruby gems
* [git\_config](git_config_module#ansible-collections-community-general-git-config-module) – Read and write git configuration
* [github\_deploy\_key](github_deploy_key_module#ansible-collections-community-general-github-deploy-key-module) – Manages deploy keys for GitHub repositories.
* [github\_issue](github_issue_module#ansible-collections-community-general-github-issue-module) – View GitHub issue.
* [github\_key](github_key_module#ansible-collections-community-general-github-key-module) – Manage GitHub access keys.
* [github\_release](github_release_module#ansible-collections-community-general-github-release-module) – Interact with GitHub Releases
* [github\_repo](github_repo_module#ansible-collections-community-general-github-repo-module) – Manage your repositories on Github
* [github\_webhook](github_webhook_module#ansible-collections-community-general-github-webhook-module) – Manage GitHub webhooks
* [github\_webhook\_info](github_webhook_info_module#ansible-collections-community-general-github-webhook-info-module) – Query information about GitHub webhooks
* [gitlab\_deploy\_key](gitlab_deploy_key_module#ansible-collections-community-general-gitlab-deploy-key-module) – Manages GitLab project deploy keys.
* [gitlab\_group](gitlab_group_module#ansible-collections-community-general-gitlab-group-module) – Creates/updates/deletes GitLab Groups
* [gitlab\_group\_members](gitlab_group_members_module#ansible-collections-community-general-gitlab-group-members-module) – Manage group members on GitLab Server
* [gitlab\_group\_variable](gitlab_group_variable_module#ansible-collections-community-general-gitlab-group-variable-module) – Creates, updates, or deletes GitLab groups variables
* [gitlab\_hook](gitlab_hook_module#ansible-collections-community-general-gitlab-hook-module) – Manages GitLab project hooks.
* [gitlab\_project](gitlab_project_module#ansible-collections-community-general-gitlab-project-module) – Creates/updates/deletes GitLab Projects
* [gitlab\_project\_members](gitlab_project_members_module#ansible-collections-community-general-gitlab-project-members-module) – Manage project members on GitLab Server
* [gitlab\_project\_variable](gitlab_project_variable_module#ansible-collections-community-general-gitlab-project-variable-module) – Creates/updates/deletes GitLab Projects Variables
* [gitlab\_protected\_branch](gitlab_protected_branch_module#ansible-collections-community-general-gitlab-protected-branch-module) – (un)Marking existing branches for protection
* [gitlab\_runner](gitlab_runner_module#ansible-collections-community-general-gitlab-runner-module) – Create, modify and delete GitLab Runners.
* [gitlab\_user](gitlab_user_module#ansible-collections-community-general-gitlab-user-module) – Creates/updates/deletes/blocks/unblocks GitLab Users
* [grove](grove_module#ansible-collections-community-general-grove-module) – Sends a notification to a grove.io channel
* [gunicorn](gunicorn_module#ansible-collections-community-general-gunicorn-module) – Run gunicorn with various settings.
* [hana\_query](hana_query_module#ansible-collections-community-general-hana-query-module) – Execute SQL on HANA
* [haproxy](haproxy_module#ansible-collections-community-general-haproxy-module) – Enable, disable, and set weights for HAProxy backend servers using socket commands
* [heroku\_collaborator](heroku_collaborator_module#ansible-collections-community-general-heroku-collaborator-module) – Add or delete app collaborators on Heroku
* [hg](hg_module#ansible-collections-community-general-hg-module) – Manages Mercurial (hg) repositories
* [hipchat](hipchat_module#ansible-collections-community-general-hipchat-module) – Send a message to Hipchat.
* [homebrew](homebrew_module#ansible-collections-community-general-homebrew-module) – Package manager for Homebrew
* [homebrew\_cask](homebrew_cask_module#ansible-collections-community-general-homebrew-cask-module) – Install and uninstall homebrew casks
* [homebrew\_tap](homebrew_tap_module#ansible-collections-community-general-homebrew-tap-module) – Tap a Homebrew repository.
* [honeybadger\_deployment](honeybadger_deployment_module#ansible-collections-community-general-honeybadger-deployment-module) – Notify Honeybadger.io about app deployments
* [hpilo\_boot](hpilo_boot_module#ansible-collections-community-general-hpilo-boot-module) – Boot system using specific media through HP iLO interface
* [hpilo\_info](hpilo_info_module#ansible-collections-community-general-hpilo-info-module) – Gather information through an HP iLO interface
* [hponcfg](hponcfg_module#ansible-collections-community-general-hponcfg-module) – Configure HP iLO interface using hponcfg
* [htpasswd](htpasswd_module#ansible-collections-community-general-htpasswd-module) – manage user files for basic authentication
* [hwc\_ecs\_instance](hwc_ecs_instance_module#ansible-collections-community-general-hwc-ecs-instance-module) – Creates a resource of Ecs/Instance in Huawei Cloud
* [hwc\_evs\_disk](hwc_evs_disk_module#ansible-collections-community-general-hwc-evs-disk-module) – Creates a resource of Evs/Disk in Huawei Cloud
* [hwc\_network\_vpc](hwc_network_vpc_module#ansible-collections-community-general-hwc-network-vpc-module) – Creates a Huawei Cloud VPC
* [hwc\_smn\_topic](hwc_smn_topic_module#ansible-collections-community-general-hwc-smn-topic-module) – Creates a resource of SMNTopic in Huaweicloud Cloud
* [hwc\_vpc\_eip](hwc_vpc_eip_module#ansible-collections-community-general-hwc-vpc-eip-module) – Creates a resource of Vpc/EIP in Huawei Cloud
* [hwc\_vpc\_peering\_connect](hwc_vpc_peering_connect_module#ansible-collections-community-general-hwc-vpc-peering-connect-module) – Creates a resource of Vpc/PeeringConnect in Huawei Cloud
* [hwc\_vpc\_port](hwc_vpc_port_module#ansible-collections-community-general-hwc-vpc-port-module) – Creates a resource of Vpc/Port in Huawei Cloud
* [hwc\_vpc\_private\_ip](hwc_vpc_private_ip_module#ansible-collections-community-general-hwc-vpc-private-ip-module) – Creates a resource of Vpc/PrivateIP in Huawei Cloud
* [hwc\_vpc\_route](hwc_vpc_route_module#ansible-collections-community-general-hwc-vpc-route-module) – Creates a resource of Vpc/Route in Huawei Cloud
* [hwc\_vpc\_security\_group](hwc_vpc_security_group_module#ansible-collections-community-general-hwc-vpc-security-group-module) – Creates a resource of Vpc/SecurityGroup in Huawei Cloud
* [hwc\_vpc\_security\_group\_rule](hwc_vpc_security_group_rule_module#ansible-collections-community-general-hwc-vpc-security-group-rule-module) – Creates a resource of Vpc/SecurityGroupRule in Huawei Cloud
* [hwc\_vpc\_subnet](hwc_vpc_subnet_module#ansible-collections-community-general-hwc-vpc-subnet-module) – Creates a resource of Vpc/Subnet in Huawei Cloud
* [ibm\_sa\_domain](ibm_sa_domain_module#ansible-collections-community-general-ibm-sa-domain-module) – Manages domains on IBM Spectrum Accelerate Family storage systems
* [ibm\_sa\_host](ibm_sa_host_module#ansible-collections-community-general-ibm-sa-host-module) – Adds hosts to or removes them from IBM Spectrum Accelerate Family storage systems.
* [ibm\_sa\_host\_ports](ibm_sa_host_ports_module#ansible-collections-community-general-ibm-sa-host-ports-module) – Add host ports on IBM Spectrum Accelerate Family storage systems.
* [ibm\_sa\_pool](ibm_sa_pool_module#ansible-collections-community-general-ibm-sa-pool-module) – Handles pools on IBM Spectrum Accelerate Family storage systems.
* [ibm\_sa\_vol](ibm_sa_vol_module#ansible-collections-community-general-ibm-sa-vol-module) – Handle volumes on IBM Spectrum Accelerate Family storage systems.
* [ibm\_sa\_vol\_map](ibm_sa_vol_map_module#ansible-collections-community-general-ibm-sa-vol-map-module) – Handles volume mapping on IBM Spectrum Accelerate Family storage systems.
* [icinga2\_feature](icinga2_feature_module#ansible-collections-community-general-icinga2-feature-module) – Manage Icinga2 feature
* [icinga2\_host](icinga2_host_module#ansible-collections-community-general-icinga2-host-module) – Manage a host in Icinga2
* [idrac\_redfish\_command](idrac_redfish_command_module#ansible-collections-community-general-idrac-redfish-command-module) – Manages Out-Of-Band controllers using iDRAC OEM Redfish APIs
* [idrac\_redfish\_config](idrac_redfish_config_module#ansible-collections-community-general-idrac-redfish-config-module) – Manages servers through iDRAC using Dell Redfish APIs
* [idrac\_redfish\_info](idrac_redfish_info_module#ansible-collections-community-general-idrac-redfish-info-module) – Gather PowerEdge server information through iDRAC using Redfish APIs
* [imc\_rest](imc_rest_module#ansible-collections-community-general-imc-rest-module) – Manage Cisco IMC hardware through its REST API
* [imgadm](imgadm_module#ansible-collections-community-general-imgadm-module) – Manage SmartOS images
* [infinity](infinity_module#ansible-collections-community-general-infinity-module) – Manage Infinity IPAM using Rest API
* [influxdb\_database](influxdb_database_module#ansible-collections-community-general-influxdb-database-module) – Manage InfluxDB databases
* [influxdb\_query](influxdb_query_module#ansible-collections-community-general-influxdb-query-module) – Query data points from InfluxDB
* [influxdb\_retention\_policy](influxdb_retention_policy_module#ansible-collections-community-general-influxdb-retention-policy-module) – Manage InfluxDB retention policies
* [influxdb\_user](influxdb_user_module#ansible-collections-community-general-influxdb-user-module) – Manage InfluxDB users
* [influxdb\_write](influxdb_write_module#ansible-collections-community-general-influxdb-write-module) – Write data points into InfluxDB
* [ini\_file](ini_file_module#ansible-collections-community-general-ini-file-module) – Tweak settings in INI files
* [installp](installp_module#ansible-collections-community-general-installp-module) – Manage packages on AIX
* [interfaces\_file](interfaces_file_module#ansible-collections-community-general-interfaces-file-module) – Tweak settings in /etc/network/interfaces files
* [ip\_netns](ip_netns_module#ansible-collections-community-general-ip-netns-module) – Manage network namespaces
* [ipa\_config](ipa_config_module#ansible-collections-community-general-ipa-config-module) – Manage Global FreeIPA Configuration Settings
* [ipa\_dnsrecord](ipa_dnsrecord_module#ansible-collections-community-general-ipa-dnsrecord-module) – Manage FreeIPA DNS records
* [ipa\_dnszone](ipa_dnszone_module#ansible-collections-community-general-ipa-dnszone-module) – Manage FreeIPA DNS Zones
* [ipa\_group](ipa_group_module#ansible-collections-community-general-ipa-group-module) – Manage FreeIPA group
* [ipa\_hbacrule](ipa_hbacrule_module#ansible-collections-community-general-ipa-hbacrule-module) – Manage FreeIPA HBAC rule
* [ipa\_host](ipa_host_module#ansible-collections-community-general-ipa-host-module) – Manage FreeIPA host
* [ipa\_hostgroup](ipa_hostgroup_module#ansible-collections-community-general-ipa-hostgroup-module) – Manage FreeIPA host-group
* [ipa\_otpconfig](ipa_otpconfig_module#ansible-collections-community-general-ipa-otpconfig-module) – Manage FreeIPA OTP Configuration Settings
* [ipa\_otptoken](ipa_otptoken_module#ansible-collections-community-general-ipa-otptoken-module) – Manage FreeIPA OTPs
* [ipa\_pwpolicy](ipa_pwpolicy_module#ansible-collections-community-general-ipa-pwpolicy-module) – Manage FreeIPA password policies
* [ipa\_role](ipa_role_module#ansible-collections-community-general-ipa-role-module) – Manage FreeIPA role
* [ipa\_service](ipa_service_module#ansible-collections-community-general-ipa-service-module) – Manage FreeIPA service
* [ipa\_subca](ipa_subca_module#ansible-collections-community-general-ipa-subca-module) – Manage FreeIPA Lightweight Sub Certificate Authorities.
* [ipa\_sudocmd](ipa_sudocmd_module#ansible-collections-community-general-ipa-sudocmd-module) – Manage FreeIPA sudo command
* [ipa\_sudocmdgroup](ipa_sudocmdgroup_module#ansible-collections-community-general-ipa-sudocmdgroup-module) – Manage FreeIPA sudo command group
* [ipa\_sudorule](ipa_sudorule_module#ansible-collections-community-general-ipa-sudorule-module) – Manage FreeIPA sudo rule
* [ipa\_user](ipa_user_module#ansible-collections-community-general-ipa-user-module) – Manage FreeIPA users
* [ipa\_vault](ipa_vault_module#ansible-collections-community-general-ipa-vault-module) – Manage FreeIPA vaults
* [ipify\_facts](ipify_facts_module#ansible-collections-community-general-ipify-facts-module) – Retrieve the public IP of your internet gateway
* [ipinfoio\_facts](ipinfoio_facts_module#ansible-collections-community-general-ipinfoio-facts-module) – Retrieve IP geolocation facts of a host’s IP address
* [ipmi\_boot](ipmi_boot_module#ansible-collections-community-general-ipmi-boot-module) – Management of order of boot devices
* [ipmi\_power](ipmi_power_module#ansible-collections-community-general-ipmi-power-module) – Power management for machine
* [iptables\_state](iptables_state_module#ansible-collections-community-general-iptables-state-module) – Save iptables state into a file or restore it from a file
* [ipwcli\_dns](ipwcli_dns_module#ansible-collections-community-general-ipwcli-dns-module) – Manage DNS Records for Ericsson IPWorks via ipwcli
* [irc](irc_module#ansible-collections-community-general-irc-module) – Send a message to an IRC channel or a nick
* [iso\_create](iso_create_module#ansible-collections-community-general-iso-create-module) – Generate ISO file with specified files or folders
* [iso\_extract](iso_extract_module#ansible-collections-community-general-iso-extract-module) – Extract files from an ISO image
* [jabber](jabber_module#ansible-collections-community-general-jabber-module) – Send a message to jabber user or chat room
* [java\_cert](java_cert_module#ansible-collections-community-general-java-cert-module) – Uses keytool to import/remove certificate to/from java keystore (cacerts)
* [java\_keystore](java_keystore_module#ansible-collections-community-general-java-keystore-module) – Create a Java keystore in JKS format
* [jboss](jboss_module#ansible-collections-community-general-jboss-module) – Deploy applications to JBoss
* [jenkins\_build](jenkins_build_module#ansible-collections-community-general-jenkins-build-module) – Manage jenkins builds
* [jenkins\_job](jenkins_job_module#ansible-collections-community-general-jenkins-job-module) – Manage jenkins jobs
* [jenkins\_job\_info](jenkins_job_info_module#ansible-collections-community-general-jenkins-job-info-module) – Get information about Jenkins jobs
* [jenkins\_plugin](jenkins_plugin_module#ansible-collections-community-general-jenkins-plugin-module) – Add or remove Jenkins plugin
* [jenkins\_script](jenkins_script_module#ansible-collections-community-general-jenkins-script-module) – Executes a groovy script in the jenkins instance
* [jira](jira_module#ansible-collections-community-general-jira-module) – create and modify issues in a JIRA instance
* [kernel\_blacklist](kernel_blacklist_module#ansible-collections-community-general-kernel-blacklist-module) – Blacklist kernel modules
* [keycloak\_authentication](keycloak_authentication_module#ansible-collections-community-general-keycloak-authentication-module) – Configure authentication in Keycloak
* [keycloak\_client](keycloak_client_module#ansible-collections-community-general-keycloak-client-module) – Allows administration of Keycloak clients via Keycloak API
* [keycloak\_client\_rolemapping](keycloak_client_rolemapping_module#ansible-collections-community-general-keycloak-client-rolemapping-module) – Allows administration of Keycloak client\_rolemapping with the Keycloak API
* [keycloak\_clientscope](keycloak_clientscope_module#ansible-collections-community-general-keycloak-clientscope-module) – Allows administration of Keycloak client\_scopes via Keycloak API
* [keycloak\_clienttemplate](keycloak_clienttemplate_module#ansible-collections-community-general-keycloak-clienttemplate-module) – Allows administration of Keycloak client templates via Keycloak API
* [keycloak\_group](keycloak_group_module#ansible-collections-community-general-keycloak-group-module) – Allows administration of Keycloak groups via Keycloak API
* [keycloak\_identity\_provider](keycloak_identity_provider_module#ansible-collections-community-general-keycloak-identity-provider-module) – Allows administration of Keycloak identity providers via Keycloak API
* [keycloak\_realm](keycloak_realm_module#ansible-collections-community-general-keycloak-realm-module) – Allows administration of Keycloak realm via Keycloak API
* [keycloak\_role](keycloak_role_module#ansible-collections-community-general-keycloak-role-module) – Allows administration of Keycloak roles via Keycloak API
* [keycloak\_user\_federation](keycloak_user_federation_module#ansible-collections-community-general-keycloak-user-federation-module) – Allows administration of Keycloak user federations via Keycloak API
* [kibana\_plugin](kibana_plugin_module#ansible-collections-community-general-kibana-plugin-module) – Manage Kibana plugins
* [launchd](launchd_module#ansible-collections-community-general-launchd-module) – Manage macOS services
* [layman](layman_module#ansible-collections-community-general-layman-module) – Manage Gentoo overlays
* [lbu](lbu_module#ansible-collections-community-general-lbu-module) – Local Backup Utility for Alpine Linux
* [ldap\_attrs](ldap_attrs_module#ansible-collections-community-general-ldap-attrs-module) – Add or remove multiple LDAP attribute values
* [ldap\_entry](ldap_entry_module#ansible-collections-community-general-ldap-entry-module) – Add or remove LDAP entries.
* [ldap\_passwd](ldap_passwd_module#ansible-collections-community-general-ldap-passwd-module) – Set passwords in LDAP.
* [ldap\_search](ldap_search_module#ansible-collections-community-general-ldap-search-module) – Search for entries in a LDAP server
* [librato\_annotation](librato_annotation_module#ansible-collections-community-general-librato-annotation-module) – create an annotation in librato
* [linode](linode_module#ansible-collections-community-general-linode-module) – Manage instances on the Linode Public Cloud
* [linode\_v4](linode_v4_module#ansible-collections-community-general-linode-v4-module) – Manage instances on the Linode cloud.
* [listen\_ports\_facts](listen_ports_facts_module#ansible-collections-community-general-listen-ports-facts-module) – Gather facts on processes listening on TCP and UDP ports.
* [lldp](lldp_module#ansible-collections-community-general-lldp-module) – get details reported by lldp
* [locale\_gen](locale_gen_module#ansible-collections-community-general-locale-gen-module) – Creates or removes locales
* [logentries](logentries_module#ansible-collections-community-general-logentries-module) – Module for tracking logs via logentries.com
* [logentries\_msg](logentries_msg_module#ansible-collections-community-general-logentries-msg-module) – Send a message to logentries.
* [logstash\_plugin](logstash_plugin_module#ansible-collections-community-general-logstash-plugin-module) – Manage Logstash plugins
* [lvg](lvg_module#ansible-collections-community-general-lvg-module) – Configure LVM volume groups
* [lvol](lvol_module#ansible-collections-community-general-lvol-module) – Configure LVM logical volumes
* [lxc\_container](lxc_container_module#ansible-collections-community-general-lxc-container-module) – Manage LXC Containers
* [lxca\_cmms](lxca_cmms_module#ansible-collections-community-general-lxca-cmms-module) – Custom module for lxca cmms inventory utility
* [lxca\_nodes](lxca_nodes_module#ansible-collections-community-general-lxca-nodes-module) – Custom module for lxca nodes inventory utility
* [lxd\_container](lxd_container_module#ansible-collections-community-general-lxd-container-module) – Manage LXD Containers
* [lxd\_profile](lxd_profile_module#ansible-collections-community-general-lxd-profile-module) – Manage LXD profiles
* [macports](macports_module#ansible-collections-community-general-macports-module) – Package manager for MacPorts
* [mail](mail_module#ansible-collections-community-general-mail-module) – Send an email
* [make](make_module#ansible-collections-community-general-make-module) – Run targets in a Makefile
* [manageiq\_alert\_profiles](manageiq_alert_profiles_module#ansible-collections-community-general-manageiq-alert-profiles-module) – Configuration of alert profiles for ManageIQ
* [manageiq\_alerts](manageiq_alerts_module#ansible-collections-community-general-manageiq-alerts-module) – Configuration of alerts in ManageIQ
* [manageiq\_group](manageiq_group_module#ansible-collections-community-general-manageiq-group-module) – Management of groups in ManageIQ.
* [manageiq\_policies](manageiq_policies_module#ansible-collections-community-general-manageiq-policies-module) – Management of resource policy\_profiles in ManageIQ.
* [manageiq\_provider](manageiq_provider_module#ansible-collections-community-general-manageiq-provider-module) – Management of provider in ManageIQ.
* [manageiq\_tags](manageiq_tags_module#ansible-collections-community-general-manageiq-tags-module) – Management of resource tags in ManageIQ.
* [manageiq\_tenant](manageiq_tenant_module#ansible-collections-community-general-manageiq-tenant-module) – Management of tenants in ManageIQ.
* [manageiq\_user](manageiq_user_module#ansible-collections-community-general-manageiq-user-module) – Management of users in ManageIQ.
* [mas](mas_module#ansible-collections-community-general-mas-module) – Manage Mac App Store applications with mas-cli
* [matrix](matrix_module#ansible-collections-community-general-matrix-module) – Send notifications to matrix
* [mattermost](mattermost_module#ansible-collections-community-general-mattermost-module) – Send Mattermost notifications
* [maven\_artifact](maven_artifact_module#ansible-collections-community-general-maven-artifact-module) – Downloads an Artifact from a Maven Repository
* [memset\_dns\_reload](memset_dns_reload_module#ansible-collections-community-general-memset-dns-reload-module) – Request reload of Memset’s DNS infrastructure,
* [memset\_memstore\_info](memset_memstore_info_module#ansible-collections-community-general-memset-memstore-info-module) – Retrieve Memstore product usage information.
* [memset\_server\_info](memset_server_info_module#ansible-collections-community-general-memset-server-info-module) – Retrieve server information.
* [memset\_zone](memset_zone_module#ansible-collections-community-general-memset-zone-module) – Creates and deletes Memset DNS zones.
* [memset\_zone\_domain](memset_zone_domain_module#ansible-collections-community-general-memset-zone-domain-module) – Create and delete domains in Memset DNS zones.
* [memset\_zone\_record](memset_zone_record_module#ansible-collections-community-general-memset-zone-record-module) – Create and delete records in Memset DNS zones.
* [mksysb](mksysb_module#ansible-collections-community-general-mksysb-module) – Generates AIX mksysb rootvg backups.
* [modprobe](modprobe_module#ansible-collections-community-general-modprobe-module) – Load or unload kernel modules
* [monit](monit_module#ansible-collections-community-general-monit-module) – Manage the state of a program monitored via Monit
* [mqtt](mqtt_module#ansible-collections-community-general-mqtt-module) – Publish a message on an MQTT topic for the IoT
* [mssql\_db](mssql_db_module#ansible-collections-community-general-mssql-db-module) – Add or remove MSSQL databases from a remote host.
* [nagios](nagios_module#ansible-collections-community-general-nagios-module) – Perform common tasks in Nagios related to downtime and notifications.
* [netcup\_dns](netcup_dns_module#ansible-collections-community-general-netcup-dns-module) – manage Netcup DNS records
* [newrelic\_deployment](newrelic_deployment_module#ansible-collections-community-general-newrelic-deployment-module) – Notify newrelic about app deployments
* [nexmo](nexmo_module#ansible-collections-community-general-nexmo-module) – Send a SMS via nexmo
* [nginx\_status\_info](nginx_status_info_module#ansible-collections-community-general-nginx-status-info-module) – Retrieve information on nginx status.
* [nictagadm](nictagadm_module#ansible-collections-community-general-nictagadm-module) – Manage nic tags on SmartOS systems
* [nios\_a\_record](nios_a_record_module#ansible-collections-community-general-nios-a-record-module) – Configure Infoblox NIOS A records
* [nios\_aaaa\_record](nios_aaaa_record_module#ansible-collections-community-general-nios-aaaa-record-module) – Configure Infoblox NIOS AAAA records
* [nios\_cname\_record](nios_cname_record_module#ansible-collections-community-general-nios-cname-record-module) – Configure Infoblox NIOS CNAME records
* [nios\_dns\_view](nios_dns_view_module#ansible-collections-community-general-nios-dns-view-module) – Configure Infoblox NIOS DNS views
* [nios\_fixed\_address](nios_fixed_address_module#ansible-collections-community-general-nios-fixed-address-module) – Configure Infoblox NIOS DHCP Fixed Address
* [nios\_host\_record](nios_host_record_module#ansible-collections-community-general-nios-host-record-module) – Configure Infoblox NIOS host records
* [nios\_member](nios_member_module#ansible-collections-community-general-nios-member-module) – Configure Infoblox NIOS members
* [nios\_mx\_record](nios_mx_record_module#ansible-collections-community-general-nios-mx-record-module) – Configure Infoblox NIOS MX records
* [nios\_naptr\_record](nios_naptr_record_module#ansible-collections-community-general-nios-naptr-record-module) – Configure Infoblox NIOS NAPTR records
* [nios\_network](nios_network_module#ansible-collections-community-general-nios-network-module) – Configure Infoblox NIOS network object
* [nios\_network\_view](nios_network_view_module#ansible-collections-community-general-nios-network-view-module) – Configure Infoblox NIOS network views
* [nios\_nsgroup](nios_nsgroup_module#ansible-collections-community-general-nios-nsgroup-module) – Configure InfoBlox DNS Nameserver Groups
* [nios\_ptr\_record](nios_ptr_record_module#ansible-collections-community-general-nios-ptr-record-module) – Configure Infoblox NIOS PTR records
* [nios\_srv\_record](nios_srv_record_module#ansible-collections-community-general-nios-srv-record-module) – Configure Infoblox NIOS SRV records
* [nios\_txt\_record](nios_txt_record_module#ansible-collections-community-general-nios-txt-record-module) – Configure Infoblox NIOS txt records
* [nios\_zone](nios_zone_module#ansible-collections-community-general-nios-zone-module) – Configure Infoblox NIOS DNS zones
* [nmcli](nmcli_module#ansible-collections-community-general-nmcli-module) – Manage Networking
* [nomad\_job](nomad_job_module#ansible-collections-community-general-nomad-job-module) – Launch a Nomad Job
* [nomad\_job\_info](nomad_job_info_module#ansible-collections-community-general-nomad-job-info-module) – Get Nomad Jobs info
* [nosh](nosh_module#ansible-collections-community-general-nosh-module) – Manage services with nosh
* [npm](npm_module#ansible-collections-community-general-npm-module) – Manage node.js packages with npm
* [nsupdate](nsupdate_module#ansible-collections-community-general-nsupdate-module) – Manage DNS records.
* [oci\_vcn](oci_vcn_module#ansible-collections-community-general-oci-vcn-module) – Manage Virtual Cloud Networks(VCN) in OCI
* [odbc](odbc_module#ansible-collections-community-general-odbc-module) – Execute SQL via ODBC
* [office\_365\_connector\_card](office_365_connector_card_module#ansible-collections-community-general-office-365-connector-card-module) – Use webhooks to create Connector Card messages within an Office 365 group
* [ohai](ohai_module#ansible-collections-community-general-ohai-module) – Returns inventory data from *Ohai*
* [omapi\_host](omapi_host_module#ansible-collections-community-general-omapi-host-module) – Setup OMAPI hosts.
* [one\_host](one_host_module#ansible-collections-community-general-one-host-module) – Manages OpenNebula Hosts
* [one\_image](one_image_module#ansible-collections-community-general-one-image-module) – Manages OpenNebula images
* [one\_image\_info](one_image_info_module#ansible-collections-community-general-one-image-info-module) – Gather information on OpenNebula images
* [one\_service](one_service_module#ansible-collections-community-general-one-service-module) – Deploy and manage OpenNebula services
* [one\_template](one_template_module#ansible-collections-community-general-one-template-module) – Manages OpenNebula templates
* [one\_vm](one_vm_module#ansible-collections-community-general-one-vm-module) – Creates or terminates OpenNebula instances
* [oneandone\_firewall\_policy](oneandone_firewall_policy_module#ansible-collections-community-general-oneandone-firewall-policy-module) – Configure 1&1 firewall policy.
* [oneandone\_load\_balancer](oneandone_load_balancer_module#ansible-collections-community-general-oneandone-load-balancer-module) – Configure 1&1 load balancer.
* [oneandone\_monitoring\_policy](oneandone_monitoring_policy_module#ansible-collections-community-general-oneandone-monitoring-policy-module) – Configure 1&1 monitoring policy.
* [oneandone\_private\_network](oneandone_private_network_module#ansible-collections-community-general-oneandone-private-network-module) – Configure 1&1 private networking.
* [oneandone\_public\_ip](oneandone_public_ip_module#ansible-collections-community-general-oneandone-public-ip-module) – Configure 1&1 public IPs.
* [oneandone\_server](oneandone_server_module#ansible-collections-community-general-oneandone-server-module) – Create, destroy, start, stop, and reboot a 1&1 Host server.
* [onepassword\_info](onepassword_info_module#ansible-collections-community-general-onepassword-info-module) – Gather items from 1Password
* [oneview\_datacenter\_info](oneview_datacenter_info_module#ansible-collections-community-general-oneview-datacenter-info-module) – Retrieve information about the OneView Data Centers
* [oneview\_enclosure\_info](oneview_enclosure_info_module#ansible-collections-community-general-oneview-enclosure-info-module) – Retrieve information about one or more Enclosures
* [oneview\_ethernet\_network](oneview_ethernet_network_module#ansible-collections-community-general-oneview-ethernet-network-module) – Manage OneView Ethernet Network resources
* [oneview\_ethernet\_network\_info](oneview_ethernet_network_info_module#ansible-collections-community-general-oneview-ethernet-network-info-module) – Retrieve the information about one or more of the OneView Ethernet Networks
* [oneview\_fc\_network](oneview_fc_network_module#ansible-collections-community-general-oneview-fc-network-module) – Manage OneView Fibre Channel Network resources.
* [oneview\_fc\_network\_info](oneview_fc_network_info_module#ansible-collections-community-general-oneview-fc-network-info-module) – Retrieve the information about one or more of the OneView Fibre Channel Networks
* [oneview\_fcoe\_network](oneview_fcoe_network_module#ansible-collections-community-general-oneview-fcoe-network-module) – Manage OneView FCoE Network resources
* [oneview\_fcoe\_network\_info](oneview_fcoe_network_info_module#ansible-collections-community-general-oneview-fcoe-network-info-module) – Retrieve the information about one or more of the OneView FCoE Networks
* [oneview\_logical\_interconnect\_group](oneview_logical_interconnect_group_module#ansible-collections-community-general-oneview-logical-interconnect-group-module) – Manage OneView Logical Interconnect Group resources
* [oneview\_logical\_interconnect\_group\_info](oneview_logical_interconnect_group_info_module#ansible-collections-community-general-oneview-logical-interconnect-group-info-module) – Retrieve information about one or more of the OneView Logical Interconnect Groups
* [oneview\_network\_set](oneview_network_set_module#ansible-collections-community-general-oneview-network-set-module) – Manage HPE OneView Network Set resources
* [oneview\_network\_set\_info](oneview_network_set_info_module#ansible-collections-community-general-oneview-network-set-info-module) – Retrieve information about the OneView Network Sets
* [oneview\_san\_manager](oneview_san_manager_module#ansible-collections-community-general-oneview-san-manager-module) – Manage OneView SAN Manager resources
* [oneview\_san\_manager\_info](oneview_san_manager_info_module#ansible-collections-community-general-oneview-san-manager-info-module) – Retrieve information about one or more of the OneView SAN Managers
* [online\_server\_info](online_server_info_module#ansible-collections-community-general-online-server-info-module) – Gather information about Online servers.
* [online\_user\_info](online_user_info_module#ansible-collections-community-general-online-user-info-module) – Gather information about Online user.
* [open\_iscsi](open_iscsi_module#ansible-collections-community-general-open-iscsi-module) – Manage iSCSI targets with Open-iSCSI
* [openbsd\_pkg](openbsd_pkg_module#ansible-collections-community-general-openbsd-pkg-module) – Manage packages on OpenBSD
* [opendj\_backendprop](opendj_backendprop_module#ansible-collections-community-general-opendj-backendprop-module) – Will update the backend configuration of OpenDJ via the dsconfig set-backend-prop command.
* [openwrt\_init](openwrt_init_module#ansible-collections-community-general-openwrt-init-module) – Manage services on OpenWrt.
* [opkg](opkg_module#ansible-collections-community-general-opkg-module) – Package manager for OpenWrt
* [osx\_defaults](osx_defaults_module#ansible-collections-community-general-osx-defaults-module) – Manage macOS user defaults
* [ovh\_ip\_failover](ovh_ip_failover_module#ansible-collections-community-general-ovh-ip-failover-module) – Manage OVH IP failover address
* [ovh\_ip\_loadbalancing\_backend](ovh_ip_loadbalancing_backend_module#ansible-collections-community-general-ovh-ip-loadbalancing-backend-module) – Manage OVH IP LoadBalancing backends
* [ovh\_monthly\_billing](ovh_monthly_billing_module#ansible-collections-community-general-ovh-monthly-billing-module) – Manage OVH monthly billing
* [pacemaker\_cluster](pacemaker_cluster_module#ansible-collections-community-general-pacemaker-cluster-module) – Manage pacemaker clusters
* [packet\_device](packet_device_module#ansible-collections-community-general-packet-device-module) – Manage a bare metal server in the Packet Host.
* [packet\_ip\_subnet](packet_ip_subnet_module#ansible-collections-community-general-packet-ip-subnet-module) – Assign IP subnet to a bare metal server.
* [packet\_project](packet_project_module#ansible-collections-community-general-packet-project-module) – Create/delete a project in Packet host.
* [packet\_sshkey](packet_sshkey_module#ansible-collections-community-general-packet-sshkey-module) – Create/delete an SSH key in Packet host.
* [packet\_volume](packet_volume_module#ansible-collections-community-general-packet-volume-module) – Create/delete a volume in Packet host.
* [packet\_volume\_attachment](packet_volume_attachment_module#ansible-collections-community-general-packet-volume-attachment-module) – Attach/detach a volume to a device in the Packet host.
* [pacman](pacman_module#ansible-collections-community-general-pacman-module) – Manage packages with *pacman*
* [pacman\_key](pacman_key_module#ansible-collections-community-general-pacman-key-module) – Manage pacman’s list of trusted keys
* [pagerduty](pagerduty_module#ansible-collections-community-general-pagerduty-module) – Create PagerDuty maintenance windows
* [pagerduty\_alert](pagerduty_alert_module#ansible-collections-community-general-pagerduty-alert-module) – Trigger, acknowledge or resolve PagerDuty incidents
* [pagerduty\_change](pagerduty_change_module#ansible-collections-community-general-pagerduty-change-module) – Track a code or infrastructure change as a PagerDuty change event
* [pagerduty\_user](pagerduty_user_module#ansible-collections-community-general-pagerduty-user-module) – Manage a user account on PagerDuty
* [pam\_limits](pam_limits_module#ansible-collections-community-general-pam-limits-module) – Modify Linux PAM limits
* [pamd](pamd_module#ansible-collections-community-general-pamd-module) – Manage PAM Modules
* [parted](parted_module#ansible-collections-community-general-parted-module) – Configure block device partitions
* [pear](pear_module#ansible-collections-community-general-pear-module) – Manage pear/pecl packages
* [pids](pids_module#ansible-collections-community-general-pids-module) – Retrieves process IDs list if the process is running otherwise return empty list
* [pingdom](pingdom_module#ansible-collections-community-general-pingdom-module) – Pause/unpause Pingdom alerts
* [pip\_package\_info](pip_package_info_module#ansible-collections-community-general-pip-package-info-module) – pip package information
* [pipx](pipx_module#ansible-collections-community-general-pipx-module) – Manages applications installed with pipx
* [pkg5](pkg5_module#ansible-collections-community-general-pkg5-module) – Manages packages with the Solaris 11 Image Packaging System
* [pkg5\_publisher](pkg5_publisher_module#ansible-collections-community-general-pkg5-publisher-module) – Manages Solaris 11 Image Packaging System publishers
* [pkgin](pkgin_module#ansible-collections-community-general-pkgin-module) – Package manager for SmartOS, NetBSD, et al.
* [pkgng](pkgng_module#ansible-collections-community-general-pkgng-module) – Package manager for FreeBSD >= 9.0
* [pkgutil](pkgutil_module#ansible-collections-community-general-pkgutil-module) – OpenCSW package management on Solaris
* [portage](portage_module#ansible-collections-community-general-portage-module) – Package manager for Gentoo
* [portinstall](portinstall_module#ansible-collections-community-general-portinstall-module) – Installing packages from FreeBSD’s ports system
* [pritunl\_org](pritunl_org_module#ansible-collections-community-general-pritunl-org-module) – Manages Pritunl Organizations using the Pritunl API
* [pritunl\_org\_info](pritunl_org_info_module#ansible-collections-community-general-pritunl-org-info-module) – List Pritunl Organizations using the Pritunl API
* [pritunl\_user](pritunl_user_module#ansible-collections-community-general-pritunl-user-module) – Manage Pritunl Users using the Pritunl API
* [pritunl\_user\_info](pritunl_user_info_module#ansible-collections-community-general-pritunl-user-info-module) – List Pritunl Users using the Pritunl API
* [profitbricks](profitbricks_module#ansible-collections-community-general-profitbricks-module) – Create, destroy, start, stop, and reboot a ProfitBricks virtual machine.
* [profitbricks\_datacenter](profitbricks_datacenter_module#ansible-collections-community-general-profitbricks-datacenter-module) – Create or destroy a ProfitBricks Virtual Datacenter.
* [profitbricks\_nic](profitbricks_nic_module#ansible-collections-community-general-profitbricks-nic-module) – Create or Remove a NIC.
* [profitbricks\_volume](profitbricks_volume_module#ansible-collections-community-general-profitbricks-volume-module) – Create or destroy a volume.
* [profitbricks\_volume\_attachments](profitbricks_volume_attachments_module#ansible-collections-community-general-profitbricks-volume-attachments-module) – Attach or detach a volume.
* [proxmox](proxmox_module#ansible-collections-community-general-proxmox-module) – management of instances in Proxmox VE cluster
* [proxmox\_domain\_info](proxmox_domain_info_module#ansible-collections-community-general-proxmox-domain-info-module) – Retrieve information about one or more Proxmox VE domains
* [proxmox\_group\_info](proxmox_group_info_module#ansible-collections-community-general-proxmox-group-info-module) – Retrieve information about one or more Proxmox VE groups
* [proxmox\_kvm](proxmox_kvm_module#ansible-collections-community-general-proxmox-kvm-module) – Management of Qemu(KVM) Virtual Machines in Proxmox VE cluster.
* [proxmox\_nic](proxmox_nic_module#ansible-collections-community-general-proxmox-nic-module) – Management of a NIC of a Qemu(KVM) VM in a Proxmox VE cluster.
* [proxmox\_snap](proxmox_snap_module#ansible-collections-community-general-proxmox-snap-module) – Snapshot management of instances in Proxmox VE cluster
* [proxmox\_storage\_info](proxmox_storage_info_module#ansible-collections-community-general-proxmox-storage-info-module) – Retrieve information about one or more Proxmox VE storages
* [proxmox\_tasks\_info](proxmox_tasks_info_module#ansible-collections-community-general-proxmox-tasks-info-module) – Retrieve information about one or more Proxmox VE tasks
* [proxmox\_template](proxmox_template_module#ansible-collections-community-general-proxmox-template-module) – management of OS templates in Proxmox VE cluster
* [proxmox\_user\_info](proxmox_user_info_module#ansible-collections-community-general-proxmox-user-info-module) – Retrieve information about one or more Proxmox VE users
* [pubnub\_blocks](pubnub_blocks_module#ansible-collections-community-general-pubnub-blocks-module) – PubNub blocks management module.
* [pulp\_repo](pulp_repo_module#ansible-collections-community-general-pulp-repo-module) – Add or remove Pulp repos from a remote host.
* [puppet](puppet_module#ansible-collections-community-general-puppet-module) – Runs puppet
* [pushbullet](pushbullet_module#ansible-collections-community-general-pushbullet-module) – Sends notifications to Pushbullet
* [pushover](pushover_module#ansible-collections-community-general-pushover-module) – Send notifications via <https://pushover.net>
* [python\_requirements\_info](python_requirements_info_module#ansible-collections-community-general-python-requirements-info-module) – Show python path and assert dependency versions
* [rax](rax_module#ansible-collections-community-general-rax-module) – create / delete an instance in Rackspace Public Cloud
* [rax\_cbs](rax_cbs_module#ansible-collections-community-general-rax-cbs-module) – Manipulate Rackspace Cloud Block Storage Volumes
* [rax\_cbs\_attachments](rax_cbs_attachments_module#ansible-collections-community-general-rax-cbs-attachments-module) – Manipulate Rackspace Cloud Block Storage Volume Attachments
* [rax\_cdb](rax_cdb_module#ansible-collections-community-general-rax-cdb-module) – create/delete or resize a Rackspace Cloud Databases instance
* [rax\_cdb\_database](rax_cdb_database_module#ansible-collections-community-general-rax-cdb-database-module) – create / delete a database in the Cloud Databases
* [rax\_cdb\_user](rax_cdb_user_module#ansible-collections-community-general-rax-cdb-user-module) – create / delete a Rackspace Cloud Database
* [rax\_clb](rax_clb_module#ansible-collections-community-general-rax-clb-module) – create / delete a load balancer in Rackspace Public Cloud
* [rax\_clb\_nodes](rax_clb_nodes_module#ansible-collections-community-general-rax-clb-nodes-module) – add, modify and remove nodes from a Rackspace Cloud Load Balancer
* [rax\_clb\_ssl](rax_clb_ssl_module#ansible-collections-community-general-rax-clb-ssl-module) – Manage SSL termination for a Rackspace Cloud Load Balancer.
* [rax\_dns](rax_dns_module#ansible-collections-community-general-rax-dns-module) – Manage domains on Rackspace Cloud DNS
* [rax\_dns\_record](rax_dns_record_module#ansible-collections-community-general-rax-dns-record-module) – Manage DNS records on Rackspace Cloud DNS
* [rax\_facts](rax_facts_module#ansible-collections-community-general-rax-facts-module) – Gather facts for Rackspace Cloud Servers
* [rax\_files](rax_files_module#ansible-collections-community-general-rax-files-module) – Manipulate Rackspace Cloud Files Containers
* [rax\_files\_objects](rax_files_objects_module#ansible-collections-community-general-rax-files-objects-module) – Upload, download, and delete objects in Rackspace Cloud Files
* [rax\_identity](rax_identity_module#ansible-collections-community-general-rax-identity-module) – Load Rackspace Cloud Identity
* [rax\_keypair](rax_keypair_module#ansible-collections-community-general-rax-keypair-module) – Create a keypair for use with Rackspace Cloud Servers
* [rax\_meta](rax_meta_module#ansible-collections-community-general-rax-meta-module) – Manipulate metadata for Rackspace Cloud Servers
* [rax\_mon\_alarm](rax_mon_alarm_module#ansible-collections-community-general-rax-mon-alarm-module) – Create or delete a Rackspace Cloud Monitoring alarm.
* [rax\_mon\_check](rax_mon_check_module#ansible-collections-community-general-rax-mon-check-module) – Create or delete a Rackspace Cloud Monitoring check for an existing entity.
* [rax\_mon\_entity](rax_mon_entity_module#ansible-collections-community-general-rax-mon-entity-module) – Create or delete a Rackspace Cloud Monitoring entity
* [rax\_mon\_notification](rax_mon_notification_module#ansible-collections-community-general-rax-mon-notification-module) – Create or delete a Rackspace Cloud Monitoring notification.
* [rax\_mon\_notification\_plan](rax_mon_notification_plan_module#ansible-collections-community-general-rax-mon-notification-plan-module) – Create or delete a Rackspace Cloud Monitoring notification plan.
* [rax\_network](rax_network_module#ansible-collections-community-general-rax-network-module) – create / delete an isolated network in Rackspace Public Cloud
* [rax\_queue](rax_queue_module#ansible-collections-community-general-rax-queue-module) – create / delete a queue in Rackspace Public Cloud
* [rax\_scaling\_group](rax_scaling_group_module#ansible-collections-community-general-rax-scaling-group-module) – Manipulate Rackspace Cloud Autoscale Groups
* [rax\_scaling\_policy](rax_scaling_policy_module#ansible-collections-community-general-rax-scaling-policy-module) – Manipulate Rackspace Cloud Autoscale Scaling Policy
* [read\_csv](read_csv_module#ansible-collections-community-general-read-csv-module) – Read a CSV file
* [redfish\_command](redfish_command_module#ansible-collections-community-general-redfish-command-module) – Manages Out-Of-Band controllers using Redfish APIs
* [redfish\_config](redfish_config_module#ansible-collections-community-general-redfish-config-module) – Manages Out-Of-Band controllers using Redfish APIs
* [redfish\_info](redfish_info_module#ansible-collections-community-general-redfish-info-module) – Manages Out-Of-Band controllers using Redfish APIs
* [redhat\_subscription](redhat_subscription_module#ansible-collections-community-general-redhat-subscription-module) – Manage registration and subscriptions to RHSM using the `subscription-manager` command
* [redis](redis_module#ansible-collections-community-general-redis-module) – Various redis commands, replica and flush
* [redis\_data](redis_data_module#ansible-collections-community-general-redis-data-module) – Set key value pairs in Redis
* [redis\_data\_info](redis_data_info_module#ansible-collections-community-general-redis-data-info-module) – Get value of key in Redis database
* [redis\_info](redis_info_module#ansible-collections-community-general-redis-info-module) – Gather information about Redis servers
* [rhevm](rhevm_module#ansible-collections-community-general-rhevm-module) – RHEV/oVirt automation
* [rhn\_channel](rhn_channel_module#ansible-collections-community-general-rhn-channel-module) – Adds or removes Red Hat software channels
* [rhn\_register](rhn_register_module#ansible-collections-community-general-rhn-register-module) – Manage Red Hat Network registration using the `rhnreg_ks` command
* [rhsm\_release](rhsm_release_module#ansible-collections-community-general-rhsm-release-module) – Set or Unset RHSM Release version
* [rhsm\_repository](rhsm_repository_module#ansible-collections-community-general-rhsm-repository-module) – Manage RHSM repositories using the subscription-manager command
* [riak](riak_module#ansible-collections-community-general-riak-module) – This module handles some common Riak operations
* [rocketchat](rocketchat_module#ansible-collections-community-general-rocketchat-module) – Send notifications to Rocket Chat
* [rollbar\_deployment](rollbar_deployment_module#ansible-collections-community-general-rollbar-deployment-module) – Notify Rollbar about app deployments
* [rpm\_ostree\_pkg](rpm_ostree_pkg_module#ansible-collections-community-general-rpm-ostree-pkg-module) – Install or uninstall overlay additional packages
* [rundeck\_acl\_policy](rundeck_acl_policy_module#ansible-collections-community-general-rundeck-acl-policy-module) – Manage Rundeck ACL policies.
* [rundeck\_job\_executions\_info](rundeck_job_executions_info_module#ansible-collections-community-general-rundeck-job-executions-info-module) – Query executions for a Rundeck job
* [rundeck\_job\_run](rundeck_job_run_module#ansible-collections-community-general-rundeck-job-run-module) – Run a Rundeck job
* [rundeck\_project](rundeck_project_module#ansible-collections-community-general-rundeck-project-module) – Manage Rundeck projects.
* [runit](runit_module#ansible-collections-community-general-runit-module) – Manage runit services
* [sap\_task\_list\_execute](sap_task_list_execute_module#ansible-collections-community-general-sap-task-list-execute-module) – Perform SAP Task list execution
* [sapcar\_extract](sapcar_extract_module#ansible-collections-community-general-sapcar-extract-module) – Manages SAP SAPCAR archives
* [say](say_module#ansible-collections-community-general-say-module) – Makes a computer to speak.
* [scaleway\_compute](scaleway_compute_module#ansible-collections-community-general-scaleway-compute-module) – Scaleway compute management module
* [scaleway\_database\_backup](scaleway_database_backup_module#ansible-collections-community-general-scaleway-database-backup-module) – Scaleway database backups management module
* [scaleway\_image\_info](scaleway_image_info_module#ansible-collections-community-general-scaleway-image-info-module) – Gather information about the Scaleway images available.
* [scaleway\_ip](scaleway_ip_module#ansible-collections-community-general-scaleway-ip-module) – Scaleway IP management module
* [scaleway\_ip\_info](scaleway_ip_info_module#ansible-collections-community-general-scaleway-ip-info-module) – Gather information about the Scaleway ips available.
* [scaleway\_lb](scaleway_lb_module#ansible-collections-community-general-scaleway-lb-module) – Scaleway load-balancer management module
* [scaleway\_organization\_info](scaleway_organization_info_module#ansible-collections-community-general-scaleway-organization-info-module) – Gather information about the Scaleway organizations available.
* [scaleway\_security\_group](scaleway_security_group_module#ansible-collections-community-general-scaleway-security-group-module) – Scaleway Security Group management module
* [scaleway\_security\_group\_info](scaleway_security_group_info_module#ansible-collections-community-general-scaleway-security-group-info-module) – Gather information about the Scaleway security groups available.
* [scaleway\_security\_group\_rule](scaleway_security_group_rule_module#ansible-collections-community-general-scaleway-security-group-rule-module) – Scaleway Security Group Rule management module
* [scaleway\_server\_info](scaleway_server_info_module#ansible-collections-community-general-scaleway-server-info-module) – Gather information about the Scaleway servers available.
* [scaleway\_snapshot\_info](scaleway_snapshot_info_module#ansible-collections-community-general-scaleway-snapshot-info-module) – Gather information about the Scaleway snapshots available.
* [scaleway\_sshkey](scaleway_sshkey_module#ansible-collections-community-general-scaleway-sshkey-module) – Scaleway SSH keys management module
* [scaleway\_user\_data](scaleway_user_data_module#ansible-collections-community-general-scaleway-user-data-module) – Scaleway user\_data management module
* [scaleway\_volume](scaleway_volume_module#ansible-collections-community-general-scaleway-volume-module) – Scaleway volumes management module
* [scaleway\_volume\_info](scaleway_volume_info_module#ansible-collections-community-general-scaleway-volume-info-module) – Gather information about the Scaleway volumes available.
* [sefcontext](sefcontext_module#ansible-collections-community-general-sefcontext-module) – Manages SELinux file context mapping definitions
* [selinux\_permissive](selinux_permissive_module#ansible-collections-community-general-selinux-permissive-module) – Change permissive domain in SELinux policy
* [selogin](selogin_module#ansible-collections-community-general-selogin-module) – Manages linux user to SELinux user mapping
* [sendgrid](sendgrid_module#ansible-collections-community-general-sendgrid-module) – Sends an email with the SendGrid API
* [sensu\_check](sensu_check_module#ansible-collections-community-general-sensu-check-module) – Manage Sensu checks
* [sensu\_client](sensu_client_module#ansible-collections-community-general-sensu-client-module) – Manages Sensu client configuration
* [sensu\_handler](sensu_handler_module#ansible-collections-community-general-sensu-handler-module) – Manages Sensu handler configuration
* [sensu\_silence](sensu_silence_module#ansible-collections-community-general-sensu-silence-module) – Manage Sensu silence entries
* [sensu\_subscription](sensu_subscription_module#ansible-collections-community-general-sensu-subscription-module) – Manage Sensu subscriptions
* [seport](seport_module#ansible-collections-community-general-seport-module) – Manages SELinux network port type definitions
* [serverless](serverless_module#ansible-collections-community-general-serverless-module) – Manages a Serverless Framework project
* [shutdown](shutdown_module#ansible-collections-community-general-shutdown-module) – Shut down a machine
* [sl\_vm](sl_vm_module#ansible-collections-community-general-sl-vm-module) – create or cancel a virtual instance in SoftLayer
* [slack](slack_module#ansible-collections-community-general-slack-module) – Send Slack notifications
* [slackpkg](slackpkg_module#ansible-collections-community-general-slackpkg-module) – Package manager for Slackware >= 12.2
* [smartos\_image\_info](smartos_image_info_module#ansible-collections-community-general-smartos-image-info-module) – Get SmartOS image details.
* [snap](snap_module#ansible-collections-community-general-snap-module) – Manages snaps
* [snmp\_facts](snmp_facts_module#ansible-collections-community-general-snmp-facts-module) – Retrieve facts for a device using SNMP
* [solaris\_zone](solaris_zone_module#ansible-collections-community-general-solaris-zone-module) – Manage Solaris zones
* [sorcery](sorcery_module#ansible-collections-community-general-sorcery-module) – Package manager for Source Mage GNU/Linux
* [spectrum\_device](spectrum_device_module#ansible-collections-community-general-spectrum-device-module) – Creates/deletes devices in CA Spectrum.
* [spectrum\_model\_attrs](spectrum_model_attrs_module#ansible-collections-community-general-spectrum-model-attrs-module) – Enforce a model’s attributes in CA Spectrum.
* [spotinst\_aws\_elastigroup](spotinst_aws_elastigroup_module#ansible-collections-community-general-spotinst-aws-elastigroup-module) – Create, update or delete Spotinst AWS Elastigroups
* [ss\_3par\_cpg](ss_3par_cpg_module#ansible-collections-community-general-ss-3par-cpg-module) – Manage HPE StoreServ 3PAR CPG
* [ssh\_config](ssh_config_module#ansible-collections-community-general-ssh-config-module) – Manage SSH config for user
* [stackdriver](stackdriver_module#ansible-collections-community-general-stackdriver-module) – Send code deploy and annotation events to stackdriver
* [stacki\_host](stacki_host_module#ansible-collections-community-general-stacki-host-module) – Add or remove host to stacki front-end
* [statsd](statsd_module#ansible-collections-community-general-statsd-module) – Send metrics to StatsD
* [statusio\_maintenance](statusio_maintenance_module#ansible-collections-community-general-statusio-maintenance-module) – Create maintenance windows for your status.io dashboard
* [supervisorctl](supervisorctl_module#ansible-collections-community-general-supervisorctl-module) – Manage the state of a program or group of programs running via supervisord
* [svc](svc_module#ansible-collections-community-general-svc-module) – Manage daemontools services
* [svr4pkg](svr4pkg_module#ansible-collections-community-general-svr4pkg-module) – Manage Solaris SVR4 packages
* [swdepot](swdepot_module#ansible-collections-community-general-swdepot-module) – Manage packages with swdepot package manager (HP-UX)
* [swupd](swupd_module#ansible-collections-community-general-swupd-module) – Manages updates and bundles in ClearLinux systems.
* [syslogger](syslogger_module#ansible-collections-community-general-syslogger-module) – Log messages in the syslog
* [syspatch](syspatch_module#ansible-collections-community-general-syspatch-module) – Manage OpenBSD system patches
* [sysrc](sysrc_module#ansible-collections-community-general-sysrc-module) – Manage FreeBSD using sysrc
* [sysupgrade](sysupgrade_module#ansible-collections-community-general-sysupgrade-module) – Manage OpenBSD system upgrades
* [taiga\_issue](taiga_issue_module#ansible-collections-community-general-taiga-issue-module) – Creates/deletes an issue in a Taiga Project Management Platform
* [telegram](telegram_module#ansible-collections-community-general-telegram-module) – module for sending notifications via telegram
* [terraform](terraform_module#ansible-collections-community-general-terraform-module) – Manages a Terraform deployment (and plans)
* [timezone](timezone_module#ansible-collections-community-general-timezone-module) – Configure timezone setting
* [twilio](twilio_module#ansible-collections-community-general-twilio-module) – Sends a text message to a mobile phone through Twilio.
* [typetalk](typetalk_module#ansible-collections-community-general-typetalk-module) – Send a message to typetalk
* [udm\_dns\_record](udm_dns_record_module#ansible-collections-community-general-udm-dns-record-module) – Manage dns entries on a univention corporate server
* [udm\_dns\_zone](udm_dns_zone_module#ansible-collections-community-general-udm-dns-zone-module) – Manage dns zones on a univention corporate server
* [udm\_group](udm_group_module#ansible-collections-community-general-udm-group-module) – Manage of the posix group
* [udm\_share](udm_share_module#ansible-collections-community-general-udm-share-module) – Manage samba shares on a univention corporate server
* [udm\_user](udm_user_module#ansible-collections-community-general-udm-user-module) – Manage posix users on a univention corporate server
* [ufw](ufw_module#ansible-collections-community-general-ufw-module) – Manage firewall with UFW
* [uptimerobot](uptimerobot_module#ansible-collections-community-general-uptimerobot-module) – Pause and start Uptime Robot monitoring
* [urpmi](urpmi_module#ansible-collections-community-general-urpmi-module) – Urpmi manager
* [utm\_aaa\_group](utm_aaa_group_module#ansible-collections-community-general-utm-aaa-group-module) – Create, update or destroy an aaa group object in Sophos UTM.
* [utm\_aaa\_group\_info](utm_aaa_group_info_module#ansible-collections-community-general-utm-aaa-group-info-module) – get info for reverse\_proxy frontend entry in Sophos UTM
* [utm\_ca\_host\_key\_cert](utm_ca_host_key_cert_module#ansible-collections-community-general-utm-ca-host-key-cert-module) – create, update or destroy ca host\_key\_cert entry in Sophos UTM
* [utm\_ca\_host\_key\_cert\_info](utm_ca_host_key_cert_info_module#ansible-collections-community-general-utm-ca-host-key-cert-info-module) – Get info for a ca host\_key\_cert entry in Sophos UTM
* [utm\_dns\_host](utm_dns_host_module#ansible-collections-community-general-utm-dns-host-module) – create, update or destroy dns entry in Sophos UTM
* [utm\_network\_interface\_address](utm_network_interface_address_module#ansible-collections-community-general-utm-network-interface-address-module) – Create, update or destroy network/interface\_address object
* [utm\_network\_interface\_address\_info](utm_network_interface_address_info_module#ansible-collections-community-general-utm-network-interface-address-info-module) – Get info for a network/interface\_address object
* [utm\_proxy\_auth\_profile](utm_proxy_auth_profile_module#ansible-collections-community-general-utm-proxy-auth-profile-module) – create, update or destroy reverse\_proxy auth\_profile entry in Sophos UTM
* [utm\_proxy\_exception](utm_proxy_exception_module#ansible-collections-community-general-utm-proxy-exception-module) – Create, update or destroy reverse\_proxy exception entry in Sophos UTM
* [utm\_proxy\_frontend](utm_proxy_frontend_module#ansible-collections-community-general-utm-proxy-frontend-module) – create, update or destroy reverse\_proxy frontend entry in Sophos UTM
* [utm\_proxy\_frontend\_info](utm_proxy_frontend_info_module#ansible-collections-community-general-utm-proxy-frontend-info-module) – create, update or destroy reverse\_proxy frontend entry in Sophos UTM
* [utm\_proxy\_location](utm_proxy_location_module#ansible-collections-community-general-utm-proxy-location-module) – create, update or destroy reverse\_proxy location entry in Sophos UTM
* [utm\_proxy\_location\_info](utm_proxy_location_info_module#ansible-collections-community-general-utm-proxy-location-info-module) – create, update or destroy reverse\_proxy location entry in Sophos UTM
* [vdo](vdo_module#ansible-collections-community-general-vdo-module) – Module to control VDO
* [vertica\_configuration](vertica_configuration_module#ansible-collections-community-general-vertica-configuration-module) – Updates Vertica configuration parameters.
* [vertica\_info](vertica_info_module#ansible-collections-community-general-vertica-info-module) – Gathers Vertica database facts.
* [vertica\_role](vertica_role_module#ansible-collections-community-general-vertica-role-module) – Adds or removes Vertica database roles and assigns roles to them.
* [vertica\_schema](vertica_schema_module#ansible-collections-community-general-vertica-schema-module) – Adds or removes Vertica database schema and roles.
* [vertica\_user](vertica_user_module#ansible-collections-community-general-vertica-user-module) – Adds or removes Vertica database users and assigns roles.
* [vexata\_eg](vexata_eg_module#ansible-collections-community-general-vexata-eg-module) – Manage export groups on Vexata VX100 storage arrays
* [vexata\_volume](vexata_volume_module#ansible-collections-community-general-vexata-volume-module) – Manage volumes on Vexata VX100 storage arrays
* [vmadm](vmadm_module#ansible-collections-community-general-vmadm-module) – Manage SmartOS virtual machines and zones.
* [wakeonlan](wakeonlan_module#ansible-collections-community-general-wakeonlan-module) – Send a magic Wake-on-LAN (WoL) broadcast packet
* [webfaction\_app](webfaction_app_module#ansible-collections-community-general-webfaction-app-module) – Add or remove applications on a Webfaction host
* [webfaction\_db](webfaction_db_module#ansible-collections-community-general-webfaction-db-module) – Add or remove a database on Webfaction
* [webfaction\_domain](webfaction_domain_module#ansible-collections-community-general-webfaction-domain-module) – Add or remove domains and subdomains on Webfaction
* [webfaction\_mailbox](webfaction_mailbox_module#ansible-collections-community-general-webfaction-mailbox-module) – Add or remove mailboxes on Webfaction
* [webfaction\_site](webfaction_site_module#ansible-collections-community-general-webfaction-site-module) – Add or remove a website on a Webfaction host
* [xattr](xattr_module#ansible-collections-community-general-xattr-module) – Manage user defined extended attributes
* [xbps](xbps_module#ansible-collections-community-general-xbps-module) – Manage packages with XBPS
* [xcc\_redfish\_command](xcc_redfish_command_module#ansible-collections-community-general-xcc-redfish-command-module) – Manages Lenovo Out-Of-Band controllers using Redfish APIs
* [xenserver\_facts](xenserver_facts_module#ansible-collections-community-general-xenserver-facts-module) – get facts reported on xenserver
* [xenserver\_guest](xenserver_guest_module#ansible-collections-community-general-xenserver-guest-module) – Manages virtual machines running on Citrix Hypervisor/XenServer host or pool
* [xenserver\_guest\_info](xenserver_guest_info_module#ansible-collections-community-general-xenserver-guest-info-module) – Gathers information for virtual machines running on Citrix Hypervisor/XenServer host or pool
* [xenserver\_guest\_powerstate](xenserver_guest_powerstate_module#ansible-collections-community-general-xenserver-guest-powerstate-module) – Manages power states of virtual machines running on Citrix Hypervisor/XenServer host or pool
* [xfconf](xfconf_module#ansible-collections-community-general-xfconf-module) – Edit XFCE4 Configurations
* [xfconf\_info](xfconf_info_module#ansible-collections-community-general-xfconf-info-module) – Retrieve XFCE4 configurations
* [xfs\_quota](xfs_quota_module#ansible-collections-community-general-xfs-quota-module) – Manage quotas on XFS filesystems
* [xml](xml_module#ansible-collections-community-general-xml-module) – Manage bits and pieces of XML files or strings
* [yarn](yarn_module#ansible-collections-community-general-yarn-module) – Manage node.js packages with Yarn
* [yum\_versionlock](yum_versionlock_module#ansible-collections-community-general-yum-versionlock-module) – Locks / unlocks a installed package(s) from being updated by yum package manager
* [zfs](zfs_module#ansible-collections-community-general-zfs-module) – Manage zfs
* [zfs\_delegate\_admin](zfs_delegate_admin_module#ansible-collections-community-general-zfs-delegate-admin-module) – Manage ZFS delegated administration (user admin privileges)
* [zfs\_facts](zfs_facts_module#ansible-collections-community-general-zfs-facts-module) – Gather facts about ZFS datasets.
* [znode](znode_module#ansible-collections-community-general-znode-module) – Create, delete, retrieve, and update znodes using ZooKeeper
* [zpool\_facts](zpool_facts_module#ansible-collections-community-general-zpool-facts-module) – Gather facts about ZFS pools.
* [zypper](zypper_module#ansible-collections-community-general-zypper-module) – Manage packages on SUSE and openSUSE
* [zypper\_repository](zypper_repository_module#ansible-collections-community-general-zypper-repository-module) – Add and remove Zypper repositories

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/general/index.html>

Community.Okd
=============

 Collection version 1.1.2

 Plugin Index
------------

 These are the plugins in the community.okd collection

 ### Connection Plugins

 * [oc](oc_connection#ansible-collections-community-okd-oc-connection) – Execute tasks in pods running on OpenShift.

 ### Inventory Plugins

 * [openshift](openshift_inventory#ansible-collections-community-okd-openshift-inventory) – OpenShift inventory source

 ### Modules

 * [k8s](k8s_module#ansible-collections-community-okd-k8s-module) – Manage OpenShift objects
* [openshift\_auth](openshift_auth_module#ansible-collections-community-okd-openshift-auth-module) – Authenticate to OpenShift clusters which require an explicit login step
* [openshift\_process](openshift_process_module#ansible-collections-community-okd-openshift-process-module) – Process an OpenShift template.openshift.io/v1 Template
* [openshift\_route](openshift_route_module#ansible-collections-community-okd-openshift-route-module) – Expose a Service as an OpenShift Route.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/okd/index.html>

Community.Rabbitmq
==================

 Collection version 1.1.0

 Plugin Index
------------

 These are the plugins in the community.rabbitmq collection

 ### Lookup Plugins

 * [rabbitmq](rabbitmq_lookup#ansible-collections-community-rabbitmq-rabbitmq-lookup) – Retrieve messages from an AMQP/AMQPS RabbitMQ queue.

 ### Modules

 * [rabbitmq\_binding](rabbitmq_binding_module#ansible-collections-community-rabbitmq-rabbitmq-binding-module) – Manage rabbitMQ bindings
* [rabbitmq\_exchange](rabbitmq_exchange_module#ansible-collections-community-rabbitmq-rabbitmq-exchange-module) – Manage rabbitMQ exchanges
* [rabbitmq\_feature\_flag](rabbitmq_feature_flag_module#ansible-collections-community-rabbitmq-rabbitmq-feature-flag-module) – Enables feature flag
* [rabbitmq\_global\_parameter](rabbitmq_global_parameter_module#ansible-collections-community-rabbitmq-rabbitmq-global-parameter-module) – Manage RabbitMQ global parameters
* [rabbitmq\_parameter](rabbitmq_parameter_module#ansible-collections-community-rabbitmq-rabbitmq-parameter-module) – Manage RabbitMQ parameters
* [rabbitmq\_plugin](rabbitmq_plugin_module#ansible-collections-community-rabbitmq-rabbitmq-plugin-module) – Manage RabbitMQ plugins
* [rabbitmq\_policy](rabbitmq_policy_module#ansible-collections-community-rabbitmq-rabbitmq-policy-module) – Manage the state of policies in RabbitMQ
* [rabbitmq\_publish](rabbitmq_publish_module#ansible-collections-community-rabbitmq-rabbitmq-publish-module) – Publish a message to a RabbitMQ queue.
* [rabbitmq\_queue](rabbitmq_queue_module#ansible-collections-community-rabbitmq-rabbitmq-queue-module) – Manage rabbitMQ queues
* [rabbitmq\_upgrade](rabbitmq_upgrade_module#ansible-collections-community-rabbitmq-rabbitmq-upgrade-module) – Execute rabbitmq-upgrade commands
* [rabbitmq\_user](rabbitmq_user_module#ansible-collections-community-rabbitmq-rabbitmq-user-module) – Manage RabbitMQ users
* [rabbitmq\_user\_limits](rabbitmq_user_limits_module#ansible-collections-community-rabbitmq-rabbitmq-user-limits-module) – Manage RabbitMQ user limits
* [rabbitmq\_vhost](rabbitmq_vhost_module#ansible-collections-community-rabbitmq-rabbitmq-vhost-module) – Manage the state of a virtual host in RabbitMQ
* [rabbitmq\_vhost\_limits](rabbitmq_vhost_limits_module#ansible-collections-community-rabbitmq-rabbitmq-vhost-limits-module) – Manage the state of virtual host limits in RabbitMQ

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/rabbitmq/index.html>

Community.Routeros
==================

 Collection version 1.2.0

 Guides
------

 * [How to connect to RouterOS devices with the RouterOS API](docsite/api-guide)
* [How to connect to RouterOS devices with SSH](docsite/ssh-guide)

 Plugin Index
------------

 These are the plugins in the community.routeros collection

 ### Cliconf Plugins

 * [routeros](routeros_cliconf#ansible-collections-community-routeros-routeros-cliconf) – Use routeros cliconf to run command on MikroTik RouterOS platform

 ### Modules

 * [api](api_module#ansible-collections-community-routeros-api-module) – Ansible module for RouterOS API
* [command](command_module#ansible-collections-community-routeros-command-module) – Run commands on remote devices running MikroTik RouterOS
* [facts](facts_module#ansible-collections-community-routeros-facts-module) – Collect facts from remote devices running MikroTik RouterOS

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/routeros/index.html>

Community.Network
=================

 Collection version 3.0.0

 Plugin Index
------------

 These are the plugins in the community.network collection

 ### Cliconf Plugins

 * [aireos](aireos_cliconf#ansible-collections-community-network-aireos-cliconf) – Use aireos cliconf to run command on Cisco WLC platform
* [apconos](apconos_cliconf#ansible-collections-community-network-apconos-cliconf) – Use apconos cliconf to run command on APCON network devices
* [aruba](aruba_cliconf#ansible-collections-community-network-aruba-cliconf) – Use aruba cliconf to run command on Aruba platform
* [ce](ce_cliconf#ansible-collections-community-network-ce-cliconf) – Use ce cliconf to run command on HUAWEI CloudEngine platform
* [cnos](cnos_cliconf#ansible-collections-community-network-cnos-cliconf) – Use cnos cliconf to run command on Lenovo CNOS platform
* [edgeos](edgeos_cliconf#ansible-collections-community-network-edgeos-cliconf) – Use edgeos cliconf to run command on EdgeOS platform
* [edgeswitch](edgeswitch_cliconf#ansible-collections-community-network-edgeswitch-cliconf) – Use edgeswitch cliconf to run command on EdgeSwitch platform
* [enos](enos_cliconf#ansible-collections-community-network-enos-cliconf) – Use enos cliconf to run command on Lenovo ENOS platform
* [eric\_eccli](eric_eccli_cliconf#ansible-collections-community-network-eric-eccli-cliconf) – Use eccli cliconf to run command on Ericsson ECCLI platform
* [exos](exos_cliconf#ansible-collections-community-network-exos-cliconf) – Use exos cliconf to run command on Extreme EXOS platform
* [icx](icx_cliconf#ansible-collections-community-network-icx-cliconf) – Use icx cliconf to run command on Ruckus ICX platform
* [ironware](ironware_cliconf#ansible-collections-community-network-ironware-cliconf) – Use ironware cliconf to run command on Extreme Ironware platform
* [netvisor](netvisor_cliconf#ansible-collections-community-network-netvisor-cliconf) – Use netvisor cliconf to run command on Pluribus netvisor platform
* [nos](nos_cliconf#ansible-collections-community-network-nos-cliconf) – Use nos cliconf to run command on Extreme NOS platform
* [slxos](slxos_cliconf#ansible-collections-community-network-slxos-cliconf) – Use slxos cliconf to run command on Extreme SLX-OS platform
* [voss](voss_cliconf#ansible-collections-community-network-voss-cliconf) – Use voss cliconf to run command on Extreme VOSS platform
* [weos4](weos4_cliconf#ansible-collections-community-network-weos4-cliconf) – Use weos4 cliconf to run commands on Westermo platform

 ### Httpapi Plugins

 * [exos](exos_httpapi#ansible-collections-community-network-exos-httpapi) – Use EXOS REST APIs to communicate with EXOS platform
* [ftd](ftd_httpapi#ansible-collections-community-network-ftd-httpapi) – HttpApi Plugin for Cisco ASA Firepower device

 ### Lookup Plugins

 * [avi](avi_lookup#ansible-collections-community-network-avi-lookup) – Look up `Avi` objects.

 ### Modules

 * [a10\_server](a10_server_module#ansible-collections-community-network-a10-server-module) – Manage A10 Networks AX/SoftAX/Thunder/vThunder devices’ server object.
* [a10\_server\_axapi3](a10_server_axapi3_module#ansible-collections-community-network-a10-server-axapi3-module) – Manage A10 Networks AX/SoftAX/Thunder/vThunder devices
* [a10\_service\_group](a10_service_group_module#ansible-collections-community-network-a10-service-group-module) – Manage A10 Networks AX/SoftAX/Thunder/vThunder devices’ service groups.
* [a10\_virtual\_server](a10_virtual_server_module#ansible-collections-community-network-a10-virtual-server-module) – Manage A10 Networks AX/SoftAX/Thunder/vThunder devices’ virtual servers.
* [aireos\_command](aireos_command_module#ansible-collections-community-network-aireos-command-module) – Run commands on remote devices running Cisco WLC
* [aireos\_config](aireos_config_module#ansible-collections-community-network-aireos-config-module) – Manage Cisco WLC configurations
* [apconos\_command](apconos_command_module#ansible-collections-community-network-apconos-command-module) – Run arbitrary commands on APCON devices
* [aruba\_command](aruba_command_module#ansible-collections-community-network-aruba-command-module) – Run commands on remote devices running Aruba Mobility Controller
* [aruba\_config](aruba_config_module#ansible-collections-community-network-aruba-config-module) – Manage Aruba configuration sections
* [avi\_actiongroupconfig](avi_actiongroupconfig_module#ansible-collections-community-network-avi-actiongroupconfig-module) – Module for setup of ActionGroupConfig Avi RESTful Object
* [avi\_alertconfig](avi_alertconfig_module#ansible-collections-community-network-avi-alertconfig-module) – Module for setup of AlertConfig Avi RESTful Object
* [avi\_alertemailconfig](avi_alertemailconfig_module#ansible-collections-community-network-avi-alertemailconfig-module) – Module for setup of AlertEmailConfig Avi RESTful Object
* [avi\_alertscriptconfig](avi_alertscriptconfig_module#ansible-collections-community-network-avi-alertscriptconfig-module) – Module for setup of AlertScriptConfig Avi RESTful Object
* [avi\_alertsyslogconfig](avi_alertsyslogconfig_module#ansible-collections-community-network-avi-alertsyslogconfig-module) – Module for setup of AlertSyslogConfig Avi RESTful Object
* [avi\_analyticsprofile](avi_analyticsprofile_module#ansible-collections-community-network-avi-analyticsprofile-module) – Module for setup of AnalyticsProfile Avi RESTful Object
* [avi\_api\_session](avi_api_session_module#ansible-collections-community-network-avi-api-session-module) – Avi API Module
* [avi\_api\_version](avi_api_version_module#ansible-collections-community-network-avi-api-version-module) – Avi API Version Module
* [avi\_applicationpersistenceprofile](avi_applicationpersistenceprofile_module#ansible-collections-community-network-avi-applicationpersistenceprofile-module) – Module for setup of ApplicationPersistenceProfile Avi RESTful Object
* [avi\_applicationprofile](avi_applicationprofile_module#ansible-collections-community-network-avi-applicationprofile-module) – Module for setup of ApplicationProfile Avi RESTful Object
* [avi\_authprofile](avi_authprofile_module#ansible-collections-community-network-avi-authprofile-module) – Module for setup of AuthProfile Avi RESTful Object
* [avi\_autoscalelaunchconfig](avi_autoscalelaunchconfig_module#ansible-collections-community-network-avi-autoscalelaunchconfig-module) – Module for setup of AutoScaleLaunchConfig Avi RESTful Object
* [avi\_backup](avi_backup_module#ansible-collections-community-network-avi-backup-module) – Module for setup of Backup Avi RESTful Object
* [avi\_backupconfiguration](avi_backupconfiguration_module#ansible-collections-community-network-avi-backupconfiguration-module) – Module for setup of BackupConfiguration Avi RESTful Object
* [avi\_certificatemanagementprofile](avi_certificatemanagementprofile_module#ansible-collections-community-network-avi-certificatemanagementprofile-module) – Module for setup of CertificateManagementProfile Avi RESTful Object
* [avi\_cloud](avi_cloud_module#ansible-collections-community-network-avi-cloud-module) – Module for setup of Cloud Avi RESTful Object
* [avi\_cloudconnectoruser](avi_cloudconnectoruser_module#ansible-collections-community-network-avi-cloudconnectoruser-module) – Module for setup of CloudConnectorUser Avi RESTful Object
* [avi\_cloudproperties](avi_cloudproperties_module#ansible-collections-community-network-avi-cloudproperties-module) – Module for setup of CloudProperties Avi RESTful Object
* [avi\_cluster](avi_cluster_module#ansible-collections-community-network-avi-cluster-module) – Module for setup of Cluster Avi RESTful Object
* [avi\_clusterclouddetails](avi_clusterclouddetails_module#ansible-collections-community-network-avi-clusterclouddetails-module) – Module for setup of ClusterCloudDetails Avi RESTful Object
* [avi\_controllerproperties](avi_controllerproperties_module#ansible-collections-community-network-avi-controllerproperties-module) – Module for setup of ControllerProperties Avi RESTful Object
* [avi\_customipamdnsprofile](avi_customipamdnsprofile_module#ansible-collections-community-network-avi-customipamdnsprofile-module) – Module for setup of CustomIpamDnsProfile Avi RESTful Object
* [avi\_dnspolicy](avi_dnspolicy_module#ansible-collections-community-network-avi-dnspolicy-module) – Module for setup of DnsPolicy Avi RESTful Object
* [avi\_errorpagebody](avi_errorpagebody_module#ansible-collections-community-network-avi-errorpagebody-module) – Module for setup of ErrorPageBody Avi RESTful Object
* [avi\_errorpageprofile](avi_errorpageprofile_module#ansible-collections-community-network-avi-errorpageprofile-module) – Module for setup of ErrorPageProfile Avi RESTful Object
* [avi\_gslb](avi_gslb_module#ansible-collections-community-network-avi-gslb-module) – Module for setup of Gslb Avi RESTful Object
* [avi\_gslbgeodbprofile](avi_gslbgeodbprofile_module#ansible-collections-community-network-avi-gslbgeodbprofile-module) – Module for setup of GslbGeoDbProfile Avi RESTful Object
* [avi\_gslbservice](avi_gslbservice_module#ansible-collections-community-network-avi-gslbservice-module) – Module for setup of GslbService Avi RESTful Object
* [avi\_gslbservice\_patch\_member](avi_gslbservice_patch_member_module#ansible-collections-community-network-avi-gslbservice-patch-member-module) – Avi API Module
* [avi\_hardwaresecuritymodulegroup](avi_hardwaresecuritymodulegroup_module#ansible-collections-community-network-avi-hardwaresecuritymodulegroup-module) – Module for setup of HardwareSecurityModuleGroup Avi RESTful Object
* [avi\_healthmonitor](avi_healthmonitor_module#ansible-collections-community-network-avi-healthmonitor-module) – Module for setup of HealthMonitor Avi RESTful Object
* [avi\_httppolicyset](avi_httppolicyset_module#ansible-collections-community-network-avi-httppolicyset-module) – Module for setup of HTTPPolicySet Avi RESTful Object
* [avi\_ipaddrgroup](avi_ipaddrgroup_module#ansible-collections-community-network-avi-ipaddrgroup-module) – Module for setup of IpAddrGroup Avi RESTful Object
* [avi\_ipamdnsproviderprofile](avi_ipamdnsproviderprofile_module#ansible-collections-community-network-avi-ipamdnsproviderprofile-module) – Module for setup of IpamDnsProviderProfile Avi RESTful Object
* [avi\_l4policyset](avi_l4policyset_module#ansible-collections-community-network-avi-l4policyset-module) – Module for setup of L4PolicySet Avi RESTful Object
* [avi\_microservicegroup](avi_microservicegroup_module#ansible-collections-community-network-avi-microservicegroup-module) – Module for setup of MicroServiceGroup Avi RESTful Object
* [avi\_network](avi_network_module#ansible-collections-community-network-avi-network-module) – Module for setup of Network Avi RESTful Object
* [avi\_networkprofile](avi_networkprofile_module#ansible-collections-community-network-avi-networkprofile-module) – Module for setup of NetworkProfile Avi RESTful Object
* [avi\_networksecuritypolicy](avi_networksecuritypolicy_module#ansible-collections-community-network-avi-networksecuritypolicy-module) – Module for setup of NetworkSecurityPolicy Avi RESTful Object
* [avi\_pkiprofile](avi_pkiprofile_module#ansible-collections-community-network-avi-pkiprofile-module) – Module for setup of PKIProfile Avi RESTful Object
* [avi\_pool](avi_pool_module#ansible-collections-community-network-avi-pool-module) – Module for setup of Pool Avi RESTful Object
* [avi\_poolgroup](avi_poolgroup_module#ansible-collections-community-network-avi-poolgroup-module) – Module for setup of PoolGroup Avi RESTful Object
* [avi\_poolgroupdeploymentpolicy](avi_poolgroupdeploymentpolicy_module#ansible-collections-community-network-avi-poolgroupdeploymentpolicy-module) – Module for setup of PoolGroupDeploymentPolicy Avi RESTful Object
* [avi\_prioritylabels](avi_prioritylabels_module#ansible-collections-community-network-avi-prioritylabels-module) – Module for setup of PriorityLabels Avi RESTful Object
* [avi\_role](avi_role_module#ansible-collections-community-network-avi-role-module) – Module for setup of Role Avi RESTful Object
* [avi\_scheduler](avi_scheduler_module#ansible-collections-community-network-avi-scheduler-module) – Module for setup of Scheduler Avi RESTful Object
* [avi\_seproperties](avi_seproperties_module#ansible-collections-community-network-avi-seproperties-module) – Module for setup of SeProperties Avi RESTful Object
* [avi\_serverautoscalepolicy](avi_serverautoscalepolicy_module#ansible-collections-community-network-avi-serverautoscalepolicy-module) – Module for setup of ServerAutoScalePolicy Avi RESTful Object
* [avi\_serviceengine](avi_serviceengine_module#ansible-collections-community-network-avi-serviceengine-module) – Module for setup of ServiceEngine Avi RESTful Object
* [avi\_serviceenginegroup](avi_serviceenginegroup_module#ansible-collections-community-network-avi-serviceenginegroup-module) – Module for setup of ServiceEngineGroup Avi RESTful Object
* [avi\_snmptrapprofile](avi_snmptrapprofile_module#ansible-collections-community-network-avi-snmptrapprofile-module) – Module for setup of SnmpTrapProfile Avi RESTful Object
* [avi\_sslkeyandcertificate](avi_sslkeyandcertificate_module#ansible-collections-community-network-avi-sslkeyandcertificate-module) – Module for setup of SSLKeyAndCertificate Avi RESTful Object
* [avi\_sslprofile](avi_sslprofile_module#ansible-collections-community-network-avi-sslprofile-module) – Module for setup of SSLProfile Avi RESTful Object
* [avi\_stringgroup](avi_stringgroup_module#ansible-collections-community-network-avi-stringgroup-module) – Module for setup of StringGroup Avi RESTful Object
* [avi\_systemconfiguration](avi_systemconfiguration_module#ansible-collections-community-network-avi-systemconfiguration-module) – Module for setup of SystemConfiguration Avi RESTful Object
* [avi\_tenant](avi_tenant_module#ansible-collections-community-network-avi-tenant-module) – Module for setup of Tenant Avi RESTful Object
* [avi\_trafficcloneprofile](avi_trafficcloneprofile_module#ansible-collections-community-network-avi-trafficcloneprofile-module) – Module for setup of TrafficCloneProfile Avi RESTful Object
* [avi\_user](avi_user_module#ansible-collections-community-network-avi-user-module) – Avi User Module
* [avi\_useraccount](avi_useraccount_module#ansible-collections-community-network-avi-useraccount-module) – Avi UserAccount Module
* [avi\_useraccountprofile](avi_useraccountprofile_module#ansible-collections-community-network-avi-useraccountprofile-module) – Module for setup of UserAccountProfile Avi RESTful Object
* [avi\_virtualservice](avi_virtualservice_module#ansible-collections-community-network-avi-virtualservice-module) – Module for setup of VirtualService Avi RESTful Object
* [avi\_vrfcontext](avi_vrfcontext_module#ansible-collections-community-network-avi-vrfcontext-module) – Module for setup of VrfContext Avi RESTful Object
* [avi\_vsdatascriptset](avi_vsdatascriptset_module#ansible-collections-community-network-avi-vsdatascriptset-module) – Module for setup of VSDataScriptSet Avi RESTful Object
* [avi\_vsvip](avi_vsvip_module#ansible-collections-community-network-avi-vsvip-module) – Module for setup of VsVip Avi RESTful Object
* [avi\_webhook](avi_webhook_module#ansible-collections-community-network-avi-webhook-module) – Module for setup of Webhook Avi RESTful Object
* [bcf\_switch](bcf_switch_module#ansible-collections-community-network-bcf-switch-module) – Create and remove a bcf switch.
* [bigmon\_chain](bigmon_chain_module#ansible-collections-community-network-bigmon-chain-module) – Create and remove a bigmon inline service chain.
* [bigmon\_policy](bigmon_policy_module#ansible-collections-community-network-bigmon-policy-module) – Create and remove a bigmon out-of-band policy.
* [ce\_aaa\_server](ce_aaa_server_module#ansible-collections-community-network-ce-aaa-server-module) – Manages AAA server global configuration on HUAWEI CloudEngine switches.
* [ce\_aaa\_server\_host](ce_aaa_server_host_module#ansible-collections-community-network-ce-aaa-server-host-module) – Manages AAA server host configuration on HUAWEI CloudEngine switches.
* [ce\_acl](ce_acl_module#ansible-collections-community-network-ce-acl-module) – Manages base ACL configuration on HUAWEI CloudEngine switches.
* [ce\_acl\_advance](ce_acl_advance_module#ansible-collections-community-network-ce-acl-advance-module) – Manages advanced ACL configuration on HUAWEI CloudEngine switches.
* [ce\_acl\_interface](ce_acl_interface_module#ansible-collections-community-network-ce-acl-interface-module) – Manages applying ACLs to interfaces on HUAWEI CloudEngine switches.
* [ce\_bfd\_global](ce_bfd_global_module#ansible-collections-community-network-ce-bfd-global-module) – Manages BFD global configuration on HUAWEI CloudEngine devices.
* [ce\_bfd\_session](ce_bfd_session_module#ansible-collections-community-network-ce-bfd-session-module) – Manages BFD session configuration on HUAWEI CloudEngine devices.
* [ce\_bfd\_view](ce_bfd_view_module#ansible-collections-community-network-ce-bfd-view-module) – Manages BFD session view configuration on HUAWEI CloudEngine devices.
* [ce\_bgp](ce_bgp_module#ansible-collections-community-network-ce-bgp-module) – Manages BGP configuration on HUAWEI CloudEngine switches.
* [ce\_bgp\_af](ce_bgp_af_module#ansible-collections-community-network-ce-bgp-af-module) – Manages BGP Address-family configuration on HUAWEI CloudEngine switches.
* [ce\_bgp\_neighbor](ce_bgp_neighbor_module#ansible-collections-community-network-ce-bgp-neighbor-module) – Manages BGP peer configuration on HUAWEI CloudEngine switches.
* [ce\_bgp\_neighbor\_af](ce_bgp_neighbor_af_module#ansible-collections-community-network-ce-bgp-neighbor-af-module) – Manages BGP neighbor Address-family configuration on HUAWEI CloudEngine switches.
* [ce\_command](ce_command_module#ansible-collections-community-network-ce-command-module) – Run arbitrary command on HUAWEI CloudEngine devices.
* [ce\_config](ce_config_module#ansible-collections-community-network-ce-config-module) – Manage Huawei CloudEngine configuration sections.
* [ce\_dldp](ce_dldp_module#ansible-collections-community-network-ce-dldp-module) – Manages global DLDP configuration on HUAWEI CloudEngine switches.
* [ce\_dldp\_interface](ce_dldp_interface_module#ansible-collections-community-network-ce-dldp-interface-module) – Manages interface DLDP configuration on HUAWEI CloudEngine switches.
* [ce\_eth\_trunk](ce_eth_trunk_module#ansible-collections-community-network-ce-eth-trunk-module) – Manages Eth-Trunk interfaces on HUAWEI CloudEngine switches.
* [ce\_evpn\_bd\_vni](ce_evpn_bd_vni_module#ansible-collections-community-network-ce-evpn-bd-vni-module) – Manages EVPN VXLAN Network Identifier (VNI) on HUAWEI CloudEngine switches.
* [ce\_evpn\_bgp](ce_evpn_bgp_module#ansible-collections-community-network-ce-evpn-bgp-module) – Manages BGP EVPN configuration on HUAWEI CloudEngine switches.
* [ce\_evpn\_bgp\_rr](ce_evpn_bgp_rr_module#ansible-collections-community-network-ce-evpn-bgp-rr-module) – Manages RR for the VXLAN Network on HUAWEI CloudEngine switches.
* [ce\_evpn\_global](ce_evpn_global_module#ansible-collections-community-network-ce-evpn-global-module) – Manages global configuration of EVPN on HUAWEI CloudEngine switches.
* [ce\_facts](ce_facts_module#ansible-collections-community-network-ce-facts-module) – Gets facts about HUAWEI CloudEngine switches.
* [ce\_file\_copy](ce_file_copy_module#ansible-collections-community-network-ce-file-copy-module) – Copy a file to a remote cloudengine device over SCP on HUAWEI CloudEngine switches.
* [ce\_info\_center\_debug](ce_info_center_debug_module#ansible-collections-community-network-ce-info-center-debug-module) – Manages information center debug configuration on HUAWEI CloudEngine switches.
* [ce\_info\_center\_global](ce_info_center_global_module#ansible-collections-community-network-ce-info-center-global-module) – Manages outputting logs on HUAWEI CloudEngine switches.
* [ce\_info\_center\_log](ce_info_center_log_module#ansible-collections-community-network-ce-info-center-log-module) – Manages information center log configuration on HUAWEI CloudEngine switches.
* [ce\_info\_center\_trap](ce_info_center_trap_module#ansible-collections-community-network-ce-info-center-trap-module) – Manages information center trap configuration on HUAWEI CloudEngine switches.
* [ce\_interface](ce_interface_module#ansible-collections-community-network-ce-interface-module) – Manages physical attributes of interfaces on HUAWEI CloudEngine switches.
* [ce\_interface\_ospf](ce_interface_ospf_module#ansible-collections-community-network-ce-interface-ospf-module) – Manages configuration of an OSPF interface instanceon HUAWEI CloudEngine switches.
* [ce\_ip\_interface](ce_ip_interface_module#ansible-collections-community-network-ce-ip-interface-module) – Manages L3 attributes for IPv4 and IPv6 interfaces on HUAWEI CloudEngine switches.
* [ce\_is\_is\_instance](ce_is_is_instance_module#ansible-collections-community-network-ce-is-is-instance-module) – Manages isis process id configuration on HUAWEI CloudEngine devices.
* [ce\_is\_is\_interface](ce_is_is_interface_module#ansible-collections-community-network-ce-is-is-interface-module) – Manages isis interface configuration on HUAWEI CloudEngine devices.
* [ce\_is\_is\_view](ce_is_is_view_module#ansible-collections-community-network-ce-is-is-view-module) – Manages isis view configuration on HUAWEI CloudEngine devices.
* [ce\_lacp](ce_lacp_module#ansible-collections-community-network-ce-lacp-module) – Manages Eth-Trunk interfaces on HUAWEI CloudEngine switches
* [ce\_link\_status](ce_link_status_module#ansible-collections-community-network-ce-link-status-module) – Get interface link status on HUAWEI CloudEngine switches.
* [ce\_lldp](ce_lldp_module#ansible-collections-community-network-ce-lldp-module) – Manages LLDP configuration on HUAWEI CloudEngine switches.
* [ce\_lldp\_interface](ce_lldp_interface_module#ansible-collections-community-network-ce-lldp-interface-module) – Manages INTERFACE LLDP configuration on HUAWEI CloudEngine switches.
* [ce\_mdn\_interface](ce_mdn_interface_module#ansible-collections-community-network-ce-mdn-interface-module) – Manages MDN configuration on HUAWEI CloudEngine switches.
* [ce\_mlag\_config](ce_mlag_config_module#ansible-collections-community-network-ce-mlag-config-module) – Manages MLAG configuration on HUAWEI CloudEngine switches.
* [ce\_mlag\_interface](ce_mlag_interface_module#ansible-collections-community-network-ce-mlag-interface-module) – Manages MLAG interfaces on HUAWEI CloudEngine switches.
* [ce\_mtu](ce_mtu_module#ansible-collections-community-network-ce-mtu-module) – Manages MTU settings on HUAWEI CloudEngine switches.
* [ce\_multicast\_global](ce_multicast_global_module#ansible-collections-community-network-ce-multicast-global-module) – Manages multicast global configuration on HUAWEI CloudEngine switches.
* [ce\_multicast\_igmp\_enable](ce_multicast_igmp_enable_module#ansible-collections-community-network-ce-multicast-igmp-enable-module) – Manages multicast igmp enable configuration on HUAWEI CloudEngine switches.
* [ce\_netconf](ce_netconf_module#ansible-collections-community-network-ce-netconf-module) – Run an arbitrary netconf command on HUAWEI CloudEngine switches.
* [ce\_netstream\_aging](ce_netstream_aging_module#ansible-collections-community-network-ce-netstream-aging-module) – Manages timeout mode of NetStream on HUAWEI CloudEngine switches.
* [ce\_netstream\_export](ce_netstream_export_module#ansible-collections-community-network-ce-netstream-export-module) – Manages netstream export on HUAWEI CloudEngine switches.
* [ce\_netstream\_global](ce_netstream_global_module#ansible-collections-community-network-ce-netstream-global-module) – Manages global parameters of NetStream on HUAWEI CloudEngine switches.
* [ce\_netstream\_template](ce_netstream_template_module#ansible-collections-community-network-ce-netstream-template-module) – Manages NetStream template configuration on HUAWEI CloudEngine switches.
* [ce\_ntp](ce_ntp_module#ansible-collections-community-network-ce-ntp-module) – Manages core NTP configuration on HUAWEI CloudEngine switches.
* [ce\_ntp\_auth](ce_ntp_auth_module#ansible-collections-community-network-ce-ntp-auth-module) – Manages NTP authentication configuration on HUAWEI CloudEngine switches.
* [ce\_ospf](ce_ospf_module#ansible-collections-community-network-ce-ospf-module) – Manages configuration of an OSPF instance on HUAWEI CloudEngine switches.
* [ce\_ospf\_vrf](ce_ospf_vrf_module#ansible-collections-community-network-ce-ospf-vrf-module) – Manages configuration of an OSPF VPN instance on HUAWEI CloudEngine switches.
* [ce\_reboot](ce_reboot_module#ansible-collections-community-network-ce-reboot-module) – Reboot a HUAWEI CloudEngine switches.
* [ce\_rollback](ce_rollback_module#ansible-collections-community-network-ce-rollback-module) – Set a checkpoint or rollback to a checkpoint on HUAWEI CloudEngine switches.
* [ce\_sflow](ce_sflow_module#ansible-collections-community-network-ce-sflow-module) – Manages sFlow configuration on HUAWEI CloudEngine switches.
* [ce\_snmp\_community](ce_snmp_community_module#ansible-collections-community-network-ce-snmp-community-module) – Manages SNMP community configuration on HUAWEI CloudEngine switches.
* [ce\_snmp\_contact](ce_snmp_contact_module#ansible-collections-community-network-ce-snmp-contact-module) – Manages SNMP contact configuration on HUAWEI CloudEngine switches.
* [ce\_snmp\_location](ce_snmp_location_module#ansible-collections-community-network-ce-snmp-location-module) – Manages SNMP location configuration on HUAWEI CloudEngine switches.
* [ce\_snmp\_target\_host](ce_snmp_target_host_module#ansible-collections-community-network-ce-snmp-target-host-module) – Manages SNMP target host configuration on HUAWEI CloudEngine switches.
* [ce\_snmp\_traps](ce_snmp_traps_module#ansible-collections-community-network-ce-snmp-traps-module) – Manages SNMP traps configuration on HUAWEI CloudEngine switches.
* [ce\_snmp\_user](ce_snmp_user_module#ansible-collections-community-network-ce-snmp-user-module) – Manages SNMP user configuration on HUAWEI CloudEngine switches.
* [ce\_startup](ce_startup_module#ansible-collections-community-network-ce-startup-module) – Manages a system startup information on HUAWEI CloudEngine switches.
* [ce\_static\_route](ce_static_route_module#ansible-collections-community-network-ce-static-route-module) – Manages static route configuration on HUAWEI CloudEngine switches.
* [ce\_static\_route\_bfd](ce_static_route_bfd_module#ansible-collections-community-network-ce-static-route-bfd-module) – Manages static route configuration on HUAWEI CloudEngine switches.
* [ce\_stp](ce_stp_module#ansible-collections-community-network-ce-stp-module) – Manages STP configuration on HUAWEI CloudEngine switches.
* [ce\_switchport](ce_switchport_module#ansible-collections-community-network-ce-switchport-module) – Manages Layer 2 switchport interfaces on HUAWEI CloudEngine switches.
* [ce\_vlan](ce_vlan_module#ansible-collections-community-network-ce-vlan-module) – Manages VLAN resources and attributes on Huawei CloudEngine switches.
* [ce\_vrf](ce_vrf_module#ansible-collections-community-network-ce-vrf-module) – Manages VPN instance on HUAWEI CloudEngine switches.
* [ce\_vrf\_af](ce_vrf_af_module#ansible-collections-community-network-ce-vrf-af-module) – Manages VPN instance address family on HUAWEI CloudEngine switches.
* [ce\_vrf\_interface](ce_vrf_interface_module#ansible-collections-community-network-ce-vrf-interface-module) – Manages interface specific VPN configuration on HUAWEI CloudEngine switches.
* [ce\_vrrp](ce_vrrp_module#ansible-collections-community-network-ce-vrrp-module) – Manages VRRP interfaces on HUAWEI CloudEngine devices.
* [ce\_vxlan\_arp](ce_vxlan_arp_module#ansible-collections-community-network-ce-vxlan-arp-module) – Manages ARP attributes of VXLAN on HUAWEI CloudEngine devices.
* [ce\_vxlan\_gateway](ce_vxlan_gateway_module#ansible-collections-community-network-ce-vxlan-gateway-module) – Manages gateway for the VXLAN network on HUAWEI CloudEngine devices.
* [ce\_vxlan\_global](ce_vxlan_global_module#ansible-collections-community-network-ce-vxlan-global-module) – Manages global attributes of VXLAN and bridge domain on HUAWEI CloudEngine devices.
* [ce\_vxlan\_tunnel](ce_vxlan_tunnel_module#ansible-collections-community-network-ce-vxlan-tunnel-module) – Manages VXLAN tunnel configuration on HUAWEI CloudEngine devices.
* [ce\_vxlan\_vap](ce_vxlan_vap_module#ansible-collections-community-network-ce-vxlan-vap-module) – Manages VXLAN virtual access point on HUAWEI CloudEngine Devices.
* [cnos\_backup](cnos_backup_module#ansible-collections-community-network-cnos-backup-module) – Backup the current running or startup configuration to a remote server on devices running Lenovo CNOS
* [cnos\_banner](cnos_banner_module#ansible-collections-community-network-cnos-banner-module) – Manage multiline banners on Lenovo CNOS devices
* [cnos\_bgp](cnos_bgp_module#ansible-collections-community-network-cnos-bgp-module) – Manage BGP resources and attributes on devices running CNOS
* [cnos\_command](cnos_command_module#ansible-collections-community-network-cnos-command-module) – Run arbitrary commands on Lenovo CNOS devices
* [cnos\_conditional\_command](cnos_conditional_command_module#ansible-collections-community-network-cnos-conditional-command-module) – Execute a single command based on condition on devices running Lenovo CNOS
* [cnos\_conditional\_template](cnos_conditional_template_module#ansible-collections-community-network-cnos-conditional-template-module) – Manage switch configuration using templates based on condition on devices running Lenovo CNOS
* [cnos\_config](cnos_config_module#ansible-collections-community-network-cnos-config-module) – Manage Lenovo CNOS configuration sections
* [cnos\_factory](cnos_factory_module#ansible-collections-community-network-cnos-factory-module) – Reset the switch startup configuration to default (factory) on devices running Lenovo CNOS.
* [cnos\_facts](cnos_facts_module#ansible-collections-community-network-cnos-facts-module) – Collect facts from remote devices running Lenovo CNOS
* [cnos\_image](cnos_image_module#ansible-collections-community-network-cnos-image-module) – Perform firmware upgrade/download from a remote server on devices running Lenovo CNOS
* [cnos\_interface](cnos_interface_module#ansible-collections-community-network-cnos-interface-module) – Manage Interface on Lenovo CNOS network devices
* [cnos\_l2\_interface](cnos_l2_interface_module#ansible-collections-community-network-cnos-l2-interface-module) – Manage Layer-2 interface on Lenovo CNOS devices.
* [cnos\_l3\_interface](cnos_l3_interface_module#ansible-collections-community-network-cnos-l3-interface-module) – Manage Layer-3 interfaces on Lenovo CNOS network devices.
* [cnos\_linkagg](cnos_linkagg_module#ansible-collections-community-network-cnos-linkagg-module) – Manage link aggregation groups on Lenovo CNOS devices
* [cnos\_lldp](cnos_lldp_module#ansible-collections-community-network-cnos-lldp-module) – Manage LLDP configuration on Lenovo CNOS network devices.
* [cnos\_logging](cnos_logging_module#ansible-collections-community-network-cnos-logging-module) – Manage logging on network devices
* [cnos\_reload](cnos_reload_module#ansible-collections-community-network-cnos-reload-module) – Perform switch restart on devices running Lenovo CNOS
* [cnos\_rollback](cnos_rollback_module#ansible-collections-community-network-cnos-rollback-module) – Roll back the running or startup configuration from a remote server on devices running Lenovo CNOS
* [cnos\_save](cnos_save_module#ansible-collections-community-network-cnos-save-module) – Save the running configuration as the startup configuration on devices running Lenovo CNOS
* [cnos\_showrun](cnos_showrun_module#ansible-collections-community-network-cnos-showrun-module) – Collect the current running configuration on devices running on CNOS
* [cnos\_static\_route](cnos_static_route_module#ansible-collections-community-network-cnos-static-route-module) – Manage static IP routes on Lenovo CNOS network devices
* [cnos\_system](cnos_system_module#ansible-collections-community-network-cnos-system-module) – Manage the system attributes on Lenovo CNOS devices
* [cnos\_template](cnos_template_module#ansible-collections-community-network-cnos-template-module) – Manage switch configuration using templates on devices running Lenovo CNOS
* [cnos\_user](cnos_user_module#ansible-collections-community-network-cnos-user-module) – Manage the collection of local users on Lenovo CNOS devices
* [cnos\_vlag](cnos_vlag_module#ansible-collections-community-network-cnos-vlag-module) – Manage VLAG resources and attributes on devices running Lenovo CNOS
* [cnos\_vlan](cnos_vlan_module#ansible-collections-community-network-cnos-vlan-module) – Manage VLANs on CNOS network devices
* [cnos\_vrf](cnos_vrf_module#ansible-collections-community-network-cnos-vrf-module) – Manage VRFs on Lenovo CNOS network devices
* [cv\_server\_provision](cv_server_provision_module#ansible-collections-community-network-cv-server-provision-module) – Provision server port by applying or removing template configuration to an Arista CloudVision Portal configlet that is applied to a switch.
* [dladm\_etherstub](dladm_etherstub_module#ansible-collections-community-network-dladm-etherstub-module) – Manage etherstubs on Solaris/illumos systems.
* [dladm\_iptun](dladm_iptun_module#ansible-collections-community-network-dladm-iptun-module) – Manage IP tunnel interfaces on Solaris/illumos systems.
* [dladm\_linkprop](dladm_linkprop_module#ansible-collections-community-network-dladm-linkprop-module) – Manage link properties on Solaris/illumos systems.
* [dladm\_vlan](dladm_vlan_module#ansible-collections-community-network-dladm-vlan-module) – Manage VLAN interfaces on Solaris/illumos systems.
* [dladm\_vnic](dladm_vnic_module#ansible-collections-community-network-dladm-vnic-module) – Manage VNICs on Solaris/illumos systems.
* [edgeos\_command](edgeos_command_module#ansible-collections-community-network-edgeos-command-module) – Run one or more commands on EdgeOS devices
* [edgeos\_config](edgeos_config_module#ansible-collections-community-network-edgeos-config-module) – Manage EdgeOS configuration on remote device
* [edgeos\_facts](edgeos_facts_module#ansible-collections-community-network-edgeos-facts-module) – Collect facts from remote devices running EdgeOS
* [edgeswitch\_facts](edgeswitch_facts_module#ansible-collections-community-network-edgeswitch-facts-module) – Collect facts from remote devices running Edgeswitch
* [edgeswitch\_vlan](edgeswitch_vlan_module#ansible-collections-community-network-edgeswitch-vlan-module) – Manage VLANs on Ubiquiti Edgeswitch network devices
* [enos\_command](enos_command_module#ansible-collections-community-network-enos-command-module) – Run arbitrary commands on Lenovo ENOS devices
* [enos\_config](enos_config_module#ansible-collections-community-network-enos-config-module) – Manage Lenovo ENOS configuration sections
* [enos\_facts](enos_facts_module#ansible-collections-community-network-enos-facts-module) – Collect facts from remote devices running Lenovo ENOS
* [eric\_eccli\_command](eric_eccli_command_module#ansible-collections-community-network-eric-eccli-command-module) – Run commands on remote devices running ERICSSON ECCLI
* [exos\_command](exos_command_module#ansible-collections-community-network-exos-command-module) – Run commands on remote devices running Extreme EXOS
* [exos\_config](exos_config_module#ansible-collections-community-network-exos-config-module) – Manage Extreme Networks EXOS configuration sections
* [exos\_facts](exos_facts_module#ansible-collections-community-network-exos-facts-module) – Collect facts from devices running Extreme EXOS
* [exos\_l2\_interfaces](exos_l2_interfaces_module#ansible-collections-community-network-exos-l2-interfaces-module) – Manage L2 interfaces on Extreme Networks EXOS devices.
* [exos\_lldp\_global](exos_lldp_global_module#ansible-collections-community-network-exos-lldp-global-module) – Configure and manage Link Layer Discovery Protocol(LLDP) attributes on EXOS platforms.
* [exos\_lldp\_interfaces](exos_lldp_interfaces_module#ansible-collections-community-network-exos-lldp-interfaces-module) – Manage link layer discovery protocol (LLDP) attributes of interfaces on EXOS platforms.
* [exos\_vlans](exos_vlans_module#ansible-collections-community-network-exos-vlans-module) – Manage VLANs on Extreme Networks EXOS devices.
* [flowadm](flowadm_module#ansible-collections-community-network-flowadm-module) – Manage bandwidth resource control and priority for protocols, services and zones on Solaris/illumos systems
* [ftd\_configuration](ftd_configuration_module#ansible-collections-community-network-ftd-configuration-module) – Manages configuration on Cisco FTD devices over REST API
* [ftd\_file\_download](ftd_file_download_module#ansible-collections-community-network-ftd-file-download-module) – Downloads files from Cisco FTD devices over HTTP(S)
* [ftd\_file\_upload](ftd_file_upload_module#ansible-collections-community-network-ftd-file-upload-module) – Uploads files to Cisco FTD devices over HTTP(S)
* [ftd\_install](ftd_install_module#ansible-collections-community-network-ftd-install-module) – Installs FTD pkg image on the firewall
* [iap\_start\_workflow](iap_start_workflow_module#ansible-collections-community-network-iap-start-workflow-module) – Start a workflow in the Itential Automation Platform
* [iap\_token](iap_token_module#ansible-collections-community-network-iap-token-module) – Get token for the Itential Automation Platform
* [icx\_banner](icx_banner_module#ansible-collections-community-network-icx-banner-module) – Manage multiline banners on Ruckus ICX 7000 series switches
* [icx\_command](icx_command_module#ansible-collections-community-network-icx-command-module) – Run arbitrary commands on remote Ruckus ICX 7000 series switches
* [icx\_config](icx_config_module#ansible-collections-community-network-icx-config-module) – Manage configuration sections of Ruckus ICX 7000 series switches
* [icx\_copy](icx_copy_module#ansible-collections-community-network-icx-copy-module) – Transfer files from or to remote Ruckus ICX 7000 series switches
* [icx\_facts](icx_facts_module#ansible-collections-community-network-icx-facts-module) – Collect facts from remote Ruckus ICX 7000 series switches
* [icx\_interface](icx_interface_module#ansible-collections-community-network-icx-interface-module) – Manage Interface on Ruckus ICX 7000 series switches
* [icx\_l3\_interface](icx_l3_interface_module#ansible-collections-community-network-icx-l3-interface-module) – Manage Layer-3 interfaces on Ruckus ICX 7000 series switches
* [icx\_linkagg](icx_linkagg_module#ansible-collections-community-network-icx-linkagg-module) – Manage link aggregation groups on Ruckus ICX 7000 series switches
* [icx\_lldp](icx_lldp_module#ansible-collections-community-network-icx-lldp-module) – Manage LLDP configuration on Ruckus ICX 7000 series switches
* [icx\_logging](icx_logging_module#ansible-collections-community-network-icx-logging-module) – Manage logging on Ruckus ICX 7000 series switches
* [icx\_ping](icx_ping_module#ansible-collections-community-network-icx-ping-module) – Tests reachability using ping from Ruckus ICX 7000 series switches
* [icx\_static\_route](icx_static_route_module#ansible-collections-community-network-icx-static-route-module) – Manage static IP routes on Ruckus ICX 7000 series switches
* [icx\_system](icx_system_module#ansible-collections-community-network-icx-system-module) – Manage the system attributes on Ruckus ICX 7000 series switches
* [icx\_user](icx_user_module#ansible-collections-community-network-icx-user-module) – Manage the user accounts on Ruckus ICX 7000 series switches.
* [icx\_vlan](icx_vlan_module#ansible-collections-community-network-icx-vlan-module) – Manage VLANs on Ruckus ICX 7000 series switches
* [ig\_config](ig_config_module#ansible-collections-community-network-ig-config-module) – Manage the configuration database on an Ingate SBC.
* [ig\_unit\_information](ig_unit_information_module#ansible-collections-community-network-ig-unit-information-module) – Get unit information from an Ingate SBC.
* [ipadm\_addr](ipadm_addr_module#ansible-collections-community-network-ipadm-addr-module) – Manage IP addresses on an interface on Solaris/illumos systems
* [ipadm\_addrprop](ipadm_addrprop_module#ansible-collections-community-network-ipadm-addrprop-module) – Manage IP address properties on Solaris/illumos systems.
* [ipadm\_if](ipadm_if_module#ansible-collections-community-network-ipadm-if-module) – Manage IP interfaces on Solaris/illumos systems.
* [ipadm\_ifprop](ipadm_ifprop_module#ansible-collections-community-network-ipadm-ifprop-module) – Manage IP interface properties on Solaris/illumos systems.
* [ipadm\_prop](ipadm_prop_module#ansible-collections-community-network-ipadm-prop-module) – Manage protocol properties on Solaris/illumos systems.
* [ironware\_command](ironware_command_module#ansible-collections-community-network-ironware-command-module) – Run arbitrary commands on Extreme IronWare devices
* [ironware\_config](ironware_config_module#ansible-collections-community-network-ironware-config-module) – Manage configuration sections on Extreme Ironware devices
* [ironware\_facts](ironware_facts_module#ansible-collections-community-network-ironware-facts-module) – Collect facts from devices running Extreme Ironware
* [nclu](nclu_module#ansible-collections-community-network-nclu-module) – Configure network interfaces using NCLU
* [netact\_cm\_command](netact_cm_command_module#ansible-collections-community-network-netact-cm-command-module) – Manage network configuration data in Nokia Core and Radio networks
* [netscaler\_cs\_action](netscaler_cs_action_module#ansible-collections-community-network-netscaler-cs-action-module) – Manage content switching actions
* [netscaler\_cs\_policy](netscaler_cs_policy_module#ansible-collections-community-network-netscaler-cs-policy-module) – Manage content switching policy
* [netscaler\_cs\_vserver](netscaler_cs_vserver_module#ansible-collections-community-network-netscaler-cs-vserver-module) – Manage content switching vserver
* [netscaler\_gslb\_service](netscaler_gslb_service_module#ansible-collections-community-network-netscaler-gslb-service-module) – Manage gslb service entities in Netscaler.
* [netscaler\_gslb\_site](netscaler_gslb_site_module#ansible-collections-community-network-netscaler-gslb-site-module) – Manage gslb site entities in Netscaler.
* [netscaler\_gslb\_vserver](netscaler_gslb_vserver_module#ansible-collections-community-network-netscaler-gslb-vserver-module) – Configure gslb vserver entities in Netscaler.
* [netscaler\_lb\_monitor](netscaler_lb_monitor_module#ansible-collections-community-network-netscaler-lb-monitor-module) – Manage load balancing monitors
* [netscaler\_lb\_vserver](netscaler_lb_vserver_module#ansible-collections-community-network-netscaler-lb-vserver-module) – Manage load balancing vserver configuration
* [netscaler\_nitro\_request](netscaler_nitro_request_module#ansible-collections-community-network-netscaler-nitro-request-module) – Issue Nitro API requests to a Netscaler instance.
* [netscaler\_save\_config](netscaler_save_config_module#ansible-collections-community-network-netscaler-save-config-module) – Save Netscaler configuration.
* [netscaler\_server](netscaler_server_module#ansible-collections-community-network-netscaler-server-module) – Manage server configuration
* [netscaler\_service](netscaler_service_module#ansible-collections-community-network-netscaler-service-module) – Manage service configuration in Netscaler
* [netscaler\_servicegroup](netscaler_servicegroup_module#ansible-collections-community-network-netscaler-servicegroup-module) – Manage service group configuration in Netscaler
* [netscaler\_ssl\_certkey](netscaler_ssl_certkey_module#ansible-collections-community-network-netscaler-ssl-certkey-module) – Manage ssl certificate keys.
* [nos\_command](nos_command_module#ansible-collections-community-network-nos-command-module) – Run commands on remote devices running Extreme Networks NOS
* [nos\_config](nos_config_module#ansible-collections-community-network-nos-config-module) – Manage Extreme Networks NOS configuration sections
* [nos\_facts](nos_facts_module#ansible-collections-community-network-nos-facts-module) – Collect facts from devices running Extreme NOS
* [nuage\_vspk](nuage_vspk_module#ansible-collections-community-network-nuage-vspk-module) – Manage Nuage VSP environments
* [opx\_cps](opx_cps_module#ansible-collections-community-network-opx-cps-module) – CPS operations on networking device running Openswitch (OPX)
* [ordnance\_config](ordnance_config_module#ansible-collections-community-network-ordnance-config-module) – Manage Ordnance configuration sections
* [ordnance\_facts](ordnance_facts_module#ansible-collections-community-network-ordnance-facts-module) – Collect facts from Ordnance Virtual Routers over SSH
* [pn\_access\_list](pn_access_list_module#ansible-collections-community-network-pn-access-list-module) – CLI command to create/delete access-list
* [pn\_access\_list\_ip](pn_access_list_ip_module#ansible-collections-community-network-pn-access-list-ip-module) – CLI command to add/remove access-list-ip
* [pn\_admin\_service](pn_admin_service_module#ansible-collections-community-network-pn-admin-service-module) – CLI command to modify admin-service
* [pn\_admin\_session\_timeout](pn_admin_session_timeout_module#ansible-collections-community-network-pn-admin-session-timeout-module) – CLI command to modify admin-session-timeout
* [pn\_admin\_syslog](pn_admin_syslog_module#ansible-collections-community-network-pn-admin-syslog-module) – CLI command to create/modify/delete admin-syslog
* [pn\_connection\_stats\_settings](pn_connection_stats_settings_module#ansible-collections-community-network-pn-connection-stats-settings-module) – CLI command to modify connection-stats-settings
* [pn\_cpu\_class](pn_cpu_class_module#ansible-collections-community-network-pn-cpu-class-module) – CLI command to create/modify/delete cpu-class
* [pn\_cpu\_mgmt\_class](pn_cpu_mgmt_class_module#ansible-collections-community-network-pn-cpu-mgmt-class-module) – CLI command to modify cpu-mgmt-class
* [pn\_dhcp\_filter](pn_dhcp_filter_module#ansible-collections-community-network-pn-dhcp-filter-module) – CLI command to create/modify/delete dhcp-filter
* [pn\_dscp\_map](pn_dscp_map_module#ansible-collections-community-network-pn-dscp-map-module) – CLI command to create/delete dscp-map
* [pn\_dscp\_map\_pri\_map](pn_dscp_map_pri_map_module#ansible-collections-community-network-pn-dscp-map-pri-map-module) – CLI command to modify dscp-map-pri-map
* [pn\_fabric\_local](pn_fabric_local_module#ansible-collections-community-network-pn-fabric-local-module) – CLI command to modify fabric-local
* [pn\_igmp\_snooping](pn_igmp_snooping_module#ansible-collections-community-network-pn-igmp-snooping-module) – CLI command to modify igmp-snooping
* [pn\_ipv6security\_raguard](pn_ipv6security_raguard_module#ansible-collections-community-network-pn-ipv6security-raguard-module) – CLI command to create/modify/delete ipv6security-raguard
* [pn\_ipv6security\_raguard\_port](pn_ipv6security_raguard_port_module#ansible-collections-community-network-pn-ipv6security-raguard-port-module) – CLI command to add/remove ipv6security-raguard-port
* [pn\_ipv6security\_raguard\_vlan](pn_ipv6security_raguard_vlan_module#ansible-collections-community-network-pn-ipv6security-raguard-vlan-module) – CLI command to add/remove ipv6security-raguard-vlan
* [pn\_log\_audit\_exception](pn_log_audit_exception_module#ansible-collections-community-network-pn-log-audit-exception-module) – CLI command to create/delete an audit exception
* [pn\_port\_config](pn_port_config_module#ansible-collections-community-network-pn-port-config-module) – CLI command to modify port-config
* [pn\_port\_cos\_bw](pn_port_cos_bw_module#ansible-collections-community-network-pn-port-cos-bw-module) – CLI command to modify port-cos-bw
* [pn\_port\_cos\_rate\_setting](pn_port_cos_rate_setting_module#ansible-collections-community-network-pn-port-cos-rate-setting-module) – CLI command to modify port-cos-rate-setting
* [pn\_prefix\_list](pn_prefix_list_module#ansible-collections-community-network-pn-prefix-list-module) – CLI command to create/delete prefix-list
* [pn\_prefix\_list\_network](pn_prefix_list_network_module#ansible-collections-community-network-pn-prefix-list-network-module) – CLI command to add/remove prefix-list-network
* [pn\_role](pn_role_module#ansible-collections-community-network-pn-role-module) – CLI command to create/delete/modify role
* [pn\_snmp\_community](pn_snmp_community_module#ansible-collections-community-network-pn-snmp-community-module) – CLI command to create/modify/delete snmp-community
* [pn\_snmp\_trap\_sink](pn_snmp_trap_sink_module#ansible-collections-community-network-pn-snmp-trap-sink-module) – CLI command to create/delete snmp-trap-sink
* [pn\_snmp\_vacm](pn_snmp_vacm_module#ansible-collections-community-network-pn-snmp-vacm-module) – CLI command to create/modify/delete snmp-vacm
* [pn\_stp](pn_stp_module#ansible-collections-community-network-pn-stp-module) – CLI command to modify stp
* [pn\_stp\_port](pn_stp_port_module#ansible-collections-community-network-pn-stp-port-module) – CLI command to modify stp-port.
* [pn\_switch\_setup](pn_switch_setup_module#ansible-collections-community-network-pn-switch-setup-module) – CLI command to modify switch-setup
* [pn\_user](pn_user_module#ansible-collections-community-network-pn-user-module) – CLI command to create/modify/delete user
* [pn\_vflow\_table\_profile](pn_vflow_table_profile_module#ansible-collections-community-network-pn-vflow-table-profile-module) – CLI command to modify vflow-table-profile
* [pn\_vrouter\_bgp](pn_vrouter_bgp_module#ansible-collections-community-network-pn-vrouter-bgp-module) – CLI command to add/modify/remove vrouter-bgp
* [pn\_vrouter\_bgp\_network](pn_vrouter_bgp_network_module#ansible-collections-community-network-pn-vrouter-bgp-network-module) – CLI command to add/remove vrouter-bgp-network
* [pn\_vrouter\_interface\_ip](pn_vrouter_interface_ip_module#ansible-collections-community-network-pn-vrouter-interface-ip-module) – CLI command to add/remove vrouter-interface-ip
* [pn\_vrouter\_loopback\_interface](pn_vrouter_loopback_interface_module#ansible-collections-community-network-pn-vrouter-loopback-interface-module) – CLI command to add/remove vrouter-loopback-interface
* [pn\_vrouter\_ospf](pn_vrouter_ospf_module#ansible-collections-community-network-pn-vrouter-ospf-module) – CLI command to add/remove vrouter-ospf
* [pn\_vrouter\_ospf6](pn_vrouter_ospf6_module#ansible-collections-community-network-pn-vrouter-ospf6-module) – CLI command to add/remove vrouter-ospf6
* [pn\_vrouter\_packet\_relay](pn_vrouter_packet_relay_module#ansible-collections-community-network-pn-vrouter-packet-relay-module) – CLI command to add/remove vrouter-packet-relay
* [pn\_vrouter\_pim\_config](pn_vrouter_pim_config_module#ansible-collections-community-network-pn-vrouter-pim-config-module) – CLI command to modify vrouter-pim-config
* [pn\_vtep](pn_vtep_module#ansible-collections-community-network-pn-vtep-module) – CLI command to create/delete vtep
* [slxos\_command](slxos_command_module#ansible-collections-community-network-slxos-command-module) – Run commands on remote devices running Extreme Networks SLX-OS
* [slxos\_config](slxos_config_module#ansible-collections-community-network-slxos-config-module) – Manage Extreme Networks SLX-OS configuration sections
* [slxos\_facts](slxos_facts_module#ansible-collections-community-network-slxos-facts-module) – Collect facts from devices running Extreme SLX-OS
* [slxos\_interface](slxos_interface_module#ansible-collections-community-network-slxos-interface-module) – Manage Interfaces on Extreme SLX-OS network devices
* [slxos\_l2\_interface](slxos_l2_interface_module#ansible-collections-community-network-slxos-l2-interface-module) – Manage Layer-2 interface on Extreme Networks SLX-OS devices.
* [slxos\_l3\_interface](slxos_l3_interface_module#ansible-collections-community-network-slxos-l3-interface-module) – Manage L3 interfaces on Extreme Networks SLX-OS network devices.
* [slxos\_linkagg](slxos_linkagg_module#ansible-collections-community-network-slxos-linkagg-module) – Manage link aggregation groups on Extreme Networks SLX-OS network devices
* [slxos\_lldp](slxos_lldp_module#ansible-collections-community-network-slxos-lldp-module) – Manage LLDP configuration on Extreme Networks SLX-OS network devices.
* [slxos\_vlan](slxos_vlan_module#ansible-collections-community-network-slxos-vlan-module) – Manage VLANs on Extreme Networks SLX-OS network devices
* [sros\_command](sros_command_module#ansible-collections-community-network-sros-command-module) – Run commands on remote devices running Nokia SR OS
* [sros\_config](sros_config_module#ansible-collections-community-network-sros-config-module) – Manage Nokia SR OS device configuration
* [sros\_rollback](sros_rollback_module#ansible-collections-community-network-sros-rollback-module) – Configure Nokia SR OS rollback
* [vdirect\_commit](vdirect_commit_module#ansible-collections-community-network-vdirect-commit-module) – Commits pending configuration changes on Radware devices
* [vdirect\_file](vdirect_file_module#ansible-collections-community-network-vdirect-file-module) – Uploads a new or updates an existing runnable file into Radware vDirect server
* [vdirect\_runnable](vdirect_runnable_module#ansible-collections-community-network-vdirect-runnable-module) – Runs templates and workflow actions in Radware vDirect server
* [voss\_command](voss_command_module#ansible-collections-community-network-voss-command-module) – Run commands on remote devices running Extreme VOSS
* [voss\_config](voss_config_module#ansible-collections-community-network-voss-config-module) – Manage Extreme VOSS configuration sections
* [voss\_facts](voss_facts_module#ansible-collections-community-network-voss-facts-module) – Collect facts from remote devices running Extreme VOSS

 ### Netconf Plugins

 * [ce](ce_netconf#ansible-collections-community-network-ce-netconf) – Use ce netconf plugin to run netconf commands on Huawei Cloudengine platform

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/network/index.html>

Community.Postgresql
====================

 Collection version 1.5.0

 Plugin Index
------------

 These are the plugins in the community.postgresql collection

 ### Modules

 * [postgresql\_copy](postgresql_copy_module#ansible-collections-community-postgresql-postgresql-copy-module) – Copy data between a file/program and a PostgreSQL table
* [postgresql\_db](postgresql_db_module#ansible-collections-community-postgresql-postgresql-db-module) – Add or remove PostgreSQL databases from a remote host
* [postgresql\_ext](postgresql_ext_module#ansible-collections-community-postgresql-postgresql-ext-module) – Add or remove PostgreSQL extensions from a database
* [postgresql\_idx](postgresql_idx_module#ansible-collections-community-postgresql-postgresql-idx-module) – Create or drop indexes from a PostgreSQL database
* [postgresql\_info](postgresql_info_module#ansible-collections-community-postgresql-postgresql-info-module) – Gather information about PostgreSQL servers
* [postgresql\_lang](postgresql_lang_module#ansible-collections-community-postgresql-postgresql-lang-module) – Adds, removes or changes procedural languages with a PostgreSQL database
* [postgresql\_membership](postgresql_membership_module#ansible-collections-community-postgresql-postgresql-membership-module) – Add or remove PostgreSQL roles from groups
* [postgresql\_owner](postgresql_owner_module#ansible-collections-community-postgresql-postgresql-owner-module) – Change an owner of PostgreSQL database object
* [postgresql\_pg\_hba](postgresql_pg_hba_module#ansible-collections-community-postgresql-postgresql-pg-hba-module) – Add, remove or modify a rule in a pg\_hba file
* [postgresql\_ping](postgresql_ping_module#ansible-collections-community-postgresql-postgresql-ping-module) – Check remote PostgreSQL server availability
* [postgresql\_privs](postgresql_privs_module#ansible-collections-community-postgresql-postgresql-privs-module) – Grant or revoke privileges on PostgreSQL database objects
* [postgresql\_publication](postgresql_publication_module#ansible-collections-community-postgresql-postgresql-publication-module) – Add, update, or remove PostgreSQL publication
* [postgresql\_query](postgresql_query_module#ansible-collections-community-postgresql-postgresql-query-module) – Run PostgreSQL queries
* [postgresql\_schema](postgresql_schema_module#ansible-collections-community-postgresql-postgresql-schema-module) – Add or remove PostgreSQL schema
* [postgresql\_sequence](postgresql_sequence_module#ansible-collections-community-postgresql-postgresql-sequence-module) – Create, drop, or alter a PostgreSQL sequence
* [postgresql\_set](postgresql_set_module#ansible-collections-community-postgresql-postgresql-set-module) – Change a PostgreSQL server configuration parameter
* [postgresql\_slot](postgresql_slot_module#ansible-collections-community-postgresql-postgresql-slot-module) – Add or remove replication slots from a PostgreSQL database
* [postgresql\_subscription](postgresql_subscription_module#ansible-collections-community-postgresql-postgresql-subscription-module) – Add, update, or remove PostgreSQL subscription
* [postgresql\_table](postgresql_table_module#ansible-collections-community-postgresql-postgresql-table-module) – Create, drop, or modify a PostgreSQL table
* [postgresql\_tablespace](postgresql_tablespace_module#ansible-collections-community-postgresql-postgresql-tablespace-module) – Add or remove PostgreSQL tablespaces from remote hosts
* [postgresql\_user](postgresql_user_module#ansible-collections-community-postgresql-postgresql-user-module) – Create, alter, or remove a user (role) from a PostgreSQL server instance
* [postgresql\_user\_obj\_stat\_info](postgresql_user_obj_stat_info_module#ansible-collections-community-postgresql-postgresql-user-obj-stat-info-module) – Gather statistics about PostgreSQL user objects

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/postgresql/index.html>

Community.Proxysql
==================

 Collection version 1.3.0

 Plugin Index
------------

 These are the plugins in the community.proxysql collection

 ### Modules

 * [proxysql\_backend\_servers](proxysql_backend_servers_module#ansible-collections-community-proxysql-proxysql-backend-servers-module) – Adds or removes mysql hosts from proxysql admin interface
* [proxysql\_global\_variables](proxysql_global_variables_module#ansible-collections-community-proxysql-proxysql-global-variables-module) – Gets or sets the proxysql global variables
* [proxysql\_info](proxysql_info_module#ansible-collections-community-proxysql-proxysql-info-module) – Gathers information about proxysql server
* [proxysql\_manage\_config](proxysql_manage_config_module#ansible-collections-community-proxysql-proxysql-manage-config-module) – Writes the proxysql configuration settings between layers
* [proxysql\_mysql\_users](proxysql_mysql_users_module#ansible-collections-community-proxysql-proxysql-mysql-users-module) – Adds or removes mysql users from proxysql admin interface
* [proxysql\_query\_rules](proxysql_query_rules_module#ansible-collections-community-proxysql-proxysql-query-rules-module) – Modifies query rules using the proxysql admin interface
* [proxysql\_query\_rules\_fast\_routing](proxysql_query_rules_fast_routing_module#ansible-collections-community-proxysql-proxysql-query-rules-fast-routing-module) – Modifies query rules for fast routing policies using the proxysql admin interface
* [proxysql\_replication\_hostgroups](proxysql_replication_hostgroups_module#ansible-collections-community-proxysql-proxysql-replication-hostgroups-module) – Manages replication hostgroups using the proxysql admin interface
* [proxysql\_scheduler](proxysql_scheduler_module#ansible-collections-community-proxysql-proxysql-scheduler-module) – Adds or removes schedules from proxysql admin interface

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/proxysql/index.html>

Community.Skydive
=================

 Collection version 1.0.0

 Plugin Index
------------

 These are the plugins in the community.skydive collection

 ### Lookup Plugins

 * [skydive](skydive_lookup#ansible-collections-community-skydive-skydive-lookup) – Query Skydive objects

 ### Modules

 * [skydive\_capture](skydive_capture_module#ansible-collections-community-skydive-skydive-capture-module) – Module which manages flow capture on interfaces
* [skydive\_edge](skydive_edge_module#ansible-collections-community-skydive-skydive-edge-module) – Module to add edges to Skydive topology
* [skydive\_node](skydive_node_module#ansible-collections-community-skydive-skydive-node-module) – Module which add nodes to Skydive topology

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/skydive/index.html>

Community.Sops
==============

 Collection version 1.1.0

 Scenario Guide
--------------

 * [Protecting Ansible secrets with Mozilla SOPS](docsite/guide)

 Plugin Index
------------

 These are the plugins in the community.sops collection

 ### Lookup Plugins

 * [sops](sops_lookup#ansible-collections-community-sops-sops-lookup) – Read sops encrypted file contents

 ### Modules

 * [load\_vars](load_vars_module#ansible-collections-community-sops-load-vars-module) – Load sops-encrypted variables from files, dynamically within a task
* [sops\_encrypt](sops_encrypt_module#ansible-collections-community-sops-sops-encrypt-module) – Encrypt data with sops

 ### Vars Plugins

 * [sops](sops_vars#ansible-collections-community-sops-sops-vars) – Loading sops-encrypted vars files

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/sops/index.html>

Community.Vmware
================

 Collection version 1.15.0

 Scenario Guide
--------------

 * [VMware Guide](docsite/scenario_guide)

 Plugin Index
------------

 These are the plugins in the community.vmware collection

 ### Connection Plugins

 * [vmware\_tools](vmware_tools_connection#ansible-collections-community-vmware-vmware-tools-connection) – Execute tasks inside a VM via VMware Tools

 ### Httpapi Plugins

 * [vmware](vmware_httpapi#ansible-collections-community-vmware-vmware-httpapi) – HttpApi Plugin for VMware REST API

 ### Inventory Plugins

 * [vmware\_host\_inventory](vmware_host_inventory_inventory#ansible-collections-community-vmware-vmware-host-inventory-inventory) – VMware ESXi hostsystem inventory source
* [vmware\_vm\_inventory](vmware_vm_inventory_inventory#ansible-collections-community-vmware-vmware-vm-inventory-inventory) – VMware Guest inventory source

 ### Modules

 * [vca\_fw](vca_fw_module#ansible-collections-community-vmware-vca-fw-module) – add remove firewall rules in a gateway in a vca
* [vca\_nat](vca_nat_module#ansible-collections-community-vmware-vca-nat-module) – add remove nat rules in a gateway in a vca
* [vca\_vapp](vca_vapp_module#ansible-collections-community-vmware-vca-vapp-module) – Manages vCloud Air vApp instances.
* [vcenter\_domain\_user\_group\_info](vcenter_domain_user_group_info_module#ansible-collections-community-vmware-vcenter-domain-user-group-info-module) – Gather user or group information of a domain
* [vcenter\_extension](vcenter_extension_module#ansible-collections-community-vmware-vcenter-extension-module) – Register/deregister vCenter Extensions
* [vcenter\_extension\_facts](vcenter_extension_facts_module#ansible-collections-community-vmware-vcenter-extension-facts-module) – Gather facts vCenter extensions
* [vcenter\_extension\_info](vcenter_extension_info_module#ansible-collections-community-vmware-vcenter-extension-info-module) – Gather info vCenter extensions
* [vcenter\_folder](vcenter_folder_module#ansible-collections-community-vmware-vcenter-folder-module) – Manage folders on given datacenter
* [vcenter\_license](vcenter_license_module#ansible-collections-community-vmware-vcenter-license-module) – Manage VMware vCenter license keys
* [vmware\_about\_facts](vmware_about_facts_module#ansible-collections-community-vmware-vmware-about-facts-module) – Provides information about VMware server to which user is connecting to
* [vmware\_about\_info](vmware_about_info_module#ansible-collections-community-vmware-vmware-about-info-module) – Provides information about VMware server to which user is connecting to
* [vmware\_category](vmware_category_module#ansible-collections-community-vmware-vmware-category-module) – Manage VMware categories
* [vmware\_category\_facts](vmware_category_facts_module#ansible-collections-community-vmware-vmware-category-facts-module) – Gather facts about VMware tag categories
* [vmware\_category\_info](vmware_category_info_module#ansible-collections-community-vmware-vmware-category-info-module) – Gather info about VMware tag categories
* [vmware\_cfg\_backup](vmware_cfg_backup_module#ansible-collections-community-vmware-vmware-cfg-backup-module) – Backup / Restore / Reset ESXi host configuration
* [vmware\_cluster](vmware_cluster_module#ansible-collections-community-vmware-vmware-cluster-module) – Manage VMware vSphere clusters
* [vmware\_cluster\_drs](vmware_cluster_drs_module#ansible-collections-community-vmware-vmware-cluster-drs-module) – Manage Distributed Resource Scheduler (DRS) on VMware vSphere clusters
* [vmware\_cluster\_ha](vmware_cluster_ha_module#ansible-collections-community-vmware-vmware-cluster-ha-module) – Manage High Availability (HA) on VMware vSphere clusters
* [vmware\_cluster\_info](vmware_cluster_info_module#ansible-collections-community-vmware-vmware-cluster-info-module) – Gather info about clusters available in given vCenter
* [vmware\_cluster\_vsan](vmware_cluster_vsan_module#ansible-collections-community-vmware-vmware-cluster-vsan-module) – Manages virtual storage area network (vSAN) configuration on VMware vSphere clusters
* [vmware\_content\_deploy\_ovf\_template](vmware_content_deploy_ovf_template_module#ansible-collections-community-vmware-vmware-content-deploy-ovf-template-module) – Deploy Virtual Machine from ovf template stored in content library.
* [vmware\_content\_deploy\_template](vmware_content_deploy_template_module#ansible-collections-community-vmware-vmware-content-deploy-template-module) – Deploy Virtual Machine from template stored in content library.
* [vmware\_content\_library\_info](vmware_content_library_info_module#ansible-collections-community-vmware-vmware-content-library-info-module) – Gather information about VMWare Content Library
* [vmware\_content\_library\_manager](vmware_content_library_manager_module#ansible-collections-community-vmware-vmware-content-library-manager-module) – Create, update and delete VMware content library
* [vmware\_datacenter](vmware_datacenter_module#ansible-collections-community-vmware-vmware-datacenter-module) – Manage VMware vSphere Datacenters
* [vmware\_datacenter\_info](vmware_datacenter_info_module#ansible-collections-community-vmware-vmware-datacenter-info-module) – Gather information about VMware vSphere Datacenters
* [vmware\_datastore\_cluster](vmware_datastore_cluster_module#ansible-collections-community-vmware-vmware-datastore-cluster-module) – Manage VMware vSphere datastore clusters
* [vmware\_datastore\_cluster\_manager](vmware_datastore_cluster_manager_module#ansible-collections-community-vmware-vmware-datastore-cluster-manager-module) – Manage VMware vSphere datastore cluster’s members
* [vmware\_datastore\_info](vmware_datastore_info_module#ansible-collections-community-vmware-vmware-datastore-info-module) – Gather info about datastores available in given vCenter
* [vmware\_datastore\_maintenancemode](vmware_datastore_maintenancemode_module#ansible-collections-community-vmware-vmware-datastore-maintenancemode-module) – Place a datastore into maintenance mode
* [vmware\_deploy\_ovf](vmware_deploy_ovf_module#ansible-collections-community-vmware-vmware-deploy-ovf-module) – Deploys a VMware virtual machine from an OVF or OVA file
* [vmware\_dns\_config](vmware_dns_config_module#ansible-collections-community-vmware-vmware-dns-config-module) – Manage VMware ESXi DNS Configuration
* [vmware\_drs\_group](vmware_drs_group_module#ansible-collections-community-vmware-vmware-drs-group-module) – Creates vm/host group in a given cluster.
* [vmware\_drs\_group\_facts](vmware_drs_group_facts_module#ansible-collections-community-vmware-vmware-drs-group-facts-module) – Gathers facts about DRS VM/Host groups on the given cluster
* [vmware\_drs\_group\_info](vmware_drs_group_info_module#ansible-collections-community-vmware-vmware-drs-group-info-module) – Gathers info about DRS VM/Host groups on the given cluster
* [vmware\_drs\_group\_manager](vmware_drs_group_manager_module#ansible-collections-community-vmware-vmware-drs-group-manager-module) – Manage VMs and Hosts in DRS group.
* [vmware\_drs\_rule\_facts](vmware_drs_rule_facts_module#ansible-collections-community-vmware-vmware-drs-rule-facts-module) – Gathers facts about DRS rule on the given cluster
* [vmware\_drs\_rule\_info](vmware_drs_rule_info_module#ansible-collections-community-vmware-vmware-drs-rule-info-module) – Gathers info about DRS rule on the given cluster
* [vmware\_dvs\_host](vmware_dvs_host_module#ansible-collections-community-vmware-vmware-dvs-host-module) – Add or remove a host from distributed virtual switch
* [vmware\_dvs\_portgroup](vmware_dvs_portgroup_module#ansible-collections-community-vmware-vmware-dvs-portgroup-module) – Create or remove a Distributed vSwitch portgroup.
* [vmware\_dvs\_portgroup\_facts](vmware_dvs_portgroup_facts_module#ansible-collections-community-vmware-vmware-dvs-portgroup-facts-module) – Gathers facts DVS portgroup configurations
* [vmware\_dvs\_portgroup\_find](vmware_dvs_portgroup_find_module#ansible-collections-community-vmware-vmware-dvs-portgroup-find-module) – Find portgroup(s) in a VMware environment
* [vmware\_dvs\_portgroup\_info](vmware_dvs_portgroup_info_module#ansible-collections-community-vmware-vmware-dvs-portgroup-info-module) – Gathers info DVS portgroup configurations
* [vmware\_dvswitch](vmware_dvswitch_module#ansible-collections-community-vmware-vmware-dvswitch-module) – Create or remove a Distributed Switch
* [vmware\_dvswitch\_info](vmware_dvswitch_info_module#ansible-collections-community-vmware-vmware-dvswitch-info-module) – Gathers info dvswitch configurations
* [vmware\_dvswitch\_lacp](vmware_dvswitch_lacp_module#ansible-collections-community-vmware-vmware-dvswitch-lacp-module) – Manage LACP configuration on a Distributed Switch
* [vmware\_dvswitch\_nioc](vmware_dvswitch_nioc_module#ansible-collections-community-vmware-vmware-dvswitch-nioc-module) – Manage distributed switch Network IO Control
* [vmware\_dvswitch\_pvlans](vmware_dvswitch_pvlans_module#ansible-collections-community-vmware-vmware-dvswitch-pvlans-module) – Manage Private VLAN configuration of a Distributed Switch
* [vmware\_dvswitch\_uplink\_pg](vmware_dvswitch_uplink_pg_module#ansible-collections-community-vmware-vmware-dvswitch-uplink-pg-module) – Manage uplink portproup configuration of a Distributed Switch
* [vmware\_evc\_mode](vmware_evc_mode_module#ansible-collections-community-vmware-vmware-evc-mode-module) – Enable/Disable EVC mode on vCenter
* [vmware\_export\_ovf](vmware_export_ovf_module#ansible-collections-community-vmware-vmware-export-ovf-module) – Exports a VMware virtual machine to an OVF file, device files and a manifest file
* [vmware\_first\_class\_disk](vmware_first_class_disk_module#ansible-collections-community-vmware-vmware-first-class-disk-module) – Manage VMware vSphere First Class Disks
* [vmware\_folder\_info](vmware_folder_info_module#ansible-collections-community-vmware-vmware-folder-info-module) – Provides information about folders in a datacenter
* [vmware\_guest](vmware_guest_module#ansible-collections-community-vmware-vmware-guest-module) – Manages virtual machines in vCenter
* [vmware\_guest\_boot\_facts](vmware_guest_boot_facts_module#ansible-collections-community-vmware-vmware-guest-boot-facts-module) – Gather facts about boot options for the given virtual machine
* [vmware\_guest\_boot\_info](vmware_guest_boot_info_module#ansible-collections-community-vmware-vmware-guest-boot-info-module) – Gather info about boot options for the given virtual machine
* [vmware\_guest\_boot\_manager](vmware_guest_boot_manager_module#ansible-collections-community-vmware-vmware-guest-boot-manager-module) – Manage boot options for the given virtual machine
* [vmware\_guest\_controller](vmware_guest_controller_module#ansible-collections-community-vmware-vmware-guest-controller-module) – Manage disk or USB controllers related to virtual machine in given vCenter infrastructure
* [vmware\_guest\_cross\_vc\_clone](vmware_guest_cross_vc_clone_module#ansible-collections-community-vmware-vmware-guest-cross-vc-clone-module) – Cross-vCenter VM/template clone
* [vmware\_guest\_custom\_attribute\_defs](vmware_guest_custom_attribute_defs_module#ansible-collections-community-vmware-vmware-guest-custom-attribute-defs-module) – Manage custom attributes definitions for virtual machine from VMware
* [vmware\_guest\_custom\_attributes](vmware_guest_custom_attributes_module#ansible-collections-community-vmware-vmware-guest-custom-attributes-module) – Manage custom attributes from VMware for the given virtual machine
* [vmware\_guest\_customization\_facts](vmware_guest_customization_facts_module#ansible-collections-community-vmware-vmware-guest-customization-facts-module) – Gather facts about VM customization specifications
* [vmware\_guest\_customization\_info](vmware_guest_customization_info_module#ansible-collections-community-vmware-vmware-guest-customization-info-module) – Gather info about VM customization specifications
* [vmware\_guest\_disk](vmware_guest_disk_module#ansible-collections-community-vmware-vmware-guest-disk-module) – Manage disks related to virtual machine in given vCenter infrastructure
* [vmware\_guest\_disk\_facts](vmware_guest_disk_facts_module#ansible-collections-community-vmware-vmware-guest-disk-facts-module) – Gather facts about disks of given virtual machine
* [vmware\_guest\_disk\_info](vmware_guest_disk_info_module#ansible-collections-community-vmware-vmware-guest-disk-info-module) – Gather info about disks of given virtual machine
* [vmware\_guest\_file\_operation](vmware_guest_file_operation_module#ansible-collections-community-vmware-vmware-guest-file-operation-module) – Files operation in a VMware guest operating system without network
* [vmware\_guest\_find](vmware_guest_find_module#ansible-collections-community-vmware-vmware-guest-find-module) – Find the folder path(s) for a virtual machine by name or UUID
* [vmware\_guest\_info](vmware_guest_info_module#ansible-collections-community-vmware-vmware-guest-info-module) – Gather info about a single VM
* [vmware\_guest\_instant\_clone](vmware_guest_instant_clone_module#ansible-collections-community-vmware-vmware-guest-instant-clone-module) – Instant Clone VM
* [vmware\_guest\_move](vmware_guest_move_module#ansible-collections-community-vmware-vmware-guest-move-module) – Moves virtual machines in vCenter
* [vmware\_guest\_network](vmware_guest_network_module#ansible-collections-community-vmware-vmware-guest-network-module) – Manage network adapters of specified virtual machine in given vCenter infrastructure
* [vmware\_guest\_powerstate](vmware_guest_powerstate_module#ansible-collections-community-vmware-vmware-guest-powerstate-module) – Manages power states of virtual machines in vCenter
* [vmware\_guest\_register\_operation](vmware_guest_register_operation_module#ansible-collections-community-vmware-vmware-guest-register-operation-module) – VM inventory registration operation
* [vmware\_guest\_screenshot](vmware_guest_screenshot_module#ansible-collections-community-vmware-vmware-guest-screenshot-module) – Create a screenshot of the Virtual Machine console.
* [vmware\_guest\_sendkey](vmware_guest_sendkey_module#ansible-collections-community-vmware-vmware-guest-sendkey-module) – Send USB HID codes to the Virtual Machine’s keyboard.
* [vmware\_guest\_serial\_port](vmware_guest_serial_port_module#ansible-collections-community-vmware-vmware-guest-serial-port-module) – Manage serial ports on an existing VM
* [vmware\_guest\_snapshot](vmware_guest_snapshot_module#ansible-collections-community-vmware-vmware-guest-snapshot-module) – Manages virtual machines snapshots in vCenter
* [vmware\_guest\_snapshot\_info](vmware_guest_snapshot_info_module#ansible-collections-community-vmware-vmware-guest-snapshot-info-module) – Gather info about virtual machine’s snapshots in vCenter
* [vmware\_guest\_storage\_policy](vmware_guest_storage_policy_module#ansible-collections-community-vmware-vmware-guest-storage-policy-module) – Set VM Home and disk(s) storage policy profiles.
* [vmware\_guest\_tools\_info](vmware_guest_tools_info_module#ansible-collections-community-vmware-vmware-guest-tools-info-module) – Gather info about VMware tools installed in VM
* [vmware\_guest\_tools\_upgrade](vmware_guest_tools_upgrade_module#ansible-collections-community-vmware-vmware-guest-tools-upgrade-module) – Module to upgrade VMTools
* [vmware\_guest\_tools\_wait](vmware_guest_tools_wait_module#ansible-collections-community-vmware-vmware-guest-tools-wait-module) – Wait for VMware tools to become available
* [vmware\_guest\_video](vmware_guest_video_module#ansible-collections-community-vmware-vmware-guest-video-module) – Modify video card configurations of specified virtual machine in given vCenter infrastructure
* [vmware\_guest\_vnc](vmware_guest_vnc_module#ansible-collections-community-vmware-vmware-guest-vnc-module) – Manages VNC remote display on virtual machines in vCenter
* [vmware\_host](vmware_host_module#ansible-collections-community-vmware-vmware-host-module) – Add, remove, or move an ESXi host to, from, or within vCenter
* [vmware\_host\_acceptance](vmware_host_acceptance_module#ansible-collections-community-vmware-vmware-host-acceptance-module) – Manage the host acceptance level of an ESXi host
* [vmware\_host\_active\_directory](vmware_host_active_directory_module#ansible-collections-community-vmware-vmware-host-active-directory-module) – Joins an ESXi host system to an Active Directory domain or leaves it
* [vmware\_host\_auto\_start](vmware_host_auto_start_module#ansible-collections-community-vmware-vmware-host-auto-start-module) – Manage the auto power ON or OFF for vm on ESXi host
* [vmware\_host\_capability\_facts](vmware_host_capability_facts_module#ansible-collections-community-vmware-vmware-host-capability-facts-module) – Gathers facts about an ESXi host’s capability information
* [vmware\_host\_capability\_info](vmware_host_capability_info_module#ansible-collections-community-vmware-vmware-host-capability-info-module) – Gathers info about an ESXi host’s capability information
* [vmware\_host\_config\_facts](vmware_host_config_facts_module#ansible-collections-community-vmware-vmware-host-config-facts-module) – Gathers facts about an ESXi host’s advance configuration information
* [vmware\_host\_config\_info](vmware_host_config_info_module#ansible-collections-community-vmware-vmware-host-config-info-module) – Gathers info about an ESXi host’s advance configuration information
* [vmware\_host\_config\_manager](vmware_host_config_manager_module#ansible-collections-community-vmware-vmware-host-config-manager-module) – Manage advanced system settings of an ESXi host
* [vmware\_host\_custom\_attributes](vmware_host_custom_attributes_module#ansible-collections-community-vmware-vmware-host-custom-attributes-module) – Manage custom attributes from VMware for the given ESXi host
* [vmware\_host\_datastore](vmware_host_datastore_module#ansible-collections-community-vmware-vmware-host-datastore-module) – Manage a datastore on ESXi host
* [vmware\_host\_disk\_info](vmware_host_disk_info_module#ansible-collections-community-vmware-vmware-host-disk-info-module) – Gathers information about disks attached to given ESXi host/s.
* [vmware\_host\_dns](vmware_host_dns_module#ansible-collections-community-vmware-vmware-host-dns-module) – Manage DNS configuration of an ESXi host system
* [vmware\_host\_dns\_facts](vmware_host_dns_facts_module#ansible-collections-community-vmware-vmware-host-dns-facts-module) – Gathers facts about an ESXi host’s DNS configuration information
* [vmware\_host\_dns\_info](vmware_host_dns_info_module#ansible-collections-community-vmware-vmware-host-dns-info-module) – Gathers info about an ESXi host’s DNS configuration information
* [vmware\_host\_facts](vmware_host_facts_module#ansible-collections-community-vmware-vmware-host-facts-module) – Gathers facts about remote ESXi hostsystem
* [vmware\_host\_feature\_facts](vmware_host_feature_facts_module#ansible-collections-community-vmware-vmware-host-feature-facts-module) – Gathers facts about an ESXi host’s feature capability information
* [vmware\_host\_feature\_info](vmware_host_feature_info_module#ansible-collections-community-vmware-vmware-host-feature-info-module) – Gathers info about an ESXi host’s feature capability information
* [vmware\_host\_firewall\_facts](vmware_host_firewall_facts_module#ansible-collections-community-vmware-vmware-host-firewall-facts-module) – Gathers facts about an ESXi host’s firewall configuration information
* [vmware\_host\_firewall\_info](vmware_host_firewall_info_module#ansible-collections-community-vmware-vmware-host-firewall-info-module) – Gathers info about an ESXi host’s firewall configuration information
* [vmware\_host\_firewall\_manager](vmware_host_firewall_manager_module#ansible-collections-community-vmware-vmware-host-firewall-manager-module) – Manage firewall configurations about an ESXi host
* [vmware\_host\_hyperthreading](vmware_host_hyperthreading_module#ansible-collections-community-vmware-vmware-host-hyperthreading-module) – Enables/Disables Hyperthreading optimization for an ESXi host system
* [vmware\_host\_ipv6](vmware_host_ipv6_module#ansible-collections-community-vmware-vmware-host-ipv6-module) – Enables/Disables IPv6 support for an ESXi host system
* [vmware\_host\_iscsi](vmware_host_iscsi_module#ansible-collections-community-vmware-vmware-host-iscsi-module) – Manage the iSCSI configuration of ESXi host
* [vmware\_host\_iscsi\_info](vmware_host_iscsi_info_module#ansible-collections-community-vmware-vmware-host-iscsi-info-module) – Gather iSCSI configuration information of ESXi host
* [vmware\_host\_kernel\_manager](vmware_host_kernel_manager_module#ansible-collections-community-vmware-vmware-host-kernel-manager-module) – Manage kernel module options on ESXi hosts
* [vmware\_host\_lockdown](vmware_host_lockdown_module#ansible-collections-community-vmware-vmware-host-lockdown-module) – Manage administrator permission for the local administrative account for the ESXi host
* [vmware\_host\_logbundle](vmware_host_logbundle_module#ansible-collections-community-vmware-vmware-host-logbundle-module) – Fetch logbundle file from ESXi
* [vmware\_host\_logbundle\_info](vmware_host_logbundle_info_module#ansible-collections-community-vmware-vmware-host-logbundle-info-module) – Gathers manifest info for logbundle
* [vmware\_host\_ntp](vmware_host_ntp_module#ansible-collections-community-vmware-vmware-host-ntp-module) – Manage NTP server configuration of an ESXi host
* [vmware\_host\_ntp\_facts](vmware_host_ntp_facts_module#ansible-collections-community-vmware-vmware-host-ntp-facts-module) – Gathers facts about NTP configuration on an ESXi host
* [vmware\_host\_ntp\_info](vmware_host_ntp_info_module#ansible-collections-community-vmware-vmware-host-ntp-info-module) – Gathers info about NTP configuration on an ESXi host
* [vmware\_host\_package\_facts](vmware_host_package_facts_module#ansible-collections-community-vmware-vmware-host-package-facts-module) – Gathers facts about available packages on an ESXi host
* [vmware\_host\_package\_info](vmware_host_package_info_module#ansible-collections-community-vmware-vmware-host-package-info-module) – Gathers info about available packages on an ESXi host
* [vmware\_host\_passthrough](vmware_host_passthrough_module#ansible-collections-community-vmware-vmware-host-passthrough-module) – Manage PCI device passthrough settings on host
* [vmware\_host\_powermgmt\_policy](vmware_host_powermgmt_policy_module#ansible-collections-community-vmware-vmware-host-powermgmt-policy-module) – Manages the Power Management Policy of an ESXI host system
* [vmware\_host\_powerstate](vmware_host_powerstate_module#ansible-collections-community-vmware-vmware-host-powerstate-module) – Manages power states of host systems in vCenter
* [vmware\_host\_scanhba](vmware_host_scanhba_module#ansible-collections-community-vmware-vmware-host-scanhba-module) – Rescan host HBA’s and optionally refresh the storage system
* [vmware\_host\_scsidisk\_info](vmware_host_scsidisk_info_module#ansible-collections-community-vmware-vmware-host-scsidisk-info-module) – Gather information about SCSI disk attached to the given ESXi
* [vmware\_host\_service\_facts](vmware_host_service_facts_module#ansible-collections-community-vmware-vmware-host-service-facts-module) – Gathers facts about an ESXi host’s services
* [vmware\_host\_service\_info](vmware_host_service_info_module#ansible-collections-community-vmware-vmware-host-service-info-module) – Gathers info about an ESXi host’s services
* [vmware\_host\_service\_manager](vmware_host_service_manager_module#ansible-collections-community-vmware-vmware-host-service-manager-module) – Manage services on a given ESXi host
* [vmware\_host\_snmp](vmware_host_snmp_module#ansible-collections-community-vmware-vmware-host-snmp-module) – Configures SNMP on an ESXi host system
* [vmware\_host\_sriov](vmware_host_sriov_module#ansible-collections-community-vmware-vmware-host-sriov-module) – Manage SR-IOV settings on host
* [vmware\_host\_ssl\_facts](vmware_host_ssl_facts_module#ansible-collections-community-vmware-vmware-host-ssl-facts-module) – Gather facts of ESXi host system about SSL
* [vmware\_host\_ssl\_info](vmware_host_ssl_info_module#ansible-collections-community-vmware-vmware-host-ssl-info-module) – Gather info of ESXi host system about SSL
* [vmware\_host\_tcpip\_stacks](vmware_host_tcpip_stacks_module#ansible-collections-community-vmware-vmware-host-tcpip-stacks-module) – Manage the TCP/IP Stacks configuration of ESXi host
* [vmware\_host\_vmhba\_facts](vmware_host_vmhba_facts_module#ansible-collections-community-vmware-vmware-host-vmhba-facts-module) – Gathers facts about vmhbas available on the given ESXi host
* [vmware\_host\_vmhba\_info](vmware_host_vmhba_info_module#ansible-collections-community-vmware-vmware-host-vmhba-info-module) – Gathers info about vmhbas available on the given ESXi host
* [vmware\_host\_vmnic\_facts](vmware_host_vmnic_facts_module#ansible-collections-community-vmware-vmware-host-vmnic-facts-module) – Gathers facts about vmnics available on the given ESXi host
* [vmware\_host\_vmnic\_info](vmware_host_vmnic_info_module#ansible-collections-community-vmware-vmware-host-vmnic-info-module) – Gathers info about vmnics available on the given ESXi host
* [vmware\_local\_role\_facts](vmware_local_role_facts_module#ansible-collections-community-vmware-vmware-local-role-facts-module) – Gather facts about local roles on an ESXi host
* [vmware\_local\_role\_info](vmware_local_role_info_module#ansible-collections-community-vmware-vmware-local-role-info-module) – Gather info about local roles on an ESXi host
* [vmware\_local\_role\_manager](vmware_local_role_manager_module#ansible-collections-community-vmware-vmware-local-role-manager-module) – Manage local roles on an ESXi host
* [vmware\_local\_user\_facts](vmware_local_user_facts_module#ansible-collections-community-vmware-vmware-local-user-facts-module) – Gather facts about users on the given ESXi host
* [vmware\_local\_user\_info](vmware_local_user_info_module#ansible-collections-community-vmware-vmware-local-user-info-module) – Gather info about users on the given ESXi host
* [vmware\_local\_user\_manager](vmware_local_user_manager_module#ansible-collections-community-vmware-vmware-local-user-manager-module) – Manage local users on an ESXi host
* [vmware\_maintenancemode](vmware_maintenancemode_module#ansible-collections-community-vmware-vmware-maintenancemode-module) – Place a host into maintenance mode
* [vmware\_migrate\_vmk](vmware_migrate_vmk_module#ansible-collections-community-vmware-vmware-migrate-vmk-module) – Migrate a VMK interface from VSS to VDS
* [vmware\_object\_custom\_attributes\_info](vmware_object_custom_attributes_info_module#ansible-collections-community-vmware-vmware-object-custom-attributes-info-module) – Gather custom attributes of an object
* [vmware\_object\_rename](vmware_object_rename_module#ansible-collections-community-vmware-vmware-object-rename-module) – Renames VMware objects
* [vmware\_object\_role\_permission](vmware_object_role_permission_module#ansible-collections-community-vmware-vmware-object-role-permission-module) – Manage local roles on an ESXi host
* [vmware\_object\_role\_permission\_info](vmware_object_role_permission_info_module#ansible-collections-community-vmware-vmware-object-role-permission-info-module) – Gather information about object’s permissions
* [vmware\_portgroup](vmware_portgroup_module#ansible-collections-community-vmware-vmware-portgroup-module) – Create a VMware portgroup
* [vmware\_portgroup\_facts](vmware_portgroup_facts_module#ansible-collections-community-vmware-vmware-portgroup-facts-module) – Gathers facts about an ESXi host’s Port Group configuration
* [vmware\_portgroup\_info](vmware_portgroup_info_module#ansible-collections-community-vmware-vmware-portgroup-info-module) – Gathers info about an ESXi host’s Port Group configuration
* [vmware\_recommended\_datastore](vmware_recommended_datastore_module#ansible-collections-community-vmware-vmware-recommended-datastore-module) – Returns the recommended datastore from a SDRS-enabled datastore cluster
* [vmware\_resource\_pool](vmware_resource_pool_module#ansible-collections-community-vmware-vmware-resource-pool-module) – Add/remove resource pools to/from vCenter
* [vmware\_resource\_pool\_facts](vmware_resource_pool_facts_module#ansible-collections-community-vmware-vmware-resource-pool-facts-module) – Gathers facts about resource pool information
* [vmware\_resource\_pool\_info](vmware_resource_pool_info_module#ansible-collections-community-vmware-vmware-resource-pool-info-module) – Gathers info about resource pool information
* [vmware\_tag](vmware_tag_module#ansible-collections-community-vmware-vmware-tag-module) – Manage VMware tags
* [vmware\_tag\_info](vmware_tag_info_module#ansible-collections-community-vmware-vmware-tag-info-module) – Manage VMware tag info
* [vmware\_tag\_manager](vmware_tag_manager_module#ansible-collections-community-vmware-vmware-tag-manager-module) – Manage association of VMware tags with VMware objects
* [vmware\_target\_canonical\_facts](vmware_target_canonical_facts_module#ansible-collections-community-vmware-vmware-target-canonical-facts-module) – Return canonical (NAA) from an ESXi host system
* [vmware\_target\_canonical\_info](vmware_target_canonical_info_module#ansible-collections-community-vmware-vmware-target-canonical-info-module) – Return canonical (NAA) from an ESXi host system
* [vmware\_vc\_infraprofile\_info](vmware_vc_infraprofile_info_module#ansible-collections-community-vmware-vmware-vc-infraprofile-info-module) – List and Export VMware vCenter infra profile configs.
* [vmware\_vcenter\_settings](vmware_vcenter_settings_module#ansible-collections-community-vmware-vmware-vcenter-settings-module) – Configures general settings on a vCenter server
* [vmware\_vcenter\_settings\_info](vmware_vcenter_settings_info_module#ansible-collections-community-vmware-vmware-vcenter-settings-info-module) – Gather info vCenter settings
* [vmware\_vcenter\_statistics](vmware_vcenter_statistics_module#ansible-collections-community-vmware-vmware-vcenter-statistics-module) – Configures statistics on a vCenter server
* [vmware\_vm\_config\_option](vmware_vm_config_option_module#ansible-collections-community-vmware-vmware-vm-config-option-module) – Return supported guest ID list and VM recommended config option for specific guest OS
* [vmware\_vm\_host\_drs\_rule](vmware_vm_host_drs_rule_module#ansible-collections-community-vmware-vmware-vm-host-drs-rule-module) – Creates vm/host group in a given cluster
* [vmware\_vm\_info](vmware_vm_info_module#ansible-collections-community-vmware-vmware-vm-info-module) – Return basic info pertaining to a VMware machine guest
* [vmware\_vm\_shell](vmware_vm_shell_module#ansible-collections-community-vmware-vmware-vm-shell-module) – Run commands in a VMware guest operating system
* [vmware\_vm\_storage\_policy](vmware_vm_storage_policy_module#ansible-collections-community-vmware-vmware-vm-storage-policy-module) – Create vSphere storage policies
* [vmware\_vm\_storage\_policy\_info](vmware_vm_storage_policy_info_module#ansible-collections-community-vmware-vmware-vm-storage-policy-info-module) – Gather information about vSphere storage profile defined storage policy information.
* [vmware\_vm\_vm\_drs\_rule](vmware_vm_vm_drs_rule_module#ansible-collections-community-vmware-vmware-vm-vm-drs-rule-module) – Configure VMware DRS Affinity rule for virtual machines in the given cluster
* [vmware\_vm\_vss\_dvs\_migrate](vmware_vm_vss_dvs_migrate_module#ansible-collections-community-vmware-vmware-vm-vss-dvs-migrate-module) – Migrates a virtual machine from a standard vswitch to distributed
* [vmware\_vmkernel](vmware_vmkernel_module#ansible-collections-community-vmware-vmware-vmkernel-module) – Manages a VMware VMkernel Adapter of an ESXi host.
* [vmware\_vmkernel\_facts](vmware_vmkernel_facts_module#ansible-collections-community-vmware-vmware-vmkernel-facts-module) – Gathers VMKernel facts about an ESXi host
* [vmware\_vmkernel\_info](vmware_vmkernel_info_module#ansible-collections-community-vmware-vmware-vmkernel-info-module) – Gathers VMKernel info about an ESXi host
* [vmware\_vmkernel\_ip\_config](vmware_vmkernel_ip_config_module#ansible-collections-community-vmware-vmware-vmkernel-ip-config-module) – Configure the VMkernel IP Address
* [vmware\_vmotion](vmware_vmotion_module#ansible-collections-community-vmware-vmware-vmotion-module) – Move a virtual machine using vMotion, and/or its vmdks using storage vMotion.
* [vmware\_vsan\_cluster](vmware_vsan_cluster_module#ansible-collections-community-vmware-vmware-vsan-cluster-module) – Configure VSAN clustering on an ESXi host
* [vmware\_vsan\_health\_info](vmware_vsan_health_info_module#ansible-collections-community-vmware-vmware-vsan-health-info-module) – Gather information about a VMware vSAN cluster’s health
* [vmware\_vspan\_session](vmware_vspan_session_module#ansible-collections-community-vmware-vmware-vspan-session-module) – Create or remove a Port Mirroring session.
* [vmware\_vswitch](vmware_vswitch_module#ansible-collections-community-vmware-vmware-vswitch-module) – Manage a VMware Standard Switch to an ESXi host.
* [vmware\_vswitch\_facts](vmware_vswitch_facts_module#ansible-collections-community-vmware-vmware-vswitch-facts-module) – Gathers facts about an ESXi host’s vswitch configurations
* [vmware\_vswitch\_info](vmware_vswitch_info_module#ansible-collections-community-vmware-vmware-vswitch-info-module) – Gathers info about an ESXi host’s vswitch configurations
* [vsphere\_copy](vsphere_copy_module#ansible-collections-community-vmware-vsphere-copy-module) – Copy a file to a VMware datastore
* [vsphere\_file](vsphere_file_module#ansible-collections-community-vmware-vsphere-file-module) – Manage files on a vCenter datastore

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/vmware/index.html>

Community.Windows
=================

 Collection version 1.7.0

 Plugin Index
------------

 These are the plugins in the community.windows collection

 ### Lookup Plugins

 * [laps\_password](laps_password_lookup#ansible-collections-community-windows-laps-password-lookup) – Retrieves the LAPS password for a server.

 ### Modules

 * [psexec](psexec_module#ansible-collections-community-windows-psexec-module) – Runs commands on a remote Windows host based on the PsExec model
* [win\_audit\_policy\_system](win_audit_policy_system_module#ansible-collections-community-windows-win-audit-policy-system-module) – Used to make changes to the system wide Audit Policy
* [win\_audit\_rule](win_audit_rule_module#ansible-collections-community-windows-win-audit-rule-module) – Adds an audit rule to files, folders, or registry keys
* [win\_auto\_logon](win_auto_logon_module#ansible-collections-community-windows-win-auto-logon-module) – Adds or Sets auto logon registry keys.
* [win\_certificate\_info](win_certificate_info_module#ansible-collections-community-windows-win-certificate-info-module) – Get information on certificates from a Windows Certificate Store
* [win\_computer\_description](win_computer_description_module#ansible-collections-community-windows-win-computer-description-module) – Set windows description, owner and organization
* [win\_credential](win_credential_module#ansible-collections-community-windows-win-credential-module) – Manages Windows Credentials in the Credential Manager
* [win\_data\_deduplication](win_data_deduplication_module#ansible-collections-community-windows-win-data-deduplication-module) – Module to enable Data Deduplication on a volume.
* [win\_defrag](win_defrag_module#ansible-collections-community-windows-win-defrag-module) – Consolidate fragmented files on local volumes
* [win\_dhcp\_lease](win_dhcp_lease_module#ansible-collections-community-windows-win-dhcp-lease-module) – Manage Windows Server DHCP Leases
* [win\_disk\_facts](win_disk_facts_module#ansible-collections-community-windows-win-disk-facts-module) – Show the attached disks and disk information of the target host
* [win\_disk\_image](win_disk_image_module#ansible-collections-community-windows-win-disk-image-module) – Manage ISO/VHD/VHDX mounts on Windows hosts
* [win\_dns\_record](win_dns_record_module#ansible-collections-community-windows-win-dns-record-module) – Manage Windows Server DNS records
* [win\_dns\_zone](win_dns_zone_module#ansible-collections-community-windows-win-dns-zone-module) – Manage Windows Server DNS Zones
* [win\_domain\_computer](win_domain_computer_module#ansible-collections-community-windows-win-domain-computer-module) – Manage computers in Active Directory
* [win\_domain\_group](win_domain_group_module#ansible-collections-community-windows-win-domain-group-module) – Creates, modifies or removes domain groups
* [win\_domain\_group\_membership](win_domain_group_membership_module#ansible-collections-community-windows-win-domain-group-membership-module) – Manage Windows domain group membership
* [win\_domain\_object\_info](win_domain_object_info_module#ansible-collections-community-windows-win-domain-object-info-module) – Gather information an Active Directory object
* [win\_domain\_user](win_domain_user_module#ansible-collections-community-windows-win-domain-user-module) – Manages Windows Active Directory user accounts
* [win\_dotnet\_ngen](win_dotnet_ngen_module#ansible-collections-community-windows-win-dotnet-ngen-module) – Runs ngen to recompile DLLs after .NET updates
* [win\_eventlog](win_eventlog_module#ansible-collections-community-windows-win-eventlog-module) – Manage Windows event logs
* [win\_eventlog\_entry](win_eventlog_entry_module#ansible-collections-community-windows-win-eventlog-entry-module) – Write entries to Windows event logs
* [win\_feature\_info](win_feature_info_module#ansible-collections-community-windows-win-feature-info-module) – Gather information about Windows features
* [win\_file\_compression](win_file_compression_module#ansible-collections-community-windows-win-file-compression-module) – Alters the compression of files and directories on NTFS partitions.
* [win\_file\_version](win_file_version_module#ansible-collections-community-windows-win-file-version-module) – Get DLL or EXE file build version
* [win\_firewall](win_firewall_module#ansible-collections-community-windows-win-firewall-module) – Enable or disable the Windows Firewall
* [win\_firewall\_rule](win_firewall_rule_module#ansible-collections-community-windows-win-firewall-rule-module) – Windows firewall automation
* [win\_format](win_format_module#ansible-collections-community-windows-win-format-module) – Formats an existing volume or a new volume on an existing partition on Windows
* [win\_hosts](win_hosts_module#ansible-collections-community-windows-win-hosts-module) – Manages hosts file entries on Windows.
* [win\_hotfix](win_hotfix_module#ansible-collections-community-windows-win-hotfix-module) – Install and uninstalls Windows hotfixes
* [win\_http\_proxy](win_http_proxy_module#ansible-collections-community-windows-win-http-proxy-module) – Manages proxy settings for WinHTTP
* [win\_iis\_virtualdirectory](win_iis_virtualdirectory_module#ansible-collections-community-windows-win-iis-virtualdirectory-module) – Configures a virtual directory in IIS
* [win\_iis\_webapplication](win_iis_webapplication_module#ansible-collections-community-windows-win-iis-webapplication-module) – Configures IIS web applications
* [win\_iis\_webapppool](win_iis_webapppool_module#ansible-collections-community-windows-win-iis-webapppool-module) – Configure IIS Web Application Pools
* [win\_iis\_webbinding](win_iis_webbinding_module#ansible-collections-community-windows-win-iis-webbinding-module) – Configures a IIS Web site binding
* [win\_iis\_website](win_iis_website_module#ansible-collections-community-windows-win-iis-website-module) – Configures a IIS Web site
* [win\_inet\_proxy](win_inet_proxy_module#ansible-collections-community-windows-win-inet-proxy-module) – Manages proxy settings for WinINet and Internet Explorer
* [win\_initialize\_disk](win_initialize_disk_module#ansible-collections-community-windows-win-initialize-disk-module) – Initializes disks on Windows Server
* [win\_lineinfile](win_lineinfile_module#ansible-collections-community-windows-win-lineinfile-module) – Ensure a particular line is in a file, or replace an existing line using a back-referenced regular expression
* [win\_mapped\_drive](win_mapped_drive_module#ansible-collections-community-windows-win-mapped-drive-module) – Map network drives for users
* [win\_msg](win_msg_module#ansible-collections-community-windows-win-msg-module) – Sends a message to logged in users on Windows hosts
* [win\_net\_adapter\_feature](win_net_adapter_feature_module#ansible-collections-community-windows-win-net-adapter-feature-module) – Enable or disable certain network adapters.
* [win\_netbios](win_netbios_module#ansible-collections-community-windows-win-netbios-module) – Manage NetBIOS over TCP/IP settings on Windows.
* [win\_nssm](win_nssm_module#ansible-collections-community-windows-win-nssm-module) – Install a service using NSSM
* [win\_pagefile](win_pagefile_module#ansible-collections-community-windows-win-pagefile-module) – Query or change pagefile configuration
* [win\_partition](win_partition_module#ansible-collections-community-windows-win-partition-module) – Creates, changes and removes partitions on Windows Server
* [win\_pester](win_pester_module#ansible-collections-community-windows-win-pester-module) – Run Pester tests on Windows hosts
* [win\_power\_plan](win_power_plan_module#ansible-collections-community-windows-win-power-plan-module) – Changes the power plan of a Windows system
* [win\_product\_facts](win_product_facts_module#ansible-collections-community-windows-win-product-facts-module) – Provides Windows product and license information
* [win\_psexec](win_psexec_module#ansible-collections-community-windows-win-psexec-module) – Runs commands (remotely) as another (privileged) user
* [win\_psmodule](win_psmodule_module#ansible-collections-community-windows-win-psmodule-module) – Adds or removes a Windows PowerShell module
* [win\_psmodule\_info](win_psmodule_info_module#ansible-collections-community-windows-win-psmodule-info-module) – Gather information about PowerShell Modules
* [win\_psrepository](win_psrepository_module#ansible-collections-community-windows-win-psrepository-module) – Adds, removes or updates a Windows PowerShell repository.
* [win\_psrepository\_copy](win_psrepository_copy_module#ansible-collections-community-windows-win-psrepository-copy-module) – Copies registered PSRepositories to other user profiles
* [win\_psrepository\_info](win_psrepository_info_module#ansible-collections-community-windows-win-psrepository-info-module) – Gather information about PSRepositories
* [win\_psscript](win_psscript_module#ansible-collections-community-windows-win-psscript-module) – Install and manage PowerShell scripts from a PSRepository
* [win\_psscript\_info](win_psscript_info_module#ansible-collections-community-windows-win-psscript-info-module) – Gather information about installed PowerShell Scripts
* [win\_pssession\_configuration](win_pssession_configuration_module#ansible-collections-community-windows-win-pssession-configuration-module) – Manage PSSession Configurations
* [win\_rabbitmq\_plugin](win_rabbitmq_plugin_module#ansible-collections-community-windows-win-rabbitmq-plugin-module) – Manage RabbitMQ plugins
* [win\_rds\_cap](win_rds_cap_module#ansible-collections-community-windows-win-rds-cap-module) – Manage Connection Authorization Policies (CAP) on a Remote Desktop Gateway server
* [win\_rds\_rap](win_rds_rap_module#ansible-collections-community-windows-win-rds-rap-module) – Manage Resource Authorization Policies (RAP) on a Remote Desktop Gateway server
* [win\_rds\_settings](win_rds_settings_module#ansible-collections-community-windows-win-rds-settings-module) – Manage main settings of a Remote Desktop Gateway server
* [win\_region](win_region_module#ansible-collections-community-windows-win-region-module) – Set the region and format settings
* [win\_regmerge](win_regmerge_module#ansible-collections-community-windows-win-regmerge-module) – Merges the contents of a registry file into the Windows registry
* [win\_robocopy](win_robocopy_module#ansible-collections-community-windows-win-robocopy-module) – Synchronizes the contents of two directories using Robocopy
* [win\_route](win_route_module#ansible-collections-community-windows-win-route-module) – Add or remove a static route
* [win\_say](win_say_module#ansible-collections-community-windows-win-say-module) – Text to speech module for Windows to speak messages and optionally play sounds
* [win\_scheduled\_task](win_scheduled_task_module#ansible-collections-community-windows-win-scheduled-task-module) – Manage scheduled tasks
* [win\_scheduled\_task\_stat](win_scheduled_task_stat_module#ansible-collections-community-windows-win-scheduled-task-stat-module) – Get information about Windows Scheduled Tasks
* [win\_scoop](win_scoop_module#ansible-collections-community-windows-win-scoop-module) – Manage packages using Scoop
* [win\_scoop\_bucket](win_scoop_bucket_module#ansible-collections-community-windows-win-scoop-bucket-module) – Manage Scoop buckets
* [win\_security\_policy](win_security_policy_module#ansible-collections-community-windows-win-security-policy-module) – Change local security policy settings
* [win\_shortcut](win_shortcut_module#ansible-collections-community-windows-win-shortcut-module) – Manage shortcuts on Windows
* [win\_snmp](win_snmp_module#ansible-collections-community-windows-win-snmp-module) – Configures the Windows SNMP service
* [win\_timezone](win_timezone_module#ansible-collections-community-windows-win-timezone-module) – Sets Windows machine timezone
* [win\_toast](win_toast_module#ansible-collections-community-windows-win-toast-module) – Sends Toast windows notification to logged in users on Windows 10 or later hosts
* [win\_unzip](win_unzip_module#ansible-collections-community-windows-win-unzip-module) – Unzips compressed files and archives on the Windows node
* [win\_user\_profile](win_user_profile_module#ansible-collections-community-windows-win-user-profile-module) – Manages the Windows user profiles.
* [win\_wait\_for\_process](win_wait_for_process_module#ansible-collections-community-windows-win-wait-for-process-module) – Waits for a process to exist or not exist before continuing.
* [win\_wakeonlan](win_wakeonlan_module#ansible-collections-community-windows-win-wakeonlan-module) – Send a magic Wake-on-LAN (WoL) broadcast packet
* [win\_webpicmd](win_webpicmd_module#ansible-collections-community-windows-win-webpicmd-module) – Installs packages using Web Platform Installer command-line
* [win\_xml](win_xml_module#ansible-collections-community-windows-win-xml-module) – Manages XML file content on Windows hosts
* [win\_zip](win_zip_module#ansible-collections-community-windows-win-zip-module) – Compress file or directory as zip archive on the Windows node

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/windows/index.html>

Community.Zabbix
================

 Collection version 1.5.0

 Plugin Index
------------

 These are the plugins in the community.zabbix collection

 ### Inventory Plugins

 * [zabbix\_inventory](zabbix_inventory_inventory#ansible-collections-community-zabbix-zabbix-inventory-inventory) – Zabbix Inventory Plugin

 ### Modules

 * [zabbix\_action](zabbix_action_module#ansible-collections-community-zabbix-zabbix-action-module) – Create/Delete/Update Zabbix actions
* [zabbix\_discovery\_rule](zabbix_discovery_rule_module#ansible-collections-community-zabbix-zabbix-discovery-rule-module) – Create/delete/update Zabbix discovery rules
* [zabbix\_globalmacro](zabbix_globalmacro_module#ansible-collections-community-zabbix-zabbix-globalmacro-module) – Create/update/delete Zabbix Global macros
* [zabbix\_group](zabbix_group_module#ansible-collections-community-zabbix-zabbix-group-module) – Create/delete Zabbix host groups
* [zabbix\_group\_info](zabbix_group_info_module#ansible-collections-community-zabbix-zabbix-group-info-module) – Gather information about Zabbix hostgroup
* [zabbix\_host](zabbix_host_module#ansible-collections-community-zabbix-zabbix-host-module) – Create/update/delete Zabbix hosts
* [zabbix\_host\_events\_info](zabbix_host_events_info_module#ansible-collections-community-zabbix-zabbix-host-events-info-module) – Get all triggers about a Zabbix host
* [zabbix\_host\_info](zabbix_host_info_module#ansible-collections-community-zabbix-zabbix-host-info-module) – Gather information about Zabbix host
* [zabbix\_hostmacro](zabbix_hostmacro_module#ansible-collections-community-zabbix-zabbix-hostmacro-module) – Create/update/delete Zabbix host macros
* [zabbix\_maintenance](zabbix_maintenance_module#ansible-collections-community-zabbix-zabbix-maintenance-module) – Create Zabbix maintenance windows
* [zabbix\_map](zabbix_map_module#ansible-collections-community-zabbix-zabbix-map-module) – Create/update/delete Zabbix maps
* [zabbix\_mediatype](zabbix_mediatype_module#ansible-collections-community-zabbix-zabbix-mediatype-module) – Create/Update/Delete Zabbix media types
* [zabbix\_proxy](zabbix_proxy_module#ansible-collections-community-zabbix-zabbix-proxy-module) – Create/delete/get/update Zabbix proxies
* [zabbix\_proxy\_info](zabbix_proxy_info_module#ansible-collections-community-zabbix-zabbix-proxy-info-module) – Gather information about Zabbix proxy
* [zabbix\_screen](zabbix_screen_module#ansible-collections-community-zabbix-zabbix-screen-module) – Create/update/delete Zabbix screens
* [zabbix\_service](zabbix_service_module#ansible-collections-community-zabbix-zabbix-service-module) – Create/update/delete Zabbix service
* [zabbix\_template](zabbix_template_module#ansible-collections-community-zabbix-zabbix-template-module) – Create/update/delete/dump Zabbix template
* [zabbix\_template\_info](zabbix_template_info_module#ansible-collections-community-zabbix-zabbix-template-info-module) – Gather information about Zabbix template
* [zabbix\_user](zabbix_user_module#ansible-collections-community-zabbix-zabbix-user-module) – Create/update/delete Zabbix users
* [zabbix\_user\_info](zabbix_user_info_module#ansible-collections-community-zabbix-zabbix-user-info-module) – Gather information about Zabbix user
* [zabbix\_usergroup](zabbix_usergroup_module#ansible-collections-community-zabbix-zabbix-usergroup-module) – Create/delete/update Zabbix user groups
* [zabbix\_valuemap](zabbix_valuemap_module#ansible-collections-community-zabbix-zabbix-valuemap-module) – Create/update/delete Zabbix value maps

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/zabbix/index.html>

Containers.Podman
=================

 Collection version 1.8.1

 Plugin Index
------------

 These are the plugins in the containers.podman collection

 ### Connection Plugins

 * [buildah](buildah_connection#ansible-collections-containers-podman-buildah-connection) – Interact with an existing buildah container
* [podman](podman_connection#ansible-collections-containers-podman-podman-connection) – Interact with an existing podman container

 ### Modules

 * [podman\_container](podman_container_module#ansible-collections-containers-podman-podman-container-module) – Manage podman containers
* [podman\_container\_info](podman_container_info_module#ansible-collections-containers-podman-podman-container-info-module) – Gather facts about containers using podman
* [podman\_containers](podman_containers_module#ansible-collections-containers-podman-podman-containers-module) – Manage podman containers in a batch
* [podman\_export](podman_export_module#ansible-collections-containers-podman-podman-export-module) – Export a podman container
* [podman\_image](podman_image_module#ansible-collections-containers-podman-podman-image-module) – Pull images for use by podman
* [podman\_image\_info](podman_image_info_module#ansible-collections-containers-podman-podman-image-info-module) – Gather info about images using podman
* [podman\_import](podman_import_module#ansible-collections-containers-podman-podman-import-module) – Import Podman container from a tar file.
* [podman\_load](podman_load_module#ansible-collections-containers-podman-podman-load-module) – Load image from a tar file.
* [podman\_login](podman_login_module#ansible-collections-containers-podman-podman-login-module) – Login to a container registry using podman
* [podman\_login\_info](podman_login_info_module#ansible-collections-containers-podman-podman-login-info-module) – Return the logged-in user if any for a given registry
* [podman\_logout](podman_logout_module#ansible-collections-containers-podman-podman-logout-module) – Log out of a container registry using podman
* [podman\_network](podman_network_module#ansible-collections-containers-podman-podman-network-module) – Manage podman networks
* [podman\_network\_info](podman_network_info_module#ansible-collections-containers-podman-podman-network-info-module) – Gather info about podman networks
* [podman\_play](podman_play_module#ansible-collections-containers-podman-podman-play-module) – Play kubernetes YAML file using podman
* [podman\_pod](podman_pod_module#ansible-collections-containers-podman-podman-pod-module) – Manage Podman pods
* [podman\_pod\_info](podman_pod_info_module#ansible-collections-containers-podman-podman-pod-info-module) – Gather info about podman pods
* [podman\_save](podman_save_module#ansible-collections-containers-podman-podman-save-module) – Saves podman image to tar file
* [podman\_secret](podman_secret_module#ansible-collections-containers-podman-podman-secret-module) – Manage podman secrets
* [podman\_volume](podman_volume_module#ansible-collections-containers-podman-podman-volume-module) – Manage Podman volumes
* [podman\_volume\_info](podman_volume_info_module#ansible-collections-containers-podman-podman-volume-info-module) – Gather info about podman volumes

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/containers/podman/index.html>

Cyberark.Conjur
===============

 Collection version 1.1.0

 Plugin Index
------------

 These are the plugins in the cyberark.conjur collection

 ### Lookup Plugins

 * [conjur\_variable](conjur_variable_lookup#ansible-collections-cyberark-conjur-conjur-variable-lookup) – Fetch credentials from CyberArk Conjur.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cyberark/conjur/index.html>

Cyberark.Pas
============

 Collection version 1.0.7

 Plugin Index
------------

 These are the plugins in the cyberark.pas collection

 ### Modules

 * [cyberark\_account](cyberark_account_module#ansible-collections-cyberark-pas-cyberark-account-module) – Module for CyberArk Account object creation, deletion, and modification using PAS Web Services SDK.
* [cyberark\_authentication](cyberark_authentication_module#ansible-collections-cyberark-pas-cyberark-authentication-module) – CyberArk Authentication using PAS Web Services SDK.
* [cyberark\_credential](cyberark_credential_module#ansible-collections-cyberark-pas-cyberark-credential-module) – Credential retrieval using AAM Central Credential Provider.
* [cyberark\_user](cyberark_user_module#ansible-collections-cyberark-pas-cyberark-user-module) – CyberArk User Management using PAS Web Services SDK.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cyberark/pas/index.html>

Dellemc.Enterprise\_Sonic
=========================

 Collection version 1.1.0

 Plugin Index
------------

 These are the plugins in the dellemc.enterprise\_sonic collection

 ### Cliconf Plugins

 * [sonic](sonic_cliconf#ansible-collections-dellemc-enterprise-sonic-sonic-cliconf) – Use sonic cliconf to run command on Dell OS10 platform

 ### Httpapi Plugins

 * [sonic](sonic_httpapi#ansible-collections-dellemc-enterprise-sonic-sonic-httpapi) – HttpApi Plugin for devices supporting Restconf SONIC API

 ### Modules

 * [sonic\_aaa](sonic_aaa_module#ansible-collections-dellemc-enterprise-sonic-sonic-aaa-module) – Manage AAA and its parameters
* [sonic\_api](sonic_api_module#ansible-collections-dellemc-enterprise-sonic-sonic-api-module) – Manages REST operations on devices running Enterprise SONiC
* [sonic\_bgp](sonic_bgp_module#ansible-collections-dellemc-enterprise-sonic-sonic-bgp-module) – Manage global BGP and its parameters
* [sonic\_bgp\_af](sonic_bgp_af_module#ansible-collections-dellemc-enterprise-sonic-sonic-bgp-af-module) – Manage global BGP address-family and its parameters
* [sonic\_bgp\_as\_paths](sonic_bgp_as_paths_module#ansible-collections-dellemc-enterprise-sonic-sonic-bgp-as-paths-module) – Manage BGP autonomous system path (or as-path-list) and its parameters
* [sonic\_bgp\_communities](sonic_bgp_communities_module#ansible-collections-dellemc-enterprise-sonic-sonic-bgp-communities-module) – Manage BGP community and its parameters
* [sonic\_bgp\_ext\_communities](sonic_bgp_ext_communities_module#ansible-collections-dellemc-enterprise-sonic-sonic-bgp-ext-communities-module) – Manage BGP extended community-list and its parameters
* [sonic\_bgp\_neighbors](sonic_bgp_neighbors_module#ansible-collections-dellemc-enterprise-sonic-sonic-bgp-neighbors-module) – Manage a BGP neighbor and its parameters
* [sonic\_bgp\_neighbors\_af](sonic_bgp_neighbors_af_module#ansible-collections-dellemc-enterprise-sonic-sonic-bgp-neighbors-af-module) – Manage the BGP neighbor address-family and its parameters
* [sonic\_command](sonic_command_module#ansible-collections-dellemc-enterprise-sonic-sonic-command-module) – Runs commands on devices running Enterprise SONiC
* [sonic\_config](sonic_config_module#ansible-collections-dellemc-enterprise-sonic-sonic-config-module) – Manages configuration sections on devices running Enterprise SONiC
* [sonic\_facts](sonic_facts_module#ansible-collections-dellemc-enterprise-sonic-sonic-facts-module) – Collects facts on devices running Enterprise SONiC
* [sonic\_interfaces](sonic_interfaces_module#ansible-collections-dellemc-enterprise-sonic-sonic-interfaces-module) – Configure Interface attributes on interfaces such as, Eth, LAG, VLAN, and loopback. (create a loopback interface if it does not exist.)
* [sonic\_l2\_interfaces](sonic_l2_interfaces_module#ansible-collections-dellemc-enterprise-sonic-sonic-l2-interfaces-module) – Configure interface-to-VLAN association that is based on access or trunk mode
* [sonic\_l3\_interfaces](sonic_l3_interfaces_module#ansible-collections-dellemc-enterprise-sonic-sonic-l3-interfaces-module) – Configure the IPv4 and IPv6 parameters on Interfaces such as, Eth, LAG, VLAN, and loopback
* [sonic\_lag\_interfaces](sonic_lag_interfaces_module#ansible-collections-dellemc-enterprise-sonic-sonic-lag-interfaces-module) – Manage link aggregation group (LAG) interface parameters
* [sonic\_mclag](sonic_mclag_module#ansible-collections-dellemc-enterprise-sonic-sonic-mclag-module) – Manage multi chassis link aggregation groups domain (MCLAG) and its parameters
* [sonic\_port\_breakout](sonic_port_breakout_module#ansible-collections-dellemc-enterprise-sonic-sonic-port-breakout-module) – Configure port breakout settings on physical interfaces
* [sonic\_radius\_server](sonic_radius_server_module#ansible-collections-dellemc-enterprise-sonic-sonic-radius-server-module) – Manage RADIUS server and its parameters
* [sonic\_system](sonic_system_module#ansible-collections-dellemc-enterprise-sonic-sonic-system-module) – Configure system parameters
* [sonic\_tacacs\_server](sonic_tacacs_server_module#ansible-collections-dellemc-enterprise-sonic-sonic-tacacs-server-module) – Manage TACACS server and its parameters
* [sonic\_users](sonic_users_module#ansible-collections-dellemc-enterprise-sonic-sonic-users-module) – Manage users and its parameters
* [sonic\_vlans](sonic_vlans_module#ansible-collections-dellemc-enterprise-sonic-sonic-vlans-module) – Manage VLAN and its parameters
* [sonic\_vrfs](sonic_vrfs_module#ansible-collections-dellemc-enterprise-sonic-sonic-vrfs-module) – Manage VRFs and associate VRFs to interfaces such as, Eth, LAG, VLAN, and loopback
* [sonic\_vxlans](sonic_vxlans_module#ansible-collections-dellemc-enterprise-sonic-sonic-vxlans-module) – Manage VxLAN EVPN and its parameters

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/dellemc/enterprise_sonic/index.html>

Dellemc.Openmanage
==================

 Collection version 3.6.0

 Plugin Index
------------

 These are the plugins in the dellemc.openmanage collection

 ### Modules

 * [dellemc\_configure\_idrac\_eventing](dellemc_configure_idrac_eventing_module#ansible-collections-dellemc-openmanage-dellemc-configure-idrac-eventing-module) – Configures the iDRAC eventing related attributes
* [dellemc\_configure\_idrac\_services](dellemc_configure_idrac_services_module#ansible-collections-dellemc-openmanage-dellemc-configure-idrac-services-module) – Configures the iDRAC services related attributes
* [dellemc\_get\_firmware\_inventory](dellemc_get_firmware_inventory_module#ansible-collections-dellemc-openmanage-dellemc-get-firmware-inventory-module) – Get Firmware Inventory
* [dellemc\_get\_system\_inventory](dellemc_get_system_inventory_module#ansible-collections-dellemc-openmanage-dellemc-get-system-inventory-module) – Get the PowerEdge Server System Inventory
* [dellemc\_idrac\_lc\_attributes](dellemc_idrac_lc_attributes_module#ansible-collections-dellemc-openmanage-dellemc-idrac-lc-attributes-module) – Enable or disable Collect System Inventory on Restart (CSIOR) property for all iDRAC/LC jobs
* [dellemc\_idrac\_storage\_volume](dellemc_idrac_storage_volume_module#ansible-collections-dellemc-openmanage-dellemc-idrac-storage-volume-module) – Configures the RAID configuration attributes
* [dellemc\_system\_lockdown\_mode](dellemc_system_lockdown_mode_module#ansible-collections-dellemc-openmanage-dellemc-system-lockdown-mode-module) – Configures system lockdown mode for iDRAC
* [idrac\_bios](idrac_bios_module#ansible-collections-dellemc-openmanage-idrac-bios-module) – Configure the BIOS attributes
* [idrac\_firmware](idrac_firmware_module#ansible-collections-dellemc-openmanage-idrac-firmware-module) – Firmware update from a repository on a network share (CIFS, NFS, HTTP, HTTPS, FTP)
* [idrac\_firmware\_info](idrac_firmware_info_module#ansible-collections-dellemc-openmanage-idrac-firmware-info-module) – Get Firmware Inventory
* [idrac\_lifecycle\_controller\_job\_status\_info](idrac_lifecycle_controller_job_status_info_module#ansible-collections-dellemc-openmanage-idrac-lifecycle-controller-job-status-info-module) – Get the status of a Lifecycle Controller job
* [idrac\_lifecycle\_controller\_jobs](idrac_lifecycle_controller_jobs_module#ansible-collections-dellemc-openmanage-idrac-lifecycle-controller-jobs-module) – Delete the Lifecycle Controller Jobs
* [idrac\_lifecycle\_controller\_logs](idrac_lifecycle_controller_logs_module#ansible-collections-dellemc-openmanage-idrac-lifecycle-controller-logs-module) – Export Lifecycle Controller logs to a network share or local path.
* [idrac\_lifecycle\_controller\_status\_info](idrac_lifecycle_controller_status_info_module#ansible-collections-dellemc-openmanage-idrac-lifecycle-controller-status-info-module) – Get the status of the Lifecycle Controller
* [idrac\_network](idrac_network_module#ansible-collections-dellemc-openmanage-idrac-network-module) – Configures the iDRAC network attributes
* [idrac\_os\_deployment](idrac_os_deployment_module#ansible-collections-dellemc-openmanage-idrac-os-deployment-module) – Boot to a network ISO image
* [idrac\_redfish\_storage\_controller](idrac_redfish_storage_controller_module#ansible-collections-dellemc-openmanage-idrac-redfish-storage-controller-module) – Configures the storage controller settings
* [idrac\_reset](idrac_reset_module#ansible-collections-dellemc-openmanage-idrac-reset-module) – Reset iDRAC
* [idrac\_server\_config\_profile](idrac_server_config_profile_module#ansible-collections-dellemc-openmanage-idrac-server-config-profile-module) – Export or Import iDRAC Server Configuration Profile (SCP)
* [idrac\_syslog](idrac_syslog_module#ansible-collections-dellemc-openmanage-idrac-syslog-module) – Enable or disable the syslog on iDRAC
* [idrac\_system\_info](idrac_system_info_module#ansible-collections-dellemc-openmanage-idrac-system-info-module) – Get the PowerEdge Server System Inventory
* [idrac\_timezone\_ntp](idrac_timezone_ntp_module#ansible-collections-dellemc-openmanage-idrac-timezone-ntp-module) – Configures time zone and NTP on iDRAC
* [idrac\_user](idrac_user_module#ansible-collections-dellemc-openmanage-idrac-user-module) – Configure settings for user accounts
* [ome\_application\_certificate](ome_application_certificate_module#ansible-collections-dellemc-openmanage-ome-application-certificate-module) – This module allows to generate a CSR and upload the certificate
* [ome\_application\_network\_address](ome_application_network_address_module#ansible-collections-dellemc-openmanage-ome-application-network-address-module) – Updates the network configuration on OpenManage Enterprise
* [ome\_application\_network\_proxy](ome_application_network_proxy_module#ansible-collections-dellemc-openmanage-ome-application-network-proxy-module) – Updates the proxy configuration on OpenManage Enterprise
* [ome\_application\_network\_time](ome_application_network_time_module#ansible-collections-dellemc-openmanage-ome-application-network-time-module) – Updates the network time on OpenManage Enterprise
* [ome\_application\_network\_webserver](ome_application_network_webserver_module#ansible-collections-dellemc-openmanage-ome-application-network-webserver-module) – Updates the Web server configuration on OpenManage Enterprise
* [ome\_chassis\_slots](ome_chassis_slots_module#ansible-collections-dellemc-openmanage-ome-chassis-slots-module) – Rename sled slots on OpenManage Enterprise Modular
* [ome\_configuration\_compliance\_baseline](ome_configuration_compliance_baseline_module#ansible-collections-dellemc-openmanage-ome-configuration-compliance-baseline-module) – Create, modify, and delete a configuration compliance baseline and remediate non-compliant devices on OpenManage Enterprise
* [ome\_configuration\_compliance\_info](ome_configuration_compliance_info_module#ansible-collections-dellemc-openmanage-ome-configuration-compliance-info-module) – Device compliance report for devices managed in OpenManage Enterprise
* [ome\_device\_group](ome_device_group_module#ansible-collections-dellemc-openmanage-ome-device-group-module) – Add devices to a static device group on OpenManage Enterprise
* [ome\_device\_info](ome_device_info_module#ansible-collections-dellemc-openmanage-ome-device-info-module) – Retrieves the information of devices inventoried by OpenManage Enterprise
* [ome\_diagnostics](ome_diagnostics_module#ansible-collections-dellemc-openmanage-ome-diagnostics-module) – Export technical support logs(TSR) to network share location
* [ome\_discovery](ome_discovery_module#ansible-collections-dellemc-openmanage-ome-discovery-module) – Create, modify, or delete a discovery job on OpenManage Enterprise
* [ome\_firmware](ome_firmware_module#ansible-collections-dellemc-openmanage-ome-firmware-module) – Firmware update of PowerEdge devices and its components through OpenManage Enterprise
* [ome\_firmware\_baseline](ome_firmware_baseline_module#ansible-collections-dellemc-openmanage-ome-firmware-baseline-module) – Create, modify, or delete a firmware baseline on OpenManage Enterprise or OpenManage Enterprise Modular
* [ome\_firmware\_baseline\_compliance\_info](ome_firmware_baseline_compliance_info_module#ansible-collections-dellemc-openmanage-ome-firmware-baseline-compliance-info-module) – Retrieves baseline compliance details on OpenManage Enterprise
* [ome\_firmware\_baseline\_info](ome_firmware_baseline_info_module#ansible-collections-dellemc-openmanage-ome-firmware-baseline-info-module) – Retrieves baseline details from OpenManage Enterprise
* [ome\_firmware\_catalog](ome_firmware_catalog_module#ansible-collections-dellemc-openmanage-ome-firmware-catalog-module) – Create, modify, or delete a firmware catalog on OpenManage Enterprise or OpenManage Enterprise Modular
* [ome\_groups](ome_groups_module#ansible-collections-dellemc-openmanage-ome-groups-module) – Manages static device groups on OpenManage Enterprise
* [ome\_identity\_pool](ome_identity_pool_module#ansible-collections-dellemc-openmanage-ome-identity-pool-module) – Manages identity pool settings on OpenManage Enterprise
* [ome\_job\_info](ome_job_info_module#ansible-collections-dellemc-openmanage-ome-job-info-module) – Get job details for a given job ID or an entire job queue on OpenMange Enterprise
* [ome\_network\_port\_breakout](ome_network_port_breakout_module#ansible-collections-dellemc-openmanage-ome-network-port-breakout-module) – This module allows to automate the port portioning or port breakout to logical sub ports
* [ome\_network\_vlan](ome_network_vlan_module#ansible-collections-dellemc-openmanage-ome-network-vlan-module) – Create, modify & delete a VLAN
* [ome\_network\_vlan\_info](ome_network_vlan_info_module#ansible-collections-dellemc-openmanage-ome-network-vlan-info-module) – Retrieves the information about networks VLAN(s) present in OpenManage Enterprise
* [ome\_powerstate](ome_powerstate_module#ansible-collections-dellemc-openmanage-ome-powerstate-module) – Performs the power management operations on OpenManage Enterprise
* [ome\_profile](ome_profile_module#ansible-collections-dellemc-openmanage-ome-profile-module) – Create, modify, delete, assign, unassign and migrate a profile on OpenManage Enterprise
* [ome\_smart\_fabric](ome_smart_fabric_module#ansible-collections-dellemc-openmanage-ome-smart-fabric-module) – Create, modify or delete a fabric on OpenManage Enterprise Modular
* [ome\_smart\_fabric\_uplink](ome_smart_fabric_uplink_module#ansible-collections-dellemc-openmanage-ome-smart-fabric-uplink-module) – Create, modify or delete a uplink for a fabric on OpenManage Enterprise Modular
* [ome\_template](ome_template_module#ansible-collections-dellemc-openmanage-ome-template-module) – Create, modify, deploy, delete, export, import and clone a template on OpenManage Enterprise
* [ome\_template\_identity\_pool](ome_template_identity_pool_module#ansible-collections-dellemc-openmanage-ome-template-identity-pool-module) – Attach or detach an identity pool to a requested template on OpenManage Enterprise
* [ome\_template\_info](ome_template_info_module#ansible-collections-dellemc-openmanage-ome-template-info-module) – Retrieves template details from OpenManage Enterprise
* [ome\_template\_network\_vlan](ome_template_network_vlan_module#ansible-collections-dellemc-openmanage-ome-template-network-vlan-module) – Set tagged and untagged vlans to native network card supported by a template on OpenManage Enterprise
* [ome\_user](ome_user_module#ansible-collections-dellemc-openmanage-ome-user-module) – Create, modify or delete a user on OpenManage Enterprise
* [ome\_user\_info](ome_user_info_module#ansible-collections-dellemc-openmanage-ome-user-info-module) – Retrieves details of all accounts or a specific account on OpenManage Enterprise
* [redfish\_firmware](redfish_firmware_module#ansible-collections-dellemc-openmanage-redfish-firmware-module) – To perform a component firmware update using the image file available on the local or remote system
* [redfish\_powerstate](redfish_powerstate_module#ansible-collections-dellemc-openmanage-redfish-powerstate-module) – Manage device power state
* [redfish\_storage\_volume](redfish_storage_volume_module#ansible-collections-dellemc-openmanage-redfish-storage-volume-module) – Manages the storage volume configuration

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/dellemc/openmanage/index.html>

Dellemc.Os10
============

 Collection version 1.1.1

 Plugin Index
------------

 These are the plugins in the dellemc.os10 collection

 ### Cliconf Plugins

 * [os10](os10_cliconf#ansible-collections-dellemc-os10-os10-cliconf) – Use os10 cliconf to run command on Dell OS10 platform

 ### Modules

 * [base\_xml\_to\_dict](base_xml_to_dict_module#ansible-collections-dellemc-os10-base-xml-to-dict-module) – Operations for show command output convertion from xml to json format.
* [bgp\_validate](bgp_validate_module#ansible-collections-dellemc-os10-bgp-validate-module) – Validate the bgp neighbor state,raise error if it is not in established state
* [mtu\_validate](mtu_validate_module#ansible-collections-dellemc-os10-mtu-validate-module) – Validate the MTU value for lldp neighbors
* [os10\_command](os10_command_module#ansible-collections-dellemc-os10-os10-command-module) – Run commands on devices running Dell EMC SmartFabric OS10
* [os10\_config](os10_config_module#ansible-collections-dellemc-os10-os10-config-module) – Manage Dell EMC SmartFabric OS10 configuration sections
* [os10\_facts](os10_facts_module#ansible-collections-dellemc-os10-os10-facts-module) – Collect facts from devices running Dell EMC SmartFabric OS10
* [show\_system\_network\_summary](show_system_network_summary_module#ansible-collections-dellemc-os10-show-system-network-summary-module) – Operations for show\_system\_network output in json/yaml format.
* [vlt\_validate](vlt_validate_module#ansible-collections-dellemc-os10-vlt-validate-module) – Validate the vlt info, raise an error if peer is not in up state
* [wiring\_validate](wiring_validate_module#ansible-collections-dellemc-os10-wiring-validate-module) – Validate the wiring based on the planned wiring details

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/dellemc/os10/index.html>

Dellemc.Os6
===========

 Collection version 1.0.7

 Plugin Index
------------

 These are the plugins in the dellemc.os6 collection

 ### Cliconf Plugins

 * [os6](os6_cliconf#ansible-collections-dellemc-os6-os6-cliconf) – Use os6 cliconf to run command on Dell OS6 platform

 ### Modules

 * [os6\_command](os6_command_module#ansible-collections-dellemc-os6-os6-command-module) – Run commands on devices running Dell EMC OS6
* [os6\_config](os6_config_module#ansible-collections-dellemc-os6-os6-config-module) – Manage Dell EMC OS6 configuration sections
* [os6\_facts](os6_facts_module#ansible-collections-dellemc-os6-os6-facts-module) – Collect facts from devices running Dell EMC OS6

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/dellemc/os6/index.html>

Dellemc.Os9
===========

 Collection version 1.0.4

 Plugin Index
------------

 These are the plugins in the dellemc.os9 collection

 ### Cliconf Plugins

 * [os9](os9_cliconf#ansible-collections-dellemc-os9-os9-cliconf) – Use os9 cliconf to run command on Dell OS9 platform

 ### Modules

 * [os9\_command](os9_command_module#ansible-collections-dellemc-os9-os9-command-module) – Run commands on remote devices running Dell OS9
* [os9\_config](os9_config_module#ansible-collections-dellemc-os9-os9-config-module) – Manage Dell EMC Networking OS9 configuration sections
* [os9\_facts](os9_facts_module#ansible-collections-dellemc-os9-os9-facts-module) – Collect facts from remote devices running Dell EMC Networking OS9

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/dellemc/os9/index.html>

F5Networks.F5\_Modules
======================

 Collection version 1.12.0

 Plugin Index
------------

 These are the plugins in the f5networks.f5\_modules collection

 ### Lookup Plugins

 * [bigiq\_license](bigiq_license_lookup#ansible-collections-f5networks-f5-modules-bigiq-license-lookup) – Select a random license key from a pool of biqiq available licenses
* [license\_hopper](license_hopper_lookup#ansible-collections-f5networks-f5-modules-license-hopper-lookup) – Return random license from list

 ### Modules

 * [bigip\_apm\_acl](bigip_apm_acl_module#ansible-collections-f5networks-f5-modules-bigip-apm-acl-module) – Manage user-defined APM ACLs
* [bigip\_apm\_network\_access](bigip_apm_network_access_module#ansible-collections-f5networks-f5-modules-bigip-apm-network-access-module) – Manage APM Network Access resource
* [bigip\_apm\_policy\_fetch](bigip_apm_policy_fetch_module#ansible-collections-f5networks-f5-modules-bigip-apm-policy-fetch-module) – Exports the APM policy or APM access profile from remote nodes.
* [bigip\_apm\_policy\_import](bigip_apm_policy_import_module#ansible-collections-f5networks-f5-modules-bigip-apm-policy-import-module) – Manage BIG-IP APM policy or APM access profile imports
* [bigip\_asm\_advanced\_settings](bigip_asm_advanced_settings_module#ansible-collections-f5networks-f5-modules-bigip-asm-advanced-settings-module) – Manage BIG-IP system ASM advanced settings
* [bigip\_asm\_dos\_application](bigip_asm_dos_application_module#ansible-collections-f5networks-f5-modules-bigip-asm-dos-application-module) – Manage application settings for a DOS profile
* [bigip\_asm\_policy\_fetch](bigip_asm_policy_fetch_module#ansible-collections-f5networks-f5-modules-bigip-asm-policy-fetch-module) – Exports the ASM policy from remote nodes.
* [bigip\_asm\_policy\_import](bigip_asm_policy_import_module#ansible-collections-f5networks-f5-modules-bigip-asm-policy-import-module) – Manage BIG-IP ASM policy imports
* [bigip\_asm\_policy\_manage](bigip_asm_policy_manage_module#ansible-collections-f5networks-f5-modules-bigip-asm-policy-manage-module) – Manage BIG-IP ASM policies
* [bigip\_asm\_policy\_server\_technology](bigip_asm_policy_server_technology_module#ansible-collections-f5networks-f5-modules-bigip-asm-policy-server-technology-module) – Manages Server Technology on an ASM policy
* [bigip\_asm\_policy\_signature\_set](bigip_asm_policy_signature_set_module#ansible-collections-f5networks-f5-modules-bigip-asm-policy-signature-set-module) – Manages Signature Sets on an ASM policy
* [bigip\_cgnat\_lsn\_pool](bigip_cgnat_lsn_pool_module#ansible-collections-f5networks-f5-modules-bigip-cgnat-lsn-pool-module) – Manage CGNAT LSN Pools
* [bigip\_cli\_alias](bigip_cli_alias_module#ansible-collections-f5networks-f5-modules-bigip-cli-alias-module) – Manage CLI aliases on a BIG-IP
* [bigip\_cli\_script](bigip_cli_script_module#ansible-collections-f5networks-f5-modules-bigip-cli-script-module) – Manage CLI scripts on a BIG-IP
* [bigip\_command](bigip_command_module#ansible-collections-f5networks-f5-modules-bigip-command-module) – Run TMSH and BASH commands on F5 devices
* [bigip\_config](bigip_config_module#ansible-collections-f5networks-f5-modules-bigip-config-module) – Manage BIG-IP configuration sections
* [bigip\_configsync\_action](bigip_configsync_action_module#ansible-collections-f5networks-f5-modules-bigip-configsync-action-module) – Perform different actions related to config-sync
* [bigip\_data\_group](bigip_data_group_module#ansible-collections-f5networks-f5-modules-bigip-data-group-module) – Manage data groups on a BIG-IP
* [bigip\_device\_auth](bigip_device_auth_module#ansible-collections-f5networks-f5-modules-bigip-device-auth-module) – Manage system authentication on a BIG-IP
* [bigip\_device\_auth\_ldap](bigip_device_auth_ldap_module#ansible-collections-f5networks-f5-modules-bigip-device-auth-ldap-module) – Manage LDAP device authentication settings on BIG-IP
* [bigip\_device\_auth\_radius](bigip_device_auth_radius_module#ansible-collections-f5networks-f5-modules-bigip-device-auth-radius-module) – Manages RADIUS auth configuration on a BIG-IP device
* [bigip\_device\_auth\_radius\_server](bigip_device_auth_radius_server_module#ansible-collections-f5networks-f5-modules-bigip-device-auth-radius-server-module) – Manages the RADIUS server configuration of the device
* [bigip\_device\_certificate](bigip_device_certificate_module#ansible-collections-f5networks-f5-modules-bigip-device-certificate-module) – Manage self-signed device certificates
* [bigip\_device\_connectivity](bigip_device_connectivity_module#ansible-collections-f5networks-f5-modules-bigip-device-connectivity-module) – Manages device IP configuration settings for HA on a BIG-IP.
* [bigip\_device\_dns](bigip_device_dns_module#ansible-collections-f5networks-f5-modules-bigip-device-dns-module) – Manage DNS settings on a BIG-IP
* [bigip\_device\_group](bigip_device_group_module#ansible-collections-f5networks-f5-modules-bigip-device-group-module) – Manage device groups on a BIG-IP
* [bigip\_device\_group\_member](bigip_device_group_member_module#ansible-collections-f5networks-f5-modules-bigip-device-group-member-module) – Manages members in a device group
* [bigip\_device\_ha\_group](bigip_device_ha_group_module#ansible-collections-f5networks-f5-modules-bigip-device-ha-group-module) – Manage HA group settings on a BIG-IP system
* [bigip\_device\_httpd](bigip_device_httpd_module#ansible-collections-f5networks-f5-modules-bigip-device-httpd-module) – Manage HTTPD related settings on a BIG-IP system
* [bigip\_device\_info](bigip_device_info_module#ansible-collections-f5networks-f5-modules-bigip-device-info-module) – Collect information from F5 BIG-IP devices
* [bigip\_device\_license](bigip_device_license_module#ansible-collections-f5networks-f5-modules-bigip-device-license-module) – Manage license installation and activation on BIG-IP devices
* [bigip\_device\_ntp](bigip_device_ntp_module#ansible-collections-f5networks-f5-modules-bigip-device-ntp-module) – Manage NTP servers on a BIG-IP
* [bigip\_device\_sshd](bigip_device_sshd_module#ansible-collections-f5networks-f5-modules-bigip-device-sshd-module) – Manage the SSHD settings of a BIG-IP
* [bigip\_device\_syslog](bigip_device_syslog_module#ansible-collections-f5networks-f5-modules-bigip-device-syslog-module) – Manage system-level syslog settings on BIG-IP
* [bigip\_device\_traffic\_group](bigip_device_traffic_group_module#ansible-collections-f5networks-f5-modules-bigip-device-traffic-group-module) – Manages traffic groups on BIG-IP
* [bigip\_device\_trust](bigip_device_trust_module#ansible-collections-f5networks-f5-modules-bigip-device-trust-module) – Manage the trust relationships between BIG-IPs
* [bigip\_dns\_cache\_resolver](bigip_dns_cache_resolver_module#ansible-collections-f5networks-f5-modules-bigip-dns-cache-resolver-module) – Manage DNS resolver cache configuration on a BIG-IP
* [bigip\_dns\_nameserver](bigip_dns_nameserver_module#ansible-collections-f5networks-f5-modules-bigip-dns-nameserver-module) – Manage LTM DNS nameservers on a BIG-IP
* [bigip\_dns\_resolver](bigip_dns_resolver_module#ansible-collections-f5networks-f5-modules-bigip-dns-resolver-module) – Manage DNS resolvers on a BIG-IP
* [bigip\_dns\_zone](bigip_dns_zone_module#ansible-collections-f5networks-f5-modules-bigip-dns-zone-module) – Manage DNS zones on BIG-IP
* [bigip\_file\_copy](bigip_file_copy_module#ansible-collections-f5networks-f5-modules-bigip-file-copy-module) – Manage files in datastores on a BIG-IP
* [bigip\_firewall\_address\_list](bigip_firewall_address_list_module#ansible-collections-f5networks-f5-modules-bigip-firewall-address-list-module) – Manage address lists on BIG-IP AFM
* [bigip\_firewall\_dos\_profile](bigip_firewall_dos_profile_module#ansible-collections-f5networks-f5-modules-bigip-firewall-dos-profile-module) – Manage AFM DoS profiles on a BIG-IP
* [bigip\_firewall\_dos\_vector](bigip_firewall_dos_vector_module#ansible-collections-f5networks-f5-modules-bigip-firewall-dos-vector-module) – Manage attack vector configuration in an AFM DoS profile
* [bigip\_firewall\_global\_rules](bigip_firewall_global_rules_module#ansible-collections-f5networks-f5-modules-bigip-firewall-global-rules-module) – Manage AFM global rule settings on BIG-IP
* [bigip\_firewall\_log\_profile](bigip_firewall_log_profile_module#ansible-collections-f5networks-f5-modules-bigip-firewall-log-profile-module) – Manages AFM logging profiles configured in the system
* [bigip\_firewall\_log\_profile\_network](bigip_firewall_log_profile_network_module#ansible-collections-f5networks-f5-modules-bigip-firewall-log-profile-network-module) – Configures Network Firewall related settings of the log profile
* [bigip\_firewall\_policy](bigip_firewall_policy_module#ansible-collections-f5networks-f5-modules-bigip-firewall-policy-module) – Manage AFM security firewall policies on a BIG-IP
* [bigip\_firewall\_port\_list](bigip_firewall_port_list_module#ansible-collections-f5networks-f5-modules-bigip-firewall-port-list-module) – Manage port lists on BIG-IP AFM
* [bigip\_firewall\_rule](bigip_firewall_rule_module#ansible-collections-f5networks-f5-modules-bigip-firewall-rule-module) – Manage AFM Firewall rules
* [bigip\_firewall\_rule\_list](bigip_firewall_rule_list_module#ansible-collections-f5networks-f5-modules-bigip-firewall-rule-list-module) – Manage AFM security firewall policies on a BIG-IP
* [bigip\_firewall\_schedule](bigip_firewall_schedule_module#ansible-collections-f5networks-f5-modules-bigip-firewall-schedule-module) – Manage BIG-IP AFM schedule configurations
* [bigip\_gtm\_datacenter](bigip_gtm_datacenter_module#ansible-collections-f5networks-f5-modules-bigip-gtm-datacenter-module) – Manage Datacenter configuration in BIG-IP
* [bigip\_gtm\_dns\_listener](bigip_gtm_dns_listener_module#ansible-collections-f5networks-f5-modules-bigip-gtm-dns-listener-module) – Configures the BIG-IP DNS system to answer TCP or UDP DNS requests
* [bigip\_gtm\_global](bigip_gtm_global_module#ansible-collections-f5networks-f5-modules-bigip-gtm-global-module) – Manages global GTM settings
* [bigip\_gtm\_monitor\_bigip](bigip_gtm_monitor_bigip_module#ansible-collections-f5networks-f5-modules-bigip-gtm-monitor-bigip-module) – Manages F5 BIG-IP GTM BIG-IP monitors
* [bigip\_gtm\_monitor\_external](bigip_gtm_monitor_external_module#ansible-collections-f5networks-f5-modules-bigip-gtm-monitor-external-module) – Manages external GTM monitors on a BIG-IP
* [bigip\_gtm\_monitor\_firepass](bigip_gtm_monitor_firepass_module#ansible-collections-f5networks-f5-modules-bigip-gtm-monitor-firepass-module) – Manages F5 BIG-IP GTM FirePass monitors
* [bigip\_gtm\_monitor\_http](bigip_gtm_monitor_http_module#ansible-collections-f5networks-f5-modules-bigip-gtm-monitor-http-module) – Manages F5 BIG-IP GTM HTTP monitors
* [bigip\_gtm\_monitor\_https](bigip_gtm_monitor_https_module#ansible-collections-f5networks-f5-modules-bigip-gtm-monitor-https-module) – Manages F5 BIG-IP GTM HTTPS monitors
* [bigip\_gtm\_monitor\_tcp](bigip_gtm_monitor_tcp_module#ansible-collections-f5networks-f5-modules-bigip-gtm-monitor-tcp-module) – Manages F5 BIG-IP GTM TCP monitors
* [bigip\_gtm\_monitor\_tcp\_half\_open](bigip_gtm_monitor_tcp_half_open_module#ansible-collections-f5networks-f5-modules-bigip-gtm-monitor-tcp-half-open-module) – Manages F5 BIG-IP GTM TCP half-open monitors
* [bigip\_gtm\_pool](bigip_gtm_pool_module#ansible-collections-f5networks-f5-modules-bigip-gtm-pool-module) – Manages F5 BIG-IP GTM pools
* [bigip\_gtm\_pool\_member](bigip_gtm_pool_member_module#ansible-collections-f5networks-f5-modules-bigip-gtm-pool-member-module) – Manage GTM pool member settings
* [bigip\_gtm\_server](bigip_gtm_server_module#ansible-collections-f5networks-f5-modules-bigip-gtm-server-module) – Manages F5 BIG-IP GTM servers
* [bigip\_gtm\_topology\_record](bigip_gtm_topology_record_module#ansible-collections-f5networks-f5-modules-bigip-gtm-topology-record-module) – Manages GTM Topology Records
* [bigip\_gtm\_topology\_region](bigip_gtm_topology_region_module#ansible-collections-f5networks-f5-modules-bigip-gtm-topology-region-module) – Manages GTM Topology Regions
* [bigip\_gtm\_virtual\_server](bigip_gtm_virtual_server_module#ansible-collections-f5networks-f5-modules-bigip-gtm-virtual-server-module) – Manages F5 BIG-IP GTM virtual servers
* [bigip\_gtm\_wide\_ip](bigip_gtm_wide_ip_module#ansible-collections-f5networks-f5-modules-bigip-gtm-wide-ip-module) – Manages F5 BIG-IP GTM Wide IP
* [bigip\_hostname](bigip_hostname_module#ansible-collections-f5networks-f5-modules-bigip-hostname-module) – Manage the hostname of a BIG-IP
* [bigip\_iapp\_service](bigip_iapp_service_module#ansible-collections-f5networks-f5-modules-bigip-iapp-service-module) – Manages TCL iApp services on a BIG-IP
* [bigip\_iapp\_template](bigip_iapp_template_module#ansible-collections-f5networks-f5-modules-bigip-iapp-template-module) – Manages TCL iApp templates on a BIG-IP.
* [bigip\_ike\_peer](bigip_ike_peer_module#ansible-collections-f5networks-f5-modules-bigip-ike-peer-module) – Manage IPSec IKE Peer configuration on BIG-IP
* [bigip\_imish\_config](bigip_imish_config_module#ansible-collections-f5networks-f5-modules-bigip-imish-config-module) – Manage BIG-IP advanced routing configuration sections
* [bigip\_interface](bigip_interface_module#ansible-collections-f5networks-f5-modules-bigip-interface-module) – Module to manage BIG-IP physical interfaces.
* [bigip\_ipsec\_policy](bigip_ipsec_policy_module#ansible-collections-f5networks-f5-modules-bigip-ipsec-policy-module) – Manage IPSec policies on a BIG-IP
* [bigip\_irule](bigip_irule_module#ansible-collections-f5networks-f5-modules-bigip-irule-module) – Manage iRules across different modules on a BIG-IP
* [bigip\_log\_destination](bigip_log_destination_module#ansible-collections-f5networks-f5-modules-bigip-log-destination-module) – Manages log destinations on a BIG-IP.
* [bigip\_log\_publisher](bigip_log_publisher_module#ansible-collections-f5networks-f5-modules-bigip-log-publisher-module) – Manages log publishers on a BIG-IP
* [bigip\_lx\_package](bigip_lx_package_module#ansible-collections-f5networks-f5-modules-bigip-lx-package-module) – Manages Javascript LX packages on a BIG-IP
* [bigip\_management\_route](bigip_management_route_module#ansible-collections-f5networks-f5-modules-bigip-management-route-module) – Manage system management routes on a BIG-IP
* [bigip\_message\_routing\_peer](bigip_message_routing_peer_module#ansible-collections-f5networks-f5-modules-bigip-message-routing-peer-module) – Manage peers for routing generic message protocol messages
* [bigip\_message\_routing\_protocol](bigip_message_routing_protocol_module#ansible-collections-f5networks-f5-modules-bigip-message-routing-protocol-module) – Manage the generic message parser profile.
* [bigip\_message\_routing\_route](bigip_message_routing_route_module#ansible-collections-f5networks-f5-modules-bigip-message-routing-route-module) – Manages static routes for routing message protocol messages
* [bigip\_message\_routing\_router](bigip_message_routing_router_module#ansible-collections-f5networks-f5-modules-bigip-message-routing-router-module) – Manages router profiles for message-routing protocols
* [bigip\_message\_routing\_transport\_config](bigip_message_routing_transport_config_module#ansible-collections-f5networks-f5-modules-bigip-message-routing-transport-config-module) – Manages configuration for an outgoing connection
* [bigip\_monitor\_dns](bigip_monitor_dns_module#ansible-collections-f5networks-f5-modules-bigip-monitor-dns-module) – Manage DNS monitors on a BIG-IP
* [bigip\_monitor\_external](bigip_monitor_external_module#ansible-collections-f5networks-f5-modules-bigip-monitor-external-module) – Manages external LTM monitors on a BIG-IP
* [bigip\_monitor\_ftp](bigip_monitor_ftp_module#ansible-collections-f5networks-f5-modules-bigip-monitor-ftp-module) – Manage FTP monitors on a BIG-IP
* [bigip\_monitor\_gateway\_icmp](bigip_monitor_gateway_icmp_module#ansible-collections-f5networks-f5-modules-bigip-monitor-gateway-icmp-module) – Manages F5 BIG-IP LTM gateway ICMP monitors
* [bigip\_monitor\_http](bigip_monitor_http_module#ansible-collections-f5networks-f5-modules-bigip-monitor-http-module) – Manages F5 BIG-IP LTM HTTP monitors
* [bigip\_monitor\_https](bigip_monitor_https_module#ansible-collections-f5networks-f5-modules-bigip-monitor-https-module) – Manages F5 BIG-IP LTM HTTPS monitors
* [bigip\_monitor\_icmp](bigip_monitor_icmp_module#ansible-collections-f5networks-f5-modules-bigip-monitor-icmp-module) – Manages F5 BIG-IP LTM ICMP monitors
* [bigip\_monitor\_ldap](bigip_monitor_ldap_module#ansible-collections-f5networks-f5-modules-bigip-monitor-ldap-module) – Manages BIG-IP LDAP monitors
* [bigip\_monitor\_mysql](bigip_monitor_mysql_module#ansible-collections-f5networks-f5-modules-bigip-monitor-mysql-module) – Manages BIG-IP MySQL monitors
* [bigip\_monitor\_oracle](bigip_monitor_oracle_module#ansible-collections-f5networks-f5-modules-bigip-monitor-oracle-module) – Manages BIG-IP Oracle monitors
* [bigip\_monitor\_smtp](bigip_monitor_smtp_module#ansible-collections-f5networks-f5-modules-bigip-monitor-smtp-module) – Manage SMTP monitors on a BIG-IP
* [bigip\_monitor\_snmp\_dca](bigip_monitor_snmp_dca_module#ansible-collections-f5networks-f5-modules-bigip-monitor-snmp-dca-module) – Manages BIG-IP SNMP data collecting agent (DCA) monitors
* [bigip\_monitor\_tcp](bigip_monitor_tcp_module#ansible-collections-f5networks-f5-modules-bigip-monitor-tcp-module) – Manages F5 BIG-IP LTM TCP monitors
* [bigip\_monitor\_tcp\_echo](bigip_monitor_tcp_echo_module#ansible-collections-f5networks-f5-modules-bigip-monitor-tcp-echo-module) – Manages F5 BIG-IP LTM TCP echo monitors
* [bigip\_monitor\_tcp\_half\_open](bigip_monitor_tcp_half_open_module#ansible-collections-f5networks-f5-modules-bigip-monitor-tcp-half-open-module) – Manages F5 BIG-IP LTM TCP half-open monitors
* [bigip\_monitor\_udp](bigip_monitor_udp_module#ansible-collections-f5networks-f5-modules-bigip-monitor-udp-module) – Manages F5 BIG-IP LTM UDP monitors
* [bigip\_network\_globals](bigip_network_globals_module#ansible-collections-f5networks-f5-modules-bigip-network-globals-module) – Manage network global settings on BIG-IP
* [bigip\_node](bigip_node_module#ansible-collections-f5networks-f5-modules-bigip-node-module) – Manages F5 BIG-IP LTM nodes
* [bigip\_partition](bigip_partition_module#ansible-collections-f5networks-f5-modules-bigip-partition-module) – Manage BIG-IP partitions
* [bigip\_password\_policy](bigip_password_policy_module#ansible-collections-f5networks-f5-modules-bigip-password-policy-module) – Manages the authentication password policy on a BIG-IP
* [bigip\_policy](bigip_policy_module#ansible-collections-f5networks-f5-modules-bigip-policy-module) – Manage general policy configuration on a BIG-IP
* [bigip\_policy\_rule](bigip_policy_rule_module#ansible-collections-f5networks-f5-modules-bigip-policy-rule-module) – Manage LTM policy rules on a BIG-IP
* [bigip\_pool](bigip_pool_module#ansible-collections-f5networks-f5-modules-bigip-pool-module) – Manages F5 BIG-IP LTM pools
* [bigip\_pool\_member](bigip_pool_member_module#ansible-collections-f5networks-f5-modules-bigip-pool-member-module) – Manages F5 BIG-IP LTM pool members
* [bigip\_profile\_analytics](bigip_profile_analytics_module#ansible-collections-f5networks-f5-modules-bigip-profile-analytics-module) – Manage HTTP analytics profiles on a BIG-IP
* [bigip\_profile\_client\_ssl](bigip_profile_client_ssl_module#ansible-collections-f5networks-f5-modules-bigip-profile-client-ssl-module) – Manages client SSL profiles on a BIG-IP
* [bigip\_profile\_dns](bigip_profile_dns_module#ansible-collections-f5networks-f5-modules-bigip-profile-dns-module) – Manage DNS profiles on a BIG-IP
* [bigip\_profile\_fastl4](bigip_profile_fastl4_module#ansible-collections-f5networks-f5-modules-bigip-profile-fastl4-module) – Manages Fast L4 profiles
* [bigip\_profile\_ftp](bigip_profile_ftp_module#ansible-collections-f5networks-f5-modules-bigip-profile-ftp-module) – Manages FTP profiles
* [bigip\_profile\_http](bigip_profile_http_module#ansible-collections-f5networks-f5-modules-bigip-profile-http-module) – Manage HTTP profiles on a BIG-IP
* [bigip\_profile\_http2](bigip_profile_http2_module#ansible-collections-f5networks-f5-modules-bigip-profile-http2-module) – Manage HTTP2 profiles on a BIG-IP
* [bigip\_profile\_http\_compression](bigip_profile_http_compression_module#ansible-collections-f5networks-f5-modules-bigip-profile-http-compression-module) – Manage HTTP compression profiles on a BIG-IP
* [bigip\_profile\_oneconnect](bigip_profile_oneconnect_module#ansible-collections-f5networks-f5-modules-bigip-profile-oneconnect-module) – Manage OneConnect profiles on a BIG-IP
* [bigip\_profile\_persistence\_cookie](bigip_profile_persistence_cookie_module#ansible-collections-f5networks-f5-modules-bigip-profile-persistence-cookie-module) – Manage cookie persistence profiles on BIG-IP
* [bigip\_profile\_persistence\_src\_addr](bigip_profile_persistence_src_addr_module#ansible-collections-f5networks-f5-modules-bigip-profile-persistence-src-addr-module) – Manage source address persistence profiles
* [bigip\_profile\_persistence\_universal](bigip_profile_persistence_universal_module#ansible-collections-f5networks-f5-modules-bigip-profile-persistence-universal-module) – Manage universal persistence profiles
* [bigip\_profile\_server\_ssl](bigip_profile_server_ssl_module#ansible-collections-f5networks-f5-modules-bigip-profile-server-ssl-module) – Manages server SSL profiles on a BIG-IP
* [bigip\_profile\_sip](bigip_profile_sip_module#ansible-collections-f5networks-f5-modules-bigip-profile-sip-module) – Manage SIP profiles on a BIG-IP
* [bigip\_profile\_tcp](bigip_profile_tcp_module#ansible-collections-f5networks-f5-modules-bigip-profile-tcp-module) – Manage TCP profiles on a BIG-IP
* [bigip\_profile\_udp](bigip_profile_udp_module#ansible-collections-f5networks-f5-modules-bigip-profile-udp-module) – Manage UDP profiles on a BIG-IP
* [bigip\_provision](bigip_provision_module#ansible-collections-f5networks-f5-modules-bigip-provision-module) – Manage BIG-IP module provisioning
* [bigip\_qkview](bigip_qkview_module#ansible-collections-f5networks-f5-modules-bigip-qkview-module) – Manage QKviews on the device
* [bigip\_remote\_role](bigip_remote_role_module#ansible-collections-f5networks-f5-modules-bigip-remote-role-module) – Manage remote roles on a BIG-IP
* [bigip\_remote\_syslog](bigip_remote_syslog_module#ansible-collections-f5networks-f5-modules-bigip-remote-syslog-module) – Manipulate remote syslog settings on a BIG-IP
* [bigip\_remote\_user](bigip_remote_user_module#ansible-collections-f5networks-f5-modules-bigip-remote-user-module) – Manages default settings for remote user accounts on a BIG-IP
* [bigip\_routedomain](bigip_routedomain_module#ansible-collections-f5networks-f5-modules-bigip-routedomain-module) – Manage route domains on a BIG-IP
* [bigip\_selfip](bigip_selfip_module#ansible-collections-f5networks-f5-modules-bigip-selfip-module) – Manage Self-IPs on a BIG-IP system
* [bigip\_service\_policy](bigip_service_policy_module#ansible-collections-f5networks-f5-modules-bigip-service-policy-module) – Manages service policies on a BIG-IP.
* [bigip\_smtp](bigip_smtp_module#ansible-collections-f5networks-f5-modules-bigip-smtp-module) – Manages SMTP settings on the BIG-IP
* [bigip\_snat\_pool](bigip_snat_pool_module#ansible-collections-f5networks-f5-modules-bigip-snat-pool-module) – Manage SNAT pools on a BIG-IP
* [bigip\_snat\_translation](bigip_snat_translation_module#ansible-collections-f5networks-f5-modules-bigip-snat-translation-module) – Manage SNAT translations on a BIG-IP
* [bigip\_snmp](bigip_snmp_module#ansible-collections-f5networks-f5-modules-bigip-snmp-module) – Manipulate general SNMP settings on a BIG-IP
* [bigip\_snmp\_community](bigip_snmp_community_module#ansible-collections-f5networks-f5-modules-bigip-snmp-community-module) – Manages SNMP communities on a BIG-IP.
* [bigip\_snmp\_trap](bigip_snmp_trap_module#ansible-collections-f5networks-f5-modules-bigip-snmp-trap-module) – Manipulate SNMP trap information on a BIG-IP
* [bigip\_software\_image](bigip_software_image_module#ansible-collections-f5networks-f5-modules-bigip-software-image-module) – Manage software images on a BIG-IP
* [bigip\_software\_install](bigip_software_install_module#ansible-collections-f5networks-f5-modules-bigip-software-install-module) – Install software images on a BIG-IP
* [bigip\_software\_update](bigip_software_update_module#ansible-collections-f5networks-f5-modules-bigip-software-update-module) – Manage the software update settings of a BIG-IP
* [bigip\_ssl\_certificate](bigip_ssl_certificate_module#ansible-collections-f5networks-f5-modules-bigip-ssl-certificate-module) – Import/Delete certificates from BIG-IP
* [bigip\_ssl\_csr](bigip_ssl_csr_module#ansible-collections-f5networks-f5-modules-bigip-ssl-csr-module) – Create SSL CSR files on the BIG-IP
* [bigip\_ssl\_key](bigip_ssl_key_module#ansible-collections-f5networks-f5-modules-bigip-ssl-key-module) – Import/Delete SSL keys from BIG-IP
* [bigip\_ssl\_key\_cert](bigip_ssl_key_cert_module#ansible-collections-f5networks-f5-modules-bigip-ssl-key-cert-module) – Import/Delete SSL keys and certs from BIG-IP
* [bigip\_ssl\_ocsp](bigip_ssl_ocsp_module#ansible-collections-f5networks-f5-modules-bigip-ssl-ocsp-module) – Manage OCSP configurations on BIG-IP
* [bigip\_static\_route](bigip_static_route_module#ansible-collections-f5networks-f5-modules-bigip-static-route-module) – Manipulate static routes on a BIG-IP
* [bigip\_sys\_daemon\_log\_tmm](bigip_sys_daemon_log_tmm_module#ansible-collections-f5networks-f5-modules-bigip-sys-daemon-log-tmm-module) – Manage BIG-IP tmm daemon log settings
* [bigip\_sys\_db](bigip_sys_db_module#ansible-collections-f5networks-f5-modules-bigip-sys-db-module) – Manage BIG-IP system database variables
* [bigip\_sys\_global](bigip_sys_global_module#ansible-collections-f5networks-f5-modules-bigip-sys-global-module) – Manage BIG-IP global settings
* [bigip\_timer\_policy](bigip_timer_policy_module#ansible-collections-f5networks-f5-modules-bigip-timer-policy-module) – Manage timer policies on a BIG-IP
* [bigip\_traffic\_selector](bigip_traffic_selector_module#ansible-collections-f5networks-f5-modules-bigip-traffic-selector-module) – Manage IPSec Traffic Selectors on BIG-IP
* [bigip\_trunk](bigip_trunk_module#ansible-collections-f5networks-f5-modules-bigip-trunk-module) – Manage trunks on a BIG-IP
* [bigip\_tunnel](bigip_tunnel_module#ansible-collections-f5networks-f5-modules-bigip-tunnel-module) – Manage tunnels on a BIG-IP
* [bigip\_ucs](bigip_ucs_module#ansible-collections-f5networks-f5-modules-bigip-ucs-module) – Manage upload, installation, and removal of UCS files
* [bigip\_ucs\_fetch](bigip_ucs_fetch_module#ansible-collections-f5networks-f5-modules-bigip-ucs-fetch-module) – Fetches a UCS file from remote nodes
* [bigip\_user](bigip_user_module#ansible-collections-f5networks-f5-modules-bigip-user-module) – Manage user accounts and user attributes on a BIG-IP
* [bigip\_vcmp\_guest](bigip_vcmp_guest_module#ansible-collections-f5networks-f5-modules-bigip-vcmp-guest-module) – Manages vCMP guests on a BIG-IP
* [bigip\_virtual\_address](bigip_virtual_address_module#ansible-collections-f5networks-f5-modules-bigip-virtual-address-module) – Manage LTM virtual addresses on a BIG-IP
* [bigip\_virtual\_server](bigip_virtual_server_module#ansible-collections-f5networks-f5-modules-bigip-virtual-server-module) – Manage LTM virtual servers on a BIG-IP
* [bigip\_vlan](bigip_vlan_module#ansible-collections-f5networks-f5-modules-bigip-vlan-module) – Manage VLANs on a BIG-IP system
* [bigip\_wait](bigip_wait_module#ansible-collections-f5networks-f5-modules-bigip-wait-module) – Wait for a BIG-IP condition before continuing
* [bigiq\_application\_fasthttp](bigiq_application_fasthttp_module#ansible-collections-f5networks-f5-modules-bigiq-application-fasthttp-module) – Manages BIG-IQ FastHTTP applications
* [bigiq\_application\_fastl4\_tcp](bigiq_application_fastl4_tcp_module#ansible-collections-f5networks-f5-modules-bigiq-application-fastl4-tcp-module) – Manages BIG-IQ FastL4 TCP applications
* [bigiq\_application\_fastl4\_udp](bigiq_application_fastl4_udp_module#ansible-collections-f5networks-f5-modules-bigiq-application-fastl4-udp-module) – Manages BIG-IQ FastL4 UDP applications
* [bigiq\_application\_http](bigiq_application_http_module#ansible-collections-f5networks-f5-modules-bigiq-application-http-module) – Manages BIG-IQ HTTP applications
* [bigiq\_application\_https\_offload](bigiq_application_https_offload_module#ansible-collections-f5networks-f5-modules-bigiq-application-https-offload-module) – Manages BIG-IQ HTTPS offload applications
* [bigiq\_application\_https\_waf](bigiq_application_https_waf_module#ansible-collections-f5networks-f5-modules-bigiq-application-https-waf-module) – Manages BIG-IQ HTTPS WAF applications
* [bigiq\_device\_discovery](bigiq_device_discovery_module#ansible-collections-f5networks-f5-modules-bigiq-device-discovery-module) – Manage BIG-IP devices through BIG-IQ
* [bigiq\_device\_info](bigiq_device_info_module#ansible-collections-f5networks-f5-modules-bigiq-device-info-module) – Collect information from F5 BIG-IQ devices
* [bigiq\_regkey\_license](bigiq_regkey_license_module#ansible-collections-f5networks-f5-modules-bigiq-regkey-license-module) – Manages licenses in a BIG-IQ registration key pool
* [bigiq\_regkey\_license\_assignment](bigiq_regkey_license_assignment_module#ansible-collections-f5networks-f5-modules-bigiq-regkey-license-assignment-module) – Manage regkey license assignment on BIG-IPs from a BIG-IQ
* [bigiq\_regkey\_pool](bigiq_regkey_pool_module#ansible-collections-f5networks-f5-modules-bigiq-regkey-pool-module) – Manages registration key pools on BIG-IQ
* [bigiq\_utility\_license](bigiq_utility_license_module#ansible-collections-f5networks-f5-modules-bigiq-utility-license-module) – Manage utility licenses on a BIG-IQ
* [bigiq\_utility\_license\_assignment](bigiq_utility_license_assignment_module#ansible-collections-f5networks-f5-modules-bigiq-utility-license-assignment-module) – Manage utility license assignment on BIG-IPs from a BIG-IQ

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/f5networks/f5_modules/index.html>

Frr.Frr
=======

 Collection version 1.0.3

 Plugin Index
------------

 These are the plugins in the frr.frr collection

 ### Cliconf Plugins

 * [frr](frr_cliconf#ansible-collections-frr-frr-frr-cliconf) – Use frr cliconf to run command on Free Range Routing platform

 ### Modules

 * [frr\_bgp](frr_bgp_module#ansible-collections-frr-frr-frr-bgp-module) – Configure global BGP settings on Free Range Routing(FRR).
* [frr\_facts](frr_facts_module#ansible-collections-frr-frr-frr-facts-module) – Collect facts from remote devices running Free Range Routing (FRR).

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/frr/frr/index.html>

Fortinet.Fortimanager
=====================

 Collection version 2.1.3

 Plugin Index
------------

 These are the plugins in the fortinet.fortimanager collection

 ### Httpapi Plugins

 * [fortimanager](fortimanager_httpapi#ansible-collections-fortinet-fortimanager-fortimanager-httpapi) – HttpApi Plugin for Fortinet FortiManager Appliance or VM.

 ### Modules

 * [fmgr\_adom\_options](fmgr_adom_options_module#ansible-collections-fortinet-fortimanager-fmgr-adom-options-module) – no description
* [fmgr\_antivirus\_mmschecksum](fmgr_antivirus_mmschecksum_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-mmschecksum-module) – Configure MMS content checksum list.
* [fmgr\_antivirus\_mmschecksum\_entries](fmgr_antivirus_mmschecksum_entries_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-mmschecksum-entries-module) – modify this MMS content checksum list
* [fmgr\_antivirus\_notification](fmgr_antivirus_notification_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-notification-module) – Configure AntiVirus notification lists.
* [fmgr\_antivirus\_notification\_entries](fmgr_antivirus_notification_entries_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-notification-entries-module) – modify this antivirus notification list
* [fmgr\_antivirus\_profile](fmgr_antivirus_profile_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-profile-module) – Configure AntiVirus profiles.
* [fmgr\_antivirus\_profile\_cifs](fmgr_antivirus_profile_cifs_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-profile-cifs-module) – Configure CIFS AntiVirus options.
* [fmgr\_antivirus\_profile\_contentdisarm](fmgr_antivirus_profile_contentdisarm_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-profile-contentdisarm-module) – AV Content Disarm and Reconstruction settings.
* [fmgr\_antivirus\_profile\_ftp](fmgr_antivirus_profile_ftp_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-profile-ftp-module) – Configure FTP AntiVirus options.
* [fmgr\_antivirus\_profile\_http](fmgr_antivirus_profile_http_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-profile-http-module) – Configure HTTP AntiVirus options.
* [fmgr\_antivirus\_profile\_imap](fmgr_antivirus_profile_imap_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-profile-imap-module) – Configure IMAP AntiVirus options.
* [fmgr\_antivirus\_profile\_mapi](fmgr_antivirus_profile_mapi_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-profile-mapi-module) – Configure MAPI AntiVirus options.
* [fmgr\_antivirus\_profile\_nacquar](fmgr_antivirus_profile_nacquar_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-profile-nacquar-module) – Configure AntiVirus quarantine settings.
* [fmgr\_antivirus\_profile\_nntp](fmgr_antivirus_profile_nntp_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-profile-nntp-module) – Configure NNTP AntiVirus options.
* [fmgr\_antivirus\_profile\_outbreakprevention](fmgr_antivirus_profile_outbreakprevention_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-profile-outbreakprevention-module) – Configure Virus Outbreak Prevention settings.
* [fmgr\_antivirus\_profile\_pop3](fmgr_antivirus_profile_pop3_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-profile-pop3-module) – Configure POP3 AntiVirus options.
* [fmgr\_antivirus\_profile\_smb](fmgr_antivirus_profile_smb_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-profile-smb-module) – Configure SMB AntiVirus options.
* [fmgr\_antivirus\_profile\_smtp](fmgr_antivirus_profile_smtp_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-profile-smtp-module) – Configure SMTP AntiVirus options.
* [fmgr\_antivirus\_profile\_ssh](fmgr_antivirus_profile_ssh_module#ansible-collections-fortinet-fortimanager-fmgr-antivirus-profile-ssh-module) – Configure SFTP and SCP AntiVirus options.
* [fmgr\_apcfgprofile](fmgr_apcfgprofile_module#ansible-collections-fortinet-fortimanager-fmgr-apcfgprofile-module) – Configure AP local configuration profiles.
* [fmgr\_apcfgprofile\_commandlist](fmgr_apcfgprofile_commandlist_module#ansible-collections-fortinet-fortimanager-fmgr-apcfgprofile-commandlist-module) – AP local configuration command list.
* [fmgr\_application\_categories](fmgr_application_categories_module#ansible-collections-fortinet-fortimanager-fmgr-application-categories-module) – no description
* [fmgr\_application\_custom](fmgr_application_custom_module#ansible-collections-fortinet-fortimanager-fmgr-application-custom-module) – Configure custom application signatures.
* [fmgr\_application\_group](fmgr_application_group_module#ansible-collections-fortinet-fortimanager-fmgr-application-group-module) – Configure firewall application groups.
* [fmgr\_application\_list](fmgr_application_list_module#ansible-collections-fortinet-fortimanager-fmgr-application-list-module) – Configure application control lists.
* [fmgr\_application\_list\_defaultnetworkservices](fmgr_application_list_defaultnetworkservices_module#ansible-collections-fortinet-fortimanager-fmgr-application-list-defaultnetworkservices-module) – Default network service entries.
* [fmgr\_application\_list\_entries](fmgr_application_list_entries_module#ansible-collections-fortinet-fortimanager-fmgr-application-list-entries-module) – Application list entries.
* [fmgr\_application\_list\_entries\_parameters](fmgr_application_list_entries_parameters_module#ansible-collections-fortinet-fortimanager-fmgr-application-list-entries-parameters-module) – Application parameters.
* [fmgr\_application\_list\_entries\_parameters\_members](fmgr_application_list_entries_parameters_members_module#ansible-collections-fortinet-fortimanager-fmgr-application-list-entries-parameters-members-module) – Parameter tuple members.
* [fmgr\_authentication\_scheme](fmgr_authentication_scheme_module#ansible-collections-fortinet-fortimanager-fmgr-authentication-scheme-module) – Configure Authentication Schemes.
* [fmgr\_bleprofile](fmgr_bleprofile_module#ansible-collections-fortinet-fortimanager-fmgr-bleprofile-module) – Configure Bluetooth Low Energy profile.
* [fmgr\_bonjourprofile](fmgr_bonjourprofile_module#ansible-collections-fortinet-fortimanager-fmgr-bonjourprofile-module) – Configure Bonjour profiles.
* [fmgr\_bonjourprofile\_policylist](fmgr_bonjourprofile_policylist_module#ansible-collections-fortinet-fortimanager-fmgr-bonjourprofile-policylist-module) – Bonjour policy list.
* [fmgr\_certificate\_template](fmgr_certificate_template_module#ansible-collections-fortinet-fortimanager-fmgr-certificate-template-module) – no description
* [fmgr\_cifs\_domaincontroller](fmgr_cifs_domaincontroller_module#ansible-collections-fortinet-fortimanager-fmgr-cifs-domaincontroller-module) – Define known domain controller servers.
* [fmgr\_cifs\_profile](fmgr_cifs_profile_module#ansible-collections-fortinet-fortimanager-fmgr-cifs-profile-module) – Configure CIFS profile.
* [fmgr\_cifs\_profile\_filefilter](fmgr_cifs_profile_filefilter_module#ansible-collections-fortinet-fortimanager-fmgr-cifs-profile-filefilter-module) – File filter.
* [fmgr\_cifs\_profile\_filefilter\_entries](fmgr_cifs_profile_filefilter_entries_module#ansible-collections-fortinet-fortimanager-fmgr-cifs-profile-filefilter-entries-module) – File filter entries.
* [fmgr\_cifs\_profile\_serverkeytab](fmgr_cifs_profile_serverkeytab_module#ansible-collections-fortinet-fortimanager-fmgr-cifs-profile-serverkeytab-module) – Server keytab.
* [fmgr\_clone](fmgr_clone_module#ansible-collections-fortinet-fortimanager-fmgr-clone-module) – Clone an object in FortiManager.
* [fmgr\_credentialstore\_domaincontroller](fmgr_credentialstore_domaincontroller_module#ansible-collections-fortinet-fortimanager-fmgr-credentialstore-domaincontroller-module) – Define known domain controller servers.
* [fmgr\_devprof\_device\_profile\_fortianalyzer](fmgr_devprof_device_profile_fortianalyzer_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-device-profile-fortianalyzer-module) – no description
* [fmgr\_devprof\_device\_profile\_fortiguard](fmgr_devprof_device_profile_fortiguard_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-device-profile-fortiguard-module) – no description
* [fmgr\_devprof\_import](fmgr_devprof_import_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-import-module) – no description
* [fmgr\_devprof\_log\_fortianalyzer\_setting](fmgr_devprof_log_fortianalyzer_setting_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-log-fortianalyzer-setting-module) – Global FortiAnalyzer settings.
* [fmgr\_devprof\_log\_fortianalyzercloud\_setting](fmgr_devprof_log_fortianalyzercloud_setting_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-log-fortianalyzercloud-setting-module) – Global FortiAnalyzer Cloud settings.
* [fmgr\_devprof\_log\_syslogd\_filter](fmgr_devprof_log_syslogd_filter_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-log-syslogd-filter-module) – Filters for remote system server.
* [fmgr\_devprof\_log\_syslogd\_setting](fmgr_devprof_log_syslogd_setting_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-log-syslogd-setting-module) – Global settings for remote syslog server.
* [fmgr\_devprof\_system\_centralmanagement](fmgr_devprof_system_centralmanagement_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-centralmanagement-module) – Configure central management.
* [fmgr\_devprof\_system\_centralmanagement\_serverlist](fmgr_devprof_system_centralmanagement_serverlist_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-centralmanagement-serverlist-module) – Additional severs that the FortiGate can use for updates
* [fmgr\_devprof\_system\_dns](fmgr_devprof_system_dns_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-dns-module) – Configure DNS.
* [fmgr\_devprof\_system\_emailserver](fmgr_devprof_system_emailserver_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-emailserver-module) – Configure the email server used by the FortiGate various things.
* [fmgr\_devprof\_system\_global](fmgr_devprof_system_global_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-global-module) – Configure global attributes.
* [fmgr\_devprof\_system\_ntp](fmgr_devprof_system_ntp_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-ntp-module) – Configure system NTP information.
* [fmgr\_devprof\_system\_ntp\_ntpserver](fmgr_devprof_system_ntp_ntpserver_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-ntp-ntpserver-module) – Configure the FortiGate to connect to any available third-party NTP server.
* [fmgr\_devprof\_system\_replacemsg\_admin](fmgr_devprof_system_replacemsg_admin_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-admin-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_alertmail](fmgr_devprof_system_replacemsg_alertmail_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-alertmail-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_auth](fmgr_devprof_system_replacemsg_auth_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-auth-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_devicedetectionportal](fmgr_devprof_system_replacemsg_devicedetectionportal_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-devicedetectionportal-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_ec](fmgr_devprof_system_replacemsg_ec_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-ec-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_fortiguardwf](fmgr_devprof_system_replacemsg_fortiguardwf_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-fortiguardwf-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_ftp](fmgr_devprof_system_replacemsg_ftp_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-ftp-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_http](fmgr_devprof_system_replacemsg_http_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-http-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_mail](fmgr_devprof_system_replacemsg_mail_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-mail-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_mms](fmgr_devprof_system_replacemsg_mms_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-mms-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_nacquar](fmgr_devprof_system_replacemsg_nacquar_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-nacquar-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_nntp](fmgr_devprof_system_replacemsg_nntp_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-nntp-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_spam](fmgr_devprof_system_replacemsg_spam_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-spam-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_sslvpn](fmgr_devprof_system_replacemsg_sslvpn_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-sslvpn-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_trafficquota](fmgr_devprof_system_replacemsg_trafficquota_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-trafficquota-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_utm](fmgr_devprof_system_replacemsg_utm_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-utm-module) – Replacement messages.
* [fmgr\_devprof\_system\_replacemsg\_webproxy](fmgr_devprof_system_replacemsg_webproxy_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-replacemsg-webproxy-module) – Replacement messages.
* [fmgr\_devprof\_system\_snmp\_community](fmgr_devprof_system_snmp_community_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-snmp-community-module) – SNMP community configuration.
* [fmgr\_devprof\_system\_snmp\_community\_hosts](fmgr_devprof_system_snmp_community_hosts_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-snmp-community-hosts-module) – Configure IPv4 SNMP managers
* [fmgr\_devprof\_system\_snmp\_community\_hosts6](fmgr_devprof_system_snmp_community_hosts6_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-snmp-community-hosts6-module) – Configure IPv6 SNMP managers.
* [fmgr\_devprof\_system\_snmp\_sysinfo](fmgr_devprof_system_snmp_sysinfo_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-snmp-sysinfo-module) – SNMP system info configuration.
* [fmgr\_devprof\_system\_snmp\_user](fmgr_devprof_system_snmp_user_module#ansible-collections-fortinet-fortimanager-fmgr-devprof-system-snmp-user-module) – SNMP user configuration.
* [fmgr\_dlp\_filepattern](fmgr_dlp_filepattern_module#ansible-collections-fortinet-fortimanager-fmgr-dlp-filepattern-module) – Configure file patterns used by DLP blocking.
* [fmgr\_dlp\_filepattern\_entries](fmgr_dlp_filepattern_entries_module#ansible-collections-fortinet-fortimanager-fmgr-dlp-filepattern-entries-module) – Configure file patterns used by DLP blocking.
* [fmgr\_dlp\_fpsensitivity](fmgr_dlp_fpsensitivity_module#ansible-collections-fortinet-fortimanager-fmgr-dlp-fpsensitivity-module) – Create self-explanatory DLP sensitivity levels to be used when setting sensitivity under config fp-doc-source.
* [fmgr\_dlp\_sensitivity](fmgr_dlp_sensitivity_module#ansible-collections-fortinet-fortimanager-fmgr-dlp-sensitivity-module) – Create self-explanatory DLP sensitivity levels to be used when setting sensitivity under config fp-doc-source.
* [fmgr\_dlp\_sensor](fmgr_dlp_sensor_module#ansible-collections-fortinet-fortimanager-fmgr-dlp-sensor-module) – Configure DLP sensors.
* [fmgr\_dlp\_sensor\_filter](fmgr_dlp_sensor_filter_module#ansible-collections-fortinet-fortimanager-fmgr-dlp-sensor-filter-module) – Set up DLP filters for this sensor.
* [fmgr\_dnsfilter\_domainfilter](fmgr_dnsfilter_domainfilter_module#ansible-collections-fortinet-fortimanager-fmgr-dnsfilter-domainfilter-module) – Configure DNS domain filters.
* [fmgr\_dnsfilter\_domainfilter\_entries](fmgr_dnsfilter_domainfilter_entries_module#ansible-collections-fortinet-fortimanager-fmgr-dnsfilter-domainfilter-entries-module) – DNS domain filter entries.
* [fmgr\_dnsfilter\_profile](fmgr_dnsfilter_profile_module#ansible-collections-fortinet-fortimanager-fmgr-dnsfilter-profile-module) – Configure DNS domain filter profiles.
* [fmgr\_dnsfilter\_profile\_dnstranslation](fmgr_dnsfilter_profile_dnstranslation_module#ansible-collections-fortinet-fortimanager-fmgr-dnsfilter-profile-dnstranslation-module) – DNS translation settings.
* [fmgr\_dnsfilter\_profile\_domainfilter](fmgr_dnsfilter_profile_domainfilter_module#ansible-collections-fortinet-fortimanager-fmgr-dnsfilter-profile-domainfilter-module) – Domain filter settings.
* [fmgr\_dnsfilter\_profile\_ftgddns](fmgr_dnsfilter_profile_ftgddns_module#ansible-collections-fortinet-fortimanager-fmgr-dnsfilter-profile-ftgddns-module) – FortiGuard DNS Filter settings.
* [fmgr\_dnsfilter\_profile\_ftgddns\_filters](fmgr_dnsfilter_profile_ftgddns_filters_module#ansible-collections-fortinet-fortimanager-fmgr-dnsfilter-profile-ftgddns-filters-module) – FortiGuard DNS domain filters.
* [fmgr\_dvm\_cmd\_add\_device](fmgr_dvm_cmd_add_device_module#ansible-collections-fortinet-fortimanager-fmgr-dvm-cmd-add-device-module) – Add a device to the Device Manager database.
* [fmgr\_dvm\_cmd\_add\_devlist](fmgr_dvm_cmd_add_devlist_module#ansible-collections-fortinet-fortimanager-fmgr-dvm-cmd-add-devlist-module) – Add multiple devices to the Device Manager database.
* [fmgr\_dvm\_cmd\_changehaseq](fmgr_dvm_cmd_changehaseq_module#ansible-collections-fortinet-fortimanager-fmgr-dvm-cmd-changehaseq-module) – Modify HA sequence to promote a slave to become the master of the cluster.
* [fmgr\_dvm\_cmd\_del\_device](fmgr_dvm_cmd_del_device_module#ansible-collections-fortinet-fortimanager-fmgr-dvm-cmd-del-device-module) – Delete a device.
* [fmgr\_dvm\_cmd\_del\_devlist](fmgr_dvm_cmd_del_devlist_module#ansible-collections-fortinet-fortimanager-fmgr-dvm-cmd-del-devlist-module) – Delete a list of devices.
* [fmgr\_dvm\_cmd\_discover\_device](fmgr_dvm_cmd_discover_device_module#ansible-collections-fortinet-fortimanager-fmgr-dvm-cmd-discover-device-module) – Probe a remote device and retrieve its device information and system status.
* [fmgr\_dvm\_cmd\_import\_devlist](fmgr_dvm_cmd_import_devlist_module#ansible-collections-fortinet-fortimanager-fmgr-dvm-cmd-import-devlist-module) – Import a list of ADOMs and devices.
* [fmgr\_dvm\_cmd\_reload\_devlist](fmgr_dvm_cmd_reload_devlist_module#ansible-collections-fortinet-fortimanager-fmgr-dvm-cmd-reload-devlist-module) – Retrieve a list of devices.
* [fmgr\_dvm\_cmd\_update\_device](fmgr_dvm_cmd_update_device_module#ansible-collections-fortinet-fortimanager-fmgr-dvm-cmd-update-device-module) – Refresh the FGFM connection and system information of a device.
* [fmgr\_dvm\_cmd\_update\_devlist](fmgr_dvm_cmd_update_devlist_module#ansible-collections-fortinet-fortimanager-fmgr-dvm-cmd-update-devlist-module) – Refresh FGFM connection and system information for a list of devices.
* [fmgr\_dvmdb\_adom](fmgr_dvmdb_adom_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-adom-module) – ADOM table, most attributes are read-only and can only be changed internally.
* [fmgr\_dvmdb\_adom\_objectmember](fmgr_dvmdb_adom_objectmember_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-adom-objectmember-module) – ADOM table, most attributes are read-only and can only be changed internally.
* [fmgr\_dvmdb\_device](fmgr_dvmdb_device_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-device-module) – Device table, most attributes are read-only and can only be changed internally.
* [fmgr\_dvmdb\_device\_replace\_sn](fmgr_dvmdb_device_replace_sn_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-device-replace-sn-module) – Replace devices serial number with new value.
* [fmgr\_dvmdb\_device\_vdom](fmgr_dvmdb_device_vdom_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-device-vdom-module) – Device VDOM table.
* [fmgr\_dvmdb\_folder](fmgr_dvmdb_folder_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-folder-module) – no description
* [fmgr\_dvmdb\_group](fmgr_dvmdb_group_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-group-module) – Device group table.
* [fmgr\_dvmdb\_group\_objectmember](fmgr_dvmdb_group_objectmember_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-group-objectmember-module) – Device group table.
* [fmgr\_dvmdb\_metafields\_adom](fmgr_dvmdb_metafields_adom_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-metafields-adom-module) – no description
* [fmgr\_dvmdb\_metafields\_device](fmgr_dvmdb_metafields_device_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-metafields-device-module) – no description
* [fmgr\_dvmdb\_metafields\_group](fmgr_dvmdb_metafields_group_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-metafields-group-module) – no description
* [fmgr\_dvmdb\_revision](fmgr_dvmdb_revision_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-revision-module) – ADOM revision table.
* [fmgr\_dvmdb\_script](fmgr_dvmdb_script_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-script-module) – Script table.
* [fmgr\_dvmdb\_script\_execute](fmgr_dvmdb_script_execute_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-script-execute-module) – Run script.
* [fmgr\_dvmdb\_script\_objectmember](fmgr_dvmdb_script_objectmember_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-script-objectmember-module) – Script table.
* [fmgr\_dvmdb\_script\_scriptschedule](fmgr_dvmdb_script_scriptschedule_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-script-scriptschedule-module) – Script schedule table.
* [fmgr\_dvmdb\_workflow\_approve](fmgr_dvmdb_workflow_approve_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workflow-approve-module) – no description
* [fmgr\_dvmdb\_workflow\_discard](fmgr_dvmdb_workflow_discard_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workflow-discard-module) – no description
* [fmgr\_dvmdb\_workflow\_drop](fmgr_dvmdb_workflow_drop_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workflow-drop-module) – no description
* [fmgr\_dvmdb\_workflow\_reject](fmgr_dvmdb_workflow_reject_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workflow-reject-module) – no description
* [fmgr\_dvmdb\_workflow\_repair](fmgr_dvmdb_workflow_repair_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workflow-repair-module) – no description
* [fmgr\_dvmdb\_workflow\_revert](fmgr_dvmdb_workflow_revert_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workflow-revert-module) – no description
* [fmgr\_dvmdb\_workflow\_review](fmgr_dvmdb_workflow_review_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workflow-review-module) – no description
* [fmgr\_dvmdb\_workflow\_save](fmgr_dvmdb_workflow_save_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workflow-save-module) – no description
* [fmgr\_dvmdb\_workflow\_start](fmgr_dvmdb_workflow_start_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workflow-start-module) – Continue a workflow session.
* [fmgr\_dvmdb\_workflow\_submit](fmgr_dvmdb_workflow_submit_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workflow-submit-module) – no description
* [fmgr\_dvmdb\_workspace\_commit](fmgr_dvmdb_workspace_commit_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workspace-commit-module) – Commit change
* [fmgr\_dvmdb\_workspace\_commit\_dev](fmgr_dvmdb_workspace_commit_dev_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workspace-commit-dev-module) – Commit change
* [fmgr\_dvmdb\_workspace\_commit\_obj](fmgr_dvmdb_workspace_commit_obj_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workspace-commit-obj-module) – Commit change
* [fmgr\_dvmdb\_workspace\_commit\_pkg](fmgr_dvmdb_workspace_commit_pkg_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workspace-commit-pkg-module) – Commit change
* [fmgr\_dvmdb\_workspace\_lock](fmgr_dvmdb_workspace_lock_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workspace-lock-module) – Lock an entire ADOM.
* [fmgr\_dvmdb\_workspace\_lock\_dev](fmgr_dvmdb_workspace_lock_dev_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workspace-lock-dev-module) – Lock a device.
* [fmgr\_dvmdb\_workspace\_lock\_obj](fmgr_dvmdb_workspace_lock_obj_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workspace-lock-obj-module) – Lock a specific object, where the url contains the full path to the object
* [fmgr\_dvmdb\_workspace\_lock\_pkg](fmgr_dvmdb_workspace_lock_pkg_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workspace-lock-pkg-module) – Lock a specific package, where the url includes both the folder
* [fmgr\_dvmdb\_workspace\_unlock](fmgr_dvmdb_workspace_unlock_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workspace-unlock-module) – Unlock an entire ADOM.
* [fmgr\_dvmdb\_workspace\_unlock\_dev](fmgr_dvmdb_workspace_unlock_dev_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workspace-unlock-dev-module) – Unlock a device.
* [fmgr\_dvmdb\_workspace\_unlock\_obj](fmgr_dvmdb_workspace_unlock_obj_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workspace-unlock-obj-module) – Unlock a specific object, where the url contains the full path to the object
* [fmgr\_dvmdb\_workspace\_unlock\_pkg](fmgr_dvmdb_workspace_unlock_pkg_module#ansible-collections-fortinet-fortimanager-fmgr-dvmdb-workspace-unlock-pkg-module) – Unlock a specific package, where the url includes both the folder
* [fmgr\_dynamic\_address](fmgr_dynamic_address_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-address-module) – no description
* [fmgr\_dynamic\_address\_dynamicaddrmapping](fmgr_dynamic_address_dynamicaddrmapping_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-address-dynamicaddrmapping-module) – no description
* [fmgr\_dynamic\_certificate\_local](fmgr_dynamic_certificate_local_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-certificate-local-module) – no description
* [fmgr\_dynamic\_certificate\_local\_dynamicmapping](fmgr_dynamic_certificate_local_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-certificate-local-dynamicmapping-module) – no description
* [fmgr\_dynamic\_input\_interface](fmgr_dynamic_input_interface_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-input-interface-module) – no description
* [fmgr\_dynamic\_input\_interface\_dynamicmapping](fmgr_dynamic_input_interface_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-input-interface-dynamicmapping-module) – no description
* [fmgr\_dynamic\_interface](fmgr_dynamic_interface_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-interface-module) – no description
* [fmgr\_dynamic\_interface\_dynamicmapping](fmgr_dynamic_interface_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-interface-dynamicmapping-module) – no description
* [fmgr\_dynamic\_interface\_platformmapping](fmgr_dynamic_interface_platformmapping_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-interface-platformmapping-module) – no description
* [fmgr\_dynamic\_ippool](fmgr_dynamic_ippool_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-ippool-module) – no description
* [fmgr\_dynamic\_multicast\_interface](fmgr_dynamic_multicast_interface_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-multicast-interface-module) – no description
* [fmgr\_dynamic\_multicast\_interface\_dynamicmapping](fmgr_dynamic_multicast_interface_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-multicast-interface-dynamicmapping-module) – no description
* [fmgr\_dynamic\_vip](fmgr_dynamic_vip_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-vip-module) – no description
* [fmgr\_dynamic\_virtualwanlink\_members](fmgr_dynamic_virtualwanlink_members_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-virtualwanlink-members-module) – no description
* [fmgr\_dynamic\_virtualwanlink\_members\_dynamicmapping](fmgr_dynamic_virtualwanlink_members_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-virtualwanlink-members-dynamicmapping-module) – no description
* [fmgr\_dynamic\_virtualwanlink\_neighbor](fmgr_dynamic_virtualwanlink_neighbor_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-virtualwanlink-neighbor-module) – no description
* [fmgr\_dynamic\_virtualwanlink\_neighbor\_dynamicmapping](fmgr_dynamic_virtualwanlink_neighbor_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-virtualwanlink-neighbor-dynamicmapping-module) – no description
* [fmgr\_dynamic\_virtualwanlink\_server](fmgr_dynamic_virtualwanlink_server_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-virtualwanlink-server-module) – no description
* [fmgr\_dynamic\_virtualwanlink\_server\_dynamicmapping](fmgr_dynamic_virtualwanlink_server_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-virtualwanlink-server-dynamicmapping-module) – no description
* [fmgr\_dynamic\_vpntunnel](fmgr_dynamic_vpntunnel_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-vpntunnel-module) – no description
* [fmgr\_dynamic\_vpntunnel\_dynamicmapping](fmgr_dynamic_vpntunnel_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-dynamic-vpntunnel-dynamicmapping-module) – no description
* [fmgr\_emailfilter\_blockallowlist](fmgr_emailfilter_blockallowlist_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-blockallowlist-module) – Configure anti-spam block/allow list.
* [fmgr\_emailfilter\_blockallowlist\_entries](fmgr_emailfilter_blockallowlist_entries_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-blockallowlist-entries-module) – Anti-spam block/allow entries.
* [fmgr\_emailfilter\_bwl](fmgr_emailfilter_bwl_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-bwl-module) – Configure anti-spam black/white list.
* [fmgr\_emailfilter\_bwl\_entries](fmgr_emailfilter_bwl_entries_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-bwl-entries-module) – Anti-spam black/white list entries.
* [fmgr\_emailfilter\_bword](fmgr_emailfilter_bword_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-bword-module) – Configure AntiSpam banned word list.
* [fmgr\_emailfilter\_bword\_entries](fmgr_emailfilter_bword_entries_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-bword-entries-module) – Spam filter banned word.
* [fmgr\_emailfilter\_dnsbl](fmgr_emailfilter_dnsbl_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-dnsbl-module) – Configure AntiSpam DNSBL/ORBL.
* [fmgr\_emailfilter\_dnsbl\_entries](fmgr_emailfilter_dnsbl_entries_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-dnsbl-entries-module) – Spam filter DNSBL and ORBL server.
* [fmgr\_emailfilter\_fortishield](fmgr_emailfilter_fortishield_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-fortishield-module) – Configure FortiGuard - AntiSpam.
* [fmgr\_emailfilter\_iptrust](fmgr_emailfilter_iptrust_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-iptrust-module) – Configure AntiSpam IP trust.
* [fmgr\_emailfilter\_iptrust\_entries](fmgr_emailfilter_iptrust_entries_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-iptrust-entries-module) – Spam filter trusted IP addresses.
* [fmgr\_emailfilter\_mheader](fmgr_emailfilter_mheader_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-mheader-module) – Configure AntiSpam MIME header.
* [fmgr\_emailfilter\_mheader\_entries](fmgr_emailfilter_mheader_entries_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-mheader-entries-module) – Spam filter mime header content.
* [fmgr\_emailfilter\_options](fmgr_emailfilter_options_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-options-module) – Configure AntiSpam options.
* [fmgr\_emailfilter\_profile](fmgr_emailfilter_profile_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-profile-module) – Configure Email Filter profiles.
* [fmgr\_emailfilter\_profile\_filefilter](fmgr_emailfilter_profile_filefilter_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-profile-filefilter-module) – File filter.
* [fmgr\_emailfilter\_profile\_filefilter\_entries](fmgr_emailfilter_profile_filefilter_entries_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-profile-filefilter-entries-module) – File filter entries.
* [fmgr\_emailfilter\_profile\_gmail](fmgr_emailfilter_profile_gmail_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-profile-gmail-module) – Gmail.
* [fmgr\_emailfilter\_profile\_imap](fmgr_emailfilter_profile_imap_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-profile-imap-module) – IMAP.
* [fmgr\_emailfilter\_profile\_mapi](fmgr_emailfilter_profile_mapi_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-profile-mapi-module) – MAPI.
* [fmgr\_emailfilter\_profile\_msnhotmail](fmgr_emailfilter_profile_msnhotmail_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-profile-msnhotmail-module) – MSN Hotmail.
* [fmgr\_emailfilter\_profile\_otherwebmails](fmgr_emailfilter_profile_otherwebmails_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-profile-otherwebmails-module) – Other supported webmails.
* [fmgr\_emailfilter\_profile\_pop3](fmgr_emailfilter_profile_pop3_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-profile-pop3-module) – POP3.
* [fmgr\_emailfilter\_profile\_smtp](fmgr_emailfilter_profile_smtp_module#ansible-collections-fortinet-fortimanager-fmgr-emailfilter-profile-smtp-module) – SMTP.
* [fmgr\_exec\_fgfm\_reclaimdevtunnel](fmgr_exec_fgfm_reclaimdevtunnel_module#ansible-collections-fortinet-fortimanager-fmgr-exec-fgfm-reclaimdevtunnel-module) – Reclaim management tunnel to device.
* [fmgr\_extendercontroller\_dataplan](fmgr_extendercontroller_dataplan_module#ansible-collections-fortinet-fortimanager-fmgr-extendercontroller-dataplan-module) – FortiExtender dataplan configuration.
* [fmgr\_extendercontroller\_simprofile](fmgr_extendercontroller_simprofile_module#ansible-collections-fortinet-fortimanager-fmgr-extendercontroller-simprofile-module) – no description
* [fmgr\_extendercontroller\_simprofile\_autoswitchprofile](fmgr_extendercontroller_simprofile_autoswitchprofile_module#ansible-collections-fortinet-fortimanager-fmgr-extendercontroller-simprofile-autoswitchprofile-module) – no description
* [fmgr\_extendercontroller\_template](fmgr_extendercontroller_template_module#ansible-collections-fortinet-fortimanager-fmgr-extendercontroller-template-module) – no description
* [fmgr\_fact](fmgr_fact_module#ansible-collections-fortinet-fortimanager-fmgr-fact-module) – Gather fortimanager facts.
* [fmgr\_filefilter\_profile](fmgr_filefilter_profile_module#ansible-collections-fortinet-fortimanager-fmgr-filefilter-profile-module) – Configure file-filter profiles.
* [fmgr\_filefilter\_profile\_rules](fmgr_filefilter_profile_rules_module#ansible-collections-fortinet-fortimanager-fmgr-filefilter-profile-rules-module) – File filter rules.
* [fmgr\_firewall\_accessproxy](fmgr_firewall_accessproxy_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-accessproxy-module) – Configure Access Proxy.
* [fmgr\_firewall\_accessproxy\_apigateway](fmgr_firewall_accessproxy_apigateway_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-accessproxy-apigateway-module) – Set API Gateway.
* [fmgr\_firewall\_accessproxy\_apigateway\_realservers](fmgr_firewall_accessproxy_apigateway_realservers_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-accessproxy-apigateway-realservers-module) – Select the real servers that this Access Proxy will distribute traffic to.
* [fmgr\_firewall\_accessproxy\_apigateway\_sslciphersuites](fmgr_firewall_accessproxy_apigateway_sslciphersuites_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-accessproxy-apigateway-sslciphersuites-module) – SSL/TLS cipher suites to offer to a server, ordered by priority.
* [fmgr\_firewall\_accessproxy\_realservers](fmgr_firewall_accessproxy_realservers_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-accessproxy-realservers-module) – Select the SSL real servers that this Access Proxy will distribute traffic to.
* [fmgr\_firewall\_accessproxy\_serverpubkeyauthsettings](fmgr_firewall_accessproxy_serverpubkeyauthsettings_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-accessproxy-serverpubkeyauthsettings-module) – Server SSH public key authentication settings.
* [fmgr\_firewall\_accessproxy\_serverpubkeyauthsettings\_certextension](fmgr_firewall_accessproxy_serverpubkeyauthsettings_certextension_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-accessproxy-serverpubkeyauthsettings-certextension-module) – Configure certificate extension for user certificate.
* [fmgr\_firewall\_address](fmgr_firewall_address_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-address-module) – Configure IPv4 addresses.
* [fmgr\_firewall\_address6](fmgr_firewall_address6_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-address6-module) – Configure IPv6 firewall addresses.
* [fmgr\_firewall\_address6\_dynamicmapping](fmgr_firewall_address6_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-address6-dynamicmapping-module) – Configure IPv6 firewall addresses.
* [fmgr\_firewall\_address6\_dynamicmapping\_subnetsegment](fmgr_firewall_address6_dynamicmapping_subnetsegment_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-address6-dynamicmapping-subnetsegment-module) – IPv6 subnet segments.
* [fmgr\_firewall\_address6\_list](fmgr_firewall_address6_list_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-address6-list-module) – IP address list.
* [fmgr\_firewall\_address6\_subnetsegment](fmgr_firewall_address6_subnetsegment_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-address6-subnetsegment-module) – IPv6 subnet segments.
* [fmgr\_firewall\_address6\_tagging](fmgr_firewall_address6_tagging_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-address6-tagging-module) – Config object tagging
* [fmgr\_firewall\_address6template](fmgr_firewall_address6template_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-address6template-module) – Configure IPv6 address templates.
* [fmgr\_firewall\_address6template\_subnetsegment](fmgr_firewall_address6template_subnetsegment_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-address6template-subnetsegment-module) – IPv6 subnet segments.
* [fmgr\_firewall\_address6template\_subnetsegment\_values](fmgr_firewall_address6template_subnetsegment_values_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-address6template-subnetsegment-values-module) – Subnet segment values.
* [fmgr\_firewall\_address\_dynamicmapping](fmgr_firewall_address_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-address-dynamicmapping-module) – Configure IPv4 addresses.
* [fmgr\_firewall\_address\_list](fmgr_firewall_address_list_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-address-list-module) – IP address list.
* [fmgr\_firewall\_address\_tagging](fmgr_firewall_address_tagging_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-address-tagging-module) – Config object tagging.
* [fmgr\_firewall\_addrgrp](fmgr_firewall_addrgrp_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-addrgrp-module) – Configure IPv4 address groups.
* [fmgr\_firewall\_addrgrp6](fmgr_firewall_addrgrp6_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-addrgrp6-module) – Configure IPv6 address groups.
* [fmgr\_firewall\_addrgrp6\_dynamicmapping](fmgr_firewall_addrgrp6_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-addrgrp6-dynamicmapping-module) – Configure IPv6 address groups.
* [fmgr\_firewall\_addrgrp6\_tagging](fmgr_firewall_addrgrp6_tagging_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-addrgrp6-tagging-module) – Config object tagging.
* [fmgr\_firewall\_addrgrp\_dynamicmapping](fmgr_firewall_addrgrp_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-addrgrp-dynamicmapping-module) – Configure IPv4 address groups.
* [fmgr\_firewall\_addrgrp\_tagging](fmgr_firewall_addrgrp_tagging_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-addrgrp-tagging-module) – Config object tagging.
* [fmgr\_firewall\_carrierendpointbwl](fmgr_firewall_carrierendpointbwl_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-carrierendpointbwl-module) – Carrier end point black/white list tables.
* [fmgr\_firewall\_carrierendpointbwl\_entries](fmgr_firewall_carrierendpointbwl_entries_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-carrierendpointbwl-entries-module) – Carrier end point black/white list.
* [fmgr\_firewall\_decryptedtrafficmirror](fmgr_firewall_decryptedtrafficmirror_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-decryptedtrafficmirror-module) – Configure decrypted traffic mirror.
* [fmgr\_firewall\_gtp](fmgr_firewall_gtp_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-gtp-module) – Configure GTP.
* [fmgr\_firewall\_gtp\_apn](fmgr_firewall_gtp_apn_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-gtp-apn-module) – APN.
* [fmgr\_firewall\_gtp\_ieremovepolicy](fmgr_firewall_gtp_ieremovepolicy_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-gtp-ieremovepolicy-module) – IE remove policy.
* [fmgr\_firewall\_gtp\_ievalidation](fmgr_firewall_gtp_ievalidation_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-gtp-ievalidation-module) – IE validation.
* [fmgr\_firewall\_gtp\_imsi](fmgr_firewall_gtp_imsi_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-gtp-imsi-module) – IMSI.
* [fmgr\_firewall\_gtp\_ippolicy](fmgr_firewall_gtp_ippolicy_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-gtp-ippolicy-module) – IP policy.
* [fmgr\_firewall\_gtp\_messageratelimit](fmgr_firewall_gtp_messageratelimit_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-gtp-messageratelimit-module) – Message rate limiting.
* [fmgr\_firewall\_gtp\_messageratelimitv0](fmgr_firewall_gtp_messageratelimitv0_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-gtp-messageratelimitv0-module) – Message rate limiting for GTP version 0.
* [fmgr\_firewall\_gtp\_messageratelimitv1](fmgr_firewall_gtp_messageratelimitv1_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-gtp-messageratelimitv1-module) – Message rate limiting for GTP version 1.
* [fmgr\_firewall\_gtp\_messageratelimitv2](fmgr_firewall_gtp_messageratelimitv2_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-gtp-messageratelimitv2-module) – Message rate limiting for GTP version 2.
* [fmgr\_firewall\_gtp\_noippolicy](fmgr_firewall_gtp_noippolicy_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-gtp-noippolicy-module) – No IP policy.
* [fmgr\_firewall\_gtp\_perapnshaper](fmgr_firewall_gtp_perapnshaper_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-gtp-perapnshaper-module) – Per APN shaper.
* [fmgr\_firewall\_gtp\_policy](fmgr_firewall_gtp_policy_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-gtp-policy-module) – Policy.
* [fmgr\_firewall\_gtp\_policyv2](fmgr_firewall_gtp_policyv2_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-gtp-policyv2-module) – Apply allow or deny action to each GTPv2-c packet.
* [fmgr\_firewall\_identitybasedroute](fmgr_firewall_identitybasedroute_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-identitybasedroute-module) – Configure identity based routing.
* [fmgr\_firewall\_identitybasedroute\_rule](fmgr_firewall_identitybasedroute_rule_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-identitybasedroute-rule-module) – Rule.
* [fmgr\_firewall\_internetservice](fmgr_firewall_internetservice_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-internetservice-module) – Show Internet Service application.
* [fmgr\_firewall\_internetservice\_entry](fmgr_firewall_internetservice_entry_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-internetservice-entry-module) – Entries in the Internet Service database.
* [fmgr\_firewall\_internetserviceaddition](fmgr_firewall_internetserviceaddition_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-internetserviceaddition-module) – Configure Internet Services Addition.
* [fmgr\_firewall\_internetserviceaddition\_entry](fmgr_firewall_internetserviceaddition_entry_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-internetserviceaddition-entry-module) – Entries added to the Internet Service addition database.
* [fmgr\_firewall\_internetserviceaddition\_entry\_portrange](fmgr_firewall_internetserviceaddition_entry_portrange_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-internetserviceaddition-entry-portrange-module) – Port ranges in the custom entry.
* [fmgr\_firewall\_internetservicecustom](fmgr_firewall_internetservicecustom_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-internetservicecustom-module) – Configure custom Internet Services.
* [fmgr\_firewall\_internetservicecustom\_disableentry](fmgr_firewall_internetservicecustom_disableentry_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-internetservicecustom-disableentry-module) – Disable entries in the Internet Service database.
* [fmgr\_firewall\_internetservicecustom\_disableentry\_iprange](fmgr_firewall_internetservicecustom_disableentry_iprange_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-internetservicecustom-disableentry-iprange-module) – IP ranges in the disable entry.
* [fmgr\_firewall\_internetservicecustom\_entry](fmgr_firewall_internetservicecustom_entry_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-internetservicecustom-entry-module) – Entries added to the Internet Service database and custom database.
* [fmgr\_firewall\_internetservicecustom\_entry\_portrange](fmgr_firewall_internetservicecustom_entry_portrange_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-internetservicecustom-entry-portrange-module) – Port ranges in the custom entry.
* [fmgr\_firewall\_internetservicecustomgroup](fmgr_firewall_internetservicecustomgroup_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-internetservicecustomgroup-module) – Configure custom Internet Service group.
* [fmgr\_firewall\_internetservicegroup](fmgr_firewall_internetservicegroup_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-internetservicegroup-module) – Configure group of Internet Service.
* [fmgr\_firewall\_internetservicename](fmgr_firewall_internetservicename_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-internetservicename-module) – Define internet service names.
* [fmgr\_firewall\_ippool](fmgr_firewall_ippool_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-ippool-module) – Configure IPv4 IP pools.
* [fmgr\_firewall\_ippool6](fmgr_firewall_ippool6_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-ippool6-module) – Configure IPv6 IP pools.
* [fmgr\_firewall\_ippool6\_dynamicmapping](fmgr_firewall_ippool6_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-ippool6-dynamicmapping-module) – Configure IPv6 IP pools.
* [fmgr\_firewall\_ippool\_dynamicmapping](fmgr_firewall_ippool_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-ippool-dynamicmapping-module) – Configure IPv4 IP pools.
* [fmgr\_firewall\_ldbmonitor](fmgr_firewall_ldbmonitor_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-ldbmonitor-module) – Configure server load balancing health monitors.
* [fmgr\_firewall\_mmsprofile](fmgr_firewall_mmsprofile_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-mmsprofile-module) – Configure MMS profiles.
* [fmgr\_firewall\_mmsprofile\_dupe](fmgr_firewall_mmsprofile_dupe_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-mmsprofile-dupe-module) – Duplicate configuration.
* [fmgr\_firewall\_mmsprofile\_flood](fmgr_firewall_mmsprofile_flood_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-mmsprofile-flood-module) – Flood configuration.
* [fmgr\_firewall\_mmsprofile\_notification](fmgr_firewall_mmsprofile_notification_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-mmsprofile-notification-module) – Notification configuration.
* [fmgr\_firewall\_mmsprofile\_notifmsisdn](fmgr_firewall_mmsprofile_notifmsisdn_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-mmsprofile-notifmsisdn-module) – Notification for MSISDNs.
* [fmgr\_firewall\_mmsprofile\_outbreakprevention](fmgr_firewall_mmsprofile_outbreakprevention_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-mmsprofile-outbreakprevention-module) – Configure Virus Outbreak Prevention settings.
* [fmgr\_firewall\_multicastaddress](fmgr_firewall_multicastaddress_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-multicastaddress-module) – Configure multicast addresses.
* [fmgr\_firewall\_multicastaddress6](fmgr_firewall_multicastaddress6_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-multicastaddress6-module) – Configure IPv6 multicast address.
* [fmgr\_firewall\_multicastaddress6\_tagging](fmgr_firewall_multicastaddress6_tagging_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-multicastaddress6-tagging-module) – Config object tagging.
* [fmgr\_firewall\_multicastaddress\_tagging](fmgr_firewall_multicastaddress_tagging_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-multicastaddress-tagging-module) – Config object tagging.
* [fmgr\_firewall\_profilegroup](fmgr_firewall_profilegroup_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profilegroup-module) – Configure profile groups.
* [fmgr\_firewall\_profileprotocoloptions](fmgr_firewall_profileprotocoloptions_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-module) – Configure protocol options.
* [fmgr\_firewall\_profileprotocoloptions\_cifs](fmgr_firewall_profileprotocoloptions_cifs_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-cifs-module) – Configure CIFS protocol options.
* [fmgr\_firewall\_profileprotocoloptions\_cifs\_filefilter](fmgr_firewall_profileprotocoloptions_cifs_filefilter_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-cifs-filefilter-module) – File filter.
* [fmgr\_firewall\_profileprotocoloptions\_cifs\_filefilter\_entries](fmgr_firewall_profileprotocoloptions_cifs_filefilter_entries_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-cifs-filefilter-entries-module) – File filter entries.
* [fmgr\_firewall\_profileprotocoloptions\_cifs\_serverkeytab](fmgr_firewall_profileprotocoloptions_cifs_serverkeytab_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-cifs-serverkeytab-module) – Server keytab.
* [fmgr\_firewall\_profileprotocoloptions\_dns](fmgr_firewall_profileprotocoloptions_dns_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-dns-module) – Configure DNS protocol options.
* [fmgr\_firewall\_profileprotocoloptions\_ftp](fmgr_firewall_profileprotocoloptions_ftp_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-ftp-module) – Configure FTP protocol options.
* [fmgr\_firewall\_profileprotocoloptions\_http](fmgr_firewall_profileprotocoloptions_http_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-http-module) – Configure HTTP protocol options.
* [fmgr\_firewall\_profileprotocoloptions\_imap](fmgr_firewall_profileprotocoloptions_imap_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-imap-module) – Configure IMAP protocol options.
* [fmgr\_firewall\_profileprotocoloptions\_mailsignature](fmgr_firewall_profileprotocoloptions_mailsignature_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-mailsignature-module) – Configure Mail signature.
* [fmgr\_firewall\_profileprotocoloptions\_mapi](fmgr_firewall_profileprotocoloptions_mapi_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-mapi-module) – Configure MAPI protocol options.
* [fmgr\_firewall\_profileprotocoloptions\_nntp](fmgr_firewall_profileprotocoloptions_nntp_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-nntp-module) – Configure NNTP protocol options.
* [fmgr\_firewall\_profileprotocoloptions\_pop3](fmgr_firewall_profileprotocoloptions_pop3_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-pop3-module) – Configure POP3 protocol options.
* [fmgr\_firewall\_profileprotocoloptions\_smtp](fmgr_firewall_profileprotocoloptions_smtp_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-smtp-module) – Configure SMTP protocol options.
* [fmgr\_firewall\_profileprotocoloptions\_ssh](fmgr_firewall_profileprotocoloptions_ssh_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-profileprotocoloptions-ssh-module) – Configure SFTP and SCP protocol options.
* [fmgr\_firewall\_proxyaddress](fmgr_firewall_proxyaddress_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-proxyaddress-module) – Web proxy address configuration.
* [fmgr\_firewall\_proxyaddress\_headergroup](fmgr_firewall_proxyaddress_headergroup_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-proxyaddress-headergroup-module) – HTTP header group.
* [fmgr\_firewall\_proxyaddress\_tagging](fmgr_firewall_proxyaddress_tagging_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-proxyaddress-tagging-module) – Config object tagging.
* [fmgr\_firewall\_proxyaddrgrp](fmgr_firewall_proxyaddrgrp_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-proxyaddrgrp-module) – Web proxy address group configuration.
* [fmgr\_firewall\_proxyaddrgrp\_tagging](fmgr_firewall_proxyaddrgrp_tagging_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-proxyaddrgrp-tagging-module) – Config object tagging.
* [fmgr\_firewall\_schedule\_group](fmgr_firewall_schedule_group_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-schedule-group-module) – Schedule group configuration.
* [fmgr\_firewall\_schedule\_onetime](fmgr_firewall_schedule_onetime_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-schedule-onetime-module) – Onetime schedule configuration.
* [fmgr\_firewall\_schedule\_recurring](fmgr_firewall_schedule_recurring_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-schedule-recurring-module) – Recurring schedule configuration.
* [fmgr\_firewall\_service\_category](fmgr_firewall_service_category_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-service-category-module) – Configure service categories.
* [fmgr\_firewall\_service\_custom](fmgr_firewall_service_custom_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-service-custom-module) – Configure custom services.
* [fmgr\_firewall\_service\_group](fmgr_firewall_service_group_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-service-group-module) – Configure service groups.
* [fmgr\_firewall\_shaper\_peripshaper](fmgr_firewall_shaper_peripshaper_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-shaper-peripshaper-module) – Configure per-IP traffic shaper.
* [fmgr\_firewall\_shaper\_trafficshaper](fmgr_firewall_shaper_trafficshaper_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-shaper-trafficshaper-module) – Configure shared traffic shaper.
* [fmgr\_firewall\_shapingprofile](fmgr_firewall_shapingprofile_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-shapingprofile-module) – Configure shaping profiles.
* [fmgr\_firewall\_shapingprofile\_shapingentries](fmgr_firewall_shapingprofile_shapingentries_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-shapingprofile-shapingentries-module) – Define shaping entries of this shaping profile.
* [fmgr\_firewall\_ssh\_localca](fmgr_firewall_ssh_localca_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-ssh-localca-module) – SSH proxy local CA.
* [fmgr\_firewall\_sslsshprofile](fmgr_firewall_sslsshprofile_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-sslsshprofile-module) – Configure SSL/SSH protocol options.
* [fmgr\_firewall\_sslsshprofile\_dot](fmgr_firewall_sslsshprofile_dot_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-sslsshprofile-dot-module) – Configure DNS over TLS options.
* [fmgr\_firewall\_sslsshprofile\_ftps](fmgr_firewall_sslsshprofile_ftps_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-sslsshprofile-ftps-module) – Configure FTPS options.
* [fmgr\_firewall\_sslsshprofile\_https](fmgr_firewall_sslsshprofile_https_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-sslsshprofile-https-module) – Configure HTTPS options.
* [fmgr\_firewall\_sslsshprofile\_imaps](fmgr_firewall_sslsshprofile_imaps_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-sslsshprofile-imaps-module) – Configure IMAPS options.
* [fmgr\_firewall\_sslsshprofile\_pop3s](fmgr_firewall_sslsshprofile_pop3s_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-sslsshprofile-pop3s-module) – Configure POP3S options.
* [fmgr\_firewall\_sslsshprofile\_smtps](fmgr_firewall_sslsshprofile_smtps_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-sslsshprofile-smtps-module) – Configure SMTPS options.
* [fmgr\_firewall\_sslsshprofile\_ssh](fmgr_firewall_sslsshprofile_ssh_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-sslsshprofile-ssh-module) – Configure SSH options.
* [fmgr\_firewall\_sslsshprofile\_ssl](fmgr_firewall_sslsshprofile_ssl_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-sslsshprofile-ssl-module) – Configure SSL options.
* [fmgr\_firewall\_sslsshprofile\_sslexempt](fmgr_firewall_sslsshprofile_sslexempt_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-sslsshprofile-sslexempt-module) – Servers to exempt from SSL inspection.
* [fmgr\_firewall\_sslsshprofile\_sslserver](fmgr_firewall_sslsshprofile_sslserver_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-sslsshprofile-sslserver-module) – SSL servers.
* [fmgr\_firewall\_trafficclass](fmgr_firewall_trafficclass_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-trafficclass-module) – Configure names for shaping classes.
* [fmgr\_firewall\_vip](fmgr_firewall_vip_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip-module) – Configure virtual IP for IPv4.
* [fmgr\_firewall\_vip46](fmgr_firewall_vip46_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip46-module) – Configure IPv4 to IPv6 virtual IPs.
* [fmgr\_firewall\_vip46\_dynamicmapping](fmgr_firewall_vip46_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip46-dynamicmapping-module) – Configure IPv4 to IPv6 virtual IPs.
* [fmgr\_firewall\_vip46\_realservers](fmgr_firewall_vip46_realservers_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip46-realservers-module) – Real servers.
* [fmgr\_firewall\_vip6](fmgr_firewall_vip6_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip6-module) – Configure virtual IP for IPv6.
* [fmgr\_firewall\_vip64](fmgr_firewall_vip64_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip64-module) – Configure IPv6 to IPv4 virtual IPs.
* [fmgr\_firewall\_vip64\_dynamicmapping](fmgr_firewall_vip64_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip64-dynamicmapping-module) – Configure IPv6 to IPv4 virtual IPs.
* [fmgr\_firewall\_vip64\_realservers](fmgr_firewall_vip64_realservers_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip64-realservers-module) – Real servers.
* [fmgr\_firewall\_vip6\_dynamicmapping](fmgr_firewall_vip6_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip6-dynamicmapping-module) – Configure virtual IP for IPv6.
* [fmgr\_firewall\_vip6\_realservers](fmgr_firewall_vip6_realservers_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip6-realservers-module) – Select the real servers that this server load balancing VIP will distribute traffic to.
* [fmgr\_firewall\_vip6\_sslciphersuites](fmgr_firewall_vip6_sslciphersuites_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip6-sslciphersuites-module) – SSL/TLS cipher suites acceptable from a client, ordered by priority.
* [fmgr\_firewall\_vip6\_sslserverciphersuites](fmgr_firewall_vip6_sslserverciphersuites_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip6-sslserverciphersuites-module) – SSL/TLS cipher suites to offer to a server, ordered by priority.
* [fmgr\_firewall\_vip\_dynamicmapping](fmgr_firewall_vip_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip-dynamicmapping-module) – Configure virtual IP for IPv4.
* [fmgr\_firewall\_vip\_dynamicmapping\_realservers](fmgr_firewall_vip_dynamicmapping_realservers_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip-dynamicmapping-realservers-module) – Select the real servers that this server load balancing VIP will distribute traffic to.
* [fmgr\_firewall\_vip\_dynamicmapping\_sslciphersuites](fmgr_firewall_vip_dynamicmapping_sslciphersuites_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip-dynamicmapping-sslciphersuites-module) – SSL/TLS cipher suites acceptable from a client, ordered by priority.
* [fmgr\_firewall\_vip\_realservers](fmgr_firewall_vip_realservers_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip-realservers-module) – Select the real servers that this server load balancing VIP will distribute traffic to.
* [fmgr\_firewall\_vip\_sslciphersuites](fmgr_firewall_vip_sslciphersuites_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip-sslciphersuites-module) – SSL/TLS cipher suites acceptable from a client, ordered by priority.
* [fmgr\_firewall\_vip\_sslserverciphersuites](fmgr_firewall_vip_sslserverciphersuites_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vip-sslserverciphersuites-module) – SSL/TLS cipher suites to offer to a server, ordered by priority.
* [fmgr\_firewall\_vipgrp](fmgr_firewall_vipgrp_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vipgrp-module) – Configure IPv4 virtual IP groups.
* [fmgr\_firewall\_vipgrp46](fmgr_firewall_vipgrp46_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vipgrp46-module) – Configure IPv4 to IPv6 virtual IP groups.
* [fmgr\_firewall\_vipgrp6](fmgr_firewall_vipgrp6_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vipgrp6-module) – Configure IPv6 virtual IP groups.
* [fmgr\_firewall\_vipgrp64](fmgr_firewall_vipgrp64_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vipgrp64-module) – Configure IPv6 to IPv4 virtual IP groups.
* [fmgr\_firewall\_vipgrp\_dynamicmapping](fmgr_firewall_vipgrp_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-vipgrp-dynamicmapping-module) – Configure IPv4 virtual IP groups.
* [fmgr\_firewall\_wildcardfqdn\_custom](fmgr_firewall_wildcardfqdn_custom_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-wildcardfqdn-custom-module) – Config global/VDOM Wildcard FQDN address.
* [fmgr\_firewall\_wildcardfqdn\_group](fmgr_firewall_wildcardfqdn_group_module#ansible-collections-fortinet-fortimanager-fmgr-firewall-wildcardfqdn-group-module) – Config global Wildcard FQDN address groups.
* [fmgr\_fmupdate\_analyzer\_virusreport](fmgr_fmupdate_analyzer_virusreport_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-analyzer-virusreport-module) – Send virus detection notification to FortiGuard.
* [fmgr\_fmupdate\_avips\_advancedlog](fmgr_fmupdate_avips_advancedlog_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-avips-advancedlog-module) – Enable/disable logging of FortiGuard antivirus and IPS update packages received by FortiManagers built-in FortiGuard.
* [fmgr\_fmupdate\_avips\_webproxy](fmgr_fmupdate_avips_webproxy_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-avips-webproxy-module) – Configure the web proxy for use with FortiGuard antivirus and IPS updates.
* [fmgr\_fmupdate\_customurllist](fmgr_fmupdate_customurllist_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-customurllist-module) – Configure the URL database for rating and filtering.
* [fmgr\_fmupdate\_diskquota](fmgr_fmupdate_diskquota_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-diskquota-module) – Configure disk space available for use by the Upgrade Manager.
* [fmgr\_fmupdate\_fctservices](fmgr_fmupdate_fctservices_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-fctservices-module) – Configure FortiGuard to provide services to FortiClient installations.
* [fmgr\_fmupdate\_fdssetting](fmgr_fmupdate_fdssetting_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-fdssetting-module) – Configure FortiGuard settings.
* [fmgr\_fmupdate\_fdssetting\_pushoverride](fmgr_fmupdate_fdssetting_pushoverride_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-fdssetting-pushoverride-module) – Enable/disable push updates, and override the default IP address and port used by FortiGuard to send antivirus and IPS push messages for…
* [fmgr\_fmupdate\_fdssetting\_pushoverridetoclient](fmgr_fmupdate_fdssetting_pushoverridetoclient_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-fdssetting-pushoverridetoclient-module) – Enable/disable push updates, and override the default IP address and port used by FortiGuard to send antivirus and IPS push messages for…
* [fmgr\_fmupdate\_fdssetting\_pushoverridetoclient\_announceip](fmgr_fmupdate_fdssetting_pushoverridetoclient_announceip_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-fdssetting-pushoverridetoclient-announceip-module) – Announce IP addresses for the device.
* [fmgr\_fmupdate\_fdssetting\_serveroverride](fmgr_fmupdate_fdssetting_serveroverride_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-fdssetting-serveroverride-module) – Server override configure.
* [fmgr\_fmupdate\_fdssetting\_serveroverride\_servlist](fmgr_fmupdate_fdssetting_serveroverride_servlist_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-fdssetting-serveroverride-servlist-module) – Override server.
* [fmgr\_fmupdate\_fdssetting\_updateschedule](fmgr_fmupdate_fdssetting_updateschedule_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-fdssetting-updateschedule-module) – Configure the schedule when built-in FortiGuard retrieves antivirus and IPS updates.
* [fmgr\_fmupdate\_fwmsetting](fmgr_fmupdate_fwmsetting_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-fwmsetting-module) – Configure firmware management settings.
* [fmgr\_fmupdate\_multilayer](fmgr_fmupdate_multilayer_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-multilayer-module) – Configure multilayer mode.
* [fmgr\_fmupdate\_publicnetwork](fmgr_fmupdate_publicnetwork_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-publicnetwork-module) – Enable/disable access to the public FortiGuard.
* [fmgr\_fmupdate\_serveraccesspriorities](fmgr_fmupdate_serveraccesspriorities_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-serveraccesspriorities-module) – Configure priorities for FortiGate units accessing antivirus updates and web filtering services.
* [fmgr\_fmupdate\_serveraccesspriorities\_privateserver](fmgr_fmupdate_serveraccesspriorities_privateserver_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-serveraccesspriorities-privateserver-module) – Configure multiple FortiManager units and private servers.
* [fmgr\_fmupdate\_serveroverridestatus](fmgr_fmupdate_serveroverridestatus_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-serveroverridestatus-module) – Configure strict/loose server override.
* [fmgr\_fmupdate\_service](fmgr_fmupdate_service_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-service-module) – Enable/disable services provided by the built-in FortiGuard.
* [fmgr\_fmupdate\_webspam\_fgdsetting](fmgr_fmupdate_webspam_fgdsetting_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-webspam-fgdsetting-module) – Configure the FortiGuard run parameters.
* [fmgr\_fmupdate\_webspam\_fgdsetting\_serveroverride](fmgr_fmupdate_webspam_fgdsetting_serveroverride_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-webspam-fgdsetting-serveroverride-module) – Server override configure.
* [fmgr\_fmupdate\_webspam\_fgdsetting\_serveroverride\_servlist](fmgr_fmupdate_webspam_fgdsetting_serveroverride_servlist_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-webspam-fgdsetting-serveroverride-servlist-module) – Override server.
* [fmgr\_fmupdate\_webspam\_webproxy](fmgr_fmupdate_webspam_webproxy_module#ansible-collections-fortinet-fortimanager-fmgr-fmupdate-webspam-webproxy-module) – Configure the web proxy for use with FortiGuard antivirus and IPS updates.
* [fmgr\_fsp\_vlan](fmgr_fsp_vlan_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-module) – no description
* [fmgr\_fsp\_vlan\_dhcpserver](fmgr_fsp_vlan_dhcpserver_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dhcpserver-module) – Configure DHCP servers.
* [fmgr\_fsp\_vlan\_dhcpserver\_excluderange](fmgr_fsp_vlan_dhcpserver_excluderange_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dhcpserver-excluderange-module) – Exclude one or more ranges of IP addresses from being assigned to clients.
* [fmgr\_fsp\_vlan\_dhcpserver\_iprange](fmgr_fsp_vlan_dhcpserver_iprange_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dhcpserver-iprange-module) – DHCP IP range configuration.
* [fmgr\_fsp\_vlan\_dhcpserver\_options](fmgr_fsp_vlan_dhcpserver_options_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dhcpserver-options-module) – DHCP options.
* [fmgr\_fsp\_vlan\_dhcpserver\_reservedaddress](fmgr_fsp_vlan_dhcpserver_reservedaddress_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dhcpserver-reservedaddress-module) – Options for the DHCP server to assign IP settings to specific MAC addresses.
* [fmgr\_fsp\_vlan\_dynamicmapping](fmgr_fsp_vlan_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dynamicmapping-module) – no description
* [fmgr\_fsp\_vlan\_dynamicmapping\_dhcpserver](fmgr_fsp_vlan_dynamicmapping_dhcpserver_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dynamicmapping-dhcpserver-module) – Configure DHCP servers.
* [fmgr\_fsp\_vlan\_dynamicmapping\_dhcpserver\_excluderange](fmgr_fsp_vlan_dynamicmapping_dhcpserver_excluderange_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dynamicmapping-dhcpserver-excluderange-module) – Exclude one or more ranges of IP addresses from being assigned to clients.
* [fmgr\_fsp\_vlan\_dynamicmapping\_dhcpserver\_iprange](fmgr_fsp_vlan_dynamicmapping_dhcpserver_iprange_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dynamicmapping-dhcpserver-iprange-module) – DHCP IP range configuration.
* [fmgr\_fsp\_vlan\_dynamicmapping\_dhcpserver\_options](fmgr_fsp_vlan_dynamicmapping_dhcpserver_options_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dynamicmapping-dhcpserver-options-module) – DHCP options.
* [fmgr\_fsp\_vlan\_dynamicmapping\_dhcpserver\_reservedaddress](fmgr_fsp_vlan_dynamicmapping_dhcpserver_reservedaddress_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dynamicmapping-dhcpserver-reservedaddress-module) – Options for the DHCP server to assign IP settings to specific MAC addresses.
* [fmgr\_fsp\_vlan\_dynamicmapping\_interface](fmgr_fsp_vlan_dynamicmapping_interface_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dynamicmapping-interface-module) – no description
* [fmgr\_fsp\_vlan\_dynamicmapping\_interface\_ipv6](fmgr_fsp_vlan_dynamicmapping_interface_ipv6_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dynamicmapping-interface-ipv6-module) – IPv6 of interface.
* [fmgr\_fsp\_vlan\_dynamicmapping\_interface\_ipv6\_ip6delegatedprefixlist](fmgr_fsp_vlan_dynamicmapping_interface_ipv6_ip6delegatedprefixlist_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dynamicmapping-interface-ipv6-ip6delegatedprefixlist-module) – Advertised IPv6 delegated prefix list.
* [fmgr\_fsp\_vlan\_dynamicmapping\_interface\_ipv6\_ip6extraaddr](fmgr_fsp_vlan_dynamicmapping_interface_ipv6_ip6extraaddr_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dynamicmapping-interface-ipv6-ip6extraaddr-module) – Extra IPv6 address prefixes of interface.
* [fmgr\_fsp\_vlan\_dynamicmapping\_interface\_ipv6\_ip6prefixlist](fmgr_fsp_vlan_dynamicmapping_interface_ipv6_ip6prefixlist_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dynamicmapping-interface-ipv6-ip6prefixlist-module) – Advertised prefix list.
* [fmgr\_fsp\_vlan\_dynamicmapping\_interface\_ipv6\_vrrp6](fmgr_fsp_vlan_dynamicmapping_interface_ipv6_vrrp6_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dynamicmapping-interface-ipv6-vrrp6-module) – IPv6 VRRP configuration.
* [fmgr\_fsp\_vlan\_dynamicmapping\_interface\_secondaryip](fmgr_fsp_vlan_dynamicmapping_interface_secondaryip_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-dynamicmapping-interface-secondaryip-module) – Second IP address of interface.
* [fmgr\_fsp\_vlan\_interface](fmgr_fsp_vlan_interface_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-interface-module) – Configure interfaces.
* [fmgr\_fsp\_vlan\_interface\_ipv6](fmgr_fsp_vlan_interface_ipv6_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-interface-ipv6-module) – IPv6 of interface.
* [fmgr\_fsp\_vlan\_interface\_ipv6\_ip6delegatedprefixlist](fmgr_fsp_vlan_interface_ipv6_ip6delegatedprefixlist_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-interface-ipv6-ip6delegatedprefixlist-module) – Advertised IPv6 delegated prefix list.
* [fmgr\_fsp\_vlan\_interface\_ipv6\_ip6extraaddr](fmgr_fsp_vlan_interface_ipv6_ip6extraaddr_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-interface-ipv6-ip6extraaddr-module) – Extra IPv6 address prefixes of interface.
* [fmgr\_fsp\_vlan\_interface\_ipv6\_ip6prefixlist](fmgr_fsp_vlan_interface_ipv6_ip6prefixlist_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-interface-ipv6-ip6prefixlist-module) – Advertised prefix list.
* [fmgr\_fsp\_vlan\_interface\_ipv6\_vrrp6](fmgr_fsp_vlan_interface_ipv6_vrrp6_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-interface-ipv6-vrrp6-module) – IPv6 VRRP configuration.
* [fmgr\_fsp\_vlan\_interface\_secondaryip](fmgr_fsp_vlan_interface_secondaryip_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-interface-secondaryip-module) – Second IP address of interface.
* [fmgr\_fsp\_vlan\_interface\_vrrp](fmgr_fsp_vlan_interface_vrrp_module#ansible-collections-fortinet-fortimanager-fmgr-fsp-vlan-interface-vrrp-module) – VRRP configuration.
* [fmgr\_generic](fmgr_generic_module#ansible-collections-fortinet-fortimanager-fmgr-generic-module) – Build and send generic FortiManager API request.
* [fmgr\_gtp\_apn](fmgr_gtp_apn_module#ansible-collections-fortinet-fortimanager-fmgr-gtp-apn-module) – Configure APN for GTP.
* [fmgr\_gtp\_apngrp](fmgr_gtp_apngrp_module#ansible-collections-fortinet-fortimanager-fmgr-gtp-apngrp-module) – Configure APN groups for GTP.
* [fmgr\_gtp\_iewhitelist](fmgr_gtp_iewhitelist_module#ansible-collections-fortinet-fortimanager-fmgr-gtp-iewhitelist-module) – IE white list.
* [fmgr\_gtp\_iewhitelist\_entries](fmgr_gtp_iewhitelist_entries_module#ansible-collections-fortinet-fortimanager-fmgr-gtp-iewhitelist-entries-module) – Entries of white list
* [fmgr\_gtp\_messagefilterv0v1](fmgr_gtp_messagefilterv0v1_module#ansible-collections-fortinet-fortimanager-fmgr-gtp-messagefilterv0v1-module) – Message filter for GTPv0/v1 messages.
* [fmgr\_gtp\_messagefilterv2](fmgr_gtp_messagefilterv2_module#ansible-collections-fortinet-fortimanager-fmgr-gtp-messagefilterv2-module) – Message filter for GTPv2 messages.
* [fmgr\_gtp\_tunnellimit](fmgr_gtp_tunnellimit_module#ansible-collections-fortinet-fortimanager-fmgr-gtp-tunnellimit-module) – GTP tunnel limiter.
* [fmgr\_hotspot20\_anqp3gppcellular](fmgr_hotspot20_anqp3gppcellular_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-anqp3gppcellular-module) – Configure 3GPP public land mobile network
* [fmgr\_hotspot20\_anqp3gppcellular\_mccmnclist](fmgr_hotspot20_anqp3gppcellular_mccmnclist_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-anqp3gppcellular-mccmnclist-module) – Mobile Country Code and Mobile Network Code configuration.
* [fmgr\_hotspot20\_anqpipaddresstype](fmgr_hotspot20_anqpipaddresstype_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-anqpipaddresstype-module) – Configure IP address type availability.
* [fmgr\_hotspot20\_anqpnairealm](fmgr_hotspot20_anqpnairealm_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-anqpnairealm-module) – Configure network access identifier
* [fmgr\_hotspot20\_anqpnairealm\_nailist](fmgr_hotspot20_anqpnairealm_nailist_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-anqpnairealm-nailist-module) – NAI list.
* [fmgr\_hotspot20\_anqpnairealm\_nailist\_eapmethod](fmgr_hotspot20_anqpnairealm_nailist_eapmethod_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-anqpnairealm-nailist-eapmethod-module) – EAP Methods.
* [fmgr\_hotspot20\_anqpnairealm\_nailist\_eapmethod\_authparam](fmgr_hotspot20_anqpnairealm_nailist_eapmethod_authparam_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-anqpnairealm-nailist-eapmethod-authparam-module) – EAP auth param.
* [fmgr\_hotspot20\_anqpnetworkauthtype](fmgr_hotspot20_anqpnetworkauthtype_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-anqpnetworkauthtype-module) – Configure network authentication type.
* [fmgr\_hotspot20\_anqproamingconsortium](fmgr_hotspot20_anqproamingconsortium_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-anqproamingconsortium-module) – Configure roaming consortium.
* [fmgr\_hotspot20\_anqproamingconsortium\_oilist](fmgr_hotspot20_anqproamingconsortium_oilist_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-anqproamingconsortium-oilist-module) – Organization identifier list.
* [fmgr\_hotspot20\_anqpvenuename](fmgr_hotspot20_anqpvenuename_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-anqpvenuename-module) – Configure venue name duple.
* [fmgr\_hotspot20\_anqpvenuename\_valuelist](fmgr_hotspot20_anqpvenuename_valuelist_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-anqpvenuename-valuelist-module) – Name list.
* [fmgr\_hotspot20\_h2qpconncapability](fmgr_hotspot20_h2qpconncapability_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-h2qpconncapability-module) – Configure connection capability.
* [fmgr\_hotspot20\_h2qpoperatorname](fmgr_hotspot20_h2qpoperatorname_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-h2qpoperatorname-module) – Configure operator friendly name.
* [fmgr\_hotspot20\_h2qpoperatorname\_valuelist](fmgr_hotspot20_h2qpoperatorname_valuelist_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-h2qpoperatorname-valuelist-module) – Name list.
* [fmgr\_hotspot20\_h2qposuprovider](fmgr_hotspot20_h2qposuprovider_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-h2qposuprovider-module) – Configure online sign up
* [fmgr\_hotspot20\_h2qposuprovider\_friendlyname](fmgr_hotspot20_h2qposuprovider_friendlyname_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-h2qposuprovider-friendlyname-module) – OSU provider friendly name.
* [fmgr\_hotspot20\_h2qposuprovider\_servicedescription](fmgr_hotspot20_h2qposuprovider_servicedescription_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-h2qposuprovider-servicedescription-module) – OSU service name.
* [fmgr\_hotspot20\_h2qpwanmetric](fmgr_hotspot20_h2qpwanmetric_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-h2qpwanmetric-module) – Configure WAN metrics.
* [fmgr\_hotspot20\_hsprofile](fmgr_hotspot20_hsprofile_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-hsprofile-module) – Configure hotspot profile.
* [fmgr\_hotspot20\_qosmap](fmgr_hotspot20_qosmap_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-qosmap-module) – Configure QoS map set.
* [fmgr\_hotspot20\_qosmap\_dscpexcept](fmgr_hotspot20_qosmap_dscpexcept_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-qosmap-dscpexcept-module) – Differentiated Services Code Point
* [fmgr\_hotspot20\_qosmap\_dscprange](fmgr_hotspot20_qosmap_dscprange_module#ansible-collections-fortinet-fortimanager-fmgr-hotspot20-qosmap-dscprange-module) – Differentiated Services Code Point
* [fmgr\_icap\_profile](fmgr_icap_profile_module#ansible-collections-fortinet-fortimanager-fmgr-icap-profile-module) – Configure ICAP profiles.
* [fmgr\_icap\_profile\_icapheaders](fmgr_icap_profile_icapheaders_module#ansible-collections-fortinet-fortimanager-fmgr-icap-profile-icapheaders-module) – Configure ICAP forwarded request headers.
* [fmgr\_icap\_profile\_respmodforwardrules](fmgr_icap_profile_respmodforwardrules_module#ansible-collections-fortinet-fortimanager-fmgr-icap-profile-respmodforwardrules-module) – ICAP response mode forward rules.
* [fmgr\_icap\_profile\_respmodforwardrules\_headergroup](fmgr_icap_profile_respmodforwardrules_headergroup_module#ansible-collections-fortinet-fortimanager-fmgr-icap-profile-respmodforwardrules-headergroup-module) – HTTP header group.
* [fmgr\_icap\_server](fmgr_icap_server_module#ansible-collections-fortinet-fortimanager-fmgr-icap-server-module) – Configure ICAP servers.
* [fmgr\_ips\_custom](fmgr_ips_custom_module#ansible-collections-fortinet-fortimanager-fmgr-ips-custom-module) – Configure IPS custom signature.
* [fmgr\_ips\_sensor](fmgr_ips_sensor_module#ansible-collections-fortinet-fortimanager-fmgr-ips-sensor-module) – Configure IPS sensor.
* [fmgr\_ips\_sensor\_entries](fmgr_ips_sensor_entries_module#ansible-collections-fortinet-fortimanager-fmgr-ips-sensor-entries-module) – IPS sensor filter.
* [fmgr\_ips\_sensor\_entries\_exemptip](fmgr_ips_sensor_entries_exemptip_module#ansible-collections-fortinet-fortimanager-fmgr-ips-sensor-entries-exemptip-module) – Traffic from selected source or destination IP addresses is exempt from this signature.
* [fmgr\_log\_customfield](fmgr_log_customfield_module#ansible-collections-fortinet-fortimanager-fmgr-log-customfield-module) – Configure custom log fields.
* [fmgr\_metafields\_system\_admin\_user](fmgr_metafields_system_admin_user_module#ansible-collections-fortinet-fortimanager-fmgr-metafields-system-admin-user-module) – no description
* [fmgr\_move](fmgr_move_module#ansible-collections-fortinet-fortimanager-fmgr-move-module) – Move fortimanager defined Object.
* [fmgr\_mpskprofile](fmgr_mpskprofile_module#ansible-collections-fortinet-fortimanager-fmgr-mpskprofile-module) – Configure MPSK profile.
* [fmgr\_mpskprofile\_mpskgroup](fmgr_mpskprofile_mpskgroup_module#ansible-collections-fortinet-fortimanager-fmgr-mpskprofile-mpskgroup-module) – List of multiple PSK groups.
* [fmgr\_mpskprofile\_mpskgroup\_mpskkey](fmgr_mpskprofile_mpskgroup_mpskkey_module#ansible-collections-fortinet-fortimanager-fmgr-mpskprofile-mpskgroup-mpskkey-module) – List of multiple PSK entries.
* [fmgr\_pkg\_authentication\_rule](fmgr_pkg_authentication_rule_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-authentication-rule-module) – Configure Authentication Rules.
* [fmgr\_pkg\_authentication\_setting](fmgr_pkg_authentication_setting_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-authentication-setting-module) – Configure authentication setting.
* [fmgr\_pkg\_central\_dnat](fmgr_pkg_central_dnat_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-central-dnat-module) – no description
* [fmgr\_pkg\_central\_dnat6](fmgr_pkg_central_dnat6_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-central-dnat6-module) – no description
* [fmgr\_pkg\_firewall\_centralsnatmap](fmgr_pkg_firewall_centralsnatmap_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-centralsnatmap-module) – Configure central SNAT policies.
* [fmgr\_pkg\_firewall\_consolidated\_policy](fmgr_pkg_firewall_consolidated_policy_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-consolidated-policy-module) – Configure consolidated IPv4/IPv6 policies.
* [fmgr\_pkg\_firewall\_consolidated\_policy\_sectionvalue](fmgr_pkg_firewall_consolidated_policy_sectionvalue_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-consolidated-policy-sectionvalue-module) – Configure consolidated IPv4/IPv6 policies.
* [fmgr\_pkg\_firewall\_dospolicy](fmgr_pkg_firewall_dospolicy_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-dospolicy-module) – Configure IPv4 DoS policies.
* [fmgr\_pkg\_firewall\_dospolicy6](fmgr_pkg_firewall_dospolicy6_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-dospolicy6-module) – Configure IPv6 DoS policies.
* [fmgr\_pkg\_firewall\_dospolicy6\_anomaly](fmgr_pkg_firewall_dospolicy6_anomaly_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-dospolicy6-anomaly-module) – Anomaly name.
* [fmgr\_pkg\_firewall\_dospolicy\_anomaly](fmgr_pkg_firewall_dospolicy_anomaly_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-dospolicy-anomaly-module) – Anomaly name.
* [fmgr\_pkg\_firewall\_interfacepolicy](fmgr_pkg_firewall_interfacepolicy_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-interfacepolicy-module) – Configure IPv4 interface policies.
* [fmgr\_pkg\_firewall\_interfacepolicy6](fmgr_pkg_firewall_interfacepolicy6_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-interfacepolicy6-module) – Configure IPv6 interface policies.
* [fmgr\_pkg\_firewall\_interfacepolicy6\_sectionvalue](fmgr_pkg_firewall_interfacepolicy6_sectionvalue_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-interfacepolicy6-sectionvalue-module) – Configure IPv6 interface policies.
* [fmgr\_pkg\_firewall\_interfacepolicy\_sectionvalue](fmgr_pkg_firewall_interfacepolicy_sectionvalue_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-interfacepolicy-sectionvalue-module) – Configure IPv4 interface policies.
* [fmgr\_pkg\_firewall\_localinpolicy](fmgr_pkg_firewall_localinpolicy_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-localinpolicy-module) – Configure user defined IPv4 local-in policies.
* [fmgr\_pkg\_firewall\_localinpolicy6](fmgr_pkg_firewall_localinpolicy6_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-localinpolicy6-module) – Configure user defined IPv6 local-in policies.
* [fmgr\_pkg\_firewall\_multicastpolicy](fmgr_pkg_firewall_multicastpolicy_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-multicastpolicy-module) – Configure multicast NAT policies.
* [fmgr\_pkg\_firewall\_multicastpolicy6](fmgr_pkg_firewall_multicastpolicy6_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-multicastpolicy6-module) – Configure IPv6 multicast NAT policies.
* [fmgr\_pkg\_firewall\_policy](fmgr_pkg_firewall_policy_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-policy-module) – Configure IPv4 policies.
* [fmgr\_pkg\_firewall\_policy46](fmgr_pkg_firewall_policy46_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-policy46-module) – Configure IPv4 to IPv6 policies.
* [fmgr\_pkg\_firewall\_policy6](fmgr_pkg_firewall_policy6_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-policy6-module) – Configure IPv6 policies.
* [fmgr\_pkg\_firewall\_policy64](fmgr_pkg_firewall_policy64_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-policy64-module) – Configure IPv6 to IPv4 policies.
* [fmgr\_pkg\_firewall\_policy6\_sectionvalue](fmgr_pkg_firewall_policy6_sectionvalue_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-policy6-sectionvalue-module) – Configure IPv6 policies.
* [fmgr\_pkg\_firewall\_policy\_sectionvalue](fmgr_pkg_firewall_policy_sectionvalue_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-policy-sectionvalue-module) – Configure IPv4 policies.
* [fmgr\_pkg\_firewall\_policy\_vpndstnode](fmgr_pkg_firewall_policy_vpndstnode_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-policy-vpndstnode-module) – no description
* [fmgr\_pkg\_firewall\_policy\_vpnsrcnode](fmgr_pkg_firewall_policy_vpnsrcnode_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-policy-vpnsrcnode-module) – no description
* [fmgr\_pkg\_firewall\_proxypolicy](fmgr_pkg_firewall_proxypolicy_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-proxypolicy-module) – Configure proxy policies.
* [fmgr\_pkg\_firewall\_proxypolicy\_sectionvalue](fmgr_pkg_firewall_proxypolicy_sectionvalue_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-proxypolicy-sectionvalue-module) – Configure proxy policies.
* [fmgr\_pkg\_firewall\_securitypolicy](fmgr_pkg_firewall_securitypolicy_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-securitypolicy-module) – Configure NGFW IPv4/IPv6 application policies.
* [fmgr\_pkg\_firewall\_securitypolicy\_sectionvalue](fmgr_pkg_firewall_securitypolicy_sectionvalue_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-securitypolicy-sectionvalue-module) – Configure NGFW IPv4/IPv6 application policies.
* [fmgr\_pkg\_firewall\_shapingpolicy](fmgr_pkg_firewall_shapingpolicy_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-firewall-shapingpolicy-module) – Configure shaping policies.
* [fmgr\_pkg\_footer\_policy](fmgr_pkg_footer_policy_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-footer-policy-module) – Configure IPv4/IPv6 policies.
* [fmgr\_pkg\_footer\_policy6](fmgr_pkg_footer_policy6_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-footer-policy6-module) – Configure IPv6 policies.
* [fmgr\_pkg\_footer\_shapingpolicy](fmgr_pkg_footer_shapingpolicy_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-footer-shapingpolicy-module) – Configure shaping policies.
* [fmgr\_pkg\_header\_policy](fmgr_pkg_header_policy_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-header-policy-module) – Configure IPv4/IPv6 policies.
* [fmgr\_pkg\_header\_policy6](fmgr_pkg_header_policy6_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-header-policy6-module) – Configure IPv6 policies.
* [fmgr\_pkg\_header\_shapingpolicy](fmgr_pkg_header_shapingpolicy_module#ansible-collections-fortinet-fortimanager-fmgr-pkg-header-shapingpolicy-module) – Configure shaping policies.
* [fmgr\_pm\_config\_metafields\_firewall\_address](fmgr_pm_config_metafields_firewall_address_module#ansible-collections-fortinet-fortimanager-fmgr-pm-config-metafields-firewall-address-module) – no description
* [fmgr\_pm\_config\_metafields\_firewall\_addrgrp](fmgr_pm_config_metafields_firewall_addrgrp_module#ansible-collections-fortinet-fortimanager-fmgr-pm-config-metafields-firewall-addrgrp-module) – no description
* [fmgr\_pm\_config\_metafields\_firewall\_centralsnatmap](fmgr_pm_config_metafields_firewall_centralsnatmap_module#ansible-collections-fortinet-fortimanager-fmgr-pm-config-metafields-firewall-centralsnatmap-module) – no description
* [fmgr\_pm\_config\_metafields\_firewall\_policy](fmgr_pm_config_metafields_firewall_policy_module#ansible-collections-fortinet-fortimanager-fmgr-pm-config-metafields-firewall-policy-module) – no description
* [fmgr\_pm\_config\_metafields\_firewall\_service\_custom](fmgr_pm_config_metafields_firewall_service_custom_module#ansible-collections-fortinet-fortimanager-fmgr-pm-config-metafields-firewall-service-custom-module) – no description
* [fmgr\_pm\_config\_metafields\_firewall\_service\_group](fmgr_pm_config_metafields_firewall_service_group_module#ansible-collections-fortinet-fortimanager-fmgr-pm-config-metafields-firewall-service-group-module) – no description
* [fmgr\_pm\_config\_reset\_database](fmgr_pm_config_reset_database_module#ansible-collections-fortinet-fortimanager-fmgr-pm-config-reset-database-module) – Reset Global ADOM to a specific version.
* [fmgr\_pm\_config\_upgrade](fmgr_pm_config_upgrade_module#ansible-collections-fortinet-fortimanager-fmgr-pm-config-upgrade-module) – Upgrade an ADOM to the next version.
* [fmgr\_pm\_config\_workspace\_commit](fmgr_pm_config_workspace_commit_module#ansible-collections-fortinet-fortimanager-fmgr-pm-config-workspace-commit-module) – Commit changes to an ADOM.
* [fmgr\_pm\_config\_workspace\_lock](fmgr_pm_config_workspace_lock_module#ansible-collections-fortinet-fortimanager-fmgr-pm-config-workspace-lock-module) – Lock an ADOM in workspace mode.
* [fmgr\_pm\_config\_workspace\_unlock](fmgr_pm_config_workspace_unlock_module#ansible-collections-fortinet-fortimanager-fmgr-pm-config-workspace-unlock-module) – Unlock an ADOM.
* [fmgr\_pm\_devprof\_adom](fmgr_pm_devprof_adom_module#ansible-collections-fortinet-fortimanager-fmgr-pm-devprof-adom-module) – no description
* [fmgr\_pm\_devprof\_pkg](fmgr_pm_devprof_pkg_module#ansible-collections-fortinet-fortimanager-fmgr-pm-devprof-pkg-module) – no description
* [fmgr\_pm\_pkg](fmgr_pm_pkg_module#ansible-collections-fortinet-fortimanager-fmgr-pm-pkg-module) – no description
* [fmgr\_pm\_pkg\_adom](fmgr_pm_pkg_adom_module#ansible-collections-fortinet-fortimanager-fmgr-pm-pkg-adom-module) – no description
* [fmgr\_pm\_pkg\_global](fmgr_pm_pkg_global_module#ansible-collections-fortinet-fortimanager-fmgr-pm-pkg-global-module) – no description
* [fmgr\_pm\_wanprof\_adom](fmgr_pm_wanprof_adom_module#ansible-collections-fortinet-fortimanager-fmgr-pm-wanprof-adom-module) – no description
* [fmgr\_pm\_wanprof\_pkg](fmgr_pm_wanprof_pkg_module#ansible-collections-fortinet-fortimanager-fmgr-pm-wanprof-pkg-module) – no description
* [fmgr\_qosprofile](fmgr_qosprofile_module#ansible-collections-fortinet-fortimanager-fmgr-qosprofile-module) – Configure WiFi quality of service
* [fmgr\_region](fmgr_region_module#ansible-collections-fortinet-fortimanager-fmgr-region-module) – Configure FortiAP regions
* [fmgr\_securityconsole\_abort](fmgr_securityconsole_abort_module#ansible-collections-fortinet-fortimanager-fmgr-securityconsole-abort-module) – Abort and cancel a security console task.
* [fmgr\_securityconsole\_assign\_package](fmgr_securityconsole_assign_package_module#ansible-collections-fortinet-fortimanager-fmgr-securityconsole-assign-package-module) – Assign or unassign global policy package to ADOM packages.
* [fmgr\_securityconsole\_import\_dev\_objs](fmgr_securityconsole_import_dev_objs_module#ansible-collections-fortinet-fortimanager-fmgr-securityconsole-import-dev-objs-module) – Import objects from device to ADOM, or from ADOM to Global.
* [fmgr\_securityconsole\_install\_device](fmgr_securityconsole_install_device_module#ansible-collections-fortinet-fortimanager-fmgr-securityconsole-install-device-module) – no description
* [fmgr\_securityconsole\_install\_package](fmgr_securityconsole_install_package_module#ansible-collections-fortinet-fortimanager-fmgr-securityconsole-install-package-module) – Copy and install a policy package to devices.
* [fmgr\_securityconsole\_install\_preview](fmgr_securityconsole_install_preview_module#ansible-collections-fortinet-fortimanager-fmgr-securityconsole-install-preview-module) – Generate install preview for a device.
* [fmgr\_securityconsole\_package\_cancel\_install](fmgr_securityconsole_package_cancel_install_module#ansible-collections-fortinet-fortimanager-fmgr-securityconsole-package-cancel-install-module) – Cancel policy install and clear preview cache.
* [fmgr\_securityconsole\_package\_clone](fmgr_securityconsole_package_clone_module#ansible-collections-fortinet-fortimanager-fmgr-securityconsole-package-clone-module) – Clone a policy package within the same ADOM.
* [fmgr\_securityconsole\_package\_commit](fmgr_securityconsole_package_commit_module#ansible-collections-fortinet-fortimanager-fmgr-securityconsole-package-commit-module) – Install policies to device from preview cache.
* [fmgr\_securityconsole\_package\_move](fmgr_securityconsole_package_move_module#ansible-collections-fortinet-fortimanager-fmgr-securityconsole-package-move-module) – Move and/or rename a policy package within the same ADOM.
* [fmgr\_securityconsole\_pblock\_clone](fmgr_securityconsole_pblock_clone_module#ansible-collections-fortinet-fortimanager-fmgr-securityconsole-pblock-clone-module) – no description
* [fmgr\_securityconsole\_preview\_result](fmgr_securityconsole_preview_result_module#ansible-collections-fortinet-fortimanager-fmgr-securityconsole-preview-result-module) – Retrieve the result of previous install/preview command.
* [fmgr\_securityconsole\_reinstall\_package](fmgr_securityconsole_reinstall_package_module#ansible-collections-fortinet-fortimanager-fmgr-securityconsole-reinstall-package-module) – Re-install a policy package that had been previously installed.
* [fmgr\_securityconsole\_sign\_certificate\_template](fmgr_securityconsole_sign_certificate_template_module#ansible-collections-fortinet-fortimanager-fmgr-securityconsole-sign-certificate-template-module) – Generate and sign certificate on the target device.
* [fmgr\_spamfilter\_bwl](fmgr_spamfilter_bwl_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-bwl-module) – Configure anti-spam black/white list.
* [fmgr\_spamfilter\_bwl\_entries](fmgr_spamfilter_bwl_entries_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-bwl-entries-module) – Anti-spam black/white list entries.
* [fmgr\_spamfilter\_bword](fmgr_spamfilter_bword_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-bword-module) – Configure AntiSpam banned word list.
* [fmgr\_spamfilter\_bword\_entries](fmgr_spamfilter_bword_entries_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-bword-entries-module) – Spam filter banned word.
* [fmgr\_spamfilter\_dnsbl](fmgr_spamfilter_dnsbl_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-dnsbl-module) – Configure AntiSpam DNSBL/ORBL.
* [fmgr\_spamfilter\_dnsbl\_entries](fmgr_spamfilter_dnsbl_entries_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-dnsbl-entries-module) – Spam filter DNSBL and ORBL server.
* [fmgr\_spamfilter\_iptrust](fmgr_spamfilter_iptrust_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-iptrust-module) – Configure AntiSpam IP trust.
* [fmgr\_spamfilter\_iptrust\_entries](fmgr_spamfilter_iptrust_entries_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-iptrust-entries-module) – Spam filter trusted IP addresses.
* [fmgr\_spamfilter\_mheader](fmgr_spamfilter_mheader_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-mheader-module) – Configure AntiSpam MIME header.
* [fmgr\_spamfilter\_mheader\_entries](fmgr_spamfilter_mheader_entries_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-mheader-entries-module) – Spam filter mime header content.
* [fmgr\_spamfilter\_profile](fmgr_spamfilter_profile_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-profile-module) – Configure AntiSpam profiles.
* [fmgr\_spamfilter\_profile\_gmail](fmgr_spamfilter_profile_gmail_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-profile-gmail-module) – Gmail.
* [fmgr\_spamfilter\_profile\_imap](fmgr_spamfilter_profile_imap_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-profile-imap-module) – IMAP.
* [fmgr\_spamfilter\_profile\_mapi](fmgr_spamfilter_profile_mapi_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-profile-mapi-module) – MAPI.
* [fmgr\_spamfilter\_profile\_msnhotmail](fmgr_spamfilter_profile_msnhotmail_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-profile-msnhotmail-module) – MSN Hotmail.
* [fmgr\_spamfilter\_profile\_pop3](fmgr_spamfilter_profile_pop3_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-profile-pop3-module) – POP3.
* [fmgr\_spamfilter\_profile\_smtp](fmgr_spamfilter_profile_smtp_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-profile-smtp-module) – SMTP.
* [fmgr\_spamfilter\_profile\_yahoomail](fmgr_spamfilter_profile_yahoomail_module#ansible-collections-fortinet-fortimanager-fmgr-spamfilter-profile-yahoomail-module) – Yahoo! Mail.
* [fmgr\_sshfilter\_profile](fmgr_sshfilter_profile_module#ansible-collections-fortinet-fortimanager-fmgr-sshfilter-profile-module) – SSH filter profile.
* [fmgr\_sshfilter\_profile\_filefilter](fmgr_sshfilter_profile_filefilter_module#ansible-collections-fortinet-fortimanager-fmgr-sshfilter-profile-filefilter-module) – File filter.
* [fmgr\_sshfilter\_profile\_filefilter\_entries](fmgr_sshfilter_profile_filefilter_entries_module#ansible-collections-fortinet-fortimanager-fmgr-sshfilter-profile-filefilter-entries-module) – File filter entries.
* [fmgr\_sshfilter\_profile\_shellcommands](fmgr_sshfilter_profile_shellcommands_module#ansible-collections-fortinet-fortimanager-fmgr-sshfilter-profile-shellcommands-module) – SSH command filter.
* [fmgr\_switchcontroller\_customcommand](fmgr_switchcontroller_customcommand_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-customcommand-module) – Configure the FortiGate switch controller to send custom commands to managed FortiSwitch devices.
* [fmgr\_switchcontroller\_lldpprofile](fmgr_switchcontroller_lldpprofile_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-lldpprofile-module) – Configure FortiSwitch LLDP profiles.
* [fmgr\_switchcontroller\_lldpprofile\_customtlvs](fmgr_switchcontroller_lldpprofile_customtlvs_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-lldpprofile-customtlvs-module) – Configuration method to edit custom TLV entries.
* [fmgr\_switchcontroller\_lldpprofile\_medlocationservice](fmgr_switchcontroller_lldpprofile_medlocationservice_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-lldpprofile-medlocationservice-module) – Configuration method to edit Media Endpoint Discovery
* [fmgr\_switchcontroller\_lldpprofile\_mednetworkpolicy](fmgr_switchcontroller_lldpprofile_mednetworkpolicy_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-lldpprofile-mednetworkpolicy-module) – Configuration method to edit Media Endpoint Discovery
* [fmgr\_switchcontroller\_managedswitch](fmgr_switchcontroller_managedswitch_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-module) – Configure FortiSwitch devices that are managed by this FortiGate.
* [fmgr\_switchcontroller\_managedswitch\_8021xsettings](fmgr_switchcontroller_managedswitch_8021xsettings_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-8021xsettings-module) – Configuration method to edit FortiSwitch 802.
* [fmgr\_switchcontroller\_managedswitch\_customcommand](fmgr_switchcontroller_managedswitch_customcommand_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-customcommand-module) – Configuration method to edit FortiSwitch commands to be pushed to this FortiSwitch device upon rebooting the FortiGate switch controller…
* [fmgr\_switchcontroller\_managedswitch\_igmpsnooping](fmgr_switchcontroller_managedswitch_igmpsnooping_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-igmpsnooping-module) – Configure FortiSwitch IGMP snooping global settings.
* [fmgr\_switchcontroller\_managedswitch\_ipsourceguard](fmgr_switchcontroller_managedswitch_ipsourceguard_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-ipsourceguard-module) – IP source guard.
* [fmgr\_switchcontroller\_managedswitch\_ipsourceguard\_bindingentry](fmgr_switchcontroller_managedswitch_ipsourceguard_bindingentry_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-ipsourceguard-bindingentry-module) – IP and MAC address configuration.
* [fmgr\_switchcontroller\_managedswitch\_mirror](fmgr_switchcontroller_managedswitch_mirror_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-mirror-module) – Configuration method to edit FortiSwitch packet mirror.
* [fmgr\_switchcontroller\_managedswitch\_ports](fmgr_switchcontroller_managedswitch_ports_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-ports-module) – Managed-switch port list.
* [fmgr\_switchcontroller\_managedswitch\_remotelog](fmgr_switchcontroller_managedswitch_remotelog_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-remotelog-module) – Configure logging by FortiSwitch device to a remote syslog server.
* [fmgr\_switchcontroller\_managedswitch\_snmpcommunity](fmgr_switchcontroller_managedswitch_snmpcommunity_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-snmpcommunity-module) – Configuration method to edit Simple Network Management Protocol
* [fmgr\_switchcontroller\_managedswitch\_snmpcommunity\_hosts](fmgr_switchcontroller_managedswitch_snmpcommunity_hosts_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-snmpcommunity-hosts-module) – Configure IPv4 SNMP managers
* [fmgr\_switchcontroller\_managedswitch\_snmpsysinfo](fmgr_switchcontroller_managedswitch_snmpsysinfo_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-snmpsysinfo-module) – Configuration method to edit Simple Network Management Protocol
* [fmgr\_switchcontroller\_managedswitch\_snmptrapthreshold](fmgr_switchcontroller_managedswitch_snmptrapthreshold_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-snmptrapthreshold-module) – Configuration method to edit Simple Network Management Protocol
* [fmgr\_switchcontroller\_managedswitch\_snmpuser](fmgr_switchcontroller_managedswitch_snmpuser_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-snmpuser-module) – Configuration method to edit Simple Network Management Protocol
* [fmgr\_switchcontroller\_managedswitch\_stormcontrol](fmgr_switchcontroller_managedswitch_stormcontrol_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-stormcontrol-module) – Configuration method to edit FortiSwitch storm control for measuring traffic activity using data rates to prevent traffic disruption.
* [fmgr\_switchcontroller\_managedswitch\_stpsettings](fmgr_switchcontroller_managedswitch_stpsettings_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-stpsettings-module) – Configuration method to edit Spanning Tree Protocol
* [fmgr\_switchcontroller\_managedswitch\_switchlog](fmgr_switchcontroller_managedswitch_switchlog_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-switchlog-module) – Configuration method to edit FortiSwitch logging settings
* [fmgr\_switchcontroller\_managedswitch\_switchstpsettings](fmgr_switchcontroller_managedswitch_switchstpsettings_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-managedswitch-switchstpsettings-module) – Configure spanning tree protocol
* [fmgr\_switchcontroller\_qos\_dot1pmap](fmgr_switchcontroller_qos_dot1pmap_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-qos-dot1pmap-module) – Configure FortiSwitch QoS 802.
* [fmgr\_switchcontroller\_qos\_ipdscpmap](fmgr_switchcontroller_qos_ipdscpmap_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-qos-ipdscpmap-module) – Configure FortiSwitch QoS IP precedence/DSCP.
* [fmgr\_switchcontroller\_qos\_ipdscpmap\_map](fmgr_switchcontroller_qos_ipdscpmap_map_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-qos-ipdscpmap-map-module) – Maps between IP-DSCP value to COS queue.
* [fmgr\_switchcontroller\_qos\_qospolicy](fmgr_switchcontroller_qos_qospolicy_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-qos-qospolicy-module) – Configure FortiSwitch QoS policy.
* [fmgr\_switchcontroller\_qos\_queuepolicy](fmgr_switchcontroller_qos_queuepolicy_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-qos-queuepolicy-module) – Configure FortiSwitch QoS egress queue policy.
* [fmgr\_switchcontroller\_qos\_queuepolicy\_cosqueue](fmgr_switchcontroller_qos_queuepolicy_cosqueue_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-qos-queuepolicy-cosqueue-module) – COS queue configuration.
* [fmgr\_switchcontroller\_securitypolicy\_8021x](fmgr_switchcontroller_securitypolicy_8021x_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-securitypolicy-8021x-module) – Configure 802.
* [fmgr\_switchcontroller\_securitypolicy\_captiveportal](fmgr_switchcontroller_securitypolicy_captiveportal_module#ansible-collections-fortinet-fortimanager-fmgr-switchcontroller-securitypolicy-captiveportal-module) – Names of VLANs that use captive portal authentication.
* [fmgr\_sys\_api\_sdnconnector](fmgr_sys_api_sdnconnector_module#ansible-collections-fortinet-fortimanager-fmgr-sys-api-sdnconnector-module) – Query SDN connector data.
* [fmgr\_sys\_generate\_wsdl](fmgr_sys_generate_wsdl_module#ansible-collections-fortinet-fortimanager-fmgr-sys-generate-wsdl-module) – Generate WSDL for specific module and objects.
* [fmgr\_sys\_login\_challenge](fmgr_sys_login_challenge_module#ansible-collections-fortinet-fortimanager-fmgr-sys-login-challenge-module) – Answer a log in challenge question, used following a login/user or login/challenge command.
* [fmgr\_sys\_login\_user](fmgr_sys_login_user_module#ansible-collections-fortinet-fortimanager-fmgr-sys-login-user-module) – Log into the device with user name and password.
* [fmgr\_sys\_logout](fmgr_sys_logout_module#ansible-collections-fortinet-fortimanager-fmgr-sys-logout-module) – Log out a session.
* [fmgr\_sys\_proxy\_json](fmgr_sys_proxy_json_module#ansible-collections-fortinet-fortimanager-fmgr-sys-proxy-json-module) – Send and receive JSON request to/from managed devices.
* [fmgr\_sys\_reboot](fmgr_sys_reboot_module#ansible-collections-fortinet-fortimanager-fmgr-sys-reboot-module) – Restart FortiManager.
* [fmgr\_system\_admin\_group](fmgr_system_admin_group_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-group-module) – User group.
* [fmgr\_system\_admin\_group\_member](fmgr_system_admin_group_member_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-group-member-module) – Group members.
* [fmgr\_system\_admin\_ldap](fmgr_system_admin_ldap_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-ldap-module) – LDAP server entry configuration.
* [fmgr\_system\_admin\_ldap\_adom](fmgr_system_admin_ldap_adom_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-ldap-adom-module) – Admin domain.
* [fmgr\_system\_admin\_profile](fmgr_system_admin_profile_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-profile-module) – Admin profile.
* [fmgr\_system\_admin\_profile\_datamaskcustomfields](fmgr_system_admin_profile_datamaskcustomfields_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-profile-datamaskcustomfields-module) – Customized datamask fields.
* [fmgr\_system\_admin\_radius](fmgr_system_admin_radius_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-radius-module) – Configure radius.
* [fmgr\_system\_admin\_setting](fmgr_system_admin_setting_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-setting-module) – Admin setting.
* [fmgr\_system\_admin\_tacacs](fmgr_system_admin_tacacs_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-tacacs-module) – TACACS+ server entry configuration.
* [fmgr\_system\_admin\_user](fmgr_system_admin_user_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-user-module) – Admin user.
* [fmgr\_system\_admin\_user\_adom](fmgr_system_admin_user_adom_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-user-adom-module) – Admin domain.
* [fmgr\_system\_admin\_user\_adomexclude](fmgr_system_admin_user_adomexclude_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-user-adomexclude-module) – Excluding admin domain.
* [fmgr\_system\_admin\_user\_appfilter](fmgr_system_admin_user_appfilter_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-user-appfilter-module) – App filter.
* [fmgr\_system\_admin\_user\_dashboard](fmgr_system_admin_user_dashboard_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-user-dashboard-module) – Custom dashboard widgets.
* [fmgr\_system\_admin\_user\_dashboardtabs](fmgr_system_admin_user_dashboardtabs_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-user-dashboardtabs-module) – Custom dashboard.
* [fmgr\_system\_admin\_user\_ipsfilter](fmgr_system_admin_user_ipsfilter_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-user-ipsfilter-module) – IPS filter.
* [fmgr\_system\_admin\_user\_metadata](fmgr_system_admin_user_metadata_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-user-metadata-module) – Configure meta data.
* [fmgr\_system\_admin\_user\_policypackage](fmgr_system_admin_user_policypackage_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-user-policypackage-module) – Policy package access.
* [fmgr\_system\_admin\_user\_restrictdevvdom](fmgr_system_admin_user_restrictdevvdom_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-user-restrictdevvdom-module) – Restricted to these devices/VDOMs.
* [fmgr\_system\_admin\_user\_webfilter](fmgr_system_admin_user_webfilter_module#ansible-collections-fortinet-fortimanager-fmgr-system-admin-user-webfilter-module) – Web filter.
* [fmgr\_system\_alertconsole](fmgr_system_alertconsole_module#ansible-collections-fortinet-fortimanager-fmgr-system-alertconsole-module) – Alert console.
* [fmgr\_system\_alertemail](fmgr_system_alertemail_module#ansible-collections-fortinet-fortimanager-fmgr-system-alertemail-module) – Configure alertemail.
* [fmgr\_system\_alertevent](fmgr_system_alertevent_module#ansible-collections-fortinet-fortimanager-fmgr-system-alertevent-module) – Alert events.
* [fmgr\_system\_alertevent\_alertdestination](fmgr_system_alertevent_alertdestination_module#ansible-collections-fortinet-fortimanager-fmgr-system-alertevent-alertdestination-module) – Alert destination.
* [fmgr\_system\_autodelete](fmgr_system_autodelete_module#ansible-collections-fortinet-fortimanager-fmgr-system-autodelete-module) – Automatic deletion policy for logs, reports, archived, and quarantined files.
* [fmgr\_system\_autodelete\_dlpfilesautodeletion](fmgr_system_autodelete_dlpfilesautodeletion_module#ansible-collections-fortinet-fortimanager-fmgr-system-autodelete-dlpfilesautodeletion-module) – Automatic deletion policy for DLP archives.
* [fmgr\_system\_autodelete\_logautodeletion](fmgr_system_autodelete_logautodeletion_module#ansible-collections-fortinet-fortimanager-fmgr-system-autodelete-logautodeletion-module) – Automatic deletion policy for device logs.
* [fmgr\_system\_autodelete\_quarantinefilesautodeletion](fmgr_system_autodelete_quarantinefilesautodeletion_module#ansible-collections-fortinet-fortimanager-fmgr-system-autodelete-quarantinefilesautodeletion-module) – Automatic deletion policy for quarantined files.
* [fmgr\_system\_autodelete\_reportautodeletion](fmgr_system_autodelete_reportautodeletion_module#ansible-collections-fortinet-fortimanager-fmgr-system-autodelete-reportautodeletion-module) – Automatic deletion policy for reports.
* [fmgr\_system\_backup\_allsettings](fmgr_system_backup_allsettings_module#ansible-collections-fortinet-fortimanager-fmgr-system-backup-allsettings-module) – Scheduled backup settings.
* [fmgr\_system\_certificate\_ca](fmgr_system_certificate_ca_module#ansible-collections-fortinet-fortimanager-fmgr-system-certificate-ca-module) – CA certificate.
* [fmgr\_system\_certificate\_crl](fmgr_system_certificate_crl_module#ansible-collections-fortinet-fortimanager-fmgr-system-certificate-crl-module) – Certificate Revocation List.
* [fmgr\_system\_certificate\_local](fmgr_system_certificate_local_module#ansible-collections-fortinet-fortimanager-fmgr-system-certificate-local-module) – Local keys and certificates.
* [fmgr\_system\_certificate\_oftp](fmgr_system_certificate_oftp_module#ansible-collections-fortinet-fortimanager-fmgr-system-certificate-oftp-module) – OFTP certificates and keys.
* [fmgr\_system\_certificate\_remote](fmgr_system_certificate_remote_module#ansible-collections-fortinet-fortimanager-fmgr-system-certificate-remote-module) – Remote certificate.
* [fmgr\_system\_certificate\_ssh](fmgr_system_certificate_ssh_module#ansible-collections-fortinet-fortimanager-fmgr-system-certificate-ssh-module) – SSH certificates and keys.
* [fmgr\_system\_connector](fmgr_system_connector_module#ansible-collections-fortinet-fortimanager-fmgr-system-connector-module) – Configure connector.
* [fmgr\_system\_customlanguage](fmgr_system_customlanguage_module#ansible-collections-fortinet-fortimanager-fmgr-system-customlanguage-module) – Configure custom languages.
* [fmgr\_system\_dhcp\_server](fmgr_system_dhcp_server_module#ansible-collections-fortinet-fortimanager-fmgr-system-dhcp-server-module) – Configure DHCP servers.
* [fmgr\_system\_dhcp\_server\_excluderange](fmgr_system_dhcp_server_excluderange_module#ansible-collections-fortinet-fortimanager-fmgr-system-dhcp-server-excluderange-module) – Exclude one or more ranges of IP addresses from being assigned to clients.
* [fmgr\_system\_dhcp\_server\_iprange](fmgr_system_dhcp_server_iprange_module#ansible-collections-fortinet-fortimanager-fmgr-system-dhcp-server-iprange-module) – DHCP IP range configuration.
* [fmgr\_system\_dhcp\_server\_options](fmgr_system_dhcp_server_options_module#ansible-collections-fortinet-fortimanager-fmgr-system-dhcp-server-options-module) – DHCP options.
* [fmgr\_system\_dhcp\_server\_reservedaddress](fmgr_system_dhcp_server_reservedaddress_module#ansible-collections-fortinet-fortimanager-fmgr-system-dhcp-server-reservedaddress-module) – Options for the DHCP server to assign IP settings to specific MAC addresses.
* [fmgr\_system\_dm](fmgr_system_dm_module#ansible-collections-fortinet-fortimanager-fmgr-system-dm-module) – Configure dm.
* [fmgr\_system\_dns](fmgr_system_dns_module#ansible-collections-fortinet-fortimanager-fmgr-system-dns-module) – DNS configuration.
* [fmgr\_system\_docker](fmgr_system_docker_module#ansible-collections-fortinet-fortimanager-fmgr-system-docker-module) – Docker host.
* [fmgr\_system\_externalresource](fmgr_system_externalresource_module#ansible-collections-fortinet-fortimanager-fmgr-system-externalresource-module) – Configure external resource.
* [fmgr\_system\_fips](fmgr_system_fips_module#ansible-collections-fortinet-fortimanager-fmgr-system-fips-module) – Settings for FIPS-CC mode.
* [fmgr\_system\_fortiguard](fmgr_system_fortiguard_module#ansible-collections-fortinet-fortimanager-fmgr-system-fortiguard-module) – Configure FortiGuard services.
* [fmgr\_system\_fortiview\_autocache](fmgr_system_fortiview_autocache_module#ansible-collections-fortinet-fortimanager-fmgr-system-fortiview-autocache-module) – FortiView auto-cache settings.
* [fmgr\_system\_fortiview\_setting](fmgr_system_fortiview_setting_module#ansible-collections-fortinet-fortimanager-fmgr-system-fortiview-setting-module) – FortiView settings.
* [fmgr\_system\_geoipcountry](fmgr_system_geoipcountry_module#ansible-collections-fortinet-fortimanager-fmgr-system-geoipcountry-module) – no description
* [fmgr\_system\_geoipoverride](fmgr_system_geoipoverride_module#ansible-collections-fortinet-fortimanager-fmgr-system-geoipoverride-module) – Configure geographical location mapping for IP address
* [fmgr\_system\_geoipoverride\_ip6range](fmgr_system_geoipoverride_ip6range_module#ansible-collections-fortinet-fortimanager-fmgr-system-geoipoverride-ip6range-module) – Table of IPv6 ranges assigned to country.
* [fmgr\_system\_geoipoverride\_iprange](fmgr_system_geoipoverride_iprange_module#ansible-collections-fortinet-fortimanager-fmgr-system-geoipoverride-iprange-module) – Table of IP ranges assigned to country.
* [fmgr\_system\_global](fmgr_system_global_module#ansible-collections-fortinet-fortimanager-fmgr-system-global-module) – Global range attributes.
* [fmgr\_system\_guiact](fmgr_system_guiact_module#ansible-collections-fortinet-fortimanager-fmgr-system-guiact-module) – System settings through GUI.
* [fmgr\_system\_ha](fmgr_system_ha_module#ansible-collections-fortinet-fortimanager-fmgr-system-ha-module) – HA configuration.
* [fmgr\_system\_ha\_peer](fmgr_system_ha_peer_module#ansible-collections-fortinet-fortimanager-fmgr-system-ha-peer-module) – Peer.
* [fmgr\_system\_interface](fmgr_system_interface_module#ansible-collections-fortinet-fortimanager-fmgr-system-interface-module) – Interface configuration.
* [fmgr\_system\_interface\_ipv6](fmgr_system_interface_ipv6_module#ansible-collections-fortinet-fortimanager-fmgr-system-interface-ipv6-module) – IPv6 of interface.
* [fmgr\_system\_locallog\_disk\_filter](fmgr_system_locallog_disk_filter_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-disk-filter-module) – Filter for disk logging.
* [fmgr\_system\_locallog\_disk\_setting](fmgr_system_locallog_disk_setting_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-disk-setting-module) – Settings for local disk logging.
* [fmgr\_system\_locallog\_fortianalyzer2\_filter](fmgr_system_locallog_fortianalyzer2_filter_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-fortianalyzer2-filter-module) – Filter for FortiAnalyzer2 logging.
* [fmgr\_system\_locallog\_fortianalyzer2\_setting](fmgr_system_locallog_fortianalyzer2_setting_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-fortianalyzer2-setting-module) – Settings for locallog to fortianalyzer.
* [fmgr\_system\_locallog\_fortianalyzer3\_filter](fmgr_system_locallog_fortianalyzer3_filter_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-fortianalyzer3-filter-module) – Filter for FortiAnalyzer3 logging.
* [fmgr\_system\_locallog\_fortianalyzer3\_setting](fmgr_system_locallog_fortianalyzer3_setting_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-fortianalyzer3-setting-module) – Settings for locallog to fortianalyzer.
* [fmgr\_system\_locallog\_fortianalyzer\_filter](fmgr_system_locallog_fortianalyzer_filter_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-fortianalyzer-filter-module) – Filter for FortiAnalyzer logging.
* [fmgr\_system\_locallog\_fortianalyzer\_setting](fmgr_system_locallog_fortianalyzer_setting_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-fortianalyzer-setting-module) – Settings for locallog to fortianalyzer.
* [fmgr\_system\_locallog\_memory\_filter](fmgr_system_locallog_memory_filter_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-memory-filter-module) – Filter for memory logging.
* [fmgr\_system\_locallog\_memory\_setting](fmgr_system_locallog_memory_setting_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-memory-setting-module) – Settings for memory buffer.
* [fmgr\_system\_locallog\_setting](fmgr_system_locallog_setting_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-setting-module) – Settings for locallog logging.
* [fmgr\_system\_locallog\_syslogd2\_filter](fmgr_system_locallog_syslogd2_filter_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-syslogd2-filter-module) – Filter for syslog logging.
* [fmgr\_system\_locallog\_syslogd2\_setting](fmgr_system_locallog_syslogd2_setting_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-syslogd2-setting-module) – Settings for remote syslog server.
* [fmgr\_system\_locallog\_syslogd3\_filter](fmgr_system_locallog_syslogd3_filter_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-syslogd3-filter-module) – Filter for syslog logging.
* [fmgr\_system\_locallog\_syslogd3\_setting](fmgr_system_locallog_syslogd3_setting_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-syslogd3-setting-module) – Settings for remote syslog server.
* [fmgr\_system\_locallog\_syslogd\_filter](fmgr_system_locallog_syslogd_filter_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-syslogd-filter-module) – Filter for syslog logging.
* [fmgr\_system\_locallog\_syslogd\_setting](fmgr_system_locallog_syslogd_setting_module#ansible-collections-fortinet-fortimanager-fmgr-system-locallog-syslogd-setting-module) – Settings for remote syslog server.
* [fmgr\_system\_log\_alert](fmgr_system_log_alert_module#ansible-collections-fortinet-fortimanager-fmgr-system-log-alert-module) – Log based alert settings.
* [fmgr\_system\_log\_devicedisable](fmgr_system_log_devicedisable_module#ansible-collections-fortinet-fortimanager-fmgr-system-log-devicedisable-module) – Disable client device logging.
* [fmgr\_system\_log\_interfacestats](fmgr_system_log_interfacestats_module#ansible-collections-fortinet-fortimanager-fmgr-system-log-interfacestats-module) – Interface statistics settings.
* [fmgr\_system\_log\_ioc](fmgr_system_log_ioc_module#ansible-collections-fortinet-fortimanager-fmgr-system-log-ioc-module) – IoC settings.
* [fmgr\_system\_log\_maildomain](fmgr_system_log_maildomain_module#ansible-collections-fortinet-fortimanager-fmgr-system-log-maildomain-module) – FortiMail domain setting.
* [fmgr\_system\_log\_ratelimit](fmgr_system_log_ratelimit_module#ansible-collections-fortinet-fortimanager-fmgr-system-log-ratelimit-module) – Logging rate limit.
* [fmgr\_system\_log\_ratelimit\_device](fmgr_system_log_ratelimit_device_module#ansible-collections-fortinet-fortimanager-fmgr-system-log-ratelimit-device-module) – Device log rate limit.
* [fmgr\_system\_log\_settings](fmgr_system_log_settings_module#ansible-collections-fortinet-fortimanager-fmgr-system-log-settings-module) – Log settings.
* [fmgr\_system\_log\_settings\_rollinganalyzer](fmgr_system_log_settings_rollinganalyzer_module#ansible-collections-fortinet-fortimanager-fmgr-system-log-settings-rollinganalyzer-module) – Log rolling policy for Network Analyzer logs.
* [fmgr\_system\_log\_settings\_rollinglocal](fmgr_system_log_settings_rollinglocal_module#ansible-collections-fortinet-fortimanager-fmgr-system-log-settings-rollinglocal-module) – Log rolling policy for local logs.
* [fmgr\_system\_log\_settings\_rollingregular](fmgr_system_log_settings_rollingregular_module#ansible-collections-fortinet-fortimanager-fmgr-system-log-settings-rollingregular-module) – Log rolling policy for device logs.
* [fmgr\_system\_logfetch\_clientprofile](fmgr_system_logfetch_clientprofile_module#ansible-collections-fortinet-fortimanager-fmgr-system-logfetch-clientprofile-module) – Log-fetch client profile settings.
* [fmgr\_system\_logfetch\_clientprofile\_devicefilter](fmgr_system_logfetch_clientprofile_devicefilter_module#ansible-collections-fortinet-fortimanager-fmgr-system-logfetch-clientprofile-devicefilter-module) – List of device filter.
* [fmgr\_system\_logfetch\_clientprofile\_logfilter](fmgr_system_logfetch_clientprofile_logfilter_module#ansible-collections-fortinet-fortimanager-fmgr-system-logfetch-clientprofile-logfilter-module) – Log content filters.
* [fmgr\_system\_logfetch\_serversettings](fmgr_system_logfetch_serversettings_module#ansible-collections-fortinet-fortimanager-fmgr-system-logfetch-serversettings-module) – Log-fetch server settings.
* [fmgr\_system\_mail](fmgr_system_mail_module#ansible-collections-fortinet-fortimanager-fmgr-system-mail-module) – Alert emails.
* [fmgr\_system\_mcpolicydisabledadoms](fmgr_system_mcpolicydisabledadoms_module#ansible-collections-fortinet-fortimanager-fmgr-system-mcpolicydisabledadoms-module) – Multicast policy disabled adoms.
* [fmgr\_system\_meta](fmgr_system_meta_module#ansible-collections-fortinet-fortimanager-fmgr-system-meta-module) – no description
* [fmgr\_system\_meta\_sysmetafields](fmgr_system_meta_sysmetafields_module#ansible-collections-fortinet-fortimanager-fmgr-system-meta-sysmetafields-module) – no description
* [fmgr\_system\_metadata\_admins](fmgr_system_metadata_admins_module#ansible-collections-fortinet-fortimanager-fmgr-system-metadata-admins-module) – Configure admins.
* [fmgr\_system\_ntp](fmgr_system_ntp_module#ansible-collections-fortinet-fortimanager-fmgr-system-ntp-module) – NTP settings.
* [fmgr\_system\_ntp\_ntpserver](fmgr_system_ntp_ntpserver_module#ansible-collections-fortinet-fortimanager-fmgr-system-ntp-ntpserver-module) – NTP server.
* [fmgr\_system\_objecttagging](fmgr_system_objecttagging_module#ansible-collections-fortinet-fortimanager-fmgr-system-objecttagging-module) – Configure object tagging.
* [fmgr\_system\_passwordpolicy](fmgr_system_passwordpolicy_module#ansible-collections-fortinet-fortimanager-fmgr-system-passwordpolicy-module) – Password policy.
* [fmgr\_system\_replacemsggroup](fmgr_system_replacemsggroup_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-module) – Configure replacement message groups.
* [fmgr\_system\_replacemsggroup\_admin](fmgr_system_replacemsggroup_admin_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-admin-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_alertmail](fmgr_system_replacemsggroup_alertmail_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-alertmail-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_auth](fmgr_system_replacemsggroup_auth_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-auth-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_automation](fmgr_system_replacemsggroup_automation_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-automation-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_custommessage](fmgr_system_replacemsggroup_custommessage_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-custommessage-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_devicedetectionportal](fmgr_system_replacemsggroup_devicedetectionportal_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-devicedetectionportal-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_ec](fmgr_system_replacemsggroup_ec_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-ec-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_fortiguardwf](fmgr_system_replacemsggroup_fortiguardwf_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-fortiguardwf-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_ftp](fmgr_system_replacemsggroup_ftp_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-ftp-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_http](fmgr_system_replacemsggroup_http_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-http-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_icap](fmgr_system_replacemsggroup_icap_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-icap-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_mail](fmgr_system_replacemsggroup_mail_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-mail-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_mm1](fmgr_system_replacemsggroup_mm1_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-mm1-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_mm3](fmgr_system_replacemsggroup_mm3_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-mm3-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_mm4](fmgr_system_replacemsggroup_mm4_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-mm4-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_mm7](fmgr_system_replacemsggroup_mm7_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-mm7-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_mms](fmgr_system_replacemsggroup_mms_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-mms-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_nacquar](fmgr_system_replacemsggroup_nacquar_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-nacquar-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_nntp](fmgr_system_replacemsggroup_nntp_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-nntp-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_spam](fmgr_system_replacemsggroup_spam_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-spam-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_sslvpn](fmgr_system_replacemsggroup_sslvpn_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-sslvpn-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_trafficquota](fmgr_system_replacemsggroup_trafficquota_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-trafficquota-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_utm](fmgr_system_replacemsggroup_utm_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-utm-module) – Replacement message table entries.
* [fmgr\_system\_replacemsggroup\_webproxy](fmgr_system_replacemsggroup_webproxy_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsggroup-webproxy-module) – Replacement message table entries.
* [fmgr\_system\_replacemsgimage](fmgr_system_replacemsgimage_module#ansible-collections-fortinet-fortimanager-fmgr-system-replacemsgimage-module) – Configure replacement message images.
* [fmgr\_system\_report\_autocache](fmgr_system_report_autocache_module#ansible-collections-fortinet-fortimanager-fmgr-system-report-autocache-module) – Report auto-cache settings.
* [fmgr\_system\_report\_estbrowsetime](fmgr_system_report_estbrowsetime_module#ansible-collections-fortinet-fortimanager-fmgr-system-report-estbrowsetime-module) – Report estimated browse time settings
* [fmgr\_system\_report\_group](fmgr_system_report_group_module#ansible-collections-fortinet-fortimanager-fmgr-system-report-group-module) – Report group.
* [fmgr\_system\_report\_group\_chartalternative](fmgr_system_report_group_chartalternative_module#ansible-collections-fortinet-fortimanager-fmgr-system-report-group-chartalternative-module) – Chart alternatives.
* [fmgr\_system\_report\_group\_groupby](fmgr_system_report_group_groupby_module#ansible-collections-fortinet-fortimanager-fmgr-system-report-group-groupby-module) – Group-by variables.
* [fmgr\_system\_report\_setting](fmgr_system_report_setting_module#ansible-collections-fortinet-fortimanager-fmgr-system-report-setting-module) – Report settings.
* [fmgr\_system\_route](fmgr_system_route_module#ansible-collections-fortinet-fortimanager-fmgr-system-route-module) – Routing table configuration.
* [fmgr\_system\_route6](fmgr_system_route6_module#ansible-collections-fortinet-fortimanager-fmgr-system-route6-module) – Routing table configuration.
* [fmgr\_system\_saml](fmgr_system_saml_module#ansible-collections-fortinet-fortimanager-fmgr-system-saml-module) – Global settings for SAML authentication.
* [fmgr\_system\_saml\_fabricidp](fmgr_system_saml_fabricidp_module#ansible-collections-fortinet-fortimanager-fmgr-system-saml-fabricidp-module) – Authorized identity providers.
* [fmgr\_system\_sdnconnector](fmgr_system_sdnconnector_module#ansible-collections-fortinet-fortimanager-fmgr-system-sdnconnector-module) – Configure connection to SDN Connector.
* [fmgr\_system\_sdnconnector\_externalip](fmgr_system_sdnconnector_externalip_module#ansible-collections-fortinet-fortimanager-fmgr-system-sdnconnector-externalip-module) – Configure GCP external IP.
* [fmgr\_system\_sdnconnector\_nic](fmgr_system_sdnconnector_nic_module#ansible-collections-fortinet-fortimanager-fmgr-system-sdnconnector-nic-module) – Configure Azure network interface.
* [fmgr\_system\_sdnconnector\_nic\_ip](fmgr_system_sdnconnector_nic_ip_module#ansible-collections-fortinet-fortimanager-fmgr-system-sdnconnector-nic-ip-module) – Configure IP configuration.
* [fmgr\_system\_sdnconnector\_route](fmgr_system_sdnconnector_route_module#ansible-collections-fortinet-fortimanager-fmgr-system-sdnconnector-route-module) – Configure GCP route.
* [fmgr\_system\_sdnconnector\_routetable](fmgr_system_sdnconnector_routetable_module#ansible-collections-fortinet-fortimanager-fmgr-system-sdnconnector-routetable-module) – Configure Azure route table.
* [fmgr\_system\_sdnconnector\_routetable\_route](fmgr_system_sdnconnector_routetable_route_module#ansible-collections-fortinet-fortimanager-fmgr-system-sdnconnector-routetable-route-module) – Configure Azure route.
* [fmgr\_system\_smsserver](fmgr_system_smsserver_module#ansible-collections-fortinet-fortimanager-fmgr-system-smsserver-module) – Configure SMS server for sending SMS messages to support user authentication.
* [fmgr\_system\_sniffer](fmgr_system_sniffer_module#ansible-collections-fortinet-fortimanager-fmgr-system-sniffer-module) – Interface sniffer.
* [fmgr\_system\_snmp\_community](fmgr_system_snmp_community_module#ansible-collections-fortinet-fortimanager-fmgr-system-snmp-community-module) – SNMP community configuration.
* [fmgr\_system\_snmp\_community\_hosts](fmgr_system_snmp_community_hosts_module#ansible-collections-fortinet-fortimanager-fmgr-system-snmp-community-hosts-module) – Allow hosts configuration.
* [fmgr\_system\_snmp\_community\_hosts6](fmgr_system_snmp_community_hosts6_module#ansible-collections-fortinet-fortimanager-fmgr-system-snmp-community-hosts6-module) – Allow hosts configuration for IPv6.
* [fmgr\_system\_snmp\_sysinfo](fmgr_system_snmp_sysinfo_module#ansible-collections-fortinet-fortimanager-fmgr-system-snmp-sysinfo-module) – SNMP configuration.
* [fmgr\_system\_snmp\_user](fmgr_system_snmp_user_module#ansible-collections-fortinet-fortimanager-fmgr-system-snmp-user-module) – SNMP user configuration.
* [fmgr\_system\_socfabric](fmgr_system_socfabric_module#ansible-collections-fortinet-fortimanager-fmgr-system-socfabric-module) – SOC Fabric.
* [fmgr\_system\_sql](fmgr_system_sql_module#ansible-collections-fortinet-fortimanager-fmgr-system-sql-module) – SQL settings.
* [fmgr\_system\_sql\_customindex](fmgr_system_sql_customindex_module#ansible-collections-fortinet-fortimanager-fmgr-system-sql-customindex-module) – List of SQL index fields.
* [fmgr\_system\_sql\_customskipidx](fmgr_system_sql_customskipidx_module#ansible-collections-fortinet-fortimanager-fmgr-system-sql-customskipidx-module) – List of aditional SQL skip index fields.
* [fmgr\_system\_sql\_tsindexfield](fmgr_system_sql_tsindexfield_module#ansible-collections-fortinet-fortimanager-fmgr-system-sql-tsindexfield-module) – List of SQL text search index fields.
* [fmgr\_system\_syslog](fmgr_system_syslog_module#ansible-collections-fortinet-fortimanager-fmgr-system-syslog-module) – Syslog servers.
* [fmgr\_system\_virtualwirepair](fmgr_system_virtualwirepair_module#ansible-collections-fortinet-fortimanager-fmgr-system-virtualwirepair-module) – Configure virtual wire pairs.
* [fmgr\_system\_workflow\_approvalmatrix](fmgr_system_workflow_approvalmatrix_module#ansible-collections-fortinet-fortimanager-fmgr-system-workflow-approvalmatrix-module) – workflow approval matrix.
* [fmgr\_system\_workflow\_approvalmatrix\_approver](fmgr_system_workflow_approvalmatrix_approver_module#ansible-collections-fortinet-fortimanager-fmgr-system-workflow-approvalmatrix-approver-module) – Approver.
* [fmgr\_template](fmgr_template_module#ansible-collections-fortinet-fortimanager-fmgr-template-module) – no description
* [fmgr\_templategroup](fmgr_templategroup_module#ansible-collections-fortinet-fortimanager-fmgr-templategroup-module) – no description
* [fmgr\_user\_adgrp](fmgr_user_adgrp_module#ansible-collections-fortinet-fortimanager-fmgr-user-adgrp-module) – Configure FSSO groups.
* [fmgr\_user\_clearpass](fmgr_user_clearpass_module#ansible-collections-fortinet-fortimanager-fmgr-user-clearpass-module) – no description
* [fmgr\_user\_device](fmgr_user_device_module#ansible-collections-fortinet-fortimanager-fmgr-user-device-module) – Configure devices.
* [fmgr\_user\_device\_dynamicmapping](fmgr_user_device_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-user-device-dynamicmapping-module) – no description
* [fmgr\_user\_device\_tagging](fmgr_user_device_tagging_module#ansible-collections-fortinet-fortimanager-fmgr-user-device-tagging-module) – Config object tagging.
* [fmgr\_user\_devicecategory](fmgr_user_devicecategory_module#ansible-collections-fortinet-fortimanager-fmgr-user-devicecategory-module) – Configure device categories.
* [fmgr\_user\_devicegroup](fmgr_user_devicegroup_module#ansible-collections-fortinet-fortimanager-fmgr-user-devicegroup-module) – Configure device groups.
* [fmgr\_user\_devicegroup\_dynamicmapping](fmgr_user_devicegroup_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-user-devicegroup-dynamicmapping-module) – no description
* [fmgr\_user\_devicegroup\_tagging](fmgr_user_devicegroup_tagging_module#ansible-collections-fortinet-fortimanager-fmgr-user-devicegroup-tagging-module) – Config object tagging.
* [fmgr\_user\_domaincontroller](fmgr_user_domaincontroller_module#ansible-collections-fortinet-fortimanager-fmgr-user-domaincontroller-module) – Configure domain controller entries.
* [fmgr\_user\_domaincontroller\_extraserver](fmgr_user_domaincontroller_extraserver_module#ansible-collections-fortinet-fortimanager-fmgr-user-domaincontroller-extraserver-module) – extra servers.
* [fmgr\_user\_exchange](fmgr_user_exchange_module#ansible-collections-fortinet-fortimanager-fmgr-user-exchange-module) – Configure MS Exchange server entries.
* [fmgr\_user\_fortitoken](fmgr_user_fortitoken_module#ansible-collections-fortinet-fortimanager-fmgr-user-fortitoken-module) – Configure FortiToken.
* [fmgr\_user\_fsso](fmgr_user_fsso_module#ansible-collections-fortinet-fortimanager-fmgr-user-fsso-module) – Configure Fortinet Single Sign On
* [fmgr\_user\_fsso\_dynamicmapping](fmgr_user_fsso_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-user-fsso-dynamicmapping-module) – Configure Fortinet Single Sign On
* [fmgr\_user\_fssopolling](fmgr_user_fssopolling_module#ansible-collections-fortinet-fortimanager-fmgr-user-fssopolling-module) – Configure FSSO active directory servers for polling mode.
* [fmgr\_user\_fssopolling\_adgrp](fmgr_user_fssopolling_adgrp_module#ansible-collections-fortinet-fortimanager-fmgr-user-fssopolling-adgrp-module) – LDAP Group Info.
* [fmgr\_user\_group](fmgr_user_group_module#ansible-collections-fortinet-fortimanager-fmgr-user-group-module) – Configure user groups.
* [fmgr\_user\_group\_guest](fmgr_user_group_guest_module#ansible-collections-fortinet-fortimanager-fmgr-user-group-guest-module) – Guest User.
* [fmgr\_user\_group\_match](fmgr_user_group_match_module#ansible-collections-fortinet-fortimanager-fmgr-user-group-match-module) – Group matches.
* [fmgr\_user\_krbkeytab](fmgr_user_krbkeytab_module#ansible-collections-fortinet-fortimanager-fmgr-user-krbkeytab-module) – Configure Kerberos keytab entries.
* [fmgr\_user\_ldap](fmgr_user_ldap_module#ansible-collections-fortinet-fortimanager-fmgr-user-ldap-module) – Configure LDAP server entries.
* [fmgr\_user\_ldap\_dynamicmapping](fmgr_user_ldap_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-user-ldap-dynamicmapping-module) – Configure LDAP server entries.
* [fmgr\_user\_local](fmgr_user_local_module#ansible-collections-fortinet-fortimanager-fmgr-user-local-module) – Configure local users.
* [fmgr\_user\_nsx](fmgr_user_nsx_module#ansible-collections-fortinet-fortimanager-fmgr-user-nsx-module) – no description
* [fmgr\_user\_passwordpolicy](fmgr_user_passwordpolicy_module#ansible-collections-fortinet-fortimanager-fmgr-user-passwordpolicy-module) – Configure user password policy.
* [fmgr\_user\_peer](fmgr_user_peer_module#ansible-collections-fortinet-fortimanager-fmgr-user-peer-module) – Configure peer users.
* [fmgr\_user\_peergrp](fmgr_user_peergrp_module#ansible-collections-fortinet-fortimanager-fmgr-user-peergrp-module) – Configure peer groups.
* [fmgr\_user\_pop3](fmgr_user_pop3_module#ansible-collections-fortinet-fortimanager-fmgr-user-pop3-module) – POP3 server entry configuration.
* [fmgr\_user\_pxgrid](fmgr_user_pxgrid_module#ansible-collections-fortinet-fortimanager-fmgr-user-pxgrid-module) – no description
* [fmgr\_user\_radius](fmgr_user_radius_module#ansible-collections-fortinet-fortimanager-fmgr-user-radius-module) – Configure RADIUS server entries.
* [fmgr\_user\_radius\_accountingserver](fmgr_user_radius_accountingserver_module#ansible-collections-fortinet-fortimanager-fmgr-user-radius-accountingserver-module) – Additional accounting servers.
* [fmgr\_user\_radius\_dynamicmapping](fmgr_user_radius_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-user-radius-dynamicmapping-module) – Configure RADIUS server entries.
* [fmgr\_user\_radius\_dynamicmapping\_accountingserver](fmgr_user_radius_dynamicmapping_accountingserver_module#ansible-collections-fortinet-fortimanager-fmgr-user-radius-dynamicmapping-accountingserver-module) – Additional accounting servers.
* [fmgr\_user\_saml](fmgr_user_saml_module#ansible-collections-fortinet-fortimanager-fmgr-user-saml-module) – SAML server entry configuration.
* [fmgr\_user\_securityexemptlist](fmgr_user_securityexemptlist_module#ansible-collections-fortinet-fortimanager-fmgr-user-securityexemptlist-module) – Configure security exemption list.
* [fmgr\_user\_securityexemptlist\_rule](fmgr_user_securityexemptlist_rule_module#ansible-collections-fortinet-fortimanager-fmgr-user-securityexemptlist-rule-module) – Configure rules for exempting users from captive portal authentication.
* [fmgr\_user\_tacacs](fmgr_user_tacacs_module#ansible-collections-fortinet-fortimanager-fmgr-user-tacacs-module) – Configure TACACS+ server entries.
* [fmgr\_user\_tacacs\_dynamicmapping](fmgr_user_tacacs_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-user-tacacs-dynamicmapping-module) – Configure TACACS+ server entries.
* [fmgr\_user\_vcenter](fmgr_user_vcenter_module#ansible-collections-fortinet-fortimanager-fmgr-user-vcenter-module) – no description
* [fmgr\_user\_vcenter\_rule](fmgr_user_vcenter_rule_module#ansible-collections-fortinet-fortimanager-fmgr-user-vcenter-rule-module) – no description
* [fmgr\_utmprofile](fmgr_utmprofile_module#ansible-collections-fortinet-fortimanager-fmgr-utmprofile-module) – Configure UTM
* [fmgr\_vap](fmgr_vap_module#ansible-collections-fortinet-fortimanager-fmgr-vap-module) – Configure Virtual Access Points
* [fmgr\_vap\_dynamicmapping](fmgr_vap_dynamicmapping_module#ansible-collections-fortinet-fortimanager-fmgr-vap-dynamicmapping-module) – Configure Virtual Access Points
* [fmgr\_vap\_macfilterlist](fmgr_vap_macfilterlist_module#ansible-collections-fortinet-fortimanager-fmgr-vap-macfilterlist-module) – Create a list of MAC addresses for MAC address filtering.
* [fmgr\_vap\_mpskkey](fmgr_vap_mpskkey_module#ansible-collections-fortinet-fortimanager-fmgr-vap-mpskkey-module) – Pre-shared keys that can be used to connect to this virtual access point.
* [fmgr\_vap\_portalmessageoverrides](fmgr_vap_portalmessageoverrides_module#ansible-collections-fortinet-fortimanager-fmgr-vap-portalmessageoverrides-module) – Individual message overrides.
* [fmgr\_vap\_vlanpool](fmgr_vap_vlanpool_module#ansible-collections-fortinet-fortimanager-fmgr-vap-vlanpool-module) – VLAN pool.
* [fmgr\_vapgroup](fmgr_vapgroup_module#ansible-collections-fortinet-fortimanager-fmgr-vapgroup-module) – Configure virtual Access Point
* [fmgr\_videofilter\_profile](fmgr_videofilter_profile_module#ansible-collections-fortinet-fortimanager-fmgr-videofilter-profile-module) – Configure VideoFilter profile.
* [fmgr\_videofilter\_profile\_fortiguardcategory](fmgr_videofilter_profile_fortiguardcategory_module#ansible-collections-fortinet-fortimanager-fmgr-videofilter-profile-fortiguardcategory-module) – Configure FortiGuard categories.
* [fmgr\_videofilter\_profile\_fortiguardcategory\_filters](fmgr_videofilter_profile_fortiguardcategory_filters_module#ansible-collections-fortinet-fortimanager-fmgr-videofilter-profile-fortiguardcategory-filters-module) – Configure VideoFilter FortiGuard category.
* [fmgr\_videofilter\_youtubechannelfilter](fmgr_videofilter_youtubechannelfilter_module#ansible-collections-fortinet-fortimanager-fmgr-videofilter-youtubechannelfilter-module) – Configure YouTube channel filter.
* [fmgr\_videofilter\_youtubechannelfilter\_entries](fmgr_videofilter_youtubechannelfilter_entries_module#ansible-collections-fortinet-fortimanager-fmgr-videofilter-youtubechannelfilter-entries-module) – YouTube filter entries.
* [fmgr\_voip\_profile](fmgr_voip_profile_module#ansible-collections-fortinet-fortimanager-fmgr-voip-profile-module) – Configure VoIP profiles.
* [fmgr\_voip\_profile\_sccp](fmgr_voip_profile_sccp_module#ansible-collections-fortinet-fortimanager-fmgr-voip-profile-sccp-module) – SCCP.
* [fmgr\_voip\_profile\_sip](fmgr_voip_profile_sip_module#ansible-collections-fortinet-fortimanager-fmgr-voip-profile-sip-module) – SIP.
* [fmgr\_vpn\_certificate\_ca](fmgr_vpn_certificate_ca_module#ansible-collections-fortinet-fortimanager-fmgr-vpn-certificate-ca-module) – CA certificate.
* [fmgr\_vpn\_certificate\_ocspserver](fmgr_vpn_certificate_ocspserver_module#ansible-collections-fortinet-fortimanager-fmgr-vpn-certificate-ocspserver-module) – OCSP server configuration.
* [fmgr\_vpn\_certificate\_remote](fmgr_vpn_certificate_remote_module#ansible-collections-fortinet-fortimanager-fmgr-vpn-certificate-remote-module) – Remote certificate as a PEM file.
* [fmgr\_vpn\_ssl\_settings](fmgr_vpn_ssl_settings_module#ansible-collections-fortinet-fortimanager-fmgr-vpn-ssl-settings-module) – Configure SSL VPN.
* [fmgr\_vpn\_ssl\_settings\_authenticationrule](fmgr_vpn_ssl_settings_authenticationrule_module#ansible-collections-fortinet-fortimanager-fmgr-vpn-ssl-settings-authenticationrule-module) – Authentication rule for SSL VPN.
* [fmgr\_vpnmgr\_node](fmgr_vpnmgr_node_module#ansible-collections-fortinet-fortimanager-fmgr-vpnmgr-node-module) – VPN node for VPN Manager.
* [fmgr\_vpnmgr\_node\_iprange](fmgr_vpnmgr_node_iprange_module#ansible-collections-fortinet-fortimanager-fmgr-vpnmgr-node-iprange-module) – no description
* [fmgr\_vpnmgr\_node\_ipv4excluderange](fmgr_vpnmgr_node_ipv4excluderange_module#ansible-collections-fortinet-fortimanager-fmgr-vpnmgr-node-ipv4excluderange-module) – no description
* [fmgr\_vpnmgr\_node\_protectedsubnet](fmgr_vpnmgr_node_protectedsubnet_module#ansible-collections-fortinet-fortimanager-fmgr-vpnmgr-node-protectedsubnet-module) – no description
* [fmgr\_vpnmgr\_node\_summaryaddr](fmgr_vpnmgr_node_summaryaddr_module#ansible-collections-fortinet-fortimanager-fmgr-vpnmgr-node-summaryaddr-module) – no description
* [fmgr\_vpnmgr\_vpntable](fmgr_vpnmgr_vpntable_module#ansible-collections-fortinet-fortimanager-fmgr-vpnmgr-vpntable-module) – no description
* [fmgr\_vpnsslweb\_hostchecksoftware](fmgr_vpnsslweb_hostchecksoftware_module#ansible-collections-fortinet-fortimanager-fmgr-vpnsslweb-hostchecksoftware-module) – SSL-VPN host check software.
* [fmgr\_vpnsslweb\_hostchecksoftware\_checkitemlist](fmgr_vpnsslweb_hostchecksoftware_checkitemlist_module#ansible-collections-fortinet-fortimanager-fmgr-vpnsslweb-hostchecksoftware-checkitemlist-module) – Check item list.
* [fmgr\_vpnsslweb\_portal](fmgr_vpnsslweb_portal_module#ansible-collections-fortinet-fortimanager-fmgr-vpnsslweb-portal-module) – Portal.
* [fmgr\_vpnsslweb\_portal\_bookmarkgroup](fmgr_vpnsslweb_portal_bookmarkgroup_module#ansible-collections-fortinet-fortimanager-fmgr-vpnsslweb-portal-bookmarkgroup-module) – Portal bookmark group.
* [fmgr\_vpnsslweb\_portal\_bookmarkgroup\_bookmarks](fmgr_vpnsslweb_portal_bookmarkgroup_bookmarks_module#ansible-collections-fortinet-fortimanager-fmgr-vpnsslweb-portal-bookmarkgroup-bookmarks-module) – Bookmark table.
* [fmgr\_vpnsslweb\_portal\_bookmarkgroup\_bookmarks\_formdata](fmgr_vpnsslweb_portal_bookmarkgroup_bookmarks_formdata_module#ansible-collections-fortinet-fortimanager-fmgr-vpnsslweb-portal-bookmarkgroup-bookmarks-formdata-module) – Form data.
* [fmgr\_vpnsslweb\_portal\_macaddrcheckrule](fmgr_vpnsslweb_portal_macaddrcheckrule_module#ansible-collections-fortinet-fortimanager-fmgr-vpnsslweb-portal-macaddrcheckrule-module) – Client MAC address check rule.
* [fmgr\_vpnsslweb\_portal\_oschecklist](fmgr_vpnsslweb_portal_oschecklist_module#ansible-collections-fortinet-fortimanager-fmgr-vpnsslweb-portal-oschecklist-module) – SSL VPN OS checks.
* [fmgr\_vpnsslweb\_portal\_splitdns](fmgr_vpnsslweb_portal_splitdns_module#ansible-collections-fortinet-fortimanager-fmgr-vpnsslweb-portal-splitdns-module) – Split DNS for SSL VPN.
* [fmgr\_vpnsslweb\_realm](fmgr_vpnsslweb_realm_module#ansible-collections-fortinet-fortimanager-fmgr-vpnsslweb-realm-module) – Realm.
* [fmgr\_waf\_mainclass](fmgr_waf_mainclass_module#ansible-collections-fortinet-fortimanager-fmgr-waf-mainclass-module) – Hidden table for datasource.
* [fmgr\_waf\_profile](fmgr_waf_profile_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-module) – Web application firewall configuration.
* [fmgr\_waf\_profile\_addresslist](fmgr_waf_profile_addresslist_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-addresslist-module) – Black address list and white address list.
* [fmgr\_waf\_profile\_constraint](fmgr_waf_profile_constraint_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-module) – WAF HTTP protocol restrictions.
* [fmgr\_waf\_profile\_constraint\_contentlength](fmgr_waf_profile_constraint_contentlength_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-contentlength-module) – HTTP content length in request.
* [fmgr\_waf\_profile\_constraint\_exception](fmgr_waf_profile_constraint_exception_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-exception-module) – HTTP constraint exception.
* [fmgr\_waf\_profile\_constraint\_headerlength](fmgr_waf_profile_constraint_headerlength_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-headerlength-module) – HTTP header length in request.
* [fmgr\_waf\_profile\_constraint\_hostname](fmgr_waf_profile_constraint_hostname_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-hostname-module) – Enable/disable hostname check.
* [fmgr\_waf\_profile\_constraint\_linelength](fmgr_waf_profile_constraint_linelength_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-linelength-module) – HTTP line length in request.
* [fmgr\_waf\_profile\_constraint\_malformed](fmgr_waf_profile_constraint_malformed_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-malformed-module) – Enable/disable malformed HTTP request check.
* [fmgr\_waf\_profile\_constraint\_maxcookie](fmgr_waf_profile_constraint_maxcookie_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-maxcookie-module) – Maximum number of cookies in HTTP request.
* [fmgr\_waf\_profile\_constraint\_maxheaderline](fmgr_waf_profile_constraint_maxheaderline_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-maxheaderline-module) – Maximum number of HTTP header line.
* [fmgr\_waf\_profile\_constraint\_maxrangesegment](fmgr_waf_profile_constraint_maxrangesegment_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-maxrangesegment-module) – Maximum number of range segments in HTTP range line.
* [fmgr\_waf\_profile\_constraint\_maxurlparam](fmgr_waf_profile_constraint_maxurlparam_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-maxurlparam-module) – Maximum number of parameters in URL.
* [fmgr\_waf\_profile\_constraint\_method](fmgr_waf_profile_constraint_method_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-method-module) – Enable/disable HTTP method check.
* [fmgr\_waf\_profile\_constraint\_paramlength](fmgr_waf_profile_constraint_paramlength_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-paramlength-module) – Maximum length of parameter in URL, HTTP POST request or HTTP body.
* [fmgr\_waf\_profile\_constraint\_urlparamlength](fmgr_waf_profile_constraint_urlparamlength_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-urlparamlength-module) – Maximum length of parameter in URL.
* [fmgr\_waf\_profile\_constraint\_version](fmgr_waf_profile_constraint_version_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-constraint-version-module) – Enable/disable HTTP version check.
* [fmgr\_waf\_profile\_method](fmgr_waf_profile_method_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-method-module) – Method restriction.
* [fmgr\_waf\_profile\_method\_methodpolicy](fmgr_waf_profile_method_methodpolicy_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-method-methodpolicy-module) – HTTP method policy.
* [fmgr\_waf\_profile\_signature](fmgr_waf_profile_signature_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-signature-module) – WAF signatures.
* [fmgr\_waf\_profile\_signature\_customsignature](fmgr_waf_profile_signature_customsignature_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-signature-customsignature-module) – Custom signature.
* [fmgr\_waf\_profile\_signature\_mainclass](fmgr_waf_profile_signature_mainclass_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-signature-mainclass-module) – Main signature class.
* [fmgr\_waf\_profile\_urlaccess](fmgr_waf_profile_urlaccess_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-urlaccess-module) – URL access list
* [fmgr\_waf\_profile\_urlaccess\_accesspattern](fmgr_waf_profile_urlaccess_accesspattern_module#ansible-collections-fortinet-fortimanager-fmgr-waf-profile-urlaccess-accesspattern-module) – URL access pattern.
* [fmgr\_waf\_signature](fmgr_waf_signature_module#ansible-collections-fortinet-fortimanager-fmgr-waf-signature-module) – Hidden table for datasource.
* [fmgr\_waf\_subclass](fmgr_waf_subclass_module#ansible-collections-fortinet-fortimanager-fmgr-waf-subclass-module) – Hidden table for datasource.
* [fmgr\_wagprofile](fmgr_wagprofile_module#ansible-collections-fortinet-fortimanager-fmgr-wagprofile-module) – Configure wireless access gateway
* [fmgr\_wanopt\_authgroup](fmgr_wanopt_authgroup_module#ansible-collections-fortinet-fortimanager-fmgr-wanopt-authgroup-module) – Configure WAN optimization authentication groups.
* [fmgr\_wanopt\_peer](fmgr_wanopt_peer_module#ansible-collections-fortinet-fortimanager-fmgr-wanopt-peer-module) – Configure WAN optimization peers.
* [fmgr\_wanopt\_profile](fmgr_wanopt_profile_module#ansible-collections-fortinet-fortimanager-fmgr-wanopt-profile-module) – Configure WAN optimization profiles.
* [fmgr\_wanopt\_profile\_cifs](fmgr_wanopt_profile_cifs_module#ansible-collections-fortinet-fortimanager-fmgr-wanopt-profile-cifs-module) – Enable/disable CIFS
* [fmgr\_wanopt\_profile\_ftp](fmgr_wanopt_profile_ftp_module#ansible-collections-fortinet-fortimanager-fmgr-wanopt-profile-ftp-module) – Enable/disable FTP WAN Optimization and configure FTP WAN Optimization features.
* [fmgr\_wanopt\_profile\_http](fmgr_wanopt_profile_http_module#ansible-collections-fortinet-fortimanager-fmgr-wanopt-profile-http-module) – Enable/disable HTTP WAN Optimization and configure HTTP WAN Optimization features.
* [fmgr\_wanopt\_profile\_mapi](fmgr_wanopt_profile_mapi_module#ansible-collections-fortinet-fortimanager-fmgr-wanopt-profile-mapi-module) – Enable/disable MAPI email WAN Optimization and configure MAPI WAN Optimization features.
* [fmgr\_wanopt\_profile\_tcp](fmgr_wanopt_profile_tcp_module#ansible-collections-fortinet-fortimanager-fmgr-wanopt-profile-tcp-module) – Enable/disable TCP WAN Optimization and configure TCP WAN Optimization features.
* [fmgr\_wanprof\_system\_sdwan](fmgr_wanprof_system_sdwan_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-sdwan-module) – Configure redundant internet connections using SD-WAN
* [fmgr\_wanprof\_system\_sdwan\_duplication](fmgr_wanprof_system_sdwan_duplication_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-sdwan-duplication-module) – Create SD-WAN duplication rule.
* [fmgr\_wanprof\_system\_sdwan\_healthcheck](fmgr_wanprof_system_sdwan_healthcheck_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-sdwan-healthcheck-module) – SD-WAN status checking or health checking.
* [fmgr\_wanprof\_system\_sdwan\_healthcheck\_sla](fmgr_wanprof_system_sdwan_healthcheck_sla_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-sdwan-healthcheck-sla-module) – Service level agreement
* [fmgr\_wanprof\_system\_sdwan\_members](fmgr_wanprof_system_sdwan_members_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-sdwan-members-module) – FortiGate interfaces added to the SD-WAN.
* [fmgr\_wanprof\_system\_sdwan\_neighbor](fmgr_wanprof_system_sdwan_neighbor_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-sdwan-neighbor-module) – Create SD-WAN neighbor from BGP neighbor table to control route advertisements according to SLA status.
* [fmgr\_wanprof\_system\_sdwan\_service](fmgr_wanprof_system_sdwan_service_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-sdwan-service-module) – Create SD-WAN rules
* [fmgr\_wanprof\_system\_sdwan\_service\_sla](fmgr_wanprof_system_sdwan_service_sla_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-sdwan-service-sla-module) – Service level agreement
* [fmgr\_wanprof\_system\_sdwan\_zone](fmgr_wanprof_system_sdwan_zone_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-sdwan-zone-module) – Configure SD-WAN zones.
* [fmgr\_wanprof\_system\_virtualwanlink](fmgr_wanprof_system_virtualwanlink_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-virtualwanlink-module) – Configure redundant internet connections using SD-WAN
* [fmgr\_wanprof\_system\_virtualwanlink\_healthcheck](fmgr_wanprof_system_virtualwanlink_healthcheck_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-virtualwanlink-healthcheck-module) – SD-WAN status checking or health checking.
* [fmgr\_wanprof\_system\_virtualwanlink\_healthcheck\_sla](fmgr_wanprof_system_virtualwanlink_healthcheck_sla_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-virtualwanlink-healthcheck-sla-module) – Service level agreement
* [fmgr\_wanprof\_system\_virtualwanlink\_members](fmgr_wanprof_system_virtualwanlink_members_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-virtualwanlink-members-module) – Physical FortiGate interfaces added to the virtual-wan-link.
* [fmgr\_wanprof\_system\_virtualwanlink\_neighbor](fmgr_wanprof_system_virtualwanlink_neighbor_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-virtualwanlink-neighbor-module) – SD-WAN neighbor table.
* [fmgr\_wanprof\_system\_virtualwanlink\_service](fmgr_wanprof_system_virtualwanlink_service_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-virtualwanlink-service-module) – Create SD-WAN rules or priority rules
* [fmgr\_wanprof\_system\_virtualwanlink\_service\_sla](fmgr_wanprof_system_virtualwanlink_service_sla_module#ansible-collections-fortinet-fortimanager-fmgr-wanprof-system-virtualwanlink-service-sla-module) – Service level agreement
* [fmgr\_webfilter\_categories](fmgr_webfilter_categories_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-categories-module) – no description
* [fmgr\_webfilter\_content](fmgr_webfilter_content_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-content-module) – Configure Web filter banned word table.
* [fmgr\_webfilter\_content\_entries](fmgr_webfilter_content_entries_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-content-entries-module) – Configure banned word entries.
* [fmgr\_webfilter\_contentheader](fmgr_webfilter_contentheader_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-contentheader-module) – Configure content types used by Web filter.
* [fmgr\_webfilter\_contentheader\_entries](fmgr_webfilter_contentheader_entries_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-contentheader-entries-module) – Configure content types used by web filter.
* [fmgr\_webfilter\_ftgdlocalcat](fmgr_webfilter_ftgdlocalcat_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-ftgdlocalcat-module) – Configure FortiGuard Web Filter local categories.
* [fmgr\_webfilter\_ftgdlocalrating](fmgr_webfilter_ftgdlocalrating_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-ftgdlocalrating-module) – Configure local FortiGuard Web Filter local ratings.
* [fmgr\_webfilter\_profile](fmgr_webfilter_profile_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-profile-module) – Configure Web filter profiles.
* [fmgr\_webfilter\_profile\_antiphish](fmgr_webfilter_profile_antiphish_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-profile-antiphish-module) – AntiPhishing profile.
* [fmgr\_webfilter\_profile\_antiphish\_custompatterns](fmgr_webfilter_profile_antiphish_custompatterns_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-profile-antiphish-custompatterns-module) – Custom username and password regex patterns.
* [fmgr\_webfilter\_profile\_antiphish\_inspectionentries](fmgr_webfilter_profile_antiphish_inspectionentries_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-profile-antiphish-inspectionentries-module) – AntiPhishing entries.
* [fmgr\_webfilter\_profile\_filefilter](fmgr_webfilter_profile_filefilter_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-profile-filefilter-module) – File filter.
* [fmgr\_webfilter\_profile\_filefilter\_entries](fmgr_webfilter_profile_filefilter_entries_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-profile-filefilter-entries-module) – File filter entries.
* [fmgr\_webfilter\_profile\_ftgdwf](fmgr_webfilter_profile_ftgdwf_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-profile-ftgdwf-module) – FortiGuard Web Filter settings.
* [fmgr\_webfilter\_profile\_ftgdwf\_filters](fmgr_webfilter_profile_ftgdwf_filters_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-profile-ftgdwf-filters-module) – FortiGuard filters.
* [fmgr\_webfilter\_profile\_ftgdwf\_quota](fmgr_webfilter_profile_ftgdwf_quota_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-profile-ftgdwf-quota-module) – FortiGuard traffic quota settings.
* [fmgr\_webfilter\_profile\_override](fmgr_webfilter_profile_override_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-profile-override-module) – Web Filter override settings.
* [fmgr\_webfilter\_profile\_urlextraction](fmgr_webfilter_profile_urlextraction_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-profile-urlextraction-module) – Configure URL Extraction
* [fmgr\_webfilter\_profile\_web](fmgr_webfilter_profile_web_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-profile-web-module) – Web content filtering settings.
* [fmgr\_webfilter\_profile\_youtubechannelfilter](fmgr_webfilter_profile_youtubechannelfilter_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-profile-youtubechannelfilter-module) – YouTube channel filter.
* [fmgr\_webfilter\_urlfilter](fmgr_webfilter_urlfilter_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-urlfilter-module) – Configure URL filter lists.
* [fmgr\_webfilter\_urlfilter\_entries](fmgr_webfilter_urlfilter_entries_module#ansible-collections-fortinet-fortimanager-fmgr-webfilter-urlfilter-entries-module) – URL filter entries.
* [fmgr\_webproxy\_forwardserver](fmgr_webproxy_forwardserver_module#ansible-collections-fortinet-fortimanager-fmgr-webproxy-forwardserver-module) – Configure forward-server addresses.
* [fmgr\_webproxy\_forwardservergroup](fmgr_webproxy_forwardservergroup_module#ansible-collections-fortinet-fortimanager-fmgr-webproxy-forwardservergroup-module) – Configure a forward server group consisting or multiple forward servers.
* [fmgr\_webproxy\_forwardservergroup\_serverlist](fmgr_webproxy_forwardservergroup_serverlist_module#ansible-collections-fortinet-fortimanager-fmgr-webproxy-forwardservergroup-serverlist-module) – Add web forward servers to a list to form a server group.
* [fmgr\_webproxy\_profile](fmgr_webproxy_profile_module#ansible-collections-fortinet-fortimanager-fmgr-webproxy-profile-module) – Configure web proxy profiles.
* [fmgr\_webproxy\_profile\_headers](fmgr_webproxy_profile_headers_module#ansible-collections-fortinet-fortimanager-fmgr-webproxy-profile-headers-module) – Configure HTTP forwarded requests headers.
* [fmgr\_webproxy\_wisp](fmgr_webproxy_wisp_module#ansible-collections-fortinet-fortimanager-fmgr-webproxy-wisp-module) – Configure Wireless Internet service provider
* [fmgr\_widsprofile](fmgr_widsprofile_module#ansible-collections-fortinet-fortimanager-fmgr-widsprofile-module) – Configure wireless intrusion detection system
* [fmgr\_wtpprofile](fmgr_wtpprofile_module#ansible-collections-fortinet-fortimanager-fmgr-wtpprofile-module) – Configure WTP profiles or FortiAP profiles that define radio settings for manageable FortiAP platforms.
* [fmgr\_wtpprofile\_denymaclist](fmgr_wtpprofile_denymaclist_module#ansible-collections-fortinet-fortimanager-fmgr-wtpprofile-denymaclist-module) – List of MAC addresses that are denied access to this WTP, FortiAP, or AP.
* [fmgr\_wtpprofile\_lan](fmgr_wtpprofile_lan_module#ansible-collections-fortinet-fortimanager-fmgr-wtpprofile-lan-module) – WTP LAN port mapping.
* [fmgr\_wtpprofile\_lbs](fmgr_wtpprofile_lbs_module#ansible-collections-fortinet-fortimanager-fmgr-wtpprofile-lbs-module) – Set various location based service
* [fmgr\_wtpprofile\_platform](fmgr_wtpprofile_platform_module#ansible-collections-fortinet-fortimanager-fmgr-wtpprofile-platform-module) – WTP, FortiAP, or AP platform.
* [fmgr\_wtpprofile\_radio1](fmgr_wtpprofile_radio1_module#ansible-collections-fortinet-fortimanager-fmgr-wtpprofile-radio1-module) – Configuration options for radio 1.
* [fmgr\_wtpprofile\_radio2](fmgr_wtpprofile_radio2_module#ansible-collections-fortinet-fortimanager-fmgr-wtpprofile-radio2-module) – Configuration options for radio 2.
* [fmgr\_wtpprofile\_radio3](fmgr_wtpprofile_radio3_module#ansible-collections-fortinet-fortimanager-fmgr-wtpprofile-radio3-module) – Configuration options for radio 3.
* [fmgr\_wtpprofile\_radio4](fmgr_wtpprofile_radio4_module#ansible-collections-fortinet-fortimanager-fmgr-wtpprofile-radio4-module) – Configuration options for radio 4.
* [fmgr\_wtpprofile\_splittunnelingacl](fmgr_wtpprofile_splittunnelingacl_module#ansible-collections-fortinet-fortimanager-fmgr-wtpprofile-splittunnelingacl-module) – Split tunneling ACL filter list.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/fortinet/fortimanager/index.html>

Fortinet.Fortios
================

 Collection version 2.1.2

 Plugin Index
------------

 These are the plugins in the fortinet.fortios collection

 ### Httpapi Plugins

 * [fortios](fortios_httpapi#ansible-collections-fortinet-fortios-fortios-httpapi) – HttpApi Plugin for Fortinet FortiOS Appliance or VM

 ### Modules

 * [fortios\_alertemail\_setting](fortios_alertemail_setting_module#ansible-collections-fortinet-fortios-fortios-alertemail-setting-module) – Configure alert email settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_antivirus\_heuristic](fortios_antivirus_heuristic_module#ansible-collections-fortinet-fortios-fortios-antivirus-heuristic-module) – Configure global heuristic options in Fortinet’s FortiOS and FortiGate.
* [fortios\_antivirus\_mms\_checksum](fortios_antivirus_mms_checksum_module#ansible-collections-fortinet-fortios-fortios-antivirus-mms-checksum-module) – Configure MMS content checksum list in Fortinet’s FortiOS and FortiGate.
* [fortios\_antivirus\_notification](fortios_antivirus_notification_module#ansible-collections-fortinet-fortios-fortios-antivirus-notification-module) – Configure AntiVirus notification lists in Fortinet’s FortiOS and FortiGate.
* [fortios\_antivirus\_profile](fortios_antivirus_profile_module#ansible-collections-fortinet-fortios-fortios-antivirus-profile-module) – Configure AntiVirus profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_antivirus\_quarantine](fortios_antivirus_quarantine_module#ansible-collections-fortinet-fortios-fortios-antivirus-quarantine-module) – Configure quarantine options in Fortinet’s FortiOS and FortiGate.
* [fortios\_antivirus\_settings](fortios_antivirus_settings_module#ansible-collections-fortinet-fortios-fortios-antivirus-settings-module) – Configure AntiVirus settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_application\_custom](fortios_application_custom_module#ansible-collections-fortinet-fortios-fortios-application-custom-module) – Configure custom application signatures in Fortinet’s FortiOS and FortiGate.
* [fortios\_application\_group](fortios_application_group_module#ansible-collections-fortinet-fortios-fortios-application-group-module) – Configure firewall application groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_application\_list](fortios_application_list_module#ansible-collections-fortinet-fortios-fortios-application-list-module) – Configure application control lists in Fortinet’s FortiOS and FortiGate.
* [fortios\_application\_name](fortios_application_name_module#ansible-collections-fortinet-fortios-fortios-application-name-module) – Configure application signatures in Fortinet’s FortiOS and FortiGate.
* [fortios\_application\_rule\_settings](fortios_application_rule_settings_module#ansible-collections-fortinet-fortios-fortios-application-rule-settings-module) – Configure application rule settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_authentication\_rule](fortios_authentication_rule_module#ansible-collections-fortinet-fortios-fortios-authentication-rule-module) – Configure Authentication Rules in Fortinet’s FortiOS and FortiGate.
* [fortios\_authentication\_scheme](fortios_authentication_scheme_module#ansible-collections-fortinet-fortios-fortios-authentication-scheme-module) – Configure Authentication Schemes in Fortinet’s FortiOS and FortiGate.
* [fortios\_authentication\_setting](fortios_authentication_setting_module#ansible-collections-fortinet-fortios-fortios-authentication-setting-module) – Configure authentication setting in Fortinet’s FortiOS and FortiGate.
* [fortios\_certificate\_ca](fortios_certificate_ca_module#ansible-collections-fortinet-fortios-fortios-certificate-ca-module) – CA certificate in Fortinet’s FortiOS and FortiGate.
* [fortios\_certificate\_crl](fortios_certificate_crl_module#ansible-collections-fortinet-fortios-fortios-certificate-crl-module) – Certificate Revocation List as a PEM file in Fortinet’s FortiOS and FortiGate.
* [fortios\_certificate\_local](fortios_certificate_local_module#ansible-collections-fortinet-fortios-fortios-certificate-local-module) – Local keys and certificates in Fortinet’s FortiOS and FortiGate.
* [fortios\_certificate\_remote](fortios_certificate_remote_module#ansible-collections-fortinet-fortios-fortios-certificate-remote-module) – Remote certificate as a PEM file in Fortinet’s FortiOS and FortiGate.
* [fortios\_cifs\_domain\_controller](fortios_cifs_domain_controller_module#ansible-collections-fortinet-fortios-fortios-cifs-domain-controller-module) – Define known domain controller servers in Fortinet’s FortiOS and FortiGate.
* [fortios\_cifs\_profile](fortios_cifs_profile_module#ansible-collections-fortinet-fortios-fortios-cifs-profile-module) – Configure CIFS profile in Fortinet’s FortiOS and FortiGate.
* [fortios\_configuration\_fact](fortios_configuration_fact_module#ansible-collections-fortinet-fortios-fortios-configuration-fact-module) – Retrieve Facts of FortiOS Configurable Objects.
* [fortios\_credential\_store\_domain\_controller](fortios_credential_store_domain_controller_module#ansible-collections-fortinet-fortios-fortios-credential-store-domain-controller-module) – Define known domain controller servers in Fortinet’s FortiOS and FortiGate.
* [fortios\_dlp\_filepattern](fortios_dlp_filepattern_module#ansible-collections-fortinet-fortios-fortios-dlp-filepattern-module) – Configure file patterns used by DLP blocking in Fortinet’s FortiOS and FortiGate.
* [fortios\_dlp\_fp\_doc\_source](fortios_dlp_fp_doc_source_module#ansible-collections-fortinet-fortios-fortios-dlp-fp-doc-source-module) – Create a DLP fingerprint database by allowing the FortiGate to access a file server containing files from which to create fingerprints in Fortinet’s FortiOS and FortiGate.
* [fortios\_dlp\_fp\_sensitivity](fortios_dlp_fp_sensitivity_module#ansible-collections-fortinet-fortios-fortios-dlp-fp-sensitivity-module) – Create self-explanatory DLP sensitivity levels to be used when setting sensitivity under config fp-doc-source in Fortinet’s FortiOS and FortiGate.
* [fortios\_dlp\_sensitivity](fortios_dlp_sensitivity_module#ansible-collections-fortinet-fortios-fortios-dlp-sensitivity-module) – Create self-explanatory DLP sensitivity levels to be used when setting sensitivity under config fp-doc-source in Fortinet’s FortiOS and FortiGate.
* [fortios\_dlp\_sensor](fortios_dlp_sensor_module#ansible-collections-fortinet-fortios-fortios-dlp-sensor-module) – Configure DLP sensors in Fortinet’s FortiOS and FortiGate.
* [fortios\_dlp\_settings](fortios_dlp_settings_module#ansible-collections-fortinet-fortios-fortios-dlp-settings-module) – Designate logical storage for DLP fingerprint database in Fortinet’s FortiOS and FortiGate.
* [fortios\_dnsfilter\_domain\_filter](fortios_dnsfilter_domain_filter_module#ansible-collections-fortinet-fortios-fortios-dnsfilter-domain-filter-module) – Configure DNS domain filters in Fortinet’s FortiOS and FortiGate.
* [fortios\_dnsfilter\_profile](fortios_dnsfilter_profile_module#ansible-collections-fortinet-fortios-fortios-dnsfilter-profile-module) – Configure DNS domain filter profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_dpdk\_cpus](fortios_dpdk_cpus_module#ansible-collections-fortinet-fortios-fortios-dpdk-cpus-module) – Configure CPUs enabled to run engines in each DPDK stage in Fortinet’s FortiOS and FortiGate.
* [fortios\_dpdk\_global](fortios_dpdk_global_module#ansible-collections-fortinet-fortios-fortios-dpdk-global-module) – Configure global DPDK options in Fortinet’s FortiOS and FortiGate.
* [fortios\_emailfilter\_block\_allow\_list](fortios_emailfilter_block_allow_list_module#ansible-collections-fortinet-fortios-fortios-emailfilter-block-allow-list-module) – Configure anti-spam block/allow list in Fortinet’s FortiOS and FortiGate.
* [fortios\_emailfilter\_bwl](fortios_emailfilter_bwl_module#ansible-collections-fortinet-fortios-fortios-emailfilter-bwl-module) – Configure anti-spam black/white list in Fortinet’s FortiOS and FortiGate.
* [fortios\_emailfilter\_bword](fortios_emailfilter_bword_module#ansible-collections-fortinet-fortios-fortios-emailfilter-bword-module) – Configure AntiSpam banned word list in Fortinet’s FortiOS and FortiGate.
* [fortios\_emailfilter\_dnsbl](fortios_emailfilter_dnsbl_module#ansible-collections-fortinet-fortios-fortios-emailfilter-dnsbl-module) – Configure AntiSpam DNSBL/ORBL in Fortinet’s FortiOS and FortiGate.
* [fortios\_emailfilter\_fortishield](fortios_emailfilter_fortishield_module#ansible-collections-fortinet-fortios-fortios-emailfilter-fortishield-module) – Configure FortiGuard - AntiSpam in Fortinet’s FortiOS and FortiGate.
* [fortios\_emailfilter\_iptrust](fortios_emailfilter_iptrust_module#ansible-collections-fortinet-fortios-fortios-emailfilter-iptrust-module) – Configure AntiSpam IP trust in Fortinet’s FortiOS and FortiGate.
* [fortios\_emailfilter\_mheader](fortios_emailfilter_mheader_module#ansible-collections-fortinet-fortios-fortios-emailfilter-mheader-module) – Configure AntiSpam MIME header in Fortinet’s FortiOS and FortiGate.
* [fortios\_emailfilter\_options](fortios_emailfilter_options_module#ansible-collections-fortinet-fortios-fortios-emailfilter-options-module) – Configure AntiSpam options in Fortinet’s FortiOS and FortiGate.
* [fortios\_emailfilter\_profile](fortios_emailfilter_profile_module#ansible-collections-fortinet-fortios-fortios-emailfilter-profile-module) – Configure Email Filter profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_endpoint\_control\_client](fortios_endpoint_control_client_module#ansible-collections-fortinet-fortios-fortios-endpoint-control-client-module) – Configure endpoint control client lists in Fortinet’s FortiOS and FortiGate.
* [fortios\_endpoint\_control\_fctems](fortios_endpoint_control_fctems_module#ansible-collections-fortinet-fortios-fortios-endpoint-control-fctems-module) – Configure FortiClient Enterprise Management Server (EMS) entries in Fortinet’s FortiOS and FortiGate.
* [fortios\_endpoint\_control\_forticlient\_ems](fortios_endpoint_control_forticlient_ems_module#ansible-collections-fortinet-fortios-fortios-endpoint-control-forticlient-ems-module) – Configure FortiClient Enterprise Management Server (EMS) entries in Fortinet’s FortiOS and FortiGate.
* [fortios\_endpoint\_control\_forticlient\_registration\_sync](fortios_endpoint_control_forticlient_registration_sync_module#ansible-collections-fortinet-fortios-fortios-endpoint-control-forticlient-registration-sync-module) – Configure FortiClient registration synchronization settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_endpoint\_control\_profile](fortios_endpoint_control_profile_module#ansible-collections-fortinet-fortios-fortios-endpoint-control-profile-module) – Configure FortiClient endpoint control profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_endpoint\_control\_registered\_forticlient](fortios_endpoint_control_registered_forticlient_module#ansible-collections-fortinet-fortios-fortios-endpoint-control-registered-forticlient-module) – Registered FortiClient list in Fortinet’s FortiOS and FortiGate.
* [fortios\_endpoint\_control\_settings](fortios_endpoint_control_settings_module#ansible-collections-fortinet-fortios-fortios-endpoint-control-settings-module) – Configure endpoint control settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_extender\_controller\_dataplan](fortios_extender_controller_dataplan_module#ansible-collections-fortinet-fortios-fortios-extender-controller-dataplan-module) – FortiExtender dataplan configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_extender\_controller\_extender](fortios_extender_controller_extender_module#ansible-collections-fortinet-fortios-fortios-extender-controller-extender-module) – Extender controller configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_extender\_extender\_info](fortios_extender_extender_info_module#ansible-collections-fortinet-fortios-fortios-extender-extender-info-module) – Display extender struct information in Fortinet’s FortiOS and FortiGate.
* [fortios\_extender\_lte\_carrier\_by\_mcc\_mnc](fortios_extender_lte_carrier_by_mcc_mnc_module#ansible-collections-fortinet-fortios-fortios-extender-lte-carrier-by-mcc-mnc-module) – Display extender modem carrier based on MCC and MNC in Fortinet’s FortiOS and FortiGate.
* [fortios\_extender\_lte\_carrier\_list](fortios_extender_lte_carrier_list_module#ansible-collections-fortinet-fortios-fortios-extender-lte-carrier-list-module) – Display extender modem carrier list in Fortinet’s FortiOS and FortiGate.
* [fortios\_extender\_modem\_status](fortios_extender_modem_status_module#ansible-collections-fortinet-fortios-fortios-extender-modem-status-module) – Display detailed extender modem status in Fortinet’s FortiOS and FortiGate.
* [fortios\_extender\_sys\_info](fortios_extender_sys_info_module#ansible-collections-fortinet-fortios-fortios-extender-sys-info-module) – Display detailed extender system information in Fortinet’s FortiOS and FortiGate.
* [fortios\_file\_filter\_profile](fortios_file_filter_profile_module#ansible-collections-fortinet-fortios-fortios-file-filter-profile-module) – Configure file-filter profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_access\_proxy](fortios_firewall_access_proxy_module#ansible-collections-fortinet-fortios-fortios-firewall-access-proxy-module) – Configure Access Proxy in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_access\_proxy\_virtual\_host](fortios_firewall_access_proxy_virtual_host_module#ansible-collections-fortinet-fortios-fortios-firewall-access-proxy-virtual-host-module) – Configure Access Proxy virtual hosts in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_acl](fortios_firewall_acl_module#ansible-collections-fortinet-fortios-fortios-firewall-acl-module) – Configure IPv4 access control list in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_acl6](fortios_firewall_acl6_module#ansible-collections-fortinet-fortios-fortios-firewall-acl6-module) – Configure IPv6 access control list in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_address](fortios_firewall_address_module#ansible-collections-fortinet-fortios-fortios-firewall-address-module) – Configure IPv4 addresses in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_address6](fortios_firewall_address6_module#ansible-collections-fortinet-fortios-fortios-firewall-address6-module) – Configure IPv6 firewall addresses in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_address6\_template](fortios_firewall_address6_template_module#ansible-collections-fortinet-fortios-fortios-firewall-address6-template-module) – Configure IPv6 address templates in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_addrgrp](fortios_firewall_addrgrp_module#ansible-collections-fortinet-fortios-fortios-firewall-addrgrp-module) – Configure IPv4 address groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_addrgrp6](fortios_firewall_addrgrp6_module#ansible-collections-fortinet-fortios-fortios-firewall-addrgrp6-module) – Configure IPv6 address groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_auth\_portal](fortios_firewall_auth_portal_module#ansible-collections-fortinet-fortios-fortios-firewall-auth-portal-module) – Configure firewall authentication portals in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_carrier\_endpoint\_bwl](fortios_firewall_carrier_endpoint_bwl_module#ansible-collections-fortinet-fortios-fortios-firewall-carrier-endpoint-bwl-module) – Carrier end point black/white list tables in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_central\_snat\_map](fortios_firewall_central_snat_map_module#ansible-collections-fortinet-fortios-fortios-firewall-central-snat-map-module) – Configure central SNAT policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_city](fortios_firewall_city_module#ansible-collections-fortinet-fortios-fortios-firewall-city-module) – Define city table in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_consolidated\_policy](fortios_firewall_consolidated_policy_module#ansible-collections-fortinet-fortios-fortios-firewall-consolidated-policy-module) – Configure consolidated IPv4/IPv6 policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_country](fortios_firewall_country_module#ansible-collections-fortinet-fortios-fortios-firewall-country-module) – Define country table in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_decrypted\_traffic\_mirror](fortios_firewall_decrypted_traffic_mirror_module#ansible-collections-fortinet-fortios-fortios-firewall-decrypted-traffic-mirror-module) – Configure decrypted traffic mirror in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_dnstranslation](fortios_firewall_dnstranslation_module#ansible-collections-fortinet-fortios-fortios-firewall-dnstranslation-module) – Configure DNS translation in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_dos\_policy](fortios_firewall_dos_policy_module#ansible-collections-fortinet-fortios-fortios-firewall-dos-policy-module) – Configure IPv4 DoS policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_dos\_policy6](fortios_firewall_dos_policy6_module#ansible-collections-fortinet-fortios-fortios-firewall-dos-policy6-module) – Configure IPv6 DoS policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_gtp](fortios_firewall_gtp_module#ansible-collections-fortinet-fortios-fortios-firewall-gtp-module) – Configure GTP in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_identity\_based\_route](fortios_firewall_identity_based_route_module#ansible-collections-fortinet-fortios-fortios-firewall-identity-based-route-module) – Configure identity based routing in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_interface\_policy](fortios_firewall_interface_policy_module#ansible-collections-fortinet-fortios-fortios-firewall-interface-policy-module) – Configure IPv4 interface policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_interface\_policy6](fortios_firewall_interface_policy6_module#ansible-collections-fortinet-fortios-fortios-firewall-interface-policy6-module) – Configure IPv6 interface policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service](fortios_firewall_internet_service_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-module) – Show Internet Service application in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_addition](fortios_firewall_internet_service_addition_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-addition-module) – Configure Internet Services Addition in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_append](fortios_firewall_internet_service_append_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-append-module) – Configure additional port mappings for Internet Services in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_botnet](fortios_firewall_internet_service_botnet_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-botnet-module) – Show Internet Service botnet in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_custom](fortios_firewall_internet_service_custom_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-custom-module) – Configure custom Internet Services in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_custom\_group](fortios_firewall_internet_service_custom_group_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-custom-group-module) – Configure custom Internet Service group in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_definition](fortios_firewall_internet_service_definition_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-definition-module) – Configure Internet Service definition in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_extension](fortios_firewall_internet_service_extension_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-extension-module) – Configure Internet Services Extension in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_group](fortios_firewall_internet_service_group_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-group-module) – Configure group of Internet Service in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_ipbl\_reason](fortios_firewall_internet_service_ipbl_reason_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-ipbl-reason-module) – IP blacklist reason in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_ipbl\_vendor](fortios_firewall_internet_service_ipbl_vendor_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-ipbl-vendor-module) – IP blacklist vendor in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_list](fortios_firewall_internet_service_list_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-list-module) – Internet Service list in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_name](fortios_firewall_internet_service_name_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-name-module) – Define internet service names in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_owner](fortios_firewall_internet_service_owner_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-owner-module) – Internet Service owner in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_reputation](fortios_firewall_internet_service_reputation_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-reputation-module) – Show Internet Service reputation in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_internet\_service\_sld](fortios_firewall_internet_service_sld_module#ansible-collections-fortinet-fortios-fortios-firewall-internet-service-sld-module) – Internet Service Second Level Domain in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ip\_translation](fortios_firewall_ip_translation_module#ansible-collections-fortinet-fortios-fortios-firewall-ip-translation-module) – Configure firewall IP-translation in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ipmacbinding\_setting](fortios_firewall_ipmacbinding_setting_module#ansible-collections-fortinet-fortios-fortios-firewall-ipmacbinding-setting-module) – Configure IP to MAC binding settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ipmacbinding\_table](fortios_firewall_ipmacbinding_table_module#ansible-collections-fortinet-fortios-fortios-firewall-ipmacbinding-table-module) – Configure IP to MAC address pairs in the IP/MAC binding table in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ippool](fortios_firewall_ippool_module#ansible-collections-fortinet-fortios-fortios-firewall-ippool-module) – Configure IPv4 IP pools in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ippool6](fortios_firewall_ippool6_module#ansible-collections-fortinet-fortios-fortios-firewall-ippool6-module) – Configure IPv6 IP pools in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_iprope\_list](fortios_firewall_iprope_list_module#ansible-collections-fortinet-fortios-fortios-firewall-iprope-list-module) – lis in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ipv6\_eh\_filter](fortios_firewall_ipv6_eh_filter_module#ansible-collections-fortinet-fortios-fortios-firewall-ipv6-eh-filter-module) – Configure IPv6 extension header filter in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ldb\_monitor](fortios_firewall_ldb_monitor_module#ansible-collections-fortinet-fortios-fortios-firewall-ldb-monitor-module) – Configure server load balancing health monitors in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_local\_in\_policy](fortios_firewall_local_in_policy_module#ansible-collections-fortinet-fortios-fortios-firewall-local-in-policy-module) – Configure user defined IPv4 local-in policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_local\_in\_policy6](fortios_firewall_local_in_policy6_module#ansible-collections-fortinet-fortios-fortios-firewall-local-in-policy6-module) – Configure user defined IPv6 local-in policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_mms\_profile](fortios_firewall_mms_profile_module#ansible-collections-fortinet-fortios-fortios-firewall-mms-profile-module) – Configure MMS profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_multicast\_address](fortios_firewall_multicast_address_module#ansible-collections-fortinet-fortios-fortios-firewall-multicast-address-module) – Configure multicast addresses in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_multicast\_address6](fortios_firewall_multicast_address6_module#ansible-collections-fortinet-fortios-fortios-firewall-multicast-address6-module) – Configure IPv6 multicast address in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_multicast\_policy](fortios_firewall_multicast_policy_module#ansible-collections-fortinet-fortios-fortios-firewall-multicast-policy-module) – Configure multicast NAT policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_multicast\_policy6](fortios_firewall_multicast_policy6_module#ansible-collections-fortinet-fortios-fortios-firewall-multicast-policy6-module) – Configure IPv6 multicast NAT policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_policy](fortios_firewall_policy_module#ansible-collections-fortinet-fortios-fortios-firewall-policy-module) – Configure IPv4 policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_policy46](fortios_firewall_policy46_module#ansible-collections-fortinet-fortios-fortios-firewall-policy46-module) – Configure IPv4 to IPv6 policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_policy6](fortios_firewall_policy6_module#ansible-collections-fortinet-fortios-fortios-firewall-policy6-module) – Configure IPv6 policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_policy64](fortios_firewall_policy64_module#ansible-collections-fortinet-fortios-fortios-firewall-policy64-module) – Configure IPv6 to IPv4 policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_profile\_group](fortios_firewall_profile_group_module#ansible-collections-fortinet-fortios-fortios-firewall-profile-group-module) – Configure profile groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_profile\_protocol\_options](fortios_firewall_profile_protocol_options_module#ansible-collections-fortinet-fortios-fortios-firewall-profile-protocol-options-module) – Configure protocol options in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_proute](fortios_firewall_proute_module#ansible-collections-fortinet-fortios-fortios-firewall-proute-module) – List policy routing in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_proxy\_address](fortios_firewall_proxy_address_module#ansible-collections-fortinet-fortios-fortios-firewall-proxy-address-module) – Web proxy address configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_proxy\_addrgrp](fortios_firewall_proxy_addrgrp_module#ansible-collections-fortinet-fortios-fortios-firewall-proxy-addrgrp-module) – Web proxy address group configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_proxy\_policy](fortios_firewall_proxy_policy_module#ansible-collections-fortinet-fortios-fortios-firewall-proxy-policy-module) – Configure proxy policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_region](fortios_firewall_region_module#ansible-collections-fortinet-fortios-fortios-firewall-region-module) – Define region table in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_schedule\_group](fortios_firewall_schedule_group_module#ansible-collections-fortinet-fortios-fortios-firewall-schedule-group-module) – Schedule group configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_schedule\_onetime](fortios_firewall_schedule_onetime_module#ansible-collections-fortinet-fortios-fortios-firewall-schedule-onetime-module) – Onetime schedule configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_schedule\_recurring](fortios_firewall_schedule_recurring_module#ansible-collections-fortinet-fortios-fortios-firewall-schedule-recurring-module) – Recurring schedule configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_security\_policy](fortios_firewall_security_policy_module#ansible-collections-fortinet-fortios-fortios-firewall-security-policy-module) – Configure NGFW IPv4/IPv6 application policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_service\_category](fortios_firewall_service_category_module#ansible-collections-fortinet-fortios-fortios-firewall-service-category-module) – Configure service categories in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_service\_custom](fortios_firewall_service_custom_module#ansible-collections-fortinet-fortios-fortios-firewall-service-custom-module) – Configure custom services in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_service\_group](fortios_firewall_service_group_module#ansible-collections-fortinet-fortios-fortios-firewall-service-group-module) – Configure service groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_shaper\_per\_ip\_shaper](fortios_firewall_shaper_per_ip_shaper_module#ansible-collections-fortinet-fortios-fortios-firewall-shaper-per-ip-shaper-module) – Configure per-IP traffic shaper in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_shaper\_traffic\_shaper](fortios_firewall_shaper_traffic_shaper_module#ansible-collections-fortinet-fortios-fortios-firewall-shaper-traffic-shaper-module) – Configure shared traffic shaper in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_shaping\_policy](fortios_firewall_shaping_policy_module#ansible-collections-fortinet-fortios-fortios-firewall-shaping-policy-module) – Configure shaping policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_shaping\_profile](fortios_firewall_shaping_profile_module#ansible-collections-fortinet-fortios-fortios-firewall-shaping-profile-module) – Configure shaping profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_sniffer](fortios_firewall_sniffer_module#ansible-collections-fortinet-fortios-fortios-firewall-sniffer-module) – Configure sniffer in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ssh\_host\_key](fortios_firewall_ssh_host_key_module#ansible-collections-fortinet-fortios-fortios-firewall-ssh-host-key-module) – SSH proxy host public keys in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ssh\_local\_ca](fortios_firewall_ssh_local_ca_module#ansible-collections-fortinet-fortios-fortios-firewall-ssh-local-ca-module) – SSH proxy local CA in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ssh\_local\_key](fortios_firewall_ssh_local_key_module#ansible-collections-fortinet-fortios-fortios-firewall-ssh-local-key-module) – SSH proxy local keys in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ssh\_setting](fortios_firewall_ssh_setting_module#ansible-collections-fortinet-fortios-fortios-firewall-ssh-setting-module) – SSH proxy settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ssl\_server](fortios_firewall_ssl_server_module#ansible-collections-fortinet-fortios-fortios-firewall-ssl-server-module) – Configure SSL servers in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ssl\_setting](fortios_firewall_ssl_setting_module#ansible-collections-fortinet-fortios-fortios-firewall-ssl-setting-module) – SSL proxy settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ssl\_ssh\_profile](fortios_firewall_ssl_ssh_profile_module#ansible-collections-fortinet-fortios-fortios-firewall-ssl-ssh-profile-module) – Configure SSL/SSH protocol options in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_traffic\_class](fortios_firewall_traffic_class_module#ansible-collections-fortinet-fortios-fortios-firewall-traffic-class-module) – Configure names for shaping classes in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_ttl\_policy](fortios_firewall_ttl_policy_module#ansible-collections-fortinet-fortios-fortios-firewall-ttl-policy-module) – Configure TTL policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_vendor\_mac](fortios_firewall_vendor_mac_module#ansible-collections-fortinet-fortios-fortios-firewall-vendor-mac-module) – Show vendor and the MAC address they have in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_vip](fortios_firewall_vip_module#ansible-collections-fortinet-fortios-fortios-firewall-vip-module) – Configure virtual IP for IPv4 in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_vip46](fortios_firewall_vip46_module#ansible-collections-fortinet-fortios-fortios-firewall-vip46-module) – Configure IPv4 to IPv6 virtual IPs in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_vip6](fortios_firewall_vip6_module#ansible-collections-fortinet-fortios-fortios-firewall-vip6-module) – Configure virtual IP for IPv6 in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_vip64](fortios_firewall_vip64_module#ansible-collections-fortinet-fortios-fortios-firewall-vip64-module) – Configure IPv6 to IPv4 virtual IPs in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_vipgrp](fortios_firewall_vipgrp_module#ansible-collections-fortinet-fortios-fortios-firewall-vipgrp-module) – Configure IPv4 virtual IP groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_vipgrp46](fortios_firewall_vipgrp46_module#ansible-collections-fortinet-fortios-fortios-firewall-vipgrp46-module) – Configure IPv4 to IPv6 virtual IP groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_vipgrp6](fortios_firewall_vipgrp6_module#ansible-collections-fortinet-fortios-fortios-firewall-vipgrp6-module) – Configure IPv6 virtual IP groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_vipgrp64](fortios_firewall_vipgrp64_module#ansible-collections-fortinet-fortios-fortios-firewall-vipgrp64-module) – Configure IPv6 to IPv4 virtual IP groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_wildcard\_fqdn\_custom](fortios_firewall_wildcard_fqdn_custom_module#ansible-collections-fortinet-fortios-fortios-firewall-wildcard-fqdn-custom-module) – Config global/VDOM Wildcard FQDN address in Fortinet’s FortiOS and FortiGate.
* [fortios\_firewall\_wildcard\_fqdn\_group](fortios_firewall_wildcard_fqdn_group_module#ansible-collections-fortinet-fortios-fortios-firewall-wildcard-fqdn-group-module) – Config global Wildcard FQDN address groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_ftp\_proxy\_explicit](fortios_ftp_proxy_explicit_module#ansible-collections-fortinet-fortios-fortios-ftp-proxy-explicit-module) – Configure explicit FTP proxy settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_gtp\_apn](fortios_gtp_apn_module#ansible-collections-fortinet-fortios-fortios-gtp-apn-module) – Configure APN for GTP in Fortinet’s FortiOS and FortiGate.
* [fortios\_gtp\_apn\_shaper](fortios_gtp_apn_shaper_module#ansible-collections-fortinet-fortios-fortios-gtp-apn-shaper-module) – Global per-APN shaper in Fortinet’s FortiOS and FortiGate.
* [fortios\_gtp\_apngrp](fortios_gtp_apngrp_module#ansible-collections-fortinet-fortios-fortios-gtp-apngrp-module) – Configure APN groups for GTP in Fortinet’s FortiOS and FortiGate.
* [fortios\_gtp\_ie\_allow\_list](fortios_gtp_ie_allow_list_module#ansible-collections-fortinet-fortios-fortios-gtp-ie-allow-list-module) – IE allow list in Fortinet’s FortiOS and FortiGate.
* [fortios\_gtp\_ie\_white\_list](fortios_gtp_ie_white_list_module#ansible-collections-fortinet-fortios-fortios-gtp-ie-white-list-module) – IE white list in Fortinet’s FortiOS and FortiGate.
* [fortios\_gtp\_message\_filter\_v0v1](fortios_gtp_message_filter_v0v1_module#ansible-collections-fortinet-fortios-fortios-gtp-message-filter-v0v1-module) – Message filter for GTPv0/v1 messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_gtp\_message\_filter\_v2](fortios_gtp_message_filter_v2_module#ansible-collections-fortinet-fortios-fortios-gtp-message-filter-v2-module) – Message filter for GTPv2 messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_gtp\_tunnel\_limit](fortios_gtp_tunnel_limit_module#ansible-collections-fortinet-fortios-fortios-gtp-tunnel-limit-module) – GTP tunnel limiter in Fortinet’s FortiOS and FortiGate.
* [fortios\_hardware\_nic](fortios_hardware_nic_module#ansible-collections-fortinet-fortios-fortios-hardware-nic-module) – Display NIC information in Fortinet’s FortiOS and FortiGate.
* [fortios\_hardware\_npu\_np6\_dce](fortios_hardware_npu_np6_dce_module#ansible-collections-fortinet-fortios-fortios-hardware-npu-np6-dce-module) – Show NP6 non-zero subengine drop counters in Fortinet’s FortiOS and FortiGate.
* [fortios\_hardware\_npu\_np6\_session\_stats](fortios_hardware_npu_np6_session_stats_module#ansible-collections-fortinet-fortios-fortios-hardware-npu-np6-session-stats-module) – Show NP6 session offloading statistics counters in Fortinet’s FortiOS and FortiGate.
* [fortios\_hardware\_npu\_np6\_sse\_stats](fortios_hardware_npu_np6_sse_stats_module#ansible-collections-fortinet-fortios-fortios-hardware-npu-np6-sse-stats-module) – Show NP6 hardware session statistics counters in Fortinet’s FortiOS and FortiGate.
* [fortios\_icap\_profile](fortios_icap_profile_module#ansible-collections-fortinet-fortios-fortios-icap-profile-module) – Configure ICAP profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_icap\_server](fortios_icap_server_module#ansible-collections-fortinet-fortios-fortios-icap-server-module) – Configure ICAP servers in Fortinet’s FortiOS and FortiGate.
* [fortios\_ips\_custom](fortios_ips_custom_module#ansible-collections-fortinet-fortios-fortios-ips-custom-module) – Configure IPS custom signature in Fortinet’s FortiOS and FortiGate.
* [fortios\_ips\_decoder](fortios_ips_decoder_module#ansible-collections-fortinet-fortios-fortios-ips-decoder-module) – Configure IPS decoder in Fortinet’s FortiOS and FortiGate.
* [fortios\_ips\_global](fortios_ips_global_module#ansible-collections-fortinet-fortios-fortios-ips-global-module) – Configure IPS global parameter in Fortinet’s FortiOS and FortiGate.
* [fortios\_ips\_rule](fortios_ips_rule_module#ansible-collections-fortinet-fortios-fortios-ips-rule-module) – Configure IPS rules in Fortinet’s FortiOS and FortiGate.
* [fortios\_ips\_rule\_settings](fortios_ips_rule_settings_module#ansible-collections-fortinet-fortios-fortios-ips-rule-settings-module) – Configure IPS rule setting in Fortinet’s FortiOS and FortiGate.
* [fortios\_ips\_sensor](fortios_ips_sensor_module#ansible-collections-fortinet-fortios-fortios-ips-sensor-module) – Configure IPS sensor in Fortinet’s FortiOS and FortiGate.
* [fortios\_ips\_settings](fortios_ips_settings_module#ansible-collections-fortinet-fortios-fortios-ips-settings-module) – Configure IPS VDOM parameter in Fortinet’s FortiOS and FortiGate.
* [fortios\_ips\_view\_map](fortios_ips_view_map_module#ansible-collections-fortinet-fortios-fortios-ips-view-map-module) – configure ips view-ma in Fortinet’s FortiOS and FortiGate.
* [fortios\_json\_generic](fortios_json_generic_module#ansible-collections-fortinet-fortios-fortios-json-generic-module) – Config Fortinet’s FortiOS and FortiGate with json generic method.
* [fortios\_log\_custom\_field](fortios_log_custom_field_module#ansible-collections-fortinet-fortios-fortios-log-custom-field-module) – Configure custom log fields in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_disk\_filter](fortios_log_disk_filter_module#ansible-collections-fortinet-fortios-fortios-log-disk-filter-module) – Configure filters for local disk logging. Use these filters to determine the log messages to record according to severity and type in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_disk\_setting](fortios_log_disk_setting_module#ansible-collections-fortinet-fortios-fortios-log-disk-setting-module) – Settings for local disk logging in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_eventfilter](fortios_log_eventfilter_module#ansible-collections-fortinet-fortios-fortios-log-eventfilter-module) – Configure log event filters in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fact](fortios_log_fact_module#ansible-collections-fortinet-fortios-fortios-log-fact-module) – Retrieve log data of fortios log objects.
* [fortios\_log\_fortianalyzer2\_filter](fortios_log_fortianalyzer2_filter_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer2-filter-module) – Filters for FortiAnalyzer in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer2\_override\_filter](fortios_log_fortianalyzer2_override_filter_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer2-override-filter-module) – Override filters for FortiAnalyzer in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer2\_override\_setting](fortios_log_fortianalyzer2_override_setting_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer2-override-setting-module) – Override FortiAnalyzer settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer2\_setting](fortios_log_fortianalyzer2_setting_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer2-setting-module) – Global FortiAnalyzer settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer3\_filter](fortios_log_fortianalyzer3_filter_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer3-filter-module) – Filters for FortiAnalyzer in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer3\_override\_filter](fortios_log_fortianalyzer3_override_filter_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer3-override-filter-module) – Override filters for FortiAnalyzer in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer3\_override\_setting](fortios_log_fortianalyzer3_override_setting_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer3-override-setting-module) – Override FortiAnalyzer settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer3\_setting](fortios_log_fortianalyzer3_setting_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer3-setting-module) – Global FortiAnalyzer settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer\_cloud\_filter](fortios_log_fortianalyzer_cloud_filter_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer-cloud-filter-module) – Filters for FortiAnalyzer Cloud in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer\_cloud\_override\_filter](fortios_log_fortianalyzer_cloud_override_filter_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer-cloud-override-filter-module) – Override filters for FortiAnalyzer Cloud in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer\_cloud\_override\_setting](fortios_log_fortianalyzer_cloud_override_setting_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer-cloud-override-setting-module) – Override FortiAnalyzer Cloud settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer\_cloud\_setting](fortios_log_fortianalyzer_cloud_setting_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer-cloud-setting-module) – Global FortiAnalyzer Cloud settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer\_filter](fortios_log_fortianalyzer_filter_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer-filter-module) – Filters for FortiAnalyzer in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer\_override\_filter](fortios_log_fortianalyzer_override_filter_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer-override-filter-module) – Override filters for FortiAnalyzer in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer\_override\_setting](fortios_log_fortianalyzer_override_setting_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer-override-setting-module) – Override FortiAnalyzer settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortianalyzer\_setting](fortios_log_fortianalyzer_setting_module#ansible-collections-fortinet-fortios-fortios-log-fortianalyzer-setting-module) – Global FortiAnalyzer settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortiguard\_filter](fortios_log_fortiguard_filter_module#ansible-collections-fortinet-fortios-fortios-log-fortiguard-filter-module) – Filters for FortiCloud in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortiguard\_override\_filter](fortios_log_fortiguard_override_filter_module#ansible-collections-fortinet-fortios-fortios-log-fortiguard-override-filter-module) – Override filters for FortiCloud in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortiguard\_override\_setting](fortios_log_fortiguard_override_setting_module#ansible-collections-fortinet-fortios-fortios-log-fortiguard-override-setting-module) – Override global FortiCloud logging settings for this VDOM in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_fortiguard\_setting](fortios_log_fortiguard_setting_module#ansible-collections-fortinet-fortios-fortios-log-fortiguard-setting-module) – Configure logging to FortiCloud in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_gui\_display](fortios_log_gui_display_module#ansible-collections-fortinet-fortios-fortios-log-gui-display-module) – Configure how log messages are displayed on the GUI in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_memory\_filter](fortios_log_memory_filter_module#ansible-collections-fortinet-fortios-fortios-log-memory-filter-module) – Filters for memory buffer in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_memory\_global\_setting](fortios_log_memory_global_setting_module#ansible-collections-fortinet-fortios-fortios-log-memory-global-setting-module) – Global settings for memory logging in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_memory\_setting](fortios_log_memory_setting_module#ansible-collections-fortinet-fortios-fortios-log-memory-setting-module) – Settings for memory buffer in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_null\_device\_filter](fortios_log_null_device_filter_module#ansible-collections-fortinet-fortios-fortios-log-null-device-filter-module) – Filters for null device logging in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_null\_device\_setting](fortios_log_null_device_setting_module#ansible-collections-fortinet-fortios-fortios-log-null-device-setting-module) – Settings for null device logging in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_setting](fortios_log_setting_module#ansible-collections-fortinet-fortios-fortios-log-setting-module) – Configure general log settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd2\_filter](fortios_log_syslogd2_filter_module#ansible-collections-fortinet-fortios-fortios-log-syslogd2-filter-module) – Filters for remote system server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd2\_override\_filter](fortios_log_syslogd2_override_filter_module#ansible-collections-fortinet-fortios-fortios-log-syslogd2-override-filter-module) – Override filters for remote system server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd2\_override\_setting](fortios_log_syslogd2_override_setting_module#ansible-collections-fortinet-fortios-fortios-log-syslogd2-override-setting-module) – Override settings for remote syslog server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd2\_setting](fortios_log_syslogd2_setting_module#ansible-collections-fortinet-fortios-fortios-log-syslogd2-setting-module) – Global settings for remote syslog server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd3\_filter](fortios_log_syslogd3_filter_module#ansible-collections-fortinet-fortios-fortios-log-syslogd3-filter-module) – Filters for remote system server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd3\_override\_filter](fortios_log_syslogd3_override_filter_module#ansible-collections-fortinet-fortios-fortios-log-syslogd3-override-filter-module) – Override filters for remote system server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd3\_override\_setting](fortios_log_syslogd3_override_setting_module#ansible-collections-fortinet-fortios-fortios-log-syslogd3-override-setting-module) – Override settings for remote syslog server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd3\_setting](fortios_log_syslogd3_setting_module#ansible-collections-fortinet-fortios-fortios-log-syslogd3-setting-module) – Global settings for remote syslog server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd4\_filter](fortios_log_syslogd4_filter_module#ansible-collections-fortinet-fortios-fortios-log-syslogd4-filter-module) – Filters for remote system server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd4\_override\_filter](fortios_log_syslogd4_override_filter_module#ansible-collections-fortinet-fortios-fortios-log-syslogd4-override-filter-module) – Override filters for remote system server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd4\_override\_setting](fortios_log_syslogd4_override_setting_module#ansible-collections-fortinet-fortios-fortios-log-syslogd4-override-setting-module) – Override settings for remote syslog server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd4\_setting](fortios_log_syslogd4_setting_module#ansible-collections-fortinet-fortios-fortios-log-syslogd4-setting-module) – Global settings for remote syslog server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd\_filter](fortios_log_syslogd_filter_module#ansible-collections-fortinet-fortios-fortios-log-syslogd-filter-module) – Filters for remote system server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd\_override\_filter](fortios_log_syslogd_override_filter_module#ansible-collections-fortinet-fortios-fortios-log-syslogd-override-filter-module) – Override filters for remote system server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd\_override\_setting](fortios_log_syslogd_override_setting_module#ansible-collections-fortinet-fortios-fortios-log-syslogd-override-setting-module) – Override settings for remote syslog server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_syslogd\_setting](fortios_log_syslogd_setting_module#ansible-collections-fortinet-fortios-fortios-log-syslogd-setting-module) – Global settings for remote syslog server in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_threat\_weight](fortios_log_threat_weight_module#ansible-collections-fortinet-fortios-fortios-log-threat-weight-module) – Configure threat weight settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_webtrends\_filter](fortios_log_webtrends_filter_module#ansible-collections-fortinet-fortios-fortios-log-webtrends-filter-module) – Filters for WebTrends in Fortinet’s FortiOS and FortiGate.
* [fortios\_log\_webtrends\_setting](fortios_log_webtrends_setting_module#ansible-collections-fortinet-fortios-fortios-log-webtrends-setting-module) – Settings for WebTrends in Fortinet’s FortiOS and FortiGate.
* [fortios\_monitor](fortios_monitor_module#ansible-collections-fortinet-fortios-fortios-monitor-module) – Ansible Module for FortiOS Monitor API
* [fortios\_monitor\_fact](fortios_monitor_fact_module#ansible-collections-fortinet-fortios-fortios-monitor-fact-module) – Retrieve Facts of FortiOS Monitor Objects.
* [fortios\_monitoring\_np6\_ipsec\_engine](fortios_monitoring_np6_ipsec_engine_module#ansible-collections-fortinet-fortios-fortios-monitoring-np6-ipsec-engine-module) – Configure NP6 IPsec engine status monitoring in Fortinet’s FortiOS and FortiGate.
* [fortios\_monitoring\_npu\_hpe](fortios_monitoring_npu_hpe_module#ansible-collections-fortinet-fortios-fortios-monitoring-npu-hpe-module) – Configure npu-hpe status monitoring in Fortinet’s FortiOS and FortiGate.
* [fortios\_nsxt\_service\_chain](fortios_nsxt_service_chain_module#ansible-collections-fortinet-fortios-fortios-nsxt-service-chain-module) – Configure NSX-T service chain in Fortinet’s FortiOS and FortiGate.
* [fortios\_nsxt\_setting](fortios_nsxt_setting_module#ansible-collections-fortinet-fortios-fortios-nsxt-setting-module) – Configure NSX-T setting in Fortinet’s FortiOS and FortiGate.
* [fortios\_report\_chart](fortios_report_chart_module#ansible-collections-fortinet-fortios-fortios-report-chart-module) – Report chart widget configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_report\_dataset](fortios_report_dataset_module#ansible-collections-fortinet-fortios-fortios-report-dataset-module) – Report dataset configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_report\_layout](fortios_report_layout_module#ansible-collections-fortinet-fortios-fortios-report-layout-module) – Report layout configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_report\_setting](fortios_report_setting_module#ansible-collections-fortinet-fortios-fortios-report-setting-module) – Report setting configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_report\_style](fortios_report_style_module#ansible-collections-fortinet-fortios-fortios-report-style-module) – Report style configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_report\_theme](fortios_report_theme_module#ansible-collections-fortinet-fortios-fortios-report-theme-module) – Report themes configuratio in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_access\_list](fortios_router_access_list_module#ansible-collections-fortinet-fortios-fortios-router-access-list-module) – Configure access lists in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_access\_list6](fortios_router_access_list6_module#ansible-collections-fortinet-fortios-fortios-router-access-list6-module) – Configure IPv6 access lists in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_aspath\_list](fortios_router_aspath_list_module#ansible-collections-fortinet-fortios-fortios-router-aspath-list-module) – Configure Autonomous System (AS) path lists in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_auth\_path](fortios_router_auth_path_module#ansible-collections-fortinet-fortios-fortios-router-auth-path-module) – Configure authentication based routing in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_bfd](fortios_router_bfd_module#ansible-collections-fortinet-fortios-fortios-router-bfd-module) – Configure BFD in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_bfd6](fortios_router_bfd6_module#ansible-collections-fortinet-fortios-fortios-router-bfd6-module) – Configure IPv6 BFD in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_bgp](fortios_router_bgp_module#ansible-collections-fortinet-fortios-fortios-router-bgp-module) – Configure BGP in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_community\_list](fortios_router_community_list_module#ansible-collections-fortinet-fortios-fortios-router-community-list-module) – Configure community lists in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_isis](fortios_router_isis_module#ansible-collections-fortinet-fortios-fortios-router-isis-module) – Configure IS-IS in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_key\_chain](fortios_router_key_chain_module#ansible-collections-fortinet-fortios-fortios-router-key-chain-module) – Configure key-chain in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_multicast](fortios_router_multicast_module#ansible-collections-fortinet-fortios-fortios-router-multicast-module) – Configure router multicast in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_multicast6](fortios_router_multicast6_module#ansible-collections-fortinet-fortios-fortios-router-multicast6-module) – Configure IPv6 multicast in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_multicast\_flow](fortios_router_multicast_flow_module#ansible-collections-fortinet-fortios-fortios-router-multicast-flow-module) – Configure multicast-flow in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_ospf](fortios_router_ospf_module#ansible-collections-fortinet-fortios-fortios-router-ospf-module) – Configure OSPF in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_ospf6](fortios_router_ospf6_module#ansible-collections-fortinet-fortios-fortios-router-ospf6-module) – Configure IPv6 OSPF in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_policy](fortios_router_policy_module#ansible-collections-fortinet-fortios-fortios-router-policy-module) – Configure IPv4 routing policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_policy6](fortios_router_policy6_module#ansible-collections-fortinet-fortios-fortios-router-policy6-module) – Configure IPv6 routing policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_prefix\_list](fortios_router_prefix_list_module#ansible-collections-fortinet-fortios-fortios-router-prefix-list-module) – Configure IPv4 prefix lists in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_prefix\_list6](fortios_router_prefix_list6_module#ansible-collections-fortinet-fortios-fortios-router-prefix-list6-module) – Configure IPv6 prefix lists in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_rip](fortios_router_rip_module#ansible-collections-fortinet-fortios-fortios-router-rip-module) – Configure RIP in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_ripng](fortios_router_ripng_module#ansible-collections-fortinet-fortios-fortios-router-ripng-module) – Configure RIPng in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_route\_map](fortios_router_route_map_module#ansible-collections-fortinet-fortios-fortios-router-route-map-module) – Configure route maps in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_setting](fortios_router_setting_module#ansible-collections-fortinet-fortios-fortios-router-setting-module) – Configure router settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_static](fortios_router_static_module#ansible-collections-fortinet-fortios-fortios-router-static-module) – Configure IPv4 static routing tables in Fortinet’s FortiOS and FortiGate.
* [fortios\_router\_static6](fortios_router_static6_module#ansible-collections-fortinet-fortios-fortios-router-static6-module) – Configure IPv6 static routing tables in Fortinet’s FortiOS and FortiGate.
* [fortios\_spamfilter\_bwl](fortios_spamfilter_bwl_module#ansible-collections-fortinet-fortios-fortios-spamfilter-bwl-module) – Configure anti-spam black/white list in Fortinet’s FortiOS and FortiGate.
* [fortios\_spamfilter\_bword](fortios_spamfilter_bword_module#ansible-collections-fortinet-fortios-fortios-spamfilter-bword-module) – Configure AntiSpam banned word list in Fortinet’s FortiOS and FortiGate.
* [fortios\_spamfilter\_dnsbl](fortios_spamfilter_dnsbl_module#ansible-collections-fortinet-fortios-fortios-spamfilter-dnsbl-module) – Configure AntiSpam DNSBL/ORBL in Fortinet’s FortiOS and FortiGate.
* [fortios\_spamfilter\_fortishield](fortios_spamfilter_fortishield_module#ansible-collections-fortinet-fortios-fortios-spamfilter-fortishield-module) – Configure FortiGuard - AntiSpam in Fortinet’s FortiOS and FortiGate.
* [fortios\_spamfilter\_iptrust](fortios_spamfilter_iptrust_module#ansible-collections-fortinet-fortios-fortios-spamfilter-iptrust-module) – Configure AntiSpam IP trust in Fortinet’s FortiOS and FortiGate.
* [fortios\_spamfilter\_mheader](fortios_spamfilter_mheader_module#ansible-collections-fortinet-fortios-fortios-spamfilter-mheader-module) – Configure AntiSpam MIME header in Fortinet’s FortiOS and FortiGate.
* [fortios\_spamfilter\_options](fortios_spamfilter_options_module#ansible-collections-fortinet-fortios-fortios-spamfilter-options-module) – Configure AntiSpam options in Fortinet’s FortiOS and FortiGate.
* [fortios\_spamfilter\_profile](fortios_spamfilter_profile_module#ansible-collections-fortinet-fortios-fortios-spamfilter-profile-module) – Configure AntiSpam profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_ssh\_filter\_profile](fortios_ssh_filter_profile_module#ansible-collections-fortinet-fortios-fortios-ssh-filter-profile-module) – SSH filter profile in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_802\_1x\_settings](fortios_switch_controller_802_1x_settings_module#ansible-collections-fortinet-fortios-fortios-switch-controller-802-1x-settings-module) – Configure global 802.1X settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_auto\_config\_custom](fortios_switch_controller_auto_config_custom_module#ansible-collections-fortinet-fortios-fortios-switch-controller-auto-config-custom-module) – Policies which can override the ‘default’ for specific ISL/ICL/FortiLink interface in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_auto\_config\_default](fortios_switch_controller_auto_config_default_module#ansible-collections-fortinet-fortios-fortios-switch-controller-auto-config-default-module) – Policies which are applied automatically to all ISL/ICL/FortiLink interfaces in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_auto\_config\_policy](fortios_switch_controller_auto_config_policy_module#ansible-collections-fortinet-fortios-fortios-switch-controller-auto-config-policy-module) – Policy definitions which can define the behavior on auto configured interfaces in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_custom\_command](fortios_switch_controller_custom_command_module#ansible-collections-fortinet-fortios-fortios-switch-controller-custom-command-module) – Configure the FortiGate switch controller to send custom commands to managed FortiSwitch devices in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_dynamic\_port\_policy](fortios_switch_controller_dynamic_port_policy_module#ansible-collections-fortinet-fortios-fortios-switch-controller-dynamic-port-policy-module) – Configure Dynamic port policy to be applied on the managed FortiSwitch ports through DPP device in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_flow\_tracking](fortios_switch_controller_flow_tracking_module#ansible-collections-fortinet-fortios-fortios-switch-controller-flow-tracking-module) – Configure FortiSwitch flow tracking and export via ipfix/netflow in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_fortilink\_settings](fortios_switch_controller_fortilink_settings_module#ansible-collections-fortinet-fortios-fortios-switch-controller-fortilink-settings-module) – Configure integrated FortiLink settings for FortiSwitch in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_global](fortios_switch_controller_global_module#ansible-collections-fortinet-fortios-fortios-switch-controller-global-module) – Configure FortiSwitch global settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_igmp\_snooping](fortios_switch_controller_igmp_snooping_module#ansible-collections-fortinet-fortios-fortios-switch-controller-igmp-snooping-module) – Configure FortiSwitch IGMP snooping global settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_initial\_config\_template](fortios_switch_controller_initial_config_template_module#ansible-collections-fortinet-fortios-fortios-switch-controller-initial-config-template-module) – Configure template for auto-generated VLANs in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_initial\_config\_vlans](fortios_switch_controller_initial_config_vlans_module#ansible-collections-fortinet-fortios-fortios-switch-controller-initial-config-vlans-module) – Configure initial template for auto-generated VLAN interfaces in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_lldp\_profile](fortios_switch_controller_lldp_profile_module#ansible-collections-fortinet-fortios-fortios-switch-controller-lldp-profile-module) – Configure FortiSwitch LLDP profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_lldp\_settings](fortios_switch_controller_lldp_settings_module#ansible-collections-fortinet-fortios-fortios-switch-controller-lldp-settings-module) – Configure FortiSwitch LLDP settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_location](fortios_switch_controller_location_module#ansible-collections-fortinet-fortios-fortios-switch-controller-location-module) – Configure FortiSwitch location services in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_mac\_policy](fortios_switch_controller_mac_policy_module#ansible-collections-fortinet-fortios-fortios-switch-controller-mac-policy-module) – Configure MAC policy to be applied on the managed FortiSwitch devices through NAC device in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_mac\_sync\_settings](fortios_switch_controller_mac_sync_settings_module#ansible-collections-fortinet-fortios-fortios-switch-controller-mac-sync-settings-module) – Configure global MAC synchronization settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_managed\_switch](fortios_switch_controller_managed_switch_module#ansible-collections-fortinet-fortios-fortios-switch-controller-managed-switch-module) – Configure FortiSwitch devices that are managed by this FortiGate in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_nac\_device](fortios_switch_controller_nac_device_module#ansible-collections-fortinet-fortios-fortios-switch-controller-nac-device-module) – Configure/list NAC devices learned on the managed FortiSwitch ports which matches NAC policy in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_nac\_settings](fortios_switch_controller_nac_settings_module#ansible-collections-fortinet-fortios-fortios-switch-controller-nac-settings-module) – Configure integrated NAC settings for FortiSwitch in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_network\_monitor\_settings](fortios_switch_controller_network_monitor_settings_module#ansible-collections-fortinet-fortios-fortios-switch-controller-network-monitor-settings-module) – Configure network monitor settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_poe](fortios_switch_controller_poe_module#ansible-collections-fortinet-fortios-fortios-switch-controller-poe-module) – List PoE end-points status in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_port\_policy](fortios_switch_controller_port_policy_module#ansible-collections-fortinet-fortios-fortios-switch-controller-port-policy-module) – Configure port policy to be applied on the managed FortiSwitch ports through NAC device in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_ptp\_policy](fortios_switch_controller_ptp_policy_module#ansible-collections-fortinet-fortios-fortios-switch-controller-ptp-policy-module) – PTP policy configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_ptp\_settings](fortios_switch_controller_ptp_settings_module#ansible-collections-fortinet-fortios-fortios-switch-controller-ptp-settings-module) – Global PTP settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_qos\_dot1p\_map](fortios_switch_controller_qos_dot1p_map_module#ansible-collections-fortinet-fortios-fortios-switch-controller-qos-dot1p-map-module) – Configure FortiSwitch QoS 802.1p in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_qos\_ip\_dscp\_map](fortios_switch_controller_qos_ip_dscp_map_module#ansible-collections-fortinet-fortios-fortios-switch-controller-qos-ip-dscp-map-module) – Configure FortiSwitch QoS IP precedence/DSCP in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_qos\_qos\_policy](fortios_switch_controller_qos_qos_policy_module#ansible-collections-fortinet-fortios-fortios-switch-controller-qos-qos-policy-module) – Configure FortiSwitch QoS policy in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_qos\_queue\_policy](fortios_switch_controller_qos_queue_policy_module#ansible-collections-fortinet-fortios-fortios-switch-controller-qos-queue-policy-module) – Configure FortiSwitch QoS egress queue policy in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_quarantine](fortios_switch_controller_quarantine_module#ansible-collections-fortinet-fortios-fortios-switch-controller-quarantine-module) – Configure FortiSwitch quarantine support in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_remote\_log](fortios_switch_controller_remote_log_module#ansible-collections-fortinet-fortios-fortios-switch-controller-remote-log-module) – Configure logging by FortiSwitch device to a remote syslog server in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_security\_policy\_802\_1x](fortios_switch_controller_security_policy_802_1x_module#ansible-collections-fortinet-fortios-fortios-switch-controller-security-policy-802-1x-module) – Configure 802.1x MAC Authentication Bypass (MAB) policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_security\_policy\_captive\_portal](fortios_switch_controller_security_policy_captive_portal_module#ansible-collections-fortinet-fortios-fortios-switch-controller-security-policy-captive-portal-module) – Names of VLANs that use captive portal authentication in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_security\_policy\_local\_access](fortios_switch_controller_security_policy_local_access_module#ansible-collections-fortinet-fortios-fortios-switch-controller-security-policy-local-access-module) – Configure allowaccess list for mgmt and internal interfaces on managed FortiSwitch in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_sflow](fortios_switch_controller_sflow_module#ansible-collections-fortinet-fortios-fortios-switch-controller-sflow-module) – Configure FortiSwitch sFlow in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_snmp\_community](fortios_switch_controller_snmp_community_module#ansible-collections-fortinet-fortios-fortios-switch-controller-snmp-community-module) – Configure FortiSwitch SNMP v1/v2c communities globally in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_snmp\_sysinfo](fortios_switch_controller_snmp_sysinfo_module#ansible-collections-fortinet-fortios-fortios-switch-controller-snmp-sysinfo-module) – Configure FortiSwitch SNMP system information globally in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_snmp\_trap\_threshold](fortios_switch_controller_snmp_trap_threshold_module#ansible-collections-fortinet-fortios-fortios-switch-controller-snmp-trap-threshold-module) – Configure FortiSwitch SNMP trap threshold values globally in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_snmp\_user](fortios_switch_controller_snmp_user_module#ansible-collections-fortinet-fortios-fortios-switch-controller-snmp-user-module) – Configure FortiSwitch SNMP v3 users globally in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_storm\_control](fortios_switch_controller_storm_control_module#ansible-collections-fortinet-fortios-fortios-switch-controller-storm-control-module) – Configure FortiSwitch storm control in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_storm\_control\_policy](fortios_switch_controller_storm_control_policy_module#ansible-collections-fortinet-fortios-fortios-switch-controller-storm-control-policy-module) – Configure FortiSwitch storm control policy to be applied on managed-switch ports in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_stp\_instance](fortios_switch_controller_stp_instance_module#ansible-collections-fortinet-fortios-fortios-switch-controller-stp-instance-module) – Configure FortiSwitch multiple spanning tree protocol (MSTP) instances in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_stp\_settings](fortios_switch_controller_stp_settings_module#ansible-collections-fortinet-fortios-fortios-switch-controller-stp-settings-module) – Configure FortiSwitch spanning tree protocol (STP) in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_switch\_group](fortios_switch_controller_switch_group_module#ansible-collections-fortinet-fortios-fortios-switch-controller-switch-group-module) – Configure FortiSwitch switch groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_switch\_interface\_tag](fortios_switch_controller_switch_interface_tag_module#ansible-collections-fortinet-fortios-fortios-switch-controller-switch-interface-tag-module) – Configure switch object tags in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_switch\_log](fortios_switch_controller_switch_log_module#ansible-collections-fortinet-fortios-fortios-switch-controller-switch-log-module) – Configure FortiSwitch logging (logs are transferred to and inserted into FortiGate event log) in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_switch\_profile](fortios_switch_controller_switch_profile_module#ansible-collections-fortinet-fortios-fortios-switch-controller-switch-profile-module) – Configure FortiSwitch switch profile in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_system](fortios_switch_controller_system_module#ansible-collections-fortinet-fortios-fortios-switch-controller-system-module) – Configure system-wide switch controller settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_traffic\_policy](fortios_switch_controller_traffic_policy_module#ansible-collections-fortinet-fortios-fortios-switch-controller-traffic-policy-module) – Configure FortiSwitch traffic policy in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_traffic\_sniffer](fortios_switch_controller_traffic_sniffer_module#ansible-collections-fortinet-fortios-fortios-switch-controller-traffic-sniffer-module) – Configure FortiSwitch RSPAN/ERSPAN traffic sniffing parameters in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_virtual\_port\_pool](fortios_switch_controller_virtual_port_pool_module#ansible-collections-fortinet-fortios-fortios-switch-controller-virtual-port-pool-module) – Configure virtual pool in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_vlan](fortios_switch_controller_vlan_module#ansible-collections-fortinet-fortios-fortios-switch-controller-vlan-module) – Configure VLANs for switch controller in Fortinet’s FortiOS and FortiGate.
* [fortios\_switch\_controller\_vlan\_policy](fortios_switch_controller_vlan_policy_module#ansible-collections-fortinet-fortios-fortios-switch-controller-vlan-policy-module) – Configure VLAN policy to be applied on the managed FortiSwitch ports through port-policy in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_3g\_modem\_custom](fortios_system_3g_modem_custom_module#ansible-collections-fortinet-fortios-fortios-system-3g-modem-custom-module) – 3G MODEM custom in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_accprofile](fortios_system_accprofile_module#ansible-collections-fortinet-fortios-fortios-system-accprofile-module) – Configure access profiles for system administrators in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_acme](fortios_system_acme_module#ansible-collections-fortinet-fortios-fortios-system-acme-module) – Configure ACME client in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_admin](fortios_system_admin_module#ansible-collections-fortinet-fortios-fortios-system-admin-module) – Configure admin users in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_affinity\_interrupt](fortios_system_affinity_interrupt_module#ansible-collections-fortinet-fortios-fortios-system-affinity-interrupt-module) – Configure interrupt affinity in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_affinity\_packet\_redistribution](fortios_system_affinity_packet_redistribution_module#ansible-collections-fortinet-fortios-fortios-system-affinity-packet-redistribution-module) – Configure packet redistribution in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_alarm](fortios_system_alarm_module#ansible-collections-fortinet-fortios-fortios-system-alarm-module) – Configure alarm in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_alias](fortios_system_alias_module#ansible-collections-fortinet-fortios-fortios-system-alias-module) – Configure alias command in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_api\_user](fortios_system_api_user_module#ansible-collections-fortinet-fortios-fortios-system-api-user-module) – Configure API users in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_arp\_table](fortios_system_arp_table_module#ansible-collections-fortinet-fortios-fortios-system-arp-table-module) – Configure ARP table in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_auto\_install](fortios_system_auto_install_module#ansible-collections-fortinet-fortios-fortios-system-auto-install-module) – Configure USB auto installation in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_auto\_script](fortios_system_auto_script_module#ansible-collections-fortinet-fortios-fortios-system-auto-script-module) – Configure auto script in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_automation\_action](fortios_system_automation_action_module#ansible-collections-fortinet-fortios-fortios-system-automation-action-module) – Action for automation stitches in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_automation\_destination](fortios_system_automation_destination_module#ansible-collections-fortinet-fortios-fortios-system-automation-destination-module) – Automation destinations in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_automation\_stitch](fortios_system_automation_stitch_module#ansible-collections-fortinet-fortios-fortios-system-automation-stitch-module) – Automation stitches in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_automation\_trigger](fortios_system_automation_trigger_module#ansible-collections-fortinet-fortios-fortios-system-automation-trigger-module) – Trigger for automation stitches in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_autoupdate\_push\_update](fortios_system_autoupdate_push_update_module#ansible-collections-fortinet-fortios-fortios-system-autoupdate-push-update-module) – Configure push updates in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_autoupdate\_schedule](fortios_system_autoupdate_schedule_module#ansible-collections-fortinet-fortios-fortios-system-autoupdate-schedule-module) – Configure update schedule in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_autoupdate\_tunneling](fortios_system_autoupdate_tunneling_module#ansible-collections-fortinet-fortios-fortios-system-autoupdate-tunneling-module) – Configure web proxy tunnelling for the FDN in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_central\_management](fortios_system_central_management_module#ansible-collections-fortinet-fortios-fortios-system-central-management-module) – Configure central management in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_cluster\_sync](fortios_system_cluster_sync_module#ansible-collections-fortinet-fortios-fortios-system-cluster-sync-module) – Configure FortiGate Session Life Support Protocol (FGSP) session synchronization in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_console](fortios_system_console_module#ansible-collections-fortinet-fortios-fortios-system-console-module) – Configure console in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_csf](fortios_system_csf_module#ansible-collections-fortinet-fortios-fortios-system-csf-module) –
* [fortios\_system\_custom\_language](fortios_system_custom_language_module#ansible-collections-fortinet-fortios-fortios-system-custom-language-module) – Configure custom languages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_ddns](fortios_system_ddns_module#ansible-collections-fortinet-fortios-fortios-system-ddns-module) – Configure DDNS in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_dedicated\_mgmt](fortios_system_dedicated_mgmt_module#ansible-collections-fortinet-fortios-fortios-system-dedicated-mgmt-module) – Configure dedicated management in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_dhcp6\_server](fortios_system_dhcp6_server_module#ansible-collections-fortinet-fortios-fortios-system-dhcp6-server-module) – Configure DHCPv6 servers in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_dhcp\_server](fortios_system_dhcp_server_module#ansible-collections-fortinet-fortios-fortios-system-dhcp-server-module) – Configure DHCP servers in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_dns](fortios_system_dns_module#ansible-collections-fortinet-fortios-fortios-system-dns-module) – Configure DNS in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_dns\_database](fortios_system_dns_database_module#ansible-collections-fortinet-fortios-fortios-system-dns-database-module) – Configure DNS databases in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_dns\_server](fortios_system_dns_server_module#ansible-collections-fortinet-fortios-fortios-system-dns-server-module) – Configure DNS servers in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_dscp\_based\_priority](fortios_system_dscp_based_priority_module#ansible-collections-fortinet-fortios-fortios-system-dscp-based-priority-module) – Configure DSCP based priority table in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_email\_server](fortios_system_email_server_module#ansible-collections-fortinet-fortios-fortios-system-email-server-module) – Configure the email server used by the FortiGate various things. For example, for sending email messages to users to support user authentication features in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_external\_resource](fortios_system_external_resource_module#ansible-collections-fortinet-fortios-fortios-system-external-resource-module) – Configure external resource in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_federated\_upgrade](fortios_system_federated_upgrade_module#ansible-collections-fortinet-fortios-fortios-system-federated-upgrade-module) – Coordinate federated upgrades within the Security Fabric in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_fips\_cc](fortios_system_fips_cc_module#ansible-collections-fortinet-fortios-fortios-system-fips-cc-module) – Configure FIPS-CC mode in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_fm](fortios_system_fm_module#ansible-collections-fortinet-fortios-fortios-system-fm-module) – Configure FM in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_fortiguard](fortios_system_fortiguard_module#ansible-collections-fortinet-fortios-fortios-system-fortiguard-module) – Configure FortiGuard services in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_fortimanager](fortios_system_fortimanager_module#ansible-collections-fortinet-fortios-fortios-system-fortimanager-module) – Configure FortiManager in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_fortisandbox](fortios_system_fortisandbox_module#ansible-collections-fortinet-fortios-fortios-system-fortisandbox-module) – Configure FortiSandbox in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_fsso\_polling](fortios_system_fsso_polling_module#ansible-collections-fortinet-fortios-fortios-system-fsso-polling-module) – Configure Fortinet Single Sign On (FSSO) server in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_ftm\_push](fortios_system_ftm_push_module#ansible-collections-fortinet-fortios-fortios-system-ftm-push-module) – Configure FortiToken Mobile push services in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_geneve](fortios_system_geneve_module#ansible-collections-fortinet-fortios-fortios-system-geneve-module) – Configure GENEVE devices in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_geoip\_country](fortios_system_geoip_country_module#ansible-collections-fortinet-fortios-fortios-system-geoip-country-module) – Define geoip country name-ID table in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_geoip\_override](fortios_system_geoip_override_module#ansible-collections-fortinet-fortios-fortios-system-geoip-override-module) – Configure geographical location mapping for IP address(es) to override mappings from FortiGuard in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_gi\_gk](fortios_system_gi_gk_module#ansible-collections-fortinet-fortios-fortios-system-gi-gk-module) – Configure Gi Firewall Gatekeeper in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_global](fortios_system_global_module#ansible-collections-fortinet-fortios-fortios-system-global-module) – Configure global attributes in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_gre\_tunnel](fortios_system_gre_tunnel_module#ansible-collections-fortinet-fortios-fortios-system-gre-tunnel-module) – Configure GRE tunnel in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_ha](fortios_system_ha_module#ansible-collections-fortinet-fortios-fortios-system-ha-module) – Configure HA in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_ha\_monitor](fortios_system_ha_monitor_module#ansible-collections-fortinet-fortios-fortios-system-ha-monitor-module) – Configure HA monitor in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_ike](fortios_system_ike_module#ansible-collections-fortinet-fortios-fortios-system-ike-module) – Configure IKE global attributes in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_interface](fortios_system_interface_module#ansible-collections-fortinet-fortios-fortios-system-interface-module) – Configure interfaces in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_ipip\_tunnel](fortios_system_ipip_tunnel_module#ansible-collections-fortinet-fortios-fortios-system-ipip-tunnel-module) – Configure IP in IP Tunneling in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_ips](fortios_system_ips_module#ansible-collections-fortinet-fortios-fortios-system-ips-module) – Configure IPS system settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_ips\_urlfilter\_dns](fortios_system_ips_urlfilter_dns_module#ansible-collections-fortinet-fortios-fortios-system-ips-urlfilter-dns-module) – Configure IPS URL filter DNS servers in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_ips\_urlfilter\_dns6](fortios_system_ips_urlfilter_dns6_module#ansible-collections-fortinet-fortios-fortios-system-ips-urlfilter-dns6-module) – Configure IPS URL filter IPv6 DNS servers in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_ipsec\_aggregate](fortios_system_ipsec_aggregate_module#ansible-collections-fortinet-fortios-fortios-system-ipsec-aggregate-module) – Configure an aggregate of IPsec tunnels in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_ipv6\_neighbor\_cache](fortios_system_ipv6_neighbor_cache_module#ansible-collections-fortinet-fortios-fortios-system-ipv6-neighbor-cache-module) – Configure IPv6 neighbor cache table in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_ipv6\_tunnel](fortios_system_ipv6_tunnel_module#ansible-collections-fortinet-fortios-fortios-system-ipv6-tunnel-module) – Configure IPv6/IPv4 in IPv6 tunnel in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_isf\_queue\_profile](fortios_system_isf_queue_profile_module#ansible-collections-fortinet-fortios-fortios-system-isf-queue-profile-module) – Create a queue profile of switch in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_link\_monitor](fortios_system_link_monitor_module#ansible-collections-fortinet-fortios-fortios-system-link-monitor-module) – Configure Link Health Monitor in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_lldp\_network\_policy](fortios_system_lldp_network_policy_module#ansible-collections-fortinet-fortios-fortios-system-lldp-network-policy-module) – Configure LLDP network policy in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_lte\_modem](fortios_system_lte_modem_module#ansible-collections-fortinet-fortios-fortios-system-lte-modem-module) – Configure USB LTE/WIMAX devices in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_mac\_address\_table](fortios_system_mac_address_table_module#ansible-collections-fortinet-fortios-fortios-system-mac-address-table-module) – Configure MAC address tables in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_management\_tunnel](fortios_system_management_tunnel_module#ansible-collections-fortinet-fortios-fortios-system-management-tunnel-module) – Management tunnel configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_mem\_mgr](fortios_system_mem_mgr_module#ansible-collections-fortinet-fortios-fortios-system-mem-mgr-module) – Configure memory manager in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_mobile\_tunnel](fortios_system_mobile_tunnel_module#ansible-collections-fortinet-fortios-fortios-system-mobile-tunnel-module) – Configure Mobile tunnels, an implementation of Network Mobility (NEMO) extensions for Mobile IPv4 RFC5177 in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_modem](fortios_system_modem_module#ansible-collections-fortinet-fortios-fortios-system-modem-module) – Configure MODEM in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_nat64](fortios_system_nat64_module#ansible-collections-fortinet-fortios-fortios-system-nat64-module) – Configure NAT64 in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_nd\_proxy](fortios_system_nd_proxy_module#ansible-collections-fortinet-fortios-fortios-system-nd-proxy-module) – Configure IPv6 neighbor discovery proxy (RFC4389) in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_netflow](fortios_system_netflow_module#ansible-collections-fortinet-fortios-fortios-system-netflow-module) – Configure NetFlow in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_network\_visibility](fortios_system_network_visibility_module#ansible-collections-fortinet-fortios-fortios-system-network-visibility-module) – Configure network visibility settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_np6](fortios_system_np6_module#ansible-collections-fortinet-fortios-fortios-system-np6-module) – Configure NP6 attributes in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_npu](fortios_system_npu_module#ansible-collections-fortinet-fortios-fortios-system-npu-module) – Configure NPU attributes in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_ntp](fortios_system_ntp_module#ansible-collections-fortinet-fortios-fortios-system-ntp-module) – Configure system NTP information in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_object\_tagging](fortios_system_object_tagging_module#ansible-collections-fortinet-fortios-fortios-system-object-tagging-module) – Configure object tagging in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_password\_policy](fortios_system_password_policy_module#ansible-collections-fortinet-fortios-fortios-system-password-policy-module) – Configure password policy for locally defined administrator passwords and IPsec VPN pre-shared keys in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_password\_policy\_guest\_admin](fortios_system_password_policy_guest_admin_module#ansible-collections-fortinet-fortios-fortios-system-password-policy-guest-admin-module) – Configure the password policy for guest administrators in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_performance\_top](fortios_system_performance_top_module#ansible-collections-fortinet-fortios-fortios-system-performance-top-module) – Display information about the top CPU processes in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_physical\_switch](fortios_system_physical_switch_module#ansible-collections-fortinet-fortios-fortios-system-physical-switch-module) – Configure physical switches in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_pppoe\_interface](fortios_system_pppoe_interface_module#ansible-collections-fortinet-fortios-fortios-system-pppoe-interface-module) – Configure the PPPoE interfaces in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_probe\_response](fortios_system_probe_response_module#ansible-collections-fortinet-fortios-fortios-system-probe-response-module) – Configure system probe response in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_proxy\_arp](fortios_system_proxy_arp_module#ansible-collections-fortinet-fortios-fortios-system-proxy-arp-module) – Configure proxy-ARP in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_ptp](fortios_system_ptp_module#ansible-collections-fortinet-fortios-fortios-system-ptp-module) – Configure system PTP information in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_admin](fortios_system_replacemsg_admin_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-admin-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_alertmail](fortios_system_replacemsg_alertmail_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-alertmail-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_auth](fortios_system_replacemsg_auth_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-auth-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_automation](fortios_system_replacemsg_automation_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-automation-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_device\_detection\_portal](fortios_system_replacemsg_device_detection_portal_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-device-detection-portal-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_ec](fortios_system_replacemsg_ec_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-ec-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_fortiguard\_wf](fortios_system_replacemsg_fortiguard_wf_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-fortiguard-wf-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_ftp](fortios_system_replacemsg_ftp_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-ftp-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_group](fortios_system_replacemsg_group_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-group-module) – Configure replacement message groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_http](fortios_system_replacemsg_http_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-http-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_icap](fortios_system_replacemsg_icap_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-icap-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_image](fortios_system_replacemsg_image_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-image-module) – Configure replacement message images in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_mail](fortios_system_replacemsg_mail_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-mail-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_mm1](fortios_system_replacemsg_mm1_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-mm1-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_mm3](fortios_system_replacemsg_mm3_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-mm3-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_mm4](fortios_system_replacemsg_mm4_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-mm4-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_mm7](fortios_system_replacemsg_mm7_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-mm7-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_mms](fortios_system_replacemsg_mms_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-mms-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_nac\_quar](fortios_system_replacemsg_nac_quar_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-nac-quar-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_nntp](fortios_system_replacemsg_nntp_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-nntp-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_spam](fortios_system_replacemsg_spam_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-spam-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_sslvpn](fortios_system_replacemsg_sslvpn_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-sslvpn-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_traffic\_quota](fortios_system_replacemsg_traffic_quota_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-traffic-quota-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_utm](fortios_system_replacemsg_utm_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-utm-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_replacemsg\_webproxy](fortios_system_replacemsg_webproxy_module#ansible-collections-fortinet-fortios-fortios-system-replacemsg-webproxy-module) – Replacement messages in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_resource\_limits](fortios_system_resource_limits_module#ansible-collections-fortinet-fortios-fortios-system-resource-limits-module) – Configure resource limits in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_saml](fortios_system_saml_module#ansible-collections-fortinet-fortios-fortios-system-saml-module) – Global settings for SAML authentication in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_sdn\_connector](fortios_system_sdn_connector_module#ansible-collections-fortinet-fortios-fortios-system-sdn-connector-module) –
* [fortios\_system\_sdwan](fortios_system_sdwan_module#ansible-collections-fortinet-fortios-fortios-system-sdwan-module) – Configure redundant internet connections using SD-WAN (formerly virtual WAN link) in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_session\_helper](fortios_system_session_helper_module#ansible-collections-fortinet-fortios-fortios-system-session-helper-module) – Configure session helper in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_session\_ttl](fortios_system_session_ttl_module#ansible-collections-fortinet-fortios-fortios-system-session-ttl-module) – Configure global session TTL timers for this FortiGate in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_settings](fortios_system_settings_module#ansible-collections-fortinet-fortios-fortios-system-settings-module) – Configure VDOM settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_sflow](fortios_system_sflow_module#ansible-collections-fortinet-fortios-fortios-system-sflow-module) – Configure sFlow in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_sit\_tunnel](fortios_system_sit_tunnel_module#ansible-collections-fortinet-fortios-fortios-system-sit-tunnel-module) – Configure IPv6 tunnel over IPv4 in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_smc\_ntp](fortios_system_smc_ntp_module#ansible-collections-fortinet-fortios-fortios-system-smc-ntp-module) – Configure SMC NTP information in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_sms\_server](fortios_system_sms_server_module#ansible-collections-fortinet-fortios-fortios-system-sms-server-module) – Configure SMS server for sending SMS messages to support user authentication in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_snmp\_community](fortios_system_snmp_community_module#ansible-collections-fortinet-fortios-fortios-system-snmp-community-module) – SNMP community configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_snmp\_sysinfo](fortios_system_snmp_sysinfo_module#ansible-collections-fortinet-fortios-fortios-system-snmp-sysinfo-module) – SNMP system info configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_snmp\_user](fortios_system_snmp_user_module#ansible-collections-fortinet-fortios-fortios-system-snmp-user-module) – SNMP user configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_speed\_test\_schedule](fortios_system_speed_test_schedule_module#ansible-collections-fortinet-fortios-fortios-system-speed-test-schedule-module) – Speed test schedule for each interface in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_speed\_test\_server](fortios_system_speed_test_server_module#ansible-collections-fortinet-fortios-fortios-system-speed-test-server-module) – Configure speed test server list in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_sso\_admin](fortios_system_sso_admin_module#ansible-collections-fortinet-fortios-fortios-system-sso-admin-module) – Configure SSO admin users in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_sso\_forticloud\_admin](fortios_system_sso_forticloud_admin_module#ansible-collections-fortinet-fortios-fortios-system-sso-forticloud-admin-module) – Configure FortiCloud SSO admin users in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_standalone\_cluster](fortios_system_standalone_cluster_module#ansible-collections-fortinet-fortios-fortios-system-standalone-cluster-module) – Configure FortiGate Session Life Support Protocol (FGSP) cluster attributes in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_storage](fortios_system_storage_module#ansible-collections-fortinet-fortios-fortios-system-storage-module) – Configure logical storage in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_stp](fortios_system_stp_module#ansible-collections-fortinet-fortios-fortios-system-stp-module) – Configure Spanning Tree Protocol (STP) in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_switch\_interface](fortios_system_switch_interface_module#ansible-collections-fortinet-fortios-fortios-system-switch-interface-module) – Configure software switch interfaces by grouping physical and WiFi interfaces in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_tos\_based\_priority](fortios_system_tos_based_priority_module#ansible-collections-fortinet-fortios-fortios-system-tos-based-priority-module) – Configure Type of Service (ToS) based priority table to set network traffic priorities in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_vdom](fortios_system_vdom_module#ansible-collections-fortinet-fortios-fortios-system-vdom-module) – Configure virtual domain in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_vdom\_dns](fortios_system_vdom_dns_module#ansible-collections-fortinet-fortios-fortios-system-vdom-dns-module) – Configure DNS servers for a non-management VDOM in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_vdom\_exception](fortios_system_vdom_exception_module#ansible-collections-fortinet-fortios-fortios-system-vdom-exception-module) – Global configuration objects that can be configured independently for all VDOMs or for the defined VDOM scope in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_vdom\_link](fortios_system_vdom_link_module#ansible-collections-fortinet-fortios-fortios-system-vdom-link-module) – Configure VDOM links in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_vdom\_netflow](fortios_system_vdom_netflow_module#ansible-collections-fortinet-fortios-fortios-system-vdom-netflow-module) – Configure NetFlow per VDOM in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_vdom\_property](fortios_system_vdom_property_module#ansible-collections-fortinet-fortios-fortios-system-vdom-property-module) – Configure VDOM property in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_vdom\_radius\_server](fortios_system_vdom_radius_server_module#ansible-collections-fortinet-fortios-fortios-system-vdom-radius-server-module) – Configure a RADIUS server to use as a RADIUS Single Sign On (RSSO) server for this VDOM in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_vdom\_sflow](fortios_system_vdom_sflow_module#ansible-collections-fortinet-fortios-fortios-system-vdom-sflow-module) – Configure sFlow per VDOM to add or change the IP address and UDP port that FortiGate sFlow agents in this VDOM use to send sFlow datagrams to an sFlow collector in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_virtual\_switch](fortios_system_virtual_switch_module#ansible-collections-fortinet-fortios-fortios-system-virtual-switch-module) – Configure virtual hardware switch interfaces in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_virtual\_wan\_link](fortios_system_virtual_wan_link_module#ansible-collections-fortinet-fortios-fortios-system-virtual-wan-link-module) – Configure redundant internet connections using SD-WAN (formerly virtual WAN link) in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_virtual\_wire\_pair](fortios_system_virtual_wire_pair_module#ansible-collections-fortinet-fortios-fortios-system-virtual-wire-pair-module) – Configure virtual wire pairs in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_vne\_tunnel](fortios_system_vne_tunnel_module#ansible-collections-fortinet-fortios-fortios-system-vne-tunnel-module) – Configure virtual network enabler tunnel in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_vxlan](fortios_system_vxlan_module#ansible-collections-fortinet-fortios-fortios-system-vxlan-module) – Configure VXLAN devices in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_wccp](fortios_system_wccp_module#ansible-collections-fortinet-fortios-fortios-system-wccp-module) – Configure WCCP in Fortinet’s FortiOS and FortiGate.
* [fortios\_system\_zone](fortios_system_zone_module#ansible-collections-fortinet-fortios-fortios-system-zone-module) – Configure zones to group two or more interfaces. When a zone is created you can configure policies for the zone instead of individual interfaces in the zone in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_adgrp](fortios_user_adgrp_module#ansible-collections-fortinet-fortios-fortios-user-adgrp-module) – Configure FSSO groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_device](fortios_user_device_module#ansible-collections-fortinet-fortios-fortios-user-device-module) – Configure devices in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_device\_access\_list](fortios_user_device_access_list_module#ansible-collections-fortinet-fortios-fortios-user-device-access-list-module) – Configure device access control lists in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_device\_category](fortios_user_device_category_module#ansible-collections-fortinet-fortios-fortios-user-device-category-module) – Configure device categories in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_device\_group](fortios_user_device_group_module#ansible-collections-fortinet-fortios-fortios-user-device-group-module) – Configure device groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_domain\_controller](fortios_user_domain_controller_module#ansible-collections-fortinet-fortios-fortios-user-domain-controller-module) – Configure domain controller entries in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_exchange](fortios_user_exchange_module#ansible-collections-fortinet-fortios-fortios-user-exchange-module) – Configure MS Exchange server entries in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_fortitoken](fortios_user_fortitoken_module#ansible-collections-fortinet-fortios-fortios-user-fortitoken-module) – Configure FortiToken in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_fsso](fortios_user_fsso_module#ansible-collections-fortinet-fortios-fortios-user-fsso-module) – Configure Fortinet Single Sign On (FSSO) agents in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_fsso\_polling](fortios_user_fsso_polling_module#ansible-collections-fortinet-fortios-fortios-user-fsso-polling-module) – Configure FSSO active directory servers for polling mode in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_group](fortios_user_group_module#ansible-collections-fortinet-fortios-fortios-user-group-module) – Configure user groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_krb\_keytab](fortios_user_krb_keytab_module#ansible-collections-fortinet-fortios-fortios-user-krb-keytab-module) – Configure Kerberos keytab entries in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_ldap](fortios_user_ldap_module#ansible-collections-fortinet-fortios-fortios-user-ldap-module) – Configure LDAP server entries in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_local](fortios_user_local_module#ansible-collections-fortinet-fortios-fortios-user-local-module) – Configure local users in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_nac\_policy](fortios_user_nac_policy_module#ansible-collections-fortinet-fortios-fortios-user-nac-policy-module) – Configure NAC policy matching pattern to identify matching NAC devices in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_password\_policy](fortios_user_password_policy_module#ansible-collections-fortinet-fortios-fortios-user-password-policy-module) – Configure user password policy in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_peer](fortios_user_peer_module#ansible-collections-fortinet-fortios-fortios-user-peer-module) – Configure peer users in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_peergrp](fortios_user_peergrp_module#ansible-collections-fortinet-fortios-fortios-user-peergrp-module) – Configure peer groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_pop3](fortios_user_pop3_module#ansible-collections-fortinet-fortios-fortios-user-pop3-module) – POP3 server entry configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_quarantine](fortios_user_quarantine_module#ansible-collections-fortinet-fortios-fortios-user-quarantine-module) – Configure quarantine support in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_radius](fortios_user_radius_module#ansible-collections-fortinet-fortios-fortios-user-radius-module) – Configure RADIUS server entries in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_saml](fortios_user_saml_module#ansible-collections-fortinet-fortios-fortios-user-saml-module) – SAML server entry configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_security\_exempt\_list](fortios_user_security_exempt_list_module#ansible-collections-fortinet-fortios-fortios-user-security-exempt-list-module) – Configure security exemption list in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_setting](fortios_user_setting_module#ansible-collections-fortinet-fortios-fortios-user-setting-module) – Configure user authentication setting in Fortinet’s FortiOS and FortiGate.
* [fortios\_user\_tacacsplus](fortios_user_tacacsplus_module#ansible-collections-fortinet-fortios-fortios-user-tacacsplus-module) – Configure TACACS+ server entries in Fortinet’s FortiOS and FortiGate.
* [fortios\_videofilter\_profile](fortios_videofilter_profile_module#ansible-collections-fortinet-fortios-fortios-videofilter-profile-module) – Configure VideoFilter profile in Fortinet’s FortiOS and FortiGate.
* [fortios\_videofilter\_youtube\_channel\_filter](fortios_videofilter_youtube_channel_filter_module#ansible-collections-fortinet-fortios-fortios-videofilter-youtube-channel-filter-module) – Configure YouTube channel filter in Fortinet’s FortiOS and FortiGate.
* [fortios\_videofilter\_youtube\_key](fortios_videofilter_youtube_key_module#ansible-collections-fortinet-fortios-fortios-videofilter-youtube-key-module) – Configure YouTube API keys in Fortinet’s FortiOS and FortiGate.
* [fortios\_voip\_profile](fortios_voip_profile_module#ansible-collections-fortinet-fortios-fortios-voip-profile-module) – Configure VoIP profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_certificate\_ca](fortios_vpn_certificate_ca_module#ansible-collections-fortinet-fortios-fortios-vpn-certificate-ca-module) – CA certificate in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_certificate\_crl](fortios_vpn_certificate_crl_module#ansible-collections-fortinet-fortios-fortios-vpn-certificate-crl-module) – Certificate Revocation List as a PEM file in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_certificate\_local](fortios_vpn_certificate_local_module#ansible-collections-fortinet-fortios-fortios-vpn-certificate-local-module) – Local keys and certificates in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_certificate\_ocsp\_server](fortios_vpn_certificate_ocsp_server_module#ansible-collections-fortinet-fortios-fortios-vpn-certificate-ocsp-server-module) – OCSP server configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_certificate\_remote](fortios_vpn_certificate_remote_module#ansible-collections-fortinet-fortios-fortios-vpn-certificate-remote-module) – Remote certificate as a PEM file in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_certificate\_setting](fortios_vpn_certificate_setting_module#ansible-collections-fortinet-fortios-fortios-vpn-certificate-setting-module) – VPN certificate setting in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ike\_gateway](fortios_vpn_ike_gateway_module#ansible-collections-fortinet-fortios-fortios-vpn-ike-gateway-module) – List gateways in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ipsec\_concentrator](fortios_vpn_ipsec_concentrator_module#ansible-collections-fortinet-fortios-fortios-vpn-ipsec-concentrator-module) – Concentrator configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ipsec\_forticlient](fortios_vpn_ipsec_forticlient_module#ansible-collections-fortinet-fortios-fortios-vpn-ipsec-forticlient-module) – Configure FortiClient policy realm in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ipsec\_manualkey](fortios_vpn_ipsec_manualkey_module#ansible-collections-fortinet-fortios-fortios-vpn-ipsec-manualkey-module) – Configure IPsec manual keys in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ipsec\_manualkey\_interface](fortios_vpn_ipsec_manualkey_interface_module#ansible-collections-fortinet-fortios-fortios-vpn-ipsec-manualkey-interface-module) – Configure IPsec manual keys in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ipsec\_phase1](fortios_vpn_ipsec_phase1_module#ansible-collections-fortinet-fortios-fortios-vpn-ipsec-phase1-module) – Configure VPN remote gateway in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ipsec\_phase1\_interface](fortios_vpn_ipsec_phase1_interface_module#ansible-collections-fortinet-fortios-fortios-vpn-ipsec-phase1-interface-module) – Configure VPN remote gateway in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ipsec\_phase2](fortios_vpn_ipsec_phase2_module#ansible-collections-fortinet-fortios-fortios-vpn-ipsec-phase2-module) – Configure VPN autokey tunnel in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ipsec\_phase2\_interface](fortios_vpn_ipsec_phase2_interface_module#ansible-collections-fortinet-fortios-fortios-vpn-ipsec-phase2-interface-module) – Configure VPN autokey tunnel in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_l2tp](fortios_vpn_l2tp_module#ansible-collections-fortinet-fortios-fortios-vpn-l2tp-module) – Configure L2TP in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ocvpn](fortios_vpn_ocvpn_module#ansible-collections-fortinet-fortios-fortios-vpn-ocvpn-module) – Configure Overlay Controller VPN settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_pptp](fortios_vpn_pptp_module#ansible-collections-fortinet-fortios-fortios-vpn-pptp-module) – Configure PPTP in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ssl\_client](fortios_vpn_ssl_client_module#ansible-collections-fortinet-fortios-fortios-vpn-ssl-client-module) – clien in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ssl\_settings](fortios_vpn_ssl_settings_module#ansible-collections-fortinet-fortios-fortios-vpn-ssl-settings-module) – Configure SSL VPN in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ssl\_web\_host\_check\_software](fortios_vpn_ssl_web_host_check_software_module#ansible-collections-fortinet-fortios-fortios-vpn-ssl-web-host-check-software-module) – SSL-VPN host check software in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ssl\_web\_portal](fortios_vpn_ssl_web_portal_module#ansible-collections-fortinet-fortios-fortios-vpn-ssl-web-portal-module) – Portal in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ssl\_web\_realm](fortios_vpn_ssl_web_realm_module#ansible-collections-fortinet-fortios-fortios-vpn-ssl-web-realm-module) – Realm in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ssl\_web\_user\_bookmark](fortios_vpn_ssl_web_user_bookmark_module#ansible-collections-fortinet-fortios-fortios-vpn-ssl-web-user-bookmark-module) – Configure SSL VPN user bookmark in Fortinet’s FortiOS and FortiGate.
* [fortios\_vpn\_ssl\_web\_user\_group\_bookmark](fortios_vpn_ssl_web_user_group_bookmark_module#ansible-collections-fortinet-fortios-fortios-vpn-ssl-web-user-group-bookmark-module) – Configure SSL VPN user group bookmark in Fortinet’s FortiOS and FortiGate.
* [fortios\_waf\_main\_class](fortios_waf_main_class_module#ansible-collections-fortinet-fortios-fortios-waf-main-class-module) – Hidden table for datasource in Fortinet’s FortiOS and FortiGate.
* [fortios\_waf\_profile](fortios_waf_profile_module#ansible-collections-fortinet-fortios-fortios-waf-profile-module) – Web application firewall configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_waf\_signature](fortios_waf_signature_module#ansible-collections-fortinet-fortios-fortios-waf-signature-module) – Hidden table for datasource in Fortinet’s FortiOS and FortiGate.
* [fortios\_waf\_sub\_class](fortios_waf_sub_class_module#ansible-collections-fortinet-fortios-fortios-waf-sub-class-module) – Hidden table for datasource in Fortinet’s FortiOS and FortiGate.
* [fortios\_wanopt\_auth\_group](fortios_wanopt_auth_group_module#ansible-collections-fortinet-fortios-fortios-wanopt-auth-group-module) – Configure WAN optimization authentication groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_wanopt\_cache\_service](fortios_wanopt_cache_service_module#ansible-collections-fortinet-fortios-fortios-wanopt-cache-service-module) – Designate cache-service for wan-optimization and webcache in Fortinet’s FortiOS and FortiGate.
* [fortios\_wanopt\_content\_delivery\_network\_rule](fortios_wanopt_content_delivery_network_rule_module#ansible-collections-fortinet-fortios-fortios-wanopt-content-delivery-network-rule-module) – Configure WAN optimization content delivery network rules in Fortinet’s FortiOS and FortiGate.
* [fortios\_wanopt\_peer](fortios_wanopt_peer_module#ansible-collections-fortinet-fortios-fortios-wanopt-peer-module) – Configure WAN optimization peers in Fortinet’s FortiOS and FortiGate.
* [fortios\_wanopt\_profile](fortios_wanopt_profile_module#ansible-collections-fortinet-fortios-fortios-wanopt-profile-module) – Configure WAN optimization profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_wanopt\_remote\_storage](fortios_wanopt_remote_storage_module#ansible-collections-fortinet-fortios-fortios-wanopt-remote-storage-module) – Configure a remote cache device as Web cache storage in Fortinet’s FortiOS and FortiGate.
* [fortios\_wanopt\_settings](fortios_wanopt_settings_module#ansible-collections-fortinet-fortios-fortios-wanopt-settings-module) – Configure WAN optimization settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_wanopt\_webcache](fortios_wanopt_webcache_module#ansible-collections-fortinet-fortios-fortios-wanopt-webcache-module) – Configure global Web cache settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_web\_proxy\_debug\_url](fortios_web_proxy_debug_url_module#ansible-collections-fortinet-fortios-fortios-web-proxy-debug-url-module) – Configure debug URL addresses in Fortinet’s FortiOS and FortiGate.
* [fortios\_web\_proxy\_explicit](fortios_web_proxy_explicit_module#ansible-collections-fortinet-fortios-fortios-web-proxy-explicit-module) – Configure explicit Web proxy settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_web\_proxy\_forward\_server](fortios_web_proxy_forward_server_module#ansible-collections-fortinet-fortios-fortios-web-proxy-forward-server-module) – Configure forward-server addresses in Fortinet’s FortiOS and FortiGate.
* [fortios\_web\_proxy\_forward\_server\_group](fortios_web_proxy_forward_server_group_module#ansible-collections-fortinet-fortios-fortios-web-proxy-forward-server-group-module) – Configure a forward server group consisting or multiple forward servers. Supports failover and load balancing in Fortinet’s FortiOS and FortiGate.
* [fortios\_web\_proxy\_global](fortios_web_proxy_global_module#ansible-collections-fortinet-fortios-fortios-web-proxy-global-module) – Configure Web proxy global settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_web\_proxy\_profile](fortios_web_proxy_profile_module#ansible-collections-fortinet-fortios-fortios-web-proxy-profile-module) – Configure web proxy profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_web\_proxy\_url\_match](fortios_web_proxy_url_match_module#ansible-collections-fortinet-fortios-fortios-web-proxy-url-match-module) – Exempt URLs from web proxy forwarding and caching in Fortinet’s FortiOS and FortiGate.
* [fortios\_web\_proxy\_wisp](fortios_web_proxy_wisp_module#ansible-collections-fortinet-fortios-fortios-web-proxy-wisp-module) – Configure Wireless Internet service provider (WISP) servers in Fortinet’s FortiOS and FortiGate.
* [fortios\_webfilter\_content](fortios_webfilter_content_module#ansible-collections-fortinet-fortios-fortios-webfilter-content-module) – Configure Web filter banned word table in Fortinet’s FortiOS and FortiGate.
* [fortios\_webfilter\_content\_header](fortios_webfilter_content_header_module#ansible-collections-fortinet-fortios-fortios-webfilter-content-header-module) – Configure content types used by Web filter in Fortinet’s FortiOS and FortiGate.
* [fortios\_webfilter\_fortiguard](fortios_webfilter_fortiguard_module#ansible-collections-fortinet-fortios-fortios-webfilter-fortiguard-module) – Configure FortiGuard Web Filter service in Fortinet’s FortiOS and FortiGate.
* [fortios\_webfilter\_ftgd\_local\_cat](fortios_webfilter_ftgd_local_cat_module#ansible-collections-fortinet-fortios-fortios-webfilter-ftgd-local-cat-module) – Configure FortiGuard Web Filter local categories in Fortinet’s FortiOS and FortiGate.
* [fortios\_webfilter\_ftgd\_local\_rating](fortios_webfilter_ftgd_local_rating_module#ansible-collections-fortinet-fortios-fortios-webfilter-ftgd-local-rating-module) – Configure local FortiGuard Web Filter local ratings in Fortinet’s FortiOS and FortiGate.
* [fortios\_webfilter\_ips\_urlfilter\_cache\_setting](fortios_webfilter_ips_urlfilter_cache_setting_module#ansible-collections-fortinet-fortios-fortios-webfilter-ips-urlfilter-cache-setting-module) – Configure IPS URL filter cache settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_webfilter\_ips\_urlfilter\_setting](fortios_webfilter_ips_urlfilter_setting_module#ansible-collections-fortinet-fortios-fortios-webfilter-ips-urlfilter-setting-module) – Configure IPS URL filter settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_webfilter\_ips\_urlfilter\_setting6](fortios_webfilter_ips_urlfilter_setting6_module#ansible-collections-fortinet-fortios-fortios-webfilter-ips-urlfilter-setting6-module) – Configure IPS URL filter settings for IPv6 in Fortinet’s FortiOS and FortiGate.
* [fortios\_webfilter\_override](fortios_webfilter_override_module#ansible-collections-fortinet-fortios-fortios-webfilter-override-module) – Configure FortiGuard Web Filter administrative overrides in Fortinet’s FortiOS and FortiGate.
* [fortios\_webfilter\_profile](fortios_webfilter_profile_module#ansible-collections-fortinet-fortios-fortios-webfilter-profile-module) – Configure Web filter profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_webfilter\_search\_engine](fortios_webfilter_search_engine_module#ansible-collections-fortinet-fortios-fortios-webfilter-search-engine-module) – Configure web filter search engines in Fortinet’s FortiOS and FortiGate.
* [fortios\_webfilter\_status](fortios_webfilter_status_module#ansible-collections-fortinet-fortios-fortios-webfilter-status-module) – Display rating info in Fortinet’s FortiOS and FortiGate.
* [fortios\_webfilter\_urlfilter](fortios_webfilter_urlfilter_module#ansible-collections-fortinet-fortios-fortios-webfilter-urlfilter-module) – Configure URL filter lists in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_access\_control\_list](fortios_wireless_controller_access_control_list_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-access-control-list-module) – Configure WiFi bridge access control list in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_address](fortios_wireless_controller_address_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-address-module) – Configure the client with its MAC address in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_addrgrp](fortios_wireless_controller_addrgrp_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-addrgrp-module) – Configure the MAC address group in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_ap\_status](fortios_wireless_controller_ap_status_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-ap-status-module) – Configure access point status (rogue | accepted | suppressed) in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_apcfg\_profile](fortios_wireless_controller_apcfg_profile_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-apcfg-profile-module) – Configure AP local configuration profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_arrp\_profile](fortios_wireless_controller_arrp_profile_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-arrp-profile-module) – Configure WiFi Automatic Radio Resource Provisioning (ARRP) profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_ble\_profile](fortios_wireless_controller_ble_profile_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-ble-profile-module) – Configure Bluetooth Low Energy profile in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_bonjour\_profile](fortios_wireless_controller_bonjour_profile_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-bonjour-profile-module) – Configure Bonjour profiles. Bonjour is Apple’s zero configuration networking protocol. Bonjour profiles allow APs and FortiAPs to connnect to networks using Bonjour in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_client\_info](fortios_wireless_controller_client_info_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-client-info-module) – Wireless controller client-info in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_global](fortios_wireless_controller_global_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-global-module) – Configure wireless controller global settings in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_hotspot20\_anqp\_3gpp\_cellular](fortios_wireless_controller_hotspot20_anqp_3gpp_cellular_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-hotspot20-anqp-3gpp-cellular-module) – Configure 3GPP public land mobile network (PLMN) in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_hotspot20\_anqp\_ip\_address\_type](fortios_wireless_controller_hotspot20_anqp_ip_address_type_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-hotspot20-anqp-ip-address-type-module) – Configure IP address type availability in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_hotspot20\_anqp\_nai\_realm](fortios_wireless_controller_hotspot20_anqp_nai_realm_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-hotspot20-anqp-nai-realm-module) – Configure network access identifier (NAI) realm in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_hotspot20\_anqp\_network\_auth\_type](fortios_wireless_controller_hotspot20_anqp_network_auth_type_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-hotspot20-anqp-network-auth-type-module) – Configure network authentication type in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_hotspot20\_anqp\_roaming\_consortium](fortios_wireless_controller_hotspot20_anqp_roaming_consortium_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-hotspot20-anqp-roaming-consortium-module) – Configure roaming consortium in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_hotspot20\_anqp\_venue\_name](fortios_wireless_controller_hotspot20_anqp_venue_name_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-hotspot20-anqp-venue-name-module) – Configure venue name duple in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_hotspot20\_h2qp\_conn\_capability](fortios_wireless_controller_hotspot20_h2qp_conn_capability_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-hotspot20-h2qp-conn-capability-module) – Configure connection capability in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_hotspot20\_h2qp\_operator\_name](fortios_wireless_controller_hotspot20_h2qp_operator_name_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-hotspot20-h2qp-operator-name-module) – Configure operator friendly name in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_hotspot20\_h2qp\_osu\_provider](fortios_wireless_controller_hotspot20_h2qp_osu_provider_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-hotspot20-h2qp-osu-provider-module) – Configure online sign up (OSU) provider list in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_hotspot20\_h2qp\_wan\_metric](fortios_wireless_controller_hotspot20_h2qp_wan_metric_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-hotspot20-h2qp-wan-metric-module) – Configure WAN metrics in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_hotspot20\_hs\_profile](fortios_wireless_controller_hotspot20_hs_profile_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-hotspot20-hs-profile-module) – Configure hotspot profile in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_hotspot20\_icon](fortios_wireless_controller_hotspot20_icon_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-hotspot20-icon-module) – Configure OSU provider icon in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_hotspot20\_qos\_map](fortios_wireless_controller_hotspot20_qos_map_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-hotspot20-qos-map-module) – Configure QoS map set in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_inter\_controller](fortios_wireless_controller_inter_controller_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-inter-controller-module) – Configure inter wireless controller operation in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_log](fortios_wireless_controller_log_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-log-module) – Configure wireless controller event log filters in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_mpsk\_profile](fortios_wireless_controller_mpsk_profile_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-mpsk-profile-module) – Configure MPSK profile in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_nac\_profile](fortios_wireless_controller_nac_profile_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-nac-profile-module) – Configure WiFi network access control (NAC) profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_qos\_profile](fortios_wireless_controller_qos_profile_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-qos-profile-module) – Configure WiFi quality of service (QoS) profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_region](fortios_wireless_controller_region_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-region-module) – Configure FortiAP regions (for floor plans and maps) in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_rf\_analysis](fortios_wireless_controller_rf_analysis_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-rf-analysis-module) – Wireless controller rf-analysis in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_setting](fortios_wireless_controller_setting_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-setting-module) – VDOM wireless controller configuration in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_snmp](fortios_wireless_controller_snmp_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-snmp-module) – Configure SNMP in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_spectral\_info](fortios_wireless_controller_spectral_info_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-spectral-info-module) – Wireless controller spectrum analysis in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_ssid\_policy](fortios_wireless_controller_ssid_policy_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-ssid-policy-module) – Configure WiFi SSID policies in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_status](fortios_wireless_controller_status_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-status-module) – Wireless controller status in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_timers](fortios_wireless_controller_timers_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-timers-module) – Configure CAPWAP timers in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_utm\_profile](fortios_wireless_controller_utm_profile_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-utm-profile-module) – Configure UTM (Unified Threat Management) profile in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_vap](fortios_wireless_controller_vap_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-vap-module) – Configure Virtual Access Points (VAPs) in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_vap\_group](fortios_wireless_controller_vap_group_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-vap-group-module) – Configure virtual Access Point (VAP) groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_vap\_status](fortios_wireless_controller_vap_status_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-vap-status-module) – Wireless controller VAP-status in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_wag\_profile](fortios_wireless_controller_wag_profile_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-wag-profile-module) – Configure wireless access gateway (WAG) profiles used for tunnels on AP in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_wids\_profile](fortios_wireless_controller_wids_profile_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-wids-profile-module) – Configure wireless intrusion detection system (WIDS) profiles in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_wtp](fortios_wireless_controller_wtp_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-wtp-module) – Configure Wireless Termination Points (WTPs), that is, FortiAPs or APs to be managed by FortiGate in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_wtp\_group](fortios_wireless_controller_wtp_group_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-wtp-group-module) – Configure WTP groups in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_wtp\_profile](fortios_wireless_controller_wtp_profile_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-wtp-profile-module) – Configure WTP profiles or FortiAP profiles that define radio settings for manageable FortiAP platforms in Fortinet’s FortiOS and FortiGate.
* [fortios\_wireless\_controller\_wtp\_status](fortios_wireless_controller_wtp_status_module#ansible-collections-fortinet-fortios-fortios-wireless-controller-wtp-status-module) – Wireless controller WTP-status in Fortinet’s FortiOS and FortiGate.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/fortinet/fortios/index.html>

Gluster.Gluster
===============

 Collection version 1.0.2

 Plugin Index
------------

 These are the plugins in the gluster.gluster collection

 ### Modules

 * [geo\_rep](geo_rep_module#ansible-collections-gluster-gluster-geo-rep-module) – Manage geo-replication sessions
* [gluster\_heal\_info](gluster_heal_info_module#ansible-collections-gluster-gluster-gluster-heal-info-module) – Gather information on self-heal or rebalance status
* [gluster\_peer](gluster_peer_module#ansible-collections-gluster-gluster-gluster-peer-module) – Attach/Detach peers to/from the cluster
* [gluster\_volume](gluster_volume_module#ansible-collections-gluster-gluster-gluster-volume-module) – Manage GlusterFS volumes

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/gluster/gluster/index.html>

Google.Cloud
============

 Collection version 1.0.2

 Plugin Index
------------

 These are the plugins in the google.cloud collection

 ### Inventory Plugins

 * [gcp\_compute](gcp_compute_inventory#ansible-collections-google-cloud-gcp-compute-inventory) – Google Cloud Compute Engine inventory source

 ### Modules

 * [gcp\_appengine\_firewall\_rule](gcp_appengine_firewall_rule_module#ansible-collections-google-cloud-gcp-appengine-firewall-rule-module) – Creates a GCP FirewallRule
* [gcp\_appengine\_firewall\_rule\_info](gcp_appengine_firewall_rule_info_module#ansible-collections-google-cloud-gcp-appengine-firewall-rule-info-module) – Gather info for GCP FirewallRule
* [gcp\_bigquery\_dataset](gcp_bigquery_dataset_module#ansible-collections-google-cloud-gcp-bigquery-dataset-module) – Creates a GCP Dataset
* [gcp\_bigquery\_dataset\_info](gcp_bigquery_dataset_info_module#ansible-collections-google-cloud-gcp-bigquery-dataset-info-module) – Gather info for GCP Dataset
* [gcp\_bigquery\_table](gcp_bigquery_table_module#ansible-collections-google-cloud-gcp-bigquery-table-module) – Creates a GCP Table
* [gcp\_bigquery\_table\_info](gcp_bigquery_table_info_module#ansible-collections-google-cloud-gcp-bigquery-table-info-module) – Gather info for GCP Table
* [gcp\_bigtable\_instance](gcp_bigtable_instance_module#ansible-collections-google-cloud-gcp-bigtable-instance-module) – Creates a GCP Instance
* [gcp\_bigtable\_instance\_info](gcp_bigtable_instance_info_module#ansible-collections-google-cloud-gcp-bigtable-instance-info-module) – Gather info for GCP Instance
* [gcp\_cloudbuild\_trigger](gcp_cloudbuild_trigger_module#ansible-collections-google-cloud-gcp-cloudbuild-trigger-module) – Creates a GCP Trigger
* [gcp\_cloudbuild\_trigger\_info](gcp_cloudbuild_trigger_info_module#ansible-collections-google-cloud-gcp-cloudbuild-trigger-info-module) – Gather info for GCP Trigger
* [gcp\_cloudfunctions\_cloud\_function](gcp_cloudfunctions_cloud_function_module#ansible-collections-google-cloud-gcp-cloudfunctions-cloud-function-module) – Creates a GCP CloudFunction
* [gcp\_cloudfunctions\_cloud\_function\_info](gcp_cloudfunctions_cloud_function_info_module#ansible-collections-google-cloud-gcp-cloudfunctions-cloud-function-info-module) – Gather info for GCP CloudFunction
* [gcp\_cloudscheduler\_job](gcp_cloudscheduler_job_module#ansible-collections-google-cloud-gcp-cloudscheduler-job-module) – Creates a GCP Job
* [gcp\_cloudscheduler\_job\_info](gcp_cloudscheduler_job_info_module#ansible-collections-google-cloud-gcp-cloudscheduler-job-info-module) – Gather info for GCP Job
* [gcp\_cloudtasks\_queue](gcp_cloudtasks_queue_module#ansible-collections-google-cloud-gcp-cloudtasks-queue-module) – Creates a GCP Queue
* [gcp\_cloudtasks\_queue\_info](gcp_cloudtasks_queue_info_module#ansible-collections-google-cloud-gcp-cloudtasks-queue-info-module) – Gather info for GCP Queue
* [gcp\_compute\_address](gcp_compute_address_module#ansible-collections-google-cloud-gcp-compute-address-module) – Creates a GCP Address
* [gcp\_compute\_address\_info](gcp_compute_address_info_module#ansible-collections-google-cloud-gcp-compute-address-info-module) – Gather info for GCP Address
* [gcp\_compute\_autoscaler](gcp_compute_autoscaler_module#ansible-collections-google-cloud-gcp-compute-autoscaler-module) – Creates a GCP Autoscaler
* [gcp\_compute\_autoscaler\_info](gcp_compute_autoscaler_info_module#ansible-collections-google-cloud-gcp-compute-autoscaler-info-module) – Gather info for GCP Autoscaler
* [gcp\_compute\_backend\_bucket](gcp_compute_backend_bucket_module#ansible-collections-google-cloud-gcp-compute-backend-bucket-module) – Creates a GCP BackendBucket
* [gcp\_compute\_backend\_bucket\_info](gcp_compute_backend_bucket_info_module#ansible-collections-google-cloud-gcp-compute-backend-bucket-info-module) – Gather info for GCP BackendBucket
* [gcp\_compute\_backend\_service](gcp_compute_backend_service_module#ansible-collections-google-cloud-gcp-compute-backend-service-module) – Creates a GCP BackendService
* [gcp\_compute\_backend\_service\_info](gcp_compute_backend_service_info_module#ansible-collections-google-cloud-gcp-compute-backend-service-info-module) – Gather info for GCP BackendService
* [gcp\_compute\_disk](gcp_compute_disk_module#ansible-collections-google-cloud-gcp-compute-disk-module) – Creates a GCP Disk
* [gcp\_compute\_disk\_info](gcp_compute_disk_info_module#ansible-collections-google-cloud-gcp-compute-disk-info-module) – Gather info for GCP Disk
* [gcp\_compute\_external\_vpn\_gateway](gcp_compute_external_vpn_gateway_module#ansible-collections-google-cloud-gcp-compute-external-vpn-gateway-module) – Creates a GCP ExternalVpnGateway
* [gcp\_compute\_external\_vpn\_gateway\_info](gcp_compute_external_vpn_gateway_info_module#ansible-collections-google-cloud-gcp-compute-external-vpn-gateway-info-module) – Gather info for GCP ExternalVpnGateway
* [gcp\_compute\_firewall](gcp_compute_firewall_module#ansible-collections-google-cloud-gcp-compute-firewall-module) – Creates a GCP Firewall
* [gcp\_compute\_firewall\_info](gcp_compute_firewall_info_module#ansible-collections-google-cloud-gcp-compute-firewall-info-module) – Gather info for GCP Firewall
* [gcp\_compute\_forwarding\_rule](gcp_compute_forwarding_rule_module#ansible-collections-google-cloud-gcp-compute-forwarding-rule-module) – Creates a GCP ForwardingRule
* [gcp\_compute\_forwarding\_rule\_info](gcp_compute_forwarding_rule_info_module#ansible-collections-google-cloud-gcp-compute-forwarding-rule-info-module) – Gather info for GCP ForwardingRule
* [gcp\_compute\_global\_address](gcp_compute_global_address_module#ansible-collections-google-cloud-gcp-compute-global-address-module) – Creates a GCP GlobalAddress
* [gcp\_compute\_global\_address\_info](gcp_compute_global_address_info_module#ansible-collections-google-cloud-gcp-compute-global-address-info-module) – Gather info for GCP GlobalAddress
* [gcp\_compute\_global\_forwarding\_rule](gcp_compute_global_forwarding_rule_module#ansible-collections-google-cloud-gcp-compute-global-forwarding-rule-module) – Creates a GCP GlobalForwardingRule
* [gcp\_compute\_global\_forwarding\_rule\_info](gcp_compute_global_forwarding_rule_info_module#ansible-collections-google-cloud-gcp-compute-global-forwarding-rule-info-module) – Gather info for GCP GlobalForwardingRule
* [gcp\_compute\_health\_check](gcp_compute_health_check_module#ansible-collections-google-cloud-gcp-compute-health-check-module) – Creates a GCP HealthCheck
* [gcp\_compute\_health\_check\_info](gcp_compute_health_check_info_module#ansible-collections-google-cloud-gcp-compute-health-check-info-module) – Gather info for GCP HealthCheck
* [gcp\_compute\_http\_health\_check](gcp_compute_http_health_check_module#ansible-collections-google-cloud-gcp-compute-http-health-check-module) – Creates a GCP HttpHealthCheck
* [gcp\_compute\_http\_health\_check\_info](gcp_compute_http_health_check_info_module#ansible-collections-google-cloud-gcp-compute-http-health-check-info-module) – Gather info for GCP HttpHealthCheck
* [gcp\_compute\_https\_health\_check](gcp_compute_https_health_check_module#ansible-collections-google-cloud-gcp-compute-https-health-check-module) – Creates a GCP HttpsHealthCheck
* [gcp\_compute\_https\_health\_check\_info](gcp_compute_https_health_check_info_module#ansible-collections-google-cloud-gcp-compute-https-health-check-info-module) – Gather info for GCP HttpsHealthCheck
* [gcp\_compute\_image](gcp_compute_image_module#ansible-collections-google-cloud-gcp-compute-image-module) – Creates a GCP Image
* [gcp\_compute\_image\_info](gcp_compute_image_info_module#ansible-collections-google-cloud-gcp-compute-image-info-module) – Gather info for GCP Image
* [gcp\_compute\_instance](gcp_compute_instance_module#ansible-collections-google-cloud-gcp-compute-instance-module) – Creates a GCP Instance
* [gcp\_compute\_instance\_group](gcp_compute_instance_group_module#ansible-collections-google-cloud-gcp-compute-instance-group-module) – Creates a GCP InstanceGroup
* [gcp\_compute\_instance\_group\_info](gcp_compute_instance_group_info_module#ansible-collections-google-cloud-gcp-compute-instance-group-info-module) – Gather info for GCP InstanceGroup
* [gcp\_compute\_instance\_group\_manager](gcp_compute_instance_group_manager_module#ansible-collections-google-cloud-gcp-compute-instance-group-manager-module) – Creates a GCP InstanceGroupManager
* [gcp\_compute\_instance\_group\_manager\_info](gcp_compute_instance_group_manager_info_module#ansible-collections-google-cloud-gcp-compute-instance-group-manager-info-module) – Gather info for GCP InstanceGroupManager
* [gcp\_compute\_instance\_info](gcp_compute_instance_info_module#ansible-collections-google-cloud-gcp-compute-instance-info-module) – Gather info for GCP Instance
* [gcp\_compute\_instance\_template](gcp_compute_instance_template_module#ansible-collections-google-cloud-gcp-compute-instance-template-module) – Creates a GCP InstanceTemplate
* [gcp\_compute\_instance\_template\_info](gcp_compute_instance_template_info_module#ansible-collections-google-cloud-gcp-compute-instance-template-info-module) – Gather info for GCP InstanceTemplate
* [gcp\_compute\_interconnect\_attachment](gcp_compute_interconnect_attachment_module#ansible-collections-google-cloud-gcp-compute-interconnect-attachment-module) – Creates a GCP InterconnectAttachment
* [gcp\_compute\_interconnect\_attachment\_info](gcp_compute_interconnect_attachment_info_module#ansible-collections-google-cloud-gcp-compute-interconnect-attachment-info-module) – Gather info for GCP InterconnectAttachment
* [gcp\_compute\_network](gcp_compute_network_module#ansible-collections-google-cloud-gcp-compute-network-module) – Creates a GCP Network
* [gcp\_compute\_network\_endpoint\_group](gcp_compute_network_endpoint_group_module#ansible-collections-google-cloud-gcp-compute-network-endpoint-group-module) – Creates a GCP NetworkEndpointGroup
* [gcp\_compute\_network\_endpoint\_group\_info](gcp_compute_network_endpoint_group_info_module#ansible-collections-google-cloud-gcp-compute-network-endpoint-group-info-module) – Gather info for GCP NetworkEndpointGroup
* [gcp\_compute\_network\_info](gcp_compute_network_info_module#ansible-collections-google-cloud-gcp-compute-network-info-module) – Gather info for GCP Network
* [gcp\_compute\_node\_group](gcp_compute_node_group_module#ansible-collections-google-cloud-gcp-compute-node-group-module) – Creates a GCP NodeGroup
* [gcp\_compute\_node\_group\_info](gcp_compute_node_group_info_module#ansible-collections-google-cloud-gcp-compute-node-group-info-module) – Gather info for GCP NodeGroup
* [gcp\_compute\_node\_template](gcp_compute_node_template_module#ansible-collections-google-cloud-gcp-compute-node-template-module) – Creates a GCP NodeTemplate
* [gcp\_compute\_node\_template\_info](gcp_compute_node_template_info_module#ansible-collections-google-cloud-gcp-compute-node-template-info-module) – Gather info for GCP NodeTemplate
* [gcp\_compute\_region\_autoscaler](gcp_compute_region_autoscaler_module#ansible-collections-google-cloud-gcp-compute-region-autoscaler-module) – Creates a GCP RegionAutoscaler
* [gcp\_compute\_region\_autoscaler\_info](gcp_compute_region_autoscaler_info_module#ansible-collections-google-cloud-gcp-compute-region-autoscaler-info-module) – Gather info for GCP RegionAutoscaler
* [gcp\_compute\_region\_backend\_service](gcp_compute_region_backend_service_module#ansible-collections-google-cloud-gcp-compute-region-backend-service-module) – Creates a GCP RegionBackendService
* [gcp\_compute\_region\_backend\_service\_info](gcp_compute_region_backend_service_info_module#ansible-collections-google-cloud-gcp-compute-region-backend-service-info-module) – Gather info for GCP RegionBackendService
* [gcp\_compute\_region\_disk](gcp_compute_region_disk_module#ansible-collections-google-cloud-gcp-compute-region-disk-module) – Creates a GCP RegionDisk
* [gcp\_compute\_region\_disk\_info](gcp_compute_region_disk_info_module#ansible-collections-google-cloud-gcp-compute-region-disk-info-module) – Gather info for GCP RegionDisk
* [gcp\_compute\_region\_health\_check](gcp_compute_region_health_check_module#ansible-collections-google-cloud-gcp-compute-region-health-check-module) – Creates a GCP RegionHealthCheck
* [gcp\_compute\_region\_health\_check\_info](gcp_compute_region_health_check_info_module#ansible-collections-google-cloud-gcp-compute-region-health-check-info-module) – Gather info for GCP RegionHealthCheck
* [gcp\_compute\_region\_instance\_group\_manager](gcp_compute_region_instance_group_manager_module#ansible-collections-google-cloud-gcp-compute-region-instance-group-manager-module) – Creates a GCP RegionInstanceGroupManager
* [gcp\_compute\_region\_instance\_group\_manager\_info](gcp_compute_region_instance_group_manager_info_module#ansible-collections-google-cloud-gcp-compute-region-instance-group-manager-info-module) – Gather info for GCP RegionInstanceGroupManager
* [gcp\_compute\_region\_target\_http\_proxy](gcp_compute_region_target_http_proxy_module#ansible-collections-google-cloud-gcp-compute-region-target-http-proxy-module) – Creates a GCP RegionTargetHttpProxy
* [gcp\_compute\_region\_target\_http\_proxy\_info](gcp_compute_region_target_http_proxy_info_module#ansible-collections-google-cloud-gcp-compute-region-target-http-proxy-info-module) – Gather info for GCP RegionTargetHttpProxy
* [gcp\_compute\_region\_target\_https\_proxy](gcp_compute_region_target_https_proxy_module#ansible-collections-google-cloud-gcp-compute-region-target-https-proxy-module) – Creates a GCP RegionTargetHttpsProxy
* [gcp\_compute\_region\_target\_https\_proxy\_info](gcp_compute_region_target_https_proxy_info_module#ansible-collections-google-cloud-gcp-compute-region-target-https-proxy-info-module) – Gather info for GCP RegionTargetHttpsProxy
* [gcp\_compute\_region\_url\_map](gcp_compute_region_url_map_module#ansible-collections-google-cloud-gcp-compute-region-url-map-module) – Creates a GCP RegionUrlMap
* [gcp\_compute\_region\_url\_map\_info](gcp_compute_region_url_map_info_module#ansible-collections-google-cloud-gcp-compute-region-url-map-info-module) – Gather info for GCP RegionUrlMap
* [gcp\_compute\_reservation](gcp_compute_reservation_module#ansible-collections-google-cloud-gcp-compute-reservation-module) – Creates a GCP Reservation
* [gcp\_compute\_reservation\_info](gcp_compute_reservation_info_module#ansible-collections-google-cloud-gcp-compute-reservation-info-module) – Gather info for GCP Reservation
* [gcp\_compute\_resource\_policy](gcp_compute_resource_policy_module#ansible-collections-google-cloud-gcp-compute-resource-policy-module) – Creates a GCP ResourcePolicy
* [gcp\_compute\_resource\_policy\_info](gcp_compute_resource_policy_info_module#ansible-collections-google-cloud-gcp-compute-resource-policy-info-module) – Gather info for GCP ResourcePolicy
* [gcp\_compute\_route](gcp_compute_route_module#ansible-collections-google-cloud-gcp-compute-route-module) – Creates a GCP Route
* [gcp\_compute\_route\_info](gcp_compute_route_info_module#ansible-collections-google-cloud-gcp-compute-route-info-module) – Gather info for GCP Route
* [gcp\_compute\_router](gcp_compute_router_module#ansible-collections-google-cloud-gcp-compute-router-module) – Creates a GCP Router
* [gcp\_compute\_router\_info](gcp_compute_router_info_module#ansible-collections-google-cloud-gcp-compute-router-info-module) – Gather info for GCP Router
* [gcp\_compute\_snapshot](gcp_compute_snapshot_module#ansible-collections-google-cloud-gcp-compute-snapshot-module) – Creates a GCP Snapshot
* [gcp\_compute\_snapshot\_info](gcp_compute_snapshot_info_module#ansible-collections-google-cloud-gcp-compute-snapshot-info-module) – Gather info for GCP Snapshot
* [gcp\_compute\_ssl\_certificate](gcp_compute_ssl_certificate_module#ansible-collections-google-cloud-gcp-compute-ssl-certificate-module) – Creates a GCP SslCertificate
* [gcp\_compute\_ssl\_certificate\_info](gcp_compute_ssl_certificate_info_module#ansible-collections-google-cloud-gcp-compute-ssl-certificate-info-module) – Gather info for GCP SslCertificate
* [gcp\_compute\_ssl\_policy](gcp_compute_ssl_policy_module#ansible-collections-google-cloud-gcp-compute-ssl-policy-module) – Creates a GCP SslPolicy
* [gcp\_compute\_ssl\_policy\_info](gcp_compute_ssl_policy_info_module#ansible-collections-google-cloud-gcp-compute-ssl-policy-info-module) – Gather info for GCP SslPolicy
* [gcp\_compute\_subnetwork](gcp_compute_subnetwork_module#ansible-collections-google-cloud-gcp-compute-subnetwork-module) – Creates a GCP Subnetwork
* [gcp\_compute\_subnetwork\_info](gcp_compute_subnetwork_info_module#ansible-collections-google-cloud-gcp-compute-subnetwork-info-module) – Gather info for GCP Subnetwork
* [gcp\_compute\_target\_http\_proxy](gcp_compute_target_http_proxy_module#ansible-collections-google-cloud-gcp-compute-target-http-proxy-module) – Creates a GCP TargetHttpProxy
* [gcp\_compute\_target\_http\_proxy\_info](gcp_compute_target_http_proxy_info_module#ansible-collections-google-cloud-gcp-compute-target-http-proxy-info-module) – Gather info for GCP TargetHttpProxy
* [gcp\_compute\_target\_https\_proxy](gcp_compute_target_https_proxy_module#ansible-collections-google-cloud-gcp-compute-target-https-proxy-module) – Creates a GCP TargetHttpsProxy
* [gcp\_compute\_target\_https\_proxy\_info](gcp_compute_target_https_proxy_info_module#ansible-collections-google-cloud-gcp-compute-target-https-proxy-info-module) – Gather info for GCP TargetHttpsProxy
* [gcp\_compute\_target\_instance](gcp_compute_target_instance_module#ansible-collections-google-cloud-gcp-compute-target-instance-module) – Creates a GCP TargetInstance
* [gcp\_compute\_target\_instance\_info](gcp_compute_target_instance_info_module#ansible-collections-google-cloud-gcp-compute-target-instance-info-module) – Gather info for GCP TargetInstance
* [gcp\_compute\_target\_pool](gcp_compute_target_pool_module#ansible-collections-google-cloud-gcp-compute-target-pool-module) – Creates a GCP TargetPool
* [gcp\_compute\_target\_pool\_info](gcp_compute_target_pool_info_module#ansible-collections-google-cloud-gcp-compute-target-pool-info-module) – Gather info for GCP TargetPool
* [gcp\_compute\_target\_ssl\_proxy](gcp_compute_target_ssl_proxy_module#ansible-collections-google-cloud-gcp-compute-target-ssl-proxy-module) – Creates a GCP TargetSslProxy
* [gcp\_compute\_target\_ssl\_proxy\_info](gcp_compute_target_ssl_proxy_info_module#ansible-collections-google-cloud-gcp-compute-target-ssl-proxy-info-module) – Gather info for GCP TargetSslProxy
* [gcp\_compute\_target\_tcp\_proxy](gcp_compute_target_tcp_proxy_module#ansible-collections-google-cloud-gcp-compute-target-tcp-proxy-module) – Creates a GCP TargetTcpProxy
* [gcp\_compute\_target\_tcp\_proxy\_info](gcp_compute_target_tcp_proxy_info_module#ansible-collections-google-cloud-gcp-compute-target-tcp-proxy-info-module) – Gather info for GCP TargetTcpProxy
* [gcp\_compute\_target\_vpn\_gateway](gcp_compute_target_vpn_gateway_module#ansible-collections-google-cloud-gcp-compute-target-vpn-gateway-module) – Creates a GCP TargetVpnGateway
* [gcp\_compute\_target\_vpn\_gateway\_info](gcp_compute_target_vpn_gateway_info_module#ansible-collections-google-cloud-gcp-compute-target-vpn-gateway-info-module) – Gather info for GCP TargetVpnGateway
* [gcp\_compute\_url\_map](gcp_compute_url_map_module#ansible-collections-google-cloud-gcp-compute-url-map-module) – Creates a GCP UrlMap
* [gcp\_compute\_url\_map\_info](gcp_compute_url_map_info_module#ansible-collections-google-cloud-gcp-compute-url-map-info-module) – Gather info for GCP UrlMap
* [gcp\_compute\_vpn\_tunnel](gcp_compute_vpn_tunnel_module#ansible-collections-google-cloud-gcp-compute-vpn-tunnel-module) – Creates a GCP VpnTunnel
* [gcp\_compute\_vpn\_tunnel\_info](gcp_compute_vpn_tunnel_info_module#ansible-collections-google-cloud-gcp-compute-vpn-tunnel-info-module) – Gather info for GCP VpnTunnel
* [gcp\_container\_cluster](gcp_container_cluster_module#ansible-collections-google-cloud-gcp-container-cluster-module) – Creates a GCP Cluster
* [gcp\_container\_cluster\_info](gcp_container_cluster_info_module#ansible-collections-google-cloud-gcp-container-cluster-info-module) – Gather info for GCP Cluster
* [gcp\_container\_node\_pool](gcp_container_node_pool_module#ansible-collections-google-cloud-gcp-container-node-pool-module) – Creates a GCP NodePool
* [gcp\_container\_node\_pool\_info](gcp_container_node_pool_info_module#ansible-collections-google-cloud-gcp-container-node-pool-info-module) – Gather info for GCP NodePool
* [gcp\_dns\_managed\_zone](gcp_dns_managed_zone_module#ansible-collections-google-cloud-gcp-dns-managed-zone-module) – Creates a GCP ManagedZone
* [gcp\_dns\_managed\_zone\_info](gcp_dns_managed_zone_info_module#ansible-collections-google-cloud-gcp-dns-managed-zone-info-module) – Gather info for GCP ManagedZone
* [gcp\_dns\_resource\_record\_set](gcp_dns_resource_record_set_module#ansible-collections-google-cloud-gcp-dns-resource-record-set-module) – Creates a GCP ResourceRecordSet
* [gcp\_dns\_resource\_record\_set\_info](gcp_dns_resource_record_set_info_module#ansible-collections-google-cloud-gcp-dns-resource-record-set-info-module) – Gather info for GCP ResourceRecordSet
* [gcp\_filestore\_instance](gcp_filestore_instance_module#ansible-collections-google-cloud-gcp-filestore-instance-module) – Creates a GCP Instance
* [gcp\_filestore\_instance\_info](gcp_filestore_instance_info_module#ansible-collections-google-cloud-gcp-filestore-instance-info-module) – Gather info for GCP Instance
* [gcp\_iam\_role](gcp_iam_role_module#ansible-collections-google-cloud-gcp-iam-role-module) – Creates a GCP Role
* [gcp\_iam\_role\_info](gcp_iam_role_info_module#ansible-collections-google-cloud-gcp-iam-role-info-module) – Gather info for GCP Role
* [gcp\_iam\_service\_account](gcp_iam_service_account_module#ansible-collections-google-cloud-gcp-iam-service-account-module) – Creates a GCP ServiceAccount
* [gcp\_iam\_service\_account\_info](gcp_iam_service_account_info_module#ansible-collections-google-cloud-gcp-iam-service-account-info-module) – Gather info for GCP ServiceAccount
* [gcp\_iam\_service\_account\_key](gcp_iam_service_account_key_module#ansible-collections-google-cloud-gcp-iam-service-account-key-module) – Creates a GCP ServiceAccountKey
* [gcp\_kms\_crypto\_key](gcp_kms_crypto_key_module#ansible-collections-google-cloud-gcp-kms-crypto-key-module) – Creates a GCP CryptoKey
* [gcp\_kms\_crypto\_key\_info](gcp_kms_crypto_key_info_module#ansible-collections-google-cloud-gcp-kms-crypto-key-info-module) – Gather info for GCP CryptoKey
* [gcp\_kms\_key\_ring](gcp_kms_key_ring_module#ansible-collections-google-cloud-gcp-kms-key-ring-module) – Creates a GCP KeyRing
* [gcp\_kms\_key\_ring\_info](gcp_kms_key_ring_info_module#ansible-collections-google-cloud-gcp-kms-key-ring-info-module) – Gather info for GCP KeyRing
* [gcp\_logging\_metric](gcp_logging_metric_module#ansible-collections-google-cloud-gcp-logging-metric-module) – Creates a GCP Metric
* [gcp\_logging\_metric\_info](gcp_logging_metric_info_module#ansible-collections-google-cloud-gcp-logging-metric-info-module) – Gather info for GCP Metric
* [gcp\_mlengine\_model](gcp_mlengine_model_module#ansible-collections-google-cloud-gcp-mlengine-model-module) – Creates a GCP Model
* [gcp\_mlengine\_model\_info](gcp_mlengine_model_info_module#ansible-collections-google-cloud-gcp-mlengine-model-info-module) – Gather info for GCP Model
* [gcp\_mlengine\_version](gcp_mlengine_version_module#ansible-collections-google-cloud-gcp-mlengine-version-module) – Creates a GCP Version
* [gcp\_mlengine\_version\_info](gcp_mlengine_version_info_module#ansible-collections-google-cloud-gcp-mlengine-version-info-module) – Gather info for GCP Version
* [gcp\_pubsub\_subscription](gcp_pubsub_subscription_module#ansible-collections-google-cloud-gcp-pubsub-subscription-module) – Creates a GCP Subscription
* [gcp\_pubsub\_subscription\_info](gcp_pubsub_subscription_info_module#ansible-collections-google-cloud-gcp-pubsub-subscription-info-module) – Gather info for GCP Subscription
* [gcp\_pubsub\_topic](gcp_pubsub_topic_module#ansible-collections-google-cloud-gcp-pubsub-topic-module) – Creates a GCP Topic
* [gcp\_pubsub\_topic\_info](gcp_pubsub_topic_info_module#ansible-collections-google-cloud-gcp-pubsub-topic-info-module) – Gather info for GCP Topic
* [gcp\_redis\_instance](gcp_redis_instance_module#ansible-collections-google-cloud-gcp-redis-instance-module) – Creates a GCP Instance
* [gcp\_redis\_instance\_info](gcp_redis_instance_info_module#ansible-collections-google-cloud-gcp-redis-instance-info-module) – Gather info for GCP Instance
* [gcp\_resourcemanager\_project](gcp_resourcemanager_project_module#ansible-collections-google-cloud-gcp-resourcemanager-project-module) – Creates a GCP Project
* [gcp\_resourcemanager\_project\_info](gcp_resourcemanager_project_info_module#ansible-collections-google-cloud-gcp-resourcemanager-project-info-module) – Gather info for GCP Project
* [gcp\_runtimeconfig\_config](gcp_runtimeconfig_config_module#ansible-collections-google-cloud-gcp-runtimeconfig-config-module) – Creates a GCP Config
* [gcp\_runtimeconfig\_config\_info](gcp_runtimeconfig_config_info_module#ansible-collections-google-cloud-gcp-runtimeconfig-config-info-module) – Gather info for GCP Config
* [gcp\_runtimeconfig\_variable](gcp_runtimeconfig_variable_module#ansible-collections-google-cloud-gcp-runtimeconfig-variable-module) – Creates a GCP Variable
* [gcp\_runtimeconfig\_variable\_info](gcp_runtimeconfig_variable_info_module#ansible-collections-google-cloud-gcp-runtimeconfig-variable-info-module) – Gather info for GCP Variable
* [gcp\_serviceusage\_service](gcp_serviceusage_service_module#ansible-collections-google-cloud-gcp-serviceusage-service-module) – Creates a GCP Service
* [gcp\_serviceusage\_service\_info](gcp_serviceusage_service_info_module#ansible-collections-google-cloud-gcp-serviceusage-service-info-module) – Gather info for GCP Service
* [gcp\_sourcerepo\_repository](gcp_sourcerepo_repository_module#ansible-collections-google-cloud-gcp-sourcerepo-repository-module) – Creates a GCP Repository
* [gcp\_sourcerepo\_repository\_info](gcp_sourcerepo_repository_info_module#ansible-collections-google-cloud-gcp-sourcerepo-repository-info-module) – Gather info for GCP Repository
* [gcp\_spanner\_database](gcp_spanner_database_module#ansible-collections-google-cloud-gcp-spanner-database-module) – Creates a GCP Database
* [gcp\_spanner\_database\_info](gcp_spanner_database_info_module#ansible-collections-google-cloud-gcp-spanner-database-info-module) – Gather info for GCP Database
* [gcp\_spanner\_instance](gcp_spanner_instance_module#ansible-collections-google-cloud-gcp-spanner-instance-module) – Creates a GCP Instance
* [gcp\_spanner\_instance\_info](gcp_spanner_instance_info_module#ansible-collections-google-cloud-gcp-spanner-instance-info-module) – Gather info for GCP Instance
* [gcp\_sql\_database](gcp_sql_database_module#ansible-collections-google-cloud-gcp-sql-database-module) – Creates a GCP Database
* [gcp\_sql\_database\_info](gcp_sql_database_info_module#ansible-collections-google-cloud-gcp-sql-database-info-module) – Gather info for GCP Database
* [gcp\_sql\_instance](gcp_sql_instance_module#ansible-collections-google-cloud-gcp-sql-instance-module) – Creates a GCP Instance
* [gcp\_sql\_instance\_info](gcp_sql_instance_info_module#ansible-collections-google-cloud-gcp-sql-instance-info-module) – Gather info for GCP Instance
* [gcp\_sql\_ssl\_cert](gcp_sql_ssl_cert_module#ansible-collections-google-cloud-gcp-sql-ssl-cert-module) – Creates a GCP SslCert
* [gcp\_sql\_user](gcp_sql_user_module#ansible-collections-google-cloud-gcp-sql-user-module) – Creates a GCP User
* [gcp\_sql\_user\_info](gcp_sql_user_info_module#ansible-collections-google-cloud-gcp-sql-user-info-module) – Gather info for GCP User
* [gcp\_storage\_bucket](gcp_storage_bucket_module#ansible-collections-google-cloud-gcp-storage-bucket-module) – Creates a GCP Bucket
* [gcp\_storage\_bucket\_access\_control](gcp_storage_bucket_access_control_module#ansible-collections-google-cloud-gcp-storage-bucket-access-control-module) – Creates a GCP BucketAccessControl
* [gcp\_storage\_default\_object\_acl](gcp_storage_default_object_acl_module#ansible-collections-google-cloud-gcp-storage-default-object-acl-module) – Creates a GCP DefaultObjectACL
* [gcp\_storage\_object](gcp_storage_object_module#ansible-collections-google-cloud-gcp-storage-object-module) – Creates a GCP Object
* [gcp\_tpu\_node](gcp_tpu_node_module#ansible-collections-google-cloud-gcp-tpu-node-module) – Creates a GCP Node
* [gcp\_tpu\_node\_info](gcp_tpu_node_info_module#ansible-collections-google-cloud-gcp-tpu-node-info-module) – Gather info for GCP Node

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/google/cloud/index.html>

Hetzner.Hcloud
==============

 Collection version 1.6.0

 Plugin Index
------------

 These are the plugins in the hetzner.hcloud collection

 ### Inventory Plugins

 * [hcloud](hcloud_inventory#ansible-collections-hetzner-hcloud-hcloud-inventory) – Ansible dynamic inventory plugin for the Hetzner Cloud.

 ### Modules

 * [hcloud\_certificate](hcloud_certificate_module#ansible-collections-hetzner-hcloud-hcloud-certificate-module) – Create and manage certificates on the Hetzner Cloud.
* [hcloud\_certificate\_info](hcloud_certificate_info_module#ansible-collections-hetzner-hcloud-hcloud-certificate-info-module) – Gather infos about your Hetzner Cloud certificates.
* [hcloud\_datacenter\_info](hcloud_datacenter_info_module#ansible-collections-hetzner-hcloud-hcloud-datacenter-info-module) – Gather info about the Hetzner Cloud datacenters.
* [hcloud\_firewall](hcloud_firewall_module#ansible-collections-hetzner-hcloud-hcloud-firewall-module) – Create and manage firewalls on the Hetzner Cloud.
* [hcloud\_floating\_ip](hcloud_floating_ip_module#ansible-collections-hetzner-hcloud-hcloud-floating-ip-module) – Create and manage cloud Floating IPs on the Hetzner Cloud.
* [hcloud\_floating\_ip\_info](hcloud_floating_ip_info_module#ansible-collections-hetzner-hcloud-hcloud-floating-ip-info-module) – Gather infos about the Hetzner Cloud Floating IPs.
* [hcloud\_image\_info](hcloud_image_info_module#ansible-collections-hetzner-hcloud-hcloud-image-info-module) – Gather infos about your Hetzner Cloud images.
* [hcloud\_load\_balancer](hcloud_load_balancer_module#ansible-collections-hetzner-hcloud-hcloud-load-balancer-module) – Create and manage cloud Load Balancers on the Hetzner Cloud.
* [hcloud\_load\_balancer\_info](hcloud_load_balancer_info_module#ansible-collections-hetzner-hcloud-hcloud-load-balancer-info-module) – Gather infos about your Hetzner Cloud Load Balancers.
* [hcloud\_load\_balancer\_network](hcloud_load_balancer_network_module#ansible-collections-hetzner-hcloud-hcloud-load-balancer-network-module) – Manage the relationship between Hetzner Cloud Networks and Load Balancers
* [hcloud\_load\_balancer\_service](hcloud_load_balancer_service_module#ansible-collections-hetzner-hcloud-hcloud-load-balancer-service-module) – Create and manage the services of cloud Load Balancers on the Hetzner Cloud.
* [hcloud\_load\_balancer\_target](hcloud_load_balancer_target_module#ansible-collections-hetzner-hcloud-hcloud-load-balancer-target-module) – Manage Hetzner Cloud Load Balancer targets
* [hcloud\_load\_balancer\_type\_info](hcloud_load_balancer_type_info_module#ansible-collections-hetzner-hcloud-hcloud-load-balancer-type-info-module) – Gather infos about the Hetzner Cloud Load Balancer types.
* [hcloud\_location\_info](hcloud_location_info_module#ansible-collections-hetzner-hcloud-hcloud-location-info-module) – Gather infos about your Hetzner Cloud locations.
* [hcloud\_network](hcloud_network_module#ansible-collections-hetzner-hcloud-hcloud-network-module) – Create and manage cloud Networks on the Hetzner Cloud.
* [hcloud\_network\_info](hcloud_network_info_module#ansible-collections-hetzner-hcloud-hcloud-network-info-module) – Gather info about your Hetzner Cloud networks.
* [hcloud\_placement\_group](hcloud_placement_group_module#ansible-collections-hetzner-hcloud-hcloud-placement-group-module) – Create and manage placement groups on the Hetzner Cloud.
* [hcloud\_rdns](hcloud_rdns_module#ansible-collections-hetzner-hcloud-hcloud-rdns-module) – Create and manage reverse DNS entries on the Hetzner Cloud.
* [hcloud\_route](hcloud_route_module#ansible-collections-hetzner-hcloud-hcloud-route-module) – Create and delete cloud routes on the Hetzner Cloud.
* [hcloud\_server](hcloud_server_module#ansible-collections-hetzner-hcloud-hcloud-server-module) – Create and manage cloud servers on the Hetzner Cloud.
* [hcloud\_server\_info](hcloud_server_info_module#ansible-collections-hetzner-hcloud-hcloud-server-info-module) – Gather infos about your Hetzner Cloud servers.
* [hcloud\_server\_network](hcloud_server_network_module#ansible-collections-hetzner-hcloud-hcloud-server-network-module) – Manage the relationship between Hetzner Cloud Networks and servers
* [hcloud\_server\_type\_info](hcloud_server_type_info_module#ansible-collections-hetzner-hcloud-hcloud-server-type-info-module) – Gather infos about the Hetzner Cloud server types.
* [hcloud\_ssh\_key](hcloud_ssh_key_module#ansible-collections-hetzner-hcloud-hcloud-ssh-key-module) – Create and manage ssh keys on the Hetzner Cloud.
* [hcloud\_ssh\_key\_info](hcloud_ssh_key_info_module#ansible-collections-hetzner-hcloud-hcloud-ssh-key-info-module) – Gather infos about your Hetzner Cloud ssh\_keys.
* [hcloud\_subnetwork](hcloud_subnetwork_module#ansible-collections-hetzner-hcloud-hcloud-subnetwork-module) – Manage cloud subnetworks on the Hetzner Cloud.
* [hcloud\_volume](hcloud_volume_module#ansible-collections-hetzner-hcloud-hcloud-volume-module) – Create and manage block Volume on the Hetzner Cloud.
* [hcloud\_volume\_info](hcloud_volume_info_module#ansible-collections-hetzner-hcloud-hcloud-volume-info-module) – Gather infos about your Hetzner Cloud Volumes.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/hetzner/hcloud/index.html>

Ibm.Qradar
==========

 Collection version 1.0.3

 Plugin Index
------------

 These are the plugins in the ibm.qradar collection

 ### Httpapi Plugins

 * [qradar](qradar_httpapi#ansible-collections-ibm-qradar-qradar-httpapi) – HttpApi Plugin for IBM QRadar

 ### Modules

 * [deploy](deploy_module#ansible-collections-ibm-qradar-deploy-module) – Trigger a qradar configuration deployment
* [log\_source\_management](log_source_management_module#ansible-collections-ibm-qradar-log-source-management-module) – Manage Log Sources in QRadar
* [offense\_action](offense_action_module#ansible-collections-ibm-qradar-offense-action-module) – Take action on a QRadar Offense
* [offense\_info](offense_info_module#ansible-collections-ibm-qradar-offense-info-module) – Obtain information about one or many QRadar Offenses, with filter options
* [offense\_note](offense_note_module#ansible-collections-ibm-qradar-offense-note-module) – Create or update a QRadar Offense Note
* [rule](rule_module#ansible-collections-ibm-qradar-rule-module) – Manage state of QRadar Rules, with filter options
* [rule\_info](rule_info_module#ansible-collections-ibm-qradar-rule-info-module) – Obtain information about one or many QRadar Rules, with filter options

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ibm/qradar/index.html>

Infinidat.Infinibox
===================

 Collection version 1.2.4

 Plugin Index
------------

 These are the plugins in the infinidat.infinibox collection

 ### Modules

 * [infini\_cluster](infini_cluster_module#ansible-collections-infinidat-infinibox-infini-cluster-module) – Create, Delete and Modify Host Cluster on Infinibox
* [infini\_export](infini_export_module#ansible-collections-infinidat-infinibox-infini-export-module) – Create, Delete or Modify NFS Exports on Infinibox
* [infini\_export\_client](infini_export_client_module#ansible-collections-infinidat-infinibox-infini-export-client-module) – Create, Delete or Modify NFS Client(s) for existing exports on Infinibox
* [infini\_fs](infini_fs_module#ansible-collections-infinidat-infinibox-infini-fs-module) – Create, Delete or Modify filesystems on Infinibox
* [infini\_host](infini_host_module#ansible-collections-infinidat-infinibox-infini-host-module) – Create, Delete and Modify Hosts on Infinibox
* [infini\_map](infini_map_module#ansible-collections-infinidat-infinibox-infini-map-module) – Create and Delete mapping of a volume to a host on Infinibox
* [infini\_pool](infini_pool_module#ansible-collections-infinidat-infinibox-infini-pool-module) – Create, Delete and Modify Pools on Infinibox
* [infini\_port](infini_port_module#ansible-collections-infinidat-infinibox-infini-port-module) – Add and Delete fiber channel and iSCSI ports to a host on Infinibox
* [infini\_user](infini_user_module#ansible-collections-infinidat-infinibox-infini-user-module) – Create, Delete and Modify a User on Infinibox
* [infini\_vol](infini_vol_module#ansible-collections-infinidat-infinibox-infini-vol-module) – Create, Delete or Modify volumes on Infinibox

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/infinidat/infinibox/index.html>

Kubernetes.Core
===============

 Collection version 1.2.1

 Plugin Index
------------

 These are the plugins in the kubernetes.core collection

 ### Connection Plugins

 * [kubectl](kubectl_connection#ansible-collections-kubernetes-core-kubectl-connection) – Execute tasks in pods running on Kubernetes.

 ### Inventory Plugins

 * [k8s](k8s_inventory#ansible-collections-kubernetes-core-k8s-inventory) – Kubernetes (K8s) inventory source
* [openshift](openshift_inventory#ansible-collections-kubernetes-core-openshift-inventory) – OpenShift inventory source

 ### Lookup Plugins

 * [k8s](k8s_lookup#ansible-collections-kubernetes-core-k8s-lookup) – Query the K8s API

 ### Modules

 * [helm](helm_module#ansible-collections-kubernetes-core-helm-module) – Manages Kubernetes packages with the Helm package manager
* [helm\_info](helm_info_module#ansible-collections-kubernetes-core-helm-info-module) – Get information from Helm package deployed inside the cluster
* [helm\_plugin](helm_plugin_module#ansible-collections-kubernetes-core-helm-plugin-module) – Manage Helm plugins
* [helm\_plugin\_info](helm_plugin_info_module#ansible-collections-kubernetes-core-helm-plugin-info-module) – Gather information about Helm plugins
* [helm\_repository](helm_repository_module#ansible-collections-kubernetes-core-helm-repository-module) – Manage Helm repositories.
* [helm\_template](helm_template_module#ansible-collections-kubernetes-core-helm-template-module) – Render chart templates
* [k8s](k8s_module#ansible-collections-kubernetes-core-k8s-module) – Manage Kubernetes (K8s) objects
* [k8s\_auth](k8s_auth_module#ansible-collections-kubernetes-core-k8s-auth-module) – Authenticate to Kubernetes clusters which require an explicit login step
* [k8s\_cluster\_info](k8s_cluster_info_module#ansible-collections-kubernetes-core-k8s-cluster-info-module) – Describe Kubernetes (K8s) cluster, APIs available and their respective versions
* [k8s\_exec](k8s_exec_module#ansible-collections-kubernetes-core-k8s-exec-module) – Execute command in Pod
* [k8s\_info](k8s_info_module#ansible-collections-kubernetes-core-k8s-info-module) – Describe Kubernetes (K8s) objects
* [k8s\_log](k8s_log_module#ansible-collections-kubernetes-core-k8s-log-module) – Fetch logs from Kubernetes resources
* [k8s\_rollback](k8s_rollback_module#ansible-collections-kubernetes-core-k8s-rollback-module) – Rollback Kubernetes (K8S) Deployments and DaemonSets
* [k8s\_scale](k8s_scale_module#ansible-collections-kubernetes-core-k8s-scale-module) – Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
* [k8s\_service](k8s_service_module#ansible-collections-kubernetes-core-k8s-service-module) – Manage Services on Kubernetes

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/kubernetes/core/index.html>

Netapp\_Eseries.Santricity
==========================

 Collection version 1.2.13

 Plugin Index
------------

 These are the plugins in the netapp\_eseries.santricity collection

 ### Lookup Plugins

 * [santricity\_host](santricity_host_lookup#ansible-collections-netapp-eseries-santricity-santricity-host-lookup) –
* [santricity\_host\_detail](santricity_host_detail_lookup#ansible-collections-netapp-eseries-santricity-santricity-host-detail-lookup) – Expands the host information from santricity\_host lookup
* [santricity\_storage\_pool](santricity_storage_pool_lookup#ansible-collections-netapp-eseries-santricity-santricity-storage-pool-lookup) – Storage pool information

 ### Modules

 * [na\_santricity\_alerts](na_santricity_alerts_module#ansible-collections-netapp-eseries-santricity-na-santricity-alerts-module) – NetApp E-Series manage email notification settings
* [na\_santricity\_alerts\_syslog](na_santricity_alerts_syslog_module#ansible-collections-netapp-eseries-santricity-na-santricity-alerts-syslog-module) – NetApp E-Series manage syslog servers receiving storage system alerts.
* [na\_santricity\_asup](na_santricity_asup_module#ansible-collections-netapp-eseries-santricity-na-santricity-asup-module) – NetApp E-Series manage auto-support settings
* [na\_santricity\_auditlog](na_santricity_auditlog_module#ansible-collections-netapp-eseries-santricity-na-santricity-auditlog-module) – NetApp E-Series manage audit-log configuration
* [na\_santricity\_auth](na_santricity_auth_module#ansible-collections-netapp-eseries-santricity-na-santricity-auth-module) – NetApp E-Series set or update the password for a storage array device or SANtricity Web Services Proxy.
* [na\_santricity\_client\_certificate](na_santricity_client_certificate_module#ansible-collections-netapp-eseries-santricity-na-santricity-client-certificate-module) – NetApp E-Series manage remote server certificates.
* [na\_santricity\_discover](na_santricity_discover_module#ansible-collections-netapp-eseries-santricity-na-santricity-discover-module) – NetApp E-Series discover E-Series storage systems
* [na\_santricity\_drive\_firmware](na_santricity_drive_firmware_module#ansible-collections-netapp-eseries-santricity-na-santricity-drive-firmware-module) – NetApp E-Series manage drive firmware
* [na\_santricity\_facts](na_santricity_facts_module#ansible-collections-netapp-eseries-santricity-na-santricity-facts-module) – NetApp E-Series retrieve facts about NetApp E-Series storage arrays
* [na\_santricity\_firmware](na_santricity_firmware_module#ansible-collections-netapp-eseries-santricity-na-santricity-firmware-module) – NetApp E-Series manage firmware.
* [na\_santricity\_global](na_santricity_global_module#ansible-collections-netapp-eseries-santricity-na-santricity-global-module) – NetApp E-Series manage global settings configuration
* [na\_santricity\_host](na_santricity_host_module#ansible-collections-netapp-eseries-santricity-na-santricity-host-module) – NetApp E-Series manage eseries hosts
* [na\_santricity\_hostgroup](na_santricity_hostgroup_module#ansible-collections-netapp-eseries-santricity-na-santricity-hostgroup-module) – NetApp E-Series manage array host groups
* [na\_santricity\_ib\_iser\_interface](na_santricity_ib_iser_interface_module#ansible-collections-netapp-eseries-santricity-na-santricity-ib-iser-interface-module) – NetApp E-Series manage InfiniBand iSER interface configuration
* [na\_santricity\_iscsi\_interface](na_santricity_iscsi_interface_module#ansible-collections-netapp-eseries-santricity-na-santricity-iscsi-interface-module) – NetApp E-Series manage iSCSI interface configuration
* [na\_santricity\_iscsi\_target](na_santricity_iscsi_target_module#ansible-collections-netapp-eseries-santricity-na-santricity-iscsi-target-module) – NetApp E-Series manage iSCSI target configuration
* [na\_santricity\_ldap](na_santricity_ldap_module#ansible-collections-netapp-eseries-santricity-na-santricity-ldap-module) – NetApp E-Series manage LDAP integration to use for authentication
* [na\_santricity\_lun\_mapping](na_santricity_lun_mapping_module#ansible-collections-netapp-eseries-santricity-na-santricity-lun-mapping-module) – NetApp E-Series manage lun mappings
* [na\_santricity\_mgmt\_interface](na_santricity_mgmt_interface_module#ansible-collections-netapp-eseries-santricity-na-santricity-mgmt-interface-module) – NetApp E-Series manage management interface configuration
* [na\_santricity\_nvme\_interface](na_santricity_nvme_interface_module#ansible-collections-netapp-eseries-santricity-na-santricity-nvme-interface-module) – NetApp E-Series manage NVMe interface configuration
* [na\_santricity\_proxy\_drive\_firmware\_upload](na_santricity_proxy_drive_firmware_upload_module#ansible-collections-netapp-eseries-santricity-na-santricity-proxy-drive-firmware-upload-module) – NetApp E-Series manage proxy drive firmware files
* [na\_santricity\_proxy\_firmware\_upload](na_santricity_proxy_firmware_upload_module#ansible-collections-netapp-eseries-santricity-na-santricity-proxy-firmware-upload-module) – NetApp E-Series manage proxy firmware uploads.
* [na\_santricity\_proxy\_systems](na_santricity_proxy_systems_module#ansible-collections-netapp-eseries-santricity-na-santricity-proxy-systems-module) – NetApp E-Series manage SANtricity web services proxy storage arrays
* [na\_santricity\_server\_certificate](na_santricity_server_certificate_module#ansible-collections-netapp-eseries-santricity-na-santricity-server-certificate-module) – NetApp E-Series manage the storage system’s server SSL certificates.
* [na\_santricity\_snapshot](na_santricity_snapshot_module#ansible-collections-netapp-eseries-santricity-na-santricity-snapshot-module) – NetApp E-Series storage system’s snapshots.
* [na\_santricity\_storagepool](na_santricity_storagepool_module#ansible-collections-netapp-eseries-santricity-na-santricity-storagepool-module) – NetApp E-Series manage volume groups and disk pools
* [na\_santricity\_syslog](na_santricity_syslog_module#ansible-collections-netapp-eseries-santricity-na-santricity-syslog-module) – NetApp E-Series manage syslog settings
* [na\_santricity\_volume](na_santricity_volume_module#ansible-collections-netapp-eseries-santricity-na-santricity-volume-module) – NetApp E-Series manage storage volumes (standard and thin)
* [netapp\_e\_alerts](netapp_e_alerts_module#ansible-collections-netapp-eseries-santricity-netapp-e-alerts-module) – NetApp E-Series manage email notification settings
* [netapp\_e\_amg](netapp_e_amg_module#ansible-collections-netapp-eseries-santricity-netapp-e-amg-module) – NetApp E-Series create, remove, and update asynchronous mirror groups
* [netapp\_e\_amg\_role](netapp_e_amg_role_module#ansible-collections-netapp-eseries-santricity-netapp-e-amg-role-module) – NetApp E-Series update the role of a storage array within an Asynchronous Mirror Group (AMG).
* [netapp\_e\_amg\_sync](netapp_e_amg_sync_module#ansible-collections-netapp-eseries-santricity-netapp-e-amg-sync-module) – NetApp E-Series conduct synchronization actions on asynchronous mirror groups.
* [netapp\_e\_asup](netapp_e_asup_module#ansible-collections-netapp-eseries-santricity-netapp-e-asup-module) – NetApp E-Series manage auto-support settings
* [netapp\_e\_auditlog](netapp_e_auditlog_module#ansible-collections-netapp-eseries-santricity-netapp-e-auditlog-module) – NetApp E-Series manage audit-log configuration
* [netapp\_e\_auth](netapp_e_auth_module#ansible-collections-netapp-eseries-santricity-netapp-e-auth-module) – NetApp E-Series set or update the password for a storage array.
* [netapp\_e\_drive\_firmware](netapp_e_drive_firmware_module#ansible-collections-netapp-eseries-santricity-netapp-e-drive-firmware-module) – NetApp E-Series manage drive firmware
* [netapp\_e\_facts](netapp_e_facts_module#ansible-collections-netapp-eseries-santricity-netapp-e-facts-module) – NetApp E-Series retrieve facts about NetApp E-Series storage arrays
* [netapp\_e\_firmware](netapp_e_firmware_module#ansible-collections-netapp-eseries-santricity-netapp-e-firmware-module) – NetApp E-Series manage firmware.
* [netapp\_e\_flashcache](netapp_e_flashcache_module#ansible-collections-netapp-eseries-santricity-netapp-e-flashcache-module) – NetApp E-Series manage SSD caches
* [netapp\_e\_global](netapp_e_global_module#ansible-collections-netapp-eseries-santricity-netapp-e-global-module) – NetApp E-Series manage global settings configuration
* [netapp\_e\_host](netapp_e_host_module#ansible-collections-netapp-eseries-santricity-netapp-e-host-module) – NetApp E-Series manage eseries hosts
* [netapp\_e\_hostgroup](netapp_e_hostgroup_module#ansible-collections-netapp-eseries-santricity-netapp-e-hostgroup-module) – NetApp E-Series manage array host groups
* [netapp\_e\_iscsi\_interface](netapp_e_iscsi_interface_module#ansible-collections-netapp-eseries-santricity-netapp-e-iscsi-interface-module) – NetApp E-Series manage iSCSI interface configuration
* [netapp\_e\_iscsi\_target](netapp_e_iscsi_target_module#ansible-collections-netapp-eseries-santricity-netapp-e-iscsi-target-module) – NetApp E-Series manage iSCSI target configuration
* [netapp\_e\_ldap](netapp_e_ldap_module#ansible-collections-netapp-eseries-santricity-netapp-e-ldap-module) – NetApp E-Series manage LDAP integration to use for authentication
* [netapp\_e\_lun\_mapping](netapp_e_lun_mapping_module#ansible-collections-netapp-eseries-santricity-netapp-e-lun-mapping-module) – NetApp E-Series create, delete, or modify lun mappings
* [netapp\_e\_mgmt\_interface](netapp_e_mgmt_interface_module#ansible-collections-netapp-eseries-santricity-netapp-e-mgmt-interface-module) – NetApp E-Series management interface configuration
* [netapp\_e\_snapshot\_group](netapp_e_snapshot_group_module#ansible-collections-netapp-eseries-santricity-netapp-e-snapshot-group-module) – NetApp E-Series manage snapshot groups
* [netapp\_e\_snapshot\_images](netapp_e_snapshot_images_module#ansible-collections-netapp-eseries-santricity-netapp-e-snapshot-images-module) – NetApp E-Series create and delete snapshot images
* [netapp\_e\_snapshot\_volume](netapp_e_snapshot_volume_module#ansible-collections-netapp-eseries-santricity-netapp-e-snapshot-volume-module) – NetApp E-Series manage snapshot volumes.
* [netapp\_e\_storage\_system](netapp_e_storage_system_module#ansible-collections-netapp-eseries-santricity-netapp-e-storage-system-module) – NetApp E-Series Web Services Proxy manage storage arrays
* [netapp\_e\_storagepool](netapp_e_storagepool_module#ansible-collections-netapp-eseries-santricity-netapp-e-storagepool-module) – NetApp E-Series manage volume groups and disk pools
* [netapp\_e\_syslog](netapp_e_syslog_module#ansible-collections-netapp-eseries-santricity-netapp-e-syslog-module) – NetApp E-Series manage syslog settings
* [netapp\_e\_volume](netapp_e_volume_module#ansible-collections-netapp-eseries-santricity-netapp-e-volume-module) – NetApp E-Series manage storage volumes (standard and thin)
* [netapp\_e\_volume\_copy](netapp_e_volume_copy_module#ansible-collections-netapp-eseries-santricity-netapp-e-volume-copy-module) – NetApp E-Series create volume copy pairs

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/netapp_eseries/santricity/index.html>

Hpe.Nimble
==========

 Collection version 1.1.3

 Plugin Index
------------

 These are the plugins in the hpe.nimble collection

 ### Modules

 * [hpe\_nimble\_access\_control\_record](hpe_nimble_access_control_record_module#ansible-collections-hpe-nimble-hpe-nimble-access-control-record-module) – Manage the HPE Nimble Storage access control records
* [hpe\_nimble\_array](hpe_nimble_array_module#ansible-collections-hpe-nimble-hpe-nimble-array-module) – Manage the HPE Nimble Storage array
* [hpe\_nimble\_chap\_user](hpe_nimble_chap_user_module#ansible-collections-hpe-nimble-hpe-nimble-chap-user-module) – Manage the HPE Nimble Storage CHAP user
* [hpe\_nimble\_disk](hpe_nimble_disk_module#ansible-collections-hpe-nimble-hpe-nimble-disk-module) – Manage the HPE Nimble Storage disk
* [hpe\_nimble\_encryption](hpe_nimble_encryption_module#ansible-collections-hpe-nimble-hpe-nimble-encryption-module) – Manage the HPE Nimble Storage encryption
* [hpe\_nimble\_fc](hpe_nimble_fc_module#ansible-collections-hpe-nimble-hpe-nimble-fc-module) – Manage the HPE Nimble Storage Fibre Channel
* [hpe\_nimble\_group](hpe_nimble_group_module#ansible-collections-hpe-nimble-hpe-nimble-group-module) – Manage the HPE Nimble Storage group
* [hpe\_nimble\_info](hpe_nimble_info_module#ansible-collections-hpe-nimble-hpe-nimble-info-module) – Collect information from HPE Nimble Storage array
* [hpe\_nimble\_initiator\_group](hpe_nimble_initiator_group_module#ansible-collections-hpe-nimble-hpe-nimble-initiator-group-module) – Manage the HPE Nimble Storage initiator groups
* [hpe\_nimble\_network](hpe_nimble_network_module#ansible-collections-hpe-nimble-hpe-nimble-network-module) – Manage the HPE Nimble Storage network configuration
* [hpe\_nimble\_partner](hpe_nimble_partner_module#ansible-collections-hpe-nimble-hpe-nimble-partner-module) – Manage the HPE Nimble Storage Replication Partner
* [hpe\_nimble\_performance\_policy](hpe_nimble_performance_policy_module#ansible-collections-hpe-nimble-hpe-nimble-performance-policy-module) – Manage the HPE Nimble Storage performance policies
* [hpe\_nimble\_pool](hpe_nimble_pool_module#ansible-collections-hpe-nimble-hpe-nimble-pool-module) – Manage the HPE Nimble Storage pools
* [hpe\_nimble\_protection\_schedule](hpe_nimble_protection_schedule_module#ansible-collections-hpe-nimble-hpe-nimble-protection-schedule-module) – Manage the HPE Nimble Storage protection schedules
* [hpe\_nimble\_protection\_template](hpe_nimble_protection_template_module#ansible-collections-hpe-nimble-hpe-nimble-protection-template-module) – Manage the HPE Nimble Storage protection templates
* [hpe\_nimble\_shelf](hpe_nimble_shelf_module#ansible-collections-hpe-nimble-hpe-nimble-shelf-module) – Manage the HPE Nimble Storage shelves
* [hpe\_nimble\_snapshot](hpe_nimble_snapshot_module#ansible-collections-hpe-nimble-hpe-nimble-snapshot-module) – Manage the HPE Nimble Storage snapshots
* [hpe\_nimble\_snapshot\_collection](hpe_nimble_snapshot_collection_module#ansible-collections-hpe-nimble-hpe-nimble-snapshot-collection-module) – Manage the HPE Nimble Storage snapshot collections
* [hpe\_nimble\_user](hpe_nimble_user_module#ansible-collections-hpe-nimble-hpe-nimble-user-module) – Manage the HPE Nimble Storage users
* [hpe\_nimble\_user\_policy](hpe_nimble_user_policy_module#ansible-collections-hpe-nimble-hpe-nimble-user-policy-module) – Manage the HPE Nimble Storage user policies
* [hpe\_nimble\_volume](hpe_nimble_volume_module#ansible-collections-hpe-nimble-hpe-nimble-volume-module) – Manage the HPE Nimble Storage volumes
* [hpe\_nimble\_volume\_collection](hpe_nimble_volume_collection_module#ansible-collections-hpe-nimble-hpe-nimble-volume-collection-module) – Manage the HPE Nimble Storage volume collections

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/hpe/nimble/index.html>

Junipernetworks.Junos
=====================

 Collection version 2.6.0

 Plugin Index
------------

 These are the plugins in the junipernetworks.junos collection

 ### Cliconf Plugins

 * [junos](junos_cliconf#ansible-collections-junipernetworks-junos-junos-cliconf) – Use junos cliconf to run command on Juniper Junos OS platform

 ### Modules

 * [junos\_acl\_interfaces](junos_acl_interfaces_module#ansible-collections-junipernetworks-junos-junos-acl-interfaces-module) – ACL interfaces resource module
* [junos\_acls](junos_acls_module#ansible-collections-junipernetworks-junos-junos-acls-module) – ACLs resource module
* [junos\_banner](junos_banner_module#ansible-collections-junipernetworks-junos-junos-banner-module) – Manage multiline banners on Juniper JUNOS devices
* [junos\_bgp\_address\_family](junos_bgp_address_family_module#ansible-collections-junipernetworks-junos-junos-bgp-address-family-module) – Manage BGP Address Family attributes of interfaces on Junos devices.
* [junos\_bgp\_global](junos_bgp_global_module#ansible-collections-junipernetworks-junos-junos-bgp-global-module) – Manages BGP Global configuration on devices running Juniper JUNOS.
* [junos\_command](junos_command_module#ansible-collections-junipernetworks-junos-junos-command-module) – Run arbitrary commands on an Juniper JUNOS device
* [junos\_config](junos_config_module#ansible-collections-junipernetworks-junos-junos-config-module) – Manage configuration on devices running Juniper JUNOS
* [junos\_facts](junos_facts_module#ansible-collections-junipernetworks-junos-junos-facts-module) – Collect facts from remote devices running Juniper Junos
* [junos\_interface](junos_interface_module#ansible-collections-junipernetworks-junos-junos-interface-module) – (deprecated, removed after 2022-06-01) Manage Interface on Juniper JUNOS network devices
* [junos\_interfaces](junos_interfaces_module#ansible-collections-junipernetworks-junos-junos-interfaces-module) – Junos Interfaces resource module
* [junos\_l2\_interface](junos_l2_interface_module#ansible-collections-junipernetworks-junos-junos-l2-interface-module) – (deprecated, removed after 2022-06-01) Manage L2 Interface on Juniper JUNOS network devices
* [junos\_l2\_interfaces](junos_l2_interfaces_module#ansible-collections-junipernetworks-junos-junos-l2-interfaces-module) – L2 interfaces resource module
* [junos\_l3\_interface](junos_l3_interface_module#ansible-collections-junipernetworks-junos-junos-l3-interface-module) – (deprecated, removed after 2022-06-01) Manage L3 interfaces on Juniper JUNOS network devices
* [junos\_l3\_interfaces](junos_l3_interfaces_module#ansible-collections-junipernetworks-junos-junos-l3-interfaces-module) – L3 interfaces resource module
* [junos\_lacp](junos_lacp_module#ansible-collections-junipernetworks-junos-junos-lacp-module) – Global Link Aggregation Control Protocol (LACP) Junos resource module
* [junos\_lacp\_interfaces](junos_lacp_interfaces_module#ansible-collections-junipernetworks-junos-junos-lacp-interfaces-module) – LACP interfaces resource module
* [junos\_lag\_interfaces](junos_lag_interfaces_module#ansible-collections-junipernetworks-junos-junos-lag-interfaces-module) – Link Aggregation Juniper JUNOS resource module
* [junos\_linkagg](junos_linkagg_module#ansible-collections-junipernetworks-junos-junos-linkagg-module) – (deprecated, removed after 2022-06-01) Manage link aggregation groups on Juniper JUNOS network devices
* [junos\_lldp](junos_lldp_module#ansible-collections-junipernetworks-junos-junos-lldp-module) – (deprecated, removed after 2022-06-01) Manage LLDP configuration on Juniper JUNOS network devices
* [junos\_lldp\_global](junos_lldp_global_module#ansible-collections-junipernetworks-junos-junos-lldp-global-module) – LLDP resource module
* [junos\_lldp\_interface](junos_lldp_interface_module#ansible-collections-junipernetworks-junos-junos-lldp-interface-module) – (deprecated, removed after 2022-06-01) Manage LLDP interfaces configuration on Juniper JUNOS network devices
* [junos\_lldp\_interfaces](junos_lldp_interfaces_module#ansible-collections-junipernetworks-junos-junos-lldp-interfaces-module) – LLDP interfaces resource module
* [junos\_logging](junos_logging_module#ansible-collections-junipernetworks-junos-junos-logging-module) – Manage logging on network devices
* [junos\_logging\_global](junos_logging_global_module#ansible-collections-junipernetworks-junos-junos-logging-global-module) – Manage logging configuration on Junos devices.
* [junos\_netconf](junos_netconf_module#ansible-collections-junipernetworks-junos-junos-netconf-module) – Configures the Junos Netconf system service
* [junos\_ntp\_global](junos_ntp_global_module#ansible-collections-junipernetworks-junos-junos-ntp-global-module) – Manage NTP configuration on Junos devices.
* [junos\_ospf\_interfaces](junos_ospf_interfaces_module#ansible-collections-junipernetworks-junos-junos-ospf-interfaces-module) – OSPF Interfaces Resource Module.
* [junos\_ospfv2](junos_ospfv2_module#ansible-collections-junipernetworks-junos-junos-ospfv2-module) – OSPFv2 resource module
* [junos\_ospfv3](junos_ospfv3_module#ansible-collections-junipernetworks-junos-junos-ospfv3-module) – OSPFv3 resource module
* [junos\_package](junos_package_module#ansible-collections-junipernetworks-junos-junos-package-module) – Installs packages on remote devices running Junos
* [junos\_ping](junos_ping_module#ansible-collections-junipernetworks-junos-junos-ping-module) – Tests reachability using ping from devices running Juniper JUNOS
* [junos\_prefix\_lists](junos_prefix_lists_module#ansible-collections-junipernetworks-junos-junos-prefix-lists-module) – Manage prefix-lists attributes of interfaces on Junos devices.
* [junos\_routing\_instances](junos_routing_instances_module#ansible-collections-junipernetworks-junos-junos-routing-instances-module) – Manage routing instances on Junos devices.
* [junos\_rpc](junos_rpc_module#ansible-collections-junipernetworks-junos-junos-rpc-module) – Runs an arbitrary RPC over NetConf on an Juniper JUNOS device
* [junos\_scp](junos_scp_module#ansible-collections-junipernetworks-junos-junos-scp-module) – Transfer files from or to remote devices running Junos
* [junos\_static\_route](junos_static_route_module#ansible-collections-junipernetworks-junos-junos-static-route-module) – (deprecated, removed after 2022-06-01) Manage static IP routes on Juniper JUNOS network devices
* [junos\_static\_routes](junos_static_routes_module#ansible-collections-junipernetworks-junos-junos-static-routes-module) – Static routes resource module
* [junos\_system](junos_system_module#ansible-collections-junipernetworks-junos-junos-system-module) – Manage the system attributes on Juniper JUNOS devices
* [junos\_user](junos_user_module#ansible-collections-junipernetworks-junos-junos-user-module) – Manage local user accounts on Juniper JUNOS devices
* [junos\_vlan](junos_vlan_module#ansible-collections-junipernetworks-junos-junos-vlan-module) – (deprecated, removed after 2022-06-01) Manage VLANs on Juniper JUNOS network devices
* [junos\_vlans](junos_vlans_module#ansible-collections-junipernetworks-junos-junos-vlans-module) – VLANs resource module
* [junos\_vrf](junos_vrf_module#ansible-collections-junipernetworks-junos-junos-vrf-module) – Manage the VRF definitions on Juniper JUNOS devices

 ### Netconf Plugins

 * [junos](junos_netconf#ansible-collections-junipernetworks-junos-junos-netconf) – Use junos netconf plugin to run netconf commands on Juniper JUNOS platform

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/junipernetworks/junos/index.html>

Mellanox.Onyx
=============

 Collection version 1.0.0

 Plugin Index
------------

 These are the plugins in the mellanox.onyx collection

 ### Cliconf Plugins

 * [onyx](onyx_cliconf#ansible-collections-mellanox-onyx-onyx-cliconf) – Use onyx cliconf to run command on Mellanox ONYX platform

 ### Modules

 * [onyx\_aaa](onyx_aaa_module#ansible-collections-mellanox-onyx-onyx-aaa-module) – Configures AAA parameters
* [onyx\_bfd](onyx_bfd_module#ansible-collections-mellanox-onyx-onyx-bfd-module) – Configures BFD parameters
* [onyx\_bgp](onyx_bgp_module#ansible-collections-mellanox-onyx-onyx-bgp-module) – Configures BGP on Mellanox ONYX network devices
* [onyx\_buffer\_pool](onyx_buffer_pool_module#ansible-collections-mellanox-onyx-onyx-buffer-pool-module) – Configures Buffer Pool
* [onyx\_command](onyx_command_module#ansible-collections-mellanox-onyx-onyx-command-module) – Run commands on remote devices running Mellanox ONYX
* [onyx\_config](onyx_config_module#ansible-collections-mellanox-onyx-onyx-config-module) – Manage Mellanox ONYX configuration sections
* [onyx\_facts](onyx_facts_module#ansible-collections-mellanox-onyx-onyx-facts-module) – Collect facts from Mellanox ONYX network devices
* [onyx\_igmp](onyx_igmp_module#ansible-collections-mellanox-onyx-onyx-igmp-module) – Configures IGMP global parameters
* [onyx\_igmp\_interface](onyx_igmp_interface_module#ansible-collections-mellanox-onyx-onyx-igmp-interface-module) – Configures IGMP interface parameters
* [onyx\_igmp\_vlan](onyx_igmp_vlan_module#ansible-collections-mellanox-onyx-onyx-igmp-vlan-module) – Configures IGMP Vlan parameters
* [onyx\_interface](onyx_interface_module#ansible-collections-mellanox-onyx-onyx-interface-module) – Manage Interfaces on Mellanox ONYX network devices
* [onyx\_l2\_interface](onyx_l2_interface_module#ansible-collections-mellanox-onyx-onyx-l2-interface-module) – Manage Layer-2 interface on Mellanox ONYX network devices
* [onyx\_l3\_interface](onyx_l3_interface_module#ansible-collections-mellanox-onyx-onyx-l3-interface-module) – Manage L3 interfaces on Mellanox ONYX network devices
* [onyx\_linkagg](onyx_linkagg_module#ansible-collections-mellanox-onyx-onyx-linkagg-module) – Manage link aggregation groups on Mellanox ONYX network devices
* [onyx\_lldp](onyx_lldp_module#ansible-collections-mellanox-onyx-onyx-lldp-module) – Manage LLDP configuration on Mellanox ONYX network devices
* [onyx\_lldp\_interface](onyx_lldp_interface_module#ansible-collections-mellanox-onyx-onyx-lldp-interface-module) – Manage LLDP interfaces configuration on Mellanox ONYX network devices
* [onyx\_magp](onyx_magp_module#ansible-collections-mellanox-onyx-onyx-magp-module) – Manage MAGP protocol on Mellanox ONYX network devices
* [onyx\_mlag\_ipl](onyx_mlag_ipl_module#ansible-collections-mellanox-onyx-onyx-mlag-ipl-module) – Manage IPL (inter-peer link) on Mellanox ONYX network devices
* [onyx\_mlag\_vip](onyx_mlag_vip_module#ansible-collections-mellanox-onyx-onyx-mlag-vip-module) – Configures MLAG VIP on Mellanox ONYX network devices
* [onyx\_ntp](onyx_ntp_module#ansible-collections-mellanox-onyx-onyx-ntp-module) – Manage NTP general configurations and ntp keys configurations on Mellanox ONYX network devices
* [onyx\_ntp\_servers\_peers](onyx_ntp_servers_peers_module#ansible-collections-mellanox-onyx-onyx-ntp-servers-peers-module) – Configures NTP peers and servers parameters
* [onyx\_ospf](onyx_ospf_module#ansible-collections-mellanox-onyx-onyx-ospf-module) – Manage OSPF protocol on Mellanox ONYX network devices
* [onyx\_pfc\_interface](onyx_pfc_interface_module#ansible-collections-mellanox-onyx-onyx-pfc-interface-module) – Manage priority flow control on ONYX network devices
* [onyx\_protocol](onyx_protocol_module#ansible-collections-mellanox-onyx-onyx-protocol-module) – Enables/Disables protocols on Mellanox ONYX network devices
* [onyx\_ptp\_global](onyx_ptp_global_module#ansible-collections-mellanox-onyx-onyx-ptp-global-module) – Configures PTP Global parameters
* [onyx\_ptp\_interface](onyx_ptp_interface_module#ansible-collections-mellanox-onyx-onyx-ptp-interface-module) – Configures PTP on interface
* [onyx\_qos](onyx_qos_module#ansible-collections-mellanox-onyx-onyx-qos-module) – Configures QoS
* [onyx\_snmp](onyx_snmp_module#ansible-collections-mellanox-onyx-onyx-snmp-module) – Manages SNMP general configurations on Mellanox ONYX network devices
* [onyx\_snmp\_hosts](onyx_snmp_hosts_module#ansible-collections-mellanox-onyx-onyx-snmp-hosts-module) – Configures SNMP host parameters
* [onyx\_snmp\_users](onyx_snmp_users_module#ansible-collections-mellanox-onyx-onyx-snmp-users-module) – Configures SNMP User parameters
* [onyx\_syslog\_files](onyx_syslog_files_module#ansible-collections-mellanox-onyx-onyx-syslog-files-module) – Configure file management syslog module
* [onyx\_syslog\_remote](onyx_syslog_remote_module#ansible-collections-mellanox-onyx-onyx-syslog-remote-module) – Configure remote syslog module
* [onyx\_traffic\_class](onyx_traffic_class_module#ansible-collections-mellanox-onyx-onyx-traffic-class-module) – Configures Traffic Class
* [onyx\_username](onyx_username_module#ansible-collections-mellanox-onyx-onyx-username-module) – Configure username module
* [onyx\_vlan](onyx_vlan_module#ansible-collections-mellanox-onyx-onyx-vlan-module) – Manage VLANs on Mellanox ONYX network devices
* [onyx\_vxlan](onyx_vxlan_module#ansible-collections-mellanox-onyx-onyx-vxlan-module) – Configures Vxlan
* [onyx\_wjh](onyx_wjh_module#ansible-collections-mellanox-onyx-onyx-wjh-module) – Configure what-just-happend module

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/mellanox/onyx/index.html>

Netapp.Azure
============

 Collection version 21.9.0

 Plugin Index
------------

 These are the plugins in the netapp.azure collection

 ### Modules

 * [azure\_rm\_netapp\_account](azure_rm_netapp_account_module#ansible-collections-netapp-azure-azure-rm-netapp-account-module) – Manage NetApp Azure Files Account
* [azure\_rm\_netapp\_capacity\_pool](azure_rm_netapp_capacity_pool_module#ansible-collections-netapp-azure-azure-rm-netapp-capacity-pool-module) – Manage NetApp Azure Files capacity pool
* [azure\_rm\_netapp\_snapshot](azure_rm_netapp_snapshot_module#ansible-collections-netapp-azure-azure-rm-netapp-snapshot-module) – Manage NetApp Azure Files Snapshot
* [azure\_rm\_netapp\_volume](azure_rm_netapp_volume_module#ansible-collections-netapp-azure-azure-rm-netapp-volume-module) – Manage NetApp Azure Files Volume

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/netapp/azure/index.html>

Inspur.Sm
=========

 Collection version 1.3.0

 Plugin Index
------------

 These are the plugins in the inspur.sm collection

 ### Modules

 * [ad\_group](ad_group_module#ansible-collections-inspur-sm-ad-group-module) – Manage active directory group information.
* [ad\_group\_info](ad_group_info_module#ansible-collections-inspur-sm-ad-group-info-module) – Get active directory group information.
* [ad\_info](ad_info_module#ansible-collections-inspur-sm-ad-info-module) – Get active directory information.
* [adapter\_info](adapter_info_module#ansible-collections-inspur-sm-adapter-info-module) – Get adapter information.
* [add\_ad\_group](add_ad_group_module#ansible-collections-inspur-sm-add-ad-group-module) – Add active directory group information.
* [add\_ldap\_group](add_ldap_group_module#ansible-collections-inspur-sm-add-ldap-group-module) – Add ldap group information.
* [add\_ldisk](add_ldisk_module#ansible-collections-inspur-sm-add-ldisk-module) – Create logical disk.
* [add\_user](add_user_module#ansible-collections-inspur-sm-add-user-module) – Create user.
* [add\_user\_group](add_user_group_module#ansible-collections-inspur-sm-add-user-group-module) – Create user group.
* [alert\_policy\_info](alert_policy_info_module#ansible-collections-inspur-sm-alert-policy-info-module) – Get alert policy.
* [audit\_log\_info](audit_log_info_module#ansible-collections-inspur-sm-audit-log-info-module) – Get BMC audit log information.
* [auto\_capture\_info](auto_capture_info_module#ansible-collections-inspur-sm-auto-capture-info-module) – Get auto capture screen information.
* [backplane\_info](backplane_info_module#ansible-collections-inspur-sm-backplane-info-module) – Get disk backplane information.
* [backup](backup_module#ansible-collections-inspur-sm-backup-module) – Backup server settings.
* [bios\_export](bios_export_module#ansible-collections-inspur-sm-bios-export-module) – Export BIOS config.
* [bios\_import](bios_import_module#ansible-collections-inspur-sm-bios-import-module) – Import BIOS config.
* [bios\_info](bios_info_module#ansible-collections-inspur-sm-bios-info-module) – Get BIOS setup.
* [bmc\_info](bmc_info_module#ansible-collections-inspur-sm-bmc-info-module) – Get BMC information.
* [boot\_image\_info](boot_image_info_module#ansible-collections-inspur-sm-boot-image-info-module) – Get bmc boot image information.
* [boot\_option\_info](boot_option_info_module#ansible-collections-inspur-sm-boot-option-info-module) – Get BIOS boot options.
* [clear\_audit\_log](clear_audit_log_module#ansible-collections-inspur-sm-clear-audit-log-module) – Clear BMC audit log.
* [clear\_event\_log](clear_event_log_module#ansible-collections-inspur-sm-clear-event-log-module) – Clear event log.
* [clear\_system\_log](clear_system_log_module#ansible-collections-inspur-sm-clear-system-log-module) – Clear BMC system log.
* [collect\_blackbox](collect_blackbox_module#ansible-collections-inspur-sm-collect-blackbox-module) – Collect blackbox log.
* [collect\_log](collect_log_module#ansible-collections-inspur-sm-collect-log-module) – Collect logs.
* [connect\_media\_info](connect_media_info_module#ansible-collections-inspur-sm-connect-media-info-module) – Get remote images redirection information.
* [cpu\_info](cpu_info_module#ansible-collections-inspur-sm-cpu-info-module) – Get CPU information.
* [del\_ad\_group](del_ad_group_module#ansible-collections-inspur-sm-del-ad-group-module) – Delete active directory group information.
* [del\_ldap\_group](del_ldap_group_module#ansible-collections-inspur-sm-del-ldap-group-module) – Delete ldap group information.
* [del\_session](del_session_module#ansible-collections-inspur-sm-del-session-module) – Delete session.
* [del\_user](del_user_module#ansible-collections-inspur-sm-del-user-module) – Delete user.
* [del\_user\_group](del_user_group_module#ansible-collections-inspur-sm-del-user-group-module) – Delete user group.
* [dns\_info](dns_info_module#ansible-collections-inspur-sm-dns-info-module) – Get dns information.
* [download\_auto\_screenshot](download_auto_screenshot_module#ansible-collections-inspur-sm-download-auto-screenshot-module) – Download auto screenshots.
* [download\_manual\_screenshot](download_manual_screenshot_module#ansible-collections-inspur-sm-download-manual-screenshot-module) – Download manual screenshots.
* [edit\_ad](edit_ad_module#ansible-collections-inspur-sm-edit-ad-module) – Set active directory information.
* [edit\_ad\_group](edit_ad_group_module#ansible-collections-inspur-sm-edit-ad-group-module) – Set active directory group information.
* [edit\_alert\_policy](edit_alert_policy_module#ansible-collections-inspur-sm-edit-alert-policy-module) – Set alert policy.
* [edit\_auto\_capture](edit_auto_capture_module#ansible-collections-inspur-sm-edit-auto-capture-module) – Set auto capture screen.
* [edit\_bios](edit_bios_module#ansible-collections-inspur-sm-edit-bios-module) – Set BIOS setup attributes.
* [edit\_boot\_image](edit_boot_image_module#ansible-collections-inspur-sm-edit-boot-image-module) – Set bmc boot image.
* [edit\_boot\_option](edit_boot_option_module#ansible-collections-inspur-sm-edit-boot-option-module) – Set BIOS boot options.
* [edit\_connect\_media](edit_connect_media_module#ansible-collections-inspur-sm-edit-connect-media-module) – Start/Stop virtual media Image
* [edit\_dns](edit_dns_module#ansible-collections-inspur-sm-edit-dns-module) – Set dns information.
* [edit\_event\_log\_policy](edit_event_log_policy_module#ansible-collections-inspur-sm-edit-event-log-policy-module) – Set event log policy.
* [edit\_fan](edit_fan_module#ansible-collections-inspur-sm-edit-fan-module) – Set fan information.
* [edit\_fru](edit_fru_module#ansible-collections-inspur-sm-edit-fru-module) – Set fru settings.
* [edit\_ipv4](edit_ipv4_module#ansible-collections-inspur-sm-edit-ipv4-module) – Set ipv4 information.
* [edit\_ipv6](edit_ipv6_module#ansible-collections-inspur-sm-edit-ipv6-module) – Set ipv6 information.
* [edit\_kvm](edit_kvm_module#ansible-collections-inspur-sm-edit-kvm-module) – Set KVM.
* [edit\_ldap](edit_ldap_module#ansible-collections-inspur-sm-edit-ldap-module) – Set ldap information.
* [edit\_ldap\_group](edit_ldap_group_module#ansible-collections-inspur-sm-edit-ldap-group-module) – Set ldap group information.
* [edit\_ldisk](edit_ldisk_module#ansible-collections-inspur-sm-edit-ldisk-module) – Set logical disk.
* [edit\_log\_setting](edit_log_setting_module#ansible-collections-inspur-sm-edit-log-setting-module) – Set bmc system and audit log setting.
* [edit\_manual\_capture](edit_manual_capture_module#ansible-collections-inspur-sm-edit-manual-capture-module) – Set manual capture screen.
* [edit\_media\_instance](edit_media_instance_module#ansible-collections-inspur-sm-edit-media-instance-module) – Set Virtual Media Instance
* [edit\_ncsi](edit_ncsi_module#ansible-collections-inspur-sm-edit-ncsi-module) – Set ncsi information.
* [edit\_network](edit_network_module#ansible-collections-inspur-sm-edit-network-module) – Set network information.
* [edit\_network\_bond](edit_network_bond_module#ansible-collections-inspur-sm-edit-network-bond-module) – Set network bond.
* [edit\_network\_link](edit_network_link_module#ansible-collections-inspur-sm-edit-network-link-module) – Set network link.
* [edit\_ntp](edit_ntp_module#ansible-collections-inspur-sm-edit-ntp-module) – Set NTP.
* [edit\_pass\_user](edit_pass_user_module#ansible-collections-inspur-sm-edit-pass-user-module) – Change user password.
* [edit\_pdisk](edit_pdisk_module#ansible-collections-inspur-sm-edit-pdisk-module) – Set physical disk.
* [edit\_power\_budget](edit_power_budget_module#ansible-collections-inspur-sm-edit-power-budget-module) – Set power budget information.
* [edit\_power\_restore](edit_power_restore_module#ansible-collections-inspur-sm-edit-power-restore-module) – Set power restore information.
* [edit\_power\_status](edit_power_status_module#ansible-collections-inspur-sm-edit-power-status-module) – Set power status information.
* [edit\_preserve\_config](edit_preserve_config_module#ansible-collections-inspur-sm-edit-preserve-config-module) – Set preserve config.
* [edit\_priv\_user](edit_priv_user_module#ansible-collections-inspur-sm-edit-priv-user-module) – Change user privilege.
* [edit\_psu\_config](edit_psu_config_module#ansible-collections-inspur-sm-edit-psu-config-module) – Set psu config information.
* [edit\_psu\_peak](edit_psu_peak_module#ansible-collections-inspur-sm-edit-psu-peak-module) – Set psu peak information.
* [edit\_restore\_factory\_default](edit_restore_factory_default_module#ansible-collections-inspur-sm-edit-restore-factory-default-module) – Set preserver config.
* [edit\_service](edit_service_module#ansible-collections-inspur-sm-edit-service-module) – Set service settings.
* [edit\_smtp](edit_smtp_module#ansible-collections-inspur-sm-edit-smtp-module) – Set SMTP information.
* [edit\_smtp\_com](edit_smtp_com_module#ansible-collections-inspur-sm-edit-smtp-com-module) – Set SMTP information.
* [edit\_smtp\_dest](edit_smtp_dest_module#ansible-collections-inspur-sm-edit-smtp-dest-module) – Set SMTP information.
* [edit\_snmp](edit_snmp_module#ansible-collections-inspur-sm-edit-snmp-module) – Set snmp.
* [edit\_snmp\_trap](edit_snmp_trap_module#ansible-collections-inspur-sm-edit-snmp-trap-module) – Set snmp trap.
* [edit\_threshold](edit_threshold_module#ansible-collections-inspur-sm-edit-threshold-module) – Set threshold information.
* [edit\_uid](edit_uid_module#ansible-collections-inspur-sm-edit-uid-module) – Set UID.
* [edit\_user\_group](edit_user_group_module#ansible-collections-inspur-sm-edit-user-group-module) – Set user group.
* [edit\_virtual\_media](edit_virtual_media_module#ansible-collections-inspur-sm-edit-virtual-media-module) – Set virtual media.
* [edit\_vlan](edit_vlan_module#ansible-collections-inspur-sm-edit-vlan-module) – Set vlan information.
* [event\_log\_info](event_log_info_module#ansible-collections-inspur-sm-event-log-info-module) – Get event log information.
* [event\_log\_policy\_info](event_log_policy_info_module#ansible-collections-inspur-sm-event-log-policy-info-module) – Get event log policy information.
* [fan\_info](fan_info_module#ansible-collections-inspur-sm-fan-info-module) – Get fan information.
* [fru\_info](fru_info_module#ansible-collections-inspur-sm-fru-info-module) – Get fru information.
* [fw\_version\_info](fw_version_info_module#ansible-collections-inspur-sm-fw-version-info-module) – Get firmware version information.
* [gpu\_info](gpu_info_module#ansible-collections-inspur-sm-gpu-info-module) – Get GPU information.
* [hard\_disk\_info](hard_disk_info_module#ansible-collections-inspur-sm-hard-disk-info-module) – Get hard disk information.
* [kvm\_info](kvm_info_module#ansible-collections-inspur-sm-kvm-info-module) – Get KVM information.
* [ldap\_group](ldap_group_module#ansible-collections-inspur-sm-ldap-group-module) – Manage ldap group information.
* [ldap\_group\_info](ldap_group_info_module#ansible-collections-inspur-sm-ldap-group-info-module) – Get ldap group information.
* [ldap\_info](ldap_info_module#ansible-collections-inspur-sm-ldap-info-module) – Get ldap information.
* [ldisk\_info](ldisk_info_module#ansible-collections-inspur-sm-ldisk-info-module) – Get logical disks information.
* [log\_setting\_info](log_setting_info_module#ansible-collections-inspur-sm-log-setting-info-module) – Get bmc log setting information.
* [media\_instance\_info](media_instance_info_module#ansible-collections-inspur-sm-media-instance-info-module) – Get Virtual Media Instance information.
* [mem\_info](mem_info_module#ansible-collections-inspur-sm-mem-info-module) – Get memory information.
* [ncsi\_info](ncsi_info_module#ansible-collections-inspur-sm-ncsi-info-module) – Get ncsi information.
* [network\_bond\_info](network_bond_info_module#ansible-collections-inspur-sm-network-bond-info-module) – Get network bond information.
* [network\_info](network_info_module#ansible-collections-inspur-sm-network-info-module) – Get network information.
* [network\_link\_info](network_link_info_module#ansible-collections-inspur-sm-network-link-info-module) – Get network link information.
* [ntp\_info](ntp_info_module#ansible-collections-inspur-sm-ntp-info-module) – Get NTP information.
* [pcie\_info](pcie_info_module#ansible-collections-inspur-sm-pcie-info-module) – Get PCIE information.
* [pdisk\_info](pdisk_info_module#ansible-collections-inspur-sm-pdisk-info-module) – Get physical disks information.
* [power\_budget\_info](power_budget_info_module#ansible-collections-inspur-sm-power-budget-info-module) – Get power budget information.
* [power\_consumption\_info](power_consumption_info_module#ansible-collections-inspur-sm-power-consumption-info-module) – Get power consumption information.
* [power\_restore\_info](power_restore_info_module#ansible-collections-inspur-sm-power-restore-info-module) – Get power restore information.
* [power\_status\_info](power_status_info_module#ansible-collections-inspur-sm-power-status-info-module) – Get power status information.
* [preserve\_config\_info](preserve_config_info_module#ansible-collections-inspur-sm-preserve-config-info-module) – Get preserve config information.
* [psu\_config\_info](psu_config_info_module#ansible-collections-inspur-sm-psu-config-info-module) – Get psu config information.
* [psu\_info](psu_info_module#ansible-collections-inspur-sm-psu-info-module) – Get psu information.
* [psu\_peak\_info](psu_peak_info_module#ansible-collections-inspur-sm-psu-peak-info-module) – Get psu peak information.
* [raid\_info](raid_info_module#ansible-collections-inspur-sm-raid-info-module) – Get RAID/HBA card and controller information.
* [reset\_bmc](reset_bmc_module#ansible-collections-inspur-sm-reset-bmc-module) – BMC reset.
* [reset\_kvm](reset_kvm_module#ansible-collections-inspur-sm-reset-kvm-module) – KVM reset.
* [restore](restore_module#ansible-collections-inspur-sm-restore-module) – Restore server settings.
* [self\_test\_info](self_test_info_module#ansible-collections-inspur-sm-self-test-info-module) – Get self test information.
* [sensor\_info](sensor_info_module#ansible-collections-inspur-sm-sensor-info-module) – Get sensor information.
* [server\_info](server_info_module#ansible-collections-inspur-sm-server-info-module) – Get server status information.
* [service\_info](service_info_module#ansible-collections-inspur-sm-service-info-module) – Get service information.
* [session\_info](session_info_module#ansible-collections-inspur-sm-session-info-module) – Get online session information.
* [smtp\_info](smtp_info_module#ansible-collections-inspur-sm-smtp-info-module) – Get SMTP information.
* [snmp\_info](snmp_info_module#ansible-collections-inspur-sm-snmp-info-module) – Get snmp get/set information.
* [snmp\_trap\_info](snmp_trap_info_module#ansible-collections-inspur-sm-snmp-trap-info-module) – Get snmp trap information.
* [system\_log\_info](system_log_info_module#ansible-collections-inspur-sm-system-log-info-module) – Get BMC system log information.
* [temp\_info](temp_info_module#ansible-collections-inspur-sm-temp-info-module) – Get temp information.
* [threshold\_info](threshold_info_module#ansible-collections-inspur-sm-threshold-info-module) – Get threshold information.
* [uid\_info](uid_info_module#ansible-collections-inspur-sm-uid-info-module) – Get UID information.
* [update\_cpld](update_cpld_module#ansible-collections-inspur-sm-update-cpld-module) – Update CPLD.
* [update\_fw](update_fw_module#ansible-collections-inspur-sm-update-fw-module) – Update firmware.
* [user](user_module#ansible-collections-inspur-sm-user-module) – Manage user.
* [user\_group](user_group_module#ansible-collections-inspur-sm-user-group-module) – Manage user group.
* [user\_group\_info](user_group_info_module#ansible-collections-inspur-sm-user-group-info-module) – Get user group information.
* [user\_info](user_info_module#ansible-collections-inspur-sm-user-info-module) – Get user information.
* [virtual\_media\_info](virtual_media_info_module#ansible-collections-inspur-sm-virtual-media-info-module) – Get Virtual Media information.
* [volt\_info](volt_info_module#ansible-collections-inspur-sm-volt-info-module) – Get volt information.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/inspur/sm/index.html>

Ngine\_Io.Cloudstack
====================

 Collection version 2.2.2

 Plugin Index
------------

 These are the plugins in the ngine\_io.cloudstack collection

 ### Inventory Plugins

 * [instance](instance_inventory#ansible-collections-ngine-io-cloudstack-instance-inventory) – Apache CloudStack instance inventory source

 ### Modules

 * [cs\_account](cs_account_module#ansible-collections-ngine-io-cloudstack-cs-account-module) – Manages accounts on Apache CloudStack based clouds.
* [cs\_affinitygroup](cs_affinitygroup_module#ansible-collections-ngine-io-cloudstack-cs-affinitygroup-module) – Manages affinity groups on Apache CloudStack based clouds.
* [cs\_cluster](cs_cluster_module#ansible-collections-ngine-io-cloudstack-cs-cluster-module) – Manages host clusters on Apache CloudStack based clouds.
* [cs\_configuration](cs_configuration_module#ansible-collections-ngine-io-cloudstack-cs-configuration-module) – Manages configuration on Apache CloudStack based clouds.
* [cs\_disk\_offering](cs_disk_offering_module#ansible-collections-ngine-io-cloudstack-cs-disk-offering-module) – Manages disk offerings on Apache CloudStack based clouds.
* [cs\_domain](cs_domain_module#ansible-collections-ngine-io-cloudstack-cs-domain-module) – Manages domains on Apache CloudStack based clouds.
* [cs\_facts](cs_facts_module#ansible-collections-ngine-io-cloudstack-cs-facts-module) – Gather facts on instances of Apache CloudStack based clouds.
* [cs\_firewall](cs_firewall_module#ansible-collections-ngine-io-cloudstack-cs-firewall-module) – Manages firewall rules on Apache CloudStack based clouds.
* [cs\_host](cs_host_module#ansible-collections-ngine-io-cloudstack-cs-host-module) – Manages hosts on Apache CloudStack based clouds.
* [cs\_image\_store](cs_image_store_module#ansible-collections-ngine-io-cloudstack-cs-image-store-module) – Manages CloudStack Image Stores.
* [cs\_instance](cs_instance_module#ansible-collections-ngine-io-cloudstack-cs-instance-module) – Manages instances and virtual machines on Apache CloudStack based clouds.
* [cs\_instance\_info](cs_instance_info_module#ansible-collections-ngine-io-cloudstack-cs-instance-info-module) – Gathering information from the API of instances from Apache CloudStack based clouds.
* [cs\_instance\_nic](cs_instance_nic_module#ansible-collections-ngine-io-cloudstack-cs-instance-nic-module) – Manages NICs of an instance on Apache CloudStack based clouds.
* [cs\_instance\_nic\_secondaryip](cs_instance_nic_secondaryip_module#ansible-collections-ngine-io-cloudstack-cs-instance-nic-secondaryip-module) – Manages secondary IPs of an instance on Apache CloudStack based clouds.
* [cs\_instance\_password\_reset](cs_instance_password_reset_module#ansible-collections-ngine-io-cloudstack-cs-instance-password-reset-module) – Allows resetting VM the default passwords on Apache CloudStack based clouds.
* [cs\_instancegroup](cs_instancegroup_module#ansible-collections-ngine-io-cloudstack-cs-instancegroup-module) – Manages instance groups on Apache CloudStack based clouds.
* [cs\_ip\_address](cs_ip_address_module#ansible-collections-ngine-io-cloudstack-cs-ip-address-module) – Manages public IP address associations on Apache CloudStack based clouds.
* [cs\_iso](cs_iso_module#ansible-collections-ngine-io-cloudstack-cs-iso-module) – Manages ISO images on Apache CloudStack based clouds.
* [cs\_loadbalancer\_rule](cs_loadbalancer_rule_module#ansible-collections-ngine-io-cloudstack-cs-loadbalancer-rule-module) – Manages load balancer rules on Apache CloudStack based clouds.
* [cs\_loadbalancer\_rule\_member](cs_loadbalancer_rule_member_module#ansible-collections-ngine-io-cloudstack-cs-loadbalancer-rule-member-module) – Manages load balancer rule members on Apache CloudStack based clouds.
* [cs\_network](cs_network_module#ansible-collections-ngine-io-cloudstack-cs-network-module) – Manages networks on Apache CloudStack based clouds.
* [cs\_network\_acl](cs_network_acl_module#ansible-collections-ngine-io-cloudstack-cs-network-acl-module) – Manages network access control lists (ACL) on Apache CloudStack based clouds.
* [cs\_network\_acl\_rule](cs_network_acl_rule_module#ansible-collections-ngine-io-cloudstack-cs-network-acl-rule-module) – Manages network access control list (ACL) rules on Apache CloudStack based clouds.
* [cs\_network\_offering](cs_network_offering_module#ansible-collections-ngine-io-cloudstack-cs-network-offering-module) – Manages network offerings on Apache CloudStack based clouds.
* [cs\_physical\_network](cs_physical_network_module#ansible-collections-ngine-io-cloudstack-cs-physical-network-module) – Manages physical networks on Apache CloudStack based clouds.
* [cs\_pod](cs_pod_module#ansible-collections-ngine-io-cloudstack-cs-pod-module) – Manages pods on Apache CloudStack based clouds.
* [cs\_portforward](cs_portforward_module#ansible-collections-ngine-io-cloudstack-cs-portforward-module) – Manages port forwarding rules on Apache CloudStack based clouds.
* [cs\_project](cs_project_module#ansible-collections-ngine-io-cloudstack-cs-project-module) – Manages projects on Apache CloudStack based clouds.
* [cs\_region](cs_region_module#ansible-collections-ngine-io-cloudstack-cs-region-module) – Manages regions on Apache CloudStack based clouds.
* [cs\_resourcelimit](cs_resourcelimit_module#ansible-collections-ngine-io-cloudstack-cs-resourcelimit-module) – Manages resource limits on Apache CloudStack based clouds.
* [cs\_role](cs_role_module#ansible-collections-ngine-io-cloudstack-cs-role-module) – Manages user roles on Apache CloudStack based clouds.
* [cs\_role\_permission](cs_role_permission_module#ansible-collections-ngine-io-cloudstack-cs-role-permission-module) – Manages role permissions on Apache CloudStack based clouds.
* [cs\_router](cs_router_module#ansible-collections-ngine-io-cloudstack-cs-router-module) – Manages routers on Apache CloudStack based clouds.
* [cs\_securitygroup](cs_securitygroup_module#ansible-collections-ngine-io-cloudstack-cs-securitygroup-module) – Manages security groups on Apache CloudStack based clouds.
* [cs\_securitygroup\_rule](cs_securitygroup_rule_module#ansible-collections-ngine-io-cloudstack-cs-securitygroup-rule-module) – Manages security group rules on Apache CloudStack based clouds.
* [cs\_service\_offering](cs_service_offering_module#ansible-collections-ngine-io-cloudstack-cs-service-offering-module) – Manages service offerings on Apache CloudStack based clouds.
* [cs\_snapshot\_policy](cs_snapshot_policy_module#ansible-collections-ngine-io-cloudstack-cs-snapshot-policy-module) – Manages volume snapshot policies on Apache CloudStack based clouds.
* [cs\_sshkeypair](cs_sshkeypair_module#ansible-collections-ngine-io-cloudstack-cs-sshkeypair-module) – Manages SSH keys on Apache CloudStack based clouds.
* [cs\_staticnat](cs_staticnat_module#ansible-collections-ngine-io-cloudstack-cs-staticnat-module) – Manages static NATs on Apache CloudStack based clouds.
* [cs\_storage\_pool](cs_storage_pool_module#ansible-collections-ngine-io-cloudstack-cs-storage-pool-module) – Manages Primary Storage Pools on Apache CloudStack based clouds.
* [cs\_template](cs_template_module#ansible-collections-ngine-io-cloudstack-cs-template-module) – Manages templates on Apache CloudStack based clouds.
* [cs\_traffic\_type](cs_traffic_type_module#ansible-collections-ngine-io-cloudstack-cs-traffic-type-module) – Manages traffic types on CloudStack Physical Networks
* [cs\_user](cs_user_module#ansible-collections-ngine-io-cloudstack-cs-user-module) – Manages users on Apache CloudStack based clouds.
* [cs\_vlan\_ip\_range](cs_vlan_ip_range_module#ansible-collections-ngine-io-cloudstack-cs-vlan-ip-range-module) – Manages VLAN IP ranges on Apache CloudStack based clouds.
* [cs\_vmsnapshot](cs_vmsnapshot_module#ansible-collections-ngine-io-cloudstack-cs-vmsnapshot-module) – Manages VM snapshots on Apache CloudStack based clouds.
* [cs\_volume](cs_volume_module#ansible-collections-ngine-io-cloudstack-cs-volume-module) – Manages volumes on Apache CloudStack based clouds.
* [cs\_vpc](cs_vpc_module#ansible-collections-ngine-io-cloudstack-cs-vpc-module) – Manages VPCs on Apache CloudStack based clouds.
* [cs\_vpc\_offering](cs_vpc_offering_module#ansible-collections-ngine-io-cloudstack-cs-vpc-offering-module) – Manages vpc offerings on Apache CloudStack based clouds.
* [cs\_vpn\_connection](cs_vpn_connection_module#ansible-collections-ngine-io-cloudstack-cs-vpn-connection-module) – Manages site-to-site VPN connections on Apache CloudStack based clouds.
* [cs\_vpn\_customer\_gateway](cs_vpn_customer_gateway_module#ansible-collections-ngine-io-cloudstack-cs-vpn-customer-gateway-module) – Manages site-to-site VPN customer gateway configurations on Apache CloudStack based clouds.
* [cs\_vpn\_gateway](cs_vpn_gateway_module#ansible-collections-ngine-io-cloudstack-cs-vpn-gateway-module) – Manages site-to-site VPN gateways on Apache CloudStack based clouds.
* [cs\_zone](cs_zone_module#ansible-collections-ngine-io-cloudstack-cs-zone-module) – Manages zones on Apache CloudStack based clouds.
* [cs\_zone\_info](cs_zone_info_module#ansible-collections-ngine-io-cloudstack-cs-zone-info-module) – Gathering information about zones from Apache CloudStack based clouds.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ngine_io/cloudstack/index.html>

Netapp.Aws
==========

 Collection version 21.6.0

 Plugin Index
------------

 These are the plugins in the netapp.aws collection

 ### Modules

 * [aws\_netapp\_cvs\_active\_directory](aws_netapp_cvs_active_directory_module#ansible-collections-netapp-aws-aws-netapp-cvs-active-directory-module) – NetApp AWS CloudVolumes Service Manage Active Directory.
* [aws\_netapp\_cvs\_filesystems](aws_netapp_cvs_filesystems_module#ansible-collections-netapp-aws-aws-netapp-cvs-filesystems-module) – NetApp AWS Cloud Volumes Service Manage FileSystem.
* [aws\_netapp\_cvs\_pool](aws_netapp_cvs_pool_module#ansible-collections-netapp-aws-aws-netapp-cvs-pool-module) – NetApp AWS Cloud Volumes Service Manage Pools.
* [aws\_netapp\_cvs\_snapshots](aws_netapp_cvs_snapshots_module#ansible-collections-netapp-aws-aws-netapp-cvs-snapshots-module) – NetApp AWS Cloud Volumes Service Manage Snapshots.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/netapp/aws/index.html>

Netapp.Cloudmanager
===================

 Collection version 21.11.0

 Plugin Index
------------

 These are the plugins in the netapp.cloudmanager collection

 ### Modules

 * [na\_cloudmanager\_aggregate](na_cloudmanager_aggregate_module#ansible-collections-netapp-cloudmanager-na-cloudmanager-aggregate-module) – NetApp Cloud Manager Aggregate
* [na\_cloudmanager\_cifs\_server](na_cloudmanager_cifs_server_module#ansible-collections-netapp-cloudmanager-na-cloudmanager-cifs-server-module) – NetApp Cloud Manager cifs server
* [na\_cloudmanager\_connector\_aws](na_cloudmanager_connector_aws_module#ansible-collections-netapp-cloudmanager-na-cloudmanager-connector-aws-module) – NetApp Cloud Manager connector for AWS
* [na\_cloudmanager\_connector\_azure](na_cloudmanager_connector_azure_module#ansible-collections-netapp-cloudmanager-na-cloudmanager-connector-azure-module) – NetApp Cloud Manager connector for Azure.
* [na\_cloudmanager\_connector\_gcp](na_cloudmanager_connector_gcp_module#ansible-collections-netapp-cloudmanager-na-cloudmanager-connector-gcp-module) – NetApp Cloud Manager connector for GCP.
* [na\_cloudmanager\_cvo\_aws](na_cloudmanager_cvo_aws_module#ansible-collections-netapp-cloudmanager-na-cloudmanager-cvo-aws-module) – NetApp Cloud Manager CVO for AWS
* [na\_cloudmanager\_cvo\_azure](na_cloudmanager_cvo_azure_module#ansible-collections-netapp-cloudmanager-na-cloudmanager-cvo-azure-module) – NetApp Cloud Manager CVO/working environment in single or HA mode for Azure.
* [na\_cloudmanager\_cvo\_gcp](na_cloudmanager_cvo_gcp_module#ansible-collections-netapp-cloudmanager-na-cloudmanager-cvo-gcp-module) – NetApp Cloud Manager CVO for GCP
* [na\_cloudmanager\_info](na_cloudmanager_info_module#ansible-collections-netapp-cloudmanager-na-cloudmanager-info-module) – NetApp Cloud Manager info
* [na\_cloudmanager\_nss\_account](na_cloudmanager_nss_account_module#ansible-collections-netapp-cloudmanager-na-cloudmanager-nss-account-module) – NetApp Cloud Manager nss account
* [na\_cloudmanager\_snapmirror](na_cloudmanager_snapmirror_module#ansible-collections-netapp-cloudmanager-na-cloudmanager-snapmirror-module) – NetApp Cloud Manager SnapMirror
* [na\_cloudmanager\_volume](na_cloudmanager_volume_module#ansible-collections-netapp-cloudmanager-na-cloudmanager-volume-module) – NetApp Cloud Manager volume

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/netapp/cloudmanager/index.html>

Netapp.Elementsw
================

 Collection version 21.6.1

 Plugin Index
------------

 These are the plugins in the netapp.elementsw collection

 ### Modules

 * [na\_elementsw\_access\_group](na_elementsw_access_group_module#ansible-collections-netapp-elementsw-na-elementsw-access-group-module) – NetApp Element Software Manage Access Groups
* [na\_elementsw\_access\_group\_volumes](na_elementsw_access_group_volumes_module#ansible-collections-netapp-elementsw-na-elementsw-access-group-volumes-module) – NetApp Element Software Add/Remove Volumes to/from Access Group
* [na\_elementsw\_account](na_elementsw_account_module#ansible-collections-netapp-elementsw-na-elementsw-account-module) – NetApp Element Software Manage Accounts
* [na\_elementsw\_admin\_users](na_elementsw_admin_users_module#ansible-collections-netapp-elementsw-na-elementsw-admin-users-module) – NetApp Element Software Manage Admin Users
* [na\_elementsw\_backup](na_elementsw_backup_module#ansible-collections-netapp-elementsw-na-elementsw-backup-module) – NetApp Element Software Create Backups
* [na\_elementsw\_check\_connections](na_elementsw_check_connections_module#ansible-collections-netapp-elementsw-na-elementsw-check-connections-module) – NetApp Element Software Check connectivity to MVIP and SVIP.
* [na\_elementsw\_cluster](na_elementsw_cluster_module#ansible-collections-netapp-elementsw-na-elementsw-cluster-module) – NetApp Element Software Create Cluster
* [na\_elementsw\_cluster\_config](na_elementsw_cluster_config_module#ansible-collections-netapp-elementsw-na-elementsw-cluster-config-module) – Configure Element SW Cluster
* [na\_elementsw\_cluster\_pair](na_elementsw_cluster_pair_module#ansible-collections-netapp-elementsw-na-elementsw-cluster-pair-module) – NetApp Element Software Manage Cluster Pair
* [na\_elementsw\_cluster\_snmp](na_elementsw_cluster_snmp_module#ansible-collections-netapp-elementsw-na-elementsw-cluster-snmp-module) – Configure Element SW Cluster SNMP
* [na\_elementsw\_drive](na_elementsw_drive_module#ansible-collections-netapp-elementsw-na-elementsw-drive-module) – NetApp Element Software Manage Node Drives
* [na\_elementsw\_info](na_elementsw_info_module#ansible-collections-netapp-elementsw-na-elementsw-info-module) – NetApp Element Software Info
* [na\_elementsw\_initiators](na_elementsw_initiators_module#ansible-collections-netapp-elementsw-na-elementsw-initiators-module) – Manage Element SW initiators
* [na\_elementsw\_ldap](na_elementsw_ldap_module#ansible-collections-netapp-elementsw-na-elementsw-ldap-module) – NetApp Element Software Manage ldap admin users
* [na\_elementsw\_network\_interfaces](na_elementsw_network_interfaces_module#ansible-collections-netapp-elementsw-na-elementsw-network-interfaces-module) – NetApp Element Software Configure Node Network Interfaces
* [na\_elementsw\_node](na_elementsw_node_module#ansible-collections-netapp-elementsw-na-elementsw-node-module) – NetApp Element Software Node Operation
* [na\_elementsw\_qos\_policy](na_elementsw_qos_policy_module#ansible-collections-netapp-elementsw-na-elementsw-qos-policy-module) – NetApp Element Software create/modify/rename/delete QOS Policy
* [na\_elementsw\_snapshot](na_elementsw_snapshot_module#ansible-collections-netapp-elementsw-na-elementsw-snapshot-module) – NetApp Element Software Manage Snapshots
* [na\_elementsw\_snapshot\_restore](na_elementsw_snapshot_restore_module#ansible-collections-netapp-elementsw-na-elementsw-snapshot-restore-module) – NetApp Element Software Restore Snapshot
* [na\_elementsw\_snapshot\_schedule](na_elementsw_snapshot_schedule_module#ansible-collections-netapp-elementsw-na-elementsw-snapshot-schedule-module) – NetApp Element Software Snapshot Schedules
* [na\_elementsw\_vlan](na_elementsw_vlan_module#ansible-collections-netapp-elementsw-na-elementsw-vlan-module) – NetApp Element Software Manage VLAN
* [na\_elementsw\_volume](na_elementsw_volume_module#ansible-collections-netapp-elementsw-na-elementsw-volume-module) – NetApp Element Software Manage Volumes
* [na\_elementsw\_volume\_clone](na_elementsw_volume_clone_module#ansible-collections-netapp-elementsw-na-elementsw-volume-clone-module) – NetApp Element Software Create Volume Clone
* [na\_elementsw\_volume\_pair](na_elementsw_volume_pair_module#ansible-collections-netapp-elementsw-na-elementsw-volume-pair-module) – NetApp Element Software Volume Pair

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/netapp/elementsw/index.html>

Netapp.Um\_Info
===============

 Collection version 21.7.0

 Plugin Index
------------

 These are the plugins in the netapp.um\_info collection

 ### Modules

 * [na\_um\_aggregates\_info](na_um_aggregates_info_module#ansible-collections-netapp-um-info-na-um-aggregates-info-module) – NetApp Unified Manager list aggregates.
* [na\_um\_clusters\_info](na_um_clusters_info_module#ansible-collections-netapp-um-info-na-um-clusters-info-module) – NetApp Unified Manager list cluster.
* [na\_um\_nodes\_info](na_um_nodes_info_module#ansible-collections-netapp-um-info-na-um-nodes-info-module) – NetApp Unified Manager list nodes.
* [na\_um\_svms\_info](na_um_svms_info_module#ansible-collections-netapp-um-info-na-um-svms-info-module) – NetApp Unified Manager list svms.
* [na\_um\_volumes\_info](na_um_volumes_info_module#ansible-collections-netapp-um-info-na-um-volumes-info-module) – NetApp Unified Manager list volumes.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/netapp/um_info/index.html>

Netbox.Netbox
=============

 Collection version 3.3.0

 Plugin Index
------------

 These are the plugins in the netbox.netbox collection

 ### Inventory Plugins

 * [nb\_inventory](nb_inventory_inventory#ansible-collections-netbox-netbox-nb-inventory-inventory) – NetBox inventory source

 ### Lookup Plugins

 * [nb\_lookup](nb_lookup_lookup#ansible-collections-netbox-netbox-nb-lookup-lookup) – Queries and returns elements from Netbox

 ### Modules

 * [netbox\_aggregate](netbox_aggregate_module#ansible-collections-netbox-netbox-netbox-aggregate-module) – Creates or removes aggregates from Netbox
* [netbox\_cable](netbox_cable_module#ansible-collections-netbox-netbox-netbox-cable-module) – Create, update or delete cables within Netbox
* [netbox\_circuit](netbox_circuit_module#ansible-collections-netbox-netbox-netbox-circuit-module) – Create, update or delete circuits within Netbox
* [netbox\_circuit\_termination](netbox_circuit_termination_module#ansible-collections-netbox-netbox-netbox-circuit-termination-module) – Create, update or delete circuit terminations within Netbox
* [netbox\_circuit\_type](netbox_circuit_type_module#ansible-collections-netbox-netbox-netbox-circuit-type-module) – Create, update or delete circuit types within Netbox
* [netbox\_cluster](netbox_cluster_module#ansible-collections-netbox-netbox-netbox-cluster-module) – Create, update or delete clusters within Netbox
* [netbox\_cluster\_group](netbox_cluster_group_module#ansible-collections-netbox-netbox-netbox-cluster-group-module) – Create, update or delete cluster groups within Netbox
* [netbox\_cluster\_type](netbox_cluster_type_module#ansible-collections-netbox-netbox-netbox-cluster-type-module) – Create, update or delete cluster types within Netbox
* [netbox\_config\_context](netbox_config_context_module#ansible-collections-netbox-netbox-netbox-config-context-module) – Creates, updates or deletes configuration contexts within Netbox
* [netbox\_console\_port](netbox_console_port_module#ansible-collections-netbox-netbox-netbox-console-port-module) – Create, update or delete console ports within Netbox
* [netbox\_console\_port\_template](netbox_console_port_template_module#ansible-collections-netbox-netbox-netbox-console-port-template-module) – Create, update or delete console port templates within Netbox
* [netbox\_console\_server\_port](netbox_console_server_port_module#ansible-collections-netbox-netbox-netbox-console-server-port-module) – Create, update or delete console server ports within Netbox
* [netbox\_console\_server\_port\_template](netbox_console_server_port_template_module#ansible-collections-netbox-netbox-netbox-console-server-port-template-module) – Create, update or delete console server port templates within Netbox
* [netbox\_device](netbox_device_module#ansible-collections-netbox-netbox-netbox-device-module) – Create, update or delete devices within Netbox
* [netbox\_device\_bay](netbox_device_bay_module#ansible-collections-netbox-netbox-netbox-device-bay-module) – Create, update or delete device bays within Netbox
* [netbox\_device\_bay\_template](netbox_device_bay_template_module#ansible-collections-netbox-netbox-netbox-device-bay-template-module) – Create, update or delete device bay templates within Netbox
* [netbox\_device\_interface](netbox_device_interface_module#ansible-collections-netbox-netbox-netbox-device-interface-module) – Creates or removes interfaces on devices from Netbox
* [netbox\_device\_interface\_template](netbox_device_interface_template_module#ansible-collections-netbox-netbox-netbox-device-interface-template-module) – Creates or removes interfaces on devices from Netbox
* [netbox\_device\_role](netbox_device_role_module#ansible-collections-netbox-netbox-netbox-device-role-module) – Create, update or delete devices roles within Netbox
* [netbox\_device\_type](netbox_device_type_module#ansible-collections-netbox-netbox-netbox-device-type-module) – Create, update or delete device types within Netbox
* [netbox\_front\_port](netbox_front_port_module#ansible-collections-netbox-netbox-netbox-front-port-module) – Create, update or delete front ports within Netbox
* [netbox\_front\_port\_template](netbox_front_port_template_module#ansible-collections-netbox-netbox-netbox-front-port-template-module) – Create, update or delete front port templates within Netbox
* [netbox\_inventory\_item](netbox_inventory_item_module#ansible-collections-netbox-netbox-netbox-inventory-item-module) – Creates or removes inventory items from Netbox
* [netbox\_ip\_address](netbox_ip_address_module#ansible-collections-netbox-netbox-netbox-ip-address-module) – Creates or removes IP addresses from Netbox
* [netbox\_ipam\_role](netbox_ipam_role_module#ansible-collections-netbox-netbox-netbox-ipam-role-module) – Creates or removes ipam roles from Netbox
* [netbox\_location](netbox_location_module#ansible-collections-netbox-netbox-netbox-location-module) – Create, update or delete locations within NetBox
* [netbox\_manufacturer](netbox_manufacturer_module#ansible-collections-netbox-netbox-netbox-manufacturer-module) – Create or delete manufacturers within Netbox
* [netbox\_platform](netbox_platform_module#ansible-collections-netbox-netbox-netbox-platform-module) – Create or delete platforms within Netbox
* [netbox\_power\_feed](netbox_power_feed_module#ansible-collections-netbox-netbox-netbox-power-feed-module) – Create, update or delete power feeds within Netbox
* [netbox\_power\_outlet](netbox_power_outlet_module#ansible-collections-netbox-netbox-netbox-power-outlet-module) – Create, update or delete power outlets within Netbox
* [netbox\_power\_outlet\_template](netbox_power_outlet_template_module#ansible-collections-netbox-netbox-netbox-power-outlet-template-module) – Create, update or delete power outlet templates within Netbox
* [netbox\_power\_panel](netbox_power_panel_module#ansible-collections-netbox-netbox-netbox-power-panel-module) – Create, update or delete power panels within Netbox
* [netbox\_power\_port](netbox_power_port_module#ansible-collections-netbox-netbox-netbox-power-port-module) – Create, update or delete power ports within Netbox
* [netbox\_power\_port\_template](netbox_power_port_template_module#ansible-collections-netbox-netbox-netbox-power-port-template-module) – Create, update or delete power port templates within Netbox
* [netbox\_prefix](netbox_prefix_module#ansible-collections-netbox-netbox-netbox-prefix-module) – Creates or removes prefixes from Netbox
* [netbox\_provider](netbox_provider_module#ansible-collections-netbox-netbox-netbox-provider-module) – Create, update or delete providers within Netbox
* [netbox\_rack](netbox_rack_module#ansible-collections-netbox-netbox-netbox-rack-module) – Create, update or delete racks within Netbox
* [netbox\_rack\_group](netbox_rack_group_module#ansible-collections-netbox-netbox-netbox-rack-group-module) – Create, update or delete racks groups within Netbox
* [netbox\_rack\_role](netbox_rack_role_module#ansible-collections-netbox-netbox-netbox-rack-role-module) – Create, update or delete racks roles within Netbox
* [netbox\_rear\_port](netbox_rear_port_module#ansible-collections-netbox-netbox-netbox-rear-port-module) – Create, update or delete rear ports within Netbox
* [netbox\_rear\_port\_template](netbox_rear_port_template_module#ansible-collections-netbox-netbox-netbox-rear-port-template-module) – Create, update or delete rear port templates within Netbox
* [netbox\_region](netbox_region_module#ansible-collections-netbox-netbox-netbox-region-module) – Creates or removes regions from Netbox
* [netbox\_rir](netbox_rir_module#ansible-collections-netbox-netbox-netbox-rir-module) – Create, update or delete RIRs within Netbox
* [netbox\_route\_target](netbox_route_target_module#ansible-collections-netbox-netbox-netbox-route-target-module) – Creates or removes route targets from Netbox
* [netbox\_service](netbox_service_module#ansible-collections-netbox-netbox-netbox-service-module) – Creates or removes service from Netbox
* [netbox\_site](netbox_site_module#ansible-collections-netbox-netbox-netbox-site-module) – Creates or removes sites from Netbox
* [netbox\_site\_group](netbox_site_group_module#ansible-collections-netbox-netbox-netbox-site-group-module) – Create, update, or delete site groups within NetBox
* [netbox\_tag](netbox_tag_module#ansible-collections-netbox-netbox-netbox-tag-module) – Creates or removes tags from Netbox
* [netbox\_tenant](netbox_tenant_module#ansible-collections-netbox-netbox-netbox-tenant-module) – Creates or removes tenants from Netbox
* [netbox\_tenant\_group](netbox_tenant_group_module#ansible-collections-netbox-netbox-netbox-tenant-group-module) – Creates or removes tenant groups from Netbox
* [netbox\_virtual\_chassis](netbox_virtual_chassis_module#ansible-collections-netbox-netbox-netbox-virtual-chassis-module) – Create, update or delete virtual chassis within Netbox
* [netbox\_virtual\_machine](netbox_virtual_machine_module#ansible-collections-netbox-netbox-netbox-virtual-machine-module) – Create, update or delete virtual\_machines within Netbox
* [netbox\_vlan](netbox_vlan_module#ansible-collections-netbox-netbox-netbox-vlan-module) – Create, update or delete vlans within Netbox
* [netbox\_vlan\_group](netbox_vlan_group_module#ansible-collections-netbox-netbox-netbox-vlan-group-module) – Create, update or delete vlans groups within Netbox
* [netbox\_vm\_interface](netbox_vm_interface_module#ansible-collections-netbox-netbox-netbox-vm-interface-module) – Creates or removes interfaces from virtual machines in Netbox
* [netbox\_vrf](netbox_vrf_module#ansible-collections-netbox-netbox-netbox-vrf-module) – Create, update or delete vrfs within Netbox

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/netbox/netbox/index.html>

Ngine\_Io.Exoscale
==================

 Collection version 1.0.0

 Plugin Index
------------

 These are the plugins in the ngine\_io.exoscale collection

 ### Modules

 * [exo\_dns\_domain](exo_dns_domain_module#ansible-collections-ngine-io-exoscale-exo-dns-domain-module) – Manages domain records on Exoscale DNS API.
* [exo\_dns\_record](exo_dns_record_module#ansible-collections-ngine-io-exoscale-exo-dns-record-module) – Manages DNS records on Exoscale DNS.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ngine_io/exoscale/index.html>

Netapp.Ontap
============

 Collection version 21.12.0

 Plugin Index
------------

 These are the plugins in the netapp.ontap collection

 ### Modules

 * [na\_ontap\_active\_directory](na_ontap_active_directory_module#ansible-collections-netapp-ontap-na-ontap-active-directory-module) – NetApp ONTAP configure active directory
* [na\_ontap\_aggregate](na_ontap_aggregate_module#ansible-collections-netapp-ontap-na-ontap-aggregate-module) – NetApp ONTAP manage aggregates.
* [na\_ontap\_autosupport](na_ontap_autosupport_module#ansible-collections-netapp-ontap-na-ontap-autosupport-module) – NetApp ONTAP autosupport
* [na\_ontap\_autosupport\_invoke](na_ontap_autosupport_invoke_module#ansible-collections-netapp-ontap-na-ontap-autosupport-invoke-module) – NetApp ONTAP send AutoSupport message
* [na\_ontap\_broadcast\_domain](na_ontap_broadcast_domain_module#ansible-collections-netapp-ontap-na-ontap-broadcast-domain-module) – NetApp ONTAP manage broadcast domains.
* [na\_ontap\_broadcast\_domain\_ports](na_ontap_broadcast_domain_ports_module#ansible-collections-netapp-ontap-na-ontap-broadcast-domain-ports-module) – NetApp ONTAP manage broadcast domain ports
* [na\_ontap\_cg\_snapshot](na_ontap_cg_snapshot_module#ansible-collections-netapp-ontap-na-ontap-cg-snapshot-module) – NetApp ONTAP manage consistency group snapshot
* [na\_ontap\_cifs](na_ontap_cifs_module#ansible-collections-netapp-ontap-na-ontap-cifs-module) – NetApp ONTAP Manage cifs-share
* [na\_ontap\_cifs\_acl](na_ontap_cifs_acl_module#ansible-collections-netapp-ontap-na-ontap-cifs-acl-module) – NetApp ONTAP manage cifs-share-access-control
* [na\_ontap\_cifs\_local\_group\_member](na_ontap_cifs_local_group_member_module#ansible-collections-netapp-ontap-na-ontap-cifs-local-group-member-module) – NetApp Ontap - Add or remove CIFS local group member
* [na\_ontap\_cifs\_local\_user\_modify](na_ontap_cifs_local_user_modify_module#ansible-collections-netapp-ontap-na-ontap-cifs-local-user-modify-module) – NetApp ONTAP modify local CIFS user.
* [na\_ontap\_cifs\_local\_user\_set\_password](na_ontap_cifs_local_user_set_password_module#ansible-collections-netapp-ontap-na-ontap-cifs-local-user-set-password-module) – NetApp ONTAP set local CIFS user password
* [na\_ontap\_cifs\_server](na_ontap_cifs_server_module#ansible-collections-netapp-ontap-na-ontap-cifs-server-module) – NetApp ONTAP CIFS server configuration
* [na\_ontap\_cluster](na_ontap_cluster_module#ansible-collections-netapp-ontap-na-ontap-cluster-module) – NetApp ONTAP cluster - create a cluster and add/remove nodes.
* [na\_ontap\_cluster\_ha](na_ontap_cluster_ha_module#ansible-collections-netapp-ontap-na-ontap-cluster-ha-module) – NetApp ONTAP Manage HA status for cluster
* [na\_ontap\_cluster\_peer](na_ontap_cluster_peer_module#ansible-collections-netapp-ontap-na-ontap-cluster-peer-module) – NetApp ONTAP Manage Cluster peering
* [na\_ontap\_command](na_ontap_command_module#ansible-collections-netapp-ontap-na-ontap-command-module) – NetApp ONTAP Run any cli command, the username provided needs to have console login permission.
* [na\_ontap\_debug](na_ontap_debug_module#ansible-collections-netapp-ontap-na-ontap-debug-module) – NetApp ONTAP Debug netapp-lib import and connection.
* [na\_ontap\_disk\_options](na_ontap_disk_options_module#ansible-collections-netapp-ontap-na-ontap-disk-options-module) – NetApp ONTAP modify storage disk options
* [na\_ontap\_disks](na_ontap_disks_module#ansible-collections-netapp-ontap-na-ontap-disks-module) – NetApp ONTAP Assign disks to nodes
* [na\_ontap\_dns](na_ontap_dns_module#ansible-collections-netapp-ontap-na-ontap-dns-module) – NetApp ONTAP Create, delete, modify DNS servers.
* [na\_ontap\_domain\_tunnel](na_ontap_domain_tunnel_module#ansible-collections-netapp-ontap-na-ontap-domain-tunnel-module) – NetApp ONTAP domain tunnel
* [na\_ontap\_efficiency\_policy](na_ontap_efficiency_policy_module#ansible-collections-netapp-ontap-na-ontap-efficiency-policy-module) – NetApp ONTAP manage efficiency policies (sis policies)
* [na\_ontap\_export\_policy](na_ontap_export_policy_module#ansible-collections-netapp-ontap-na-ontap-export-policy-module) – NetApp ONTAP manage export-policy
* [na\_ontap\_export\_policy\_rule](na_ontap_export_policy_rule_module#ansible-collections-netapp-ontap-na-ontap-export-policy-rule-module) – NetApp ONTAP manage export policy rules
* [na\_ontap\_fcp](na_ontap_fcp_module#ansible-collections-netapp-ontap-na-ontap-fcp-module) – NetApp ONTAP Start, Stop and Enable FCP services.
* [na\_ontap\_fdsd](na_ontap_fdsd_module#ansible-collections-netapp-ontap-na-ontap-fdsd-module) – NetApp ONTAP create or remove a File Directory security descriptor.
* [na\_ontap\_fdsp](na_ontap_fdsp_module#ansible-collections-netapp-ontap-na-ontap-fdsp-module) – NetApp ONTAP create or delete a file directory security policy
* [na\_ontap\_fdspt](na_ontap_fdspt_module#ansible-collections-netapp-ontap-na-ontap-fdspt-module) – NetApp ONTAP create, delete or modify File Directory security policy tasks
* [na\_ontap\_fdss](na_ontap_fdss_module#ansible-collections-netapp-ontap-na-ontap-fdss-module) – NetApp ONTAP File Directory Security Set.
* [na\_ontap\_file\_directory\_policy](na_ontap_file_directory_policy_module#ansible-collections-netapp-ontap-na-ontap-file-directory-policy-module) – NetApp ONTAP create, delete, or modify vserver security file-directory policy
* [na\_ontap\_firewall\_policy](na_ontap_firewall_policy_module#ansible-collections-netapp-ontap-na-ontap-firewall-policy-module) – NetApp ONTAP Manage a firewall policy
* [na\_ontap\_firmware\_upgrade](na_ontap_firmware_upgrade_module#ansible-collections-netapp-ontap-na-ontap-firmware-upgrade-module) – NetApp ONTAP firmware upgrade for SP, shelf, ACP, and disk.
* [na\_ontap\_flexcache](na_ontap_flexcache_module#ansible-collections-netapp-ontap-na-ontap-flexcache-module) – NetApp ONTAP FlexCache - create/delete relationship
* [na\_ontap\_fpolicy\_event](na_ontap_fpolicy_event_module#ansible-collections-netapp-ontap-na-ontap-fpolicy-event-module) – NetApp ONTAP FPolicy policy event configuration
* [na\_ontap\_fpolicy\_ext\_engine](na_ontap_fpolicy_ext_engine_module#ansible-collections-netapp-ontap-na-ontap-fpolicy-ext-engine-module) – NetApp ONTAP fPolicy external engine configuration.
* [na\_ontap\_fpolicy\_policy](na_ontap_fpolicy_policy_module#ansible-collections-netapp-ontap-na-ontap-fpolicy-policy-module) – NetApp ONTAP - Create, delete or modify an FPolicy policy.
* [na\_ontap\_fpolicy\_scope](na_ontap_fpolicy_scope_module#ansible-collections-netapp-ontap-na-ontap-fpolicy-scope-module) – NetApp ONTAP - Create, delete or modify an FPolicy policy scope configuration.
* [na\_ontap\_fpolicy\_status](na_ontap_fpolicy_status_module#ansible-collections-netapp-ontap-na-ontap-fpolicy-status-module) – NetApp ONTAP - Enables or disables the specified fPolicy policy
* [na\_ontap\_igroup](na_ontap_igroup_module#ansible-collections-netapp-ontap-na-ontap-igroup-module) – NetApp ONTAP iSCSI or FC igroup configuration
* [na\_ontap\_igroup\_initiator](na_ontap_igroup_initiator_module#ansible-collections-netapp-ontap-na-ontap-igroup-initiator-module) – NetApp ONTAP igroup initiator configuration
* [na\_ontap\_info](na_ontap_info_module#ansible-collections-netapp-ontap-na-ontap-info-module) – NetApp information gatherer
* [na\_ontap\_interface](na_ontap_interface_module#ansible-collections-netapp-ontap-na-ontap-interface-module) – NetApp ONTAP LIF configuration
* [na\_ontap\_ipspace](na_ontap_ipspace_module#ansible-collections-netapp-ontap-na-ontap-ipspace-module) – NetApp ONTAP Manage an ipspace
* [na\_ontap\_iscsi](na_ontap_iscsi_module#ansible-collections-netapp-ontap-na-ontap-iscsi-module) – NetApp ONTAP manage iSCSI service
* [na\_ontap\_iscsi\_security](na_ontap_iscsi_security_module#ansible-collections-netapp-ontap-na-ontap-iscsi-security-module) – NetApp ONTAP Manage iscsi security.
* [na\_ontap\_job\_schedule](na_ontap_job_schedule_module#ansible-collections-netapp-ontap-na-ontap-job-schedule-module) – NetApp ONTAP Job Schedule
* [na\_ontap\_kerberos\_realm](na_ontap_kerberos_realm_module#ansible-collections-netapp-ontap-na-ontap-kerberos-realm-module) – NetApp ONTAP vserver nfs kerberos realm
* [na\_ontap\_ldap](na_ontap_ldap_module#ansible-collections-netapp-ontap-na-ontap-ldap-module) – NetApp ONTAP LDAP
* [na\_ontap\_ldap\_client](na_ontap_ldap_client_module#ansible-collections-netapp-ontap-na-ontap-ldap-client-module) – NetApp ONTAP LDAP client
* [na\_ontap\_license](na_ontap_license_module#ansible-collections-netapp-ontap-na-ontap-license-module) – NetApp ONTAP protocol and feature licenses
* [na\_ontap\_log\_forward](na_ontap_log_forward_module#ansible-collections-netapp-ontap-na-ontap-log-forward-module) – NetApp ONTAP Log Forward Configuration
* [na\_ontap\_login\_messages](na_ontap_login_messages_module#ansible-collections-netapp-ontap-na-ontap-login-messages-module) – Setup login banner and message of the day
* [na\_ontap\_lun](na_ontap_lun_module#ansible-collections-netapp-ontap-na-ontap-lun-module) – NetApp ONTAP manage LUNs
* [na\_ontap\_lun\_copy](na_ontap_lun_copy_module#ansible-collections-netapp-ontap-na-ontap-lun-copy-module) – NetApp ONTAP copy LUNs
* [na\_ontap\_lun\_map](na_ontap_lun_map_module#ansible-collections-netapp-ontap-na-ontap-lun-map-module) – NetApp ONTAP LUN maps
* [na\_ontap\_lun\_map\_reporting\_nodes](na_ontap_lun_map_reporting_nodes_module#ansible-collections-netapp-ontap-na-ontap-lun-map-reporting-nodes-module) – NetApp ONTAP LUN maps reporting nodes
* [na\_ontap\_mcc\_mediator](na_ontap_mcc_mediator_module#ansible-collections-netapp-ontap-na-ontap-mcc-mediator-module) – NetApp ONTAP Add and Remove MetroCluster Mediator
* [na\_ontap\_metrocluster](na_ontap_metrocluster_module#ansible-collections-netapp-ontap-na-ontap-metrocluster-module) – NetApp ONTAP set up a MetroCluster
* [na\_ontap\_metrocluster\_dr\_group](na_ontap_metrocluster_dr_group_module#ansible-collections-netapp-ontap-na-ontap-metrocluster-dr-group-module) – NetApp ONTAP manage MetroCluster DR Group
* [na\_ontap\_motd](na_ontap_motd_module#ansible-collections-netapp-ontap-na-ontap-motd-module) – Setup motd
* [na\_ontap\_name\_service\_switch](na_ontap_name_service_switch_module#ansible-collections-netapp-ontap-na-ontap-name-service-switch-module) – NetApp ONTAP Manage name service switch
* [na\_ontap\_ndmp](na_ontap_ndmp_module#ansible-collections-netapp-ontap-na-ontap-ndmp-module) – NetApp ONTAP NDMP services configuration
* [na\_ontap\_net\_ifgrp](na_ontap_net_ifgrp_module#ansible-collections-netapp-ontap-na-ontap-net-ifgrp-module) – NetApp Ontap modify network interface group
* [na\_ontap\_net\_port](na_ontap_net_port_module#ansible-collections-netapp-ontap-na-ontap-net-port-module) – NetApp ONTAP network ports.
* [na\_ontap\_net\_routes](na_ontap_net_routes_module#ansible-collections-netapp-ontap-na-ontap-net-routes-module) – NetApp ONTAP network routes
* [na\_ontap\_net\_subnet](na_ontap_net_subnet_module#ansible-collections-netapp-ontap-na-ontap-net-subnet-module) – NetApp ONTAP Create, delete, modify network subnets.
* [na\_ontap\_net\_vlan](na_ontap_net_vlan_module#ansible-collections-netapp-ontap-na-ontap-net-vlan-module) – NetApp ONTAP network VLAN
* [na\_ontap\_nfs](na_ontap_nfs_module#ansible-collections-netapp-ontap-na-ontap-nfs-module) – NetApp ONTAP NFS status
* [na\_ontap\_node](na_ontap_node_module#ansible-collections-netapp-ontap-na-ontap-node-module) – NetApp ONTAP Modify or Rename a node.
* [na\_ontap\_ntfs\_dacl](na_ontap_ntfs_dacl_module#ansible-collections-netapp-ontap-na-ontap-ntfs-dacl-module) – NetApp Ontap create, delate or modify NTFS DACL (discretionary access control list)
* [na\_ontap\_ntfs\_sd](na_ontap_ntfs_sd_module#ansible-collections-netapp-ontap-na-ontap-ntfs-sd-module) – NetApp ONTAP create, delete or modify NTFS security descriptor
* [na\_ontap\_ntp](na_ontap_ntp_module#ansible-collections-netapp-ontap-na-ontap-ntp-module) – NetApp ONTAP NTP server
* [na\_ontap\_nvme](na_ontap_nvme_module#ansible-collections-netapp-ontap-na-ontap-nvme-module) – NetApp ONTAP Manage NVMe Service
* [na\_ontap\_nvme\_namespace](na_ontap_nvme_namespace_module#ansible-collections-netapp-ontap-na-ontap-nvme-namespace-module) – NetApp ONTAP Manage NVME Namespace
* [na\_ontap\_nvme\_subsystem](na_ontap_nvme_subsystem_module#ansible-collections-netapp-ontap-na-ontap-nvme-subsystem-module) – NetApp ONTAP Manage NVME Subsystem
* [na\_ontap\_object\_store](na_ontap_object_store_module#ansible-collections-netapp-ontap-na-ontap-object-store-module) – NetApp ONTAP manage object store config.
* [na\_ontap\_partitions](na_ontap_partitions_module#ansible-collections-netapp-ontap-na-ontap-partitions-module) – NetApp ONTAP Assign partitions and disks to nodes.
* [na\_ontap\_ports](na_ontap_ports_module#ansible-collections-netapp-ontap-na-ontap-ports-module) – NetApp ONTAP add/remove ports
* [na\_ontap\_portset](na_ontap_portset_module#ansible-collections-netapp-ontap-na-ontap-portset-module) – NetApp ONTAP Create/Delete portset
* [na\_ontap\_publickey](na_ontap_publickey_module#ansible-collections-netapp-ontap-na-ontap-publickey-module) – NetApp ONTAP publickey configuration
* [na\_ontap\_qos\_adaptive\_policy\_group](na_ontap_qos_adaptive_policy_group_module#ansible-collections-netapp-ontap-na-ontap-qos-adaptive-policy-group-module) – NetApp ONTAP Adaptive Quality of Service policy group.
* [na\_ontap\_qos\_policy\_group](na_ontap_qos_policy_group_module#ansible-collections-netapp-ontap-na-ontap-qos-policy-group-module) – NetApp ONTAP manage policy group in Quality of Service.
* [na\_ontap\_qtree](na_ontap_qtree_module#ansible-collections-netapp-ontap-na-ontap-qtree-module) – NetApp ONTAP manage qtrees
* [na\_ontap\_quota\_policy](na_ontap_quota_policy_module#ansible-collections-netapp-ontap-na-ontap-quota-policy-module) – NetApp Ontap create, assign, rename or delete quota policy
* [na\_ontap\_quotas](na_ontap_quotas_module#ansible-collections-netapp-ontap-na-ontap-quotas-module) – NetApp ONTAP Quotas
* [na\_ontap\_rest\_cli](na_ontap_rest_cli_module#ansible-collections-netapp-ontap-na-ontap-rest-cli-module) – NetApp ONTAP run any CLI command using REST api/private/cli/
* [na\_ontap\_rest\_info](na_ontap_rest_info_module#ansible-collections-netapp-ontap-na-ontap-rest-info-module) – NetApp ONTAP information gatherer using REST APIs
* [na\_ontap\_restit](na_ontap_restit_module#ansible-collections-netapp-ontap-na-ontap-restit-module) – NetApp ONTAP Run any REST API on ONTAP
* [na\_ontap\_security\_certificates](na_ontap_security_certificates_module#ansible-collections-netapp-ontap-na-ontap-security-certificates-module) – NetApp ONTAP manage security certificates.
* [na\_ontap\_security\_config](na_ontap_security_config_module#ansible-collections-netapp-ontap-na-ontap-security-config-module) – NetApp ONTAP modify security config for SSL.
* [na\_ontap\_security\_key\_manager](na_ontap_security_key_manager_module#ansible-collections-netapp-ontap-na-ontap-security-key-manager-module) – NetApp ONTAP security key manager.
* [na\_ontap\_service\_policy](na_ontap_service_policy_module#ansible-collections-netapp-ontap-na-ontap-service-policy-module) – NetApp ONTAP service policy configuration
* [na\_ontap\_service\_processor\_network](na_ontap_service_processor_network_module#ansible-collections-netapp-ontap-na-ontap-service-processor-network-module) – NetApp ONTAP service processor network
* [na\_ontap\_snaplock\_clock](na_ontap_snaplock_clock_module#ansible-collections-netapp-ontap-na-ontap-snaplock-clock-module) – NetApp ONTAP Sets the snaplock compliance clock.
* [na\_ontap\_snapmirror](na_ontap_snapmirror_module#ansible-collections-netapp-ontap-na-ontap-snapmirror-module) – NetApp ONTAP or ElementSW Manage SnapMirror
* [na\_ontap\_snapmirror\_policy](na_ontap_snapmirror_policy_module#ansible-collections-netapp-ontap-na-ontap-snapmirror-policy-module) – NetApp ONTAP create, delete or modify SnapMirror policies
* [na\_ontap\_snapshot](na_ontap_snapshot_module#ansible-collections-netapp-ontap-na-ontap-snapshot-module) – NetApp ONTAP manage Snapshots
* [na\_ontap\_snapshot\_policy](na_ontap_snapshot_policy_module#ansible-collections-netapp-ontap-na-ontap-snapshot-policy-module) – NetApp ONTAP manage Snapshot Policy
* [na\_ontap\_snmp](na_ontap_snmp_module#ansible-collections-netapp-ontap-na-ontap-snmp-module) – NetApp ONTAP SNMP community
* [na\_ontap\_snmp\_traphosts](na_ontap_snmp_traphosts_module#ansible-collections-netapp-ontap-na-ontap-snmp-traphosts-module) – NetApp ONTAP SNMP traphosts.
* [na\_ontap\_software\_update](na_ontap_software_update_module#ansible-collections-netapp-ontap-na-ontap-software-update-module) – NetApp ONTAP Update Software
* [na\_ontap\_ssh\_command](na_ontap_ssh_command_module#ansible-collections-netapp-ontap-na-ontap-ssh-command-module) – NetApp ONTAP Run any cli command over plain SSH using paramiko.
* [na\_ontap\_storage\_auto\_giveback](na_ontap_storage_auto_giveback_module#ansible-collections-netapp-ontap-na-ontap-storage-auto-giveback-module) – Enables or disables NetApp ONTAP storage auto giveback for a specified node
* [na\_ontap\_storage\_failover](na_ontap_storage_failover_module#ansible-collections-netapp-ontap-na-ontap-storage-failover-module) – Enables or disables NetApp Ontap storage failover for a specified node
* [na\_ontap\_svm](na_ontap_svm_module#ansible-collections-netapp-ontap-na-ontap-svm-module) – NetApp ONTAP SVM
* [na\_ontap\_svm\_options](na_ontap_svm_options_module#ansible-collections-netapp-ontap-na-ontap-svm-options-module) – NetApp ONTAP Modify SVM Options
* [na\_ontap\_ucadapter](na_ontap_ucadapter_module#ansible-collections-netapp-ontap-na-ontap-ucadapter-module) – NetApp ONTAP UC adapter configuration
* [na\_ontap\_unix\_group](na_ontap_unix_group_module#ansible-collections-netapp-ontap-na-ontap-unix-group-module) – NetApp ONTAP UNIX Group
* [na\_ontap\_unix\_user](na_ontap_unix_user_module#ansible-collections-netapp-ontap-na-ontap-unix-user-module) – NetApp ONTAP UNIX users
* [na\_ontap\_user](na_ontap_user_module#ansible-collections-netapp-ontap-na-ontap-user-module) – NetApp ONTAP user configuration and management
* [na\_ontap\_user\_role](na_ontap_user_role_module#ansible-collections-netapp-ontap-na-ontap-user-role-module) – NetApp ONTAP user role configuration and management
* [na\_ontap\_volume](na_ontap_volume_module#ansible-collections-netapp-ontap-na-ontap-volume-module) – NetApp ONTAP manage volumes.
* [na\_ontap\_volume\_autosize](na_ontap_volume_autosize_module#ansible-collections-netapp-ontap-na-ontap-volume-autosize-module) – NetApp ONTAP manage volume autosize
* [na\_ontap\_volume\_clone](na_ontap_volume_clone_module#ansible-collections-netapp-ontap-na-ontap-volume-clone-module) – NetApp ONTAP manage volume clones.
* [na\_ontap\_volume\_efficiency](na_ontap_volume_efficiency_module#ansible-collections-netapp-ontap-na-ontap-volume-efficiency-module) – NetApp ONTAP enables, disables or modifies volume efficiency
* [na\_ontap\_volume\_snaplock](na_ontap_volume_snaplock_module#ansible-collections-netapp-ontap-na-ontap-volume-snaplock-module) – NetApp ONTAP manage volume snaplock retention.
* [na\_ontap\_vscan](na_ontap_vscan_module#ansible-collections-netapp-ontap-na-ontap-vscan-module) – NetApp ONTAP Vscan enable/disable.
* [na\_ontap\_vscan\_on\_access\_policy](na_ontap_vscan_on_access_policy_module#ansible-collections-netapp-ontap-na-ontap-vscan-on-access-policy-module) – NetApp ONTAP Vscan on access policy configuration.
* [na\_ontap\_vscan\_on\_demand\_task](na_ontap_vscan_on_demand_task_module#ansible-collections-netapp-ontap-na-ontap-vscan-on-demand-task-module) – NetApp ONTAP Vscan on demand task configuration.
* [na\_ontap\_vscan\_scanner\_pool](na_ontap_vscan_scanner_pool_module#ansible-collections-netapp-ontap-na-ontap-vscan-scanner-pool-module) – NetApp ONTAP Vscan Scanner Pools Configuration.
* [na\_ontap\_vserver\_cifs\_security](na_ontap_vserver_cifs_security_module#ansible-collections-netapp-ontap-na-ontap-vserver-cifs-security-module) – NetApp ONTAP vserver CIFS security modification
* [na\_ontap\_vserver\_peer](na_ontap_vserver_peer_module#ansible-collections-netapp-ontap-na-ontap-vserver-peer-module) – NetApp ONTAP Vserver peering
* [na\_ontap\_wait\_for\_condition](na_ontap_wait_for_condition_module#ansible-collections-netapp-ontap-na-ontap-wait-for-condition-module) – NetApp ONTAP wait\_for\_condition. Loop over a get status request until a condition is met.
* [na\_ontap\_wwpn\_alias](na_ontap_wwpn_alias_module#ansible-collections-netapp-ontap-na-ontap-wwpn-alias-module) – NetApp ONTAP set FCP WWPN Alias
* [na\_ontap\_zapit](na_ontap_zapit_module#ansible-collections-netapp-ontap-na-ontap-zapit-module) – NetApp ONTAP Run any ZAPI on ONTAP

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/netapp/ontap/index.html>

Openvswitch.Openvswitch
=======================

 Collection version 2.0.2

 Plugin Index
------------

 These are the plugins in the openvswitch.openvswitch collection

 ### Modules

 * [openvswitch\_bond](openvswitch_bond_module#ansible-collections-openvswitch-openvswitch-openvswitch-bond-module) – Manage Open vSwitch bonds
* [openvswitch\_bridge](openvswitch_bridge_module#ansible-collections-openvswitch-openvswitch-openvswitch-bridge-module) – Manage Open vSwitch bridges
* [openvswitch\_db](openvswitch_db_module#ansible-collections-openvswitch-openvswitch-openvswitch-db-module) – Configure open vswitch database.
* [openvswitch\_port](openvswitch_port_module#ansible-collections-openvswitch-openvswitch-openvswitch-port-module) – Manage Open vSwitch ports

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/openvswitch/openvswitch/index.html>

Purestorage.Flasharray
======================

 Collection version 1.11.0

 Plugin Index
------------

 These are the plugins in the purestorage.flasharray collection

 ### Modules

 * [purefa\_ad](purefa_ad_module#ansible-collections-purestorage-flasharray-purefa-ad-module) – Manage FlashArray Active Directory Account
* [purefa\_alert](purefa_alert_module#ansible-collections-purestorage-flasharray-purefa-alert-module) – Configure Pure Storage FlashArray alert email settings
* [purefa\_apiclient](purefa_apiclient_module#ansible-collections-purestorage-flasharray-purefa-apiclient-module) – Manage FlashArray API Clients
* [purefa\_arrayname](purefa_arrayname_module#ansible-collections-purestorage-flasharray-purefa-arrayname-module) – Configure Pure Storage FlashArray array name
* [purefa\_banner](purefa_banner_module#ansible-collections-purestorage-flasharray-purefa-banner-module) – Configure Pure Storage FlashArray GUI and SSH MOTD message
* [purefa\_certs](purefa_certs_module#ansible-collections-purestorage-flasharray-purefa-certs-module) – Manage FlashArray SSL Certificates
* [purefa\_connect](purefa_connect_module#ansible-collections-purestorage-flasharray-purefa-connect-module) – Manage replication connections between two FlashArrays
* [purefa\_console](purefa_console_module#ansible-collections-purestorage-flasharray-purefa-console-module) – Enable or Disable Pure Storage FlashArray Console Lock
* [purefa\_directory](purefa_directory_module#ansible-collections-purestorage-flasharray-purefa-directory-module) – Manage FlashArray File System Directories
* [purefa\_dirsnap](purefa_dirsnap_module#ansible-collections-purestorage-flasharray-purefa-dirsnap-module) – Manage FlashArray File System Directory Snapshots
* [purefa\_dns](purefa_dns_module#ansible-collections-purestorage-flasharray-purefa-dns-module) – Configure FlashArray DNS settings
* [purefa\_ds](purefa_ds_module#ansible-collections-purestorage-flasharray-purefa-ds-module) – Configure FlashArray Directory Service
* [purefa\_dsrole](purefa_dsrole_module#ansible-collections-purestorage-flasharray-purefa-dsrole-module) – Configure FlashArray Directory Service Roles
* [purefa\_endpoint](purefa_endpoint_module#ansible-collections-purestorage-flasharray-purefa-endpoint-module) – Manage VMware protocol-endpoints on Pure Storage FlashArrays
* [purefa\_eradication](purefa_eradication_module#ansible-collections-purestorage-flasharray-purefa-eradication-module) – Configure Pure Storage FlashArray Eradication Timer
* [purefa\_eula](purefa_eula_module#ansible-collections-purestorage-flasharray-purefa-eula-module) – Sign Pure Storage FlashArray EULA
* [purefa\_export](purefa_export_module#ansible-collections-purestorage-flasharray-purefa-export-module) – Manage FlashArray File System Exports
* [purefa\_fs](purefa_fs_module#ansible-collections-purestorage-flasharray-purefa-fs-module) – Manage FlashArray File Systems
* [purefa\_hg](purefa_hg_module#ansible-collections-purestorage-flasharray-purefa-hg-module) – Manage hostgroups on Pure Storage FlashArrays
* [purefa\_host](purefa_host_module#ansible-collections-purestorage-flasharray-purefa-host-module) – Manage hosts on Pure Storage FlashArrays
* [purefa\_info](purefa_info_module#ansible-collections-purestorage-flasharray-purefa-info-module) – Collect information from Pure Storage FlashArray
* [purefa\_inventory](purefa_inventory_module#ansible-collections-purestorage-flasharray-purefa-inventory-module) – Collect information from Pure Storage FlashArray
* [purefa\_kmip](purefa_kmip_module#ansible-collections-purestorage-flasharray-purefa-kmip-module) – Manage FlashArray KMIP server objects
* [purefa\_maintenance](purefa_maintenance_module#ansible-collections-purestorage-flasharray-purefa-maintenance-module) – Configure Pure Storage FlashArray Maintence Windows
* [purefa\_network](purefa_network_module#ansible-collections-purestorage-flasharray-purefa-network-module) – Manage network interfaces in a Pure Storage FlashArray
* [purefa\_ntp](purefa_ntp_module#ansible-collections-purestorage-flasharray-purefa-ntp-module) – Configure Pure Storage FlashArray NTP settings
* [purefa\_offload](purefa_offload_module#ansible-collections-purestorage-flasharray-purefa-offload-module) – Create, modify and delete NFS, S3 or Azure offload targets
* [purefa\_pg](purefa_pg_module#ansible-collections-purestorage-flasharray-purefa-pg-module) – Manage protection groups on Pure Storage FlashArrays
* [purefa\_pgsched](purefa_pgsched_module#ansible-collections-purestorage-flasharray-purefa-pgsched-module) – Manage protection groups replication schedules on Pure Storage FlashArrays
* [purefa\_pgsnap](purefa_pgsnap_module#ansible-collections-purestorage-flasharray-purefa-pgsnap-module) – Manage protection group snapshots on Pure Storage FlashArrays
* [purefa\_phonehome](purefa_phonehome_module#ansible-collections-purestorage-flasharray-purefa-phonehome-module) – Enable or Disable Pure Storage FlashArray Phonehome
* [purefa\_pod](purefa_pod_module#ansible-collections-purestorage-flasharray-purefa-pod-module) – Manage AC pods in Pure Storage FlashArrays
* [purefa\_pod\_replica](purefa_pod_replica_module#ansible-collections-purestorage-flasharray-purefa-pod-replica-module) – Manage ActiveDR pod replica links between Pure Storage FlashArrays
* [purefa\_policy](purefa_policy_module#ansible-collections-purestorage-flasharray-purefa-policy-module) – Manage FlashArray File System Policies
* [purefa\_proxy](purefa_proxy_module#ansible-collections-purestorage-flasharray-purefa-proxy-module) – Configure FlashArray phonehome HTTPs proxy settings
* [purefa\_ra](purefa_ra_module#ansible-collections-purestorage-flasharray-purefa-ra-module) – Enable or Disable Pure Storage FlashArray Remote Assist
* [purefa\_smis](purefa_smis_module#ansible-collections-purestorage-flasharray-purefa-smis-module) – Enable or disable FlashArray SMI-S features
* [purefa\_smtp](purefa_smtp_module#ansible-collections-purestorage-flasharray-purefa-smtp-module) – Configure FlashArray SMTP settings
* [purefa\_snap](purefa_snap_module#ansible-collections-purestorage-flasharray-purefa-snap-module) – Manage volume snapshots on Pure Storage FlashArrays
* [purefa\_snmp](purefa_snmp_module#ansible-collections-purestorage-flasharray-purefa-snmp-module) – Configure FlashArray SNMP Managers
* [purefa\_sso](purefa_sso_module#ansible-collections-purestorage-flasharray-purefa-sso-module) – Configure Pure Storage FlashArray Single Sign-On
* [purefa\_subnet](purefa_subnet_module#ansible-collections-purestorage-flasharray-purefa-subnet-module) – Manage network subnets in a Pure Storage FlashArray
* [purefa\_syslog](purefa_syslog_module#ansible-collections-purestorage-flasharray-purefa-syslog-module) – Configure Pure Storage FlashArray syslog settings
* [purefa\_syslog\_settings](purefa_syslog_settings_module#ansible-collections-purestorage-flasharray-purefa-syslog-settings-module) – Manage FlashArray syslog servers settings
* [purefa\_timeout](purefa_timeout_module#ansible-collections-purestorage-flasharray-purefa-timeout-module) – Configure Pure Storage FlashArray GUI idle timeout
* [purefa\_user](purefa_user_module#ansible-collections-purestorage-flasharray-purefa-user-module) – Create, modify or delete FlashArray local user account
* [purefa\_vg](purefa_vg_module#ansible-collections-purestorage-flasharray-purefa-vg-module) – Manage volume groups on Pure Storage FlashArrays
* [purefa\_vlan](purefa_vlan_module#ansible-collections-purestorage-flasharray-purefa-vlan-module) – Manage network VLAN interfaces in a Pure Storage FlashArray
* [purefa\_vnc](purefa_vnc_module#ansible-collections-purestorage-flasharray-purefa-vnc-module) – Enable or Disable VNC port for installed apps
* [purefa\_volume](purefa_volume_module#ansible-collections-purestorage-flasharray-purefa-volume-module) – Manage volumes on Pure Storage FlashArrays
* [purefa\_volume\_tags](purefa_volume_tags_module#ansible-collections-purestorage-flasharray-purefa-volume-tags-module) – Manage volume tags on Pure Storage FlashArrays

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/purestorage/flasharray/index.html>

Servicenow.Servicenow
=====================

 Collection version 1.0.6

 Plugin Index
------------

 These are the plugins in the servicenow.servicenow collection

 ### Inventory Plugins

 * [now](now_inventory#ansible-collections-servicenow-servicenow-now-inventory) – ServiceNow Inventory Plugin

 ### Modules

 * [snow\_record](snow_record_module#ansible-collections-servicenow-servicenow-snow-record-module) – Manage records in ServiceNow
* [snow\_record\_find](snow_record_find_module#ansible-collections-servicenow-servicenow-snow-record-find-module) – Search for multiple records from ServiceNow

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/servicenow/servicenow/index.html>

Theforeman.Foreman
==================

 Collection version 2.2.0

 Plugin Index
------------

 These are the plugins in the theforeman.foreman collection

 ### Callback Plugins

 * [foreman](foreman_callback#ansible-collections-theforeman-foreman-foreman-callback) – Sends events to Foreman

 ### Inventory Plugins

 * [foreman](foreman_inventory#ansible-collections-theforeman-foreman-foreman-inventory) – Foreman inventory source

 ### Modules

 * [activation\_key](activation_key_module#ansible-collections-theforeman-foreman-activation-key-module) – Manage Activation Keys
* [architecture](architecture_module#ansible-collections-theforeman-foreman-architecture-module) – Manage Architectures
* [auth\_source\_ldap](auth_source_ldap_module#ansible-collections-theforeman-foreman-auth-source-ldap-module) – Manage LDAP Authentication Sources
* [bookmark](bookmark_module#ansible-collections-theforeman-foreman-bookmark-module) – Manage Bookmarks
* [compute\_attribute](compute_attribute_module#ansible-collections-theforeman-foreman-compute-attribute-module) – Manage Compute Attributes
* [compute\_profile](compute_profile_module#ansible-collections-theforeman-foreman-compute-profile-module) – Manage Compute Profiles
* [compute\_resource](compute_resource_module#ansible-collections-theforeman-foreman-compute-resource-module) – Manage Compute Resources
* [config\_group](config_group_module#ansible-collections-theforeman-foreman-config-group-module) – Manage (Puppet) Config Groups
* [content\_credential](content_credential_module#ansible-collections-theforeman-foreman-content-credential-module) – Manage Content Credentials
* [content\_upload](content_upload_module#ansible-collections-theforeman-foreman-content-upload-module) – Upload content to a repository
* [content\_view](content_view_module#ansible-collections-theforeman-foreman-content-view-module) – Manage Content Views
* [content\_view\_filter](content_view_filter_module#ansible-collections-theforeman-foreman-content-view-filter-module) – Manage Content View Filters
* [content\_view\_info](content_view_info_module#ansible-collections-theforeman-foreman-content-view-info-module) – Fetch information about Content Views
* [content\_view\_version](content_view_version_module#ansible-collections-theforeman-foreman-content-view-version-module) – Manage Content View Versions
* [content\_view\_version\_info](content_view_version_info_module#ansible-collections-theforeman-foreman-content-view-version-info-module) – Fetch information about Content Views
* [domain](domain_module#ansible-collections-theforeman-foreman-domain-module) – Manage Domains
* [domain\_info](domain_info_module#ansible-collections-theforeman-foreman-domain-info-module) – Fetch information about Domains
* [external\_usergroup](external_usergroup_module#ansible-collections-theforeman-foreman-external-usergroup-module) – Manage External User Groups
* [global\_parameter](global_parameter_module#ansible-collections-theforeman-foreman-global-parameter-module) – Manage Global Parameters
* [hardware\_model](hardware_model_module#ansible-collections-theforeman-foreman-hardware-model-module) – Manage Hardware Models
* [host](host_module#ansible-collections-theforeman-foreman-host-module) – Manage Hosts
* [host\_collection](host_collection_module#ansible-collections-theforeman-foreman-host-collection-module) – Manage Host Collections
* [host\_errata\_info](host_errata_info_module#ansible-collections-theforeman-foreman-host-errata-info-module) – Fetch information about Host Errata
* [host\_info](host_info_module#ansible-collections-theforeman-foreman-host-info-module) – Fetch information about Hosts
* [host\_power](host_power_module#ansible-collections-theforeman-foreman-host-power-module) – Manage Power State of Hosts
* [hostgroup](hostgroup_module#ansible-collections-theforeman-foreman-hostgroup-module) – Manage Hostgroups
* [http\_proxy](http_proxy_module#ansible-collections-theforeman-foreman-http-proxy-module) – Manage HTTP Proxies
* [image](image_module#ansible-collections-theforeman-foreman-image-module) – Manage Images
* [installation\_medium](installation_medium_module#ansible-collections-theforeman-foreman-installation-medium-module) – Manage Installation Media
* [job\_invocation](job_invocation_module#ansible-collections-theforeman-foreman-job-invocation-module) – Invoke Remote Execution Jobs
* [job\_template](job_template_module#ansible-collections-theforeman-foreman-job-template-module) – Manage Job Templates
* [lifecycle\_environment](lifecycle_environment_module#ansible-collections-theforeman-foreman-lifecycle-environment-module) – Manage Lifecycle Environments
* [location](location_module#ansible-collections-theforeman-foreman-location-module) – Manage Locations
* [operatingsystem](operatingsystem_module#ansible-collections-theforeman-foreman-operatingsystem-module) – Manage Operating Systems
* [organization](organization_module#ansible-collections-theforeman-foreman-organization-module) – Manage Organizations
* [os\_default\_template](os_default_template_module#ansible-collections-theforeman-foreman-os-default-template-module) – Manage Default Template Associations To Operating Systems
* [partition\_table](partition_table_module#ansible-collections-theforeman-foreman-partition-table-module) – Manage Partition Table Templates
* [product](product_module#ansible-collections-theforeman-foreman-product-module) – Manage Products
* [provisioning\_template](provisioning_template_module#ansible-collections-theforeman-foreman-provisioning-template-module) – Manage Provisioning Templates
* [puppet\_environment](puppet_environment_module#ansible-collections-theforeman-foreman-puppet-environment-module) – Manage Puppet Environments
* [puppetclasses\_import](puppetclasses_import_module#ansible-collections-theforeman-foreman-puppetclasses-import-module) – Import Puppet Classes from a Proxy
* [realm](realm_module#ansible-collections-theforeman-foreman-realm-module) – Manage Realms
* [redhat\_manifest](redhat_manifest_module#ansible-collections-theforeman-foreman-redhat-manifest-module) – Interact with a Red Hat Satellite Subscription Manifest
* [repository](repository_module#ansible-collections-theforeman-foreman-repository-module) – Manage Repositories
* [repository\_info](repository_info_module#ansible-collections-theforeman-foreman-repository-info-module) – Fetch information about Repositories
* [repository\_set](repository_set_module#ansible-collections-theforeman-foreman-repository-set-module) – Enable/disable Red Hat Repositories available through subscriptions
* [repository\_set\_info](repository_set_info_module#ansible-collections-theforeman-foreman-repository-set-info-module) – Fetch information about Red Hat Repositories
* [repository\_sync](repository_sync_module#ansible-collections-theforeman-foreman-repository-sync-module) – Sync a Repository or Product
* [resource\_info](resource_info_module#ansible-collections-theforeman-foreman-resource-info-module) – Gather information about resources
* [role](role_module#ansible-collections-theforeman-foreman-role-module) – Manage Roles
* [scap\_content](scap_content_module#ansible-collections-theforeman-foreman-scap-content-module) – Manage SCAP content
* [scap\_tailoring\_file](scap_tailoring_file_module#ansible-collections-theforeman-foreman-scap-tailoring-file-module) – Manage SCAP Tailoring Files
* [scc\_account](scc_account_module#ansible-collections-theforeman-foreman-scc-account-module) – Manage SUSE Customer Center Accounts
* [scc\_product](scc_product_module#ansible-collections-theforeman-foreman-scc-product-module) – Subscribe SUSE Customer Center Account Products
* [setting](setting_module#ansible-collections-theforeman-foreman-setting-module) – Manage Settings
* [setting\_info](setting_info_module#ansible-collections-theforeman-foreman-setting-info-module) – Fetch information about Settings
* [smart\_class\_parameter](smart_class_parameter_module#ansible-collections-theforeman-foreman-smart-class-parameter-module) – Manage Smart Class Parameters
* [smart\_proxy](smart_proxy_module#ansible-collections-theforeman-foreman-smart-proxy-module) – Manage Smart Proxies
* [snapshot](snapshot_module#ansible-collections-theforeman-foreman-snapshot-module) – Manage Snapshots
* [status\_info](status_info_module#ansible-collections-theforeman-foreman-status-info-module) – Get status info
* [subnet](subnet_module#ansible-collections-theforeman-foreman-subnet-module) – Manage Subnets
* [subnet\_info](subnet_info_module#ansible-collections-theforeman-foreman-subnet-info-module) – Fetch information about Subnets
* [subscription\_info](subscription_info_module#ansible-collections-theforeman-foreman-subscription-info-module) – Fetch information about Subscriptions
* [subscription\_manifest](subscription_manifest_module#ansible-collections-theforeman-foreman-subscription-manifest-module) – Manage Subscription Manifests
* [sync\_plan](sync_plan_module#ansible-collections-theforeman-foreman-sync-plan-module) – Manage Sync Plans
* [templates\_import](templates_import_module#ansible-collections-theforeman-foreman-templates-import-module) – Sync Templates from a repository
* [user](user_module#ansible-collections-theforeman-foreman-user-module) – Manage Users
* [usergroup](usergroup_module#ansible-collections-theforeman-foreman-usergroup-module) – Manage User Groups

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/theforeman/foreman/index.html>

Ovirt.Ovirt
===========

 Collection version 1.6.4

 Plugin Index
------------

 These are the plugins in the ovirt.ovirt collection

 ### Callback Plugins

 * [stdout](stdout_callback#ansible-collections-ovirt-ovirt-stdout-callback) – Output the log of ansible

 ### Inventory Plugins

 * [ovirt](ovirt_inventory#ansible-collections-ovirt-ovirt-ovirt-inventory) – oVirt inventory source

 ### Modules

 * [ovirt\_affinity\_group](ovirt_affinity_group_module#ansible-collections-ovirt-ovirt-ovirt-affinity-group-module) – Module to manage affinity groups in oVirt/RHV
* [ovirt\_affinity\_label](ovirt_affinity_label_module#ansible-collections-ovirt-ovirt-ovirt-affinity-label-module) – Module to manage affinity labels in oVirt/RHV
* [ovirt\_affinity\_label\_info](ovirt_affinity_label_info_module#ansible-collections-ovirt-ovirt-ovirt-affinity-label-info-module) – Retrieve information about one or more oVirt/RHV affinity labels
* [ovirt\_api\_info](ovirt_api_info_module#ansible-collections-ovirt-ovirt-ovirt-api-info-module) – Retrieve information about the oVirt/RHV API
* [ovirt\_auth](ovirt_auth_module#ansible-collections-ovirt-ovirt-ovirt-auth-module) – Module to manage authentication to oVirt/RHV
* [ovirt\_cluster](ovirt_cluster_module#ansible-collections-ovirt-ovirt-ovirt-cluster-module) – Module to manage clusters in oVirt/RHV
* [ovirt\_cluster\_info](ovirt_cluster_info_module#ansible-collections-ovirt-ovirt-ovirt-cluster-info-module) – Retrieve information about one or more oVirt/RHV clusters
* [ovirt\_datacenter](ovirt_datacenter_module#ansible-collections-ovirt-ovirt-ovirt-datacenter-module) – Module to manage data centers in oVirt/RHV
* [ovirt\_datacenter\_info](ovirt_datacenter_info_module#ansible-collections-ovirt-ovirt-ovirt-datacenter-info-module) – Retrieve information about one or more oVirt/RHV datacenters
* [ovirt\_disk](ovirt_disk_module#ansible-collections-ovirt-ovirt-ovirt-disk-module) – Module to manage Virtual Machine and floating disks in oVirt/RHV
* [ovirt\_disk\_info](ovirt_disk_info_module#ansible-collections-ovirt-ovirt-ovirt-disk-info-module) – Retrieve information about one or more oVirt/RHV disks
* [ovirt\_event](ovirt_event_module#ansible-collections-ovirt-ovirt-ovirt-event-module) – Create or delete an event in oVirt/RHV
* [ovirt\_event\_info](ovirt_event_info_module#ansible-collections-ovirt-ovirt-ovirt-event-info-module) – This module can be used to retrieve information about one or more oVirt/RHV events
* [ovirt\_external\_provider](ovirt_external_provider_module#ansible-collections-ovirt-ovirt-ovirt-external-provider-module) – Module to manage external providers in oVirt/RHV
* [ovirt\_external\_provider\_info](ovirt_external_provider_info_module#ansible-collections-ovirt-ovirt-ovirt-external-provider-info-module) – Retrieve information about one or more oVirt/RHV external providers
* [ovirt\_group](ovirt_group_module#ansible-collections-ovirt-ovirt-ovirt-group-module) – Module to manage groups in oVirt/RHV
* [ovirt\_group\_info](ovirt_group_info_module#ansible-collections-ovirt-ovirt-ovirt-group-info-module) – Retrieve information about one or more oVirt/RHV groups
* [ovirt\_host](ovirt_host_module#ansible-collections-ovirt-ovirt-ovirt-host-module) – Module to manage hosts in oVirt/RHV
* [ovirt\_host\_info](ovirt_host_info_module#ansible-collections-ovirt-ovirt-ovirt-host-info-module) – Retrieve information about one or more oVirt/RHV hosts
* [ovirt\_host\_network](ovirt_host_network_module#ansible-collections-ovirt-ovirt-ovirt-host-network-module) – Module to manage host networks in oVirt/RHV
* [ovirt\_host\_pm](ovirt_host_pm_module#ansible-collections-ovirt-ovirt-ovirt-host-pm-module) – Module to manage power management of hosts in oVirt/RHV
* [ovirt\_host\_storage\_info](ovirt_host_storage_info_module#ansible-collections-ovirt-ovirt-ovirt-host-storage-info-module) – Retrieve information about one or more oVirt/RHV HostStorages (applicable only for block storage)
* [ovirt\_instance\_type](ovirt_instance_type_module#ansible-collections-ovirt-ovirt-ovirt-instance-type-module) – Module to manage Instance Types in oVirt/RHV
* [ovirt\_job](ovirt_job_module#ansible-collections-ovirt-ovirt-ovirt-job-module) – Module to manage jobs in oVirt/RHV
* [ovirt\_mac\_pool](ovirt_mac_pool_module#ansible-collections-ovirt-ovirt-ovirt-mac-pool-module) – Module to manage MAC pools in oVirt/RHV
* [ovirt\_network](ovirt_network_module#ansible-collections-ovirt-ovirt-ovirt-network-module) – Module to manage logical networks in oVirt/RHV
* [ovirt\_network\_info](ovirt_network_info_module#ansible-collections-ovirt-ovirt-ovirt-network-info-module) – Retrieve information about one or more oVirt/RHV networks
* [ovirt\_nic](ovirt_nic_module#ansible-collections-ovirt-ovirt-ovirt-nic-module) – Module to manage network interfaces of Virtual Machines in oVirt/RHV
* [ovirt\_nic\_info](ovirt_nic_info_module#ansible-collections-ovirt-ovirt-ovirt-nic-info-module) – Retrieve information about one or more oVirt/RHV virtual machine network interfaces
* [ovirt\_permission](ovirt_permission_module#ansible-collections-ovirt-ovirt-ovirt-permission-module) – Module to manage permissions of users/groups in oVirt/RHV
* [ovirt\_permission\_info](ovirt_permission_info_module#ansible-collections-ovirt-ovirt-ovirt-permission-info-module) – Retrieve information about one or more oVirt/RHV permissions
* [ovirt\_quota](ovirt_quota_module#ansible-collections-ovirt-ovirt-ovirt-quota-module) – Module to manage datacenter quotas in oVirt/RHV
* [ovirt\_quota\_info](ovirt_quota_info_module#ansible-collections-ovirt-ovirt-ovirt-quota-info-module) – Retrieve information about one or more oVirt/RHV quotas
* [ovirt\_role](ovirt_role_module#ansible-collections-ovirt-ovirt-ovirt-role-module) – Module to manage roles in oVirt/RHV
* [ovirt\_scheduling\_policy\_info](ovirt_scheduling_policy_info_module#ansible-collections-ovirt-ovirt-ovirt-scheduling-policy-info-module) – Retrieve information about one or more oVirt scheduling policies
* [ovirt\_snapshot](ovirt_snapshot_module#ansible-collections-ovirt-ovirt-ovirt-snapshot-module) – Module to manage Virtual Machine Snapshots in oVirt/RHV
* [ovirt\_snapshot\_info](ovirt_snapshot_info_module#ansible-collections-ovirt-ovirt-ovirt-snapshot-info-module) – Retrieve information about one or more oVirt/RHV virtual machine snapshots
* [ovirt\_storage\_connection](ovirt_storage_connection_module#ansible-collections-ovirt-ovirt-ovirt-storage-connection-module) – Module to manage storage connections in oVirt
* [ovirt\_storage\_domain](ovirt_storage_domain_module#ansible-collections-ovirt-ovirt-ovirt-storage-domain-module) – Module to manage storage domains in oVirt/RHV
* [ovirt\_storage\_domain\_info](ovirt_storage_domain_info_module#ansible-collections-ovirt-ovirt-ovirt-storage-domain-info-module) – Retrieve information about one or more oVirt/RHV storage domains
* [ovirt\_storage\_template\_info](ovirt_storage_template_info_module#ansible-collections-ovirt-ovirt-ovirt-storage-template-info-module) – Retrieve information about one or more oVirt/RHV templates relate to a storage domain.
* [ovirt\_storage\_vm\_info](ovirt_storage_vm_info_module#ansible-collections-ovirt-ovirt-ovirt-storage-vm-info-module) – Retrieve information about one or more oVirt/RHV virtual machines relate to a storage domain.
* [ovirt\_system\_option\_info](ovirt_system_option_info_module#ansible-collections-ovirt-ovirt-ovirt-system-option-info-module) – Retrieve information about one oVirt/RHV system options.
* [ovirt\_tag](ovirt_tag_module#ansible-collections-ovirt-ovirt-ovirt-tag-module) – Module to manage tags in oVirt/RHV
* [ovirt\_tag\_info](ovirt_tag_info_module#ansible-collections-ovirt-ovirt-ovirt-tag-info-module) – Retrieve information about one or more oVirt/RHV tags
* [ovirt\_template](ovirt_template_module#ansible-collections-ovirt-ovirt-ovirt-template-module) – Module to manage virtual machine templates in oVirt/RHV
* [ovirt\_template\_info](ovirt_template_info_module#ansible-collections-ovirt-ovirt-ovirt-template-info-module) – Retrieve information about one or more oVirt/RHV templates
* [ovirt\_user](ovirt_user_module#ansible-collections-ovirt-ovirt-ovirt-user-module) – Module to manage users in oVirt/RHV
* [ovirt\_user\_info](ovirt_user_info_module#ansible-collections-ovirt-ovirt-ovirt-user-info-module) – Retrieve information about one or more oVirt/RHV users
* [ovirt\_vm](ovirt_vm_module#ansible-collections-ovirt-ovirt-ovirt-vm-module) – Module to manage Virtual Machines in oVirt/RHV
* [ovirt\_vm\_info](ovirt_vm_info_module#ansible-collections-ovirt-ovirt-ovirt-vm-info-module) – Retrieve information about one or more oVirt/RHV virtual machines
* [ovirt\_vm\_os\_info](ovirt_vm_os_info_module#ansible-collections-ovirt-ovirt-ovirt-vm-os-info-module) – Retrieve information on all supported oVirt/RHV operating systems
* [ovirt\_vmpool](ovirt_vmpool_module#ansible-collections-ovirt-ovirt-ovirt-vmpool-module) – Module to manage VM pools in oVirt/RHV
* [ovirt\_vmpool\_info](ovirt_vmpool_info_module#ansible-collections-ovirt-ovirt-ovirt-vmpool-info-module) – Retrieve information about one or more oVirt/RHV vmpools
* [ovirt\_vnic\_profile](ovirt_vnic_profile_module#ansible-collections-ovirt-ovirt-ovirt-vnic-profile-module) – Module to manage vNIC profile of network in oVirt/RHV
* [ovirt\_vnic\_profile\_info](ovirt_vnic_profile_info_module#ansible-collections-ovirt-ovirt-ovirt-vnic-profile-info-module) – Retrieve information about one or more oVirt/RHV vnic profiles

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ovirt/ovirt/index.html>

Purestorage.Flashblade
======================

 Collection version 1.7.0

 Plugin Index
------------

 These are the plugins in the purestorage.flashblade collection

 ### Modules

 * [purefb\_ad](purefb_ad_module#ansible-collections-purestorage-flashblade-purefb-ad-module) – Manage FlashBlade Active Directory Account
* [purefb\_alert](purefb_alert_module#ansible-collections-purestorage-flashblade-purefb-alert-module) – Configure Pure Storage FlashBlade alert email settings
* [purefb\_apiclient](purefb_apiclient_module#ansible-collections-purestorage-flashblade-purefb-apiclient-module) – Manage FlashBlade API Clients
* [purefb\_banner](purefb_banner_module#ansible-collections-purestorage-flashblade-purefb-banner-module) – Configure Pure Storage FlashBlade GUI and SSH MOTD message
* [purefb\_bladename](purefb_bladename_module#ansible-collections-purestorage-flashblade-purefb-bladename-module) – Configure Pure Storage FlashBlade name
* [purefb\_bucket](purefb_bucket_module#ansible-collections-purestorage-flashblade-purefb-bucket-module) – Manage Object Store Buckets on a Pure Storage FlashBlade.
* [purefb\_bucket\_replica](purefb_bucket_replica_module#ansible-collections-purestorage-flashblade-purefb-bucket-replica-module) – Manage bucket replica links between Pure Storage FlashBlades
* [purefb\_certgrp](purefb_certgrp_module#ansible-collections-purestorage-flashblade-purefb-certgrp-module) – Manage FlashBlade Certifcate Groups
* [purefb\_certs](purefb_certs_module#ansible-collections-purestorage-flashblade-purefb-certs-module) – Manage FlashBlade SSL Certifcates
* [purefb\_connect](purefb_connect_module#ansible-collections-purestorage-flashblade-purefb-connect-module) – Manage replication connections between two FlashBlades
* [purefb\_dns](purefb_dns_module#ansible-collections-purestorage-flashblade-purefb-dns-module) – Configure Pure Storage FlashBlade DNS settings
* [purefb\_ds](purefb_ds_module#ansible-collections-purestorage-flashblade-purefb-ds-module) – Configure FlashBlade Directory Service
* [purefb\_dsrole](purefb_dsrole_module#ansible-collections-purestorage-flashblade-purefb-dsrole-module) – Configure FlashBlade Management Directory Service Roles
* [purefb\_eula](purefb_eula_module#ansible-collections-purestorage-flashblade-purefb-eula-module) – Sign Pure Storage FlashBlade EULA
* [purefb\_fs](purefb_fs_module#ansible-collections-purestorage-flashblade-purefb-fs-module) – Manage filesystemon Pure Storage FlashBlade`
* [purefb\_fs\_replica](purefb_fs_replica_module#ansible-collections-purestorage-flashblade-purefb-fs-replica-module) – Manage filesystem replica links between Pure Storage FlashBlades
* [purefb\_groupquota](purefb_groupquota_module#ansible-collections-purestorage-flashblade-purefb-groupquota-module) – Manage filesystem group quotas
* [purefb\_info](purefb_info_module#ansible-collections-purestorage-flashblade-purefb-info-module) – Collect information from Pure Storage FlashBlade
* [purefb\_inventory](purefb_inventory_module#ansible-collections-purestorage-flashblade-purefb-inventory-module) – Collect information from Pure Storage FlashBlade
* [purefb\_keytabs](purefb_keytabs_module#ansible-collections-purestorage-flashblade-purefb-keytabs-module) – Manage FlashBlade Kerberos Keytabs
* [purefb\_lag](purefb_lag_module#ansible-collections-purestorage-flashblade-purefb-lag-module) – Manage FlashBlade Link Aggregation Groups
* [purefb\_lifecycle](purefb_lifecycle_module#ansible-collections-purestorage-flashblade-purefb-lifecycle-module) – Manage FlashBlade object lifecycles
* [purefb\_network](purefb_network_module#ansible-collections-purestorage-flashblade-purefb-network-module) – Manage network interfaces in a Pure Storage FlashBlade
* [purefb\_ntp](purefb_ntp_module#ansible-collections-purestorage-flashblade-purefb-ntp-module) – Configure Pure Storage FlashBlade NTP settings
* [purefb\_phonehome](purefb_phonehome_module#ansible-collections-purestorage-flashblade-purefb-phonehome-module) – Enable or Disable Pure Storage FlashBlade Phone Home
* [purefb\_policy](purefb_policy_module#ansible-collections-purestorage-flashblade-purefb-policy-module) – Manage FlashBlade policies
* [purefb\_proxy](purefb_proxy_module#ansible-collections-purestorage-flashblade-purefb-proxy-module) – Configure FlashBlade phonehome HTTPs proxy settings
* [purefb\_ra](purefb_ra_module#ansible-collections-purestorage-flashblade-purefb-ra-module) – Enable or Disable Pure Storage FlashBlade Remote Assist
* [purefb\_remote\_cred](purefb_remote_cred_module#ansible-collections-purestorage-flashblade-purefb-remote-cred-module) – Create, modify and delete FlashBlade object store remote credentials
* [purefb\_s3acc](purefb_s3acc_module#ansible-collections-purestorage-flashblade-purefb-s3acc-module) – Create or delete FlashBlade Object Store accounts
* [purefb\_s3user](purefb_s3user_module#ansible-collections-purestorage-flashblade-purefb-s3user-module) – Create or delete FlashBlade Object Store account users
* [purefb\_smtp](purefb_smtp_module#ansible-collections-purestorage-flashblade-purefb-smtp-module) – Configure SMTP for Pure Storage FlashBlade
* [purefb\_snap](purefb_snap_module#ansible-collections-purestorage-flashblade-purefb-snap-module) – Manage filesystem snapshots on Pure Storage FlashBlades
* [purefb\_snmp\_agent](purefb_snmp_agent_module#ansible-collections-purestorage-flashblade-purefb-snmp-agent-module) – Configure the FlashBlade SNMP Agent
* [purefb\_snmp\_mgr](purefb_snmp_mgr_module#ansible-collections-purestorage-flashblade-purefb-snmp-mgr-module) – Configure FlashBlade SNMP Managers
* [purefb\_subnet](purefb_subnet_module#ansible-collections-purestorage-flashblade-purefb-subnet-module) – Manage network subnets in a Pure Storage FlashBlade
* [purefb\_syslog](purefb_syslog_module#ansible-collections-purestorage-flashblade-purefb-syslog-module) – Configure Pure Storage FlashBlade syslog settings
* [purefb\_target](purefb_target_module#ansible-collections-purestorage-flashblade-purefb-target-module) – Manage remote S3-capable targets for a FlashBlade
* [purefb\_timeout](purefb_timeout_module#ansible-collections-purestorage-flashblade-purefb-timeout-module) – Configure Pure Storage FlashBlade GUI idle timeout
* [purefb\_user](purefb_user_module#ansible-collections-purestorage-flashblade-purefb-user-module) – Modify FlashBlade local user account password
* [purefb\_userpolicy](purefb_userpolicy_module#ansible-collections-purestorage-flashblade-purefb-userpolicy-module) – Manage FlashBlade Object Store User Access Policies
* [purefb\_userquota](purefb_userquota_module#ansible-collections-purestorage-flashblade-purefb-userquota-module) – Manage filesystem user quotas
* [purefb\_virtualhost](purefb_virtualhost_module#ansible-collections-purestorage-flashblade-purefb-virtualhost-module) – Manage FlashBlade Object Store Virtual Hosts

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/purestorage/flashblade/index.html>

Ngine\_Io.Vultr
===============

 Collection version 1.1.0

 Plugin Index
------------

 These are the plugins in the ngine\_io.vultr collection

 ### Inventory Plugins

 * [vultr](vultr_inventory#ansible-collections-ngine-io-vultr-vultr-inventory) – Vultr inventory source

 ### Modules

 * [vultr\_account\_info](vultr_account_info_module#ansible-collections-ngine-io-vultr-vultr-account-info-module) – Get information about the Vultr account.
* [vultr\_block\_storage](vultr_block_storage_module#ansible-collections-ngine-io-vultr-vultr-block-storage-module) – Manages block storage volumes on Vultr.
* [vultr\_block\_storage\_info](vultr_block_storage_info_module#ansible-collections-ngine-io-vultr-vultr-block-storage-info-module) – Get information about the Vultr block storage volumes available.
* [vultr\_dns\_domain](vultr_dns_domain_module#ansible-collections-ngine-io-vultr-vultr-dns-domain-module) – Manages DNS domains on Vultr.
* [vultr\_dns\_domain\_info](vultr_dns_domain_info_module#ansible-collections-ngine-io-vultr-vultr-dns-domain-info-module) – Gather information about the Vultr DNS domains available.
* [vultr\_dns\_record](vultr_dns_record_module#ansible-collections-ngine-io-vultr-vultr-dns-record-module) – Manages DNS records on Vultr.
* [vultr\_firewall\_group](vultr_firewall_group_module#ansible-collections-ngine-io-vultr-vultr-firewall-group-module) – Manages firewall groups on Vultr.
* [vultr\_firewall\_group\_info](vultr_firewall_group_info_module#ansible-collections-ngine-io-vultr-vultr-firewall-group-info-module) – Gather information about the Vultr firewall groups available.
* [vultr\_firewall\_rule](vultr_firewall_rule_module#ansible-collections-ngine-io-vultr-vultr-firewall-rule-module) – Manages firewall rules on Vultr.
* [vultr\_network](vultr_network_module#ansible-collections-ngine-io-vultr-vultr-network-module) – Manages networks on Vultr.
* [vultr\_network\_info](vultr_network_info_module#ansible-collections-ngine-io-vultr-vultr-network-info-module) – Gather information about the Vultr networks available.
* [vultr\_os\_info](vultr_os_info_module#ansible-collections-ngine-io-vultr-vultr-os-info-module) – Get information about the Vultr OSes available.
* [vultr\_plan\_baremetal\_info](vultr_plan_baremetal_info_module#ansible-collections-ngine-io-vultr-vultr-plan-baremetal-info-module) – Gather information about the Vultr Bare Metal plans available.
* [vultr\_plan\_info](vultr_plan_info_module#ansible-collections-ngine-io-vultr-vultr-plan-info-module) – Gather information about the Vultr plans available.
* [vultr\_region\_info](vultr_region_info_module#ansible-collections-ngine-io-vultr-vultr-region-info-module) – Gather information about the Vultr regions available.
* [vultr\_server](vultr_server_module#ansible-collections-ngine-io-vultr-vultr-server-module) – Manages virtual servers on Vultr.
* [vultr\_server\_baremetal](vultr_server_baremetal_module#ansible-collections-ngine-io-vultr-vultr-server-baremetal-module) – Manages baremetal servers on Vultr.
* [vultr\_server\_info](vultr_server_info_module#ansible-collections-ngine-io-vultr-vultr-server-info-module) – Gather information about the Vultr servers available.
* [vultr\_ssh\_key](vultr_ssh_key_module#ansible-collections-ngine-io-vultr-vultr-ssh-key-module) – Manages ssh keys on Vultr.
* [vultr\_ssh\_key\_info](vultr_ssh_key_info_module#ansible-collections-ngine-io-vultr-vultr-ssh-key-info-module) – Get information about the Vultr SSH keys available.
* [vultr\_startup\_script](vultr_startup_script_module#ansible-collections-ngine-io-vultr-vultr-startup-script-module) – Manages startup scripts on Vultr.
* [vultr\_startup\_script\_info](vultr_startup_script_info_module#ansible-collections-ngine-io-vultr-vultr-startup-script-info-module) – Gather information about the Vultr startup scripts available.
* [vultr\_user](vultr_user_module#ansible-collections-ngine-io-vultr-vultr-user-module) – Manages users on Vultr.
* [vultr\_user\_info](vultr_user_info_module#ansible-collections-ngine-io-vultr-vultr-user-info-module) – Get information about the Vultr user available.

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ngine_io/vultr/index.html>

Sensu.Sensu\_Go
===============

 Collection version 1.12.0

 Plugin Index
------------

 These are the plugins in the sensu.sensu\_go collection

 ### Modules

 * [ad\_auth\_provider](ad_auth_provider_module#ansible-collections-sensu-sensu-go-ad-auth-provider-module) – Manage Sensu AD authentication provider
* [asset](asset_module#ansible-collections-sensu-sensu-go-asset-module) – Manage Sensu assets
* [asset\_info](asset_info_module#ansible-collections-sensu-sensu-go-asset-info-module) – List Sensu assets
* [auth\_provider\_info](auth_provider_info_module#ansible-collections-sensu-sensu-go-auth-provider-info-module) – List Sensu authentication providers
* [bonsai\_asset](bonsai_asset_module#ansible-collections-sensu-sensu-go-bonsai-asset-module) – Add Sensu assets from Bonsai
* [check](check_module#ansible-collections-sensu-sensu-go-check-module) – Manage Sensu checks
* [check\_info](check_info_module#ansible-collections-sensu-sensu-go-check-info-module) – List Sensu checks
* [cluster](cluster_module#ansible-collections-sensu-sensu-go-cluster-module) – Manage Sensu Go clusters
* [cluster\_info](cluster_info_module#ansible-collections-sensu-sensu-go-cluster-info-module) – List available Sensu Go clusters
* [cluster\_role](cluster_role_module#ansible-collections-sensu-sensu-go-cluster-role-module) – Manage Sensu cluster roles
* [cluster\_role\_binding](cluster_role_binding_module#ansible-collections-sensu-sensu-go-cluster-role-binding-module) – Manage Sensu cluster role bindings
* [cluster\_role\_binding\_info](cluster_role_binding_info_module#ansible-collections-sensu-sensu-go-cluster-role-binding-info-module) – List Sensu cluster role bindings
* [cluster\_role\_info](cluster_role_info_module#ansible-collections-sensu-sensu-go-cluster-role-info-module) – List Sensu cluster roles
* [datastore](datastore_module#ansible-collections-sensu-sensu-go-datastore-module) – Manage Sensu external datastore providers
* [datastore\_info](datastore_info_module#ansible-collections-sensu-sensu-go-datastore-info-module) – List external Sensu datastore providers
* [entity](entity_module#ansible-collections-sensu-sensu-go-entity-module) – Manage Sensu entities
* [entity\_info](entity_info_module#ansible-collections-sensu-sensu-go-entity-info-module) – List Sensu entities
* [etcd\_replicator](etcd_replicator_module#ansible-collections-sensu-sensu-go-etcd-replicator-module) – Manage Sensu Go etcd replicators
* [etcd\_replicator\_info](etcd_replicator_info_module#ansible-collections-sensu-sensu-go-etcd-replicator-info-module) – List available Sensu Go etcd replicators
* [event](event_module#ansible-collections-sensu-sensu-go-event-module) – Manage Sensu events
* [event\_info](event_info_module#ansible-collections-sensu-sensu-go-event-info-module) – List Sensu events
* [filter](filter_module#ansible-collections-sensu-sensu-go-filter-module) – Manage Sensu filters
* [filter\_info](filter_info_module#ansible-collections-sensu-sensu-go-filter-info-module) – List Sensu info
* [handler\_info](handler_info_module#ansible-collections-sensu-sensu-go-handler-info-module) – List Sensu handlers
* [handler\_set](handler_set_module#ansible-collections-sensu-sensu-go-handler-set-module) – Manage Sensu handler set
* [hook](hook_module#ansible-collections-sensu-sensu-go-hook-module) – Manage Sensu hooks
* [hook\_info](hook_info_module#ansible-collections-sensu-sensu-go-hook-info-module) – List Sensu hooks
* [ldap\_auth\_provider](ldap_auth_provider_module#ansible-collections-sensu-sensu-go-ldap-auth-provider-module) – Manage Sensu LDAP authentication provider
* [mutator](mutator_module#ansible-collections-sensu-sensu-go-mutator-module) – Manage Sensu mutators
* [mutator\_info](mutator_info_module#ansible-collections-sensu-sensu-go-mutator-info-module) – List Sensu mutators
* [namespace](namespace_module#ansible-collections-sensu-sensu-go-namespace-module) – Manage Sensu namespaces
* [namespace\_info](namespace_info_module#ansible-collections-sensu-sensu-go-namespace-info-module) – List Sensu namespaces
* [oidc\_auth\_provider](oidc_auth_provider_module#ansible-collections-sensu-sensu-go-oidc-auth-provider-module) – Manage Sensu OIDC authentication provider
* [pipe\_handler](pipe_handler_module#ansible-collections-sensu-sensu-go-pipe-handler-module) – Manage Sensu pipe handler
* [role](role_module#ansible-collections-sensu-sensu-go-role-module) – Manage Sensu roles
* [role\_binding](role_binding_module#ansible-collections-sensu-sensu-go-role-binding-module) – Manage Sensu role bindings
* [role\_binding\_info](role_binding_info_module#ansible-collections-sensu-sensu-go-role-binding-info-module) – List Sensu role bindings
* [role\_info](role_info_module#ansible-collections-sensu-sensu-go-role-info-module) – List Sensu roles
* [secret](secret_module#ansible-collections-sensu-sensu-go-secret-module) – Manage Sensu Go secrets
* [secret\_info](secret_info_module#ansible-collections-sensu-sensu-go-secret-info-module) – List available Sensu Go secrets
* [secrets\_provider\_env](secrets_provider_env_module#ansible-collections-sensu-sensu-go-secrets-provider-env-module) – Manage Sensu Env secrets provider
* [secrets\_provider\_info](secrets_provider_info_module#ansible-collections-sensu-sensu-go-secrets-provider-info-module) – List Sensu secrets providers
* [secrets\_provider\_vault](secrets_provider_vault_module#ansible-collections-sensu-sensu-go-secrets-provider-vault-module) – Manage Sensu VaultProvider secrets providers
* [silence](silence_module#ansible-collections-sensu-sensu-go-silence-module) – Manage Sensu silences
* [silence\_info](silence_info_module#ansible-collections-sensu-sensu-go-silence-info-module) – List Sensu silence entries
* [socket\_handler](socket_handler_module#ansible-collections-sensu-sensu-go-socket-handler-module) – Manage Sensu TCP/UDP handler
* [tessen](tessen_module#ansible-collections-sensu-sensu-go-tessen-module) – Manage Sensu’s Tessen configuration
* [user](user_module#ansible-collections-sensu-sensu-go-user-module) – Manage Sensu users
* [user\_info](user_info_module#ansible-collections-sensu-sensu-go-user-info-module) – List Sensu users

 Role Index
----------

 These are the roles in the sensu.sensu\_go collection

 * [agent](agent_role#ansible-collections-sensu-sensu-go-agent-role) – Install, configure, and start Sensu Go agent
* [backend](backend_role#ansible-collections-sensu-sensu-go-backend-role) – Install, configure, and start Sensu Go backend
* [install](install_role#ansible-collections-sensu-sensu-go-install-role) – Enable Sensu Go repos and install selected packages

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/sensu/sensu_go/index.html>

ansible-config
==============

 **View ansible configuration.**

 * [Synopsis](#synopsis)
* [Description](#description)
* [Common Options](#common-options)
* [Actions](#actions)


	+ [list](#list)
	+ [dump](#dump)
	+ [view](#view)
* [Environment](#environment)
* [Files](#files)
* [Author](#author)
* [License](#license)
* [See also](#see-also)

 Synopsis
--------

 
```
usage: ansible-config [-h] [--version] [-v] {list,dump,view} ...

```
 Description
-----------

 Config command line class

 Common Options
--------------

  
`--version`  
show program’s version number, config file location, configured module search path, module location, executable location and exit

 
  
`-h, --help`  
show this help message and exit

 
  
`-v, --verbose`  
verbose mode (-vvv for more, -vvvv to enable connection debugging)

 
 Actions
-------

 ### list

 list all current configs reading lib/constants.py and shows env and config file setting names

  
`-c <CONFIG_FILE>, --config <CONFIG_FILE>`  
path to configuration file, defaults to first file found in precedence.

 
 ### dump

 Shows the current settings, merges ansible.cfg if specified

  
`--only-changed`  
Only show configurations that have changed from the default

 
  
`-c <CONFIG_FILE>, --config <CONFIG_FILE>`  
path to configuration file, defaults to first file found in precedence.

 
 ### view

 Displays the current config file

  
`-c <CONFIG_FILE>, --config <CONFIG_FILE>`  
path to configuration file, defaults to first file found in precedence.

 
 Environment
-----------

 The following environment variables may be specified.

 [`ANSIBLE_CONFIG`](../reference_appendices/config#envvar-ANSIBLE_CONFIG) – Override the default ansible config file

 Many more are available for most options in ansible.cfg

 Files
-----

 `/etc/ansible/ansible.cfg` – Config file, used if present

 `~/.ansible.cfg` – User config file, overrides the default config if present

 Author
------

 Ansible was originally written by Michael DeHaan.

 See the `AUTHORS` file for a complete list of contributors.

 License
-------

 Ansible is released under the terms of the GPLv3+ License.

 See also
--------

 *ansible(1)*, *ansible-config(1)*, *ansible-console(1)*, *ansible-doc(1)*, *ansible-galaxy(1)*, *ansible-inventory(1)*, *ansible-playbook(1)*, *ansible-pull(1)*, *ansible-vault(1)*,



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/cli/ansible-config.html>

Openstack.Cloud
===============

 Collection version 1.5.1

 Plugin Index
------------

 These are the plugins in the openstack.cloud collection

 ### Inventory Plugins

 * [openstack](openstack_inventory#ansible-collections-openstack-cloud-openstack-inventory) – OpenStack inventory source

 ### Modules

 * [address\_scope](address_scope_module#ansible-collections-openstack-cloud-address-scope-module) – Create or delete address scopes from OpenStack
* [auth](auth_module#ansible-collections-openstack-cloud-auth-module) – Retrieve an auth token
* [baremetal\_inspect](baremetal_inspect_module#ansible-collections-openstack-cloud-baremetal-inspect-module) – Explicitly triggers baremetal node introspection in ironic.
* [baremetal\_node](baremetal_node_module#ansible-collections-openstack-cloud-baremetal-node-module) – Create/Delete Bare Metal Resources from OpenStack
* [baremetal\_node\_action](baremetal_node_action_module#ansible-collections-openstack-cloud-baremetal-node-action-module) – Activate/Deactivate Bare Metal Resources from OpenStack
* [catalog\_service](catalog_service_module#ansible-collections-openstack-cloud-catalog-service-module) – Manage OpenStack Identity services
* [coe\_cluster](coe_cluster_module#ansible-collections-openstack-cloud-coe-cluster-module) – Add/Remove COE cluster from OpenStack Cloud
* [coe\_cluster\_template](coe_cluster_template_module#ansible-collections-openstack-cloud-coe-cluster-template-module) – Add/Remove COE cluster template from OpenStack Cloud
* [compute\_flavor](compute_flavor_module#ansible-collections-openstack-cloud-compute-flavor-module) – Manage OpenStack compute flavors
* [compute\_flavor\_info](compute_flavor_info_module#ansible-collections-openstack-cloud-compute-flavor-info-module) – Retrieve information about one or more flavors
* [config](config_module#ansible-collections-openstack-cloud-config-module) – Get OpenStack Client config
* [dns\_zone](dns_zone_module#ansible-collections-openstack-cloud-dns-zone-module) – Manage OpenStack DNS zones
* [dns\_zone\_info](dns_zone_info_module#ansible-collections-openstack-cloud-dns-zone-info-module) – Getting information about dns zones
* [endpoint](endpoint_module#ansible-collections-openstack-cloud-endpoint-module) – Manage OpenStack Identity service endpoints
* [federation\_idp](federation_idp_module#ansible-collections-openstack-cloud-federation-idp-module) – manage a federation Identity Provider
* [federation\_idp\_info](federation_idp_info_module#ansible-collections-openstack-cloud-federation-idp-info-module) – Get the information about the available federation identity providers
* [federation\_mapping](federation_mapping_module#ansible-collections-openstack-cloud-federation-mapping-module) – Manage a federation mapping
* [federation\_mapping\_info](federation_mapping_info_module#ansible-collections-openstack-cloud-federation-mapping-info-module) – Get the information about the available federation mappings
* [floating\_ip](floating_ip_module#ansible-collections-openstack-cloud-floating-ip-module) – Add/Remove floating IP from an instance
* [floating\_ip\_info](floating_ip_info_module#ansible-collections-openstack-cloud-floating-ip-info-module) – Get information about floating ips
* [group\_assignment](group_assignment_module#ansible-collections-openstack-cloud-group-assignment-module) – Associate OpenStack Identity users and groups
* [host\_aggregate](host_aggregate_module#ansible-collections-openstack-cloud-host-aggregate-module) – Manage OpenStack host aggregates
* [identity\_domain](identity_domain_module#ansible-collections-openstack-cloud-identity-domain-module) – Manage OpenStack Identity Domains
* [identity\_domain\_info](identity_domain_info_module#ansible-collections-openstack-cloud-identity-domain-info-module) – Retrieve information about one or more OpenStack domains
* [identity\_group](identity_group_module#ansible-collections-openstack-cloud-identity-group-module) – Manage OpenStack Identity Groups
* [identity\_group\_info](identity_group_info_module#ansible-collections-openstack-cloud-identity-group-info-module) – Retrieve info about one or more OpenStack groups
* [identity\_role](identity_role_module#ansible-collections-openstack-cloud-identity-role-module) – Manage OpenStack Identity Roles
* [identity\_role\_info](identity_role_info_module#ansible-collections-openstack-cloud-identity-role-info-module) – Retrive information about roles
* [identity\_user](identity_user_module#ansible-collections-openstack-cloud-identity-user-module) – Manage OpenStack Identity Users
* [identity\_user\_info](identity_user_info_module#ansible-collections-openstack-cloud-identity-user-info-module) – Retrieve information about one or more OpenStack users
* [image](image_module#ansible-collections-openstack-cloud-image-module) – Add/Delete images from OpenStack Cloud
* [image\_info](image_info_module#ansible-collections-openstack-cloud-image-info-module) – Retrieve information about an image within OpenStack.
* [keypair](keypair_module#ansible-collections-openstack-cloud-keypair-module) – Add/Delete a keypair from OpenStack
* [keypair\_info](keypair_info_module#ansible-collections-openstack-cloud-keypair-info-module) – Get information about keypairs from OpenStack
* [keystone\_federation\_protocol](keystone_federation_protocol_module#ansible-collections-openstack-cloud-keystone-federation-protocol-module) – manage a federation Protocol
* [keystone\_federation\_protocol\_info](keystone_federation_protocol_info_module#ansible-collections-openstack-cloud-keystone-federation-protocol-info-module) – get information about federation Protocols
* [lb\_health\_monitor](lb_health_monitor_module#ansible-collections-openstack-cloud-lb-health-monitor-module) – Add/Delete a health m nonitor to a pool in the load balancing service from OpenStack Cloud
* [lb\_listener](lb_listener_module#ansible-collections-openstack-cloud-lb-listener-module) – Add/Delete a listener for a load balancer from OpenStack Cloud
* [lb\_member](lb_member_module#ansible-collections-openstack-cloud-lb-member-module) – Add/Delete a member for a pool in load balancer from OpenStack Cloud
* [lb\_pool](lb_pool_module#ansible-collections-openstack-cloud-lb-pool-module) – Add/Delete a pool in the load balancing service from OpenStack Cloud
* [loadbalancer](loadbalancer_module#ansible-collections-openstack-cloud-loadbalancer-module) – Add/Delete load balancer from OpenStack Cloud
* [network](network_module#ansible-collections-openstack-cloud-network-module) – Creates/removes networks from OpenStack
* [networks\_info](networks_info_module#ansible-collections-openstack-cloud-networks-info-module) – Retrieve information about one or more OpenStack networks.
* [object](object_module#ansible-collections-openstack-cloud-object-module) – Create or Delete objects and containers from OpenStack
* [object\_container](object_container_module#ansible-collections-openstack-cloud-object-container-module) – Manage Swift container.
* [port](port_module#ansible-collections-openstack-cloud-port-module) – Add/Update/Delete ports from an OpenStack cloud.
* [port\_info](port_info_module#ansible-collections-openstack-cloud-port-info-module) – Retrieve information about ports within OpenStack.
* [project](project_module#ansible-collections-openstack-cloud-project-module) – Manage OpenStack Projects
* [project\_access](project_access_module#ansible-collections-openstack-cloud-project-access-module) – Manage OpenStack compute flavors access
* [project\_info](project_info_module#ansible-collections-openstack-cloud-project-info-module) – Retrieve information about one or more OpenStack projects
* [quota](quota_module#ansible-collections-openstack-cloud-quota-module) – Manage OpenStack Quotas
* [recordset](recordset_module#ansible-collections-openstack-cloud-recordset-module) – Manage OpenStack DNS recordsets
* [role\_assignment](role_assignment_module#ansible-collections-openstack-cloud-role-assignment-module) – Associate OpenStack Identity users and roles
* [router](router_module#ansible-collections-openstack-cloud-router-module) – Create or delete routers from OpenStack
* [routers\_info](routers_info_module#ansible-collections-openstack-cloud-routers-info-module) – Retrieve information about one or more OpenStack routers.
* [security\_group](security_group_module#ansible-collections-openstack-cloud-security-group-module) – Add/Delete security groups from an OpenStack cloud.
* [security\_group\_info](security_group_info_module#ansible-collections-openstack-cloud-security-group-info-module) – Lists security groups
* [security\_group\_rule](security_group_rule_module#ansible-collections-openstack-cloud-security-group-rule-module) – Add/Delete rule from an existing security group
* [security\_group\_rule\_info](security_group_rule_info_module#ansible-collections-openstack-cloud-security-group-rule-info-module) – Querying security group rules
* [server](server_module#ansible-collections-openstack-cloud-server-module) – Create/Delete Compute Instances from OpenStack
* [server\_action](server_action_module#ansible-collections-openstack-cloud-server-action-module) – Perform actions on Compute Instances from OpenStack
* [server\_group](server_group_module#ansible-collections-openstack-cloud-server-group-module) – Manage OpenStack server groups
* [server\_info](server_info_module#ansible-collections-openstack-cloud-server-info-module) – Retrieve information about one or more compute instances
* [server\_metadata](server_metadata_module#ansible-collections-openstack-cloud-server-metadata-module) – Add/Update/Delete Metadata in Compute Instances from OpenStack
* [server\_volume](server_volume_module#ansible-collections-openstack-cloud-server-volume-module) – Attach/Detach Volumes from OpenStack VM’s
* [stack](stack_module#ansible-collections-openstack-cloud-stack-module) – Add/Remove Heat Stack
* [stack\_info](stack_info_module#ansible-collections-openstack-cloud-stack-info-module) – Retrive information about Heat stacks
* [subnet](subnet_module#ansible-collections-openstack-cloud-subnet-module) – Add/Remove subnet to an OpenStack network
* [subnets\_info](subnets_info_module#ansible-collections-openstack-cloud-subnets-info-module) – Retrieve information about one or more OpenStack subnets.
* [volume](volume_module#ansible-collections-openstack-cloud-volume-module) – Create/Delete Cinder Volumes
* [volume\_backup](volume_backup_module#ansible-collections-openstack-cloud-volume-backup-module) – Add/Delete Volume backup
* [volume\_backup\_info](volume_backup_info_module#ansible-collections-openstack-cloud-volume-backup-info-module) – Get Backups
* [volume\_info](volume_info_module#ansible-collections-openstack-cloud-volume-info-module) – Retrive information about volumes
* [volume\_snapshot](volume_snapshot_module#ansible-collections-openstack-cloud-volume-snapshot-module) – Create/Delete Cinder Volume Snapshots
* [volume\_snapshot\_info](volume_snapshot_info_module#ansible-collections-openstack-cloud-volume-snapshot-info-module) – Get volume snapshots

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/openstack/cloud/index.html>

Splunk.Es
=========

 Collection version 1.0.2

 Plugin Index
------------

 These are the plugins in the splunk.es collection

 ### Httpapi Plugins

 * [splunk](splunk_httpapi#ansible-collections-splunk-es-splunk-httpapi) – HttpApi Plugin for Splunk

 ### Modules

 * [adaptive\_response\_notable\_event](adaptive_response_notable_event_module#ansible-collections-splunk-es-adaptive-response-notable-event-module) – Manage Splunk Enterprise Security Notable Event Adaptive Responses
* [correlation\_search](correlation_search_module#ansible-collections-splunk-es-correlation-search-module) – Manage Splunk Enterprise Security Correlation Searches
* [correlation\_search\_info](correlation_search_info_module#ansible-collections-splunk-es-correlation-search-info-module) – Manage Splunk Enterprise Security Correlation Searches
* [data\_input\_monitor](data_input_monitor_module#ansible-collections-splunk-es-data-input-monitor-module) – Manage Splunk Data Inputs of type Monitor
* [data\_input\_network](data_input_network_module#ansible-collections-splunk-es-data-input-network-module) – Manage Splunk Data Inputs of type TCP or UDP

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/splunk/es/index.html>

T\_Systems\_Mms.Icinga\_Director
================================

 Collection version 1.23.0

 Plugin Index
------------

 These are the plugins in the t\_systems\_mms.icinga\_director collection

 ### Inventory Plugins

 * [icinga\_director\_inventory](icinga_director_inventory_inventory#ansible-collections-t-systems-mms-icinga-director-icinga-director-inventory-inventory) – Returns Ansible inventory from Icinga

 ### Modules

 * [icinga\_command](icinga_command_module#ansible-collections-t-systems-mms-icinga-director-icinga-command-module) – Manage commands in Icinga2
* [icinga\_command\_info](icinga_command_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-command-info-module) – Query commands in Icinga2
* [icinga\_command\_template](icinga_command_template_module#ansible-collections-t-systems-mms-icinga-director-icinga-command-template-module) – Manage command templates in Icinga2
* [icinga\_command\_template\_info](icinga_command_template_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-command-template-info-module) – Query command templates in Icinga2
* [icinga\_endpoint](icinga_endpoint_module#ansible-collections-t-systems-mms-icinga-director-icinga-endpoint-module) – Manage endpoints in Icinga2
* [icinga\_endpoint\_info](icinga_endpoint_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-endpoint-info-module) – Query endpoints in Icinga2
* [icinga\_host](icinga_host_module#ansible-collections-t-systems-mms-icinga-director-icinga-host-module) – Manage hosts in Icinga2
* [icinga\_host\_info](icinga_host_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-host-info-module) – Query hosts in Icinga2
* [icinga\_host\_template](icinga_host_template_module#ansible-collections-t-systems-mms-icinga-director-icinga-host-template-module) – Manage host templates in Icinga2
* [icinga\_host\_template\_info](icinga_host_template_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-host-template-info-module) – Query host templates in Icinga2
* [icinga\_hostgroup](icinga_hostgroup_module#ansible-collections-t-systems-mms-icinga-director-icinga-hostgroup-module) – Manage hostgroups in Icinga2
* [icinga\_hostgroup\_info](icinga_hostgroup_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-hostgroup-info-module) – Query hostgroups in Icinga2
* [icinga\_notification](icinga_notification_module#ansible-collections-t-systems-mms-icinga-director-icinga-notification-module) – Manage notifications in Icinga2
* [icinga\_notification\_info](icinga_notification_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-notification-info-module) – Query notifications in Icinga2
* [icinga\_notification\_template](icinga_notification_template_module#ansible-collections-t-systems-mms-icinga-director-icinga-notification-template-module) – Manage notification templates in Icinga2
* [icinga\_notification\_template\_info](icinga_notification_template_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-notification-template-info-module) – Query notification templates in Icinga2
* [icinga\_service](icinga_service_module#ansible-collections-t-systems-mms-icinga-director-icinga-service-module) – Manage services in Icinga2
* [icinga\_service\_apply](icinga_service_apply_module#ansible-collections-t-systems-mms-icinga-director-icinga-service-apply-module) – Manage service apply rules in Icinga2
* [icinga\_service\_apply\_info](icinga_service_apply_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-service-apply-info-module) – Query service apply rules in Icinga2
* [icinga\_service\_info](icinga_service_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-service-info-module) – Query services in Icinga2
* [icinga\_service\_template](icinga_service_template_module#ansible-collections-t-systems-mms-icinga-director-icinga-service-template-module) – Manage service templates in Icinga2
* [icinga\_service\_template\_info](icinga_service_template_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-service-template-info-module) – Query service templates in Icinga2
* [icinga\_servicegroup](icinga_servicegroup_module#ansible-collections-t-systems-mms-icinga-director-icinga-servicegroup-module) – Manage servicegroups in Icinga2
* [icinga\_servicegroup\_info](icinga_servicegroup_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-servicegroup-info-module) – Query servicegroups in Icinga2
* [icinga\_timeperiod](icinga_timeperiod_module#ansible-collections-t-systems-mms-icinga-director-icinga-timeperiod-module) – Manage timeperiods in Icinga2
* [icinga\_timeperiod\_info](icinga_timeperiod_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-timeperiod-info-module) – Query timeperiods in Icinga2
* [icinga\_timeperiod\_template](icinga_timeperiod_template_module#ansible-collections-t-systems-mms-icinga-director-icinga-timeperiod-template-module) – Manage timeperiod templates in Icinga2
* [icinga\_timeperiod\_template\_info](icinga_timeperiod_template_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-timeperiod-template-info-module) – Query timeperiod templates in Icinga2
* [icinga\_user](icinga_user_module#ansible-collections-t-systems-mms-icinga-director-icinga-user-module) – Manage users in Icinga2
* [icinga\_user\_group](icinga_user_group_module#ansible-collections-t-systems-mms-icinga-director-icinga-user-group-module) – Manage users groups in Icinga2
* [icinga\_user\_group\_info](icinga_user_group_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-user-group-info-module) – Query user groups in Icinga2
* [icinga\_user\_info](icinga_user_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-user-info-module) – Query users in Icinga2
* [icinga\_user\_template](icinga_user_template_module#ansible-collections-t-systems-mms-icinga-director-icinga-user-template-module) – Manage user templates in Icinga2
* [icinga\_user\_template\_info](icinga_user_template_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-user-template-info-module) – Query user templates in Icinga2
* [icinga\_zone](icinga_zone_module#ansible-collections-t-systems-mms-icinga-director-icinga-zone-module) – Manage zones in Icinga2
* [icinga\_zone\_info](icinga_zone_info_module#ansible-collections-t-systems-mms-icinga-director-icinga-zone-info-module) – Query zones in Icinga2

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/t_systems_mms/icinga_director/index.html>

Vyos.Vyos
=========

 Collection version 2.6.0

 Plugin Index
------------

 These are the plugins in the vyos.vyos collection

 ### Cliconf Plugins

 * [vyos](vyos_cliconf#ansible-collections-vyos-vyos-vyos-cliconf) – Use vyos cliconf to run command on VyOS platform

 ### Modules

 * [vyos\_banner](vyos_banner_module#ansible-collections-vyos-vyos-vyos-banner-module) – Manage multiline banners on VyOS devices
* [vyos\_bgp\_address\_family](vyos_bgp_address_family_module#ansible-collections-vyos-vyos-vyos-bgp-address-family-module) – BGP Address Family Resource Module.
* [vyos\_bgp\_global](vyos_bgp_global_module#ansible-collections-vyos-vyos-vyos-bgp-global-module) – BGP Global Resource Module.
* [vyos\_command](vyos_command_module#ansible-collections-vyos-vyos-vyos-command-module) – Run one or more commands on VyOS devices
* [vyos\_config](vyos_config_module#ansible-collections-vyos-vyos-vyos-config-module) – Manage VyOS configuration on remote device
* [vyos\_facts](vyos_facts_module#ansible-collections-vyos-vyos-vyos-facts-module) – Get facts about vyos devices.
* [vyos\_firewall\_global](vyos_firewall_global_module#ansible-collections-vyos-vyos-vyos-firewall-global-module) – FIREWALL global resource module
* [vyos\_firewall\_interfaces](vyos_firewall_interfaces_module#ansible-collections-vyos-vyos-vyos-firewall-interfaces-module) – FIREWALL interfaces resource module
* [vyos\_firewall\_rules](vyos_firewall_rules_module#ansible-collections-vyos-vyos-vyos-firewall-rules-module) – FIREWALL rules resource module
* [vyos\_interface](vyos_interface_module#ansible-collections-vyos-vyos-vyos-interface-module) – (deprecated, removed after 2022-06-01) Manage Interface on VyOS network devices
* [vyos\_interfaces](vyos_interfaces_module#ansible-collections-vyos-vyos-vyos-interfaces-module) – Interfaces resource module
* [vyos\_l3\_interface](vyos_l3_interface_module#ansible-collections-vyos-vyos-vyos-l3-interface-module) – (deprecated, removed after 2022-06-01) Manage L3 interfaces on VyOS network devices
* [vyos\_l3\_interfaces](vyos_l3_interfaces_module#ansible-collections-vyos-vyos-vyos-l3-interfaces-module) – L3 interfaces resource module
* [vyos\_lag\_interfaces](vyos_lag_interfaces_module#ansible-collections-vyos-vyos-vyos-lag-interfaces-module) – LAG interfaces resource module
* [vyos\_linkagg](vyos_linkagg_module#ansible-collections-vyos-vyos-vyos-linkagg-module) – (deprecated, removed after 2022-06-01) Manage link aggregation groups on VyOS network devices
* [vyos\_lldp](vyos_lldp_module#ansible-collections-vyos-vyos-vyos-lldp-module) – (deprecated, removed after 2022-06-01) Manage LLDP configuration on VyOS network devices
* [vyos\_lldp\_global](vyos_lldp_global_module#ansible-collections-vyos-vyos-vyos-lldp-global-module) – LLDP global resource module
* [vyos\_lldp\_interface](vyos_lldp_interface_module#ansible-collections-vyos-vyos-vyos-lldp-interface-module) – (deprecated, removed after 2022-06-01) Manage LLDP interfaces configuration on VyOS network devices
* [vyos\_lldp\_interfaces](vyos_lldp_interfaces_module#ansible-collections-vyos-vyos-vyos-lldp-interfaces-module) – LLDP interfaces resource module
* [vyos\_logging](vyos_logging_module#ansible-collections-vyos-vyos-vyos-logging-module) – Manage logging on network devices
* [vyos\_logging\_global](vyos_logging_global_module#ansible-collections-vyos-vyos-vyos-logging-global-module) – Logging resource module
* [vyos\_ntp\_global](vyos_ntp_global_module#ansible-collections-vyos-vyos-vyos-ntp-global-module) – Manages ntp modules of Vyos network devices
* [vyos\_ospf\_interfaces](vyos_ospf_interfaces_module#ansible-collections-vyos-vyos-vyos-ospf-interfaces-module) – OSPF Interfaces Resource Module.
* [vyos\_ospfv2](vyos_ospfv2_module#ansible-collections-vyos-vyos-vyos-ospfv2-module) – OSPFv2 resource module
* [vyos\_ospfv3](vyos_ospfv3_module#ansible-collections-vyos-vyos-vyos-ospfv3-module) – OSPFV3 resource module
* [vyos\_ping](vyos_ping_module#ansible-collections-vyos-vyos-vyos-ping-module) – Tests reachability using ping from VyOS network devices
* [vyos\_prefix\_lists](vyos_prefix_lists_module#ansible-collections-vyos-vyos-vyos-prefix-lists-module) – Prefix-Lists resource module for VyOS
* [vyos\_route\_maps](vyos_route_maps_module#ansible-collections-vyos-vyos-vyos-route-maps-module) – Route Map Resource Module.
* [vyos\_static\_route](vyos_static_route_module#ansible-collections-vyos-vyos-vyos-static-route-module) – (deprecated, removed after 2022-06-01) Manage static IP routes on Vyatta VyOS network devices
* [vyos\_static\_routes](vyos_static_routes_module#ansible-collections-vyos-vyos-vyos-static-routes-module) – Static routes resource module
* [vyos\_system](vyos_system_module#ansible-collections-vyos-vyos-vyos-system-module) – Run `set system` commands on VyOS devices
* [vyos\_user](vyos_user_module#ansible-collections-vyos-vyos-vyos-user-module) – Manage the collection of local users on VyOS device
* [vyos\_vlan](vyos_vlan_module#ansible-collections-vyos-vyos-vyos-vlan-module) – Manage VLANs on VyOS network devices

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/vyos/vyos/index.html>

Wti.Remote
==========

 Collection version 1.0.1

 Plugin Index
------------

 These are the plugins in the wti.remote collection

 ### Lookup Plugins

 * [cpm\_metering](cpm_metering_lookup#ansible-collections-wti-remote-cpm-metering-lookup) – Get Power and Current data from WTI OOB/Combo and PDU devices
* [cpm\_status](cpm_status_lookup#ansible-collections-wti-remote-cpm-status-lookup) – Get status and parameters from WTI OOB and PDU devices.

 ### Modules

 * [cpm\_alarm\_info](cpm_alarm_info_module#ansible-collections-wti-remote-cpm-alarm-info-module) – Get alarm information from WTI OOB and PDU devices
* [cpm\_config\_backup](cpm_config_backup_module#ansible-collections-wti-remote-cpm-config-backup-module) – Get parameters from WTI OOB and PDU devices
* [cpm\_config\_restore](cpm_config_restore_module#ansible-collections-wti-remote-cpm-config-restore-module) – Get parameters from WTI OOB and PDU devices
* [cpm\_current\_info](cpm_current_info_module#ansible-collections-wti-remote-cpm-current-info-module) – Get the Current Information of a WTI device
* [cpm\_firmware\_info](cpm_firmware_info_module#ansible-collections-wti-remote-cpm-firmware-info-module) – Get firmware information from WTI OOB and PDU devices
* [cpm\_interface\_config](cpm_interface_config_module#ansible-collections-wti-remote-cpm-interface-config-module) – Set network interface parameters in WTI OOB and PDU devices
* [cpm\_interface\_info](cpm_interface_info_module#ansible-collections-wti-remote-cpm-interface-info-module) – Get network interface parameters from WTI OOB and PDU devices
* [cpm\_iptables\_config](cpm_iptables_config_module#ansible-collections-wti-remote-cpm-iptables-config-module) – Set network IPTables parameters in WTI OOB and PDU devices
* [cpm\_iptables\_info](cpm_iptables_info_module#ansible-collections-wti-remote-cpm-iptables-info-module) – Get network IPTABLES parameters from WTI OOB and PDU devices
* [cpm\_plugconfig](cpm_plugconfig_module#ansible-collections-wti-remote-cpm-plugconfig-module) – Get and Set Plug Parameters on WTI OOB and PDU power devices
* [cpm\_plugcontrol](cpm_plugcontrol_module#ansible-collections-wti-remote-cpm-plugcontrol-module) – Get and Set Plug actions on WTI OOB and PDU power devices
* [cpm\_power\_info](cpm_power_info_module#ansible-collections-wti-remote-cpm-power-info-module) – Get the Power Information of a WTI device
* [cpm\_serial\_port\_config](cpm_serial_port_config_module#ansible-collections-wti-remote-cpm-serial-port-config-module) – Set Serial port parameters in WTI OOB and PDU devices
* [cpm\_serial\_port\_info](cpm_serial_port_info_module#ansible-collections-wti-remote-cpm-serial-port-info-module) – Get Serial port parameters in WTI OOB and PDU devices
* [cpm\_snmp\_config](cpm_snmp_config_module#ansible-collections-wti-remote-cpm-snmp-config-module) – Set network IPTables parameters in WTI OOB and PDU devices
* [cpm\_snmp\_info](cpm_snmp_info_module#ansible-collections-wti-remote-cpm-snmp-info-module) – Get network SNMP parameters from WTI OOB and PDU devices
* [cpm\_status\_info](cpm_status_info_module#ansible-collections-wti-remote-cpm-status-info-module) – Get general status information from WTI OOB and PDU devices
* [cpm\_temp\_info](cpm_temp_info_module#ansible-collections-wti-remote-cpm-temp-info-module) – Get temperature information from WTI OOB and PDU devices
* [cpm\_time\_config](cpm_time_config_module#ansible-collections-wti-remote-cpm-time-config-module) – Set Time/Date parameters in WTI OOB and PDU devices.
* [cpm\_time\_info](cpm_time_info_module#ansible-collections-wti-remote-cpm-time-info-module) – Get Time/Date parameters in WTI OOB and PDU devices
* [cpm\_user](cpm_user_module#ansible-collections-wti-remote-cpm-user-module) – Get various status and parameters from WTI OOB and PDU devices

  See also

 List of [collections](../../index#list-of-collections) with docs hosted here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/wti/remote/index.html>

ansible
=======

 **Define and run a single task ‘playbook’ against a set of hosts**

 * [Synopsis](#synopsis)
* [Description](#description)
* [Common Options](#common-options)
* [Environment](#environment)
* [Files](#files)
* [Author](#author)
* [License](#license)
* [See also](#see-also)

 Synopsis
--------

 
```
usage: ansible [-h] [--version] [-v] [-b] [--become-method BECOME_METHOD]
            [--become-user BECOME_USER] [-K] [-i INVENTORY] [--list-hosts]
            [-l SUBSET] [-P POLL_INTERVAL] [-B SECONDS] [-o] [-t TREE] [-k]
            [--private-key PRIVATE_KEY_FILE] [-u REMOTE_USER]
            [-c CONNECTION] [-T TIMEOUT]
            [--ssh-common-args SSH_COMMON_ARGS]
            [--sftp-extra-args SFTP_EXTRA_ARGS]
            [--scp-extra-args SCP_EXTRA_ARGS]
            [--ssh-extra-args SSH_EXTRA_ARGS] [-C] [--syntax-check] [-D]
            [-e EXTRA_VARS] [--vault-id VAULT_IDS]
            [--ask-vault-password | --vault-password-file VAULT_PASSWORD_FILES]
            [-f FORKS] [-M MODULE_PATH] [--playbook-dir BASEDIR]
            [--task-timeout TASK_TIMEOUT] [-a MODULE_ARGS] [-m MODULE_NAME]
            pattern

```
 Description
-----------

 is an extra-simple tool/framework/API for doing ‘remote things’. this command allows you to define and run a single task ‘playbook’ against a set of hosts

 Common Options
--------------

  
`--ask-vault-password, --ask-vault-pass`  
ask for vault password

 
  
`--become-method <BECOME_METHOD>`  
privilege escalation method to use (default=sudo), use `ansible-doc -t become -l` to list valid choices.

 
  
`--become-user <BECOME_USER>`  
run operations as this user (default=root)

 
  
`--list-hosts`  
outputs a list of matching hosts; does not execute anything else

 
  
`--playbook-dir <BASEDIR>`  
Since this tool does not use playbooks, use this as a substitute playbook directory.This sets the relative path for many features including roles/ group\_vars/ etc.

 
  
`--private-key <PRIVATE_KEY_FILE>, --key-file <PRIVATE_KEY_FILE>`  
use this file to authenticate the connection

 
  
`--scp-extra-args <SCP_EXTRA_ARGS>`  
specify extra arguments to pass to scp only (e.g. -l)

 
  
`--sftp-extra-args <SFTP_EXTRA_ARGS>`  
specify extra arguments to pass to sftp only (e.g. -f, -l)

 
  
`--ssh-common-args <SSH_COMMON_ARGS>`  
specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)

 
  
`--ssh-extra-args <SSH_EXTRA_ARGS>`  
specify extra arguments to pass to ssh only (e.g. -R)

 
  
`--syntax-check`  
perform a syntax check on the playbook, but do not execute it

 
  
`--task-timeout <TASK_TIMEOUT>`  
set task timeout limit in seconds, must be positive integer.

 
  
`--vault-id`  
the vault identity to use

 
  
`--vault-password-file, --vault-pass-file`  
vault password file

 
  
`--version`  
show program’s version number, config file location, configured module search path, module location, executable location and exit

 
  
`-B <SECONDS>, --background <SECONDS>`  
run asynchronously, failing after X seconds (default=N/A)

 
  
`-C, --check`  
don’t make any changes; instead, try to predict some of the changes that may occur

 
  
`-D, --diff`  
when changing (small) files and templates, show the differences in those files; works great with –check

 
  
`-K, --ask-become-pass`  
ask for privilege escalation password

 
  
`-M, --module-path`  
prepend colon-separated path(s) to module library (default=~/.ansible/plugins/modules:/usr/share/ansible/plugins/modules)

 
  
`-P <POLL_INTERVAL>, --poll <POLL_INTERVAL>`  
set the poll interval if using -B (default=15)

 
  
`-T <TIMEOUT>, --timeout <TIMEOUT>`  
override the connection timeout in seconds (default=10)

 
  
`-a <MODULE_ARGS>, --args <MODULE_ARGS>`  
The action’s options in space separated k=v format: -a ‘opt1=val1 opt2=val2’

 
  
`-b, --become`  
run operations with become (does not imply password prompting)

 
  
`-c <CONNECTION>, --connection <CONNECTION>`  
connection type to use (default=smart)

 
  
`-e, --extra-vars`  
set additional variables as key=value or YAML/JSON, if filename prepend with @

 
  
`-f <FORKS>, --forks <FORKS>`  
specify number of parallel processes to use (default=5)

 
  
`-h, --help`  
show this help message and exit

 
  
`-i, --inventory, --inventory-file`  
specify inventory host path or comma separated host list. –inventory-file is deprecated

 
  
`-k, --ask-pass`  
ask for connection password

 
  
`-l <SUBSET>, --limit <SUBSET>`  
further limit selected hosts to an additional pattern

 
  
`-m <MODULE_NAME>, --module-name <MODULE_NAME>`  
Name of the action to execute (default=command)

 
  
`-o, --one-line`  
condense output

 
  
`-t <TREE>, --tree <TREE>`  
log output to this directory

 
  
`-u <REMOTE_USER>, --user <REMOTE_USER>`  
connect as this user (default=None)

 
  
`-v, --verbose`  
verbose mode (-vvv for more, -vvvv to enable connection debugging)

 
 Environment
-----------

 The following environment variables may be specified.

 [`ANSIBLE_CONFIG`](../reference_appendices/config#envvar-ANSIBLE_CONFIG) – Override the default ansible config file

 Many more are available for most options in ansible.cfg

 Files
-----

 `/etc/ansible/ansible.cfg` – Config file, used if present

 `~/.ansible.cfg` – User config file, overrides the default config if present

 Author
------

 Ansible was originally written by Michael DeHaan.

 See the `AUTHORS` file for a complete list of contributors.

 License
-------

 Ansible is released under the terms of the GPLv3+ License.

 See also
--------

 *ansible(1)*, *ansible-config(1)*, *ansible-console(1)*, *ansible-doc(1)*, *ansible-galaxy(1)*, *ansible-inventory(1)*, *ansible-playbook(1)*, *ansible-pull(1)*, *ansible-vault(1)*,



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/cli/ansible.html>

arista.eos.eos\_interfaces – Interfaces resource module
=======================================================

  Note

 This plugin is part of the [arista.eos collection](https://galaxy.ansible.com/arista/eos) (version 2.2.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install arista.eos`.

 To use it in a playbook, specify: `arista.eos.eos_interfaces`.

   New in version 1.0.0: of arista.eos

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * This module manages the interface attributes of Arista EOS interfaces.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **config**  list / elements=dictionary  |  | The provided configuration |
|  | **description**  string  |  | Interface description |
|  | **duplex**  string  |  | Interface link status. Applicable for Ethernet interfaces only. Values other than `auto` must also set *speed*. Ignored when *speed* is set above `1000`. |
|  | **enabled**  boolean  | **Choices:*** no
* **yes** ←
 | Administrative state of the interface. Set the value to `true` to administratively enable the interface or `false` to disable it. |
|  | **mode**  string  | **Choices:*** layer2
* layer3
 | Manage Layer2 or Layer3 state of the interface. Applicable for Ethernet and port channel interfaces only. |
|  | **mtu**  integer  |  | MTU for a specific interface. Must be an even number between 576 and 9216. Applicable for Ethernet interfaces only. |
|  | **name**  string / required  |  | Full name of the interface, e.g. GigabitEthernet1. |
|  | **speed**  string  |  | Interface link speed. Applicable for Ethernet interfaces only. |
| **running\_config**  string  |  | This option is used only with state *parsed*. The value of this option should be the output received from the EOS device by executing the command **show running-config | section ^interface**. The state *parsed* reads the configuration from `running_config` option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the *parsed* key within the result. |
| **state**  string  | **Choices:*** **merged** ←
* replaced
* overridden
* deleted
* parsed
* rendered
* gathered
 | The state of the configuration after module completion. |

   
 Notes
-----

  Note

 * Tested against Arista EOS 4.20.10M
* This module works with connection `network_cli`. See the [EOS Platform Options](../network/user_guide/platform_eos).

  Examples
--------

 
```
# Using merged

# Before state:
# -------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    description "Interface 1"
# !
# interface Ethernet2
# !
# interface Management1
#    description "Management interface"
#    ip address dhcp
# !

- name: Merge provided configuration with device configuration
  arista.eos.eos_interfaces:
    config:
    - name: Ethernet1
      enabled: true
      mode: layer3
    - name: Ethernet2
      description: Configured by Ansible
      enabled: false
    state: merged

# After state:
# ------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    description "Interface 1"
#    no switchport
# !
# interface Ethernet2
#    description "Configured by Ansible"
#    shutdown
# !
# interface Management1
#    description "Management interface"
#    ip address dhcp
# !

# Using replaced

# Before state:
# -------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    description "Interface 1"
# !
# interface Ethernet2
# !
# interface Management1
#    description "Management interface"
#    ip address dhcp
# !

- name: Replaces device configuration of listed interfaces with provided configuration
  arista.eos.eos_interfaces:
    config:
    - name: Ethernet1
      enabled: true
    - name: Ethernet2
      description: Configured by Ansible
      enabled: false
    state: replaced

# After state:
# ------------
#
# veos#show running-config | section interface
# interface Ethernet1
# !
# interface Ethernet2
#    description "Configured by Ansible"
#    shutdown
# !
# interface Management1
#    description "Management interface"
#    ip address dhcp
# !

# Using overridden

# Before state:
# -------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    description "Interface 1"
# !
# interface Ethernet2
# !
# interface Management1
#    description "Management interface"
#    ip address dhcp
# !

- name: Overrides all device configuration with provided configuration
  arista.eos.eos_interfaces:
    config:
    - name: Ethernet1
      enabled: true
    - name: Ethernet2
      description: Configured by Ansible
      enabled: false
    state: overridden

# After state:
# ------------
#
# veos#show running-config | section interface
# interface Ethernet1
# !
# interface Ethernet2
#    description "Configured by Ansible"
#    shutdown
# !
# interface Management1
#    ip address dhcp
# !

# Using deleted

# Before state:
# -------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    description "Interface 1"
#    no switchport
# !
# interface Ethernet2
# !
# interface Management1
#    description "Management interface"
#    ip address dhcp
# !

- name: Delete or return interface parameters to default settings
  arista.eos.eos_interfaces:
    config:
    - name: Ethernet1
    state: deleted

# After state:
# ------------
#
# veos#show running-config | section interface
# interface Ethernet1
# !
# interface Ethernet2
# !
# interface Management1
#    description "Management interface"
#    ip address dhcp
# !

# Using rendered

- name: Use Rendered to convert the structured data to native config
  arista.eos.eos_interfaces:
    config:
    - name: Ethernet1
      enabled: true
      mode: layer3
    - name: Ethernet2
      description: Configured by Ansible
      enabled: false
    state: merged

# Output:
# ------------

# - "interface Ethernet1"
# - "description "Interface 1""
# - "no swithcport"
# - "interface Ethernet2"
# - "description "Configured by Ansible""
# - "shutdown"
# - "interface Management1"
# - "description "Management interface""
# - "ip address dhcp"

# Using parsed
# parsed.cfg

# interface Ethernet1
#    description "Interface 1"
# !
# interface Ethernet2
#    description "Configured by Ansible"
#    shutdown
# !

- name: Use parsed to convert native configs to structured data
  arista.eos.interfaces:
    running_config: "{{ lookup('file', 'parsed.cfg') }}"
    state: parsed

# Output
# parsed:
#     - name: Ethernet1
#       enabled: True
#       mode: layer2
#     - name: Ethernet2
#       description: 'Configured by Ansible'
#       enabled: False
#       mode: layer2

# Using gathered:

# Existing config on the device
# -----------------------------
# interface Ethernet1
#    description "Interface 1"
# !
# interface Ethernet2
#    description "Configured by Ansible"
#    shutdown
# !

- name: Gather interfaces facts from the device
  arista.eos.interfaces:
    state: gathered

# output
# gathered:
#      - name: Ethernet1
#        enabled: True
#        mode: layer2
#      - name: Ethernet2
#        description: 'Configured by Ansible'
#        enabled: False
#        mode: layer2

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **after**  dictionary  | when changed | The configuration as structured data after module completion.  **Sample:** The configuration returned will always be in the same format of the parameters above. |
| **before**  dictionary  | always | The configuration as structured data prior to module invocation.  **Sample:** The configuration returned will always be in the same format of the parameters above. |
| **commands**  list / elements=string  | always | The set of commands pushed to the remote device.  **Sample:** ['interface Ethernet2', 'shutdown', 'speed 10full'] |

   
  
 ### Authors

 * Nathaniel Case (@qalthos)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/arista/eos/eos_interfaces_module.html>

Cisco Meraki Guide
==================

 * [What is Cisco Meraki?](#what-is-cisco-meraki)


	+ [MS Switches](#ms-switches)
	+ [MX Firewalls](#mx-firewalls)
	+ [MR Wireless Access Points](#mr-wireless-access-points)
* [Using the Meraki modules](#using-the-meraki-modules)
* [Common Parameters](#common-parameters)
* [Meraki Authentication](#meraki-authentication)
* [Returned Data Structures](#returned-data-structures)
* [Handling Returned Data](#handling-returned-data)
* [Merging Existing and New Data](#merging-existing-and-new-data)
* [Error Handling](#error-handling)

 What is Cisco Meraki?
---------------------

 Cisco Meraki is an easy-to-use, cloud-based, network infrastructure platform for enterprise environments. While most network hardware uses command-line interfaces (CLIs) for configuration, Meraki uses an easy-to-use Dashboard hosted in the Meraki cloud. No on-premises management hardware or software is required - only the network infrastructure to run your business.

 ### MS Switches

 Meraki MS switches come in multiple flavors and form factors. Meraki switches support 10/100/1000/10000 ports, as well as Cisco’s mGig technology for 2.5/5/10Gbps copper connectivity. 8, 24, and 48 port flavors are available with PoE (802.3af/802.3at/UPoE) available on many models.

 ### MX Firewalls

 Meraki’s MX firewalls support full layer 3-7 deep packet inspection. MX firewalls are compatible with a variety of VPN technologies including IPSec, SSL VPN, and Meraki’s easy-to-use AutoVPN.

 ### MR Wireless Access Points

 MR access points are enterprise-class, high-performance access points for the enterprise. MR access points have MIMO technology and integrated beamforming built-in for high performance applications. BLE allows for advanced location applications to be developed with no on-premises analytics platforms.

 Using the Meraki modules
------------------------

 Meraki modules provide a user-friendly interface to manage your Meraki environment using Ansible. For example, details about SNMP settings for a particular organization can be discovered using the module `meraki_snmp <meraki_snmp_module>`.

 
```
- name: Query SNMP settings
  meraki_snmp:
    api_key: abc123
    org_name: AcmeCorp
    state: query
  delegate_to: localhost

```
 Information about a particular object can be queried. For example, the `meraki_admin <meraki_admin_module>` module supports

 
```
- name: Gather information about Jane Doe
  meraki_admin:
    api_key: abc123
    org_name: AcmeCorp
    state: query
    email: janedoe@email.com
  delegate_to: localhost

```
 Common Parameters
-----------------

 All Ansible Meraki modules support the following parameters which affect communication with the Meraki Dashboard API. Most of these should only be used by Meraki developers and not the general public.

  host

Hostname or IP of Meraki Dashboard.

  use\_https

Specifies whether communication should be over HTTPS. (Defaults to `yes`)

  use\_proxy

Whether to use a proxy for any communication.

  validate\_certs

Determine whether certificates should be validated or trusted. (Defaults to `yes`)

   These are the common parameters which are used for most every module.

  org\_name

Name of organization to perform actions in.

  org\_id

ID of organization to perform actions in.

  net\_name

Name of network to perform actions in.

  net\_id

ID of network to perform actions in.

  state

General specification of what action to take. `query` does lookups. `present` creates or edits. `absent` deletes.

    Hint

 Use the `org_id` and `net_id` parameters when possible. `org_name` and `net_name` require additional behind-the-scenes API calls to learn the ID values. `org_id` and `net_id` will perform faster.

  Meraki Authentication
---------------------

 All API access with the Meraki Dashboard requires an API key. An API key can be generated from the organization’s settings page. Each play in a playbook requires the `api_key` parameter to be specified.

 The “Vault” feature of Ansible allows you to keep sensitive data such as passwords or keys in encrypted files, rather than as plain text in your playbooks or roles. These vault files can then be distributed or placed in source control. See [Using encrypted variables and files](../user_guide/vault#playbooks-vault) for more information.

 Meraki’s API returns a 404 error if the API key is not correct. It does not provide any specific error saying the key is incorrect. If you receive a 404 error, check the API key first.

 Returned Data Structures
------------------------

 Meraki and its related Ansible modules return most information in the form of a list. For example, this is returned information by `meraki_admin` querying administrators. It returns a list even though there’s only one.

 
```
[
    {
        "orgAccess": "full",
        "name": "John Doe",
        "tags": [],
        "networks": [],
        "email": "john@doe.com",
        "id": "12345677890"
    }
]

```
 Handling Returned Data
----------------------

 Since Meraki’s response data uses lists instead of properly keyed dictionaries for responses, certain strategies should be used when querying data for particular information. For many situations, use the `selectattr()` Jinja2 function.

 Merging Existing and New Data
-----------------------------

 Ansible’s Meraki modules do not allow for manipulating data. For example, you may need to insert a rule in the middle of a firewall ruleset. Ansible and the Meraki modules lack a way to directly merge to manipulate data. However, a playlist can use a few tasks to split the list where you need to insert a rule and then merge them together again with the new rule added. The steps involved are as follows:

 1. Create blank “front” and “back” lists.


```
vars:
  - front_rules: []
  - back_rules: []

```
2. Get existing firewall rules from Meraki and create a new variable.


```
- name: Get firewall rules
  meraki_mx_l3_firewall:
    auth_key: abc123
    org_name: YourOrg
    net_name: YourNet
    state: query
  delegate_to: localhost
  register: rules
- set_fact:
    original_ruleset: '{{rules.data}}'

```
3. `Write the new rule. The new rule needs to be in a list so it can be merged with other lists in an upcoming step. The blank - puts the rule in a list so it can be merged.` 


```
- set_fact:
    new_rule:
      -
        - comment: Block traffic to server
          src_cidr: 192.0.1.0/24
          src_port: any
          dst_cidr: 192.0.1.2/32
          dst_port: any
          protocol: any
          policy: deny

```
4. Split the rules into two lists. This assumes the existing ruleset is 2 rules long.


```
- set_fact:
    front_rules: '{{front_rules + [ original_ruleset[:1] ]}}'
- set_fact:
    back_rules: '{{back_rules + [ original_ruleset[1:] ]}}'

```
5. Merge rules with the new rule in the middle.


```
- set_fact:
    new_ruleset: '{{front_rules + new_rule + back_rules}}'

```
6. Upload new ruleset to Meraki.


```
- name: Set two firewall rules
  meraki_mx_l3_firewall:
    auth_key: abc123
    org_name: YourOrg
    net_name: YourNet
    state: present
    rules: '{{ new_ruleset }}'
  delegate_to: localhost

```

 Error Handling
--------------

 Ansible’s Meraki modules will often fail if improper or incompatible parameters are specified. However, there will likely be scenarios where the module accepts the information but the Meraki API rejects the data. If this happens, the error will be returned in the `body` field for HTTP status of 400 return code.

 Meraki’s API returns a 404 error if the API key is not correct. It does not provide any specific error saying the key is incorrect. If you receive a 404 error, check the API key first. 404 errors can also occur if improper object IDs (ex. `org_id`) are specified.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_meraki.html>

ansible.builtin.include\_role – Load and execute a role
=======================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `include_role` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 2.2: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Dynamically loads and executes a specified role as a task.
* May be used only where Ansible tasks are allowed - inside `pre_tasks`, `tasks`, or `post_tasks` play objects, or as a task inside a role.
* Task-level keywords, loops, and conditionals apply only to the `include_role` statement itself.
* To apply keywords to the tasks within the role, pass them using the `apply` option or use [ansible.builtin.import\_role](import_role_module#ansible-collections-ansible-builtin-import-role-module) instead.
* Ignores some keywords, like `until` and `retries`.
* This module is also supported for Windows targets.
* Does not work in handlers.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_duplicates**  boolean  | **Choices:*** no
* **yes** ←
 | Overrides the role's metadata setting to allow using a role more than once with the same parameters. |
| **apply**  string   added in 2.7 of ansible.builtin  |  | Accepts a hash of task keywords (e.g. `tags`, `become`) that will be applied to all tasks within the included role. |
| **defaults\_from**  string  | **Default:**"main" | File to load from a role's `defaults/` directory. |
| **handlers\_from**  string   added in 2.8 of ansible.builtin  | **Default:**"main" | File to load from a role's `handlers/` directory. |
| **name**  string / required  |  | The name of the role to be executed. |
| **public**  boolean   added in 2.7 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | This option dictates whether the role's `vars` and `defaults` are exposed to the play. If set to `yes` the variables will be available to tasks following the `include_role` task. This functionality differs from standard variable exposure for roles listed under the `roles` header or `import_role` as they are exposed to the play at playbook parsing time, and available to earlier roles and tasks as well. |
| **rolespec\_validate**  boolean   added in 2.11 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | Perform role argument spec validation if an argument spec is defined. |
| **tasks\_from**  string  | **Default:**"main" | File to load from a role's `tasks/` directory. |
| **vars\_from**  string  | **Default:**"main" | File to load from a role's `vars/` directory. |

   
 Notes
-----

  Note

 * Handlers are made available to the whole play.
* Before Ansible 2.4, as with `include`, this task could be static or dynamic, If static, it implied that it won’t need templating, loops or conditionals and will show included tasks in the `--list` options. Ansible would try to autodetect what is needed, but you can set `static` to `yes` or `no` at task level to control this.
* After Ansible 2.4, you can use [ansible.builtin.import\_role](import_role_module#ansible-collections-ansible-builtin-import-role-module) for `static` behaviour and this action for `dynamic` one.

  See Also
--------

  See also

  [ansible.builtin.import\_playbook](import_playbook_module#ansible-collections-ansible-builtin-import-playbook-module)

The official documentation on the **ansible.builtin.import\_playbook** module.

  [ansible.builtin.import\_role](import_role_module#ansible-collections-ansible-builtin-import-role-module)

The official documentation on the **ansible.builtin.import\_role** module.

  [ansible.builtin.import\_tasks](import_tasks_module#ansible-collections-ansible-builtin-import-tasks-module)

The official documentation on the **ansible.builtin.import\_tasks** module.

  [ansible.builtin.include\_tasks](include_tasks_module#ansible-collections-ansible-builtin-include-tasks-module)

The official documentation on the **ansible.builtin.include\_tasks** module.

  [Including and importing](../../../user_guide/playbooks_reuse_includes#playbooks-reuse-includes)

More information related to including and importing playbooks, roles and tasks.

    Examples
--------

 
```
- include_role:
    name: myrole

- name: Run tasks/other.yaml instead of 'main'
  include_role:
    name: myrole
    tasks_from: other

- name: Pass variables to role
  include_role:
    name: myrole
  vars:
    rolevar1: value from task

- name: Use role in loop
  include_role:
    name: '{{ roleinputvar }}'
  loop:
    - '{{ roleinput1 }}'
    - '{{ roleinput2 }}'
  loop_control:
    loop_var: roleinputvar

- name: Conditional role
  include_role:
    name: myrole
  when: not idontwanttorun

- name: Apply tags to tasks within included file
  include_role:
    name: install
    apply:
      tags:
        - install
  tags:
    - always

```
 ### Authors

 * Ansible Core Team (@ansible)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/include_role_module.html>

ansible.builtin.import\_role – Import a role into a play
========================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `import_role` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 2.4: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Much like the `roles:` keyword, this task loads a role, but it allows you to control when the role tasks run in between other tasks of the play.
* Most keywords, loops and conditionals will only be applied to the imported tasks, not to this statement itself. If you want the opposite behavior, use [ansible.builtin.include\_role](include_role_module#ansible-collections-ansible-builtin-include-role-module) instead.
* Does not work in handlers.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_duplicates**  boolean  | **Choices:*** no
* **yes** ←
 | Overrides the role's metadata setting to allow using a role more than once with the same parameters. |
| **defaults\_from**  string  | **Default:**"main" | File to load from a role's `defaults/` directory. |
| **handlers\_from**  string   added in 2.8 of ansible.builtin  | **Default:**"main" | File to load from a role's `handlers/` directory. |
| **name**  string / required  |  | The name of the role to be executed. |
| **rolespec\_validate**  boolean   added in 2.11 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | Perform role argument spec validation if an argument spec is defined. |
| **tasks\_from**  string  | **Default:**"main" | File to load from a role's `tasks/` directory. |
| **vars\_from**  string  | **Default:**"main" | File to load from a role's `vars/` directory. |

   
 Notes
-----

  Note

 * Handlers are made available to the whole play.
* Since Ansible 2.7 variables defined in `vars` and `defaults` for the role are exposed to the play at playbook parsing time. Due to this, these variables will be accessible to roles and tasks executed before the location of the [ansible.builtin.import\_role](#ansible-collections-ansible-builtin-import-role-module) task.
* Unlike [ansible.builtin.include\_role](include_role_module#ansible-collections-ansible-builtin-include-role-module) variable exposure is not configurable, and will always be exposed.

  See Also
--------

  See also

  [ansible.builtin.import\_playbook](import_playbook_module#ansible-collections-ansible-builtin-import-playbook-module)

The official documentation on the **ansible.builtin.import\_playbook** module.

  [ansible.builtin.import\_tasks](import_tasks_module#ansible-collections-ansible-builtin-import-tasks-module)

The official documentation on the **ansible.builtin.import\_tasks** module.

  [ansible.builtin.include\_role](include_role_module#ansible-collections-ansible-builtin-include-role-module)

The official documentation on the **ansible.builtin.include\_role** module.

  [ansible.builtin.include\_tasks](include_tasks_module#ansible-collections-ansible-builtin-include-tasks-module)

The official documentation on the **ansible.builtin.include\_tasks** module.

  [Including and importing](../../../user_guide/playbooks_reuse_includes#playbooks-reuse-includes)

More information related to including and importing playbooks, roles and tasks.

    Examples
--------

 
```
- hosts: all
  tasks:
    - import_role:
        name: myrole

    - name: Run tasks/other.yaml instead of 'main'
      import_role:
        name: myrole
        tasks_from: other

    - name: Pass variables to role
      import_role:
        name: myrole
      vars:
        rolevar1: value from task

    - name: Apply condition to each task in role
      import_role:
        name: myrole
      when: not idontwanttorun

```
 ### Authors

 * Ansible Core Team (@ansible)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/import_role_module.html>

ansible.builtin.setup – Gathers facts about remote hosts
========================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `setup` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * This module is automatically called by playbooks to gather useful variables about remote hosts that can be used in playbooks. It can also be executed directly by `/usr/bin/ansible` to check what variables are available to a host. Ansible provides many *facts* about the system, automatically.
* This module is also supported for Windows targets.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **fact\_path**  path   added in 1.3 of ansible.builtin  | **Default:**"/etc/ansible/facts.d" | Path used for local ansible facts (`*.fact`) - files in this dir will be run (if executable) and their results be added to `ansible_local` facts. If a file is not executable it is read instead. File/results format can be JSON or INI-format. The default `fact_path` can be specified in `ansible.cfg` for when setup is automatically called as part of `gather_facts`. NOTE - For windows clients, the results will be added to a variable named after the local file (without extension suffix), rather than `ansible_local`. Since Ansible 2.1, Windows hosts can use `fact_path`. Make sure that this path exists on the target host. Files in this path MUST be PowerShell scripts `.ps1` which outputs an object. This object will be formatted by Ansible as json so the script should be outputting a raw hashtable, array, or other primitive object. |
| **filter**  list / elements=string   added in 1.1 of ansible.builtin  | **Default:**[] | If supplied, only return facts that match one of the shell-style (fnmatch) pattern. An empty list basically means 'no filter'. As of Ansible 2.11, the type has changed from string to list and the default has became an empty list. A simple string is still accepted and works as a single pattern. The behaviour prior to Ansible 2.11 remains. |
| **gather\_subset**  list / elements=string   added in 2.1 of ansible.builtin  | **Default:**"all" | If supplied, restrict the additional facts collected to the given subset. Possible values: `all`, `min`, `hardware`, `network`, `virtual`, `ohai`, and `facter`. Can specify a list of values to specify a larger subset. Values can also be used with an initial `!` to specify that that specific subset should not be collected. For instance: `!hardware,!network,!virtual,!ohai,!facter`. If `!all` is specified then only the min subset is collected. To avoid collecting even the min subset, specify `!all,!min`. To collect only specific facts, use `!all,!min`, and specify the particular fact subsets. Use the filter parameter if you do not want to display some collected facts. |
| **gather\_timeout**  integer   added in 2.2 of ansible.builtin  | **Default:**10 | Set the default timeout in seconds for individual fact gathering. |

   
 Notes
-----

  Note

 * More ansible facts will be added with successive releases. If *facter* or *ohai* are installed, variables from these programs will also be snapshotted into the JSON file for usage in templating. These variables are prefixed with `facter_` and `ohai_` so it’s easy to tell their source. All variables are bubbled up to the caller. Using the ansible facts and choosing to not install *facter* and *ohai* means you can avoid Ruby-dependencies on your remote systems. (See also [community.general.facter](../../community/general/facter_module#ansible-collections-community-general-facter-module) and [community.general.ohai](../../community/general/ohai_module#ansible-collections-community-general-ohai-module).)
* The filter option filters only the first level subkey below ansible\_facts.
* If the target host is Windows, you will not currently have the ability to use `filter` as this is provided by a simpler implementation of the module.
* This module is also supported for Windows targets.
* This module should be run with elevated privileges on BSD systems to gather facts like ansible\_product\_version.
* Supports `check_mode`.
* For more information about delegated facts, please check [https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_delegation.html#delegating-facts](../../../user_guide/playbooks_delegation#delegating-facts).

  Examples
--------

 
```
# Display facts from all hosts and store them indexed by I(hostname) at C(/tmp/facts).
# ansible all -m ansible.builtin.setup --tree /tmp/facts

# Display only facts regarding memory found by ansible on all hosts and output them.
# ansible all -m ansible.builtin.setup -a 'filter=ansible_*_mb'

# Display only facts returned by facter.
# ansible all -m ansible.builtin.setup -a 'filter=facter_*'

# Collect only facts returned by facter.
# ansible all -m ansible.builtin.setup -a 'gather_subset=!all,!any,facter'

- name: Collect only facts returned by facter
  ansible.builtin.setup:
    gather_subset:
      - '!all'
      - '!any'
      - facter

- name: Collect only selected facts
  ansible.builtin.setup:
    filter:
      - 'ansible_distribution'
      - 'ansible_machine_id'
      - 'ansible_*_mb'

# Display only facts about certain interfaces.
# ansible all -m ansible.builtin.setup -a 'filter=ansible_eth[0-2]'

# Restrict additional gathered facts to network and virtual (includes default minimum facts)
# ansible all -m ansible.builtin.setup -a 'gather_subset=network,virtual'

# Collect only network and virtual (excludes default minimum facts)
# ansible all -m ansible.builtin.setup -a 'gather_subset=!all,!any,network,virtual'

# Do not call puppet facter or ohai even if present.
# ansible all -m ansible.builtin.setup -a 'gather_subset=!facter,!ohai'

# Only collect the default minimum amount of facts:
# ansible all -m ansible.builtin.setup -a 'gather_subset=!all'

# Collect no facts, even the default minimum subset of facts:
# ansible all -m ansible.builtin.setup -a 'gather_subset=!all,!min'

# Display facts from Windows hosts with custom facts stored in C(C:\custom_facts).
# ansible windows -m ansible.builtin.setup -a "fact_path='c:\custom_facts'"

# Gathers facts for the machines in the dbservers group (a.k.a Delegating facts)
- hosts: app_servers
  tasks:
    - name: Gather facts from db servers
      ansible.builtin.setup:
      delegate_to: "{{ item }}"
      delegate_facts: true
      loop: "{{ groups['dbservers'] }}"

```
 ### Authors

 * Ansible Core Team
* Michael DeHaan



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/setup_module.html>

ansible-playbook
================

 **Runs Ansible playbooks, executing the defined tasks on the targeted hosts.**

 * [Synopsis](#synopsis)
* [Description](#description)
* [Common Options](#common-options)
* [Environment](#environment)
* [Files](#files)
* [Author](#author)
* [License](#license)
* [See also](#see-also)

 Synopsis
--------

 
```
usage: ansible-playbook [-h] [--version] [-v] [-k]
                     [--private-key PRIVATE_KEY_FILE] [-u REMOTE_USER]
                     [-c CONNECTION] [-T TIMEOUT]
                     [--ssh-common-args SSH_COMMON_ARGS]
                     [--sftp-extra-args SFTP_EXTRA_ARGS]
                     [--scp-extra-args SCP_EXTRA_ARGS]
                     [--ssh-extra-args SSH_EXTRA_ARGS] [--force-handlers]
                     [--flush-cache] [-b] [--become-method BECOME_METHOD]
                     [--become-user BECOME_USER] [-K] [-t TAGS]
                     [--skip-tags SKIP_TAGS] [-C] [--syntax-check] [-D]
                     [-i INVENTORY] [--list-hosts] [-l SUBSET]
                     [-e EXTRA_VARS] [--vault-id VAULT_IDS]
                     [--ask-vault-password | --vault-password-file VAULT_PASSWORD_FILES]
                     [-f FORKS] [-M MODULE_PATH] [--list-tasks]
                     [--list-tags] [--step] [--start-at-task START_AT_TASK]
                     playbook [playbook ...]

```
 Description
-----------

 the tool to run *Ansible playbooks*, which are a configuration and multinode deployment system. See the project home page (<https://docs.ansible.com>) for more information.

 Common Options
--------------

  
`--ask-vault-password, --ask-vault-pass`  
ask for vault password

 
  
`--become-method <BECOME_METHOD>`  
privilege escalation method to use (default=sudo), use `ansible-doc -t become -l` to list valid choices.

 
  
`--become-user <BECOME_USER>`  
run operations as this user (default=root)

 
  
`--flush-cache`  
clear the fact cache for every host in inventory

 
  
`--force-handlers`  
run handlers even if a task fails

 
  
`--list-hosts`  
outputs a list of matching hosts; does not execute anything else

 
  
`--list-tags`  
list all available tags

 
  
`--list-tasks`  
list all tasks that would be executed

 
  
`--private-key <PRIVATE_KEY_FILE>, --key-file <PRIVATE_KEY_FILE>`  
use this file to authenticate the connection

 
  
`--scp-extra-args <SCP_EXTRA_ARGS>`  
specify extra arguments to pass to scp only (e.g. -l)

 
  
`--sftp-extra-args <SFTP_EXTRA_ARGS>`  
specify extra arguments to pass to sftp only (e.g. -f, -l)

 
  
`--skip-tags`  
only run plays and tasks whose tags do not match these values

 
  
`--ssh-common-args <SSH_COMMON_ARGS>`  
specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)

 
  
`--ssh-extra-args <SSH_EXTRA_ARGS>`  
specify extra arguments to pass to ssh only (e.g. -R)

 
  
`--start-at-task <START_AT_TASK>`  
start the playbook at the task matching this name

 
  
`--step`  
one-step-at-a-time: confirm each task before running

 
  
`--syntax-check`  
perform a syntax check on the playbook, but do not execute it

 
  
`--vault-id`  
the vault identity to use

 
  
`--vault-password-file, --vault-pass-file`  
vault password file

 
  
`--version`  
show program’s version number, config file location, configured module search path, module location, executable location and exit

 
  
`-C, --check`  
don’t make any changes; instead, try to predict some of the changes that may occur

 
  
`-D, --diff`  
when changing (small) files and templates, show the differences in those files; works great with –check

 
  
`-K, --ask-become-pass`  
ask for privilege escalation password

 
  
`-M, --module-path`  
prepend colon-separated path(s) to module library (default=~/.ansible/plugins/modules:/usr/share/ansible/plugins/modules)

 
  
`-T <TIMEOUT>, --timeout <TIMEOUT>`  
override the connection timeout in seconds (default=10)

 
  
`-b, --become`  
run operations with become (does not imply password prompting)

 
  
`-c <CONNECTION>, --connection <CONNECTION>`  
connection type to use (default=smart)

 
  
`-e, --extra-vars`  
set additional variables as key=value or YAML/JSON, if filename prepend with @

 
  
`-f <FORKS>, --forks <FORKS>`  
specify number of parallel processes to use (default=5)

 
  
`-h, --help`  
show this help message and exit

 
  
`-i, --inventory, --inventory-file`  
specify inventory host path or comma separated host list. –inventory-file is deprecated

 
  
`-k, --ask-pass`  
ask for connection password

 
  
`-l <SUBSET>, --limit <SUBSET>`  
further limit selected hosts to an additional pattern

 
  
`-t, --tags`  
only run plays and tasks tagged with these values

 
  
`-u <REMOTE_USER>, --user <REMOTE_USER>`  
connect as this user (default=None)

 
  
`-v, --verbose`  
verbose mode (-vvv for more, -vvvv to enable connection debugging)

 
 Environment
-----------

 The following environment variables may be specified.

 [`ANSIBLE_CONFIG`](../reference_appendices/config#envvar-ANSIBLE_CONFIG) – Override the default ansible config file

 Many more are available for most options in ansible.cfg

 Files
-----

 `/etc/ansible/ansible.cfg` – Config file, used if present

 `~/.ansible.cfg` – User config file, overrides the default config if present

 Author
------

 Ansible was originally written by Michael DeHaan.

 See the `AUTHORS` file for a complete list of contributors.

 License
-------

 Ansible is released under the terms of the GPLv3+ License.

 See also
--------

 *ansible(1)*, *ansible-config(1)*, *ansible-console(1)*, *ansible-doc(1)*, *ansible-galaxy(1)*, *ansible-inventory(1)*, *ansible-playbook(1)*, *ansible-pull(1)*, *ansible-vault(1)*,



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/cli/ansible-playbook.html>

ansible-inventory
=================

 **None**

 * [Synopsis](#synopsis)
* [Description](#description)
* [Common Options](#common-options)
* [Environment](#environment)
* [Files](#files)
* [Author](#author)
* [License](#license)
* [See also](#see-also)

 Synopsis
--------

 
```
usage: ansible-inventory [-h] [--version] [-v] [-i INVENTORY]
                      [--vault-id VAULT_IDS]
                      [--ask-vault-password | --vault-password-file VAULT_PASSWORD_FILES]
                      [--playbook-dir BASEDIR] [-e EXTRA_VARS] [--list]
                      [--host HOST] [--graph] [-y] [--toml] [--vars]
                      [--export] [--output OUTPUT_FILE]
                      [host|group]

```
 Description
-----------

 used to display or dump the configured inventory as Ansible sees it

 Common Options
--------------

  
`--ask-vault-password, --ask-vault-pass`  
ask for vault password

 
  
`--export`  
When doing an –list, represent in a way that is optimized for export,not as an accurate representation of how Ansible has processed it

 
  
`--graph`  
create inventory graph, if supplying pattern it must be a valid group name

 
  
`--host <HOST>`  
Output specific host info, works as inventory script

 
  
`--list`  
Output all hosts info, works as inventory script

 
  
`--list-hosts`  
==SUPPRESS==

 
  
`--output <OUTPUT_FILE>`  
When doing –list, send the inventory to a file instead of to the screen

 
  
`--playbook-dir <BASEDIR>`  
Since this tool does not use playbooks, use this as a substitute playbook directory.This sets the relative path for many features including roles/ group\_vars/ etc.

 
  
`--toml`  
Use TOML format instead of default JSON, ignored for –graph

 
  
`--vars`  
Add vars to graph display, ignored unless used with –graph

 
  
`--vault-id`  
the vault identity to use

 
  
`--vault-password-file, --vault-pass-file`  
vault password file

 
  
`--version`  
show program’s version number, config file location, configured module search path, module location, executable location and exit

 
  
`-e, --extra-vars`  
set additional variables as key=value or YAML/JSON, if filename prepend with @

 
  
`-h, --help`  
show this help message and exit

 
  
`-i, --inventory, --inventory-file`  
specify inventory host path or comma separated host list. –inventory-file is deprecated

 
  
`-l, --limit`  
==SUPPRESS==

 
  
`-v, --verbose`  
verbose mode (-vvv for more, -vvvv to enable connection debugging)

 
  
`-y, --yaml`  
Use YAML format instead of default JSON, ignored for –graph

 
 Environment
-----------

 The following environment variables may be specified.

 [`ANSIBLE_CONFIG`](../reference_appendices/config#envvar-ANSIBLE_CONFIG) – Override the default ansible config file

 Many more are available for most options in ansible.cfg

 Files
-----

 `/etc/ansible/ansible.cfg` – Config file, used if present

 `~/.ansible.cfg` – User config file, overrides the default config if present

 Author
------

 Ansible was originally written by Michael DeHaan.

 See the `AUTHORS` file for a complete list of contributors.

 License
-------

 Ansible is released under the terms of the GPLv3+ License.

 See also
--------

 *ansible(1)*, *ansible-config(1)*, *ansible-console(1)*, *ansible-doc(1)*, *ansible-galaxy(1)*, *ansible-inventory(1)*, *ansible-playbook(1)*, *ansible-pull(1)*, *ansible-vault(1)*,



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/cli/ansible-inventory.html>

Introduction to modules
=======================

 Modules (also referred to as “task plugins” or “library plugins”) are discrete units of code that can be used from the command line or in a playbook task. Ansible executes each module, usually on the remote managed node, and collects return values. In Ansible 2.10 and later, most modules are hosted in collections.

 You can execute modules from the command line:

 
```
ansible webservers -m service -a "name=httpd state=started"
ansible webservers -m ping
ansible webservers -m command -a "/sbin/reboot -t now"

```
 Each module supports taking arguments. Nearly all modules take `key=value` arguments, space delimited. Some modules take no arguments, and the command/shell modules simply take the string of the command you want to run.

 From playbooks, Ansible modules are executed in a very similar way:

 
```
- name: reboot the servers
  command: /sbin/reboot -t now

```
 Another way to pass arguments to a module is using YAML syntax, also called ‘complex args’

 
```
- name: restart webserver
  service:
    name: httpd
    state: restarted

```
 All modules return JSON format data. This means modules can be written in any programming language. Modules should be idempotent, and should avoid making any changes if they detect that the current state matches the desired final state. When used in an Ansible playbook, modules can trigger ‘change events’ in the form of notifying [handlers](playbooks_handlers#handlers) to run additional tasks.

 You can access the documentation for each module from the command line with the ansible-doc tool:

 
```
ansible-doc yum

```
 For a list of all available modules, see the [Collection docs](../collections/index#list-of-collections), or run the following at a command prompt:

 
```
ansible-doc -l

```
  See also

  [Introduction to ad hoc commands](intro_adhoc#intro-adhoc)

Examples of using modules in /usr/bin/ansible

  [Working with playbooks](playbooks#working-with-playbooks)

Examples of using modules with /usr/bin/ansible-playbook

  [Should you develop a module?](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules.html#developing-modules)

How to write your own modules

  [Python API](https://docs.ansible.com/ansible/latest/dev_guide/developing_api.html#developing-api)

Examples of using modules with the Python API

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/modules_intro.html>

Advanced playbooks features
===========================

 This page is obsolete. Refer to the [main User Guide index page](index#user-guide-index) for links to all playbook-related topics. Please update any links you may have made directly to this page.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_special_topics.html>

Cisco ACI Guide
===============

 What is Cisco ACI ?
-------------------

 ### Application Centric Infrastructure (ACI)

 The Cisco Application Centric Infrastructure (ACI) allows application requirements to define the network. This architecture simplifies, optimizes, and accelerates the entire application deployment life cycle.

 ### Application Policy Infrastructure Controller (APIC)

 The APIC manages the scalable ACI multi-tenant fabric. The APIC provides a unified point of automation and management, policy programming, application deployment, and health monitoring for the fabric. The APIC, which is implemented as a replicated synchronized clustered controller, optimizes performance, supports any application anywhere, and provides unified operation of the physical and virtual infrastructure.

 The APIC enables network administrators to easily define the optimal network for applications. Data center operators can clearly see how applications consume network resources, easily isolate and troubleshoot application and infrastructure problems, and monitor and profile resource usage patterns.

 The Cisco Application Policy Infrastructure Controller (APIC) API enables applications to directly connect with a secure, shared, high-performance resource pool that includes network, compute, and storage capabilities.

 ### ACI Fabric

 The Cisco Application Centric Infrastructure (ACI) Fabric includes Cisco Nexus 9000 Series switches with the APIC to run in the leaf/spine ACI fabric mode. These switches form a “fat-tree” network by connecting each leaf node to each spine node; all other devices connect to the leaf nodes. The APIC manages the ACI fabric.

 The ACI fabric provides consistent low-latency forwarding across high-bandwidth links (40 Gbps, with a 100-Gbps future capability). Traffic with the source and destination on the same leaf switch is handled locally, and all other traffic travels from the ingress leaf to the egress leaf through a spine switch. Although this architecture appears as two hops from a physical perspective, it is actually a single Layer 3 hop because the fabric operates as a single Layer 3 switch.

 The ACI fabric object-oriented operating system (OS) runs on each Cisco Nexus 9000 Series node. It enables programming of objects for each configurable element of the system. The ACI fabric OS renders policies from the APIC into a concrete model that runs in the physical infrastructure. The concrete model is analogous to compiled software; it is the form of the model that the switch operating system can execute.

 All the switch nodes contain a complete copy of the concrete model. When an administrator creates a policy in the APIC that represents a configuration, the APIC updates the logical model. The APIC then performs the intermediate step of creating a fully elaborated policy that it pushes into all the switch nodes where the concrete model is updated.

 The APIC is responsible for fabric activation, switch firmware management, network policy configuration, and instantiation. While the APIC acts as the centralized policy and network management engine for the fabric, it is completely removed from the data path, including the forwarding topology. Therefore, the fabric can still forward traffic even when communication with the APIC is lost.

 ### More information

 Various resources exist to start learning ACI, here is a list of interesting articles from the community.

 * [Adam Raffe: Learning ACI](https://adamraffe.com/learning-aci/)
* [Luca Relandini: ACI for dummies](https://lucarelandini.blogspot.be/2015/03/aci-for-dummies.html)
* [Cisco DevNet Learning Labs about ACI](https://learninglabs.cisco.com/labs/tags/ACI)

 Using the ACI modules
---------------------

 The Ansible ACI modules provide a user-friendly interface to managing your ACI environment using Ansible playbooks.

 For instance ensuring that a specific tenant exists, is done using the following Ansible task using the aci\_tenant module:

 
```
- name: Ensure tenant customer-xyz exists
  aci_tenant:
    host: my-apic-1
    username: admin
    password: my-password

    tenant: customer-xyz
    description: Customer XYZ
    state: present

```
 A complete list of existing ACI modules is available on the content tab of the [ACI collection on Ansible Galaxy](https://galaxy.ansible.com/cisco/aci).

 If you want to learn how to write your own ACI modules to contribute, look at the [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) section.

 ### Querying ACI configuration

 A module can also be used to query a specific object.

 
```
- name: Query tenant customer-xyz
  aci_tenant:
    host: my-apic-1
    username: admin
    password: my-password

    tenant: customer-xyz
    state: query
  register: my_tenant

```
 Or query all objects.

 
```
- name: Query all tenants
  aci_tenant:
    host: my-apic-1
    username: admin
    password: my-password

    state: query
  register: all_tenants

```
 After registering the return values of the aci\_tenant task as shown above, you can access all tenant information from variable `all_tenants`.

 ### Running on the controller locally

 As originally designed, Ansible modules are shipped to and run on the remote target(s), however the ACI modules (like most network-related modules) do not run on the network devices or controller (in this case the APIC), but they talk directly to the APIC’s REST interface.

 For this very reason, the modules need to run on the local Ansible controller (or are delegated to another system that *can* connect to the APIC).

 #### Gathering facts

 Because we run the modules on the Ansible controller gathering facts will not work. That is why when using these ACI modules it is mandatory to disable facts gathering. You can do this globally in your `ansible.cfg` or by adding `gather_facts: no` to every play.

 
```
 - name: Another play in my playbook
   hosts: my-apic-1
   gather_facts: no
   tasks:
   - name: Create a tenant
     aci_tenant:
       ...

```
 #### Delegating to localhost

 So let us assume we have our target configured in the inventory using the FQDN name as the `ansible_host` value, as shown below.

 
```
 apics:
   my-apic-1:
     ansible_host: apic01.fqdn.intra
     ansible_user: admin
     ansible_password: my-password

```
 One way to set this up is to add to every task the directive: `delegate_to: localhost`.

 
```
 - name: Query all tenants
   aci_tenant:
     host: '{{ ansible_host }}'
     username: '{{ ansible_user }}'
     password: '{{ ansible_password }}'

     state: query
   delegate_to: localhost
   register: all_tenants

```
 If one would forget to add this directive, Ansible will attempt to connect to the APIC using SSH and attempt to copy the module and run it remotely. This will fail with a clear error, yet may be confusing to some.

 #### Using the local connection method

 Another option frequently used, is to tie the `local` connection method to this target so that every subsequent task for this target will use the local connection method (hence run it locally, rather than use SSH).

 In this case the inventory may look like this:

 
```
 apics:
   my-apic-1:
     ansible_host: apic01.fqdn.intra
     ansible_user: admin
     ansible_password: my-password
     ansible_connection: local

```
 But used tasks do not need anything special added.

 
```
- name: Query all tenants
  aci_tenant:
    host: '{{ ansible_host }}'
    username: '{{ ansible_user }}'
    password: '{{ ansible_password }}'

    state: query
  register: all_tenants

```
  Hint

 For clarity we have added `delegate_to: localhost` to all the examples in the module documentation. This helps to ensure first-time users can easily copy&paste parts and make them work with a minimum of effort.

  ### Common parameters

 Every Ansible ACI module accepts the following parameters that influence the module’s communication with the APIC REST API:

  host

Hostname or IP address of the APIC.

  port

Port to use for communication. (Defaults to `443` for HTTPS, and `80` for HTTP)

  username

User name used to log on to the APIC. (Defaults to `admin`)

  password

Password for `username` to log on to the APIC, using password-based authentication.

  private\_key

Private key for `username` to log on to APIC, using signature-based authentication. This could either be the raw private key content (include header/footer) or a file that stores the key content. *New in version 2.5*

  certificate\_name

Name of the certificate in the ACI Web GUI. This defaults to either the `username` value or the `private_key` file base name). *New in version 2.5*

  timeout

Timeout value for socket-level communication.

  use\_proxy

Use system proxy settings. (Defaults to `yes`)

  use\_ssl

Use HTTPS or HTTP for APIC REST communication. (Defaults to `yes`)

  validate\_certs

Validate certificate when using HTTPS communication. (Defaults to `yes`)

  output\_level

Influence the level of detail ACI modules return to the user. (One of `normal`, `info` or `debug`) *New in version 2.5*

   ### Proxy support

 By default, if an environment variable `<protocol>_proxy` is set on the target host, requests will be sent through that proxy. This behaviour can be overridden by setting a variable for this task (see [Setting the remote environment](../user_guide/playbooks_environment#playbooks-environment)), or by using the `use_proxy` module parameter.

 HTTP redirects can redirect from HTTP to HTTPS so ensure that the proxy environment for both protocols is correctly configured.

 If proxy support is not needed, but the system may have it configured nevertheless, use the parameter `use_proxy: no` to avoid accidental system proxy usage.

  Hint

 Selective proxy support using the `no_proxy` environment variable is also supported.

  ### Return values

  New in version 2.5.

  The following values are always returned:

  current

The resulting state of the managed object, or results of your query.

   The following values are returned when `output_level: info`:

  previous

The original state of the managed object (before any change was made).

  proposed

The proposed config payload, based on user-supplied values.

  sent

The sent config payload, based on user-supplied values and the existing configuration.

   The following values are returned when `output_level: debug` or `ANSIBLE_DEBUG=1`:

  filter\_string

The filter used for specific APIC queries.

  method

The HTTP method used for the sent payload. (Either `GET` for queries, `DELETE` or `POST` for changes)

  response

The HTTP response from the APIC.

  status

The HTTP status code for the request.

  url

The url used for the request.

    Note

 The module return values are documented in detail as part of each module’s documentation.

  ### More information

 Various resources exist to start learn more about ACI programmability, we recommend the following links:

 * [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide)
* [Jacob McGill: Automating Cisco ACI with Ansible](https://blogs.cisco.com/developer/automating-cisco-aci-with-ansible-eliminates-repetitive-day-to-day-tasks)
* [Cisco DevNet Learning Labs about ACI and Ansible](https://learninglabs.cisco.com/labs/tags/ACI,Ansible)

 ACI authentication
------------------

 ### Password-based authentication

 If you want to log on using a username and password, you can use the following parameters with your ACI modules:

 
```
username: admin
password: my-password

```
 Password-based authentication is very simple to work with, but it is not the most efficient form of authentication from ACI’s point-of-view as it requires a separate login-request and an open session to work. To avoid having your session time-out and requiring another login, you can use the more efficient Signature-based authentication.

  Note

 Password-based authentication also may trigger anti-DoS measures in ACI v3.1+ that causes session throttling and results in HTTP 503 errors and login failures.

   Warning

 Never store passwords in plain text.

  The “Vault” feature of Ansible allows you to keep sensitive data such as passwords or keys in encrypted files, rather than as plain text in your playbooks or roles. These vault files can then be distributed or placed in source control. See [Using encrypted variables and files](../user_guide/vault#playbooks-vault) for more information.

 ### Signature-based authentication using certificates

  New in version 2.5.

  Using signature-based authentication is more efficient and more reliable than password-based authentication.

 #### Generate certificate and private key

 Signature-based authentication requires a (self-signed) X.509 certificate with private key, and a configuration step for your AAA user in ACI. To generate a working X.509 certificate and private key, use the following procedure:

 
```
$ openssl req -new -newkey rsa:1024 -days 36500 -nodes -x509 -keyout admin.key -out admin.crt -subj '/CN=Admin/O=Your Company/C=US'

```
 #### Configure your local user

 Perform the following steps:

 * Add the X.509 certificate to your ACI AAA local user at ADMIN » AAA
* Click AAA Authentication
* Check that in the Authentication field the Realm field displays Local
* Expand Security Management » Local Users
* Click the name of the user you want to add a certificate to, in the User Certificates area
* Click the + sign and in the Create X509 Certificate enter a certificate name in the Name field


	+ If you use the basename of your private key here, you don’t need to enter `certificate_name` in Ansible
* Copy and paste your X.509 certificate in the Data field.

 You can automate this by using the following Ansible task:

 
```
- name: Ensure we have a certificate installed
  aci_aaa_user_certificate:
    host: my-apic-1
    username: admin
    password: my-password

    aaa_user: admin
    certificate_name: admin
    certificate: "{{ lookup('file', 'pki/admin.crt') }}"  # This will read the certificate data from a local file

```
  Note

 Signature-based authentication only works with local users.

  #### Use signature-based authentication with Ansible

 You need the following parameters with your ACI module(s) for it to work:

 
```
 username: admin
 private_key: pki/admin.key
 certificate_name: admin  # This could be left out !

```
 or you can use the private key content:

 
```
 username: admin
 private_key: |
     -----BEGIN PRIVATE KEY-----
     <<your private key content>>
     -----END PRIVATE KEY-----
 certificate_name: admin  # This could be left out !

```
  Hint

 If you use a certificate name in ACI that matches the private key’s basename, you can leave out the `certificate_name` parameter like the example above.

  #### Using Ansible Vault to encrypt the private key

  New in version 2.8.

  To start, encrypt the private key and give it a strong password.

 
```
ansible-vault encrypt admin.key

```
 Use a text editor to open the private-key. You should have an encrypted cert now.

 
```
$ANSIBLE_VAULT;1.1;AES256
56484318584354658465121889743213151843149454864654151618131547984132165489484654
45641818198456456489479874513215489484843614848456466655432455488484654848489498
....

```
 Copy and paste the new encrypted cert into your playbook as a new variable.

 
```
private_key: !vault |
      $ANSIBLE_VAULT;1.1;AES256
      56484318584354658465121889743213151843149454864654151618131547984132165489484654
      45641818198456456489479874513215489484843614848456466655432455488484654848489498
      ....

```
 Use the new variable for the private\_key:

 
```
username: admin
private_key: "{{ private_key }}"
certificate_name: admin  # This could be left out !

```
 When running the playbook, use “–ask-vault-pass” to decrypt the private key.

 
```
ansible-playbook site.yaml --ask-vault-pass

```
 #### More information

 * Detailed information about Signature-based Authentication is available from [Cisco APIC Signature-Based Transactions](https://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/kb/b_KB_Signature_Based_Transactions.html).
* More information on Ansible Vault can be found on the [Ansible Vault](../user_guide/vault#vault) page.

 Using ACI REST with Ansible
---------------------------

 While already a lot of ACI modules exists in the Ansible distribution, and the most common actions can be performed with these existing modules, there’s always something that may not be possible with off-the-shelf modules.

 The aci\_rest module provides you with direct access to the APIC REST API and enables you to perform any task not already covered by the existing modules. This may seem like a complex undertaking, but you can generate the needed REST payload for any action performed in the ACI web interface effortlessly.

 ### Built-in idempotency

 Because the APIC REST API is intrinsically idempotent and can report whether a change was made, the aci\_rest module automatically inherits both capabilities and is a first-class solution for automating your ACI infrastructure. As a result, users that require more powerful low-level access to their ACI infrastructure don’t have to give up on idempotency and don’t have to guess whether a change was performed when using the aci\_rest module.

 ### Using the aci\_rest module

 The aci\_rest module accepts the native XML and JSON payloads, but additionally accepts inline YAML payload (structured like JSON). The XML payload requires you to use a path ending with `.xml` whereas JSON or YAML require the path to end with `.json`.

 When you’re making modifications, you can use the POST or DELETE methods, whereas doing just queries require the GET method.

 For instance, if you would like to ensure a specific tenant exists on ACI, these below four examples are functionally identical:

 **XML** (Native ACI REST)

 
```
- aci_rest:
    host: my-apic-1
    private_key: pki/admin.key

    method: post
    path: /api/mo/uni.xml
    content: |
      <fvTenant name="customer-xyz" descr="Customer XYZ"/>

```
 **JSON** (Native ACI REST)

 
```
- aci_rest:
    host: my-apic-1
    private_key: pki/admin.key

    method: post
    path: /api/mo/uni.json
    content:
      {
        "fvTenant": {
          "attributes": {
            "name": "customer-xyz",
            "descr": "Customer XYZ"
          }
        }
      }

```
 **YAML** (Ansible-style REST)

 
```
- aci_rest:
    host: my-apic-1
    private_key: pki/admin.key

    method: post
    path: /api/mo/uni.json
    content:
      fvTenant:
        attributes:
          name: customer-xyz
          descr: Customer XYZ

```
 **Ansible task** (Dedicated module)

 
```
- aci_tenant:
    host: my-apic-1
    private_key: pki/admin.key

    tenant: customer-xyz
    description: Customer XYZ
    state: present

```
  Hint

 The XML format is more practical when there is a need to template the REST payload (inline), but the YAML format is more convenient for maintaining your infrastructure-as-code and feels more naturally integrated with Ansible playbooks. The dedicated modules offer a more simple, abstracted, but also a more limited experience. Use what feels best for your use-case.

  ### More information

 Plenty of resources exist to learn about ACI’s APIC REST interface, we recommend the links below:

 * [The ACI collection on Ansible Galaxy](https://galaxy.ansible.com/cisco/aci)
* [APIC REST API Configuration Guide](https://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/2-x/rest_cfg/2_1_x/b_Cisco_APIC_REST_API_Configuration_Guide.html) – Detailed guide on how the APIC REST API is designed and used, incl. many examples
* [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) – Complete reference of the APIC object model
* [Cisco DevNet Learning Labs about ACI and REST](https://learninglabs.cisco.com/labs/tags/ACI,REST)

 Operational examples
--------------------

 Here is a small overview of useful operational tasks to reuse in your playbooks.

 Feel free to contribute more useful snippets.

 ### Waiting for all controllers to be ready

 You can use the below task after you started to build your APICs and configured the cluster to wait until all the APICs have come online. It will wait until the number of controllers equals the number listed in the `apic` inventory group.

 
```
- name: Waiting for all controllers to be ready
  aci_rest:
    host: my-apic-1
    private_key: pki/admin.key
    method: get
    path: /api/node/class/topSystem.json?query-target-filter=eq(topSystem.role,"controller")
  register: topsystem
  until: topsystem|success and topsystem.totalCount|int >= groups['apic']|count >= 3
  retries: 20
  delay: 30

```
 ### Waiting for cluster to be fully-fit

 The below example waits until the cluster is fully-fit. In this example you know the number of APICs in the cluster and you verify each APIC reports a ‘fully-fit’ status.

 
```
- name: Waiting for cluster to be fully-fit
  aci_rest:
    host: my-apic-1
    private_key: pki/admin.key
    method: get
    path: /api/node/class/infraWiNode.json?query-target-filter=wcard(infraWiNode.dn,"topology/pod-1/node-1/av")
  register: infrawinode
  until: >
    infrawinode|success and
    infrawinode.totalCount|int >= groups['apic']|count >= 3 and
    infrawinode.imdata[0].infraWiNode.attributes.health == 'fully-fit' and
    infrawinode.imdata[1].infraWiNode.attributes.health == 'fully-fit' and
    infrawinode.imdata[2].infraWiNode.attributes.health == 'fully-fit'
  retries: 30
  delay: 30

```
 APIC error messages
-------------------

 The following error messages may occur and this section can help you understand what exactly is going on and how to fix/avoid them.

  APIC Error 122: unknown managed object class ‘polUni’

In case you receive this error while you are certain your aci\_rest payload and object classes are seemingly correct, the issue might be that your payload is not in fact correct JSON (for example, the sent payload is using single quotes, rather than double quotes), and as a result the APIC is not correctly parsing your object classes from the payload. One way to avoid this is by using a YAML or an XML formatted payload, which are easier to construct correctly and modify later.

  APIC Error 400: invalid data at line ‘1’. Attributes are missing, tag ‘attributes’ must be specified first, before any other tag

Although the JSON specification allows unordered elements, the APIC REST API requires that the JSON `attributes` element precede the `children` array or other elements. So you need to ensure that your payload conforms to this requirement. Sorting your dictionary keys will do the trick just fine. If you don’t have any attributes, it may be necessary to add: `attributes: {}` as the APIC does expect the entry to precede any `children`.

  APIC Error 801: property descr of uni/tn-TENANT/ap-AP failed validation for value ‘A “legacy” network’

Some values in the APIC have strict format-rules to comply to, and the internal APIC validation check for the provided value failed. In the above case, the `description` parameter (internally known as `descr`) only accepts values conforming to [Regex: [a-zA-Z0-9\!#$%()\*,-./:;@ \_{|}~?&+]+](https://pubhub-prod.s3.amazonaws.com/media/apic-mim-ref/docs/MO-fvAp.html#descr), in general it must not include quotes or square brackets.

   Known issues
------------

 The aci\_rest module is a wrapper around the APIC REST API. As a result any issues related to the APIC will be reflected in the use of this module.

 All below issues either have been reported to the vendor, and most can simply be avoided.

  Too many consecutive API calls may result in connection throttling

Starting with ACI v3.1 the APIC will actively throttle password-based authenticated connection rates over a specific threshold. This is as part of an anti-DDOS measure but can act up when using Ansible with ACI using password-based authentication. Currently, one solution is to increase this threshold within the nginx configuration, but using signature-based authentication is recommended.

 **NOTE:** It is advisable to use signature-based authentication with ACI as it not only prevents connection-throttling, but also improves general performance when using the ACI modules.

  Specific requests may not reflect changes correctly ([#35401](https://github.com/ansible/ansible/issues/35041))

There is a known issue where specific requests to the APIC do not properly reflect changed in the resulting output, even when we request those changes explicitly from the APIC. In one instance using the path `api/node/mo/uni/infra.xml` fails, where `api/node/mo/uni/infra/.xml` does work correctly.

 **NOTE:** A workaround is to register the task return values (for example, `register: this`) and influence when the task should report a change by adding: `changed_when: this.imdata != []`.

  Specific requests are known to not be idempotent ([#35050](https://github.com/ansible/ansible/issues/35050))

The behaviour of the APIC is inconsistent to the use of `status="created"` and `status="deleted"`. The result is that when you use `status="created"` in your payload the resulting tasks are not idempotent and creation will fail when the object was already created. However this is not the case with `status="deleted"` where such call to an non-existing object does not cause any failure whatsoever.

 **NOTE:** A workaround is to avoid using `status="created"` and instead use `status="modified"` when idempotency is essential to your workflow..

  Setting user password is not idempotent ([#35544](https://github.com/ansible/ansible/issues/35544))

Due to an inconsistency in the APIC REST API, a task that sets the password of a locally-authenticated user is not idempotent. The APIC will complain with message `Password history check: user dag should not use previous 5 passwords`.

 **NOTE:** There is no workaround for this issue.

   ACI Ansible community
---------------------

 If you have specific issues with the ACI modules, or a feature request, or you like to contribute to the ACI project by proposing changes or documentation updates, look at the Ansible Community wiki ACI page at: <https://github.com/ansible/community/wiki/Network:-ACI>

 You will find our roadmap, an overview of open ACI issues and pull-requests, and more information about who we are. If you have an interest in using ACI with Ansible, feel free to join! We occasionally meet online to track progress and prepare for new Ansible releases.

  See also

  [ACI collection on Ansible Galaxy](https://galaxy.ansible.com/cisco/aci)

View the content tab for a complete list of supported ACI modules.

  [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide)

A walkthrough on how to develop new Cisco ACI modules to contribute back.

  [ACI community](https://github.com/ansible/community/wiki/Network:-ACI)

The Ansible ACI community wiki page, includes roadmap, ideas and development documentation.

  [Ansible for Network Automation](../network/index#network-guide)

A detailed guide on how to use Ansible for automating network infrastructure.

  [Network Working Group](https://github.com/ansible/community/tree/master/group-network)

The Ansible Network community page, includes contact information and meeting information.

  
`#ansible-network on` [irc.libera.chat](https://libera.chat/)


The #ansible-network IRC chat channel on libera.chat.

  [User Mailing List](https://groups.google.com/group/ansible-project)

Have a question? Stop by the google group!

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/guide_aci.html>

arista.eos.eos\_facts – Collect facts from remote devices running Arista EOS
============================================================================

  Note

 This plugin is part of the [arista.eos collection](https://galaxy.ansible.com/arista/eos) (version 2.2.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install arista.eos`.

 To use it in a playbook, specify: `arista.eos.eos_facts`.

   New in version 1.0.0: of arista.eos

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Collects facts from Arista devices running the EOS operating system. This module places the facts gathered in the fact tree keyed by the respective resource name. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **available\_network\_resources**  boolean  | **Choices:*** **no** ←
* yes
 | When 'True' a list of network resources for which resource modules are available will be provided. |
| **gather\_network\_resources**  list / elements=string  |  | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all and the resources like interfaces, vlans etc. Can specify a list of values to include a larger subset. Values can also be used with an initial `M(!`) to specify that a specific subset should not be collected. Values can also be used with an initial `M(!`) to specify that a specific subset should not be collected. Valid subsets are 'all', 'interfaces', 'l2\_interfaces', 'l3\_interfaces', 'lacp', 'lacp\_interfaces', 'lag\_interfaces', 'lldp\_global', 'lldp\_interfaces', 'vlans', 'acls'. |
| **gather\_subset**  list / elements=string  | **Default:**"!config" | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial `M(!`) to specify that a specific subset should not be collected. |
| **provider**  dictionary  |  | **Deprecated** Starting with Ansible 2.5 we recommend using `connection: network_cli`. Starting with Ansible 2.6 we recommend using `connection: httpapi` for eAPI. This option will be removed in a release after 2022-06-01. For more information please see the [EOS Platform Options guide](../network/user_guide/platform_eos). A dict object containing connection details. |
|  | **auth\_pass**  string  |  | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
|  | **authorize**  boolean  | **Choices:*** **no** ←
* yes
 | Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
|  | **host**  string  |  | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
|  | **password**  string  |  | Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either *cli* or *eapi* transports. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
|  | **port**  integer  | **Default:**0 | Specifies the port to use when building the connection to the remote device. This value applies to either *cli* or *eapi*. The port value will default to the appropriate transport common port if none is provided in the task (cli=22, http=80, https=443). |
|  | **ssh\_keyfile**  path  |  | Specifies the SSH keyfile to use to authenticate the connection to the remote device. This argument is only used for *cli* transports. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
|  | **timeout**  integer  |  | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
|  | **transport**  string  | **Choices:*** **cli** ←
* eapi
 | Configures the transport connection to use when connecting to the remote device. |
|  | **use\_proxy**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, the environment variables `http_proxy` and `https_proxy` will be ignored. |
|  | **use\_ssl**  boolean  | **Choices:*** no
* **yes** ←
 | Configures the *transport* to use SSL if set to `yes` only when the `transport=eapi`. If the transport argument is not eapi, this value is ignored. |
|  | **username**  string  |  | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the eAPI authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
|  | **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not eapi, this value is ignored. |

   
 Notes
-----

  Note

 * For information on using CLI, eAPI and privileged mode see the [EOS Platform Options guide](../../../network/user_guide/platform_eos#eos-platform-options)
* For more information on using Ansible to manage network devices see the [Ansible Network Guide](../../../network/index#network-guide)
* For more information on using Ansible to manage Arista EOS devices see the [Arista integration page](https://www.ansible.com/ansible-arista-networks).

  Examples
--------

 
```
- name: Gather all legacy facts
- arista.eos.eos_facts:
    gather_subset: all

- name: Gather only the config and default facts
  arista.eos.eos_facts:
    gather_subset:
    - config

- name: Do not gather hardware facts
  arista.eos.eos_facts:
    gather_subset:
    - '!hardware'

- name: Gather legacy and resource facts
  arista.eos.eos_facts:
    gather_subset: all
    gather_network_resources: all

- name: Gather only the interfaces resource facts and no legacy facts
- arista.eos.eos_facts:
    gather_subset:
    - '!all'
    - '!min'
    gather_network_resources:
    - interfaces

- name: Gather all resource facts and minimal legacy facts
  arista.eos.eos_facts:
    gather_subset: min
    gather_network_resources: all

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_net\_all\_ipv4\_addresses**  list / elements=string  | when interfaces is configured | All IPv4 addresses configured on the device  |
| **ansible\_net\_all\_ipv6\_addresses**  list / elements=string  | when interfaces is configured | All IPv6 addresses configured on the device  |
| **ansible\_net\_api**  string  | always | The name of the transport  |
| **ansible\_net\_config**  string  | when config is configured | The current active config from the device  |
| **ansible\_net\_filesystems**  list / elements=string  | when hardware is configured | All file system names available on the device  |
| **ansible\_net\_fqdn**  string  | always | The fully qualified domain name of the device  |
| **ansible\_net\_gather\_network\_resources**  list / elements=string  | when the resource is configured | The list of fact for network resource subsets collected from the device  |
| **ansible\_net\_gather\_subset**  list / elements=string  | always | The list of fact subsets collected from the device  |
| **ansible\_net\_hostname**  string  | always | The configured hostname of the device  |
| **ansible\_net\_image**  string  | always | The image file the device is running  |
| **ansible\_net\_interfaces**  dictionary  | when interfaces is configured | A hash of all interfaces running on the system  |
| **ansible\_net\_memfree\_mb**  integer  | when hardware is configured | The available free memory on the remote device in Mb  |
| **ansible\_net\_memtotal\_mb**  integer  | when hardware is configured | The total memory on the remote device in Mb  |
| **ansible\_net\_model**  string  | always | The model name returned from the device  |
| **ansible\_net\_neighbors**  dictionary  | when interfaces is configured | The list of LLDP neighbors from the remote device  |
| **ansible\_net\_python\_version**  string  | always | The Python version Ansible controller is using  |
| **ansible\_net\_serialnum**  string  | always | The serial number of the remote device  |
| **ansible\_net\_version**  string  | always | The operating system version running on the remote device  |

   
  
 ### Authors

 * Peter Sprygada (@privateip)
* Nathaniel Case (@Qalthos)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/arista/eos/eos_facts_module.html>

Playbook Example: Continuous Delivery and Rolling Upgrades
==========================================================

 * [What is continuous delivery?](#what-is-continuous-delivery)
* [Site deployment](#site-deployment)
* [Reusable content: roles](#reusable-content-roles)
* [Configuration: group variables](#configuration-group-variables)
* [The rolling upgrade](#the-rolling-upgrade)
* [Managing other load balancers](#managing-other-load-balancers)
* [Continuous delivery end-to-end](#continuous-delivery-end-to-end)

 What is continuous delivery?
----------------------------

 Continuous delivery (CD) means frequently delivering updates to your software application.

 The idea is that by updating more often, you do not have to wait for a specific timed period, and your organization gets better at the process of responding to change.

 Some Ansible users are deploying updates to their end users on an hourly or even more frequent basis – sometimes every time there is an approved code change. To achieve this, you need tools to be able to quickly apply those updates in a zero-downtime way.

 This document describes in detail how to achieve this goal, using one of Ansible’s most complete example playbooks as a template: lamp\_haproxy. This example uses a lot of Ansible features: roles, templates, and group variables, and it also comes with an orchestration playbook that can do zero-downtime rolling upgrades of the web application stack.

  Note

 [Click here for the latest playbooks for this example](https://github.com/ansible/ansible-examples/tree/master/lamp_haproxy).

  The playbooks deploy Apache, PHP, MySQL, Nagios, and HAProxy to a CentOS-based set of servers.

 We’re not going to cover how to run these playbooks here. Read the included README in the github project along with the example for that information. Instead, we’re going to take a close look at every part of the playbook and describe what it does.

 Site deployment
---------------

 Let’s start with `site.yml`. This is our site-wide deployment playbook. It can be used to initially deploy the site, as well as push updates to all of the servers:

 
```
---
# This playbook deploys the whole application stack in this site.

# Apply common configuration to all hosts
- hosts: all

  roles:
  - common

# Configure and deploy database servers.
- hosts: dbservers

  roles:
  - db

# Configure and deploy the web servers. Note that we include two roles
# here, the 'base-apache' role which simply sets up Apache, and 'web'
# which includes our example web application.

- hosts: webservers

  roles:
  - base-apache
  - web

# Configure and deploy the load balancer(s).
- hosts: lbservers

  roles:
  - haproxy

# Configure and deploy the Nagios monitoring node(s).
- hosts: monitoring

  roles:
  - base-apache
  - nagios

```
  Note

 If you’re not familiar with terms like playbooks and plays, you should review [Working with playbooks](playbooks#working-with-playbooks).

  In this playbook we have 5 plays. The first one targets `all` hosts and applies the `common` role to all of the hosts. This is for site-wide things like yum repository configuration, firewall configuration, and anything else that needs to apply to all of the servers.

 The next four plays run against specific host groups and apply specific roles to those servers. Along with the roles for Nagios monitoring, the database, and the web application, we’ve implemented a `base-apache` role that installs and configures a basic Apache setup. This is used by both the sample web application and the Nagios hosts.

 Reusable content: roles
-----------------------

 By now you should have a bit of understanding about roles and how they work in Ansible. Roles are a way to organize content: tasks, handlers, templates, and files, into reusable components.

 This example has six roles: `common`, `base-apache`, `db`, `haproxy`, `nagios`, and `web`. How you organize your roles is up to you and your application, but most sites will have one or more common roles that are applied to all systems, and then a series of application-specific roles that install and configure particular parts of the site.

 Roles can have variables and dependencies, and you can pass in parameters to roles to modify their behavior. You can read more about roles in the [Roles](playbooks_reuse_roles#playbooks-reuse-roles) section.

 Configuration: group variables
------------------------------

 Group variables are variables that are applied to groups of servers. They can be used in templates and in playbooks to customize behavior and to provide easily-changed settings and parameters. They are stored in a directory called `group_vars` in the same location as your inventory. Here is lamp\_haproxy’s `group_vars/all` file. As you might expect, these variables are applied to all of the machines in your inventory:

 
```
---
httpd_port: 80
ntpserver: 192.0.2.23

```
 This is a YAML file, and you can create lists and dictionaries for more complex variable structures. In this case, we are just setting two variables, one for the port for the web server, and one for the NTP server that our machines should use for time synchronization.

 Here’s another group variables file. This is `group_vars/dbservers` which applies to the hosts in the `dbservers` group:

 
```
---
mysqlservice: mysqld
mysql_port: 3306
dbuser: root
dbname: foodb
upassword: usersecret

```
 If you look in the example, there are group variables for the `webservers` group and the `lbservers` group, similarly.

 These variables are used in a variety of places. You can use them in playbooks, like this, in `roles/db/tasks/main.yml`:

 
```
- name: Create Application Database
  mysql_db:
    name: "{{ dbname }}"
    state: present

- name: Create Application DB User
  mysql_user:
    name: "{{ dbuser }}"
    password: "{{ upassword }}"
    priv: "*.*:ALL"
    host: '%'
    state: present

```
 You can also use these variables in templates, like this, in `roles/common/templates/ntp.conf.j2`:

 
```
driftfile /var/lib/ntp/drift

restrict 127.0.0.1
restrict -6 ::1

server {{ ntpserver }}

includefile /etc/ntp/crypto/pw

keys /etc/ntp/keys

```
 You can see that the variable substitution syntax of {{ and }} is the same for both templates and variables. The syntax inside the curly braces is Jinja2, and you can do all sorts of operations and apply different filters to the data inside. In templates, you can also use for loops and if statements to handle more complex situations, like this, in `roles/common/templates/iptables.j2`:

 
```
{% if inventory_hostname in groups['dbservers'] %}
-A INPUT -p tcp  --dport 3306 -j  ACCEPT
{% endif %}

```
 This is testing to see if the inventory name of the machine we’re currently operating on (`inventory_hostname`) exists in the inventory group `dbservers`. If so, that machine will get an iptables ACCEPT line for port 3306.

 Here’s another example, from the same template:

 
```
{% for host in groups['monitoring'] %}
-A INPUT -p tcp -s {{ hostvars[host].ansible_default_ipv4.address }} --dport 5666 -j ACCEPT
{% endfor %}

```
 This loops over all of the hosts in the group called `monitoring`, and adds an ACCEPT line for each monitoring hosts’ default IPv4 address to the current machine’s iptables configuration, so that Nagios can monitor those hosts.

 You can learn a lot more about Jinja2 and its capabilities [here](https://jinja.palletsprojects.com/), and you can read more about Ansible variables in general in the [Using Variables](playbooks_variables#playbooks-variables) section.

 The rolling upgrade
-------------------

 Now you have a fully-deployed site with web servers, a load balancer, and monitoring. How do you update it? This is where Ansible’s orchestration features come into play. While some applications use the term ‘orchestration’ to mean basic ordering or command-blasting, Ansible refers to orchestration as ‘conducting machines like an orchestra’, and has a pretty sophisticated engine for it.

 Ansible has the capability to do operations on multi-tier applications in a coordinated way, making it easy to orchestrate a sophisticated zero-downtime rolling upgrade of our web application. This is implemented in a separate playbook, called `rolling_update.yml`.

 Looking at the playbook, you can see it is made up of two plays. The first play is very simple and looks like this:

 
```
- hosts: monitoring
  tasks: []

```
 What’s going on here, and why are there no tasks? You might know that Ansible gathers “facts” from the servers before operating upon them. These facts are useful for all sorts of things: networking information, OS/distribution versions, and so on. In our case, we need to know something about all of the monitoring servers in our environment before we perform the update, so this simple play forces a fact-gathering step on our monitoring servers. You will see this pattern sometimes, and it’s a useful trick to know.

 The next part is the update play. The first part looks like this:

 
```
- hosts: webservers
  user: root
  serial: 1

```
 This is just a normal play definition, operating on the `webservers` group. The `serial` keyword tells Ansible how many servers to operate on at once. If it’s not specified, Ansible will parallelize these operations up to the default “forks” limit specified in the configuration file. But for a zero-downtime rolling upgrade, you may not want to operate on that many hosts at once. If you had just a handful of webservers, you may want to set `serial` to 1, for one host at a time. If you have 100, maybe you could set `serial` to 10, for ten at a time.

 Here is the next part of the update play:

 
```
pre_tasks:
- name: disable nagios alerts for this host webserver service
  nagios:
    action: disable_alerts
    host: "{{ inventory_hostname }}"
    services: webserver
  delegate_to: "{{ item }}"
  loop: "{{ groups.monitoring }}"

- name: disable the server in haproxy
  shell: echo "disable server myapplb/{{ inventory_hostname }}" | socat stdio /var/lib/haproxy/stats
  delegate_to: "{{ item }}"
  loop: "{{ groups.lbservers }}"

```
  Note

 * The `serial` keyword forces the play to be executed in ‘batches’. Each batch counts as a full play with a subselection of hosts. This has some consequences on play behavior. For example, if all hosts in a batch fails, the play fails, which in turn fails the entire run. You should consider this when combining with `max_fail_percentage`.

  The `pre_tasks` keyword just lets you list tasks to run before the roles are called. This will make more sense in a minute. If you look at the names of these tasks, you can see that we are disabling Nagios alerts and then removing the webserver that we are currently updating from the HAProxy load balancing pool.

 The `delegate_to` and `loop` arguments, used together, cause Ansible to loop over each monitoring server and load balancer, and perform that operation (delegate that operation) on the monitoring or load balancing server, “on behalf” of the webserver. In programming terms, the outer loop is the list of web servers, and the inner loop is the list of monitoring servers.

 Note that the HAProxy step looks a little complicated. We’re using HAProxy in this example because it’s freely available, though if you have (for instance) an F5 or Netscaler in your infrastructure (or maybe you have an AWS Elastic IP setup?), you can use Ansible modules to communicate with them instead. You might also wish to use other monitoring modules instead of nagios, but this just shows the main goal of the ‘pre tasks’ section – take the server out of monitoring, and take it out of rotation.

 The next step simply re-applies the proper roles to the web servers. This will cause any configuration management declarations in `web` and `base-apache` roles to be applied to the web servers, including an update of the web application code itself. We don’t have to do it this way–we could instead just purely update the web application, but this is a good example of how roles can be used to reuse tasks:

 
```
roles:
- common
- base-apache
- web

```
 Finally, in the `post_tasks` section, we reverse the changes to the Nagios configuration and put the web server back in the load balancing pool:

 
```
post_tasks:
- name: Enable the server in haproxy
  shell: echo "enable server myapplb/{{ inventory_hostname }}" | socat stdio /var/lib/haproxy/stats
  delegate_to: "{{ item }}"
  loop: "{{ groups.lbservers }}"

- name: re-enable nagios alerts
  nagios:
    action: enable_alerts
    host: "{{ inventory_hostname }}"
    services: webserver
  delegate_to: "{{ item }}"
  loop: "{{ groups.monitoring }}"

```
 Again, if you were using a Netscaler or F5 or Elastic Load Balancer, you would just substitute in the appropriate modules instead.

 Managing other load balancers
-----------------------------

 In this example, we use the simple HAProxy load balancer to front-end the web servers. It’s easy to configure and easy to manage. As we have mentioned, Ansible has support for a variety of other load balancers like Citrix NetScaler, F5 BigIP, Amazon Elastic Load Balancers, and more. See the [Working With Modules](modules#working-with-modules) documentation for more information.

 For other load balancers, you may need to send shell commands to them (like we do for HAProxy above), or call an API, if your load balancer exposes one. For the load balancers for which Ansible has modules, you may want to run them as a `local_action` if they contact an API. You can read more about local actions in the [Controlling where tasks run: delegation and local actions](playbooks_delegation#playbooks-delegation) section. Should you develop anything interesting for some hardware where there is not a module, it might make for a good contribution!

 Continuous delivery end-to-end
------------------------------

 Now that you have an automated way to deploy updates to your application, how do you tie it all together? A lot of organizations use a continuous integration tool like [Jenkins](https://jenkins.io/) or [Atlassian Bamboo](https://www.atlassian.com/software/bamboo) to tie the development, test, release, and deploy steps together. You may also want to use a tool like [Gerrit](https://www.gerritcodereview.com/) to add a code review step to commits to either the application code itself, or to your Ansible playbooks, or both.

 Depending on your environment, you might be deploying continuously to a test environment, running an integration test battery against that environment, and then deploying automatically into production. Or you could keep it simple and just use the rolling-update for on-demand deployment into test or production specifically. This is all up to you.

 For integration with Continuous Integration systems, you can easily trigger playbook runs using the `ansible-playbook` command line tool, or, if you’re using AWX, the `tower-cli` command or the built-in REST API. (The tower-cli command ‘joblaunch’ will spawn a remote job over the REST API and is pretty slick).

 This should give you a good idea of how to structure a multi-tier application with Ansible, and orchestrate operations upon that app, with the eventual goal of continuous delivery to your customers. You could extend the idea of the rolling upgrade to lots of different parts of the app; maybe add front-end web servers along with application servers, for instance, or replace the SQL database with something like MongoDB or Riak. Ansible gives you the capability to easily manage complicated environments and automate common operations.

  See also

  [lamp\_haproxy example](https://github.com/ansible/ansible-examples/tree/master/lamp_haproxy)

The lamp\_haproxy example discussed here.

  [Working with playbooks](playbooks#working-with-playbooks)

An introduction to playbooks

  [Roles](playbooks_reuse_roles#playbooks-reuse-roles)

An introduction to playbook roles

  [Using Variables](playbooks_variables#playbooks-variables)

An introduction to Ansible variables

  [Ansible.com: Continuous Delivery](https://www.ansible.com/use-cases/continuous-delivery)

An introduction to Continuous Delivery with Ansible

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/guide_rolling_upgrade.html>

Netconf Plugins
===============

 * [Adding netconf plugins](#adding-netconf-plugins)
* [Using netconf plugins](#using-netconf-plugins)
* [Listing netconf plugins](#listing-netconf-plugins)

 Netconf plugins are abstractions over the Netconf interface to network devices. They provide a standard interface for Ansible to execute tasks on those network devices.

 These plugins generally correspond one-to-one to network device platforms. Ansible loads the appropriate netconf plugin automatically based on the `ansible_network_os` variable. If the platform supports standard Netconf implementation as defined in the Netconf RFC specification, Ansible loads the `default` netconf plugin. If the platform supports propriety Netconf RPCs, Ansible loads the platform-specific netconf plugin.

 Adding netconf plugins
----------------------

 You can extend Ansible to support other network devices by dropping a custom plugin into the `netconf_plugins` directory.

 Using netconf plugins
---------------------

 The netconf plugin to use is determined automatically from the `ansible_network_os` variable. There should be no reason to override this functionality.

 Most netconf plugins can operate without configuration. A few have additional options that can be set to affect how tasks are translated into netconf commands. A ncclient device specific handler name can be set in the netconf plugin or else the value of `default` is used as per ncclient device handler.

 Plugins are self-documenting. Each plugin should document its configuration options.

 Listing netconf 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 netconf plugins. To list all available netconf plugins on your control node, type `ansible-doc -t netconf -l`. To view plugin-specific documentation and examples, use `ansible-doc -t netconf`.

  See also

  [Ansible for Network Automation](../network/index#network-guide)

An overview of using Ansible to automate networking devices.

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible-network IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/plugins/netconf.html>

Cliconf Plugins
===============

 * [Adding cliconf plugins](#adding-cliconf-plugins)
* [Using cliconf plugins](#using-cliconf-plugins)
* [Viewing cliconf plugins](#viewing-cliconf-plugins)

 Cliconf plugins are abstractions over the CLI interface to network devices. They provide a standard interface for Ansible to execute tasks on those network devices.

 These plugins generally correspond one-to-one to network device platforms. Ansible loads the appropriate cliconf plugin automatically based on the `ansible_network_os` variable.

 Adding cliconf plugins
----------------------

 You can extend Ansible to support other network devices by dropping a custom plugin into the `cliconf_plugins` directory.

 Using cliconf plugins
---------------------

 The cliconf plugin to use is determined automatically from the `ansible_network_os` variable. There should be no reason to override this functionality.

 Most cliconf plugins can operate without configuration. A few have additional options that can be set to affect how tasks are translated into CLI commands.

 Plugins are self-documenting. Each plugin should document its configuration options.

 Viewing cliconf 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 cliconf plugins. To list all available cliconf plugins on your control node, type `ansible-doc -t cliconf -l`. To view plugin-specific documentation and examples, use `ansible-doc -t cliconf`.

  See also

  [Ansible for Network Automation](../network/index#network-guide)

An overview of using Ansible to automate networking devices.

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible-network IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/plugins/cliconf.html>

Module Maintenance & Support
============================

 If you are using a module and you discover a bug, you may want to know where to report that bug, who is responsible for fixing it, and how you can track changes to the module. If you are a Red Hat subscriber, you may want to know whether you can get support for the issue you are facing.

 Starting in Ansible 2.10, most modules live in collections. The distribution method for each collection reflects the maintenance and support for the modules in that collection.

 * [Maintenance](#maintenance)
* [Issue Reporting](#issue-reporting)
* [Support](#support)

 Maintenance
-----------

 

| Collection | Code location | Maintained by |
| --- | --- | --- |
| ansible.builtin | [ansible/ansible repo](https://github.com/ansible/ansible/tree/devel/lib/ansible/modules) on GitHub | core team |
| distributed on Galaxy | various; follow `repo` link | community or partners |
| distributed on Automation Hub | various; follow `repo` link | content team or partners |

 Issue Reporting
---------------

 If you find a bug that affects a plugin in the main Ansible repo, also known as `ansible-core`:

 1. Confirm that you are running the latest stable version of Ansible or the devel branch.
2. Look at the [issue tracker in the Ansible repo](https://github.com/ansible/ansible/issues) to see if an issue has already been filed.
3. Create an issue if one does not already exist. Include as much detail as you can about the behavior you discovered.

 If you find a bug that affects a plugin in a Galaxy collection:

 1. Find the collection on Galaxy.
2. Find the issue tracker for the collection.
3. Look there to see if an issue has already been filed.
4. Create an issue if one does not already exist. Include as much detail as you can about the behavior you discovered.

 Some partner collections may be hosted in private repositories.

 If you are not sure whether the behavior you see is a bug, if you have questions, if you want to discuss development-oriented topics, or if you just want to get in touch, use one of our Google groups or IRC channels to [communicate with Ansiblers](https://docs.ansible.com/ansible/latest/community/communication.html#communication).

 If you find a bug that affects a module in an Automation Hub collection:

 1. If the collection offers an Issue Tracker link on Automation Hub, click there and open an issue on the collection repository. If it does not, follow the standard process for reporting issues on the [Red Hat Customer Portal](https://access.redhat.com/). You must have a subscription to the Red Hat Ansible Automation Platform to create an issue on the portal.

 Support
-------

 All plugins that remain in `ansible-core` and all collections hosted in Automation Hub are supported by Red Hat. No other plugins or collections are supported by Red Hat. If you have a subscription to the Red Hat Ansible Automation Platform, you can find more information and resources on the [Red Hat Customer Portal.](https://access.redhat.com/)

  See also

  [Introduction to ad hoc commands](intro_adhoc#intro-adhoc)

Examples of using modules in /usr/bin/ansible

  [Working with playbooks](playbooks#working-with-playbooks)

Examples of using modules with /usr/bin/ansible-playbook

  [Mailing List](https://groups.google.com/group/ansible-project)

Questions? Help? Ideas? Stop by the list on Google Groups

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/modules_support.html>

Templating (Jinja2)
===================

 Ansible uses Jinja2 templating to enable dynamic expressions and access to variables. Ansible includes a lot of specialized filters and tests for templating. You can use all the [standard filters and tests](https://jinja.palletsprojects.com/en/3.0.x/templates/#builtin-filters "(in Jinja v3.0.x)") included in Jinja2 as well. Ansible also offers a new plugin type: [Lookup Plugins](../plugins/lookup#lookup-plugins).

 All templating happens on the Ansible controller **before** the task is sent and executed on the target machine. This approach minimizes the package requirements on the target (jinja2 is only required on the controller). It also limits the amount of data Ansible passes to the target machine. Ansible parses templates on the controller and passes only the information needed for each task to the target machine, instead of passing all the data on the controller and parsing it on the target.

 * [Using filters to manipulate data](playbooks_filters)
	+ [Handling undefined variables](playbooks_filters#handling-undefined-variables)
	+ [Defining different values for true/false/null (ternary)](playbooks_filters#defining-different-values-for-true-false-null-ternary)
	+ [Managing data types](playbooks_filters#managing-data-types)
	+ [Formatting data: YAML and JSON](playbooks_filters#formatting-data-yaml-and-json)
	+ [Combining and selecting data](playbooks_filters#combining-and-selecting-data)
	+ [Randomizing data](playbooks_filters#randomizing-data)
	+ [Managing list variables](playbooks_filters#managing-list-variables)
	+ [Selecting from sets or lists (set theory)](playbooks_filters#selecting-from-sets-or-lists-set-theory)
	+ [Calculating numbers (math)](playbooks_filters#calculating-numbers-math)
	+ [Managing network interactions](playbooks_filters#managing-network-interactions)
	+ [Encrypting and checksumming strings and passwords](playbooks_filters#encrypting-and-checksumming-strings-and-passwords)
	+ [Manipulating text](playbooks_filters#manipulating-text)
	+ [Manipulating strings](playbooks_filters#manipulating-strings)
	+ [Managing UUIDs](playbooks_filters#managing-uuids)
	+ [Handling dates and times](playbooks_filters#handling-dates-and-times)
	+ [Getting Kubernetes resource names](playbooks_filters#getting-kubernetes-resource-names)
* [Tests](playbooks_tests)
	+ [Test syntax](playbooks_tests#test-syntax)
	+ [Testing strings](playbooks_tests#testing-strings)
	+ [Vault](playbooks_tests#vault)
	+ [Testing truthiness](playbooks_tests#testing-truthiness)
	+ [Comparing versions](playbooks_tests#comparing-versions)
	+ [Set theory tests](playbooks_tests#set-theory-tests)
	+ [Testing if a list contains a value](playbooks_tests#testing-if-a-list-contains-a-value)
	+ [Testing if a list value is True](playbooks_tests#testing-if-a-list-value-is-true)
	+ [Testing paths](playbooks_tests#testing-paths)
	+ [Testing size formats](playbooks_tests#testing-size-formats)
	+ [Testing task results](playbooks_tests#testing-task-results)
* [Lookups](playbooks_lookups)
	+ [Using lookups in variables](playbooks_lookups#using-lookups-in-variables)
* [Python3 in templates](playbooks_python_version)
	+ [Dictionary views](playbooks_python_version#dictionary-views)
	+ [dict.iteritems()](playbooks_python_version#dict-iteritems)

 Get the current time
--------------------

  New in version 2.8.

  The `now()` Jinja2 function retrieves a Python datetime object or a string representation for the current time.

 The `now()` function supports 2 arguments:

  utc

Specify `True` to get the current time in UTC. Defaults to `False`.

  fmt

Accepts a [strftime](https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior) string that returns a formatted date time string.

    See also

  [Intro to playbooks](playbooks_intro#playbooks-intro)

An introduction to playbooks

  [Conditionals](playbooks_conditionals#playbooks-conditionals)

Conditional statements in playbooks

  [Loops](playbooks_loops#playbooks-loops)

Looping in playbooks

  [Roles](playbooks_reuse_roles#playbooks-reuse-roles)

Playbook organization by roles

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_templating.html>

Strategy Plugins
================

 * [Enabling strategy plugins](#enabling-strategy-plugins)
* [Using strategy plugins](#using-strategy-plugins)
* [Plugin list](#plugin-list)

 Strategy plugins control the flow of play execution by handling task and host scheduling.

 Enabling strategy plugins
-------------------------

 All strategy plugins shipped with Ansible are enabled by default. You can enable a custom strategy plugin by putting it in one of the lookup directory sources configured in [ansible.cfg](../reference_appendices/config#ansible-configuration-settings).

 Using strategy plugins
----------------------

 Only one strategy plugin can be used in a play, but you can use different ones for each play in a playbook or ansible run. The default is the [linear](../collections/ansible/builtin/linear_strategy#linear-strategy) plugin. You can change this default in Ansible [configuration](../reference_appendices/config#ansible-configuration-settings) using an environment variable:

 
```
export ANSIBLE_STRATEGY=free

```
 or in the `ansible.cfg` file:

 
```
[defaults]
strategy=linear

```
 You can also specify the strategy plugin in the play via the [strategy keyword](../reference_appendices/playbooks_keywords#playbook-keywords) in a play:

 
```
- hosts: all
  strategy: debug
  tasks:
    - copy: src=myhosts dest=/etc/hosts
      notify: restart_tomcat

    - package: name=tomcat state=present

  handlers:
    - name: restart_tomcat
      service: name=tomcat state=restarted

```
 Plugin list
-----------

 You can use `ansible-doc -t strategy -l` to see the list of available plugins. Use `ansible-doc -t strategy <plugin name>` to see plugin-specific specific documentation and examples.

  See also

  [Intro to playbooks](../user_guide/playbooks_intro#about-playbooks)

An introduction to playbooks

  [Inventory Plugins](inventory#inventory-plugins)

Ansible inventory plugins

  [Callback Plugins](callback#callback-plugins)

Ansible callback plugins

  [Using filters to manipulate data](../user_guide/playbooks_filters#playbooks-filters)

Jinja2 filter plugins

  [Tests](../user_guide/playbooks_tests#playbooks-tests)

Jinja2 test plugins

  [Lookups](../user_guide/playbooks_lookups#playbooks-lookups)

Jinja2 lookup plugins

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/plugins/strategy.html>

Httpapi Plugins
===============

 * [Adding httpapi plugins](#adding-httpapi-plugins)
* [Using httpapi plugins](#using-httpapi-plugins)
* [Viewing httpapi plugins](#viewing-httpapi-plugins)

 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.

 Adding httpapi plugins
----------------------

 You can extend Ansible to support other APIs by dropping a custom plugin into the `httpapi_plugins` directory. See [Developing httpapi plugins](../network/dev_guide/developing_plugins_network#developing-plugins-httpapi) for details.

 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:

 
```
- 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).

 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`.

  See also

  [Ansible for Network Automation](../network/index#network-guide)

An overview of using Ansible to automate networking devices.

  [Developing network modules](../network/dev_guide/developing_plugins_network#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.libera.chat](https://libera.chat/)

#ansible-network IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/plugins/httpapi.html>

ansible-console
===============

 **REPL console for executing Ansible tasks.**

 * [Synopsis](#synopsis)
* [Description](#description)
* [Common Options](#common-options)
* [Environment](#environment)
* [Files](#files)
* [Author](#author)
* [License](#license)
* [See also](#see-also)

 Synopsis
--------

 
```
usage: ansible-console [-h] [--version] [-v] [-b]
                    [--become-method BECOME_METHOD]
                    [--become-user BECOME_USER] [-K] [-i INVENTORY]
                    [--list-hosts] [-l SUBSET] [-k]
                    [--private-key PRIVATE_KEY_FILE] [-u REMOTE_USER]
                    [-c CONNECTION] [-T TIMEOUT]
                    [--ssh-common-args SSH_COMMON_ARGS]
                    [--sftp-extra-args SFTP_EXTRA_ARGS]
                    [--scp-extra-args SCP_EXTRA_ARGS]
                    [--ssh-extra-args SSH_EXTRA_ARGS] [-C] [--syntax-check]
                    [-D] [--vault-id VAULT_IDS]
                    [--ask-vault-password | --vault-password-file VAULT_PASSWORD_FILES]
                    [-f FORKS] [-M MODULE_PATH] [--playbook-dir BASEDIR]
                    [-e EXTRA_VARS] [--task-timeout TASK_TIMEOUT] [--step]
                    [pattern]

```
 Description
-----------

 A REPL that allows for running ad-hoc tasks against a chosen inventory from a nice shell with built-in tab completion (based on dominis’ ansible-shell).

 It supports several commands, and you can modify its configuration at runtime:

 * `cd [pattern]`: change host/group (you can use host patterns eg.: app\*.dc\*:!app01\*)
* `list`: list available hosts in the current path
* `list groups`: list groups included in the current path
* `become`: toggle the become flag
* `!`: forces shell module instead of the ansible module (!yum update -y)
* `verbosity [num]`: set the verbosity level
* `forks [num]`: set the number of forks
* `become_user [user]`: set the become\_user
* `remote_user [user]`: set the remote\_user
* `become_method [method]`: set the privilege escalation method
* `check [bool]`: toggle check mode
* `diff [bool]`: toggle diff mode
* `timeout [integer]`: set the timeout of tasks in seconds (0 to disable)
* `help [command/module]`: display documentation for the command or module
* `exit`: exit ansible-console

 Common Options
--------------

  
`--ask-vault-password, --ask-vault-pass`  
ask for vault password

 
  
`--become-method <BECOME_METHOD>`  
privilege escalation method to use (default=sudo), use `ansible-doc -t become -l` to list valid choices.

 
  
`--become-user <BECOME_USER>`  
run operations as this user (default=root)

 
  
`--list-hosts`  
outputs a list of matching hosts; does not execute anything else

 
  
`--playbook-dir <BASEDIR>`  
Since this tool does not use playbooks, use this as a substitute playbook directory.This sets the relative path for many features including roles/ group\_vars/ etc.

 
  
`--private-key <PRIVATE_KEY_FILE>, --key-file <PRIVATE_KEY_FILE>`  
use this file to authenticate the connection

 
  
`--scp-extra-args <SCP_EXTRA_ARGS>`  
specify extra arguments to pass to scp only (e.g. -l)

 
  
`--sftp-extra-args <SFTP_EXTRA_ARGS>`  
specify extra arguments to pass to sftp only (e.g. -f, -l)

 
  
`--ssh-common-args <SSH_COMMON_ARGS>`  
specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)

 
  
`--ssh-extra-args <SSH_EXTRA_ARGS>`  
specify extra arguments to pass to ssh only (e.g. -R)

 
  
`--step`  
one-step-at-a-time: confirm each task before running

 
  
`--syntax-check`  
perform a syntax check on the playbook, but do not execute it

 
  
`--task-timeout <TASK_TIMEOUT>`  
set task timeout limit in seconds, must be positive integer.

 
  
`--vault-id`  
the vault identity to use

 
  
`--vault-password-file, --vault-pass-file`  
vault password file

 
  
`--version`  
show program’s version number, config file location, configured module search path, module location, executable location and exit

 
  
`-C, --check`  
don’t make any changes; instead, try to predict some of the changes that may occur

 
  
`-D, --diff`  
when changing (small) files and templates, show the differences in those files; works great with –check

 
  
`-K, --ask-become-pass`  
ask for privilege escalation password

 
  
`-M, --module-path`  
prepend colon-separated path(s) to module library (default=~/.ansible/plugins/modules:/usr/share/ansible/plugins/modules)

 
  
`-T <TIMEOUT>, --timeout <TIMEOUT>`  
override the connection timeout in seconds (default=10)

 
  
`-b, --become`  
run operations with become (does not imply password prompting)

 
  
`-c <CONNECTION>, --connection <CONNECTION>`  
connection type to use (default=smart)

 
  
`-e, --extra-vars`  
set additional variables as key=value or YAML/JSON, if filename prepend with @

 
  
`-f <FORKS>, --forks <FORKS>`  
specify number of parallel processes to use (default=5)

 
  
`-h, --help`  
show this help message and exit

 
  
`-i, --inventory, --inventory-file`  
specify inventory host path or comma separated host list. –inventory-file is deprecated

 
  
`-k, --ask-pass`  
ask for connection password

 
  
`-l <SUBSET>, --limit <SUBSET>`  
further limit selected hosts to an additional pattern

 
  
`-u <REMOTE_USER>, --user <REMOTE_USER>`  
connect as this user (default=None)

 
  
`-v, --verbose`  
verbose mode (-vvv for more, -vvvv to enable connection debugging)

 
 Environment
-----------

 The following environment variables may be specified.

 [`ANSIBLE_CONFIG`](../reference_appendices/config#envvar-ANSIBLE_CONFIG) – Override the default ansible config file

 Many more are available for most options in ansible.cfg

 Files
-----

 `/etc/ansible/ansible.cfg` – Config file, used if present

 `~/.ansible.cfg` – User config file, overrides the default config if present

 Author
------

 Ansible was originally written by Michael DeHaan.

 See the `AUTHORS` file for a complete list of contributors.

 License
-------

 Ansible is released under the terms of the GPLv3+ License.

 See also
--------

 *ansible(1)*, *ansible-config(1)*, *ansible-console(1)*, *ansible-doc(1)*, *ansible-galaxy(1)*, *ansible-inventory(1)*, *ansible-playbook(1)*, *ansible-pull(1)*, *ansible-vault(1)*,



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/cli/ansible-console.html>

ansible-doc
===========

 **plugin documentation tool**

 * [Synopsis](#synopsis)
* [Description](#description)
* [Common Options](#common-options)
* [Environment](#environment)
* [Files](#files)
* [Author](#author)
* [License](#license)
* [See also](#see-also)

 Synopsis
--------

 
```
usage: ansible-doc [-h] [--version] [-v] [-M MODULE_PATH]
                [--playbook-dir BASEDIR]
                [-t {become,cache,callback,cliconf,connection,httpapi,inventory,lookup,netconf,shell,vars,module,strategy,role,keyword}]
                [-j] [-r ROLES_PATH]
                [-F | -l | -s | --metadata-dump | -e ENTRY_POINT]
                [plugin [plugin ...]]

```
 Description
-----------

 displays information on modules installed in Ansible libraries. It displays a terse listing of plugins and their short descriptions, provides a printout of their DOCUMENTATION strings, and it can create a short “snippet” which can be pasted into a playbook.

 Common Options
--------------

  
`--metadata-dump`  
**For internal testing only** Dump json metadata for all plugins.

 
  
`--playbook-dir <BASEDIR>`  
Since this tool does not use playbooks, use this as a substitute playbook directory.This sets the relative path for many features including roles/ group\_vars/ etc.

 
  
`--version`  
show program’s version number, config file location, configured module search path, module location, executable location and exit

 
  
`-F, --list_files`  
Show plugin names and their source files without summaries (implies –list). A supplied argument will be used for filtering, can be a namespace or full collection name.

 
  
`-M, --module-path`  
prepend colon-separated path(s) to module library (default=~/.ansible/plugins/modules:/usr/share/ansible/plugins/modules)

 
  
`-e <ENTRY_POINT>, --entry-point <ENTRY_POINT>`  
Select the entry point for role(s).

 
  
`-h, --help`  
show this help message and exit

 
  
`-j, --json`  
Change output into json format.

 
  
`-l, --list`  
List available plugins. A supplied argument will be used for filtering, can be a namespace or full collection name.

 
  
`-r, --roles-path`  
The path to the directory containing your roles.

 
  
`-s, --snippet`  
Show playbook snippet for specified plugin(s)

 
  
`-t <TYPE>, --type <TYPE>`  
Choose which plugin type (defaults to “module”). Available plugin types are : (‘become’, ‘cache’, ‘callback’, ‘cliconf’, ‘connection’, ‘httpapi’, ‘inventory’, ‘lookup’, ‘netconf’, ‘shell’, ‘vars’, ‘module’, ‘strategy’, ‘role’, ‘keyword’)

 
  
`-v, --verbose`  
verbose mode (-vvv for more, -vvvv to enable connection debugging)

 
 Environment
-----------

 The following environment variables may be specified.

 [`ANSIBLE_CONFIG`](../reference_appendices/config#envvar-ANSIBLE_CONFIG) – Override the default ansible config file

 Many more are available for most options in ansible.cfg

 Files
-----

 `/etc/ansible/ansible.cfg` – Config file, used if present

 `~/.ansible.cfg` – User config file, overrides the default config if present

 Author
------

 Ansible was originally written by Michael DeHaan.

 See the `AUTHORS` file for a complete list of contributors.

 License
-------

 Ansible is released under the terms of the GPLv3+ License.

 See also
--------

 *ansible(1)*, *ansible-config(1)*, *ansible-console(1)*, *ansible-doc(1)*, *ansible-galaxy(1)*, *ansible-inventory(1)*, *ansible-playbook(1)*, *ansible-pull(1)*, *ansible-vault(1)*,



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/cli/ansible-doc.html>

Desired State Configuration
===========================

 * [What is Desired State Configuration?](#what-is-desired-state-configuration)
* [Host Requirements](#host-requirements)
* [Why Use DSC?](#why-use-dsc)
* [How to Use DSC?](#how-to-use-dsc)


	+ [Property Types](#property-types)
	
	
		- [PSCredential](#pscredential)
		- [CimInstance Type](#ciminstance-type)
		- [HashTable Type](#hashtable-type)
		- [Arrays](#arrays)
		- [DateTime](#datetime)
	+ [Run As Another User](#run-as-another-user)
* [Custom DSC Resources](#custom-dsc-resources)


	+ [Finding Custom DSC Resources](#finding-custom-dsc-resources)
	+ [Installing a Custom Resource](#installing-a-custom-resource)
* [Examples](#examples)


	+ [Extract a zip file](#extract-a-zip-file)
	+ [Create a directory](#create-a-directory)
	+ [Interact with Azure](#interact-with-azure)
	+ [Setup IIS Website](#setup-iis-website)

 What is Desired State Configuration?
------------------------------------

 Desired State Configuration, or DSC, is a tool built into PowerShell that can be used to define a Windows host setup through code. The overall purpose of DSC is the same as Ansible, it is just executed in a different manner. Since Ansible 2.4, the `win_dsc` module has been added and can be used to leverage existing DSC resources when interacting with a Windows host.

 More details on DSC can be viewed at [DSC Overview](https://docs.microsoft.com/en-us/powershell/scripting/dsc/overview/overview).

 Host Requirements
-----------------

 To use the `win_dsc` module, a Windows host must have PowerShell v5.0 or newer installed. All supported hosts, except for Windows Server 2008 (non R2) can be upgraded to PowerShell v5.

 Once the PowerShell requirements have been met, using DSC is as simple as creating a task with the `win_dsc` module.

 Why Use DSC?
------------

 DSC and Ansible modules have a common goal which is to define and ensure the state of a resource. Because of this, resources like the DSC [File resource](https://docs.microsoft.com/en-us/powershell/scripting/dsc/reference/resources/windows/fileresource) and Ansible `win_file` can be used to achieve the same result. Deciding which to use depends on the scenario.

 Reasons for using an Ansible module over a DSC resource:

 * The host does not support PowerShell v5.0, or it cannot easily be upgraded
* The DSC resource does not offer a feature present in an Ansible module. For example win\_regedit can manage the `REG_NONE` property type, while the DSC `Registry` resource cannot
* DSC resources have limited check mode support, while some Ansible modules have better checks
* DSC resources do not support diff mode, while some Ansible modules do
* Custom resources require further installation steps to be run on the host beforehand, while Ansible modules are built-in to Ansible
* There are bugs in a DSC resource where an Ansible module works

 Reasons for using a DSC resource over an Ansible module:

 * The Ansible module does not support a feature present in a DSC resource
* There is no Ansible module available
* There are bugs in an existing Ansible module

 In the end, it doesn’t matter whether the task is performed with DSC or an Ansible module; what matters is that the task is performed correctly and the playbooks are still readable. If you have more experience with DSC over Ansible and it does the job, just use DSC for that task.

 How to Use DSC?
---------------

 The `win_dsc` module takes in a free-form of options so that it changes according to the resource it is managing. A list of built in resources can be found at [resources](https://docs.microsoft.com/en-us/powershell/scripting/dsc/resources/resources).

 Using the [Registry](https://docs.microsoft.com/en-us/powershell/scripting/dsc/reference/resources/windows/registryresource) resource as an example, this is the DSC definition as documented by Microsoft:

 
```
Registry [string] #ResourceName
{
    Key = [string]
    ValueName = [string]
    [ Ensure = [string] { Enable | Disable }  ]
    [ Force =  [bool]   ]
    [ Hex = [bool] ]
    [ DependsOn = [string[]] ]
    [ ValueData = [string[]] ]
    [ ValueType = [string] { Binary | Dword | ExpandString | MultiString | Qword | String }  ]
}

```
 When defining the task, `resource_name` must be set to the DSC resource being used - in this case the `resource_name` should be set to `Registry`. The `module_version` can refer to a specific version of the DSC resource installed; if left blank it will default to the latest version. The other options are parameters that are used to define the resource, such as `Key` and `ValueName`. While the options in the task are not case sensitive, keeping the case as-is is recommended because it makes it easier to distinguish DSC resource options from Ansible’s `win_dsc` options.

 This is what the Ansible task version of the above DSC Registry resource would look like:

 
```
- name: Use win_dsc module with the Registry DSC resource
  win_dsc:
    resource_name: Registry
    Ensure: Present
    Key: HKEY_LOCAL_MACHINE\SOFTWARE\ExampleKey
    ValueName: TestValue
    ValueData: TestData

```
 Starting in Ansible 2.8, the `win_dsc` module automatically validates the input options from Ansible with the DSC definition. This means Ansible will fail if the option name is incorrect, a mandatory option is not set, or the value is not a valid choice. When running Ansible with a verbosity level of 3 or more (`-vvv`), the return value will contain the possible invocation options based on the `resource_name` specified. Here is an example of the invocation output for the above `Registry` task:

 
```
changed: [2016] => {
    "changed": true,
    "invocation": {
        "module_args": {
            "DependsOn": null,
            "Ensure": "Present",
            "Force": null,
            "Hex": null,
            "Key": "HKEY_LOCAL_MACHINE\\SOFTWARE\\ExampleKey",
            "PsDscRunAsCredential_password": null,
            "PsDscRunAsCredential_username": null,
            "ValueData": [
                "TestData"
            ],
            "ValueName": "TestValue",
            "ValueType": null,
            "module_version": "latest",
            "resource_name": "Registry"
        }
    },
    "module_version": "1.1",
    "reboot_required": false,
    "verbose_set": [
        "Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = ResourceSet,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.",
        "An LCM method call arrived from computer SERVER2016 with user sid S-1-5-21-3088887838-4058132883-1884671576-1105.",
        "[SERVER2016]: LCM:  [ Start  Set      ]  [[Registry]DirectResourceAccess]",
        "[SERVER2016]:                            [[Registry]DirectResourceAccess] (SET) Create registry key 'HKLM:\\SOFTWARE\\ExampleKey'",
        "[SERVER2016]:                            [[Registry]DirectResourceAccess] (SET) Set registry key value 'HKLM:\\SOFTWARE\\ExampleKey\\TestValue' to 'TestData' of type 'String'",
        "[SERVER2016]: LCM:  [ End    Set      ]  [[Registry]DirectResourceAccess]  in 0.1930 seconds.",
        "[SERVER2016]: LCM:  [ End    Set      ]    in  0.2720 seconds.",
        "Operation 'Invoke CimMethod' complete.",
        "Time taken for configuration job to complete is 0.402 seconds"
    ],
    "verbose_test": [
        "Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = ResourceTest,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.",
        "An LCM method call arrived from computer SERVER2016 with user sid S-1-5-21-3088887838-4058132883-1884671576-1105.",
        "[SERVER2016]: LCM:  [ Start  Test     ]  [[Registry]DirectResourceAccess]",
        "[SERVER2016]:                            [[Registry]DirectResourceAccess] Registry key 'HKLM:\\SOFTWARE\\ExampleKey' does not exist",
        "[SERVER2016]: LCM:  [ End    Test     ]  [[Registry]DirectResourceAccess] False in 0.2510 seconds.",
        "[SERVER2016]: LCM:  [ End    Set      ]    in  0.3310 seconds.",
        "Operation 'Invoke CimMethod' complete.",
        "Time taken for configuration job to complete is 0.475 seconds"
    ]
}

```
 The `invocation.module_args` key shows the actual values that were set as well as other possible values that were not set. Unfortunately this will not show the default value for a DSC property, only what was set from the Ansible task. Any `*_password` option will be masked in the output for security reasons, if there are any other sensitive module options, set `no_log: True` on the task to stop all task output from being logged.

 ### Property Types

 Each DSC resource property has a type that is associated with it. Ansible will try to convert the defined options to the correct type during execution. For simple types like `[string]` and `[bool]` this is a simple operation, but complex types like `[PSCredential]` or arrays (like `[string[]]`) this require certain rules.

 #### PSCredential

 A `[PSCredential]` object is used to store credentials in a secure way, but Ansible has no way to serialize this over JSON. To set a DSC PSCredential property, the definition of that parameter should have two entries that are suffixed with `_username` and `_password` for the username and password respectively. For example:

 
```
PsDscRunAsCredential_username: '{{ ansible_user }}'
PsDscRunAsCredential_password: '{{ ansible_password }}'

SourceCredential_username: AdminUser
SourceCredential_password: PasswordForAdminUser

```
  Note

 On versions of Ansible older than 2.8, you should set `no_log: yes` on the task definition in Ansible to ensure any credentials used are not stored in any log file or console output.

  A `[PSCredential]` is defined with `EmbeddedInstance("MSFT_Credential")` in a DSC resource MOF definition.

 #### CimInstance Type

 A `[CimInstance]` object is used by DSC to store a dictionary object based on a custom class defined by that resource. Defining a value that takes in a `[CimInstance]` in YAML is the same as defining a dictionary in YAML. For example, to define a `[CimInstance]` value in Ansible:

 
```
# [CimInstance]AuthenticationInfo == MSFT_xWebAuthenticationInformation
AuthenticationInfo:
  Anonymous: no
  Basic: yes
  Digest: no
  Windows: yes

```
 In the above example, the CIM instance is a representation of the class [MSFT\_xWebAuthenticationInformation](https://github.com/dsccommunity/xWebAdministration/blob/master/source/DSCResources/MSFT_xWebSite/MSFT_xWebSite.schema.mof). This class accepts four boolean variables, `Anonymous`, `Basic`, `Digest`, and `Windows`. The keys to use in a `[CimInstance]` depend on the class it represents. Please read through the documentation of the resource to determine the keys that can be used and the types of each key value. The class definition is typically located in the `<resource name>.schema.mof`.

 #### HashTable Type

 A `[HashTable]` object is also a dictionary but does not have a strict set of keys that can/need to be defined. Like a `[CimInstance]`, define it like a normal dictionary value in YAML. A `[HashTable]]` is defined with `EmbeddedInstance("MSFT_KeyValuePair")` in a DSC resource MOF definition.

 #### Arrays

 Simple type arrays like `[string[]]` or `[UInt32[]]` are defined as a list or as a comma separated string which are then cast to their type. Using a list is recommended because the values are not manually parsed by the `win_dsc` module before being passed to the DSC engine. For example, to define a simple type array in Ansible:

 
```
# [string[]]
ValueData: entry1, entry2, entry3
ValueData:
- entry1
- entry2
- entry3

# [UInt32[]]
ReturnCode: 0,3010
ReturnCode:
- 0
- 3010

```
 Complex type arrays like `[CimInstance[]]` (array of dicts), can be defined like this example:

 
```
# [CimInstance[]]BindingInfo == MSFT_xWebBindingInformation
BindingInfo:
- Protocol: https
  Port: 443
  CertificateStoreName: My
  CertificateThumbprint: C676A89018C4D5902353545343634F35E6B3A659
  HostName: DSCTest
  IPAddress: '*'
  SSLFlags: 1
- Protocol: http
  Port: 80
  IPAddress: '*'

```
 The above example, is an array with two values of the class [MSFT\_xWebBindingInformation](https://github.com/dsccommunity/xWebAdministration/blob/master/source/DSCResources/MSFT_xWebSite/MSFT_xWebSite.schema.mof). When defining a `[CimInstance[]]`, be sure to read the resource documentation to find out what keys to use in the definition.

 #### DateTime

 A `[DateTime]` object is a DateTime string representing the date and time in the [ISO 8601](https://www.w3.org/TR/NOTE-datetime) date time format. The value for a `[DateTime]` field should be quoted in YAML to ensure the string is properly serialized to the Windows host. Here is an example of how to define a `[DateTime]` value in Ansible:

 
```
# As UTC-0 (No timezone)
DateTime: '2019-02-22T13:57:31.2311892+00:00'

# As UTC+4
DateTime: '2019-02-22T17:57:31.2311892+04:00'

# As UTC-4
DateTime: '2019-02-22T09:57:31.2311892-04:00'

```
 All the values above are equal to a UTC date time of February 22nd 2019 at 1:57pm with 31 seconds and 2311892 milliseconds.

 ### Run As Another User

 By default, DSC runs each resource as the SYSTEM account and not the account that Ansible use to run the module. This means that resources that are dynamically loaded based on a user profile, like the `HKEY_CURRENT_USER` registry hive, will be loaded under the `SYSTEM` profile. The parameter `PsDscRunAsCredential` is a parameter that can be set for every DSC resource force the DSC engine to run under a different account. As `PsDscRunAsCredential` has a type of `PSCredential`, it is defined with the `_username` and `_password` suffix.

 Using the Registry resource type as an example, this is how to define a task to access the `HKEY_CURRENT_USER` hive of the Ansible user:

 
```
- name: Use win_dsc with PsDscRunAsCredential to run as a different user
  win_dsc:
    resource_name: Registry
    Ensure: Present
    Key: HKEY_CURRENT_USER\ExampleKey
    ValueName: TestValue
    ValueData: TestData
    PsDscRunAsCredential_username: '{{ ansible_user }}'
    PsDscRunAsCredential_password: '{{ ansible_password }}'
  no_log: yes

```
 Custom DSC Resources
--------------------

 DSC resources are not limited to the built-in options from Microsoft. Custom modules can be installed to manage other resources that are not usually available.

 ### Finding Custom DSC Resources

 You can use the [PSGallery](https://www.powershellgallery.com/) to find custom resources, along with documentation on how to install them on a Windows host.

 The `Find-DscResource` cmdlet can also be used to find custom resources. For example:

 
```
# Find all DSC resources in the configured repositories
Find-DscResource

# Find all DSC resources that relate to SQL
Find-DscResource -ModuleName "*sql*"

```
  Note

 DSC resources developed by Microsoft that start with `x`, means the resource is experimental and comes with no support.

  ### Installing a Custom Resource

 There are three ways that a DSC resource can be installed on a host:

 * Manually with the `Install-Module` cmdlet
* Using the `win_psmodule` Ansible module
* Saving the module manually and copying it another host

 This is an example of installing the `xWebAdministration` resources using `win_psmodule`:

 
```
- name: Install xWebAdministration DSC resource
  win_psmodule:
    name: xWebAdministration
    state: present

```
 Once installed, the win\_dsc module will be able to use the resource by referencing it with the `resource_name` option.

 The first two methods above only work when the host has access to the internet. When a host does not have internet access, the module must first be installed using the methods above on another host with internet access and then copied across. To save a module to a local filepath, the following PowerShell cmdlet can be run:

 
```
Save-Module -Name xWebAdministration -Path C:\temp

```
 This will create a folder called `xWebAdministration` in `C:\temp` which can be copied to any host. For PowerShell to see this offline resource, it must be copied to a directory set in the `PSModulePath` environment variable. In most cases the path `C:\Program Files\WindowsPowerShell\Module` is set through this variable, but the `win_path` module can be used to add different paths.

 Examples
--------

 ### Extract a zip file

 
```
- name: Extract a zip file
  win_dsc:
    resource_name: Archive
    Destination: C:\temp\output
    Path: C:\temp\zip.zip
    Ensure: Present

```
 ### Create a directory

 
```
- name: Create file with some text
  win_dsc:
    resource_name: File
    DestinationPath: C:\temp\file
    Contents: |
        Hello
        World
    Ensure: Present
    Type: File

- name: Create directory that is hidden is set with the System attribute
  win_dsc:
    resource_name: File
    DestinationPath: C:\temp\hidden-directory
    Attributes: Hidden,System
    Ensure: Present
    Type: Directory

```
 ### Interact with Azure

 
```
- name: Install xAzure DSC resources
  win_psmodule:
    name: xAzure
    state: present

- name: Create virtual machine in Azure
  win_dsc:
    resource_name: xAzureVM
    ImageName: a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201409.01-en.us-127GB.vhd
    Name: DSCHOST01
    ServiceName: ServiceName
    StorageAccountName: StorageAccountName
    InstanceSize: Medium
    Windows: yes
    Ensure: Present
    Credential_username: '{{ ansible_user }}'
    Credential_password: '{{ ansible_password }}'

```
 ### Setup IIS Website

 
```
- name: Install xWebAdministration module
  win_psmodule:
    name: xWebAdministration
    state: present

- name: Install IIS features that are required
  win_dsc:
    resource_name: WindowsFeature
    Name: '{{ item }}'
    Ensure: Present
  loop:
  - Web-Server
  - Web-Asp-Net45

- name: Setup web content
  win_dsc:
    resource_name: File
    DestinationPath: C:\inetpub\IISSite\index.html
    Type: File
    Contents: |
      <html>
      <head><title>IIS Site</title></head>
      <body>This is the body</body>
      </html>
    Ensure: present

- name: Create new website
  win_dsc:
    resource_name: xWebsite
    Name: NewIISSite
    State: Started
    PhysicalPath: C:\inetpub\IISSite\index.html
    BindingInfo:
    - Protocol: https
      Port: 8443
      CertificateStoreName: My
      CertificateThumbprint: C676A89018C4D5902353545343634F35E6B3A659
      HostName: DSCTest
      IPAddress: '*'
      SSLFlags: 1
    - Protocol: http
      Port: 8080
      IPAddress: '*'
    AuthenticationInfo:
      Anonymous: no
      Basic: yes
      Digest: no
      Windows: yes

```
  See also

  [Intro to playbooks](playbooks_intro#playbooks-intro)

An introduction to playbooks

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [List of Windows Modules](https://docs.ansible.com/ansible/2.9/modules/list_of_windows_modules.html#windows-modules "(in Ansible v2.9)")

Windows specific module list, all implemented in PowerShell

  [User Mailing List](https://groups.google.com/group/ansible-project)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/windows_dsc.html>

ansible-galaxy
==============

 **Perform various Role and Collection related operations.**

 * [Synopsis](#synopsis)
* [Description](#description)
* [Common Options](#common-options)
* [Actions](#actions)


	+ [collection](#collection)
	
	
		- [collection download](#collection-download)
		- [collection init](#collection-init)
		- [collection build](#collection-build)
		- [collection publish](#collection-publish)
		- [collection install](#collection-install)
		- [collection list](#collection-list)
		- [collection verify](#collection-verify)
	+ [role](#role)
	
	
		- [role init](#role-init)
		- [role remove](#role-remove)
		- [role delete](#role-delete)
		- [role list](#role-list)
		- [role search](#role-search)
		- [role import](#role-import)
		- [role setup](#role-setup)
		- [role info](#role-info)
		- [role install](#role-install)
* [Environment](#environment)
* [Files](#files)
* [Author](#author)
* [License](#license)
* [See also](#see-also)

 Synopsis
--------

 
```
usage: ansible-galaxy [-h] [--version] [-v] TYPE ...

```
 Description
-----------

 command to manage Ansible roles in shared repositories, the default of which is Ansible Galaxy *https://galaxy.ansible.com*.

 Common Options
--------------

  
`--version`  
show program’s version number, config file location, configured module search path, module location, executable location and exit

 
  
`-h, --help`  
show this help message and exit

 
  
`-v, --verbose`  
verbose mode (-vvv for more, -vvvv to enable connection debugging)

 
 Actions
-------

 ### collection

 Perform the action on an Ansible Galaxy collection. Must be combined with a further action like init/install as listed below.

 #### collection download

  
`--clear-response-cache`  
Clear the existing server response cache.

 
  
`--no-cache`  
Do not use the server response cache.

 
  
`--pre`  
Include pre-release versions. Semantic versioning pre-releases are ignored by default

 
  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-n, --no-deps`  
Don’t download collection(s) listed as dependencies.

 
  
`-p <DOWNLOAD_PATH>, --download-path <DOWNLOAD_PATH>`  
The directory to download the collections to.

 
  
`-r <REQUIREMENTS>, --requirements-file <REQUIREMENTS>`  
A file containing a list of collections to be downloaded.

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 #### collection init

 Creates the skeleton framework of a role or collection that complies with the Galaxy metadata format. Requires a role or collection name. The collection name must be in the format `<namespace>.<collection>`.

  
`--collection-skeleton <COLLECTION_SKELETON>`  
The path to a collection skeleton that the new collection should be based upon.

 
  
`--init-path <INIT_PATH>`  
The path in which the skeleton collection will be created. The default is the current working directory.

 
  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-f, --force`  
Force overwriting an existing role or collection

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 #### collection build

 Build an Ansible Galaxy collection artifact that can be stored in a central repository like Ansible Galaxy. By default, this command builds from the current working directory. You can optionally pass in the collection input path (where the `galaxy.yml` file is).

  
`--output-path <OUTPUT_PATH>`  
The path in which the collection is built to. The default is the current working directory.

 
  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-f, --force`  
Force overwriting an existing role or collection

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 #### collection publish

 Publish a collection into Ansible Galaxy. Requires the path to the collection tarball to publish.

  
`--import-timeout <IMPORT_TIMEOUT>`  
The time to wait for the collection import process to finish.

 
  
`--no-wait`  
Don’t wait for import validation results.

 
  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 #### collection install

  
`--clear-response-cache`  
Clear the existing server response cache.

 
  
`--force-with-deps`  
Force overwriting an existing collection and its dependencies.

 
  
`--no-cache`  
Do not use the server response cache.

 
  
`--pre`  
Include pre-release versions. Semantic versioning pre-releases are ignored by default

 
  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-U, --upgrade`  
Upgrade installed collection artifacts. This will also update dependencies unless –no-deps is provided

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-f, --force`  
Force overwriting an existing role or collection

 
  
`-i, --ignore-errors`  
Ignore errors during installation and continue with the next specified collection. This will not ignore dependency conflict errors.

 
  
`-n, --no-deps`  
Don’t download collections listed as dependencies.

 
  
`-p <COLLECTIONS_PATH>, --collections-path <COLLECTIONS_PATH>`  
The path to the directory containing your collections.

 
  
`-r <REQUIREMENTS>, --requirements-file <REQUIREMENTS>`  
A file containing a list of collections to be installed.

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 #### collection list

 List installed collections or roles

  
`--format <OUTPUT_FORMAT>`  
Format to display the list of collections in.

 
  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-p, --collections-path`  
One or more directories to search for collections in addition to the default COLLECTIONS\_PATHS. Separate multiple paths with ‘:’.

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 #### collection verify

  
`--offline`  
Validate collection integrity locally without contacting server for canonical manifest hash.

 
  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-i, --ignore-errors`  
Ignore errors during verification and continue with the next specified collection.

 
  
`-p, --collections-path`  
One or more directories to search for collections in addition to the default COLLECTIONS\_PATHS. Separate multiple paths with ‘:’.

 
  
`-r <REQUIREMENTS>, --requirements-file <REQUIREMENTS>`  
A file containing a list of collections to be verified.

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 ### role

 Perform the action on an Ansible Galaxy role. Must be combined with a further action like delete/install/init as listed below.

 #### role init

 Creates the skeleton framework of a role or collection that complies with the Galaxy metadata format. Requires a role or collection name. The collection name must be in the format `<namespace>.<collection>`.

  
`--init-path <INIT_PATH>`  
The path in which the skeleton role will be created. The default is the current working directory.

 
  
`--offline`  
Don’t query the galaxy API when creating roles

 
  
`--role-skeleton <ROLE_SKELETON>`  
The path to a role skeleton that the new role should be based upon.

 
  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`--type <ROLE_TYPE>`  
Initialize using an alternate role type. Valid types include: ‘container’, ‘apb’ and ‘network’.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-f, --force`  
Force overwriting an existing role or collection

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 #### role remove

 removes the list of roles passed as arguments from the local system.

  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-p, --roles-path`  
The path to the directory containing your roles. The default is the first writable one configured via DEFAULT\_ROLES\_PATH: ~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 #### role delete

 Delete a role from Ansible Galaxy.

  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 #### role list

 List installed collections or roles

  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-p, --roles-path`  
The path to the directory containing your roles. The default is the first writable one configured via DEFAULT\_ROLES\_PATH: ~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 #### role search

 searches for roles on the Ansible Galaxy server

  
`--author <AUTHOR>`  
GitHub username

 
  
`--galaxy-tags <GALAXY_TAGS>`  
list of galaxy tags to filter by

 
  
`--platforms <PLATFORMS>`  
list of OS platforms to filter by

 
  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 #### role import

 used to import a role into Ansible Galaxy

  
`--branch <REFERENCE>`  
The name of a branch to import. Defaults to the repository’s default branch (usually master)

 
  
`--no-wait`  
Don’t wait for import results.

 
  
`--role-name <ROLE_NAME>`  
The name the role should have, if different than the repo name

 
  
`--status`  
Check the status of the most recent import request for given github\_user/github\_repo.

 
  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 #### role setup

 Setup an integration from Github or Travis for Ansible Galaxy roles

  
`--list`  
List all of your integrations.

 
  
`--remove <REMOVE_ID>`  
Remove the integration matching the provided ID value. Use –list to see ID values.

 
  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-p, --roles-path`  
The path to the directory containing your roles. The default is the first writable one configured via DEFAULT\_ROLES\_PATH: ~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 #### role info

 prints out detailed information about an installed role as well as info available from the galaxy API.

  
`--offline`  
Don’t query the galaxy API when creating roles

 
  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-p, --roles-path`  
The path to the directory containing your roles. The default is the first writable one configured via DEFAULT\_ROLES\_PATH: ~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 #### role install

  
`--force-with-deps`  
Force overwriting an existing role and its dependencies.

 
  
`--token <API_KEY>, --api-key <API_KEY>`  
The Ansible Galaxy API key which can be found at <https://galaxy.ansible.com/me/preferences>.

 
  
`-c, --ignore-certs`  
Ignore SSL certificate validation errors.

 
  
`-f, --force`  
Force overwriting an existing role or collection

 
  
`-g, --keep-scm-meta`  
Use tar instead of the scm archive option when packaging the role.

 
  
`-i, --ignore-errors`  
Ignore errors and continue with the next specified role.

 
  
`-n, --no-deps`  
Don’t download roles listed as dependencies.

 
  
`-p, --roles-path`  
The path to the directory containing your roles. The default is the first writable one configured via DEFAULT\_ROLES\_PATH: ~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles

 
  
`-r <REQUIREMENTS>, --role-file <REQUIREMENTS>`  
A file containing a list of roles to be installed.

 
  
`-s <API_SERVER>, --server <API_SERVER>`  
The Galaxy API server URL

 
 Environment
-----------

 The following environment variables may be specified.

 [`ANSIBLE_CONFIG`](../reference_appendices/config#envvar-ANSIBLE_CONFIG) – Override the default ansible config file

 Many more are available for most options in ansible.cfg

 Files
-----

 `/etc/ansible/ansible.cfg` – Config file, used if present

 `~/.ansible.cfg` – User config file, overrides the default config if present

 Author
------

 Ansible was originally written by Michael DeHaan.

 See the `AUTHORS` file for a complete list of contributors.

 License
-------

 Ansible is released under the terms of the GPLv3+ License.

 See also
--------

 *ansible(1)*, *ansible-config(1)*, *ansible-console(1)*, *ansible-doc(1)*, *ansible-galaxy(1)*, *ansible-inventory(1)*, *ansible-playbook(1)*, *ansible-pull(1)*, *ansible-vault(1)*,



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/cli/ansible-galaxy.html>

Cache Plugins
=============

 * [Enabling Fact Cache Plugins](#enabling-fact-cache-plugins)
* [Enabling Inventory Cache Plugins](#enabling-inventory-cache-plugins)
* [Using Cache Plugins](#using-cache-plugins)
* [Plugin List](#plugin-list)

 Cache plugins allow Ansible to store gathered facts or inventory source data without the performance hit of retrieving them from source.

 The default cache plugin is the [memory](../collections/ansible/builtin/memory_cache#memory-cache) plugin, which only caches the data for the current execution of Ansible. Other plugins with persistent storage are available to allow caching the data across runs. Some of these cache plugins write to files, others write to databases.

 You can use different cache plugins for inventory and facts. If you enable inventory caching without setting an inventory-specific cache plugin, Ansible uses the fact cache plugin for both facts and inventory.

 Enabling Fact Cache Plugins
---------------------------

 Fact caching is always enabled. However, only one fact cache plugin can be active at a time. You can select the cache plugin to use for fact caching in the Ansible configuration, either with an environment variable:

 
```
export ANSIBLE_CACHE_PLUGIN=jsonfile

```
 or in the `ansible.cfg` file:

 
```
[defaults]
fact_caching=redis

```
 If the cache plugin is in a collection use the fully qualified name:

 
```
[defaults]
fact_caching = namespace.collection_name.cache_plugin_name

```
 To enable a custom cache plugin, save it in a `cache_plugins` directory adjacent to your play, inside a role, or in one of the directory sources configured in [ansible.cfg](../reference_appendices/config#ansible-configuration-settings).

 You also need to configure other settings specific to each plugin. Consult the individual plugin documentation or the Ansible [configuration](../reference_appendices/config#ansible-configuration-settings) for more details.

 Enabling Inventory Cache Plugins
--------------------------------

 Inventory caching is disabled by default. To cache inventory data, you must enable inventory caching and then select the specific cache plugin you want to use. Not all inventory plugins support caching, so check the documentation for the inventory plugin(s) you want to use. You can enable inventory caching with an environment variable:

 
```
export ANSIBLE_INVENTORY_CACHE=True

```
 or in the `ansible.cfg` file:

 
```
[inventory]
cache=True

```
 or if the inventory plugin accepts a YAML configuration source, in the configuration file:

 
```
# dev.aws_ec2.yaml
plugin: aws_ec2
cache: True

```
 Only one inventory cache plugin can be active at a time. You can set it with an environment variable:

 
```
export ANSIBLE_INVENTORY_CACHE_PLUGIN=jsonfile

```
 or in the ansible.cfg file:

 
```
[inventory]
cache_plugin=jsonfile

```
 or if the inventory plugin accepts a YAML configuration source, in the configuration file:

 
```
# dev.aws_ec2.yaml
plugin: aws_ec2
cache_plugin: jsonfile

```
 To cache inventory with a custom plugin in your plugin path, follow the [developer guide on cache plugins](https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html#developing-cache-plugins).

 To cache inventory with a cache plugin in a collection, use the FQCN:

 
```
[inventory]
cache_plugin=collection_namespace.collection_name.cache_plugin

```
 If you enable caching for inventory plugins without selecting an inventory-specific cache plugin, Ansible falls back to caching inventory with the fact cache plugin you configured. Consult the individual inventory plugin documentation or the Ansible [configuration](../reference_appendices/config#ansible-configuration-settings) for more details.

 Using Cache Plugins
-------------------

 Cache plugins are used automatically once they are enabled.

 Plugin List
-----------

 You can use `ansible-doc -t cache -l` to see the list of available plugins. Use `ansible-doc -t cache <plugin name>` to see specific documentation and examples.

  See also

  [Action Plugins](action#action-plugins)

Ansible Action plugins

  [Callback Plugins](callback#callback-plugins)

Ansible callback plugins

  [Connection Plugins](connection#connection-plugins)

Ansible connection plugins

  [Inventory Plugins](inventory#inventory-plugins)

Ansible inventory plugins

  [Shell Plugins](shell#shell-plugins)

Ansible Shell plugins

  [Strategy Plugins](strategy#strategy-plugins)

Ansible Strategy plugins

  [Vars Plugins](vars#vars-plugins)

Ansible Vars plugins

  [User Mailing List](https://groups.google.com/forum/#!forum/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/plugins/cache.html>

Callback Plugins
================

 * [Example callback plugins](#example-callback-plugins)
* [Enabling callback plugins](#enabling-callback-plugins)
* [Setting a callback plugin for `ansible-playbook`](#setting-a-callback-plugin-for-ansible-playbook)
* [Setting a callback plugin for ad hoc commands](#setting-a-callback-plugin-for-ad-hoc-commands)
* [Plugin list](#plugin-list)

 Callback plugins enable adding new behaviors to Ansible when responding to events. By default, callback plugins control most of the output you see when running the command line programs, but can also be used to add additional output, integrate with other tools and marshall the events to a storage backend.

 Example callback plugins
------------------------

 The [log\_plays](https://docs.ansible.com/ansible/2.9/plugins/callback/log_plays.html#log-plays-callback "(in Ansible v2.9)") callback is an example of how to record playbook events to a log file, and the [mail](https://docs.ansible.com/ansible/2.9/plugins/callback/mail.html#mail-callback "(in Ansible v2.9)") callback sends email on playbook failures.

 The [say](https://docs.ansible.com/ansible/2.9/plugins/callback/say.html#say-callback "(in Ansible v2.9)") callback responds with computer synthesized speech in relation to playbook events.

 Enabling callback plugins
-------------------------

 You can activate a custom callback by either dropping it into a `callback_plugins` directory adjacent to your play, inside a role, or by putting it in one of the callback directory sources configured in [ansible.cfg](../reference_appendices/config#ansible-configuration-settings).

 Plugins are loaded in alphanumeric order. For example, a plugin implemented in a file named `1_first.py` would run before a plugin file named `2_second.py`.

 Most callbacks shipped with Ansible are disabled by default and need to be enabled in your [ansible.cfg](../reference_appendices/config#ansible-configuration-settings) file in order to function. For example:

 
```
#callbacks_enabled = timer, mail, profile_roles, collection_namespace.collection_name.custom_callback

```
 Setting a callback plugin for `ansible-playbook`
------------------------------------------------

 You can only have one plugin be the main manager of your console output. If you want to replace the default, you should define CALLBACK\_TYPE = stdout in the subclass and then configure the stdout plugin in [ansible.cfg](../reference_appendices/config#ansible-configuration-settings). For example:

 
```
stdout_callback = dense

```
 or for my custom callback:

 
```
stdout_callback = mycallback

```
 This only affects [ansible-playbook](../cli/ansible-playbook#ansible-playbook) by default.

 Setting a callback plugin for ad hoc commands
---------------------------------------------

 The [ansible](../cli/ansible#ansible) ad hoc command specifically uses a different callback plugin for stdout, so there is an extra setting in [Ansible Configuration Settings](../reference_appendices/config#ansible-configuration-settings) you need to add to use the stdout callback defined above:

 
```
[defaults]
bin_ansible_callbacks=True

```
 You can also set this as an environment variable:

 
```
export ANSIBLE_LOAD_CALLBACK_PLUGINS=1

```
 Plugin list
-----------

 You can use `ansible-doc -t callback -l` to see the list of available plugins. Use `ansible-doc -t callback <plugin name>` to see specific documents and examples.

  See also

  [Action Plugins](action#action-plugins)

Ansible Action plugins

  [Cache Plugins](cache#cache-plugins)

Ansible cache plugins

  [Connection Plugins](connection#connection-plugins)

Ansible connection plugins

  [Inventory Plugins](inventory#inventory-plugins)

Ansible inventory plugins

  [Shell Plugins](shell#shell-plugins)

Ansible Shell plugins

  [Strategy Plugins](strategy#strategy-plugins)

Ansible Strategy plugins

  [Vars Plugins](vars#vars-plugins)

Ansible Vars plugins

  [User Mailing List](https://groups.google.com/forum/#!forum/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/plugins/callback.html>

ansible-pull
============

 **pulls playbooks from a VCS repo and executes them for the local host**

 * [Synopsis](#synopsis)
* [Description](#description)
* [Common Options](#common-options)
* [Environment](#environment)
* [Files](#files)
* [Author](#author)
* [License](#license)
* [See also](#see-also)

 Synopsis
--------

 
```
usage: ansible-pull [-h] [--version] [-v] [-k]
                 [--private-key PRIVATE_KEY_FILE] [-u REMOTE_USER]
                 [-c CONNECTION] [-T TIMEOUT]
                 [--ssh-common-args SSH_COMMON_ARGS]
                 [--sftp-extra-args SFTP_EXTRA_ARGS]
                 [--scp-extra-args SCP_EXTRA_ARGS]
                 [--ssh-extra-args SSH_EXTRA_ARGS] [--vault-id VAULT_IDS]
                 [--ask-vault-password | --vault-password-file VAULT_PASSWORD_FILES]
                 [-e EXTRA_VARS] [-t TAGS] [--skip-tags SKIP_TAGS]
                 [-i INVENTORY] [--list-hosts] [-l SUBSET] [-M MODULE_PATH]
                 [-K] [--purge] [-o] [-s SLEEP] [-f] [-d DEST] [-U URL]
                 [--full] [-C CHECKOUT] [--accept-host-key]
                 [-m MODULE_NAME] [--verify-commit] [--clean]
                 [--track-subs] [--check] [--diff]
                 [playbook.yml [playbook.yml ...]]

```
 Description
-----------

 Used to pull a remote copy of ansible on each managed node, each set to run via cron and update playbook source via a source repository. This inverts the default *push* architecture of ansible into a *pull* architecture, which has near-limitless scaling potential.

 The setup playbook can be tuned to change the cron frequency, logging locations, and parameters to ansible-pull. This is useful both for extreme scale-out as well as periodic remediation. Usage of the ‘fetch’ module to retrieve logs from ansible-pull runs would be an excellent way to gather and analyze remote logs from ansible-pull.

 Common Options
--------------

  
`--accept-host-key`  
adds the hostkey for the repo url if not already added

 
  
`--ask-vault-password, --ask-vault-pass`  
ask for vault password

 
  
`--check`  
don’t make any changes; instead, try to predict some of the changes that may occur

 
  
`--clean`  
modified files in the working repository will be discarded

 
  
`--diff`  
when changing (small) files and templates, show the differences in those files; works great with –check

 
  
`--full`  
Do a full clone, instead of a shallow one.

 
  
`--list-hosts`  
outputs a list of matching hosts; does not execute anything else

 
  
`--private-key <PRIVATE_KEY_FILE>, --key-file <PRIVATE_KEY_FILE>`  
use this file to authenticate the connection

 
  
`--purge`  
purge checkout after playbook run

 
  
`--scp-extra-args <SCP_EXTRA_ARGS>`  
specify extra arguments to pass to scp only (e.g. -l)

 
  
`--sftp-extra-args <SFTP_EXTRA_ARGS>`  
specify extra arguments to pass to sftp only (e.g. -f, -l)

 
  
`--skip-tags`  
only run plays and tasks whose tags do not match these values

 
  
`--ssh-common-args <SSH_COMMON_ARGS>`  
specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)

 
  
`--ssh-extra-args <SSH_EXTRA_ARGS>`  
specify extra arguments to pass to ssh only (e.g. -R)

 
  
`--track-subs`  
submodules will track the latest changes. This is equivalent to specifying the –remote flag to git submodule update

 
  
`--vault-id`  
the vault identity to use

 
  
`--vault-password-file, --vault-pass-file`  
vault password file

 
  
`--verify-commit`  
verify GPG signature of checked out commit, if it fails abort running the playbook. This needs the corresponding VCS module to support such an operation

 
  
`--version`  
show program’s version number, config file location, configured module search path, module location, executable location and exit

 
  
`-C <CHECKOUT>, --checkout <CHECKOUT>`  
branch/tag/commit to checkout. Defaults to behavior of repository module.

 
  
`-K, --ask-become-pass`  
ask for privilege escalation password

 
  
`-M, --module-path`  
prepend colon-separated path(s) to module library (default=~/.ansible/plugins/modules:/usr/share/ansible/plugins/modules)

 
  
`-T <TIMEOUT>, --timeout <TIMEOUT>`  
override the connection timeout in seconds (default=10)

 
  
`-U <URL>, --url <URL>`  
URL of the playbook repository

 
  
`-c <CONNECTION>, --connection <CONNECTION>`  
connection type to use (default=smart)

 
  
`-d <DEST>, --directory <DEST>`  
absolute path of repository checkout directory (relative paths are not supported)

 
  
`-e, --extra-vars`  
set additional variables as key=value or YAML/JSON, if filename prepend with @

 
  
`-f, --force`  
run the playbook even if the repository could not be updated

 
  
`-h, --help`  
show this help message and exit

 
  
`-i, --inventory, --inventory-file`  
specify inventory host path or comma separated host list. –inventory-file is deprecated

 
  
`-k, --ask-pass`  
ask for connection password

 
  
`-l <SUBSET>, --limit <SUBSET>`  
further limit selected hosts to an additional pattern

 
  
`-m <MODULE_NAME>, --module-name <MODULE_NAME>`  
Repository module name, which ansible will use to check out the repo. Choices are (‘git’, ‘subversion’, ‘hg’, ‘bzr’). Default is git.

 
  
`-o, --only-if-changed`  
only run the playbook if the repository has been updated

 
  
`-s <SLEEP>, --sleep <SLEEP>`  
sleep for random interval (between 0 and n number of seconds) before starting. This is a useful way to disperse git requests

 
  
`-t, --tags`  
only run plays and tasks tagged with these values

 
  
`-u <REMOTE_USER>, --user <REMOTE_USER>`  
connect as this user (default=None)

 
  
`-v, --verbose`  
verbose mode (-vvv for more, -vvvv to enable connection debugging)

 
 Environment
-----------

 The following environment variables may be specified.

 [`ANSIBLE_CONFIG`](../reference_appendices/config#envvar-ANSIBLE_CONFIG) – Override the default ansible config file

 Many more are available for most options in ansible.cfg

 Files
-----

 `/etc/ansible/ansible.cfg` – Config file, used if present

 `~/.ansible.cfg` – User config file, overrides the default config if present

 Author
------

 Ansible was originally written by Michael DeHaan.

 See the `AUTHORS` file for a complete list of contributors.

 License
-------

 Ansible is released under the terms of the GPLv3+ License.

 See also
--------

 *ansible(1)*, *ansible-config(1)*, *ansible-console(1)*, *ansible-doc(1)*, *ansible-galaxy(1)*, *ansible-inventory(1)*, *ansible-playbook(1)*, *ansible-pull(1)*, *ansible-vault(1)*,



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/cli/ansible-pull.html>

ansible-vault
=============

 **encryption/decryption utility for Ansible data files**

 * [Synopsis](#synopsis)
* [Description](#description)
* [Common Options](#common-options)
* [Actions](#actions)


	+ [create](#create)
	+ [decrypt](#decrypt)
	+ [edit](#edit)
	+ [view](#view)
	+ [encrypt](#encrypt)
	+ [encrypt\_string](#encrypt-string)
	+ [rekey](#rekey)
* [Environment](#environment)
* [Files](#files)
* [Author](#author)
* [License](#license)
* [See also](#see-also)

 Synopsis
--------

 
```
usage: ansible-vault [-h] [--version] [-v]
                  {create,decrypt,edit,view,encrypt,encrypt_string,rekey}
                  ...

```
 Description
-----------

 can encrypt any structured data file used by Ansible. This can include *group\_vars/* or *host\_vars/* inventory variables, variables loaded by *include\_vars* or *vars\_files*, or variable files passed on the ansible-playbook command line with *-e @file.yml* or *-e @file.json*. Role variables and defaults are also included!

 Because Ansible tasks, handlers, and other objects are data, these can also be encrypted with vault. If you’d like to not expose what variables you are using, you can keep an individual task file entirely encrypted.

 Common Options
--------------

  
`--version`  
show program’s version number, config file location, configured module search path, module location, executable location and exit

 
  
`-h, --help`  
show this help message and exit

 
  
`-v, --verbose`  
verbose mode (-vvv for more, -vvvv to enable connection debugging)

 
 Actions
-------

 ### create

 create and open a file in an editor that will be encrypted with the provided vault secret when closed

  
`--ask-vault-password, --ask-vault-pass`  
ask for vault password

 
  
`--encrypt-vault-id <ENCRYPT_VAULT_ID>`  
the vault id used to encrypt (required if more than one vault-id is provided)

 
  
`--vault-id`  
the vault identity to use

 
  
`--vault-password-file, --vault-pass-file`  
vault password file

 
 ### decrypt

 decrypt the supplied file using the provided vault secret

  
`--ask-vault-password, --ask-vault-pass`  
ask for vault password

 
  
`--output <OUTPUT_FILE>`  
output file name for encrypt or decrypt; use - for stdout

 
  
`--vault-id`  
the vault identity to use

 
  
`--vault-password-file, --vault-pass-file`  
vault password file

 
 ### edit

 open and decrypt an existing vaulted file in an editor, that will be encrypted again when closed

  
`--ask-vault-password, --ask-vault-pass`  
ask for vault password

 
  
`--encrypt-vault-id <ENCRYPT_VAULT_ID>`  
the vault id used to encrypt (required if more than one vault-id is provided)

 
  
`--vault-id`  
the vault identity to use

 
  
`--vault-password-file, --vault-pass-file`  
vault password file

 
 ### view

 open, decrypt and view an existing vaulted file using a pager using the supplied vault secret

  
`--ask-vault-password, --ask-vault-pass`  
ask for vault password

 
  
`--vault-id`  
the vault identity to use

 
  
`--vault-password-file, --vault-pass-file`  
vault password file

 
 ### encrypt

 encrypt the supplied file using the provided vault secret

  
`--ask-vault-password, --ask-vault-pass`  
ask for vault password

 
  
`--encrypt-vault-id <ENCRYPT_VAULT_ID>`  
the vault id used to encrypt (required if more than one vault-id is provided)

 
  
`--output <OUTPUT_FILE>`  
output file name for encrypt or decrypt; use - for stdout

 
  
`--vault-id`  
the vault identity to use

 
  
`--vault-password-file, --vault-pass-file`  
vault password file

 
 ### encrypt\_string

 encrypt the supplied string using the provided vault secret

  
`--ask-vault-password, --ask-vault-pass`  
ask for vault password

 
  
`--encrypt-vault-id <ENCRYPT_VAULT_ID>`  
the vault id used to encrypt (required if more than one vault-id is provided)

 
  
`--output <OUTPUT_FILE>`  
output file name for encrypt or decrypt; use - for stdout

 
  
`--show-input`  
Do not hide input when prompted for the string to encrypt

 
  
`--stdin-name <ENCRYPT_STRING_STDIN_NAME>`  
Specify the variable name for stdin

 
  
`--vault-id`  
the vault identity to use

 
  
`--vault-password-file, --vault-pass-file`  
vault password file

 
  
`-n, --name`  
Specify the variable name

 
  
`-p, --prompt`  
Prompt for the string to encrypt

 
 ### rekey

 re-encrypt a vaulted file with a new secret, the previous secret is required

  
`--ask-vault-password, --ask-vault-pass`  
ask for vault password

 
  
`--encrypt-vault-id <ENCRYPT_VAULT_ID>`  
the vault id used to encrypt (required if more than one vault-id is provided)

 
  
`--new-vault-id <NEW_VAULT_ID>`  
the new vault identity to use for rekey

 
  
`--new-vault-password-file <NEW_VAULT_PASSWORD_FILE>`  
new vault password file for rekey

 
  
`--vault-id`  
the vault identity to use

 
  
`--vault-password-file, --vault-pass-file`  
vault password file

 
 Environment
-----------

 The following environment variables may be specified.

 [`ANSIBLE_CONFIG`](../reference_appendices/config#envvar-ANSIBLE_CONFIG) – Override the default ansible config file

 Many more are available for most options in ansible.cfg

 Files
-----

 `/etc/ansible/ansible.cfg` – Config file, used if present

 `~/.ansible.cfg` – User config file, overrides the default config if present

 Author
------

 Ansible was originally written by Michael DeHaan.

 See the `AUTHORS` file for a complete list of contributors.

 License
-------

 Ansible is released under the terms of the GPLv3+ License.

 See also
--------

 *ansible(1)*, *ansible-config(1)*, *ansible-console(1)*, *ansible-doc(1)*, *ansible-galaxy(1)*, *ansible-inventory(1)*, *ansible-playbook(1)*, *ansible-pull(1)*, *ansible-vault(1)*,



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/cli/ansible-vault.html>

Action Plugins
==============

 * [Enabling action plugins](#enabling-action-plugins)
* [Using action plugins](#using-action-plugins)
* [Plugin list](#plugin-list)

 Action plugins act in conjunction with [modules](../user_guide/modules#working-with-modules) to execute the actions required by playbook tasks. They usually execute automatically in the background doing prerequisite work before modules execute.

 The ‘normal’ action plugin is used for modules that do not already have an action plugin.

 Enabling action plugins
-----------------------

 You can enable a custom action plugin by either dropping it into the `action_plugins` directory adjacent to your play, inside a role, or by putting it in one of the action plugin directory sources configured in [ansible.cfg](../reference_appendices/config#ansible-configuration-settings).

 Using action plugins
--------------------

 Action plugin are executed by default when an associated module is used; no action is required.

 Plugin list
-----------

 You cannot list action plugins directly, they show up as their counterpart modules:

 Use `ansible-doc -l` to see the list of available modules. Use `ansible-doc <name>` to see specific documentation and examples, this should note if the module has a corresponding action plugin.

  See also

  [Cache Plugins](cache#cache-plugins)

Ansible Cache plugins

  [Callback Plugins](callback#callback-plugins)

Ansible callback plugins

  [Connection Plugins](connection#connection-plugins)

Ansible connection plugins

  [Inventory Plugins](inventory#inventory-plugins)

Ansible inventory plugins

  [Shell Plugins](shell#shell-plugins)

Ansible Shell plugins

  [Strategy Plugins](strategy#strategy-plugins)

Ansible Strategy plugins

  [Vars Plugins](vars#vars-plugins)

Ansible Vars plugins

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/plugins/action.html>

Inventory Plugins
=================

 * [Enabling inventory plugins](#enabling-inventory-plugins)
* [Using inventory plugins](#using-inventory-plugins)
* [Plugin List](#plugin-list)

 Inventory plugins allow users to point at data sources to compile the inventory of hosts that Ansible uses to target tasks, either using the `-i /path/to/file` and/or `-i 'host1, host2'` command line parameters or from other configuration sources.

 Enabling inventory plugins
--------------------------

 Most inventory plugins shipped with Ansible are enabled by default or can be used by with the `auto` plugin.

 In some circumstances, for example, if the inventory plugin does not use a YAML configuration file, you may need to enable the specific plugin. You can do this by setting `enable_plugins` in your [ansible.cfg](../reference_appendices/config#ansible-configuration-settings) file in the `[inventory]` section. Modifying this will override the default list of enabled plugins. Here is the default list of enabled plugins that ships with Ansible:

 
```
[inventory]
enable_plugins = host_list, script, auto, yaml, ini, toml

```
 If the plugin is in a collection, use the fully qualified name:

 
```
[inventory]
enable_plugins = namespace.collection_name.inventory_plugin_name

```
 Using inventory plugins
-----------------------

 To use an inventory plugin, you must provide an inventory source. Most of the time this is a file containing host information or a YAML configuration file with options for the plugin. You can use the `-i` flag to provide inventory sources or configure a default inventory path.

 
```
ansible hostname -i inventory_source -m ansible.builtin.ping

```
 To start using an inventory plugin with a YAML configuration source, create a file with the accepted filename schema documented for the plugin in question, then add `plugin: plugin_name`. Use the fully qualified name if the plugin is in a collection.

 
```
# demo.aws_ec2.yml
plugin: amazon.aws.aws_ec2

```
 Each plugin should document any naming restrictions. In addition, the YAML config file must end with the extension `yml` or `yaml` to be enabled by default with the `auto` plugin (otherwise, see the section above on enabling plugins).

 After providing any required options, you can view the populated inventory with `ansible-inventory -i demo.aws_ec2.yml --graph`:

 
```
@all:
  |--@aws_ec2:
  |  |--ec2-12-345-678-901.compute-1.amazonaws.com
  |  |--ec2-98-765-432-10.compute-1.amazonaws.com
  |--@ungrouped:

```
 If you are using an inventory plugin in a playbook-adjacent collection and want to test your setup with `ansible-inventory`, use the `--playbook-dir` flag.

 Your inventory source might be a directory of inventory configuration files. The constructed inventory plugin only operates on those hosts already in inventory, so you may want the constructed inventory configuration parsed at a particular point (such as last). Ansible parses the directory recursively, alphabetically. You cannot configure the parsing approach, so name your files to make it work predictably. Inventory plugins that extend constructed features directly can work around that restriction by adding constructed options in addition to the inventory plugin options. Otherwise, you can use `-i` with multiple sources to impose a specific order, for example `-i demo.aws_ec2.yml -i clouds.yml -i constructed.yml`.

 You can create dynamic groups using host variables with the constructed `keyed_groups` option. The option `groups` can also be used to create groups and `compose` creates and modifies host variables. Here is an aws\_ec2 example utilizing constructed features:

 
```
# demo.aws_ec2.yml
plugin: amazon.aws.aws_ec2
regions:
  - us-east-1
  - us-east-2
keyed_groups:
  # add hosts to tag_Name_value groups for each aws_ec2 host's tags.Name variable
  - key: tags.Name
    prefix: tag_Name_
    separator: ""
groups:
  # add hosts to the group development if any of the dictionary's keys or values is the word 'devel'
  development: "'devel' in (tags|list)"
compose:
  # set the ansible_host variable to connect with the private IP address without changing the hostname
  ansible_host: private_ip_address

```
 Now the output of `ansible-inventory -i demo.aws_ec2.yml --graph`:

 
```
@all:
  |--@aws_ec2:
  |  |--ec2-12-345-678-901.compute-1.amazonaws.com
  |  |--ec2-98-765-432-10.compute-1.amazonaws.com
  |  |--...
  |--@development:
  |  |--ec2-12-345-678-901.compute-1.amazonaws.com
  |  |--ec2-98-765-432-10.compute-1.amazonaws.com
  |--@tag_Name_ECS_Instance:
  |  |--ec2-98-765-432-10.compute-1.amazonaws.com
  |--@tag_Name_Test_Server:
  |  |--ec2-12-345-678-901.compute-1.amazonaws.com
  |--@ungrouped

```
 If a host does not have the variables in the configuration above (in other words, `tags.Name`, `tags`, `private_ip_address`), the host will not be added to groups other than those that the inventory plugin creates and the `ansible_host` host variable will not be modified.

 Inventory plugins that support caching can use the general settings for the fact cache defined in the `ansible.cfg` file’s `[defaults]` section or define inventory-specific settings in the `[inventory]` section. Individual plugins can define plugin-specific cache settings in their config file:

 
```
# demo.aws_ec2.yml
plugin: amazon.aws.aws_ec2
cache: yes
cache_plugin: ansible.builtin.jsonfile
cache_timeout: 7200
cache_connection: /tmp/aws_inventory
cache_prefix: aws_ec2

```
 Here is an example of setting inventory caching with some fact caching defaults for the cache plugin used and the timeout in an `ansible.cfg` file:

 
```
[defaults]
fact_caching = ansible.builtin.jsonfile
fact_caching_connection = /tmp/ansible_facts
cache_timeout = 3600

[inventory]
cache = yes
cache_connection = /tmp/ansible_inventory

```
 Plugin List
-----------

 You can use `ansible-doc -t inventory -l` to see the list of available plugins. Use `ansible-doc -t inventory <plugin name>` to see plugin-specific documentation and examples.

  See also

  [Intro to playbooks](../user_guide/playbooks_intro#about-playbooks)

An introduction to playbooks

  [Callback Plugins](callback#callback-plugins)

Ansible callback plugins

  [Connection Plugins](connection#connection-plugins)

Ansible connection plugins

  [Using filters to manipulate data](../user_guide/playbooks_filters#playbooks-filters)

Jinja2 filter plugins

  [Tests](../user_guide/playbooks_tests#playbooks-tests)

Jinja2 test plugins

  [Lookups](../user_guide/playbooks_lookups#playbooks-lookups)

Jinja2 lookup plugins

  [Vars Plugins](vars#vars-plugins)

Ansible vars plugins

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/plugins/inventory.html>

Shell Plugins
=============

 * [Enabling shell plugins](#enabling-shell-plugins)
* [Using shell plugins](#using-shell-plugins)

 Shell plugins work to ensure that the basic commands Ansible runs are properly formatted to work with the target machine and allow the user to configure certain behaviors related to how Ansible executes tasks.

 Enabling shell plugins
----------------------

 You can add a custom shell plugin by dropping it into a `shell_plugins` directory adjacent to your play, inside a role, or by putting it in one of the shell plugin directory sources configured in [ansible.cfg](../reference_appendices/config#ansible-configuration-settings).

  Warning

 You should not alter which plugin is used unless you have a setup in which the default `/bin/sh` is not a POSIX compatible shell or is not available for execution.

  Using shell plugins
-------------------

 In addition to the default configuration settings in [Ansible Configuration Settings](../reference_appendices/config#ansible-configuration-settings), you can use the connection variable [ansible\_shell\_type](../user_guide/intro_inventory#ansible-shell-type) to select the plugin to use. In this case, you will also want to update the [ansible\_shell\_executable](../user_guide/intro_inventory#ansible-shell-executable) to match.

 You can further control the settings for each plugin via other configuration options detailed in the plugin themselves (linked below).

  See also

  [Intro to playbooks](../user_guide/playbooks_intro#about-playbooks)

An introduction to playbooks

  [Inventory Plugins](inventory#inventory-plugins)

Ansible inventory plugins

  [Callback Plugins](callback#callback-plugins)

Ansible callback plugins

  [Using filters to manipulate data](../user_guide/playbooks_filters#playbooks-filters)

Jinja2 filter plugins

  [Tests](../user_guide/playbooks_tests#playbooks-tests)

Jinja2 test plugins

  [Lookups](../user_guide/playbooks_lookups#playbooks-lookups)

Jinja2 lookup plugins

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/plugins/shell.html>

cisco.ios.ios\_facts – Collect facts from remote devices running Cisco IOS
==========================================================================

  Note

 This plugin is part of the [cisco.ios collection](https://galaxy.ansible.com/cisco/ios) (version 2.5.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install cisco.ios`.

 To use it in a playbook, specify: `cisco.ios.ios_facts`.

   New in version 1.0.0: of cisco.ios

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Collects a base set of device facts from a remote device that is running IOS. This module prepends all of the base network fact keys with `ansible_net_<fact>`. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **available\_network\_resources**  boolean  | **Choices:*** **no** ←
* yes
 | When 'True' a list of network resources for which resource modules are available will be provided. |
| **gather\_network\_resources**  list / elements=string  |  | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all and the resources like interfaces, vlans etc. Can specify a list of values to include a larger subset. Values can also be used with an initial `M(!`) to specify that a specific subset should not be collected. Valid subsets are 'all', 'interfaces', 'l2\_interfaces', 'vlans', 'lag\_interfaces', 'lacp', 'lacp\_interfaces', 'lldp\_global', 'lldp\_interfaces', 'l3\_interfaces', 'acl\_interfaces', 'static\_routes', 'acls'. |
| **gather\_subset**  list / elements=string  | **Default:**"!config" | When supplied, this argument restricts the facts collected to a given subset. Possible values for this argument include `all`, `min`, `hardware`, `config`, and `interfaces`. Specify a list of values to include a larger subset. Use a value with an initial `!` to collect all facts except that subset. |
| **provider**  dictionary  |  | **Deprecated** Starting with Ansible 2.5 we recommend using `connection: network_cli`. For more information please see the [https://docs.ansible.com/ansible/latest/network/user\_guide/platform\_ios.html](../../../network/user_guide/platform_ios). A dict object containing connection details. |
|  | **auth\_pass**  string  |  | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
|  | **authorize**  boolean  | **Choices:*** **no** ←
* yes
 | Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
|  | **host**  string  |  | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
|  | **password**  string  |  | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
|  | **port**  integer  |  | Specifies the port to use when building the connection to the remote device. |
|  | **ssh\_keyfile**  path  |  | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
|  | **timeout**  integer  |  | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
|  | **username**  string  |  | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |

   
 Notes
-----

  Note

 * Tested against IOS 15.6
* Facts gathering for L3 devices are supposed to produce blank output for unsupported resources like vlan.
* For more information on using Ansible to manage network devices see the [Ansible Network Guide](../../../network/index#network-guide)
* For more information on using Ansible to manage Cisco devices see the [Cisco integration page](https://www.ansible.com/integrations/networks/cisco).

  Examples
--------

 
```
- name: Gather all legacy facts
  cisco.ios.ios_facts:
    gather_subset: all

- name: Gather only the config and default facts
  cisco.ios.ios_facts:
    gather_subset:
    - config

- name: Do not gather hardware facts
  cisco.ios.ios_facts:
    gather_subset:
    - '!hardware'

- name: Gather legacy and resource facts
  cisco.ios.ios_facts:
    gather_subset: all
    gather_network_resources: all

- name: Gather only the interfaces resource facts and no legacy facts
  cisco.ios.ios_facts:
    gather_subset:
    - '!all'
    - '!min'
    gather_network_resources:
    - interfaces

- name: Gather interfaces resource and minimal legacy facts
  cisco.ios.ios_facts:
    gather_subset: min
    gather_network_resources: interfaces

- name: Gather L2 interfaces resource and minimal legacy facts
  cisco.ios.ios_facts:
    gather_subset: min
    gather_network_resources: l2_interfaces

- name: Gather L3 interfaces resource and minimal legacy facts
  cisco.ios.ios_facts:
    gather_subset: min
    gather_network_resources: l3_interfaces

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_net\_all\_ipv4\_addresses**  list / elements=string  | when interfaces is configured | All IPv4 addresses configured on the device  |
| **ansible\_net\_all\_ipv6\_addresses**  list / elements=string  | when interfaces is configured | All IPv6 addresses configured on the device  |
| **ansible\_net\_api**  string  | always | The name of the transport  |
| **ansible\_net\_config**  string  | when config is configured | The current active config from the device  |
| **ansible\_net\_filesystems**  list / elements=string  | when hardware is configured | All file system names available on the device  |
| **ansible\_net\_filesystems\_info**  dictionary  | when hardware is configured | A hash of all file systems containing info about each file system (e.g. free and total space)  |
| **ansible\_net\_gather\_network\_resources**  list / elements=string  | when the resource is configured | The list of fact for network resource subsets collected from the device  |
| **ansible\_net\_gather\_subset**  list / elements=string  | always | The list of fact subsets collected from the device  |
| **ansible\_net\_hostname**  string  | always | The configured hostname of the device  |
| **ansible\_net\_image**  string  | always | The image file the device is running  |
| **ansible\_net\_interfaces**  dictionary  | when interfaces is configured | A hash of all interfaces running on the system  |
| **ansible\_net\_iostype**  string  | always | The operating system type (IOS or IOS-XE) running on the remote device  |
| **ansible\_net\_memfree\_mb**  integer  | when hardware is configured | The available free memory on the remote device in Mb  |
| **ansible\_net\_memtotal\_mb**  integer  | when hardware is configured | The total memory on the remote device in Mb  |
| **ansible\_net\_model**  string  | always | The model name returned from the device  |
| **ansible\_net\_neighbors**  dictionary  | when interfaces is configured | The list of CDP and LLDP neighbors from the remote device. If both, CDP and LLDP neighbor data is present on one port, CDP is preferred.  |
| **ansible\_net\_python\_version**  string  | always | The Python version Ansible controller is using  |
| **ansible\_net\_serialnum**  string  | always | The serial number of the remote device  |
| **ansible\_net\_stacked\_models**  list / elements=string  | when multiple devices are configured in a stack | The model names of each device in the stack  |
| **ansible\_net\_stacked\_serialnums**  list / elements=string  | when multiple devices are configured in a stack | The serial numbers of each device in the stack  |
| **ansible\_net\_version**  string  | always | The operating system version running on the remote device  |

   
  
 ### Authors

 * Peter Sprygada (@privateip)
* Sumit Jaiswal (@justjais)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/ios/ios_facts_module.html>

Lookup Plugins
==============

 * [Enabling lookup plugins](#enabling-lookup-plugins)
* [Using lookup plugins](#using-lookup-plugins)
* [Forcing lookups to return lists: `query` and `wantlist=True`](#forcing-lookups-to-return-lists-query-and-wantlist-true)
* [Plugin list](#plugin-list)

 Lookup plugins are an Ansible-specific extension to the Jinja2 templating language. You can use lookup plugins to access data from outside sources (files, databases, key/value stores, APIs, and other services) within your playbooks. Like all [templating](../user_guide/playbooks_templating#playbooks-templating), lookups execute and are evaluated on the Ansible control machine. Ansible makes the data returned by a lookup plugin available using the standard templating system. You can use lookup plugins to load variables or templates with information from external sources.

  Note

 * Lookups are executed with a working directory relative to the role or play, as opposed to local tasks, which are executed relative the executed script.
* Pass `wantlist=True` to lookups to use in Jinja2 template “for” loops.
* By default, lookup return values are marked as unsafe for security reasons. If you trust the outside source your lookup accesses, pass `allow_unsafe=True` to allow Jinja2 templates to evaluate lookup values.

   Warning

 * Some lookups pass arguments to a shell. When using variables from a remote/untrusted source, use the `|quote` filter to ensure safe usage.

  Enabling lookup plugins
-----------------------

 Ansible enables all lookup plugins it can find. You can activate a custom lookup by either dropping it into a `lookup_plugins` directory adjacent to your play, inside the `plugins/lookup/` directory of a collection you have installed, inside a standalone role, or in one of the lookup directory sources configured in [ansible.cfg](../reference_appendices/config#ansible-configuration-settings).

 Using lookup plugins
--------------------

 You can use lookup plugins anywhere you can use templating in Ansible: in a play, in variables file, or in a Jinja2 template for the [template](../collections/ansible/builtin/template_module#template-module) module.

 
```
vars:
  file_contents: "{{ lookup('file', 'path/to/file.txt') }}"

```
 Lookups are an integral part of loops. Wherever you see `with_`, the part after the underscore is the name of a lookup. For this reason, most lookups output lists and take lists as input; for example, `with_items` uses the [items](../collections/ansible/builtin/items_lookup#items-lookup) lookup:

 
```
tasks:
  - name: count to 3
    debug: msg={{ item }}
    with_items: [1, 2, 3]

```
 You can combine lookups with [filters](../user_guide/playbooks_filters#playbooks-filters), [tests](../user_guide/playbooks_tests#playbooks-tests) and even each other to do some complex data generation and manipulation. For example:

 
```
tasks:
  - name: valid but useless and over complicated chained lookups and filters
    debug: msg="find the answer here:\n{{ lookup('url', 'https://google.com/search/?q=' + item|urlencode)|join(' ') }}"
    with_nested:
      - "{{ lookup('consul_kv', 'bcs/' + lookup('file', '/the/question') + ', host=localhost, port=2000')|shuffle }}"
      - "{{ lookup('sequence', 'end=42 start=2 step=2')|map('log', 4)|list) }}"
      - ['a', 'c', 'd', 'c']

```
  New in version 2.6.

  You can control how errors behave in all lookup plugins by setting `errors` to `ignore`, `warn`, or `strict`. The default setting is `strict`, which causes the task to fail if the lookup returns an error. For example:

 To ignore lookup errors:

 
```
- name: if this file does not exist, I do not care .. file plugin itself warns anyway ...
  debug: msg="{{ lookup('file', '/nosuchfile', errors='ignore') }}"

```
 
```
[WARNING]: Unable to find '/nosuchfile' in expected paths (use -vvvvv to see paths)

ok: [localhost] => {
    "msg": ""
}

```
 To get a warning instead of a failure:

 
```
- name: if this file does not exist, let me know, but continue
  debug: msg="{{ lookup('file', '/nosuchfile', errors='warn') }}"

```
 
```
[WARNING]: Unable to find '/nosuchfile' in expected paths (use -vvvvv to see paths)

[WARNING]: An unhandled exception occurred while running the lookup plugin 'file'. Error was a <class 'ansible.errors.AnsibleError'>, original message: could not locate file in lookup: /nosuchfile

ok: [localhost] => {
    "msg": ""
}

```
 To get a fatal error (the default):

 
```
- name: if this file does not exist, FAIL (this is the default)
  debug: msg="{{ lookup('file', '/nosuchfile', errors='strict') }}"

```
 
```
[WARNING]: Unable to find '/nosuchfile' in expected paths (use -vvvvv to see paths)

fatal: [localhost]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'file'. Error was a <class 'ansible.errors.AnsibleError'>, original message: could not locate file in lookup: /nosuchfile"}

```
 Forcing lookups to return lists: `query` and `wantlist=True`
------------------------------------------------------------

  New in version 2.5.

  In Ansible 2.5, a new Jinja2 function called `query` was added for invoking lookup plugins. The difference between `lookup` and `query` is largely that `query` will always return a list. The default behavior of `lookup` is to return a string of comma separated values. `lookup` can be explicitly configured to return a list using `wantlist=True`.

 This feature provides an easier and more consistent interface for interacting with the new `loop` keyword, while maintaining backwards compatibility with other uses of `lookup`.

 The following examples are equivalent:

 
```
lookup('dict', dict_variable, wantlist=True)

query('dict', dict_variable)

```
 As demonstrated above, the behavior of `wantlist=True` is implicit when using `query`.

 Additionally, `q` was introduced as a shortform of `query`:

 
```
q('dict', dict_variable)

```
 Plugin list
-----------

 You can use `ansible-doc -t lookup -l` to see the list of available plugins. Use `ansible-doc -t lookup <plugin name>` to see specific documents and examples.

  See also

  [Intro to playbooks](../user_guide/playbooks_intro#about-playbooks)

An introduction to playbooks

  [Inventory Plugins](inventory#inventory-plugins)

Ansible inventory plugins

  [Callback Plugins](callback#callback-plugins)

Ansible callback plugins

  [Using filters to manipulate data](../user_guide/playbooks_filters#playbooks-filters)

Jinja2 filter plugins

  [Tests](../user_guide/playbooks_tests#playbooks-tests)

Jinja2 test plugins

  [Lookups](../user_guide/playbooks_lookups#playbooks-lookups)

Jinja2 lookup plugins

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/plugins/lookup.html>

Setting up a Windows Host
=========================

 This document discusses the setup that is required before Ansible can communicate with a Microsoft Windows host.

 * [Host Requirements](#host-requirements)


	+ [Upgrading PowerShell and .NET Framework](#upgrading-powershell-and-net-framework)
	+ [WinRM Memory Hotfix](#winrm-memory-hotfix)
* [WinRM Setup](#winrm-setup)


	+ [WinRM Listener](#winrm-listener)
	
	
		- [Setup WinRM Listener](#setup-winrm-listener)
		- [Delete WinRM Listener](#delete-winrm-listener)
	+ [WinRM Service Options](#winrm-service-options)
	+ [Common WinRM Issues](#common-winrm-issues)
	
	
		- [HTTP 401/Credentials Rejected](#http-401-credentials-rejected)
		- [HTTP 500 Error](#http-500-error)
		- [Timeout Errors](#timeout-errors)
		- [Connection Refused Errors](#connection-refused-errors)
		- [Failure to Load Builtin Modules](#failure-to-load-builtin-modules)
* [Windows SSH Setup](#windows-ssh-setup)


	+ [Installing Win32-OpenSSH](#installing-win32-openssh)
	+ [Configuring the Win32-OpenSSH shell](#configuring-the-win32-openssh-shell)
	+ [Win32-OpenSSH Authentication](#win32-openssh-authentication)
	+ [Configuring Ansible for SSH on Windows](#configuring-ansible-for-ssh-on-windows)
	+ [Known issues with SSH on Windows](#known-issues-with-ssh-on-windows)

 Host Requirements
-----------------

 For Ansible to communicate to a Windows host and use Windows modules, the Windows host must meet these requirements:

 * Ansible can generally manage Windows versions under current and extended support from Microsoft. Ansible can manage desktop OSs including Windows 7, 8.1, and 10, and server OSs including Windows Server 2008, 2008 R2, 2012, 2012 R2, 2016, and 2019.
* Ansible requires PowerShell 3.0 or newer and at least .NET 4.0 to be installed on the Windows host.
* A WinRM listener should be created and activated. More details for this can be found below.

  Note

 While these are the base requirements for Ansible connectivity, some Ansible modules have additional requirements, such as a newer OS or PowerShell version. Please consult the module’s documentation page to determine whether a host meets those requirements.

  ### Upgrading PowerShell and .NET Framework

 Ansible requires PowerShell version 3.0 and .NET Framework 4.0 or newer to function on older operating systems like Server 2008 and Windows 7. The base image does not meet this requirement. You can use the [Upgrade-PowerShell.ps1](https://github.com/jborean93/ansible-windows/blob/master/scripts/Upgrade-PowerShell.ps1) script to update these.

 This is an example of how to run this script from PowerShell:

 
```
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$url = "https://raw.githubusercontent.com/jborean93/ansible-windows/master/scripts/Upgrade-PowerShell.ps1"
$file = "$env:temp\Upgrade-PowerShell.ps1"
$username = "Administrator"
$password = "Password"

(New-Object -TypeName System.Net.WebClient).DownloadFile($url, $file)
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force

# Version can be 3.0, 4.0 or 5.1
&$file -Version 5.1 -Username $username -Password $password -Verbose

```
 Once completed, you will need to remove auto logon and set the execution policy back to the default (`Restricted `` for Windows clients, or ``RemoteSigned` for Windows servers). You can do this with the following PowerShell commands:

 
```
# This isn't needed but is a good security practice to complete
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force

$reg_winlogon_path = "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon"
Set-ItemProperty -Path $reg_winlogon_path -Name AutoAdminLogon -Value 0
Remove-ItemProperty -Path $reg_winlogon_path -Name DefaultUserName -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $reg_winlogon_path -Name DefaultPassword -ErrorAction SilentlyContinue

```
 The script works by checking to see what programs need to be installed (such as .NET Framework 4.5.2) and what PowerShell version is required. If a reboot is required and the `username` and `password` parameters are set, the script will automatically reboot and logon when it comes back up from the reboot. The script will continue until no more actions are required and the PowerShell version matches the target version. If the `username` and `password` parameters are not set, the script will prompt the user to manually reboot and logon when required. When the user is next logged in, the script will continue where it left off and the process continues until no more actions are required.

  Note

 If running on Server 2008, then SP2 must be installed. If running on Server 2008 R2 or Windows 7, then SP1 must be installed.

   Note

 Windows Server 2008 can only install PowerShell 3.0; specifying a newer version will result in the script failing.

   Note

 The `username` and `password` parameters are stored in plain text in the registry. Make sure the cleanup commands are run after the script finishes to ensure no credentials are still stored on the host.

  ### WinRM Memory Hotfix

 When running on PowerShell v3.0, there is a bug with the WinRM service that limits the amount of memory available to WinRM. Without this hotfix installed, Ansible will fail to execute certain commands on the Windows host. These hotfixes should be installed as part of the system bootstrapping or imaging process. The script [Install-WMF3Hotfix.ps1](https://github.com/jborean93/ansible-windows/blob/master/scripts/Install-WMF3Hotfix.ps1) can be used to install the hotfix on affected hosts.

 The following PowerShell command will install the hotfix:

 
```
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$url = "https://raw.githubusercontent.com/jborean93/ansible-windows/master/scripts/Install-WMF3Hotfix.ps1"
$file = "$env:temp\Install-WMF3Hotfix.ps1"

(New-Object -TypeName System.Net.WebClient).DownloadFile($url, $file)
powershell.exe -ExecutionPolicy ByPass -File $file -Verbose

```
 For more details, please refer to the [Hotfix document](https://support.microsoft.com/en-us/help/2842230/out-of-memory-error-on-a-computer-that-has-a-customized-maxmemorypersh) from Microsoft.

 WinRM Setup
-----------

 Once Powershell has been upgraded to at least version 3.0, the final step is for the WinRM service to be configured so that Ansible can connect to it. There are two main components of the WinRM service that governs how Ansible can interface with the Windows host: the `listener` and the `service` configuration settings.

 Details about each component can be read below, but the script [ConfigureRemotingForAnsible.ps1](https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1) can be used to set up the basics. This script sets up both HTTP and HTTPS listeners with a self-signed certificate and enables the `Basic` authentication option on the service.

 To use this script, run the following in PowerShell:

 
```
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$url = "https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1"
$file = "$env:temp\ConfigureRemotingForAnsible.ps1"

(New-Object -TypeName System.Net.WebClient).DownloadFile($url, $file)

powershell.exe -ExecutionPolicy ByPass -File $file

```
 There are different switches and parameters (like `-EnableCredSSP` and `-ForceNewSSLCert`) that can be set alongside this script. The documentation for these options are located at the top of the script itself.

  Note

 The ConfigureRemotingForAnsible.ps1 script is intended for training and development purposes only and should not be used in a production environment, since it enables settings (like `Basic` authentication) that can be inherently insecure.

  ### WinRM Listener

 The WinRM services listens for requests on one or more ports. Each of these ports must have a listener created and configured.

 To view the current listeners that are running on the WinRM service, run the following command:

 
```
winrm enumerate winrm/config/Listener

```
 This will output something like:

 
```
Listener
    Address = *
    Transport = HTTP
    Port = 5985
    Hostname
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint
    ListeningOn = 10.0.2.15, 127.0.0.1, 192.168.56.155, ::1, fe80::5efe:10.0.2.15%6, fe80::5efe:192.168.56.155%8, fe80::
ffff:ffff:fffe%2, fe80::203d:7d97:c2ed:ec78%3, fe80::e8ea:d765:2c69:7756%7

Listener
    Address = *
    Transport = HTTPS
    Port = 5986
    Hostname = SERVER2016
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint = E6CDAA82EEAF2ECE8546E05DB7F3E01AA47D76CE
    ListeningOn = 10.0.2.15, 127.0.0.1, 192.168.56.155, ::1, fe80::5efe:10.0.2.15%6, fe80::5efe:192.168.56.155%8, fe80::
ffff:ffff:fffe%2, fe80::203d:7d97:c2ed:ec78%3, fe80::e8ea:d765:2c69:7756%7

```
 In the example above there are two listeners activated; one is listening on port 5985 over HTTP and the other is listening on port 5986 over HTTPS. Some of the key options that are useful to understand are:

 * `Transport`: Whether the listener is run over HTTP or HTTPS, it is recommended to use a listener over HTTPS as the data is encrypted without any further changes required.
* `Port`: The port the listener runs on, by default it is `5985` for HTTP and `5986` for HTTPS. This port can be changed to whatever is required and corresponds to the host var `ansible_port`.
* `URLPrefix`: The URL prefix to listen on, by default it is `wsman`. If this is changed, the host var `ansible_winrm_path` must be set to the same value.
* `CertificateThumbprint`: If running over an HTTPS listener, this is the thumbprint of the certificate in the Windows Certificate Store that is used in the connection. To get the details of the certificate itself, run this command with the relevant certificate thumbprint in PowerShell:

 
```
$thumbprint = "E6CDAA82EEAF2ECE8546E05DB7F3E01AA47D76CE"
Get-ChildItem -Path cert:\LocalMachine\My -Recurse | Where-Object { $_.Thumbprint -eq $thumbprint } | Select-Object *

```

 #### Setup WinRM Listener

 There are three ways to set up a WinRM listener:

 * Using `winrm quickconfig` for HTTP or `winrm quickconfig -transport:https` for HTTPS. This is the easiest option to use when running outside of a domain environment and a simple listener is required. Unlike the other options, this process also has the added benefit of opening up the Firewall for the ports required and starts the WinRM service.
* Using Group Policy Objects. This is the best way to create a listener when the host is a member of a domain because the configuration is done automatically without any user input. For more information on group policy objects, see the [Group Policy Objects documentation](https://msdn.microsoft.com/en-us/library/aa374162(v=vs.85).aspx).
* Using PowerShell to create the listener with a specific configuration. This can be done by running the following PowerShell commands:

 
```
$selector_set = @{
    Address = "*"
    Transport = "HTTPS"
}
$value_set = @{
    CertificateThumbprint = "E6CDAA82EEAF2ECE8546E05DB7F3E01AA47D76CE"
}

New-WSManInstance -ResourceURI "winrm/config/Listener" -SelectorSet $selector_set -ValueSet $value_set

```
 To see the other options with this PowerShell cmdlet, see [New-WSManInstance](https://docs.microsoft.com/en-us/powershell/module/microsoft.wsman.management/new-wsmaninstance?view=powershell-5.1).

  Note

 When creating an HTTPS listener, an existing certificate needs to be created and stored in the `LocalMachine\My` certificate store. Without a certificate being present in this store, most commands will fail.

  #### Delete WinRM Listener

 To remove a WinRM listener:

 
```
# Remove all listeners
Remove-Item -Path WSMan:\localhost\Listener\* -Recurse -Force

# Only remove listeners that are run over HTTPS
Get-ChildItem -Path WSMan:\localhost\Listener | Where-Object { $_.Keys -contains "Transport=HTTPS" } | Remove-Item -Recurse -Force

```
  Note

 The `Keys` object is an array of strings, so it can contain different values. By default it contains a key for `Transport=` and `Address=` which correspond to the values from winrm enumerate winrm/config/Listeners.

  ### WinRM Service Options

 There are a number of options that can be set to control the behavior of the WinRM service component, including authentication options and memory settings.

 To get an output of the current service configuration options, run the following command:

 
```
winrm get winrm/config/Service
winrm get winrm/config/Winrs

```
 This will output something like:

 
```
Service
    RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
    MaxConcurrentOperations = 4294967295
    MaxConcurrentOperationsPerUser = 1500
    EnumerationTimeoutms = 240000
    MaxConnections = 300
    MaxPacketRetrievalTimeSeconds = 120
    AllowUnencrypted = false
    Auth
        Basic = true
        Kerberos = true
        Negotiate = true
        Certificate = true
        CredSSP = true
        CbtHardeningLevel = Relaxed
    DefaultPorts
        HTTP = 5985
        HTTPS = 5986
    IPv4Filter = *
    IPv6Filter = *
    EnableCompatibilityHttpListener = false
    EnableCompatibilityHttpsListener = false
    CertificateThumbprint
    AllowRemoteAccess = true

Winrs
    AllowRemoteShellAccess = true
    IdleTimeout = 7200000
    MaxConcurrentUsers = 2147483647
    MaxShellRunTime = 2147483647
    MaxProcessesPerShell = 2147483647
    MaxMemoryPerShellMB = 2147483647
    MaxShellsPerUser = 2147483647

```
 While many of these options should rarely be changed, a few can easily impact the operations over WinRM and are useful to understand. Some of the important options are:

 * `Service\AllowUnencrypted`: This option defines whether WinRM will allow traffic that is run over HTTP without message encryption. Message level encryption is only possible when `ansible_winrm_transport` is `ntlm`, `kerberos` or `credssp`. By default this is `false` and should only be set to `true` when debugging WinRM messages.
* `Service\Auth\*`: These flags define what authentication options are allowed with the WinRM service. By default, `Negotiate (NTLM)` and `Kerberos` are enabled.
* `Service\Auth\CbtHardeningLevel`: Specifies whether channel binding tokens are not verified (None), verified but not required (Relaxed), or verified and required (Strict). CBT is only used when connecting with NTLM or Kerberos over HTTPS.
* `Service\CertificateThumbprint`: This is the thumbprint of the certificate used to encrypt the TLS channel used with CredSSP authentication. By default this is empty; a self-signed certificate is generated when the WinRM service starts and is used in the TLS process.
* `Winrs\MaxShellRunTime`: This is the maximum time, in milliseconds, that a remote command is allowed to execute.
* `Winrs\MaxMemoryPerShellMB`: This is the maximum amount of memory allocated per shell, including the shell’s child processes.

 To modify a setting under the `Service` key in PowerShell:

 
```
# substitute {path} with the path to the option after winrm/config/Service
Set-Item -Path WSMan:\localhost\Service\{path} -Value "value here"

# for example, to change Service\Auth\CbtHardeningLevel run
Set-Item -Path WSMan:\localhost\Service\Auth\CbtHardeningLevel -Value Strict

```
 To modify a setting under the `Winrs` key in PowerShell:

 
```
# Substitute {path} with the path to the option after winrm/config/Winrs
Set-Item -Path WSMan:\localhost\Shell\{path} -Value "value here"

# For example, to change Winrs\MaxShellRunTime run
Set-Item -Path WSMan:\localhost\Shell\MaxShellRunTime -Value 2147483647

```
  Note

 If running in a domain environment, some of these options are set by GPO and cannot be changed on the host itself. When a key has been configured with GPO, it contains the text `[Source="GPO"]` next to the value.

  ### Common WinRM Issues

 Because WinRM has a wide range of configuration options, it can be difficult to setup and configure. Because of this complexity, issues that are shown by Ansible could in fact be issues with the host setup instead.

 One easy way to determine whether a problem is a host issue is to run the following command from another Windows host to connect to the target Windows host:

 
```
# Test out HTTP
winrs -r:http://server:5985/wsman -u:Username -p:Password ipconfig

# Test out HTTPS (will fail if the cert is not verifiable)
winrs -r:https://server:5986/wsman -u:Username -p:Password -ssl ipconfig

# Test out HTTPS, ignoring certificate verification
$username = "Username"
$password = ConvertTo-SecureString -String "Password" -AsPlainText -Force
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, $password

$session_option = New-PSSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck
Invoke-Command -ComputerName server -UseSSL -ScriptBlock { ipconfig } -Credential $cred -SessionOption $session_option

```
 If this fails, the issue is probably related to the WinRM setup. If it works, the issue may not be related to the WinRM setup; please continue reading for more troubleshooting suggestions.

 #### HTTP 401/Credentials Rejected

 A HTTP 401 error indicates the authentication process failed during the initial connection. Some things to check for this are:

 * Verify that the credentials are correct and set properly in your inventory with `ansible_user` and `ansible_password`
* Ensure that the user is a member of the local Administrators group or has been explicitly granted access (a connection test with the `winrs` command can be used to rule this out).
* Make sure that the authentication option set by `ansible_winrm_transport` is enabled under `Service\Auth\*`
* If running over HTTP and not HTTPS, use `ntlm`, `kerberos` or `credssp` with `ansible_winrm_message_encryption: auto` to enable message encryption. If using another authentication option or if the installed pywinrm version cannot be upgraded, the `Service\AllowUnencrypted` can be set to `true` but this is only recommended for troubleshooting
* Ensure the downstream packages `pywinrm`, `requests-ntlm`, `requests-kerberos`, and/or `requests-credssp` are up to date using `pip`.
* If using Kerberos authentication, ensure that `Service\Auth\CbtHardeningLevel` is not set to `Strict`.
* When using Basic or Certificate authentication, make sure that the user is a local account and not a domain account. Domain accounts do not work with Basic and Certificate authentication.

 #### HTTP 500 Error

 These indicate an error has occurred with the WinRM service. Some things to check for include:

 * Verify that the number of current open shells has not exceeded either `WinRsMaxShellsPerUser` or any of the other Winrs quotas haven’t been exceeded.

 #### Timeout Errors

 These usually indicate an error with the network connection where Ansible is unable to reach the host. Some things to check for include:

 * Make sure the firewall is not set to block the configured WinRM listener ports
* Ensure that a WinRM listener is enabled on the port and path set by the host vars
* Ensure that the `winrm` service is running on the Windows host and configured for automatic start

 #### Connection Refused Errors

 These usually indicate an error when trying to communicate with the WinRM service on the host. Some things to check for:

 * Ensure that the WinRM service is up and running on the host. Use `(Get-Service -Name winrm).Status` to get the status of the service.
* Check that the host firewall is allowing traffic over the WinRM port. By default this is `5985` for HTTP and `5986` for HTTPS.

 Sometimes an installer may restart the WinRM or HTTP service and cause this error. The best way to deal with this is to use `win_psexec` from another Windows host.

 #### Failure to Load Builtin Modules

 If powershell fails with an error message similar to `The 'Out-String' command was found in the module 'Microsoft.PowerShell.Utility', but the module could not be loaded.` then there could be a problem trying to access all the paths specified by the `PSModulePath` environment variable. A common cause of this issue is that the `PSModulePath` environment variable contains a UNC path to a file share and because of the double hop/credential delegation issue the Ansible process cannot access these folders. The way around this problems is to either:

 * Remove the UNC path from the `PSModulePath` environment variable, or
* Use an authentication option that supports credential delegation like `credssp` or `kerberos` with credential delegation enabled

 See [KB4076842](https://support.microsoft.com/en-us/help/4076842) for more information on this problem.

 Windows SSH Setup
-----------------

 Ansible 2.8 has added an experimental SSH connection for Windows managed nodes.

  Warning

 Use this feature at your own risk! Using SSH with Windows is experimental, the implementation may make backwards incompatible changes in feature releases. The server side components can be unreliable depending on the version that is installed.

  ### Installing Win32-OpenSSH

 The first step to using SSH with Windows is to install the [Win32-OpenSSH](https://github.com/PowerShell/Win32-OpenSSH) service on the Windows host. Microsoft offers a way to install `Win32-OpenSSH` through a Windows capability but currently the version that is installed through this process is too old to work with Ansible. To install `Win32-OpenSSH` for use with Ansible, select one of these three installation options:

 * Manually install the service, following the [install instructions](https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH) from Microsoft.
* Install the [openssh](https://chocolatey.org/packages/openssh) package using Chocolatey:

 
```
choco install --package-parameters=/SSHServerFeature openssh

```
* Use `win_chocolatey` to install the service:

 
```
- name: install the Win32-OpenSSH service
  win_chocolatey:
    name: openssh
    package_params: /SSHServerFeature
    state: present

```
* Use an existing Ansible Galaxy role like [jborean93.win\_openssh](https://galaxy.ansible.com/jborean93/win_openssh):

 
```
# Make sure the role has been downloaded first
ansible-galaxy install jborean93.win_openssh

# main.yml
- name: install Win32-OpenSSH service
  hosts: windows
  gather_facts: no
  roles:
  - role: jborean93.win_openssh
    opt_openssh_setup_service: True

```

  Note

 `Win32-OpenSSH` is still a beta product and is constantly being updated to include new features and bugfixes. If you are using SSH as a connection option for Windows, it is highly recommend you install the latest release from one of the 3 methods above.

  ### Configuring the Win32-OpenSSH shell

 By default `Win32-OpenSSH` will use `cmd.exe` as a shell. To configure a different shell, use an Ansible task to define the registry setting:

 
```
- name: set the default shell to PowerShell
  win_regedit:
    path: HKLM:\SOFTWARE\OpenSSH
    name: DefaultShell
    data: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    type: string
    state: present

# Or revert the settings back to the default, cmd
- name: set the default shell to cmd
  win_regedit:
    path: HKLM:\SOFTWARE\OpenSSH
    name: DefaultShell
    state: absent

```
 ### Win32-OpenSSH Authentication

 Win32-OpenSSH authentication with Windows is similar to SSH authentication on Unix/Linux hosts. You can use a plaintext password or SSH public key authentication, add public keys to an `authorized_key` file in the `.ssh` folder of the user’s profile directory, and configure the service using the `sshd_config` file used by the SSH service as you would on a Unix/Linux host.

 When using SSH key authentication with Ansible, the remote session won’t have access to the user’s credentials and will fail when attempting to access a network resource. This is also known as the double-hop or credential delegation issue. There are two ways to work around this issue:

 * Use plaintext password auth by setting `ansible_password`
* Use `become` on the task with the credentials of the user that needs access to the remote resource

 ### Configuring Ansible for SSH on Windows

 To configure Ansible to use SSH for Windows hosts, you must set two connection variables:

 * set `ansible_connection` to `ssh`
* set `ansible_shell_type` to `cmd` or `powershell`

 The `ansible_shell_type` variable should reflect the `DefaultShell` configured on the Windows host. Set to `cmd` for the default shell or set to `powershell` if the `DefaultShell` has been changed to PowerShell.

 ### Known issues with SSH on Windows

 Using SSH with Windows is experimental, and we expect to uncover more issues. Here are the known ones:

 * Win32-OpenSSH versions older than `v7.9.0.0p1-Beta` do not work when `powershell` is the shell type
* While SCP should work, SFTP is the recommended SSH file transfer mechanism to use when copying or fetching a file

  See also

  [Intro to playbooks](playbooks_intro#about-playbooks)

An introduction to playbooks

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [List of Windows Modules](https://docs.ansible.com/ansible/2.9/modules/list_of_windows_modules.html#windows-modules "(in Ansible v2.9)")

Windows specific module list, all implemented in PowerShell

  [User Mailing List](https://groups.google.com/group/ansible-project)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html>

Windows performance
===================

 This document offers some performance optimizations you might like to apply to your Windows hosts to speed them up specifically in the context of using Ansible with them, and generally.

 Optimise PowerShell performance to reduce Ansible task overhead
---------------------------------------------------------------

 To speed up the startup of PowerShell by around 10x, run the following PowerShell snippet in an Administrator session. Expect it to take tens of seconds.

  Note

 If native images have already been created by the ngen task or service, you will observe no difference in performance (but this snippet will at that point execute faster than otherwise).

  
```
function Optimize-PowershellAssemblies {
  # NGEN powershell assembly, improves startup time of powershell by 10x
  $old_path = $env:path
  try {
    $env:path = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
    [AppDomain]::CurrentDomain.GetAssemblies() | % {
      if (! $_.location) {continue}
      $Name = Split-Path $_.location -leaf
      if ($Name.startswith("Microsoft.PowerShell.")) {
        Write-Progress -Activity "Native Image Installation" -Status "$name"
        ngen install $_.location | % {"`t$_"}
      }
    }
  } finally {
    $env:path = $old_path
  }
}
Optimize-PowershellAssemblies

```
 PowerShell is used by every Windows Ansible module. This optimisation reduces the time PowerShell takes to start up, removing that overhead from every invocation.

 This snippet uses [the native image generator, ngen](https://docs.microsoft.com/en-us/dotnet/framework/tools/ngen-exe-native-image-generator#WhenToUse) to pre-emptively create native images for the assemblies that PowerShell relies on.

 Fix high-CPU-on-boot for VMs/cloud instances
--------------------------------------------

 If you are creating golden images to spawn instances from, you can avoid a disruptive high CPU task near startup via [processing the ngen queue](https://docs.microsoft.com/en-us/dotnet/framework/tools/ngen-exe-native-image-generator#native-image-service) within your golden image creation, if you know the CPU types won’t change between golden image build process and runtime.

 Place the following near the end of your playbook, bearing in mind the factors that can cause native images to be invalidated ([see MSDN](https://docs.microsoft.com/en-us/dotnet/framework/tools/ngen-exe-native-image-generator#native-images-and-jit-compilation)).

 
```
- name: generate native .NET images for CPU
  win_dotnet_ngen:

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/windows_performance.html>

ansible.builtin.yum – Manages packages with the yum package manager
===================================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `yum` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * Installs, upgrade, downgrades, removes, and lists packages and groups with the *yum* package manager.
* This module only works on Python 2. If you require Python 3 support see the [ansible.builtin.dnf](dnf_module#ansible-collections-ansible-builtin-dnf-module) module.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Requirements
------------

 The below requirements are needed on the host that executes this module.

 * yum

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_downgrade**  boolean   added in 2.4 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Specify if the named package and version is allowed to downgrade a maybe already installed higher version of that package. Note that setting allow\_downgrade=True can make this module behave in a non-idempotent way. The task could end up with a set of packages that does not match the complete list of specified packages to install (because dependencies between the downgraded package and others can cause changes to the packages which were in the earlier transaction). |
| **autoremove**  boolean   added in 2.7 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | If `yes`, removes all "leaf" packages from the system that were originally installed as dependencies of user-installed packages but which are no longer required by any such package. Should be used alone or when state is *absent*
 NOTE: This feature requires yum >= 3.4.3 (RHEL/CentOS 7+) |
| **bugfix**  boolean   added in 2.6 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | If set to `yes`, and `state=latest` then only installs updates that have been marked bugfix related. |
| **conf\_file**  string   added in 0.6 of ansible.builtin  |  | The remote yum configuration file to use for the transaction. |
| **disable\_excludes**  string   added in 2.7 of ansible.builtin  |  | Disable the excludes defined in YUM config files. If set to `all`, disables all excludes. If set to `main`, disable excludes defined in [main] in yum.conf. If set to `repoid`, disable excludes defined for given repo id. |
| **disable\_gpg\_check**  boolean   added in 1.2 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Whether to disable the GPG checking of signatures of packages being installed. Has an effect only if state is *present* or *latest*. |
| **disable\_plugin**  list / elements=string   added in 2.5 of ansible.builtin  |  | 
*Plugin* name to disable for the install/update operation. The disabled plugins will not persist beyond the transaction. |
| **disablerepo**  list / elements=string   added in 0.9 of ansible.builtin  |  | 
*Repoid* of repositories to disable for the install/update operation. These repos will not persist beyond the transaction. When specifying multiple repos, separate them with a `","`. As of Ansible 2.7, this can alternatively be a list instead of `","` separated string |
| **download\_dir**  string   added in 2.8 of ansible.builtin  |  | Specifies an alternate directory to store packages. Has an effect only if *download\_only* is specified. |
| **download\_only**  boolean   added in 2.7 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Only download the packages, do not install them. |
| **enable\_plugin**  list / elements=string   added in 2.5 of ansible.builtin  |  | 
*Plugin* name to enable for the install/update operation. The enabled plugin will not persist beyond the transaction. |
| **enablerepo**  list / elements=string   added in 0.9 of ansible.builtin  |  | 
*Repoid* of repositories to enable for the install/update operation. These repos will not persist beyond the transaction. When specifying multiple repos, separate them with a `","`. As of Ansible 2.7, this can alternatively be a list instead of `","` separated string |
| **exclude**  list / elements=string   added in 2.0 of ansible.builtin  |  | Package name(s) to exclude when state=present, or latest |
| **install\_repoquery**  boolean   added in 1.5 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | If repoquery is not available, install yum-utils. If the system is registered to RHN or an RHN Satellite, repoquery allows for querying all channels assigned to the system. It is also required to use the 'list' parameter. NOTE: This will run and be logged as a separate yum transation which takes place before any other installation or removal. NOTE: This will use the system's default enabled repositories without regard for disablerepo/enablerepo given to the module. |
| **install\_weak\_deps**  boolean   added in 2.8 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | Will also install all packages linked by a weak dependency relation. NOTE: This feature requires yum >= 4 (RHEL/CentOS 8+) |
| **installroot**  string   added in 2.3 of ansible.builtin  | **Default:**"/" | Specifies an alternative installroot, relative to which all packages will be installed. |
| **list**  string  |  | Package name to run the equivalent of yum list --show-duplicates <package> against. In addition to listing packages, use can also list the following: `installed`, `updates`, `available` and `repos`. This parameter is mutually exclusive with `name`. |
| **lock\_timeout**  integer   added in 2.8 of ansible.builtin  | **Default:**30 | Amount of time to wait for the yum lockfile to be freed. |
| **name**  list / elements=string  |  | A package name or package specifier with version, like `name-1.0`. Comparison operators for package version are valid here `>`, `<`, `>=`, `<=`. Example - `name>=1.0`
 If a previous version is specified, the task also needs to turn `allow_downgrade` on. See the `allow_downgrade` documentation for caveats with downgrading packages. When using state=latest, this can be `'*'` which means run `yum -y update`. You can also pass a url or a local path to a rpm file (using state=present). To operate on several packages this can accept a comma separated string of packages or (as of 2.0) a list of packages. 
aliases: pkg |
| **releasever**  string   added in 2.7 of ansible.builtin  |  | Specifies an alternative release from which all packages will be installed. |
| **security**  boolean   added in 2.4 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | If set to `yes`, and `state=latest` then only installs updates that have been marked security related. |
| **skip\_broken**  boolean   added in 2.3 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Skip packages with broken dependencies(devsolve) and are causing problems. |
| **state**  string  | **Choices:*** absent
* installed
* latest
* present
* removed
 | Whether to install (`present` or `installed`, `latest`), or remove (`absent` or `removed`) a package. 
`present` and `installed` will simply ensure that a desired package is installed. 
`latest` will update the specified package if it's not of the latest available version. 
`absent` and `removed` will remove the specified package. Default is `None`, however in effect the default action is `present` unless the `autoremove` option is enabled for this module, then `absent` is inferred. |
| **update\_cache**  boolean   added in 1.9 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Force yum to check if cache is out of date and redownload if needed. Has an effect only if state is *present* or *latest*. 
aliases: expire-cache |
| **update\_only**  boolean   added in 2.5 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | When using latest, only update installed packages. Do not install packages. Has an effect only if state is *latest*
 |
| **use\_backend**  string   added in 2.7 of ansible.builtin  | **Choices:*** **auto** ←
* yum
* yum4
* dnf
 | This module supports `yum` (as it always has), this is known as `yum3`/`YUM3`/`yum-deprecated` by upstream yum developers. As of Ansible 2.7+, this module also supports `YUM4`, which is the "new yum" and it has an `dnf` backend. By default, this module will select the backend based on the `ansible_pkg_mgr` fact. |
| **validate\_certs**  boolean   added in 2.1 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | This only applies if using a https url as the source of the rpm. e.g. for localinstall. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates as it avoids verifying the source site. Prior to 2.1 the code worked as if this was set to `yes`. |

   
 Notes
-----

  Note

 * When used with a `loop:` each package will be processed individually, it is much more efficient to pass the list directly to the `name` option.
* In versions prior to 1.9.2 this module installed and removed each package given to the yum module separately. This caused problems when packages specified by filename or url had to be installed or removed together. In 1.9.2 this was fixed so that packages are installed in one yum transaction. However, if one of the packages adds a new yum repository that the other packages come from (such as epel-release) then that package needs to be installed in a separate task. This mimics yum’s command line behaviour.
* Yum itself has two types of groups. “Package groups” are specified in the rpm itself while “environment groups” are specified in a separate file (usually by the distribution). Unfortunately, this division becomes apparent to ansible users because ansible needs to operate on the group of packages in a single transaction and yum requires groups to be specified in different ways when used in that way. Package groups are specified as “@development-tools” and environment groups are “@^gnome-desktop-environment”. Use the “yum group list hidden ids” command to see which category of group the group you want to install falls into.
* The yum module does not support clearing yum cache in an idempotent way, so it was decided not to implement it, the only method is to use command and call the yum command directly, namely “command: yum clean all” <https://github.com/ansible/ansible/pull/31450#issuecomment-352889579>

  Examples
--------

 
```
- name: Install the latest version of Apache
  yum:
    name: httpd
    state: latest

- name: Install Apache >= 2.4
  yum:
    name: httpd>=2.4
    state: present

- name: Install a list of packages (suitable replacement for 2.11 loop deprecation warning)
  yum:
    name:
      - nginx
      - postgresql
      - postgresql-server
    state: present

- name: Install a list of packages with a list variable
  yum:
    name: "{{ packages }}"
  vars:
    packages:
    - httpd
    - httpd-tools

- name: Remove the Apache package
  yum:
    name: httpd
    state: absent

- name: Install the latest version of Apache from the testing repo
  yum:
    name: httpd
    enablerepo: testing
    state: present

- name: Install one specific version of Apache
  yum:
    name: httpd-2.2.29-1.4.amzn1
    state: present

- name: Upgrade all packages
  yum:
    name: '*'
    state: latest

- name: Upgrade all packages, excluding kernel & foo related packages
  yum:
    name: '*'
    state: latest
    exclude: kernel*,foo*

- name: Install the nginx rpm from a remote repo
  yum:
    name: http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
    state: present

- name: Install nginx rpm from a local file
  yum:
    name: /usr/local/src/nginx-release-centos-6-0.el6.ngx.noarch.rpm
    state: present

- name: Install the 'Development tools' package group
  yum:
    name: "@Development tools"
    state: present

- name: Install the 'Gnome desktop' environment group
  yum:
    name: "@^gnome-desktop-environment"
    state: present

- name: List ansible packages and register result to print with debug later
  yum:
    list: ansible
  register: result

- name: Install package with multiple repos enabled
  yum:
    name: sos
    enablerepo: "epel,ol7_latest"

- name: Install package with multiple repos disabled
  yum:
    name: sos
    disablerepo: "epel,ol7_latest"

- name: Download the nginx package but do not install it
  yum:
    name:
      - nginx
    state: latest
    download_only: true

```
 ### Authors

 * Ansible Core Team
* Seth Vidal (@skvidal)
* Eduard Snesarev (@verm666)
* Berend De Schouwer (@berenddeschouwer)
* Abhijeet Kasurde (@Akasurde)
* Adam Miller (@maxamillion)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/yum_module.html>

Windows Remote Management
=========================

 Unlike Linux/Unix hosts, which use SSH by default, Windows hosts are configured with WinRM. This topic covers how to configure and use WinRM with Ansible.

 * [What is WinRM?](#what-is-winrm)
* [Authentication Options](#authentication-options)


	+ [Basic](#basic)
	+ [Certificate](#certificate)
	
	
		- [Generate a Certificate](#generate-a-certificate)
		- [Import a Certificate to the Certificate Store](#import-a-certificate-to-the-certificate-store)
		- [Mapping a Certificate to an Account](#mapping-a-certificate-to-an-account)
	+ [NTLM](#ntlm)
	+ [Kerberos](#kerberos)
	
	
		- [Installing the Kerberos Library](#installing-the-kerberos-library)
		- [Configuring Host Kerberos](#configuring-host-kerberos)
		- [Automatic Kerberos Ticket Management](#automatic-kerberos-ticket-management)
		- [Manual Kerberos Ticket Management](#manual-kerberos-ticket-management)
		- [Troubleshooting Kerberos](#troubleshooting-kerberos)
	+ [CredSSP](#credssp)
	
	
		- [Installing CredSSP Library](#installing-credssp-library)
		- [CredSSP and TLS 1.2](#credssp-and-tls-1-2)
		- [Set CredSSP Certificate](#set-credssp-certificate)
* [Non-Administrator Accounts](#non-administrator-accounts)
* [WinRM Encryption](#winrm-encryption)
* [Inventory Options](#inventory-options)
* [IPv6 Addresses](#ipv6-addresses)
* [HTTPS Certificate Validation](#https-certificate-validation)
* [TLS 1.2 Support](#tls-1-2-support)
* [Limitations](#limitations)

 What is WinRM?
--------------

 WinRM is a management protocol used by Windows to remotely communicate with another server. It is a SOAP-based protocol that communicates over HTTP/HTTPS, and is included in all recent Windows operating systems. Since Windows Server 2012, WinRM has been enabled by default, but in most cases extra configuration is required to use WinRM with Ansible.

 Ansible uses the [pywinrm](https://github.com/diyan/pywinrm) package to communicate with Windows servers over WinRM. It is not installed by default with the Ansible package, but can be installed by running the following:

 
```
pip install "pywinrm>=0.3.0"

```
  Note

 on distributions with multiple python versions, use pip2 or pip2.x, where x matches the python minor version Ansible is running under.

   Warning

 Using the `winrm` or `psrp` connection plugins in Ansible on MacOS in the latest releases typically fail. This is a known problem that occurs deep within the Python stack and cannot be changed by Ansible. The only workaround today is to set the environment variable `no_proxy=*` and avoid using Kerberos auth.

  Authentication Options
----------------------

 When connecting to a Windows host, there are several different options that can be used when authenticating with an account. The authentication type may be set on inventory hosts or groups with the `ansible_winrm_transport` variable.

 The following matrix is a high level overview of the options:

 

| Option | Local Accounts | Active Directory Accounts | Credential Delegation | HTTP Encryption |
| --- | --- | --- | --- | --- |
| Basic | Yes | No | No | No |
| Certificate | Yes | No | No | No |
| Kerberos | No | Yes | Yes | Yes |
| NTLM | Yes | Yes | No | Yes |
| CredSSP | Yes | Yes | Yes | Yes |

 ### Basic

 Basic authentication is one of the simplest authentication options to use, but is also the most insecure. This is because the username and password are simply base64 encoded, and if a secure channel is not in use (eg, HTTPS) then it can be decoded by anyone. Basic authentication can only be used for local accounts (not domain accounts).

 The following example shows host vars configured for basic authentication:

 
```
ansible_user: LocalUsername
ansible_password: Password
ansible_connection: winrm
ansible_winrm_transport: basic

```
 Basic authentication is not enabled by default on a Windows host but can be enabled by running the following in PowerShell:

 
```
Set-Item -Path WSMan:\localhost\Service\Auth\Basic -Value $true

```
 ### Certificate

 Certificate authentication uses certificates as keys similar to SSH key pairs, but the file format and key generation process is different.

 The following example shows host vars configured for certificate authentication:

 
```
ansible_connection: winrm
ansible_winrm_cert_pem: /path/to/certificate/public/key.pem
ansible_winrm_cert_key_pem: /path/to/certificate/private/key.pem
ansible_winrm_transport: certificate

```
 Certificate authentication is not enabled by default on a Windows host but can be enabled by running the following in PowerShell:

 
```
Set-Item -Path WSMan:\localhost\Service\Auth\Certificate -Value $true

```
  Note

 Encrypted private keys cannot be used as the urllib3 library that is used by Ansible for WinRM does not support this functionality.

  #### Generate a Certificate

 A certificate must be generated before it can be mapped to a local user. This can be done using one of the following methods:

 * OpenSSL
* PowerShell, using the `New-SelfSignedCertificate` cmdlet
* Active Directory Certificate Services

 Active Directory Certificate Services is beyond of scope in this documentation but may be the best option to use when running in a domain environment. For more information, see the [Active Directory Certificate Services documentation](https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc732625(v=ws.11)).

  Note

 Using the PowerShell cmdlet `New-SelfSignedCertificate` to generate a certificate for authentication only works when being generated from a Windows 10 or Windows Server 2012 R2 host or later. OpenSSL is still required to extract the private key from the PFX certificate to a PEM file for Ansible to use.

  To generate a certificate with `OpenSSL`:

 
```
# Set the name of the local user that will have the key mapped to
USERNAME="username"

cat > openssl.conf << EOL
distinguished_name = req_distinguished_name
[req_distinguished_name]
[v3_req_client]
extendedKeyUsage = clientAuth
subjectAltName = otherName:1.3.6.1.4.1.311.20.2.3;UTF8:$USERNAME@localhost
EOL

export OPENSSL_CONF=openssl.conf
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -out cert.pem -outform PEM -keyout cert_key.pem -subj "/CN=$USERNAME" -extensions v3_req_client
rm openssl.conf

```
 To generate a certificate with `New-SelfSignedCertificate`:

 
```
# Set the name of the local user that will have the key mapped
$username = "username"
$output_path = "C:\temp"

# Instead of generating a file, the cert will be added to the personal
# LocalComputer folder in the certificate store
$cert = New-SelfSignedCertificate -Type Custom `
    -Subject "CN=$username" `
    -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.2","2.5.29.17={text}upn=$username@localhost") `
    -KeyUsage DigitalSignature,KeyEncipherment `
    -KeyAlgorithm RSA `
    -KeyLength 2048

# Export the public key
$pem_output = @()
$pem_output += "-----BEGIN CERTIFICATE-----"
$pem_output += [System.Convert]::ToBase64String($cert.RawData) -replace ".{64}", "$&`n"
$pem_output += "-----END CERTIFICATE-----"
[System.IO.File]::WriteAllLines("$output_path\cert.pem", $pem_output)

# Export the private key in a PFX file
[System.IO.File]::WriteAllBytes("$output_path\cert.pfx", $cert.Export("Pfx"))

```
  Note

 To convert the PFX file to a private key that pywinrm can use, run the following command with OpenSSL `openssl pkcs12 -in cert.pfx -nocerts -nodes -out cert_key.pem -passin pass: -passout pass:`

  #### Import a Certificate to the Certificate Store

 Once a certificate has been generated, the issuing certificate needs to be imported into the `Trusted Root Certificate Authorities` of the `LocalMachine` store, and the client certificate public key must be present in the `Trusted People` folder of the `LocalMachine` store. For this example, both the issuing certificate and public key are the same.

 Following example shows how to import the issuing certificate:

 
```
$cert = New-Object -TypeName System.Security.Cryptography.X509Certificates.X509Certificate2
$cert.Import("cert.pem")

$store_name = [System.Security.Cryptography.X509Certificates.StoreName]::Root
$store_location = [System.Security.Cryptography.X509Certificates.StoreLocation]::LocalMachine
$store = New-Object -TypeName System.Security.Cryptography.X509Certificates.X509Store -ArgumentList $store_name, $store_location
$store.Open("MaxAllowed")
$store.Add($cert)
$store.Close()

```
  Note

 If using ADCS to generate the certificate, then the issuing certificate will already be imported and this step can be skipped.

  The code to import the client certificate public key is:

 
```
$cert = New-Object -TypeName System.Security.Cryptography.X509Certificates.X509Certificate2
$cert.Import("cert.pem")

$store_name = [System.Security.Cryptography.X509Certificates.StoreName]::TrustedPeople
$store_location = [System.Security.Cryptography.X509Certificates.StoreLocation]::LocalMachine
$store = New-Object -TypeName System.Security.Cryptography.X509Certificates.X509Store -ArgumentList $store_name, $store_location
$store.Open("MaxAllowed")
$store.Add($cert)
$store.Close()

```
 #### Mapping a Certificate to an Account

 Once the certificate has been imported, map it to the local user account:

 
```
$username = "username"
$password = ConvertTo-SecureString -String "password" -AsPlainText -Force
$credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, $password

# This is the issuer thumbprint which in the case of a self generated cert
# is the public key thumbprint, additional logic may be required for other
# scenarios
$thumbprint = (Get-ChildItem -Path cert:\LocalMachine\root | Where-Object { $_.Subject -eq "CN=$username" }).Thumbprint

New-Item -Path WSMan:\localhost\ClientCertificate `
    -Subject "$username@localhost" `
    -URI * `
    -Issuer $thumbprint `
    -Credential $credential `
    -Force

```
 Once this is complete, the hostvar `ansible_winrm_cert_pem` should be set to the path of the public key and the `ansible_winrm_cert_key_pem` variable should be set to the path of the private key.

 ### NTLM

 NTLM is an older authentication mechanism used by Microsoft that can support both local and domain accounts. NTLM is enabled by default on the WinRM service, so no setup is required before using it.

 NTLM is the easiest authentication protocol to use and is more secure than `Basic` authentication. If running in a domain environment, `Kerberos` should be used instead of NTLM.

 Kerberos has several advantages over using NTLM:

 * NTLM is an older protocol and does not support newer encryption protocols.
* NTLM is slower to authenticate because it requires more round trips to the host in the authentication stage.
* Unlike Kerberos, NTLM does not allow credential delegation.

 This example shows host variables configured to use NTLM authentication:

 
```
ansible_user: LocalUsername
ansible_password: Password
ansible_connection: winrm
ansible_winrm_transport: ntlm

```
 ### Kerberos

 Kerberos is the recommended authentication option to use when running in a domain environment. Kerberos supports features like credential delegation and message encryption over HTTP and is one of the more secure options that is available through WinRM.

 Kerberos requires some additional setup work on the Ansible host before it can be used properly.

 The following example shows host vars configured for Kerberos authentication:

 
```
ansible_user: username@MY.DOMAIN.COM
ansible_password: Password
ansible_connection: winrm
ansible_port: 5985
ansible_winrm_transport: kerberos

```
 As of Ansible version 2.3, the Kerberos ticket will be created based on `ansible_user` and `ansible_password`. If running on an older version of Ansible or when `ansible_winrm_kinit_mode` is `manual`, a Kerberos ticket must already be obtained. See below for more details.

 There are some extra host variables that can be set:

 
```
ansible_winrm_kinit_mode: managed/manual (manual means Ansible will not obtain a ticket)
ansible_winrm_kinit_cmd: the kinit binary to use to obtain a Kerberos ticket (default to kinit)
ansible_winrm_service: overrides the SPN prefix that is used, the default is ``HTTP`` and should rarely ever need changing
ansible_winrm_kerberos_delegation: allows the credentials to traverse multiple hops
ansible_winrm_kerberos_hostname_override: the hostname to be used for the kerberos exchange

```
 #### Installing the Kerberos Library

 Some system dependencies that must be installed prior to using Kerberos. The script below lists the dependencies based on the distro:

 
```
# Via Yum (RHEL/Centos/Fedora)
yum -y install gcc python-devel krb5-devel krb5-libs krb5-workstation

# Via Apt (Ubuntu)
sudo apt-get install python-dev libkrb5-dev krb5-user

# Via Portage (Gentoo)
emerge -av app-crypt/mit-krb5
emerge -av dev-python/setuptools

# Via Pkg (FreeBSD)
sudo pkg install security/krb5

# Via OpenCSW (Solaris)
pkgadd -d http://get.opencsw.org/now
/opt/csw/bin/pkgutil -U
/opt/csw/bin/pkgutil -y -i libkrb5_3

# Via Pacman (Arch Linux)
pacman -S krb5

```
 Once the dependencies have been installed, the `python-kerberos` wrapper can be install using `pip`:

 
```
pip install pywinrm[kerberos]

```
  Note

 While Ansible has supported Kerberos auth through `pywinrm` for some time, optional features or more secure options may only be available in newer versions of the `pywinrm` and/or `pykerberos` libraries. It is recommended you upgrade each version to the latest available to resolve any warnings or errors. This can be done through tools like `pip` or a system package manager like `dnf`, `yum`, `apt` but the package names and versions available may differ between tools.

  #### Configuring Host Kerberos

 Once the dependencies have been installed, Kerberos needs to be configured so that it can communicate with a domain. This configuration is done through the `/etc/krb5.conf` file, which is installed with the packages in the script above.

 To configure Kerberos, in the section that starts with:

 
```
[realms]

```
 Add the full domain name and the fully qualified domain names of the primary and secondary Active Directory domain controllers. It should look something like this:

 
```
[realms]
    MY.DOMAIN.COM = {
        kdc = domain-controller1.my.domain.com
        kdc = domain-controller2.my.domain.com
    }

```
 In the section that starts with:

 
```
[domain_realm]

```
 Add a line like the following for each domain that Ansible needs access for:

 
```
[domain_realm]
    .my.domain.com = MY.DOMAIN.COM

```
 You can configure other settings in this file such as the default domain. See [krb5.conf](https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html) for more details.

 #### Automatic Kerberos Ticket Management

 Ansible version 2.3 and later defaults to automatically managing Kerberos tickets when both `ansible_user` and `ansible_password` are specified for a host. In this process, a new ticket is created in a temporary credential cache for each host. This is done before each task executes to minimize the chance of ticket expiration. The temporary credential caches are deleted after each task completes and will not interfere with the default credential cache.

 To disable automatic ticket management, set `ansible_winrm_kinit_mode=manual` via the inventory.

 Automatic ticket management requires a standard `kinit` binary on the control host system path. To specify a different location or binary name, set the `ansible_winrm_kinit_cmd` hostvar to the fully qualified path to a MIT krbv5 `kinit`-compatible binary.

 #### Manual Kerberos Ticket Management

 To manually manage Kerberos tickets, the `kinit` binary is used. To obtain a new ticket the following command is used:

 
```
kinit username@MY.DOMAIN.COM

```
  Note

 The domain must match the configured Kerberos realm exactly, and must be in upper case.

  To see what tickets (if any) have been acquired, use the following command:

 
```
klist

```
 To destroy all the tickets that have been acquired, use the following command:

 
```
kdestroy

```
 #### Troubleshooting Kerberos

 Kerberos is reliant on a properly-configured environment to work. To troubleshoot Kerberos issues, ensure that:

 * The hostname set for the Windows host is the FQDN and not an IP address.
* The forward and reverse DNS lookups are working properly in the domain. To test this, ping the windows host by name and then use the ip address returned with `nslookup`. The same name should be returned when using `nslookup` on the IP address.
* The Ansible host’s clock is synchronized with the domain controller. Kerberos is time sensitive, and a little clock drift can cause the ticket generation process to fail.
* Ensure that the fully qualified domain name for the domain is configured in the `krb5.conf` file. To check this, run:

 
```
kinit -C username@MY.DOMAIN.COM
klist

```
 If the domain name returned by `klist` is different from the one requested, an alias is being used. The `krb5.conf` file needs to be updated so that the fully qualified domain name is used and not an alias.
* If the default kerberos tooling has been replaced or modified (some IdM solutions may do this), this may cause issues when installing or upgrading the Python Kerberos library. As of the time of this writing, this library is called `pykerberos` and is known to work with both MIT and Heimdal Kerberos libraries. To resolve `pykerberos` installation issues, ensure the system dependencies for Kerberos have been met (see: [Installing the Kerberos Library](#installing-the-kerberos-library)), remove any custom Kerberos tooling paths from the PATH environment variable, and retry the installation of Python Kerberos library package.

 ### CredSSP

 CredSSP authentication is a newer authentication protocol that allows credential delegation. This is achieved by encrypting the username and password after authentication has succeeded and sending that to the server using the CredSSP protocol.

 Because the username and password are sent to the server to be used for double hop authentication, ensure that the hosts that the Windows host communicates with are not compromised and are trusted.

 CredSSP can be used for both local and domain accounts and also supports message encryption over HTTP.

 To use CredSSP authentication, the host vars are configured like so:

 
```
ansible_user: Username
ansible_password: Password
ansible_connection: winrm
ansible_winrm_transport: credssp

```
 There are some extra host variables that can be set as shown below:

 
```
ansible_winrm_credssp_disable_tlsv1_2: when true, will not use TLS 1.2 in the CredSSP auth process

```
 CredSSP authentication is not enabled by default on a Windows host, but can be enabled by running the following in PowerShell:

 
```
Enable-WSManCredSSP -Role Server -Force

```
 #### Installing CredSSP Library

 The `requests-credssp` wrapper can be installed using `pip`:

 
```
pip install pywinrm[credssp]

```
 #### CredSSP and TLS 1.2

 By default the `requests-credssp` library is configured to authenticate over the TLS 1.2 protocol. TLS 1.2 is installed and enabled by default for Windows Server 2012 and Windows 8 and more recent releases.

 There are two ways that older hosts can be used with CredSSP:

 * Install and enable a hotfix to enable TLS 1.2 support (recommended for Server 2008 R2 and Windows 7).
* Set `ansible_winrm_credssp_disable_tlsv1_2=True` in the inventory to run over TLS 1.0. This is the only option when connecting to Windows Server 2008, which has no way of supporting TLS 1.2

 See [TLS 1.2 Support](#winrm-tls12) for more information on how to enable TLS 1.2 on the Windows host.

 #### Set CredSSP Certificate

 CredSSP works by encrypting the credentials through the TLS protocol and uses a self-signed certificate by default. The `CertificateThumbprint` option under the WinRM service configuration can be used to specify the thumbprint of another certificate.

  Note

 This certificate configuration is independent of the WinRM listener certificate. With CredSSP, message transport still occurs over the WinRM listener, but the TLS-encrypted messages inside the channel use the service-level certificate.

  To explicitly set the certificate to use for CredSSP:

 
```
# Note the value $certificate_thumbprint will be different in each
# situation, this needs to be set based on the cert that is used.
$certificate_thumbprint = "7C8DCBD5427AFEE6560F4AF524E325915F51172C"

# Set the thumbprint value
Set-Item -Path WSMan:\localhost\Service\CertificateThumbprint -Value $certificate_thumbprint

```
 Non-Administrator Accounts
--------------------------

 WinRM is configured by default to only allow connections from accounts in the local `Administrators` group. This can be changed by running:

 
```
winrm configSDDL default

```
 This will display an ACL editor, where new users or groups may be added. To run commands over WinRM, users and groups must have at least the `Read` and `Execute` permissions enabled.

 While non-administrative accounts can be used with WinRM, most typical server administration tasks require some level of administrative access, so the utility is usually limited.

 WinRM Encryption
----------------

 By default WinRM will fail to work when running over an unencrypted channel. The WinRM protocol considers the channel to be encrypted if using TLS over HTTP (HTTPS) or using message level encryption. Using WinRM with TLS is the recommended option as it works with all authentication options, but requires a certificate to be created and used on the WinRM listener.

 The `ConfigureRemotingForAnsible.ps1` creates a self-signed certificate and creates the listener with that certificate. If in a domain environment, ADCS can also create a certificate for the host that is issued by the domain itself.

 If using HTTPS is not an option, then HTTP can be used when the authentication option is `NTLM`, `Kerberos` or `CredSSP`. These protocols will encrypt the WinRM payload with their own encryption method before sending it to the server. The message-level encryption is not used when running over HTTPS because the encryption uses the more secure TLS protocol instead. If both transport and message encryption is required, set `ansible_winrm_message_encryption=always` in the host vars.

  Note

 Message encryption over HTTP requires pywinrm>=0.3.0.

  A last resort is to disable the encryption requirement on the Windows host. This should only be used for development and debugging purposes, as anything sent from Ansible can be viewed, manipulated and also the remote session can completely be taken over by anyone on the same network. To disable the encryption requirement:

 
```
Set-Item -Path WSMan:\localhost\Service\AllowUnencrypted -Value $true

```
  Note

 Do not disable the encryption check unless it is absolutely required. Doing so could allow sensitive information like credentials and files to be intercepted by others on the network.

  Inventory Options
-----------------

 Ansible’s Windows support relies on a few standard variables to indicate the username, password, and connection type of the remote hosts. These variables are most easily set up in the inventory, but can be set on the `host_vars`/ `group_vars` level.

 When setting up the inventory, the following variables are required:

 
```
# It is suggested that these be encrypted with ansible-vault:
# ansible-vault edit group_vars/windows.yml
ansible_connection: winrm

# May also be passed on the command-line via --user
ansible_user: Administrator

# May also be supplied at runtime with --ask-pass
ansible_password: SecretPasswordGoesHere

```
 Using the variables above, Ansible will connect to the Windows host with Basic authentication through HTTPS. If `ansible_user` has a UPN value like `username@MY.DOMAIN.COM` then the authentication option will automatically attempt to use Kerberos unless `ansible_winrm_transport` has been set to something other than `kerberos`.

 The following custom inventory variables are also supported for additional configuration of WinRM connections:

 * `ansible_port`: The port WinRM will run over, HTTPS is `5986` which is the default while HTTP is `5985`
* `ansible_winrm_scheme`: Specify the connection scheme (`http` or `https`) to use for the WinRM connection. Ansible uses `https` by default unless `ansible_port` is `5985`
* `ansible_winrm_path`: Specify an alternate path to the WinRM endpoint, Ansible uses `/wsman` by default
* `ansible_winrm_realm`: Specify the realm to use for Kerberos authentication. If `ansible_user` contains `@`, Ansible will use the part of the username after `@` by default
* `ansible_winrm_transport`: Specify one or more authentication transport options as a comma-separated list. By default, Ansible will use `kerberos,
basic` if the `kerberos` module is installed and a realm is defined, otherwise it will be `plaintext`
* `ansible_winrm_server_cert_validation`: Specify the server certificate validation mode (`ignore` or `validate`). Ansible defaults to `validate` on Python 2.7.9 and higher, which will result in certificate validation errors against the Windows self-signed certificates. Unless verifiable certificates have been configured on the WinRM listeners, this should be set to `ignore`
* `ansible_winrm_operation_timeout_sec`: Increase the default timeout for WinRM operations, Ansible uses `20` by default
* `ansible_winrm_read_timeout_sec`: Increase the WinRM read timeout, Ansible uses `30` by default. Useful if there are intermittent network issues and read timeout errors keep occurring
* `ansible_winrm_message_encryption`: Specify the message encryption operation (`auto`, `always`, `never`) to use, Ansible uses `auto` by default. `auto` means message encryption is only used when `ansible_winrm_scheme` is `http` and `ansible_winrm_transport` supports message encryption. `always` means message encryption will always be used and `never` means message encryption will never be used
* `ansible_winrm_ca_trust_path`: Used to specify a different cacert container than the one used in the `certifi` module. See the HTTPS Certificate Validation section for more details.
* `ansible_winrm_send_cbt`: When using `ntlm` or `kerberos` over HTTPS, the authentication library will try to send channel binding tokens to mitigate against man in the middle attacks. This flag controls whether these bindings will be sent or not (default: `yes`).
* `ansible_winrm_*`: Any additional keyword arguments supported by `winrm.Protocol` may be provided in place of `*`

 In addition, there are also specific variables that need to be set for each authentication option. See the section on authentication above for more information.

  Note

 Ansible 2.0 has deprecated the “ssh” from `ansible_ssh_user`, `ansible_ssh_pass`, `ansible_ssh_host`, and `ansible_ssh_port` to become `ansible_user`, `ansible_password`, `ansible_host`, and `ansible_port`. If using a version of Ansible prior to 2.0, the older style (`ansible_ssh_*`) should be used instead. The shorter variables are ignored, without warning, in older versions of Ansible.

   Note

 `ansible_winrm_message_encryption` is different from transport encryption done over TLS. The WinRM payload is still encrypted with TLS when run over HTTPS, even if `ansible_winrm_message_encryption=never`.

  IPv6 Addresses
--------------

 IPv6 addresses can be used instead of IPv4 addresses or hostnames. This option is normally set in an inventory. Ansible will attempt to parse the address using the [ipaddress](https://docs.python.org/3/library/ipaddress.html) package and pass to pywinrm correctly.

 When defining a host using an IPv6 address, just add the IPv6 address as you would an IPv4 address or hostname:

 
```
[windows-server]
2001:db8::1

[windows-server:vars]
ansible_user=username
ansible_password=password
ansible_connection=winrm

```
  Note

 The ipaddress library is only included by default in Python 3.x. To use IPv6 addresses in Python 2.7, make sure to run `pip install ipaddress` which installs a backported package.

  HTTPS Certificate Validation
----------------------------

 As part of the TLS protocol, the certificate is validated to ensure the host matches the subject and the client trusts the issuer of the server certificate. When using a self-signed certificate or setting `ansible_winrm_server_cert_validation: ignore` these security mechanisms are bypassed. While self signed certificates will always need the `ignore` flag, certificates that have been issued from a certificate authority can still be validated.

 One of the more common ways of setting up a HTTPS listener in a domain environment is to use Active Directory Certificate Service (AD CS). AD CS is used to generate signed certificates from a Certificate Signing Request (CSR). If the WinRM HTTPS listener is using a certificate that has been signed by another authority, like AD CS, then Ansible can be set up to trust that issuer as part of the TLS handshake.

 To get Ansible to trust a Certificate Authority (CA) like AD CS, the issuer certificate of the CA can be exported as a PEM encoded certificate. This certificate can then be copied locally to the Ansible controller and used as a source of certificate validation, otherwise known as a CA chain.

 The CA chain can contain a single or multiple issuer certificates and each entry is contained on a new line. To then use the custom CA chain as part of the validation process, set `ansible_winrm_ca_trust_path` to the path of the file. If this variable is not set, the default CA chain is used instead which is located in the install path of the Python package [certifi](https://github.com/certifi/python-certifi).

  Note

 Each HTTP call is done by the Python requests library which does not use the systems built-in certificate store as a trust authority. Certificate validation will fail if the server’s certificate issuer is only added to the system’s truststore.

  TLS 1.2 Support
---------------

 As WinRM runs over the HTTP protocol, using HTTPS means that the TLS protocol is used to encrypt the WinRM messages. TLS will automatically attempt to negotiate the best protocol and cipher suite that is available to both the client and the server. If a match cannot be found then Ansible will error out with a message similar to:

 
```
HTTPSConnectionPool(host='server', port=5986): Max retries exceeded with url: /wsman (Caused by SSLError(SSLError(1, '[SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:1056)')))

```
 Commonly this is when the Windows host has not been configured to support TLS v1.2 but it could also mean the Ansible controller has an older OpenSSL version installed.

 Windows 8 and Windows Server 2012 come with TLS v1.2 installed and enabled by default but older hosts, like Server 2008 R2 and Windows 7, have to be enabled manually.

  Note

 There is a bug with the TLS 1.2 patch for Server 2008 which will stop Ansible from connecting to the Windows host. This means that Server 2008 cannot be configured to use TLS 1.2. Server 2008 R2 and Windows 7 are not affected by this issue and can use TLS 1.2.

  To verify what protocol the Windows host supports, you can run the following command on the Ansible controller:

 
```
openssl s_client -connect <hostname>:5986

```
 The output will contain information about the TLS session and the `Protocol` line will display the version that was negotiated:

 
```
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1
    Cipher    : ECDHE-RSA-AES256-SHA
    Session-ID: 962A00001C95D2A601BE1CCFA7831B85A7EEE897AECDBF3D9ECD4A3BE4F6AC9B
    Session-ID-ctx:
    Master-Key: ....
    Start Time: 1552976474
    Timeout   : 7200 (sec)
    Verify return code: 21 (unable to verify the first certificate)
---

New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES256-GCM-SHA384
    Session-ID: AE16000050DA9FD44D03BB8839B64449805D9E43DBD670346D3D9E05D1AEEA84
    Session-ID-ctx:
    Master-Key: ....
    Start Time: 1552976538
    Timeout   : 7200 (sec)
    Verify return code: 21 (unable to verify the first certificate)

```
 If the host is returning `TLSv1` then it should be configured so that TLS v1.2 is enable. You can do this by running the following PowerShell script:

 
```
Function Enable-TLS12 {
    param(
        [ValidateSet("Server", "Client")]
        [String]$Component = "Server"
    )

    $protocols_path = 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols'
    New-Item -Path "$protocols_path\TLS 1.2\$Component" -Force
    New-ItemProperty -Path "$protocols_path\TLS 1.2\$Component" -Name Enabled -Value 1 -Type DWORD -Force
    New-ItemProperty -Path "$protocols_path\TLS 1.2\$Component" -Name DisabledByDefault -Value 0 -Type DWORD -Force
}

Enable-TLS12 -Component Server

# Not required but highly recommended to enable the Client side TLS 1.2 components
Enable-TLS12 -Component Client

Restart-Computer

```
 The below Ansible tasks can also be used to enable TLS v1.2:

 
```
- name: enable TLSv1.2 support
  win_regedit:
    path: HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\{{ item.type }}
    name: '{{ item.property }}'
    data: '{{ item.value }}'
    type: dword
    state: present
  register: enable_tls12
  loop:
  - type: Server
    property: Enabled
    value: 1
  - type: Server
    property: DisabledByDefault
    value: 0
  - type: Client
    property: Enabled
    value: 1
  - type: Client
    property: DisabledByDefault
    value: 0

- name: reboot if TLS config was applied
  win_reboot:
  when: enable_tls12 is changed

```
 There are other ways to configure the TLS protocols as well as the cipher suites that are offered by the Windows host. One tool that can give you a GUI to manage these settings is [IIS Crypto](https://www.nartac.com/Products/IISCrypto/) from Nartac Software.

 Limitations
-----------

 Due to the design of the WinRM protocol , there are a few limitations when using WinRM that can cause issues when creating playbooks for Ansible. These include:

 * Credentials are not delegated for most authentication types, which causes authentication errors when accessing network resources or installing certain programs.
* Many calls to the Windows Update API are blocked when running over WinRM.
* Some programs fail to install with WinRM due to no credential delegation or because they access forbidden Windows API like WUA over WinRM.
* Commands under WinRM are done under a non-interactive session, which can prevent certain commands or executables from running.
* You cannot run a process that interacts with `DPAPI`, which is used by some installers (like Microsoft SQL Server).

 Some of these limitations can be mitigated by doing one of the following:

 * Set `ansible_winrm_transport` to `credssp` or `kerberos` (with `ansible_winrm_kerberos_delegation=true`) to bypass the double hop issue and access network resources
* Use `become` to bypass all WinRM restrictions and run a command as it would locally. Unlike using an authentication transport like `credssp`, this will also remove the non-interactive restriction and API restrictions like WUA and DPAPI
* Use a scheduled task to run a command which can be created with the `win_scheduled_task` module. Like `become`, this bypasses all WinRM restrictions but can only run a command and not modules.

  See also

  [Intro to playbooks](playbooks_intro#playbooks-intro)

An introduction to playbooks

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [List of Windows Modules](https://docs.ansible.com/ansible/2.9/modules/list_of_windows_modules.html#windows-modules "(in Ansible v2.9)")

Windows specific module list, all implemented in PowerShell

  [User Mailing List](https://groups.google.com/group/ansible-project)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/windows_winrm.html>

Using Ansible and Windows
=========================

 When using Ansible to manage Windows, many of the syntax and rules that apply for Unix/Linux hosts also apply to Windows, but there are still some differences when it comes to components like path separators and OS-specific tasks. This document covers details specific to using Ansible for Windows.

 * [Use Cases](#use-cases)


	+ [Installing Software](#installing-software)
	+ [Installing Updates](#installing-updates)
	+ [Set Up Users and Groups](#set-up-users-and-groups)
	
	
		- [Local](#local)
		- [Domain](#domain)
	+ [Running Commands](#running-commands)
	
	
		- [Choosing Command or Shell](#choosing-command-or-shell)
		- [Argument Rules](#argument-rules)
	+ [Creating and Running a Scheduled Task](#creating-and-running-a-scheduled-task)
* [Path Formatting for Windows](#path-formatting-for-windows)


	+ [YAML Style](#yaml-style)
	+ [Legacy key=value Style](#legacy-key-value-style)
* [Limitations](#limitations)
* [Developing Windows Modules](#developing-windows-modules)

 Use Cases
---------

 Ansible can be used to orchestrate a multitude of tasks on Windows servers. Below are some examples and info about common tasks.

 ### Installing Software

 There are three main ways that Ansible can be used to install software:

 * Using the `win_chocolatey` module. This sources the program data from the default public [Chocolatey](https://chocolatey.org/) repository. Internal repositories can be used instead by setting the `source` option.
* Using the `win_package` module. This installs software using an MSI or .exe installer from a local/network path or URL.
* Using the `win_command` or `win_shell` module to run an installer manually.

 The `win_chocolatey` module is recommended since it has the most complete logic for checking to see if a package has already been installed and is up-to-date.

 Below are some examples of using all three options to install 7-Zip:

 
```
# Install/uninstall with chocolatey
- name: Ensure 7-Zip is installed via Chocolatey
  win_chocolatey:
    name: 7zip
    state: present

- name: Ensure 7-Zip is not installed via Chocolatey
  win_chocolatey:
    name: 7zip
    state: absent

# Install/uninstall with win_package
- name: Download the 7-Zip package
  win_get_url:
    url: https://www.7-zip.org/a/7z1701-x64.msi
    dest: C:\temp\7z.msi

- name: Ensure 7-Zip is installed via win_package
  win_package:
    path: C:\temp\7z.msi
    state: present

- name: Ensure 7-Zip is not installed via win_package
  win_package:
    path: C:\temp\7z.msi
    state: absent

# Install/uninstall with win_command
- name: Download the 7-Zip package
  win_get_url:
    url: https://www.7-zip.org/a/7z1701-x64.msi
    dest: C:\temp\7z.msi

- name: Check if 7-Zip is already installed
  win_reg_stat:
    name: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{23170F69-40C1-2702-1701-000001000000}
  register: 7zip_installed

- name: Ensure 7-Zip is installed via win_command
  win_command: C:\Windows\System32\msiexec.exe /i C:\temp\7z.msi /qn /norestart
  when: 7zip_installed.exists == false

- name: Ensure 7-Zip is uninstalled via win_command
  win_command: C:\Windows\System32\msiexec.exe /x {23170F69-40C1-2702-1701-000001000000} /qn /norestart
  when: 7zip_installed.exists == true

```
 Some installers like Microsoft Office or SQL Server require credential delegation or access to components restricted by WinRM. The best method to bypass these issues is to use `become` with the task. With `become`, Ansible will run the installer as if it were run interactively on the host.

  Note

 Many installers do not properly pass back error information over WinRM. In these cases, if the install has been verified to work locally the recommended method is to use become.

   Note

 Some installers restart the WinRM or HTTP services, or cause them to become temporarily unavailable, making Ansible assume the system is unreachable.

  ### Installing Updates

 The `win_updates` and `win_hotfix` modules can be used to install updates or hotfixes on a host. The module `win_updates` is used to install multiple updates by category, while `win_hotfix` can be used to install a single update or hotfix file that has been downloaded locally.

  Note

 The `win_hotfix` module has a requirement that the DISM PowerShell cmdlets are present. These cmdlets were only added by default on Windows Server 2012 and newer and must be installed on older Windows hosts.

  The following example shows how `win_updates` can be used:

 
```
- name: Install all critical and security updates
  win_updates:
    category_names:
    - CriticalUpdates
    - SecurityUpdates
    state: installed
  register: update_result

- name: Reboot host if required
  win_reboot:
  when: update_result.reboot_required

```
 The following example show how `win_hotfix` can be used to install a single update or hotfix:

 
```
- name: Download KB3172729 for Server 2012 R2
  win_get_url:
    url: http://download.windowsupdate.com/d/msdownload/update/software/secu/2016/07/windows8.1-kb3172729-x64_e8003822a7ef4705cbb65623b72fd3cec73fe222.msu
    dest: C:\temp\KB3172729.msu

- name: Install hotfix
  win_hotfix:
    hotfix_kb: KB3172729
    source: C:\temp\KB3172729.msu
    state: present
  register: hotfix_result

- name: Reboot host if required
  win_reboot:
  when: hotfix_result.reboot_required

```
 ### Set Up Users and Groups

 Ansible can be used to create Windows users and groups both locally and on a domain.

 #### Local

 The modules `win_user`, `win_group` and `win_group_membership` manage Windows users, groups and group memberships locally.

 The following is an example of creating local accounts and groups that can access a folder on the same host:

 
```
- name: Create local group to contain new users
  win_group:
    name: LocalGroup
    description: Allow access to C:\Development folder

- name: Create local user
  win_user:
    name: '{{ item.name }}'
    password: '{{ item.password }}'
    groups: LocalGroup
    update_password: no
    password_never_expires: yes
  loop:
  - name: User1
    password: Password1
  - name: User2
    password: Password2

- name: Create Development folder
  win_file:
    path: C:\Development
    state: directory

- name: Set ACL of Development folder
  win_acl:
    path: C:\Development
    rights: FullControl
    state: present
    type: allow
    user: LocalGroup

- name: Remove parent inheritance of Development folder
  win_acl_inheritance:
    path: C:\Development
    reorganize: yes
    state: absent

```
 #### Domain

 The modules `win_domain_user` and `win_domain_group` manages users and groups in a domain. The below is an example of ensuring a batch of domain users are created:

 
```
- name: Ensure each account is created
  win_domain_user:
    name: '{{ item.name }}'
    upn: '{{ item.name }}@MY.DOMAIN.COM'
    password: '{{ item.password }}'
    password_never_expires: no
    groups:
    - Test User
    - Application
    company: Ansible
    update_password: on_create
  loop:
  - name: Test User
    password: Password
  - name: Admin User
    password: SuperSecretPass01
  - name: Dev User
    password: '@fvr3IbFBujSRh!3hBg%wgFucD8^x8W5'

```
 ### Running Commands

 In cases where there is no appropriate module available for a task, a command or script can be run using the `win_shell`, `win_command`, `raw`, and `script` modules.

 The `raw` module simply executes a Powershell command remotely. Since `raw` has none of the wrappers that Ansible typically uses, `become`, `async` and environment variables do not work.

 The `script` module executes a script from the Ansible controller on one or more Windows hosts. Like `raw`, `script` currently does not support `become`, `async`, or environment variables.

 The `win_command` module is used to execute a command which is either an executable or batch file, while the `win_shell` module is used to execute commands within a shell.

 #### Choosing Command or Shell

 The `win_shell` and `win_command` modules can both be used to execute a command or commands. The `win_shell` module is run within a shell-like process like `PowerShell` or `cmd`, so it has access to shell operators like `<`, `>`, `|`, `;`, `&&`, and `||`. Multi-lined commands can also be run in `win_shell`.

 The `win_command` module simply runs a process outside of a shell. It can still run a shell command like `mkdir` or `New-Item` by passing the shell commands to a shell executable like `cmd.exe` or `PowerShell.exe`.

 Here are some examples of using `win_command` and `win_shell`:

 
```
- name: Run a command under PowerShell
  win_shell: Get-Service -Name service | Stop-Service

- name: Run a command under cmd
  win_shell: mkdir C:\temp
  args:
    executable: cmd.exe

- name: Run a multiple shell commands
  win_shell: |
    New-Item -Path C:\temp -ItemType Directory
    Remove-Item -Path C:\temp -Force -Recurse
    $path_info = Get-Item -Path C:\temp
    $path_info.FullName

- name: Run an executable using win_command
  win_command: whoami.exe

- name: Run a cmd command
  win_command: cmd.exe /c mkdir C:\temp

- name: Run a vbs script
  win_command: cscript.exe script.vbs

```
  Note

 Some commands like `mkdir`, `del`, and `copy` only exist in the CMD shell. To run them with `win_command` they must be prefixed with `cmd.exe /c`.

  #### Argument Rules

 When running a command through `win_command`, the standard Windows argument rules apply:

 * Each argument is delimited by a white space, which can either be a space or a tab.
* An argument can be surrounded by double quotes `"`. Anything inside these quotes is interpreted as a single argument even if it contains whitespace.
* A double quote preceded by a backslash `\` is interpreted as just a double quote `"` and not as an argument delimiter.
* Backslashes are interpreted literally unless it immediately precedes double quotes; for example `\` == `\` and `\"` == `"`
* If an even number of backslashes is followed by a double quote, one backslash is used in the argument for every pair, and the double quote is used as a string delimiter for the argument.
* If an odd number of backslashes is followed by a double quote, one backslash is used in the argument for every pair, and the double quote is escaped and made a literal double quote in the argument.

 With those rules in mind, here are some examples of quoting:

 
```
- win_command: C:\temp\executable.exe argument1 "argument 2" "C:\path\with space" "double \"quoted\""

argv[0] = C:\temp\executable.exe
argv[1] = argument1
argv[2] = argument 2
argv[3] = C:\path\with space
argv[4] = double "quoted"

- win_command: '"C:\Program Files\Program\program.exe" "escaped \\\" backslash" unquoted-end-backslash\'

argv[0] = C:\Program Files\Program\program.exe
argv[1] = escaped \" backslash
argv[2] = unquoted-end-backslash\

# Due to YAML and Ansible parsing '\"' must be written as '{% raw %}\\{% endraw %}"'
- win_command: C:\temp\executable.exe C:\no\space\path "arg with end \ before end quote{% raw %}\\{% endraw %}"

argv[0] = C:\temp\executable.exe
argv[1] = C:\no\space\path
argv[2] = arg with end \ before end quote\"

```
 For more information, see [escaping arguments](https://msdn.microsoft.com/en-us/library/17w5ykft(v=vs.85).aspx).

 ### Creating and Running a Scheduled Task

 WinRM has some restrictions in place that cause errors when running certain commands. One way to bypass these restrictions is to run a command through a scheduled task. A scheduled task is a Windows component that provides the ability to run an executable on a schedule and under a different account.

 Ansible version 2.5 added modules that make it easier to work with scheduled tasks in Windows. The following is an example of running a script as a scheduled task that deletes itself after running:

 
```
- name: Create scheduled task to run a process
  win_scheduled_task:
    name: adhoc-task
    username: SYSTEM
    actions:
    - path: PowerShell.exe
      arguments: |
        Start-Sleep -Seconds 30  # This isn't required, just here as a demonstration
        New-Item -Path C:\temp\test -ItemType Directory
    # Remove this action if the task shouldn't be deleted on completion
    - path: cmd.exe
      arguments: /c schtasks.exe /Delete /TN "adhoc-task" /F
    triggers:
    - type: registration

- name: Wait for the scheduled task to complete
  win_scheduled_task_stat:
    name: adhoc-task
  register: task_stat
  until: (task_stat.state is defined and task_stat.state.status != "TASK_STATE_RUNNING") or (task_stat.task_exists == False)
  retries: 12
  delay: 10

```
  Note

 The modules used in the above example were updated/added in Ansible version 2.5.

  Path Formatting for Windows
---------------------------

 Windows differs from a traditional POSIX operating system in many ways. One of the major changes is the shift from `/` as the path separator to `\`. This can cause major issues with how playbooks are written, since `\` is often used as an escape character on POSIX systems.

 Ansible allows two different styles of syntax; each deals with path separators for Windows differently:

 ### YAML Style

 When using the YAML syntax for tasks, the rules are well-defined by the YAML standard:

 * When using a normal string (without quotes), YAML will not consider the backslash an escape character.
* When using single quotes `'`, YAML will not consider the backslash an escape character.
* When using double quotes `"`, the backslash is considered an escape character and needs to escaped with another backslash.

  Note

 You should only quote strings when it is absolutely necessary or required by YAML, and then use single quotes.

  The YAML specification considers the following [escape sequences](https://yaml.org/spec/current.html#id2517668):

 * `\0`, `\\`, `\"`, `\_`, `\a`, `\b`, `\e`, `\f`, `\n`, `\r`, `\t`, `\v`, `\L`, `\N` and `\P` – Single character escape
* `<TAB>`, `<SPACE>`, `<NBSP>`, `<LNSP>`, `<PSP>` – Special characters
* `\x..` – 2-digit hex escape
* `\u....` – 4-digit hex escape
* `\U........` – 8-digit hex escape

 Here are some examples on how to write Windows paths:

 
```
# GOOD
tempdir: C:\Windows\Temp

# WORKS
tempdir: 'C:\Windows\Temp'
tempdir: "C:\\Windows\\Temp"

# BAD, BUT SOMETIMES WORKS
tempdir: C:\\Windows\\Temp
tempdir: 'C:\\Windows\\Temp'
tempdir: C:/Windows/Temp

```
 This is an example which will fail:

 
```
# FAILS
tempdir: "C:\Windows\Temp"

```
 This example shows the use of single quotes when they are required:

 
```
---
- name: Copy tomcat config
  win_copy:
    src: log4j.xml
    dest: '{{tc_home}}\lib\log4j.xml'

```
 ### Legacy key=value Style

 The legacy `key=value` syntax is used on the command line for ad hoc commands, or inside playbooks. The use of this style is discouraged within playbooks because backslash characters need to be escaped, making playbooks harder to read. The legacy syntax depends on the specific implementation in Ansible, and quoting (both single and double) does not have any effect on how it is parsed by Ansible.

 The Ansible key=value parser parse\_kv() considers the following escape sequences:

 * `\`, `'`, `"`, `\a`, `\b`, `\f`, `\n`, `\r`, `\t` and `\v` – Single character escape
* `\x..` – 2-digit hex escape
* `\u....` – 4-digit hex escape
* `\U........` – 8-digit hex escape
* `\N{...}` – Unicode character by name

 This means that the backslash is an escape character for some sequences, and it is usually safer to escape a backslash when in this form.

 Here are some examples of using Windows paths with the key=value style:

 
```
# GOOD
tempdir=C:\\Windows\\Temp

# WORKS
tempdir='C:\\Windows\\Temp'
tempdir="C:\\Windows\\Temp"

# BAD, BUT SOMETIMES WORKS
tempdir=C:\Windows\Temp
tempdir='C:\Windows\Temp'
tempdir="C:\Windows\Temp"
tempdir=C:/Windows/Temp

# FAILS
tempdir=C:\Windows\temp
tempdir='C:\Windows\temp'
tempdir="C:\Windows\temp"

```
 The failing examples don’t fail outright but will substitute `\t` with the `<TAB>` character resulting in `tempdir` being `C:\Windows<TAB>emp`.

 Limitations
-----------

 Some things you cannot do with Ansible and Windows are:

 * Upgrade PowerShell
* Interact with the WinRM listeners

 Because WinRM is reliant on the services being online and running during normal operations, you cannot upgrade PowerShell or interact with WinRM listeners with Ansible. Both of these actions will cause the connection to fail. This can technically be avoided by using `async` or a scheduled task, but those methods are fragile if the process it runs breaks the underlying connection Ansible uses, and are best left to the bootstrapping process or before an image is created.

 Developing Windows Modules
--------------------------

 Because Ansible modules for Windows are written in PowerShell, the development guides for Windows modules differ substantially from those for standard standard modules. Please see [Windows module development walkthrough](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_windows.html#developing-modules-general-windows) for more information.

  See also

  [Intro to playbooks](playbooks_intro#playbooks-intro)

An introduction to playbooks

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [List of Windows Modules](https://docs.ansible.com/ansible/2.9/modules/list_of_windows_modules.html#windows-modules "(in Ansible v2.9)")

Windows specific module list, all implemented in PowerShell

  [User Mailing List](https://groups.google.com/group/ansible-project)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/windows_usage.html>

Windows Frequently Asked Questions
==================================

 Here are some commonly asked questions in regards to Ansible and Windows and their answers.

  Note

 This document covers questions about managing Microsoft Windows servers with Ansible. For questions about Ansible Core, please see the [general FAQ page](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#ansible-faq).

  Does Ansible work with Windows XP or Server 2003?
-------------------------------------------------

 Ansible does not work with Windows XP or Server 2003 hosts. Ansible does work with these Windows operating system versions:

 * Windows Server 2008 1
* Windows Server 2008 R2 1
* Windows Server 2012
* Windows Server 2012 R2
* Windows Server 2016
* Windows Server 2019
* Windows 7 1
* Windows 8.1
* Windows 10

 1 - See the [Server 2008 FAQ](#windows-faq-server2008) entry for more details.

 Ansible also has minimum PowerShell version requirements - please see [Setting up a Windows Host](windows_setup#windows-setup) for the latest information.

 Are Server 2008, 2008 R2 and Windows 7 supported?
-------------------------------------------------

 Microsoft ended Extended Support for these versions of Windows on January 14th, 2020, and Ansible deprecated official support in the 2.10 release. No new feature development will occur targeting these operating systems, and automated testing has ceased. However, existing modules and features will likely continue to work, and simple pull requests to resolve issues with these Windows versions may be accepted.

 Can I manage Windows Nano Server with Ansible?
----------------------------------------------

 Ansible does not currently work with Windows Nano Server, since it does not have access to the full .NET Framework that is used by the majority of the modules and internal components.

 Can Ansible run on Windows?
---------------------------

 No, Ansible can only manage Windows hosts. Ansible cannot run on a Windows host natively, though it can run under the Windows Subsystem for Linux (WSL).

  Note

 The Windows Subsystem for Linux is not supported by Ansible and should not be used for production systems.

  To install Ansible on WSL, the following commands can be run in the bash terminal:

 
```
sudo apt-get update
sudo apt-get install python-pip git libffi-dev libssl-dev -y
pip install --user ansible pywinrm

```
 To run Ansible from source instead of a release on the WSL, simply uninstall the pip installed version and then clone the git repo.

 
```
pip uninstall ansible -y
git clone https://github.com/ansible/ansible.git
source ansible/hacking/env-setup

# To enable Ansible on login, run the following
echo ". ~/ansible/hacking/env-setup -q' >> ~/.bashrc

```
 If you encounter timeout errors when running Ansible on the WSL, this may be due to an issue with `sleep` not returning correctly. The following workaround may resolve the issue:

 
```
mv /usr/bin/sleep /usr/bin/sleep.orig
ln -s /bin/true /usr/bin/sleep

```
 Another option is to use WSL 2 if running Windows 10 later than build 2004.

 
```
wsl --set-default-version 2

```
 Can I use SSH keys to authenticate to Windows hosts?
----------------------------------------------------

 You cannot use SSH keys with the WinRM or PSRP connection plugins. These connection plugins use X509 certificates for authentication instead of the SSH key pairs that SSH uses.

 The way X509 certificates are generated and mapped to a user is different from the SSH implementation; consult the [Windows Remote Management](windows_winrm#windows-winrm) documentation for more information.

 Ansible 2.8 has added an experimental option to use the SSH connection plugin, which uses SSH keys for authentication, for Windows servers. See [this question](#windows-faq-ssh) for more information.

 Why can I run a command locally that does not work under Ansible?
-----------------------------------------------------------------

 Ansible executes commands through WinRM. These processes are different from running a command locally in these ways:

 * Unless using an authentication option like CredSSP or Kerberos with credential delegation, the WinRM process does not have the ability to delegate the user’s credentials to a network resource, causing `Access is
Denied` errors.
* All processes run under WinRM are in a non-interactive session. Applications that require an interactive session will not work.
* When running through WinRM, Windows restricts access to internal Windows APIs like the Windows Update API and DPAPI, which some installers and programs rely on.

 Some ways to bypass these restrictions are to:

 * Use `become`, which runs a command as it would when run locally. This will bypass most WinRM restrictions, as Windows is unaware the process is running under WinRM when `become` is used. See the [Understanding privilege escalation: become](become#become) documentation for more information.
* Use a scheduled task, which can be created with `win_scheduled_task`. Like `become`, it will bypass all WinRM restrictions, but it can only be used to run commands, not modules.
* Use `win_psexec` to run a command on the host. PSExec does not use WinRM and so will bypass any of the restrictions.
* To access network resources without any of these workarounds, you can use CredSSP or Kerberos with credential delegation enabled.

 See [Understanding privilege escalation: become](become#become) more info on how to use become. The limitations section at [Windows Remote Management](windows_winrm#windows-winrm) has more details around WinRM limitations.

 This program won’t install on Windows with Ansible
--------------------------------------------------

 See [this question](#windows-faq-winrm) for more information about WinRM limitations.

 What Windows modules are available?
-----------------------------------

 Most of the Ansible modules in Ansible Core are written for a combination of Linux/Unix machines and arbitrary web services. These modules are written in Python and most of them do not work on Windows.

 Because of this, there are dedicated Windows modules that are written in PowerShell and are meant to be run on Windows hosts. A list of these modules can be found [here](https://docs.ansible.com/ansible/2.9/modules/list_of_windows_modules.html#windows-modules "(in Ansible v2.9)").

 In addition, the following Ansible Core modules/action-plugins work with Windows:

 * add\_host
* assert
* async\_status
* debug
* fail
* fetch
* group\_by
* include
* include\_role
* include\_vars
* meta
* pause
* raw
* script
* set\_fact
* set\_stats
* setup
* slurp
* template (also: win\_template)
* wait\_for\_connection

 Can I run Python modules on Windows hosts?
------------------------------------------

 No, the WinRM connection protocol is set to use PowerShell modules, so Python modules will not work. A way to bypass this issue to use `delegate_to: localhost` to run a Python module on the Ansible controller. This is useful if during a playbook, an external service needs to be contacted and there is no equivalent Windows module available.

 Can I connect to Windows hosts over SSH?
----------------------------------------

 Ansible 2.8 has added an experimental option to use the SSH connection plugin to manage Windows hosts. To connect to Windows hosts over SSH, you must install and configure the [Win32-OpenSSH](https://github.com/PowerShell/Win32-OpenSSH) fork that is in development with Microsoft on the Windows host(s). While most of the basics should work with SSH, `Win32-OpenSSH` is rapidly changing, with new features added and bugs fixed in every release. It is highly recommend you [install](https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH) the latest release of `Win32-OpenSSH` from the GitHub Releases page when using it with Ansible on Windows hosts.

 To use SSH as the connection to a Windows host, set the following variables in the inventory:

 
```
ansible_connection=ssh

# Set either cmd or powershell not both
ansible_shell_type=cmd
# ansible_shell_type=powershell

```
 The value for `ansible_shell_type` should either be `cmd` or `powershell`. Use `cmd` if the `DefaultShell` has not been configured on the SSH service and `powershell` if that has been set as the `DefaultShell`.

 Why is connecting to a Windows host via SSH failing?
----------------------------------------------------

 Unless you are using `Win32-OpenSSH` as described above, you must connect to Windows hosts using [Windows Remote Management](windows_winrm#windows-winrm). If your Ansible output indicates that SSH was used, either you did not set the connection vars properly or the host is not inheriting them correctly.

 Make sure `ansible_connection: winrm` is set in the inventory for the Windows host(s).

 Why are my credentials being rejected?
--------------------------------------

 This can be due to a myriad of reasons unrelated to incorrect credentials.

 See HTTP 401/Credentials Rejected at [Setting up a Windows Host](windows_setup#windows-setup) for a more detailed guide of this could mean.

 Why am I getting an error SSL CERTIFICATE\_VERIFY\_FAILED?
----------------------------------------------------------

 When the Ansible controller is running on Python 2.7.9+ or an older version of Python that has backported SSLContext (like Python 2.7.5 on RHEL 7), the controller will attempt to validate the certificate WinRM is using for an HTTPS connection. If the certificate cannot be validated (such as in the case of a self signed cert), it will fail the verification process.

 To ignore certificate validation, add `ansible_winrm_server_cert_validation: ignore` to inventory for the Windows host.

  See also

  [Windows Guides](windows#windows)

The Windows documentation index

  [Intro to playbooks](playbooks_intro#about-playbooks)

An introduction to playbooks

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [User Mailing List](https://groups.google.com/group/ansible-project)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/windows_faq.html>

ansible.builtin.dnf – Manages packages with the dnf package manager
===================================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `dnf` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 1.9: of ansible.builtin

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * Installs, upgrade, removes, and lists packages and groups with the *dnf* package manager.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * python >= 2.6
* python-dnf
* for the autoremove option you need dnf >= 2.0.1”

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_downgrade**  boolean   added in 2.7 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Specify if the named package and version is allowed to downgrade a maybe already installed higher version of that package. Note that setting allow\_downgrade=True can make this module behave in a non-idempotent way. The task could end up with a set of packages that does not match the complete list of specified packages to install (because dependencies between the downgraded package and others can cause changes to the packages which were in the earlier transaction). |
| **allowerasing**  boolean   added in 2.10 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | If `yes` it allows erasing of installed packages to resolve dependencies. |
| **autoremove**  boolean   added in 2.4 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | If `yes`, removes all "leaf" packages from the system that were originally installed as dependencies of user-installed packages but which are no longer required by any such package. Should be used alone or when state is *absent*
 |
| **bugfix**  boolean   added in 2.7 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | If set to `yes`, and `state=latest` then only installs updates that have been marked bugfix related. Note that, similar to ``dnf upgrade-minimal``, this filter applies to dependencies as well. |
| **conf\_file**  string  |  | The remote dnf configuration file to use for the transaction. |
| **disable\_excludes**  string   added in 2.7 of ansible.builtin  |  | Disable the excludes defined in DNF config files. If set to `all`, disables all excludes. If set to `main`, disable excludes defined in [main] in dnf.conf. If set to `repoid`, disable excludes defined for given repo id. |
| **disable\_gpg\_check**  boolean  | **Choices:*** **no** ←
* yes
 | Whether to disable the GPG checking of signatures of packages being installed. Has an effect only if state is *present* or *latest*. This setting affects packages installed from a repository as well as "local" packages installed from the filesystem or a URL. |
| **disable\_plugin**  list / elements=string   added in 2.7 of ansible.builtin  |  | 
*Plugin* name to disable for the install/update operation. The disabled plugins will not persist beyond the transaction. |
| **disablerepo**  list / elements=string  |  | 
*Repoid* of repositories to disable for the install/update operation. These repos will not persist beyond the transaction. When specifying multiple repos, separate them with a ",". |
| **download\_dir**  string   added in 2.8 of ansible.builtin  |  | Specifies an alternate directory to store packages. Has an effect only if *download\_only* is specified. |
| **download\_only**  boolean   added in 2.7 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Only download the packages, do not install them. |
| **enable\_plugin**  list / elements=string   added in 2.7 of ansible.builtin  |  | 
*Plugin* name to enable for the install/update operation. The enabled plugin will not persist beyond the transaction. |
| **enablerepo**  list / elements=string  |  | 
*Repoid* of repositories to enable for the install/update operation. These repos will not persist beyond the transaction. When specifying multiple repos, separate them with a ",". |
| **exclude**  list / elements=string   added in 2.7 of ansible.builtin  |  | Package name(s) to exclude when state=present, or latest. This can be a list or a comma separated string. |
| **install\_repoquery**  boolean   added in 2.7 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | This is effectively a no-op in DNF as it is not needed with DNF, but is an accepted parameter for feature parity/compatibility with the *yum* module. |
| **install\_weak\_deps**  boolean   added in 2.8 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | Will also install all packages linked by a weak dependency relation. |
| **installroot**  string   added in 2.3 of ansible.builtin  | **Default:**"/" | Specifies an alternative installroot, relative to which all packages will be installed. |
| **list**  string  |  | Various (non-idempotent) commands for usage with `/usr/bin/ansible` and *not* playbooks. See examples. |
| **lock\_timeout**  integer   added in 2.8 of ansible.builtin  | **Default:**30 | Amount of time to wait for the dnf lockfile to be freed. |
| **name**  list / elements=string / required  |  | A package name or package specifier with version, like `name-1.0`. When using state=latest, this can be '\*' which means run: dnf -y update. You can also pass a url or a local path to a rpm file. To operate on several packages this can accept a comma separated string of packages or a list of packages. Comparison operators for package version are valid here `>`, `<`, `>=`, `<=`. Example - `name>=1.0`
 
aliases: pkg |
| **nobest**  boolean   added in 2.11 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Set best option to False, so that transactions are not limited to best candidates only. |
| **releasever**  string   added in 2.6 of ansible.builtin  |  | Specifies an alternative release from which all packages will be installed. |
| **security**  boolean   added in 2.7 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | If set to `yes`, and `state=latest` then only installs updates that have been marked security related. Note that, similar to ``dnf upgrade-minimal``, this filter applies to dependencies as well. |
| **skip\_broken**  boolean   added in 2.7 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Skip packages with broken dependencies(devsolve) and are causing problems. |
| **state**  string  | **Choices:*** absent
* present
* installed
* removed
* latest
 | Whether to install (`present`, `latest`), or remove (`absent`) a package. Default is `None`, however in effect the default action is `present` unless the `autoremove` option is enabled for this module, then `absent` is inferred. |
| **update\_cache**  boolean   added in 2.7 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Force dnf to check if cache is out of date and redownload if needed. Has an effect only if state is *present* or *latest*. 
aliases: expire-cache |
| **update\_only**  boolean   added in 2.7 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | When using latest, only update installed packages. Do not install packages. Has an effect only if state is *latest*
 |
| **validate\_certs**  boolean   added in 2.7 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | This only applies if using a https url as the source of the rpm. e.g. for localinstall. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates as it avoids verifying the source site. |

   
 Notes
-----

  Note

 * When used with a `loop:` each package will be processed individually, it is much more efficient to pass the list directly to the `name` option.
* Group removal doesn’t work if the group was installed with Ansible because upstream dnf’s API doesn’t properly mark groups as installed, therefore upon removal the module is unable to detect that the group is installed (<https://bugzilla.redhat.com/show_bug.cgi?id=1620324>)

  Examples
--------

 
```
- name: Install the latest version of Apache
  dnf:
    name: httpd
    state: latest

- name: Install Apache >= 2.4
  dnf:
    name: httpd>=2.4
    state: present

- name: Install the latest version of Apache and MariaDB
  dnf:
    name:
      - httpd
      - mariadb-server
    state: latest

- name: Remove the Apache package
  dnf:
    name: httpd
    state: absent

- name: Install the latest version of Apache from the testing repo
  dnf:
    name: httpd
    enablerepo: testing
    state: present

- name: Upgrade all packages
  dnf:
    name: "*"
    state: latest

- name: Install the nginx rpm from a remote repo
  dnf:
    name: 'http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm'
    state: present

- name: Install nginx rpm from a local file
  dnf:
    name: /usr/local/src/nginx-release-centos-6-0.el6.ngx.noarch.rpm
    state: present

- name: Install the 'Development tools' package group
  dnf:
    name: '@Development tools'
    state: present

- name: Autoremove unneeded packages installed as dependencies
  dnf:
    autoremove: yes

- name: Uninstall httpd but keep its dependencies
  dnf:
    name: httpd
    state: absent
    autoremove: no

- name: Install a modularity appstream with defined stream and profile
  dnf:
    name: '@postgresql:9.6/client'
    state: present

- name: Install a modularity appstream with defined stream
  dnf:
    name: '@postgresql:9.6'
    state: present

- name: Install a modularity appstream with defined profile
  dnf:
    name: '@postgresql/client'
    state: present

```
 ### Authors

 * Igor Gnatenko (@ignatenkobrain) <[i.gnatenko.brain@gmail.com](https://docs.ansible.com/cdn-cgi/l/email-protection#f099d6d3c4c6cb979e9184959e9b9fd6d3c4c6cb928291999ed6d3c3c7cbd6d3c5c2cbd6d3c4c8cb979d91999cd6d3c4c6cb939f9d)>
* Cristian van Ee (@DJMuggs) <cristian at cvee.org>
* Berend De Schouwer (@berenddeschouwer)
* Adam Miller (@maxamillion) <[admiller@redhat.com](https://docs.ansible.com/cdn-cgi/l/email-protection#88e9ece5e1e4e4edfaaeabbbbfb3aeabbdbab3aeabbcb0b3faedece0e9fcaeabbcbeb3ebe7e5)>



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/dnf_module.html>

vyos.vyos.vyos\_config – Manage VyOS configuration on remote device
===================================================================

  Note

 This plugin is part of the [vyos.vyos collection](https://galaxy.ansible.com/vyos/vyos) (version 2.6.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install vyos.vyos`.

 To use it in a playbook, specify: `vyos.vyos.vyos_config`.

   New in version 1.0.0: of vyos.vyos

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * This module provides configuration file management of VyOS devices. It provides arguments for managing both the configuration file and state of the active configuration. All configuration statements are based on `set` and `delete` commands in the device configuration.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **backup**  boolean  | **Choices:*** **no** ←
* yes
 | The `backup` argument will backup the current devices active configuration to the Ansible control host prior to making any changes. If the `backup_options` value is not given, the backup file will be located in the backup folder in the playbook root directory or role root directory, if playbook is part of an ansible role. If the directory does not exist, it is created. |
| **backup\_options**  dictionary  |  | This is a dict object containing configurable options related to backup file path. The value of this option is read only when `backup` is set to *yes*, if `backup` is set to *no* this option will be silently ignored. |
|  | **dir\_path**  path  |  | This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of `filename` or default filename as described in `filename` options description. If the path value is not given in that case a *backup* directory will be created in the current working directory and backup configuration will be copied in `filename` within *backup* directory. |
|  | **filename**  string  |  | The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by <hostname>\_config.<current-date>@<current-time> |
| **comment**  string  | **Default:**"configured by vyos\_config" | Allows a commit description to be specified to be included when the configuration is committed. If the configuration is not changed or committed, this argument is ignored. |
| **config**  string  |  | The `config` argument specifies the base configuration to use to compare against the desired configuration. If this value is not specified, the module will automatically retrieve the current active configuration from the remote device. The configuration lines in the option value should be similar to how it will appear if present in the running-configuration of the device including indentation to ensure idempotency and correct diff. |
| **lines**  list / elements=string  |  | The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config as found in the device running-config to ensure idempotency and correct diff. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser. |
| **match**  string  | **Choices:*** **line** ←
* none
 | The `match` argument controls the method used to match against the current active configuration. By default, the desired config is matched against the active config and the deltas are loaded. If the `match` argument is set to `none` the active configuration is ignored and the configuration is always loaded. |
| **provider**  dictionary  |  | **Deprecated** Starting with Ansible 2.5 we recommend using `connection: network_cli`. For more information please see the [Network Guide](../network/getting_started/network_differences#multiple-communication-protocols). A dict object containing connection details. |
|  | **host**  string  |  | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
|  | **password**  string  |  | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
|  | **port**  integer  |  | Specifies the port to use when building the connection to the remote device. |
|  | **ssh\_keyfile**  path  |  | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
|  | **timeout**  integer  |  | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
|  | **username**  string  |  | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
| **save**  boolean  | **Choices:*** **no** ←
* yes
 | The `save` argument controls whether or not changes made to the active configuration are saved to disk. This is independent of committing the config. When set to True, the active configuration is saved. |
| **src**  path  |  | The `src` argument specifies the path to the source config file to load. The source config file can either be in bracket format or set format. The source file can include Jinja2 template variables. The configuration lines in the source file should be similar to how it will appear if present in the running-configuration of the device including indentation to ensure idempotency and correct diff. |

   
 Notes
-----

  Note

 * Tested against VyOS 1.1.8 (helium).
* This module works with connection `network_cli`. See [the VyOS OS Platform Options](../network/user_guide/platform_vyos).
* To ensure idempotency and correct diff the configuration lines in the relevant module options should be similar to how they appear if present in the running configuration on device including the indentation.
* For more information on using Ansible to manage network devices see the [Ansible Network Guide](../../../network/index#network-guide)

  Examples
--------

 
```
- name: configure the remote device
  vyos.vyos.vyos_config:
    lines:
    - set system host-name {{ inventory_hostname }}
    - set service lldp
    - delete service dhcp-server

- name: backup and load from file
  vyos.vyos.vyos_config:
    src: vyos.cfg
    backup: yes

- name: render a Jinja2 template onto the VyOS router
  vyos.vyos.vyos_config:
    src: vyos_template.j2

- name: for idempotency, use full-form commands
  vyos.vyos.vyos_config:
    lines:
      # - set int eth eth2 description 'OUTSIDE'
    - set interface ethernet eth2 description 'OUTSIDE'

- name: configurable backup path
  vyos.vyos.vyos_config:
    backup: yes
    backup_options:
      filename: backup.cfg
      dir_path: /home/user

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **backup\_path**  string  | when backup is yes | The full path to the backup file  **Sample:** /playbooks/ansible/backup/vyos\_config.2016-07-16@22:28:34 |
| **commands**  list / elements=string  | always | The list of configuration commands sent to the device  **Sample:** ['...', '...'] |
| **date**  string  | when backup is yes | The date extracted from the backup file name  **Sample:** 2016-07-16 |
| **filename**  string  | when backup is yes and filename is not specified in backup options | The name of the backup file  **Sample:** vyos\_config.2016-07-16@22:28:34 |
| **filtered**  list / elements=string  | always | The list of configuration commands removed to avoid a load failure  **Sample:** ['...', '...'] |
| **shortname**  string  | when backup is yes and filename is not specified in backup options | The full path to the backup file excluding the timestamp  **Sample:** /playbooks/ansible/backup/vyos\_config |
| **time**  string  | when backup is yes | The time extracted from the backup file name  **Sample:** 22:28:34 |

   
  
 ### Authors

 * Nathaniel Case (@Qalthos)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/vyos/vyos/vyos_config_module.html>

ansible.builtin.raw – Executes a low-down and dirty command
===========================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `raw` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Executes a low-down and dirty SSH command, not going through the module subsystem.
* This is useful and should only be done in a few cases. A common case is installing `python` on a system without python installed by default. Another is speaking to any devices such as routers that do not have any Python installed. In any other case, using the [ansible.builtin.shell](shell_module#ansible-collections-ansible-builtin-shell-module) or [ansible.builtin.command](command_module#ansible-collections-ansible-builtin-command-module) module is much more appropriate.
* Arguments given to `raw` are run directly through the configured remote shell.
* Standard output, error output and return code are returned when available.
* There is no change handler support for this module.
* This module does not require python on the remote system, much like the [ansible.builtin.script](script_module#ansible-collections-ansible-builtin-script-module) module.
* This module is also supported for Windows targets.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **executable**  string   added in 1.0 of ansible.builtin  |  | Change the shell used to execute the command. Should be an absolute path to the executable. When using privilege escalation (`become`) a default shell will be assigned if one is not provided as privilege escalation requires a shell. |
| **free\_form**  string / required  |  | The raw module takes a free form command to run. There is no parameter actually named 'free form'; see the examples! |

   
 Notes
-----

  Note

 * If using raw from a playbook, you may need to disable fact gathering using `gather_facts: no` if you’re using `raw` to bootstrap python onto the machine.
* If you want to execute a command securely and predictably, it may be better to use the [ansible.builtin.command](command_module#ansible-collections-ansible-builtin-command-module) or [ansible.builtin.shell](shell_module#ansible-collections-ansible-builtin-shell-module) modules instead.
* The `environment` keyword does not work with raw normally, it requires a shell which means it only works if `executable` is set or using the module with privilege escalation (`become`).
* This module is also supported for Windows targets.

  See Also
--------

  See also

  [ansible.builtin.command](command_module#ansible-collections-ansible-builtin-command-module)

The official documentation on the **ansible.builtin.command** module.

  [ansible.builtin.shell](shell_module#ansible-collections-ansible-builtin-shell-module)

The official documentation on the **ansible.builtin.shell** module.

  [ansible.windows.win\_command](../windows/win_command_module#ansible-collections-ansible-windows-win-command-module)

The official documentation on the **ansible.windows.win\_command** module.

  [ansible.windows.win\_shell](../windows/win_shell_module#ansible-collections-ansible-windows-win-shell-module)

The official documentation on the **ansible.windows.win\_shell** module.

    Examples
--------

 
```
- name: Bootstrap a host without python2 installed
  raw: dnf install -y python2 python2-dnf libselinux-python

- name: Run a command that uses non-posix shell-isms (in this example /bin/sh doesn't handle redirection and wildcards together but bash does)
  raw: cat < /tmp/*txt
  args:
    executable: /bin/bash

- name: Safely use templated variables. Always use quote filter to avoid injection issues.
  raw: "{{ package_mgr|quote }} {{ pkg_flags|quote }} install {{ python|quote }}"

- name: List user accounts on a Windows system
  raw: Get-WmiObject -Class Win32_UserAccount

```
 ### Authors

 * Ansible Core Team
* Michael DeHaan



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/raw_module.html>

ansible.builtin.script – Runs a local script on a remote node after transferring it
===================================================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `script` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 0.9: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * The `script` module takes the script name followed by a list of space-delimited arguments.
* Either a free form command or `cmd` parameter is required, see the examples.
* The local script at path will be transferred to the remote node and then executed.
* The given script will be processed through the shell environment on the remote node.
* This module does not require python on the remote system, much like the [ansible.builtin.raw](raw_module#ansible-collections-ansible-builtin-raw-module) module.
* This module is also supported for Windows targets.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **chdir**  string   added in 2.4 of ansible.builtin  |  | Change into this directory on the remote node before running the script. |
| **cmd**  string  |  | Path to the local script to run followed by optional arguments. |
| **creates**  string   added in 1.5 of ansible.builtin  |  | A filename on the remote node, when it already exists, this step will **not** be run. |
| **decrypt**  boolean   added in 2.4 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | This option controls the autodecryption of source files using vault. |
| **executable**  string   added in 2.6 of ansible.builtin  |  | Name or path of a executable to invoke the script with. |
| **free\_form**  string  |  | Path to the local script file followed by optional arguments. |
| **removes**  string   added in 1.5 of ansible.builtin  |  | A filename on the remote node, when it does not exist, this step will **not** be run. |

   
 Notes
-----

  Note

 * It is usually preferable to write Ansible modules rather than pushing scripts. Convert your script to an Ansible module for bonus points!
* The `ssh` connection plugin will force pseudo-tty allocation via `-tt` when scripts are executed. Pseudo-ttys do not have a stderr channel and all stderr is sent to stdout. If you depend on separated stdout and stderr result keys, please switch to a copy+command set of tasks instead of using script.
* If the path to the local script contains spaces, it needs to be quoted.
* This module is also supported for Windows targets.
* Does not support `check_mode`.

  See Also
--------

  See also

  [ansible.builtin.shell](shell_module#ansible-collections-ansible-builtin-shell-module)

The official documentation on the **ansible.builtin.shell** module.

  [ansible.windows.win\_shell](../windows/win_shell_module#ansible-collections-ansible-windows-win-shell-module)

The official documentation on the **ansible.windows.win\_shell** module.

    Examples
--------

 
```
- name: Run a script with arguments (free form)
  ansible.builtin.script: /some/local/script.sh --some-argument 1234

- name: Run a script with arguments (using 'cmd' parameter)
  ansible.builtin.script:
    cmd: /some/local/script.sh --some-argument 1234

- name: Run a script only if file.txt does not exist on the remote node
  ansible.builtin.script: /some/local/create_file.sh --some-argument 1234
  args:
    creates: /the/created/file.txt

- name: Run a script only if file.txt exists on the remote node
  ansible.builtin.script: /some/local/remove_file.sh --some-argument 1234
  args:
    removes: /the/removed/file.txt

- name: Run a script using an executable in a non-system path
  ansible.builtin.script: /some/local/script
  args:
    executable: /some/remote/executable

- name: Run a script using an executable in a system path
  ansible.builtin.script: /some/local/script.py
  args:
    executable: python3

```
 ### Authors

 * Ansible Core Team
* Michael DeHaan



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/script_module.html>

vyos.vyos.vyos\_facts – Get facts about vyos devices.
=====================================================

  Note

 This plugin is part of the [vyos.vyos collection](https://galaxy.ansible.com/vyos/vyos) (version 2.6.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install vyos.vyos`.

 To use it in a playbook, specify: `vyos.vyos.vyos_facts`.

   New in version 1.0.0: of vyos.vyos

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Collects facts from network devices running the vyos operating system. This module places the facts gathered in the fact tree keyed by the respective resource name. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **available\_network\_resources**  boolean  | **Choices:*** **no** ←
* yes
 | When 'True' a list of network resources for which resource modules are available will be provided. |
| **gather\_network\_resources**  list / elements=string  |  | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all and the resources like interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial `M(!`) to specify that a specific subset should not be collected. Valid subsets are 'all', 'interfaces', 'l3\_interfaces', 'lag\_interfaces', 'lldp\_global', 'lldp\_interfaces', 'static\_routes', 'firewall\_rules', 'firewall\_global', 'firewall\_interfaces', 'ospfv3', 'ospfv2'. |
| **gather\_subset**  list / elements=string  | **Default:**"!config" | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, default, config, and neighbors. Can specify a list of values to include a larger subset. Values can also be used with an initial `M(!`) to specify that a specific subset should not be collected. |
| **provider**  dictionary  |  | **Deprecated** Starting with Ansible 2.5 we recommend using `connection: network_cli`. For more information please see the [Network Guide](../network/getting_started/network_differences#multiple-communication-protocols). A dict object containing connection details. |
|  | **host**  string  |  | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
|  | **password**  string  |  | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
|  | **port**  integer  |  | Specifies the port to use when building the connection to the remote device. |
|  | **ssh\_keyfile**  path  |  | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
|  | **timeout**  integer  |  | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
|  | **username**  string  |  | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |

   
 Notes
-----

  Note

 * Tested against VyOS 1.1.8 (helium).
* This module works with connection `network_cli`. See [the VyOS OS Platform Options](../network/user_guide/platform_vyos).
* For more information on using Ansible to manage network devices see the [Ansible Network Guide](../../../network/index#network-guide)

  Examples
--------

 
```
# Gather all facts
- vyos.vyos.vyos_facts:
    gather_subset: all
    gather_network_resources: all

# collect only the config and default facts
- vyos.vyos.vyos_facts:
    gather_subset: config

# collect everything exception the config
- vyos.vyos.vyos_facts:
    gather_subset: '!config'

# Collect only the interfaces facts
- vyos.vyos.vyos_facts:
    gather_subset:
    - '!all'
    - '!min'
    gather_network_resources:
    - interfaces

# Do not collect interfaces facts
- vyos.vyos.vyos_facts:
    gather_network_resources:
    - '!interfaces'

# Collect interfaces and minimal default facts
- vyos.vyos.vyos_facts:
    gather_subset: min
    gather_network_resources: interfaces

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_net\_api**  string  | always | The name of the transport  |
| **ansible\_net\_commits**  list / elements=string  | when present | The set of available configuration revisions  |
| **ansible\_net\_config**  string  | when config is configured | The running-config from the device  |
| **ansible\_net\_gather\_network\_resources**  list / elements=string  | always | The list of fact resource subsets collected from the device  |
| **ansible\_net\_gather\_subset**  list / elements=string  | always | The list of subsets gathered by the module  |
| **ansible\_net\_hostname**  string  | always | The configured system hostname  |
| **ansible\_net\_model**  string  | always | The device model string  |
| **ansible\_net\_neighbors**  list / elements=string  | when interface is configured | The set of LLDP neighbors  |
| **ansible\_net\_python\_version**  string  | always | The Python version Ansible controller is using  |
| **ansible\_net\_serialnum**  string  | always | The serial number of the device  |
| **ansible\_net\_version**  string  | always | The version of the software running  |

   
  
 ### Authors

 * Nathaniel Case (@qalthos)
* Nilashish Chakraborty (@Nilashishc)
* Rohit Thakur (@rohitthakur2590)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/vyos/vyos/vyos_facts_module.html>

ansible.netcommon.network\_cli – Use network\_cli to run command on network appliances
======================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.network_cli`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)

 Synopsis
--------

 * This connection plugin provides a connection to remote devices over the SSH and implements a CLI shell. This connection plugin is typically used by network devices for sending and receiving CLi commands to network devices.

 Requirements
------------

 The below requirements are needed on the local controller node that executes this connection.

 * ansible-pylibssh if using *ssh\_type=libssh*

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **become**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [privilege\_escalation]become = no    env:ANSIBLE\_BECOME   var: ansible\_become  | The become option will instruct the CLI session to attempt privilege escalation on platforms that support it. Normally this means transitioning from user mode to `enable` mode in the CLI session. If become is set to True and the remote device does not support privilege escalation or the privilege has already been elevated, then this option is silently ignored. Can be configured from the CLI via the `--become` or `-b` options. |
| **become\_method**  string  | **Default:**"sudo" |  ini entries:  [privilege\_escalation]become\_method = sudo    env:ANSIBLE\_BECOME\_METHOD   var: ansible\_become\_method  | This option allows the become method to be specified in for handling privilege escalation. Typically the become\_method value is set to `enable` but could be defined as other values. |
| **host**  string  | **Default:**"inventory\_hostname" |  var: ansible\_host  | Specifies the remote device FQDN or IP address to establish the SSH connection to. |
| **host\_key\_auto\_add**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [paramiko\_connection]host\_key\_auto\_add = no    env:ANSIBLE\_HOST\_KEY\_AUTO\_ADD  | By default, Ansible will prompt the user before adding SSH keys to the known hosts file. Since persistent connections such as network\_cli run in background processes, the user will never be prompted. By enabling this option, unknown host keys will automatically be added to the known hosts file. Be sure to fully understand the security implications of enabling this option on production systems as it could create a security vulnerability. |
| **host\_key\_checking**  boolean  | **Choices:*** no
* **yes** ←
 |  ini entries:  [defaults]host\_key\_checking = yes   [persistent\_connection]host\_key\_checking = yes    env:ANSIBLE\_HOST\_KEY\_CHECKING   env:ANSIBLE\_SSH\_HOST\_KEY\_CHECKING   var: ansible\_host\_key\_checking   var: ansible\_ssh\_host\_key\_checking  | Set this to "False" if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host |
| **import\_modules**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [ansible\_network]import\_modules = no    env:ANSIBLE\_NETWORK\_IMPORT\_MODULES   var: ansible\_network\_import\_modules  | Reduce CPU usage and network module execution time by enabling direct execution. Instead of the module being packaged and executed by the shell, it will be directly executed by the Ansible control node using the same python interpreter as the Ansible process. Note- Incompatible with `asynchronous mode`. Note- Python 3 and Ansible 2.9.16 or greater required. Note- With Ansible 2.9.x fully qualified modules names are required in tasks. |
| **network\_cli\_retries**  integer  | **Default:**3 |  ini entries:  [persistent\_connection]network\_cli\_retries = 3    env:ANSIBLE\_NETWORK\_CLI\_RETRIES   var: ansible\_network\_cli\_retries  | Number of attempts to connect to remote host. The delay time between the retires increases after every attempt by power of 2 in seconds till either the maximum attempts are exhausted or any of the `persistent_command_timeout` or `persistent_connect_timeout` timers are triggered. |
| **network\_os**  string  |  |  var: ansible\_network\_os  | Configures the device platform network operating system. This value is used to load the correct terminal and cliconf plugins to communicate with the remote device. |
| **password**  string  |  |  var: ansible\_password   var: ansible\_ssh\_pass   var: ansible\_ssh\_password  | Configures the user password used to authenticate to the remote device when first establishing the SSH connection. |
| **persistent\_buffer\_read\_timeout**  float  | **Default:**0.1 |  ini entries:  [persistent\_connection]buffer\_read\_timeout = 0.1    env:ANSIBLE\_PERSISTENT\_BUFFER\_READ\_TIMEOUT   var: ansible\_buffer\_read\_timeout  | Configures, in seconds, the amount of time to wait for the data to be read from Paramiko channel after the command prompt is matched. This timeout value ensures that command prompt matched is correct and there is no more data left to be received from remote host. |
| **persistent\_command\_timeout**  integer  | **Default:**30 |  ini entries:  [persistent\_connection]command\_timeout = 30    env:ANSIBLE\_PERSISTENT\_COMMAND\_TIMEOUT   var: ansible\_command\_timeout  | Configures, in seconds, the amount of time to wait for a command to return from the remote device. If this timer is exceeded before the command returns, the connection plugin will raise an exception and close. |
| **persistent\_connect\_timeout**  integer  | **Default:**30 |  ini entries:  [persistent\_connection]connect\_timeout = 30    env:ANSIBLE\_PERSISTENT\_CONNECT\_TIMEOUT   var: ansible\_connect\_timeout  | Configures, in seconds, the amount of time to wait when trying to initially establish a persistent connection. If this value expires before the connection to the remote device is completed, the connection will fail. |
| **persistent\_log\_messages**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [persistent\_connection]log\_messages = no    env:ANSIBLE\_PERSISTENT\_LOG\_MESSAGES   var: ansible\_persistent\_log\_messages  | This flag will enable logging the command executed and response received from target device in the ansible log file. For this option to work 'log\_path' ansible configuration option is required to be set to a file path with write access. Be sure to fully understand the security implications of enabling this option as it could create a security vulnerability by logging sensitive information in log file. |
| **port**  integer  | **Default:**22 |  ini entries:  [defaults]remote\_port = 22    env:ANSIBLE\_REMOTE\_PORT   var: ansible\_port  | Specifies the port on the remote device that listens for connections when establishing the SSH connection. |
| **private\_key\_file**  string  |  |  ini entries:  [defaults]private\_key\_file = None    env:ANSIBLE\_PRIVATE\_KEY\_FILE   var: ansible\_private\_key\_file  | The private SSH key or certificate file used to authenticate to the remote device when first establishing the SSH connection. |
| **remote\_user**  string  |  |  ini entries:  [defaults]remote\_user = None    env:ANSIBLE\_REMOTE\_USER   var: ansible\_user  | The username used to authenticate to the remote device when the SSH connection is first established. If the remote\_user is not specified, the connection will use the username of the logged in user. Can be configured from the CLI via the `--user` or `-u` options. |
| **single\_user\_mode**  boolean   added in 2.0.0 of ansible.netcommon  | **Choices:*** **no** ←
* yes
 |  env:ANSIBLE\_NETWORK\_SINGLE\_USER\_MODE   var: ansible\_network\_single\_user\_mode  | This option enables caching of data fetched from the target for re-use. The cache is invalidated when the target device enters configuration mode. Applicable only for platforms where this has been implemented. |
| **ssh\_type**  string  | **Default:**"paramiko" |  ini entries:  [persistent\_connection]ssh\_type = paramiko    env:ANSIBLE\_NETWORK\_CLI\_SSH\_TYPE   var: ansible\_network\_cli\_ssh\_type  | The type of the transport used by `network_cli` connection plugin to connection to remote host. Valid value is either *paramiko* or *libssh*
 In order to use *libssh*, the ansible-pylibssh package needs to be installed |
| **terminal\_inital\_prompt\_newline**  boolean  | **Choices:*** no
* **yes** ←
 |  var: ansible\_terminal\_initial\_prompt\_newline  | This boolean flag, that when set to *True* will send newline in the response if any of values in *terminal\_initial\_prompt* is matched. |
| **terminal\_initial\_answer**  list / elements=string  |  |  var: ansible\_terminal\_initial\_answer  | The answer to reply with if the `terminal_initial_prompt` is matched. The value can be a single answer or a list of answers for multiple terminal\_initial\_prompt. In case the login menu has multiple prompts the sequence of the prompt and excepted answer should be in same order and the value of *terminal\_prompt\_checkall* should be set to *True* if all the values in `terminal_initial_prompt` are expected to be matched and set to *False* if any one login prompt is to be matched. |
| **terminal\_initial\_prompt**  list / elements=string  |  |  var: ansible\_terminal\_initial\_prompt  | A single regex pattern or a sequence of patterns to evaluate the expected prompt at the time of initial login to the remote host. |
| **terminal\_initial\_prompt\_checkall**  boolean  | **Choices:*** **no** ←
* yes
 |  var: ansible\_terminal\_initial\_prompt\_checkall  | By default the value is set to *False* and any one of the prompts mentioned in `terminal_initial_prompt` option is matched it won't check for other prompts. When set to *True* it will check for all the prompts mentioned in `terminal_initial_prompt` option in the given order and all the prompts should be received from remote host if not it will result in timeout. |
| **terminal\_stderr\_re**  list / elements=dictionary  |  |  var: ansible\_terminal\_stderr\_re  | This option provides the regex pattern and optional flags to match the error string from the received response chunk. This option accepts `pattern` and `flags` keys. The value of `pattern` is a python regex pattern to match the response and the value of `flags` is the value accepted by *flags* argument of *re.compile* python method to control the way regex is matched with the response, for example *'re.I'*. |
| **terminal\_stdout\_re**  list / elements=dictionary  |  |  var: ansible\_terminal\_stdout\_re  | A single regex pattern or a sequence of patterns along with optional flags to match the command prompt from the received response chunk. This option accepts `pattern` and `flags` keys. The value of `pattern` is a python regex pattern to match the response and the value of `flags` is the value accepted by *flags* argument of *re.compile* python method to control the way regex is matched with the response, for example *'re.I'*. |

   
 ### Authors

 * Ansible Networking Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/network_cli_connection.html>

arista.eos.eos\_config – Manage Arista EOS configuration sections
=================================================================

  Note

 This plugin is part of the [arista.eos collection](https://galaxy.ansible.com/arista/eos) (version 2.2.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install arista.eos`.

 To use it in a playbook, specify: `arista.eos.eos_config`.

   New in version 1.0.0: of arista.eos

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Arista EOS configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with EOS configuration sections in a deterministic way. This module works with either CLI or eAPI transports.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **after**  list / elements=string  |  | The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with *before* this allows the playbook designer to append a set of commands to be executed after the command set. |
| **backup**  boolean  | **Choices:*** **no** ←
* yes
 | This argument will cause the module to create a full backup of the current `running-config` from the remote device before any changes are made. If the `backup_options` value is not given, the backup file is written to the `backup` folder in the playbook root directory or role root directory, if playbook is part of an ansible role. If the directory does not exist, it is created. |
| **backup\_options**  dictionary  |  | This is a dict object containing configurable options related to backup file path. The value of this option is read only when `backup` is set to *yes*, if `backup` is set to *no* this option will be silently ignored. |
|  | **dir\_path**  path  |  | This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of `filename` or default filename as described in `filename` options description. If the path value is not given in that case a *backup* directory will be created in the current working directory and backup configuration will be copied in `filename` within *backup* directory. |
|  | **filename**  string  |  | The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by <hostname>\_config.<current-date>@<current-time> |
| **before**  list / elements=string  |  | The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system. |
| **defaults**  boolean  | **Choices:*** **no** ←
* yes
 | The *defaults* argument will influence how the running-config is collected from the device. When the value is set to true, the command used to collect the running-config is append with the all keyword. When the value is set to false, the command is issued without the all keyword |
| **diff\_against**  string  | **Choices:*** startup
* running
* intended
* **session** ←
 | When using the `ansible-playbook --diff` command line argument the module can generate diffs against different sources. When this option is configure as *startup*, the module will return the diff of the running-config against the startup-config. When this option is configured as *intended*, the module will return the diff of the running-config against the configuration provided in the `intended_config` argument. When this option is configured as *running*, the module will return the before and after diff of the running-config with respect to any changes made to the device configuration. When this option is configured as `session`, the diff returned will be based on the configuration session. |
| **diff\_ignore\_lines**  list / elements=string  |  | Use this argument to specify one or more lines that should be ignored during the diff. This is used for lines in the configuration that are automatically updated by the system. This argument takes a list of regular expressions or exact line matches. |
| **intended\_config**  string  |  | The `intended_config` provides the master configuration that the node should conform to and is used to check the final running-config against. This argument will not modify any settings on the remote device and is strictly used to check the compliance of the current device's configuration against. When specifying this argument, the task should also modify the `diff_against` value and set it to *intended*. The configuration lines for this value should be similar to how it will appear if present in the running-configuration of the device including the indentation to ensure correct diff. |
| **lines**  list / elements=string  |  | The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config as found in the device running-config to ensure idempotency and correct diff. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser. 
aliases: commands |
| **match**  string  | **Choices:*** **line** ←
* strict
* exact
* none
 | Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to *line*, commands are matched line by line. If match is set to *strict*, command lines are matched with respect to position. If match is set to *exact*, command lines must be an equal match. Finally, if match is set to *none*, the module will not attempt to compare the source configuration with the running configuration on the remote device. |
| **parents**  list / elements=string  |  | The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. |
| **provider**  dictionary  |  | **Deprecated** Starting with Ansible 2.5 we recommend using `connection: network_cli`. Starting with Ansible 2.6 we recommend using `connection: httpapi` for eAPI. This option will be removed in a release after 2022-06-01. For more information please see the [EOS Platform Options guide](../network/user_guide/platform_eos). A dict object containing connection details. |
|  | **auth\_pass**  string  |  | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
|  | **authorize**  boolean  | **Choices:*** **no** ←
* yes
 | Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
|  | **host**  string  |  | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
|  | **password**  string  |  | Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either *cli* or *eapi* transports. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
|  | **port**  integer  | **Default:**0 | Specifies the port to use when building the connection to the remote device. This value applies to either *cli* or *eapi*. The port value will default to the appropriate transport common port if none is provided in the task (cli=22, http=80, https=443). |
|  | **ssh\_keyfile**  path  |  | Specifies the SSH keyfile to use to authenticate the connection to the remote device. This argument is only used for *cli* transports. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
|  | **timeout**  integer  |  | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
|  | **transport**  string  | **Choices:*** **cli** ←
* eapi
 | Configures the transport connection to use when connecting to the remote device. |
|  | **use\_proxy**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, the environment variables `http_proxy` and `https_proxy` will be ignored. |
|  | **use\_ssl**  boolean  | **Choices:*** no
* **yes** ←
 | Configures the *transport* to use SSL if set to `yes` only when the `transport=eapi`. If the transport argument is not eapi, this value is ignored. |
|  | **username**  string  |  | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the eAPI authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
|  | **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not eapi, this value is ignored. |
| **replace**  string  | **Choices:*** **line** ←
* block
* config
 | Instructs the module on the way to perform the configuration on the device. If the replace argument is set to *line* then the modified lines are pushed to the device in configuration mode. If the replace argument is set to *block* then the entire command block is pushed to the device in configuration mode if any line is not correct. |
| **running\_config**  string  |  | The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The *running\_config* argument allows the implementer to pass in the configuration to use as the base config for this module. The configuration lines for this option should be similar to how it will appear if present in the running-configuration of the device including the indentation to ensure idempotency and correct diff. 
aliases: config |
| **save\_when**  string  | **Choices:*** always
* **never** ←
* modified
* changed
 | When changes are made to the device running-configuration, the changes are not copied to non-volatile storage by default. Using this argument will change that before. If the argument is set to *always*, then the running-config will always be copied to the startup-config and the *modified* flag will always be set to True. If the argument is set to *modified*, then the running-config will only be copied to the startup-config if it has changed since the last save to startup-config. If the argument is set to *never*, the running-config will never be copied to the startup-config. If the argument is set to *changed*, then the running-config will only be copied to the startup-config if the task has made a change. *changed* was added in Ansible 2.5. |
| **src**  path  |  | The *src* argument provides a path to the configuration file to load into the remote system. The path can either be a full system path to the configuration file if the value starts with / or relative to the root of the implemented role or playbook. This argument is mutually exclusive with the *lines* and *parents* arguments. It can be a Jinja2 template as well. The configuration lines in the source file should be similar to how it will appear if present in the running-configuration (live switch config) of the device i ncluding the indentation to ensure idempotency and correct diff. Arista EOS device config has 3 spaces indentation. |

   
 Notes
-----

  Note

 * Tested against EOS 4.15
* Abbreviated commands are NOT idempotent, see [Network FAQ](../network/user_guide/faq#why-do-the-config-modules-always-return-changed-true-with-abbreviated-commands).
* To ensure idempotency and correct diff the configuration lines in the relevant module options should be similar to how they appear if present in the running configuration on device including the indentation.
* For information on using CLI, eAPI and privileged mode see the [EOS Platform Options guide](../../../network/user_guide/platform_eos#eos-platform-options)
* For more information on using Ansible to manage network devices see the [Ansible Network Guide](../../../network/index#network-guide)
* For more information on using Ansible to manage Arista EOS devices see the [Arista integration page](https://www.ansible.com/ansible-arista-networks).

  Examples
--------

 
```
- name: configure top level settings
  arista.eos.eos_config:
    lines: hostname {{ inventory_hostname }}

- name: load an acl into the device
  arista.eos.eos_config:
    lines:
    - 10 permit ip host 192.0.2.1 any log
    - 20 permit ip host 192.0.2.2 any log
    - 30 permit ip host 192.0.2.3 any log
    - 40 permit ip host 192.0.2.4 any log
    parents: ip access-list test
    before: no ip access-list test
    replace: block

- name: load configuration from file
  arista.eos.eos_config:
    src: eos.cfg

- name: render a Jinja2 template onto an Arista switch
  arista.eos.eos_config:
    backup: yes
    src: eos_template.j2

- name: diff the running config against a master config
  arista.eos.eos_config:
    diff_against: intended
    intended_config: "{{ lookup('file', 'master.cfg') }}"

- name: for idempotency, use full-form commands
  arista.eos.eos_config:
    lines:
      # - shut
    - shutdown
    # parents: int eth1
    parents: interface Ethernet1

- name: configurable backup path
  arista.eos.eos_config:
    src: eos_template.j2
    backup: yes
    backup_options:
      filename: backup.cfg
      dir_path: /home/user

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **backup\_path**  string  | when backup is yes | The full path to the backup file  **Sample:** /playbooks/ansible/backup/eos\_config.2016-07-16@22:28:34 |
| **commands**  list / elements=string  | always | The set of commands that will be pushed to the remote device  **Sample:** ['hostname switch01', 'interface Ethernet1', 'no shutdown'] |
| **date**  string  | when backup is yes | The date extracted from the backup file name  **Sample:** 2016-07-16 |
| **filename**  string  | when backup is yes and filename is not specified in backup options | The name of the backup file  **Sample:** eos\_config.2016-07-16@22:28:34 |
| **shortname**  string  | when backup is yes and filename is not specified in backup options | The full path to the backup file excluding the timestamp  **Sample:** /playbooks/ansible/backup/eos\_config |
| **time**  string  | when backup is yes | The time extracted from the backup file name  **Sample:** 22:28:34 |
| **updates**  list / elements=string  | always | The set of commands that will be pushed to the remote device  **Sample:** ['hostname switch01', 'interface Ethernet1', 'no shutdown'] |

   
  
 ### Authors

 * Peter Sprygada (@privateip)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/arista/eos/eos_config_module.html>

Ansible for Network Automation
==============================

 Ansible Network modules extend the benefits of simple, powerful, agentless automation to network administrators and teams. Ansible Network modules can configure your network stack, test and validate existing network state, and discover and correct network configuration drift.

 If you’re new to Ansible, or new to using Ansible for network management, start with [Network Getting Started](getting_started/index#network-getting-started). If you are already familiar with network automation with Ansible, see [Network Advanced Topics](user_guide/index#network-advanced).

 For documentation on using a particular network module, consult the [list of all network modules](https://docs.ansible.com/ansible/2.9/modules/list_of_network_modules.html#network-modules "(in Ansible v2.9)"). Network modules for various hardware are supported by different teams including the hardware vendors themselves, volunteers from the Ansible community, and the Ansible Network Team.

 * [Network Getting Started](getting_started/index)
	+ [Basic Concepts](getting_started/basic_concepts)
		- [Control node](getting_started/basic_concepts#control-node)
		- [Managed nodes](getting_started/basic_concepts#managed-nodes)
		- [Inventory](getting_started/basic_concepts#inventory)
		- [Collections](getting_started/basic_concepts#collections)
		- [Modules](getting_started/basic_concepts#modules)
		- [Tasks](getting_started/basic_concepts#tasks)
		- [Playbooks](getting_started/basic_concepts#playbooks)
	+ [How Network Automation is Different](getting_started/network_differences)
		- [Execution on the control node](getting_started/network_differences#execution-on-the-control-node)
		- [Multiple communication protocols](getting_started/network_differences#multiple-communication-protocols)
		- [Collections organized by network platform](getting_started/network_differences#collections-organized-by-network-platform)
		- [Privilege Escalation: `enable` mode, `become`, and `authorize`](getting_started/network_differences#privilege-escalation-enable-mode-become-and-authorize)
	+ [Run Your First Command and Playbook](getting_started/first_playbook)
		- [Prerequisites](getting_started/first_playbook#prerequisites)
		- [Install Ansible](getting_started/first_playbook#install-ansible)
		- [Establish a manual connection to a managed node](getting_started/first_playbook#establish-a-manual-connection-to-a-managed-node)
		- [Run your first network Ansible command](getting_started/first_playbook#run-your-first-network-ansible-command)
		- [Create and run your first network Ansible Playbook](getting_started/first_playbook#create-and-run-your-first-network-ansible-playbook)
		- [Gathering facts from network devices](getting_started/first_playbook#gathering-facts-from-network-devices)
	+ [Build Your Inventory](getting_started/first_inventory)
		- [Basic inventory](getting_started/first_inventory#basic-inventory)
		- [Add variables to the inventory](getting_started/first_inventory#add-variables-to-the-inventory)
		- [Group variables within inventory](getting_started/first_inventory#group-variables-within-inventory)
		- [Variable syntax](getting_started/first_inventory#variable-syntax)
		- [Group inventory by platform](getting_started/first_inventory#group-inventory-by-platform)
		- [Verifying the inventory](getting_started/first_inventory#verifying-the-inventory)
		- [Protecting sensitive variables with `ansible-vault`](getting_started/first_inventory#protecting-sensitive-variables-with-ansible-vault)
	+ [Use Ansible network roles](getting_started/network_roles)
		- [Understanding roles](getting_started/network_roles#understanding-roles)
	+ [Beyond the basics](getting_started/intermediate_concepts)
		- [A typical Ansible filetree](getting_started/intermediate_concepts#a-typical-ansible-filetree)
		- [Tracking changes to inventory and playbooks: source control with git](getting_started/intermediate_concepts#tracking-changes-to-inventory-and-playbooks-source-control-with-git)
	+ [Working with network connection options](getting_started/network_connection_options)
		- [Setting timeout options](getting_started/network_connection_options#setting-timeout-options)
	+ [Resources and next steps](getting_started/network_resources)
		- [Documents](getting_started/network_resources#documents)
		- [Events (on video and in person)](getting_started/network_resources#events-on-video-and-in-person)
		- [GitHub repos](getting_started/network_resources#github-repos)
		- [IRC and Slack](getting_started/network_resources#irc-and-slack)
* [Network Advanced Topics](user_guide/index)
	+ [Network Resource Modules](user_guide/network_resource_modules)
		- [Network resource module states](user_guide/network_resource_modules#network-resource-module-states)
		- [Using network resource modules](user_guide/network_resource_modules#using-network-resource-modules)
		- [Example: Verifying the network device configuration has not changed](user_guide/network_resource_modules#example-verifying-the-network-device-configuration-has-not-changed)
		- [Example: Acquiring and updating VLANs on a network device](user_guide/network_resource_modules#example-acquiring-and-updating-vlans-on-a-network-device)
	+ [Ansible Network Examples](user_guide/network_best_practices_2.5)
		- [Prerequisites](user_guide/network_best_practices_2.5#prerequisites)
		- [Groups and variables in an inventory file](user_guide/network_best_practices_2.5#groups-and-variables-in-an-inventory-file)
		- [Example 1: collecting facts and creating backup files with a playbook](user_guide/network_best_practices_2.5#example-1-collecting-facts-and-creating-backup-files-with-a-playbook)
		- [Example 2: simplifying playbooks with network agnostic modules](user_guide/network_best_practices_2.5#example-2-simplifying-playbooks-with-network-agnostic-modules)
		- [Implementation Notes](user_guide/network_best_practices_2.5#implementation-notes)
		- [Troubleshooting](user_guide/network_best_practices_2.5#troubleshooting)
	+ [Parsing semi-structured text with Ansible](user_guide/cli_parsing)
		- [Understanding the CLI parser](user_guide/cli_parsing#understanding-the-cli-parser)
		- [Parsing the CLI](user_guide/cli_parsing#parsing-the-cli)
		- [Advanced use cases](user_guide/cli_parsing#advanced-use-cases)
	+ [Network Debug and Troubleshooting Guide](user_guide/network_debug_troubleshooting)
		- [How to troubleshoot](user_guide/network_debug_troubleshooting#how-to-troubleshoot)
		- [Troubleshooting socket path issues](user_guide/network_debug_troubleshooting#troubleshooting-socket-path-issues)
		- [Category “Unable to open shell”](user_guide/network_debug_troubleshooting#category-unable-to-open-shell)
		- [Timeout issues](user_guide/network_debug_troubleshooting#timeout-issues)
		- [Playbook issues](user_guide/network_debug_troubleshooting#playbook-issues)
		- [Proxy Issues](user_guide/network_debug_troubleshooting#proxy-issues)
		- [Miscellaneous Issues](user_guide/network_debug_troubleshooting#miscellaneous-issues)
	+ [Working with command output and prompts in network modules](user_guide/network_working_with_command_output)
		- [Conditionals in networking modules](user_guide/network_working_with_command_output#conditionals-in-networking-modules)
		- [Handling prompts in network modules](user_guide/network_working_with_command_output#handling-prompts-in-network-modules)
	+ [Ansible Network FAQ](user_guide/faq)
		- [How can I improve performance for network playbooks?](user_guide/faq#how-can-i-improve-performance-for-network-playbooks)
		- [Why is my output sometimes replaced with `********`?](user_guide/faq#why-is-my-output-sometimes-replaced-with)
		- [Why do the `*_config` modules always return `changed=true` with abbreviated commands?](user_guide/faq#why-do-the-config-modules-always-return-changed-true-with-abbreviated-commands)
	+ [Platform Options](user_guide/platform_index)
		- [CloudEngine OS Platform Options](user_guide/platform_ce)
		- [CNOS Platform Options](user_guide/platform_cnos)
		- [Dell OS6 Platform Options](user_guide/platform_dellos6)
		- [Dell OS9 Platform Options](user_guide/platform_dellos9)
		- [Dell OS10 Platform Options](user_guide/platform_dellos10)
		- [ENOS Platform Options](user_guide/platform_enos)
		- [EOS Platform Options](user_guide/platform_eos)
		- [ERIC\_ECCLI Platform Options](user_guide/platform_eric_eccli)
		- [EXOS Platform Options](user_guide/platform_exos)
		- [FRR Platform Options](user_guide/platform_frr)
		- [ICX Platform Options](user_guide/platform_icx)
		- [IOS Platform Options](user_guide/platform_ios)
		- [IOS-XR Platform Options](user_guide/platform_iosxr)
		- [IronWare Platform Options](user_guide/platform_ironware)
		- [Junos OS Platform Options](user_guide/platform_junos)
		- [Meraki Platform Options](user_guide/platform_meraki)
		- [Pluribus NETVISOR Platform Options](user_guide/platform_netvisor)
		- [NOS Platform Options](user_guide/platform_nos)
		- [NXOS Platform Options](user_guide/platform_nxos)
		- [RouterOS Platform Options](user_guide/platform_routeros)
		- [SLX-OS Platform Options](user_guide/platform_slxos)
		- [VOSS Platform Options](user_guide/platform_voss)
		- [VyOS Platform Options](user_guide/platform_vyos)
		- [WeOS 4 Platform Options](user_guide/platform_weos4)
		- [Netconf enabled Platform Options](user_guide/platform_netconf_enabled)
		- [Settings by Platform](user_guide/platform_index#settings-by-platform)
* [Network Developer Guide](dev_guide/index)
	+ [Developing network resource modules](dev_guide/developing_resource_modules_network)
		- [Understanding network and security resource modules](dev_guide/developing_resource_modules_network#understanding-network-and-security-resource-modules)
		- [Developing network and security resource modules](dev_guide/developing_resource_modules_network#developing-network-and-security-resource-modules)
		- [Examples](dev_guide/developing_resource_modules_network#examples)
		- [Resource module structure and workflow](dev_guide/developing_resource_modules_network#resource-module-structure-and-workflow)
		- [Running `ansible-test sanity` and `tox` on resource modules](dev_guide/developing_resource_modules_network#running-ansible-test-sanity-and-tox-on-resource-modules)
		- [Testing resource modules](dev_guide/developing_resource_modules_network#testing-resource-modules)
		- [Example: Unit testing Ansible network resource modules](dev_guide/developing_resource_modules_network#example-unit-testing-ansible-network-resource-modules)
	+ [Developing network plugins](dev_guide/developing_plugins_network)
		- [Network connection plugins](dev_guide/developing_plugins_network#network-connection-plugins)
		- [Developing httpapi plugins](dev_guide/developing_plugins_network#developing-httpapi-plugins)
		- [Developing NETCONF plugins](dev_guide/developing_plugins_network#developing-netconf-plugins)
		- [Developing network\_cli plugins](dev_guide/developing_plugins_network#developing-network-cli-plugins)
		- [Developing cli\_parser plugins in a collection](dev_guide/developing_plugins_network#developing-cli-parser-plugins-in-a-collection)
	+ [Documenting new network platforms](dev_guide/documenting_modules_network)
		- [Modifying the platform options table](dev_guide/documenting_modules_network#modifying-the-platform-options-table)
		- [Adding a platform-specific options section](dev_guide/documenting_modules_network#adding-a-platform-specific-options-section)
		- [Adding your new file to the table of contents](dev_guide/documenting_modules_network#adding-your-new-file-to-the-table-of-contents)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/network/index.html>

arista.eos.eos\_l3\_interfaces – L3 interfaces resource module
==============================================================

  Note

 This plugin is part of the [arista.eos collection](https://galaxy.ansible.com/arista/eos) (version 2.2.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install arista.eos`.

 To use it in a playbook, specify: `arista.eos.eos_l3_interfaces`.

   New in version 1.0.0: of arista.eos

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * This module provides declarative management of Layer 3 interfaces on Arista EOS devices.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **config**  list / elements=dictionary  |  | A dictionary of Layer 3 interface options |
|  | **ipv4**  list / elements=dictionary  |  | List of IPv4 addresses to be set for the Layer 3 interface mentioned in *name* option. |
|  |  | **address**  string  |  | IPv4 address to be set in the format <ipv4 address>/<mask> eg. 192.0.2.1/24, or `dhcp` to query DHCP for an IP address. |
|  |  | **secondary**  boolean  | **Choices:*** no
* yes
 | Whether or not this address is a secondary address. |
|  |  | **virtual**  boolean  | **Choices:*** no
* yes
 | Whether or not this address is a virtual address. |
|  | **ipv6**  list / elements=dictionary  |  | List of IPv6 addresses to be set for the Layer 3 interface mentioned in *name* option. |
|  |  | **address**  string  |  | IPv6 address to be set in the address format is <ipv6 address>/<mask> eg. 2001:db8:2201:1::1/64 or `auto-config` to use SLAAC to chose an address. |
|  | **name**  string / required  |  | Full name of the interface, i.e. Ethernet1. |
| **running\_config**  string  |  | This option is used only with state *parsed*. The value of this option should be the output received from the EOS device by executing the command **show running-config | section ^interface**. The state *parsed* reads the configuration from `running_config` option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the *parsed* key within the result. |
| **state**  string  | **Choices:*** **merged** ←
* replaced
* overridden
* deleted
* parsed
* gathered
* rendered
 | The state of the configuration after module completion |

   
 Notes
-----

  Note

 * Tested against Arista EOS 4.20.10M
* This module works with connection `network_cli`. See the [EOS Platform Options](../network/user_guide/platform_eos). ‘eos\_l2\_interfaces/eos\_interfaces’ should be used for preparing the interfaces , before applying L3 configurations using this module (eos\_l3\_interfaces).

  Examples
--------

 
```
# Using deleted

# Before state:
# -------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    ip address 192.0.2.12/24
# !
# interface Ethernet2
#    ipv6 address 2001:db8::1/64
# !
# interface Management1
#    ip address dhcp
#    ipv6 address auto-config

- name: Delete L3 attributes of given interfaces.
  arista.eos.eos_l3_interfaces:
    config:
    - name: Ethernet1
    - name: Ethernet2
    state: deleted

# After state:
# ------------
#
# veos#show running-config | section interface
# interface Ethernet1
# !
# interface Ethernet2
# !
# interface Management1
#    ip address dhcp
#    ipv6 address auto-config


# Using merged

# Before state:
# -------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    ip address 192.0.2.12/24
# !
# interface Ethernet2
#    ipv6 address 2001:db8::1/64
# !
# interface Management1
#    ip address dhcp
#    ipv6 address auto-config

- name: Merge provided configuration with device configuration.
  arista.eos.eos_l3_interfaces:
    config:
    - name: Ethernet1
      ipv4:
      - address: 198.51.100.14/24
    - name: Ethernet2
      ipv4:
      - address: 203.0.113.27/24
    state: merged

# After state:
# ------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    ip address 198.51.100.14/24
# !
# interface Ethernet2
#    ip address 203.0.113.27/24
#    ipv6 address 2001:db8::1/64
# !
# interface Management1
#    ip address dhcp
#    ipv6 address auto-config


# Using overridden

# Before state:
# -------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    ip address 192.0.2.12/24
# !
# interface Ethernet2
#    ipv6 address 2001:db8::1/64
# !
# interface Management1
#    ip address dhcp
#    ipv6 address auto-config

- name: Override device configuration of all L2 interfaces on device with provided
    configuration.
  arista.eos.eos_l3_interfaces:
    config:
    - name: Ethernet1
      ipv6:
      - address: 2001:db8:feed::1/96
    - name: Management1
      ipv4:
      - address: dhcp
    ipv6: auto-config
    state: overridden

# After state:
# ------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    ipv6 address 2001:db8:feed::1/96
# !
# interface Ethernet2
# !
# interface Management1
#    ip address dhcp
#    ipv6 address auto-config


# Using replaced

# Before state:
# -------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    ip address 192.0.2.12/24
# !
# interface Ethernet2
#    ipv6 address 2001:db8::1/64
# !
# interface Management1
#    ip address dhcp
#    ipv6 address auto-config

- name: Replace device configuration of specified L2 interfaces with provided configuration.
  arista.eos.eos_l3_interfaces:
    config:
    - name: Ethernet2
      ipv4:
      - address: 203.0.113.27/24
    state: replaced

# After state:
# ------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    ip address 192.0.2.12/24
# !
# interface Ethernet2
#    ip address 203.0.113.27/24
# !
# interface Management1
#    ip address dhcp
#    ipv6 address auto-config

# Using parsed:

# parsed.cfg
# ------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    ip address 198.51.100.14/24
# !
# interface Ethernet2
#    ip address 203.0.113.27/24
# !

- name: Use parsed to convert native configs to structured data
  arista.eos.interfaces:
    running_config: "{{ lookup('file', 'parsed.cfg') }}"
    state: parsed

# Output:

# parsed:
#    - name: Ethernet1
#      ipv4:
#        - address: 198.51.100.14/24
#    - name: Ethernet2
#      ipv4:
#        - address: 203.0.113.27/24

# Using rendered:

- name: Use Rendered to convert the structured data to native config
  arista.eos.eos_l3_interfaces:
    config:
    - name: Ethernet1
      ipv4:
      - address: 198.51.100.14/24
    - name: Ethernet2
      ipv4:
      - address: 203.0.113.27/24
    state: rendered

# Output
# ------------
#rendered:
#   - "interface Ethernet1"
#   - "ip address 198.51.100.14/24"
#   - "interface Ethernet2"
#   - "ip address 203.0.113.27/24"

# using gathered:

# Native COnfig:
# veos#show running-config | section interface
# interface Ethernet1
#    ip address 198.51.100.14/24
# !
# interface Ethernet2
#    ip address 203.0.113.27/24
# !

- name: Gather l3 interfaces facts from the device
  arista.eos.l3_interfaces:
    state: gathered

#    gathered:
#      - name: Ethernet1
#        ipv4:
#          - address: 198.51.100.14/24
#      - name: Ethernet2
#        ipv4:
#          - address: 203.0.113.27/24

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **after**  list / elements=string  | when changed | The configuration as structured data after module completion.  **Sample:** The configuration returned will always be in the same format of the parameters above. |
| **before**  list / elements=string  | always | The configuration as structured data prior to module invocation.  **Sample:** The configuration returned will always be in the same format of the parameters above. |
| **commands**  list / elements=string  | always | The set of commands pushed to the remote device.  **Sample:** ['interface Ethernet2', 'ip address 192.0.2.12/24'] |

   
  
 ### Authors

 * Nathaniel Case (@qalthos)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/arista/eos/eos_l3_interfaces_module.html>

cisco.ios.ios\_command – Run commands on remote devices running Cisco IOS
=========================================================================

  Note

 This plugin is part of the [cisco.ios collection](https://galaxy.ansible.com/cisco/ios) (version 2.5.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install cisco.ios`.

 To use it in a playbook, specify: `cisco.ios.ios_command`.

   New in version 1.0.0: of cisco.ios

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Sends arbitrary commands to an ios node and returns the results read from the device. This module includes an argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.
* This module does not support running commands in configuration mode. Please use M(ios\_config) to configure IOS devices.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **commands**  list / elements=raw / required  |  | List of commands to send to the remote ios device over the configured provider. The resulting output from the command is returned. If the *wait\_for* argument is provided, the module is not returned until the condition is satisfied or the number of retries has expired. If a command sent to the device requires answering a prompt, it is possible to pass a dict containing *command*, *answer* and *prompt*. Common answers are 'y' or "\r" (carriage return, must be double quotes). See examples. |
| **interval**  integer  | **Default:**1 | Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditions, the interval indicates how long to wait before trying the command again. |
| **match**  string  | **Choices:*** any
* **all** ←
 | The *match* argument is used in conjunction with the *wait\_for* argument to specify the match policy. Valid values are `all` or `any`. If the value is set to `all` then all conditionals in the wait\_for must be satisfied. If the value is set to `any` then only one of the values must be satisfied. |
| **provider**  dictionary  |  | **Deprecated** Starting with Ansible 2.5 we recommend using `connection: network_cli`. For more information please see the [https://docs.ansible.com/ansible/latest/network/user\_guide/platform\_ios.html](../../../network/user_guide/platform_ios). A dict object containing connection details. |
|  | **auth\_pass**  string  |  | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
|  | **authorize**  boolean  | **Choices:*** **no** ←
* yes
 | Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
|  | **host**  string  |  | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
|  | **password**  string  |  | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
|  | **port**  integer  |  | Specifies the port to use when building the connection to the remote device. |
|  | **ssh\_keyfile**  path  |  | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
|  | **timeout**  integer  |  | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
|  | **username**  string  |  | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
| **retries**  integer  | **Default:**10 | Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the *wait\_for* conditions. |
| **wait\_for**  list / elements=string  |  | List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples. 
aliases: waitfor |

   
 Notes
-----

  Note

 * Tested against IOS 15.6
* For more information on using Ansible to manage network devices see the [Ansible Network Guide](../../../network/index#network-guide)
* For more information on using Ansible to manage Cisco devices see the [Cisco integration page](https://www.ansible.com/integrations/networks/cisco).

  Examples
--------

 
```
- name: run show version on remote devices
  cisco.ios.ios_command:
    commands: show version

- name: run show version and check to see if output contains IOS
  cisco.ios.ios_command:
    commands: show version
    wait_for: result[0] contains IOS

- name: run multiple commands on remote nodes
  cisco.ios.ios_command:
    commands:
    - show version
    - show interfaces

- name: run multiple commands and evaluate the output
  cisco.ios.ios_command:
    commands:
    - show version
    - show interfaces
    wait_for:
    - result[0] contains IOS
    - result[1] contains Loopback0

- name: run commands that require answering a prompt
  cisco.ios.ios_command:
    commands:
    - command: 'clear counters GigabitEthernet0/1'
      prompt: 'Clear "show interface" counters on this interface \[confirm\]'
      answer: 'y'
    - command: 'clear counters GigabitEthernet0/2'
      prompt: '[confirm]'
      answer: '\r'

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **failed\_conditions**  list / elements=string  | failed | The list of conditionals that have failed  **Sample:** ['...', '...'] |
| **stdout**  list / elements=string  | always apart from low level errors (such as action plugin) | The set of responses from the commands  **Sample:** ['...', '...'] |
| **stdout\_lines**  list / elements=string  | always apart from low level errors (such as action plugin) | The value of stdout split into a list  **Sample:** [['...', '...'], ['...'], ['...']] |

   
  
 ### Authors

 * Peter Sprygada (@privateip)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/ios/ios_command_module.html>

cisco.nxos.nxos\_command – Run arbitrary command on Cisco NXOS devices
======================================================================

  Note

 This plugin is part of the [cisco.nxos collection](https://galaxy.ansible.com/cisco/nxos) (version 2.7.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install cisco.nxos`.

 To use it in a playbook, specify: `cisco.nxos.nxos_command`.

   New in version 1.0.0: of cisco.nxos

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Sends an arbitrary command to an NXOS node and returns the results read from the device. This module includes an argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **commands**  list / elements=raw / required  |  | The commands to send to the remote NXOS device. The resulting output from the command is returned. If the *wait\_for* argument is provided, the module is not returned until the condition is satisfied or the number of retires as expired. The *commands* argument also accepts an alternative form that allows for complex values that specify the command to run and the output format to return. This can be done on a command by command basis. The complex argument supports the keywords `command` and `output` where `command` is the command to run and `output` is one of 'text' or 'json'. If a command sent to the device requires answering a prompt, it is possible to pass a dict containing command, answer and prompt. Common answers are 'y' or "\r" (carriage return, must be double quotes). See examples. |
| **interval**  integer  | **Default:**1 | Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditional, the interval indicates how to long to wait before trying the command again. |
| **match**  string  | **Choices:*** any
* **all** ←
 | The *match* argument is used in conjunction with the *wait\_for* argument to specify the match policy. Valid values are `all` or `any`. If the value is set to `all` then all conditionals in the *wait\_for* must be satisfied. If the value is set to `any` then only one of the values must be satisfied. |
| **provider**  dictionary  |  | **Deprecated** Starting with Ansible 2.5 we recommend using `connection: network_cli`. Starting with Ansible 2.6 we recommend using `connection: httpapi` for NX-API. This option will be removed in a release after 2022-06-01. For more information please see the [https://docs.ansible.com/ansible/latest/network/user\_guide/platform\_nxos.html](../../../network/user_guide/platform_nxos). A dict object containing connection details. |
|  | **auth\_pass**  string  |  | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
|  | **authorize**  boolean  | **Choices:*** **no** ←
* yes
 | Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
|  | **host**  string  |  | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
|  | **password**  string  |  | Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either *cli* or *nxapi* transports. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
|  | **port**  integer  |  | Specifies the port to use when building the connection to the remote device. This value applies to either *cli* or *nxapi*. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443). |
|  | **ssh\_keyfile**  string  |  | Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the *cli* transport. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
|  | **timeout**  integer  |  | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc). |
|  | **transport**  string  | **Choices:*** **cli** ←
* nxapi
 | Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi. |
|  | **use\_proxy**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, the environment variables `http_proxy` and `https_proxy` will be ignored. |
|  | **use\_ssl**  boolean  | **Choices:*** **no** ←
* yes
 | Configures the *transport* to use SSL if set to `yes` only when the `transport=nxapi`, otherwise this value is ignored. |
|  | **username**  string  |  | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
|  | **validate\_certs**  boolean  | **Choices:*** **no** ←
* yes
 | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored. |
| **retries**  integer  | **Default:**10 | Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the *wait\_for* conditionals. |
| **wait\_for**  list / elements=string  |  | Specifies what to evaluate from the output of the command and what conditionals to apply. This argument will cause the task to wait for a particular conditional to be true before moving forward. If the conditional is not true by the configured retries, the task fails. See examples. 
aliases: waitfor |

   
 Notes
-----

  Note

 * Limited Support for Cisco MDS
* For information on using CLI and NX-API see the [NXOS Platform Options guide](../../../network/user_guide/platform_nxos#nxos-platform-options)
* For more information on using Ansible to manage network devices see the [Ansible Network Guide](../../../network/index#network-guide)
* For more information on using Ansible to manage Cisco devices see the [Cisco integration page](https://www.ansible.com/integrations/networks/cisco).

  Examples
--------

 
```
- name: run show version on remote devices
  cisco.nxos.nxos_command:
    commands: show version

- name: run show version and check to see if output contains Cisco
  cisco.nxos.nxos_command:
    commands: show version
    wait_for: result[0] contains Cisco

- name: run multiple commands on remote nodes
  cisco.nxos.nxos_command:
    commands:
    - show version
    - show interfaces

- name: run multiple commands and evaluate the output
  cisco.nxos.nxos_command:
    commands:
    - show version
    - show interfaces
    wait_for:
    - result[0] contains Cisco
    - result[1] contains loopback0

- name: run commands and specify the output format
  cisco.nxos.nxos_command:
    commands:
    - command: show version
      output: json

- name: run commands that require answering a prompt
  cisco.nxos.nxos_command:
    commands:
    - configure terminal
    - command: no feature npv
      prompt: Do you want to continue
      answer: y

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **failed\_conditions**  list / elements=string  | failed | The list of conditionals that have failed  **Sample:** ['...', '...'] |
| **stdout**  list / elements=string  | always apart from low level errors (such as action plugin) | The set of responses from the commands  **Sample:** ['...', '...'] |
| **stdout\_lines**  list / elements=string  | always apart from low level errors (such as action plugin) | The value of stdout split into a list  **Sample:** [['...', '...'], ['...'], ['...']] |

   
  
 ### Authors

 * Peter Sprygada (@privateip)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/nxos/nxos_command_module.html>

ansible.netcommon.cli\_command – Run a cli command on cli-based network devices
===============================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.cli_command`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Sends a command to a network device and returns the result read from the device.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **answer**  list / elements=string  |  | The answer to reply with if *prompt* is matched. The value can be a single answer or a list of answer for multiple prompts. In case the command execution results in multiple prompts the sequence of the prompt and excepted answer should be in same order. |
| **check\_all**  boolean  | **Choices:*** **no** ←
* yes
 | By default if any one of the prompts mentioned in `prompt` option is matched it won't check for other prompts. This boolean flag, that when set to *True* will check for all the prompts mentioned in `prompt` option in the given order. If the option is set to *True* all the prompts should be received from remote host if not it will result in timeout. |
| **command**  string / required  |  | The command to send to the remote network device. The resulting output from the command is returned, unless *sendonly* is set. |
| **newline**  boolean  | **Choices:*** no
* **yes** ←
 | The boolean value, that when set to false will send *answer* to the device without a trailing newline. |
| **prompt**  list / elements=string  |  | A single regex pattern or a sequence of patterns to evaluate the expected prompt from *command*. |
| **sendonly**  boolean  | **Choices:*** **no** ←
* yes
 | The boolean value, that when set to true will send *command* to the device but not wait for a result. |

   
 Notes
-----

  Note

 * This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: run show version on remote devices
  ansible.netcommon.cli_command:
    command: show version

- name: run command with json formatted output
  ansible.netcommon.cli_command:
    command: show version | json

- name: run command expecting user confirmation
  ansible.netcommon.cli_command:
    command: commit replace
    prompt: This commit will replace or remove the entire running configuration
    answer: yes

- name: run command expecting user confirmation
  ansible.netcommon.cli_command:
    command: show interface summary
    prompt: Press any key to continue
    answer: y
    newline: false

- name: run config mode command and handle prompt/answer
  ansible.netcommon.cli_command:
    command: '{{ item }}'
    prompt:
    - Exit with uncommitted changes
    answer: y
  loop:
  - configure
  - set system syslog file test any any
  - exit

- name: multiple prompt, multiple answer (mandatory check for all prompts)
  ansible.netcommon.cli_command:
    command: copy sftp sftp://user@host//user/test.img
    check_all: true
    prompt:
    - Confirm download operation
    - Password
    - Do you want to change that to the standby image
    answer:
    - y
    - <password>
    - y

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **json**  dictionary  | when the device response is valid JSON | A dictionary representing a JSON-formatted response  **Sample:** { "architecture": "i386", "bootupTimestamp": 1532649700.56, "modelName": "vEOS", "version": "4.15.9M" [...] } |
| **stdout**  string  | when sendonly is false | The response from the command  **Sample:** Version: VyOS 1.1.7[...] |

   
  
 ### Authors

 * Nathaniel Case (@Qalthos)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/cli_command_module.html>

ansible.builtin.shell – Execute shell commands on targets
=========================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `shell` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 0.2: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * The `shell` module takes the command name followed by a list of space-delimited arguments.
* Either a free form command or `cmd` parameter is required, see the examples.
* It is almost exactly like the [ansible.builtin.command](command_module#ansible-collections-ansible-builtin-command-module) module but runs the command through a shell (`/bin/sh`) on the remote node.
* For Windows targets, use the [ansible.windows.win\_shell](../windows/win_shell_module#ansible-collections-ansible-windows-win-shell-module) module instead.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **chdir**  path   added in 0.6 of ansible.builtin  |  | Change into this directory before running the command. |
| **cmd**  string  |  | The command to run followed by optional arguments. |
| **creates**  path  |  | A filename, when it already exists, this step will **not** be run. |
| **executable**  path   added in 0.9 of ansible.builtin  |  | Change the shell used to execute the command. This expects an absolute path to the executable. |
| **free\_form**  string  |  | The shell module takes a free form command to run, as a string. There is no actual parameter named 'free form'. See the examples on how to use this module. |
| **removes**  path   added in 0.8 of ansible.builtin  |  | A filename, when it does not exist, this step will **not** be run. |
| **stdin**  string   added in 2.4 of ansible.builtin  |  | Set the stdin of the command directly to the specified value. |
| **stdin\_add\_newline**  boolean   added in 2.8 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | Whether to append a newline to stdin data. |
| **warn**  boolean   added in 1.8 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | Whether to enable task warnings. |

   
 Notes
-----

  Note

 * If you want to execute a command securely and predictably, it may be better to use the [ansible.builtin.command](command_module#ansible-collections-ansible-builtin-command-module) module instead. Best practices when writing playbooks will follow the trend of using [ansible.builtin.command](command_module#ansible-collections-ansible-builtin-command-module) unless the [ansible.builtin.shell](#ansible-collections-ansible-builtin-shell-module) module is explicitly required. When running ad-hoc commands, use your best judgement.
* Check mode is supported when passing `creates` or `removes`. If running in check mode and either of these are specified, the module will check for the existence of the file and report the correct changed status. If these are not supplied, the task will be skipped.
* To sanitize any variables passed to the shell module, you should use `{{ var | quote }}` instead of just `{{ var }}` to make sure they do not include evil things like semicolons.
* An alternative to using inline shell scripts with this module is to use the [ansible.builtin.script](script_module#ansible-collections-ansible-builtin-script-module) module possibly together with the [ansible.builtin.template](template_module#ansible-collections-ansible-builtin-template-module) module.
* For rebooting systems, use the [ansible.builtin.reboot](reboot_module#ansible-collections-ansible-builtin-reboot-module) or [ansible.windows.win\_reboot](../windows/win_reboot_module#ansible-collections-ansible-windows-win-reboot-module) module.

  See Also
--------

  See also

  [ansible.builtin.command](command_module#ansible-collections-ansible-builtin-command-module)

The official documentation on the **ansible.builtin.command** module.

  [ansible.builtin.raw](raw_module#ansible-collections-ansible-builtin-raw-module)

The official documentation on the **ansible.builtin.raw** module.

  [ansible.builtin.script](script_module#ansible-collections-ansible-builtin-script-module)

The official documentation on the **ansible.builtin.script** module.

  [ansible.windows.win\_shell](../windows/win_shell_module#ansible-collections-ansible-windows-win-shell-module)

The official documentation on the **ansible.windows.win\_shell** module.

    Examples
--------

 
```
- name: Execute the command in remote shell; stdout goes to the specified file on the remote
  ansible.builtin.shell: somescript.sh >> somelog.txt

- name: Change the working directory to somedir/ before executing the command
  ansible.builtin.shell: somescript.sh >> somelog.txt
  args:
    chdir: somedir/

# You can also use the 'args' form to provide the options.
- name: This command will change the working directory to somedir/ and will only run when somedir/somelog.txt doesn't exist
  ansible.builtin.shell: somescript.sh >> somelog.txt
  args:
    chdir: somedir/
    creates: somelog.txt

# You can also use the 'cmd' parameter instead of free form format.
- name: This command will change the working directory to somedir/
  ansible.builtin.shell:
    cmd: ls -l | grep log
    chdir: somedir/

- name: Run a command that uses non-posix shell-isms (in this example /bin/sh doesn't handle redirection and wildcards together but bash does)
  ansible.builtin.shell: cat < /tmp/*txt
  args:
    executable: /bin/bash

- name: Run a command using a templated variable (always use quote filter to avoid injection)
  ansible.builtin.shell: cat {{ myfile|quote }}

# You can use shell to run other executables to perform actions inline
- name: Run expect to wait for a successful PXE boot via out-of-band CIMC
  ansible.builtin.shell: |
    set timeout 300
    spawn ssh admin@{{ cimc_host }}

    expect "password:"
    send "{{ cimc_password }}\n"

    expect "\n{{ cimc_name }}"
    send "connect host\n"

    expect "pxeboot.n12"
    send "\n"

    exit 0
  args:
    executable: /usr/bin/expect
  delegate_to: localhost

# Disabling warnings
- name: Using curl to connect to a host via SOCKS proxy (unsupported in uri). Ordinarily this would throw a warning
  ansible.builtin.shell: curl --socks5 localhost:9000 http://www.ansible.com
  args:
    warn: no

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **cmd**  string  | always | The command executed by the task.  **Sample:** rabbitmqctl join\_cluster rabbit@master |
| **delta**  string  | always | The command execution delta time.  **Sample:** 0:00:00.325771 |
| **end**  string  | always | The command execution end time.  **Sample:** 2016-02-25 09:18:26.755339 |
| **msg**  boolean  | always | changed  **Sample:** True |
| **rc**  integer  | always | The command return code (0 means success).  |
| **start**  string  | always | The command execution start time.  **Sample:** 2016-02-25 09:18:26.429568 |
| **stderr**  string  | always | The command standard error.  **Sample:** ls: cannot access foo: No such file or directory |
| **stderr\_lines**  list / elements=string  | always | The command standard error split in lines.  **Sample:** [{"u'ls cannot access foo": "No such file or directory'"}, "u'ls …'"] |
| **stdout**  string  | always | The command standard output.  **Sample:** Clustering node rabbit@slave1 with rabbit@master … |
| **stdout\_lines**  list / elements=string  | always | The command standard output split in lines.  **Sample:** ["u'Clustering node rabbit@slave1 with rabbit@master …'"] |

   
  
 ### Authors

 * Ansible Core Team
* Michael DeHaan



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/shell_module.html>

ansible.builtin.template – Template a file out to a target host
===============================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `template` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Templates are processed by the [Jinja2 templating language](http://jinja.pocoo.org/docs/).
* Documentation on the template formatting can be found in the [Template Designer Documentation](http://jinja.pocoo.org/docs/templates/).
* Additional variables listed below can be used in templates.
* `ansible_managed` (configurable via the `defaults` section of `ansible.cfg`) contains a string which can be used to describe the template name, host, modification time of the template file and the owner uid.
* `template_host` contains the node name of the template’s machine.
* `template_uid` is the numeric user id of the owner.
* `template_path` is the path of the template.
* `template_fullpath` is the absolute path of the template.
* `template_destpath` is the path of the template on the remote system (added in 2.8).
* `template_run_date` is the date that the template was rendered.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **attributes**  string   added in 2.3 of ansible.builtin  |  | The attributes the resulting file or directory should have. To get supported flags look at the man page for *chattr* on the target system. This string should contain the attributes in the same order as the one displayed by *lsattr*. The `=` operator is assumed as default, otherwise `+` or `-` operators need to be included in the string. 
aliases: attr |
| **backup**  boolean  | **Choices:*** **no** ←
* yes
 | Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. |
| **block\_end\_string**  string   added in 2.4 of ansible.builtin  | **Default:**"%}" | The string marking the end of a block. |
| **block\_start\_string**  string   added in 2.4 of ansible.builtin  | **Default:**"{%" | The string marking the beginning of a block. |
| **dest**  path / required  |  | Location to render the template to on the remote machine. |
| **follow**  boolean   added in 2.4 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Determine whether symbolic links should be followed. When set to `yes` symbolic links will be followed, if they exist. When set to `no` symbolic links will not be followed. Previous to Ansible 2.4, this was hardcoded as `yes`. |
| **force**  boolean  | **Choices:*** no
* **yes** ←
 | Determine when the file is being transferred if the destination already exists. When set to `yes`, replace the remote file when contents are different than the source. When set to `no`, the file will only be transferred if the destination does not exist. |
| **group**  string  |  | Name of the group that should own the file/directory, as would be fed to *chown*. |
| **lstrip\_blocks**  boolean   added in 2.6 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Determine when leading spaces and tabs should be stripped. When set to `yes` leading spaces and tabs are stripped from the start of a line to a block. This functionality requires Jinja 2.7 or newer. |
| **mode**  raw  |  | The permissions the resulting file or directory should have. For those used to */usr/bin/chmod* remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like `0644` or `01777`) or quote it (like `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination file **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created file. If `mode` is not specified and the destination file **does** exist, the mode of the existing file will be used. Specifying `mode` is the best way to ensure files are created with the correct permissions. See CVE-2020-1736 for further details. |
| **newline\_sequence**  string   added in 2.4 of ansible.builtin  | **Choices:*** **\n** ←
* \r
* \r\n
 | Specify the newline sequence to use for templating files. |
| **output\_encoding**  string   added in 2.7 of ansible.builtin  | **Default:**"utf-8" | Overrides the encoding used to write the template file defined by `dest`. It defaults to `utf-8`, but any encoding supported by python can be used. The source template file must always be encoded using `utf-8`, for homogeneity. |
| **owner**  string  |  | Name of the user that should own the file/directory, as would be fed to *chown*. |
| **selevel**  string  |  | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the `range`. When set to `_default`, it will use the `level` portion of the policy if available. |
| **serole**  string  |  | The role part of the SELinux file context. When set to `_default`, it will use the `role` portion of the policy if available. |
| **setype**  string  |  | The type part of the SELinux file context. When set to `_default`, it will use the `type` portion of the policy if available. |
| **seuser**  string  |  | The user part of the SELinux file context. By default it uses the `system` policy, where applicable. When set to `_default`, it will use the `user` portion of the policy if available. |
| **src**  path / required  |  | Path of a Jinja2 formatted template on the Ansible controller. This can be a relative or an absolute path. The file must be encoded with `utf-8` but *output\_encoding* can be used to control the encoding of the output template. |
| **trim\_blocks**  boolean   added in 2.4 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | Determine when newlines should be removed from blocks. When set to `yes` the first newline after a block is removed (block, not variable tag!). |
| **unsafe\_writes**  boolean   added in 2.2 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. |
| **validate**  string  |  | The validation command to run before copying into place. The path to the file to validate is passed in via '%s' which must be present as in the examples below. The command is passed securely so shell features like expansion and pipes will not work. |
| **variable\_end\_string**  string   added in 2.4 of ansible.builtin  | **Default:**"}}" | The string marking the end of a print statement. |
| **variable\_start\_string**  string   added in 2.4 of ansible.builtin  | **Default:**"{{" | The string marking the beginning of a print statement. |

   
 Notes
-----

  Note

 * For Windows you can use [ansible.windows.win\_template](../windows/win_template_module#ansible-collections-ansible-windows-win-template-module) which uses ‘\r\n’ as `newline_sequence` by default.
* Including a string that uses a date in the template will result in the template being marked ‘changed’ each time.
* Since Ansible 0.9, templates are loaded with `trim_blocks=True`.
* Also, you can override jinja2 settings by adding a special header to template file. i.e. `#jinja2:variable_start_string:'[%', variable_end_string:'%]', trim_blocks: False` which changes the variable interpolation markers to `[% var %]` instead of `{{ var }}`. This is the best way to prevent evaluation of things that look like, but should not be Jinja2.
* Using raw/endraw in Jinja2 will not work as you expect because templates in Ansible are recursively evaluated.
* To find Byte Order Marks in files, use `Format-Hex <file> -Count 16` on Windows, and use `od -a -t x1 -N 16 <file>` on Linux.

  See Also
--------

  See also

  [ansible.builtin.copy](copy_module#ansible-collections-ansible-builtin-copy-module)

The official documentation on the **ansible.builtin.copy** module.

  [ansible.windows.win\_copy](../windows/win_copy_module#ansible-collections-ansible-windows-win-copy-module)

The official documentation on the **ansible.windows.win\_copy** module.

  [ansible.windows.win\_template](../windows/win_template_module#ansible-collections-ansible-windows-win-template-module)

The official documentation on the **ansible.windows.win\_template** module.

    Examples
--------

 
```
- name: Template a file to /etc/file.conf
  ansible.builtin.template:
    src: /mytemplates/foo.j2
    dest: /etc/file.conf
    owner: bin
    group: wheel
    mode: '0644'

- name: Template a file, using symbolic modes (equivalent to 0644)
  ansible.builtin.template:
    src: /mytemplates/foo.j2
    dest: /etc/file.conf
    owner: bin
    group: wheel
    mode: u=rw,g=r,o=r

- name: Copy a version of named.conf that is dependent on the OS. setype obtained by doing ls -Z /etc/named.conf on original file
  ansible.builtin.template:
    src: named.conf_{{ ansible_os_family }}.j2
    dest: /etc/named.conf
    group: named
    setype: named_conf_t
    mode: 0640

- name: Create a DOS-style text file from a template
  ansible.builtin.template:
    src: config.ini.j2
    dest: /share/windows/config.ini
    newline_sequence: '\r\n'

- name: Copy a new sudoers file into place, after passing validation with visudo
  ansible.builtin.template:
    src: /mine/sudoers
    dest: /etc/sudoers
    validate: /usr/sbin/visudo -cf %s

- name: Update sshd configuration safely, avoid locking yourself out
  ansible.builtin.template:
    src: etc/ssh/sshd_config.j2
    dest: /etc/ssh/sshd_config
    owner: root
    group: root
    mode: '0600'
    validate: /usr/sbin/sshd -t -f %s
    backup: yes

```
 ### Authors

 * Ansible Core Team
* Michael DeHaan



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_module.html>

ansible.netcommon.cli\_parse – Parse cli output or text using a variety of parsers
==================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.cli_parse`.

   New in version 1.2.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Parse cli output or text using a variety of parsers

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **command**  string  |  | The command to run on the host |
| **parser**  dictionary / required  |  | Parser specific parameters |
|  | **command**  string  |  | The command used to locate the parser's template |
|  | **name**  string / required  |  | The name of the parser to use |
|  | **os**  string  |  | Provide an operating system value to the parser For `ntc\_templates` parser, this should be in the supported `<vendor>\_<os>` format. |
|  | **template\_path**  string  |  | Path of the parser template on the Ansible controller This can be a relative or an absolute path |
|  | **vars**  dictionary  |  | Additional parser specific parameters See the cli\_parse user guide for examples of parser specific variables [https://docs.ansible.com/ansible/latest/network/user\_guide/cli\_parsing.html](../../../network/user_guide/cli_parsing) |
| **set\_fact**  string  |  | Set the resulting parsed data as a fact |
| **text**  string  |  | Text to be parsed |

   
 Notes
-----

  Note

 * The default search path for a parser template is templates/{{ short\_os }}\_{{ command }}.{{ extension }}
* => short\_os derived from ansible\_network\_os or ansible\_distribution and set to lower case
* => command is the command passed to the module with spaces replaced with \_
* => extension is specific to the parser used (native=yaml, textfsm=textfsm, ttp=ttp)
* The default Ansible search path for the templates directory is used for parser templates as well
* Some parsers may have additional configuration options available. See the parsers/vars key and the parser’s documentation
* Some parsers require third-party python libraries be installed on the Ansible control node and a specific python version
* e.g. Pyats requires pyats and genie and requires Python 3
* e.g. ntc\_templates requires ntc\_templates
* e.g. textfsm requires textfsm
* e.g. ttp requires ttp
* e.g. xml requires xml\_to\_dict
* Support of 3rd party python libraries is limited to the use of their public APIs as documented
* Additional information and examples can be found in the parsing user guide:
* [https://docs.ansible.com/ansible/latest/network/user\_guide/cli\_parsing.html](../../../network/user_guide/cli_parsing)

  Examples
--------

 
```
# Using the native parser

# -------------
# templates/nxos_show_interface.yaml
# - example: Ethernet1/1 is up
#   getval: '(?P<name>\S+) is (?P<oper_state>\S+)'
#   result:
#     "{{ name }}":
#         name: "{{ name }}"
#         state:
#         operating: "{{ oper_state }}"
#   shared: True
#
# - example: admin state is up, Dedicated Interface
#   getval: 'admin state is (?P<admin_state>\S+)'
#   result:
#     "{{ name }}":
#         name: "{{ name }}"
#         state:
#         admin: "{{ admin_state }}"
#
# - example: "  Hardware: Ethernet, address: 0000.5E00.5301 (bia 0000.5E00.5301)"
#   getval: '\s+Hardware: (?P<hardware>.*), address: (?P<mac>\S+)'
#   result:
#     "{{ name }}":
#         hardware: "{{ hardware }}"
#         mac_address: "{{ mac }}"

- name: Run command and parse with native
  ansible.netcommon.cli_parse:
    command: "show interface"
    parser:
      name: ansible.netcommon.native
    set_fact: interfaces_fact


- name: Pass text and template_path
  ansible.netcommon.cli_parse:
    text: "{{ previous_command['stdout'] }}"
    parser:
      name: ansible.netcommon.native
      template_path: "{{ role_path }}/templates/nxos_show_interface.yaml"


# Using the ntc_templates parser

# -------------
# The ntc_templates use 'vendor_platform' for the file name
# it will be derived from ansible_network_os if not provided
# e.g. cisco.ios.ios => cisco_ios

- name: Run command and parse with ntc_templates
  ansible.netcommon.cli_parse:
    command: "show interface"
    parser:
      name: ansible.netcommon.ntc_templates
  register: parser_output

- name: Pass text and command
  ansible.netcommon.cli_parse:
    text: "{{ previous_command['stdout'] }}"
    parser:
      name: ansible.netcommon.ntc_templates
      command: show interface
  register: parser_output


# Using the pyats parser

# -------------
# The pyats parser uses 'os' to locate the appropriate parser
# it will be derived from ansible_network_os if not provided
# in the case of pyats: cisco.ios.ios => iosxe

- name: Run command and parse with pyats
  ansible.netcommon.cli_parse:
    command: "show interface"
    parser:
        name: ansible.netcommon.pyats
  register: parser_output

- name: Pass text and command
  ansible.netcommon.cli_parse:
    text: "{{ previous_command['stdout'] }}"
    parser:
        name: ansible.netcommon.pyats
        command: show interface
  register: parser_output

- name: Provide an OS to pyats to use an ios parser
  ansible.netcommon.cli_parse:
    text: "{{ previous_command['stdout'] }}"
    parser:
        name: ansible.netcommon.pyats
        command: show interface
        os: ios
  register: parser_output


# Using the textfsm parser

# -------------
# templates/nxos_show_version.textfsm
#
# Value UPTIME ((\d+\s\w+.s.,?\s?){4})
# Value LAST_REBOOT_REASON (.+)
# Value OS (\d+.\d+(.+)?)
# Value BOOT_IMAGE (.*)
# Value PLATFORM (\w+)
#
# Start
#   ^\s+(NXOS: version|system:\s+version)\s+${OS}\s*$$
#   ^\s+(NXOS|kickstart)\s+image\s+file\s+is:\s+${BOOT_IMAGE}\s*$$
#   ^\s+cisco\s+${PLATFORM}\s+[cC]hassis
#   ^\s+cisco\s+Nexus\d+\s+${PLATFORM}
#   # Cisco N5K platform
#   ^\s+cisco\s+Nexus\s+${PLATFORM}\s+[cC]hassis
#   ^\s+cisco\s+.+-${PLATFORM}\s*
#   ^Kernel\s+uptime\s+is\s+${UPTIME}
#   ^\s+Reason:\s${LAST_REBOOT_REASON} -> Record

- name: Run command and parse with textfsm
  ansible.netcommon.cli_parse:
    command: "show version"
    parser:
      name: ansible.netcommon.textfsm
  register: parser_output

- name: Pass text and command
  ansible.netcommon.cli_parse:
    text: "{{ previous_command['stdout'] }}"
    parser:
      name: ansible.netcommon.textfsm
      command: show version
  register: parser_output

# Using the ttp parser

# -------------
# templates/nxos_show_interface.ttp
#
# {{ interface }} is {{ state }}
# admin state is {{ admin_state }}{{ ignore(".*") }}

- name: Run command and parse with ttp
  ansible.netcommon.cli_parse:
    command: "show interface"
    parser:
      name: ansible.netcommon.ttp
    set_fact: new_fact_key

- name: Pass text and template_path
  ansible.netcommon.cli_parse:
    text: "{{ previous_command['stdout'] }}"
    parser:
      name: ansible.netcommon.ttp
      template_path: "{{ role_path }}/templates/nxos_show_interface.ttp"
  register: parser_output

# Using the XML parser

# -------------
- name: Run command and parse with xml
  ansible.netcommon.cli_parse:
    command: "show interface | xml"
    parser:
      name: ansible.netcommon.xml
  register: parser_output

- name: Pass text and parse with xml
  ansible.netcommon.cli_parse:
    text: "{{ previous_command['stdout'] }}"
    parser:
      name: ansible.netcommon.xml
  register: parser_output

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **parsed**  dictionary  | always | The structured data resulting from the parsing of the text  |
| **stdout**  string  | when provided a command | The output from the command run  |
| **stdout\_lines**  list / elements=string  | when provided a command | The output of the command run split into lines  |

   
  
 ### Authors

 * Bradley Thornton (@cidrblock)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/cli_parse_module.html>

ansible.builtin.command – Execute commands on targets
=====================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `command` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * The `command` module takes the command name followed by a list of space-delimited arguments.
* The given command will be executed on all selected nodes.
* The command(s) will not be processed through the shell, so variables like `$HOSTNAME` and operations like `"*"`, `"<"`, `">"`, `"|"`, `";"` and `"&"` will not work. Use the [ansible.builtin.shell](shell_module#ansible-collections-ansible-builtin-shell-module) module if you need these features.
* To create `command` tasks that are easier to read than the ones using space-delimited arguments, pass parameters using the `args` [task keyword](../reference_appendices/playbooks_keywords#task) or use `cmd` parameter.
* Either a free form command or `cmd` parameter is required, see the examples.
* For Windows targets, use the [ansible.windows.win\_command](../windows/win_command_module#ansible-collections-ansible-windows-win-command-module) module instead.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **argv**  list / elements=string   added in 2.6 of ansible.builtin  |  | Passes the command as a list rather than a string. Use `argv` to avoid quoting values that would otherwise be interpreted incorrectly (for example "user name"). Only the string (free form) or the list (argv) form can be provided, not both. One or the other must be provided. |
| **chdir**  path   added in 0.6 of ansible.builtin  |  | Change into this directory before running the command. |
| **cmd**  string  |  | The command to run. |
| **creates**  path  |  | A filename or (since 2.0) glob pattern. If a matching file already exists, this step **will not** be run. This is checked before *removes* is checked. |
| **free\_form**  string  |  | The command module takes a free form string as a command to run. There is no actual parameter named 'free form'. |
| **removes**  path   added in 0.8 of ansible.builtin  |  | A filename or (since 2.0) glob pattern. If a matching file exists, this step **will** be run. This is checked after *creates* is checked. |
| **stdin**  string   added in 2.4 of ansible.builtin  |  | Set the stdin of the command directly to the specified value. |
| **stdin\_add\_newline**  boolean   added in 2.8 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | If set to `yes`, append a newline to stdin data. |
| **strip\_empty\_ends**  boolean   added in 2.8 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | Strip empty lines from the end of stdout/stderr in result. |
| **warn**  boolean   added in 1.8 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | (deprecated) Enable or disable task warnings. This feature is deprecated and will be removed in 2.14. As of version 2.11, this option is now disabled by default. |

   
 Notes
-----

  Note

 * If you want to run a command through the shell (say you are using `<`, `>`, `|`, and so on), you actually want the [ansible.builtin.shell](shell_module#ansible-collections-ansible-builtin-shell-module) module instead. Parsing shell metacharacters can lead to unexpected commands being executed if quoting is not done correctly so it is more secure to use the `command` module when possible.
* `creates`, `removes`, and `chdir` can be specified after the command. For instance, if you only want to run a command if a certain file does not exist, use this.
* Check mode is supported when passing `creates` or `removes`. If running in check mode and either of these are specified, the module will check for the existence of the file and report the correct changed status. If these are not supplied, the task will be skipped.
* The `executable` parameter is removed since version 2.4. If you have a need for this parameter, use the [ansible.builtin.shell](shell_module#ansible-collections-ansible-builtin-shell-module) module instead.
* For Windows targets, use the [ansible.windows.win\_command](../windows/win_command_module#ansible-collections-ansible-windows-win-command-module) module instead.
* For rebooting systems, use the [ansible.builtin.reboot](reboot_module#ansible-collections-ansible-builtin-reboot-module) or [ansible.windows.win\_reboot](../windows/win_reboot_module#ansible-collections-ansible-windows-win-reboot-module) module.

  See Also
--------

  See also

  [ansible.builtin.raw](raw_module#ansible-collections-ansible-builtin-raw-module)

The official documentation on the **ansible.builtin.raw** module.

  [ansible.builtin.script](script_module#ansible-collections-ansible-builtin-script-module)

The official documentation on the **ansible.builtin.script** module.

  [ansible.builtin.shell](shell_module#ansible-collections-ansible-builtin-shell-module)

The official documentation on the **ansible.builtin.shell** module.

  [ansible.windows.win\_command](../windows/win_command_module#ansible-collections-ansible-windows-win-command-module)

The official documentation on the **ansible.windows.win\_command** module.

    Examples
--------

 
```
- name: Return motd to registered var
  ansible.builtin.command: cat /etc/motd
  register: mymotd

# free-form (string) arguments, all arguments on one line
- name: Run command if /path/to/database does not exist (without 'args')
  ansible.builtin.command: /usr/bin/make_database.sh db_user db_name creates=/path/to/database

# free-form (string) arguments, some arguments on separate lines with the 'args' keyword
# 'args' is a task keyword, passed at the same level as the module
- name: Run command if /path/to/database does not exist (with 'args' keyword)
  ansible.builtin.command: /usr/bin/make_database.sh db_user db_name
  args:
    creates: /path/to/database

# 'cmd' is module parameter
- name: Run command if /path/to/database does not exist (with 'cmd' parameter)
  ansible.builtin.command:
    cmd: /usr/bin/make_database.sh db_user db_name
    creates: /path/to/database

- name: Change the working directory to somedir/ and run the command as db_owner if /path/to/database does not exist
  ansible.builtin.command: /usr/bin/make_database.sh db_user db_name
  become: yes
  become_user: db_owner
  args:
    chdir: somedir/
    creates: /path/to/database

# argv (list) arguments, each argument on a separate line, 'args' keyword not necessary
# 'argv' is a parameter, indented one level from the module
- name: Use 'argv' to send a command as a list - leave 'command' empty
  ansible.builtin.command:
    argv:
      - /usr/bin/make_database.sh
      - Username with whitespace
      - dbname with whitespace
    creates: /path/to/database

- name: Safely use templated variable to run command. Always use the quote filter to avoid injection issues
  ansible.builtin.command: cat {{ myfile|quote }}
  register: myoutput

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **cmd**  list / elements=string  | always | The command executed by the task.  **Sample:** ['echo', 'hello'] |
| **delta**  string  | always | The command execution delta time.  **Sample:** 0:00:00.001529 |
| **end**  string  | always | The command execution end time.  **Sample:** 2017-09-29 22:03:48.084657 |
| **msg**  boolean  | always | changed  **Sample:** True |
| **rc**  integer  | always | The command return code (0 means success).  |
| **start**  string  | always | The command execution start time.  **Sample:** 2017-09-29 22:03:48.083128 |
| **stderr**  string  | always | The command standard error.  **Sample:** ls cannot access foo: No such file or directory |
| **stderr\_lines**  list / elements=string  | always | The command standard error split in lines.  **Sample:** [{"u'ls cannot access foo": "No such file or directory'"}, "u'ls …'"] |
| **stdout**  string  | always | The command standard output.  **Sample:** Clustering node rabbit@slave1 with rabbit@master … |
| **stdout\_lines**  list / elements=string  | always | The command standard output split in lines.  **Sample:** ["u'Clustering node rabbit@slave1 with rabbit@master …'"] |

   
  
 ### Authors

 * Ansible Core Team
* Michael DeHaan



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/command_module.html>

ansible.builtin.file – Manage files and file properties
=======================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `file` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Set attributes of files, symlinks or directories.
* Alternatively, remove files, symlinks or directories.
* Many other modules support the same options as the `file` module - including [ansible.builtin.copy](copy_module#ansible-collections-ansible-builtin-copy-module), [ansible.builtin.template](template_module#ansible-collections-ansible-builtin-template-module), and [ansible.builtin.assemble](assemble_module#ansible-collections-ansible-builtin-assemble-module).
* For Windows targets, use the [ansible.windows.win\_file](../windows/win_file_module#ansible-collections-ansible-windows-win-file-module) module instead.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access\_time**  string   added in 2.7 of ansible.builtin  |  | This parameter indicates the time the file's access time should be set to. Should be `preserve` when no modification is required, `YYYYMMDDHHMM.SS` when using default time format, or `now`. Default is `None` meaning that `preserve` is the default for `state=[file,directory,link,hard]` and `now` is default for `state=touch`. |
| **access\_time\_format**  string   added in 2.7 of ansible.builtin  | **Default:**"%Y%m%d%H%M.%S" | When used with `access_time`, indicates the time format that must be used. Based on default Python format (see time.strftime doc). |
| **attributes**  string   added in 2.3 of ansible.builtin  |  | The attributes the resulting file or directory should have. To get supported flags look at the man page for *chattr* on the target system. This string should contain the attributes in the same order as the one displayed by *lsattr*. The `=` operator is assumed as default, otherwise `+` or `-` operators need to be included in the string. 
aliases: attr |
| **follow**  boolean   added in 1.8 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | This flag indicates that filesystem links, if they exist, should be followed. Previous to Ansible 2.5, this was `no` by default. |
| **force**  boolean  | **Choices:*** **no** ←
* yes
 | Force the creation of the symlinks in two cases: the source file does not exist (but will appear later); the destination exists and is a file (so, we need to unlink the `path` file and create symlink to the `src` file in place of it). |
| **group**  string  |  | Name of the group that should own the file/directory, as would be fed to *chown*. |
| **mode**  raw  |  | The permissions the resulting file or directory should have. For those used to */usr/bin/chmod* remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like `0644` or `01777`) or quote it (like `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination file **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created file. If `mode` is not specified and the destination file **does** exist, the mode of the existing file will be used. Specifying `mode` is the best way to ensure files are created with the correct permissions. See CVE-2020-1736 for further details. |
| **modification\_time**  string   added in 2.7 of ansible.builtin  |  | This parameter indicates the time the file's modification time should be set to. Should be `preserve` when no modification is required, `YYYYMMDDHHMM.SS` when using default time format, or `now`. Default is None meaning that `preserve` is the default for `state=[file,directory,link,hard]` and `now` is default for `state=touch`. |
| **modification\_time\_format**  string   added in 2.7 of ansible.builtin  | **Default:**"%Y%m%d%H%M.%S" | When used with `modification_time`, indicates the time format that must be used. Based on default Python format (see time.strftime doc). |
| **owner**  string  |  | Name of the user that should own the file/directory, as would be fed to *chown*. |
| **path**  path / required  |  | Path to the file being managed. 
aliases: dest, name |
| **recurse**  boolean   added in 1.1 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Recursively set the specified file attributes on directory contents. This applies only when `state` is set to `directory`. |
| **selevel**  string  |  | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the `range`. When set to `_default`, it will use the `level` portion of the policy if available. |
| **serole**  string  |  | The role part of the SELinux file context. When set to `_default`, it will use the `role` portion of the policy if available. |
| **setype**  string  |  | The type part of the SELinux file context. When set to `_default`, it will use the `type` portion of the policy if available. |
| **seuser**  string  |  | The user part of the SELinux file context. By default it uses the `system` policy, where applicable. When set to `_default`, it will use the `user` portion of the policy if available. |
| **src**  path  |  | Path of the file to link to. This applies only to `state=link` and `state=hard`. For `state=link`, this will also accept a non-existing path. Relative paths are relative to the file being created (`path`) which is how the Unix command `ln -s SRC DEST` treats relative paths. |
| **state**  string  | **Choices:*** absent
* directory
* **file** ←
* hard
* link
* touch
 | If `absent`, directories will be recursively deleted, and files or symlinks will be unlinked. In the case of a directory, if `diff` is declared, you will see the files and folders deleted listed under `path_contents`. Note that `absent` will not cause `file` to fail if the `path` does not exist as the state did not change. If `directory`, all intermediate subdirectories will be created if they do not exist. Since Ansible 1.7 they will be created with the supplied permissions. If `file`, with no other options, returns the current state of `path`. If `file`, even with other options (such as `mode`), the file will be modified if it exists but will NOT be created if it does not exist. Set to `touch` or use the [ansible.builtin.copy](copy_module) or [ansible.builtin.template](template_module) module if you want to create the file if it does not exist. If `hard`, the hard link will be created or changed. If `link`, the symbolic link will be created or changed. If `touch` (new in 1.4), an empty file will be created if the `path` does not exist, while an existing file or directory will receive updated file access and modification times (similar to the way `touch` works from the command line). |
| **unsafe\_writes**  boolean   added in 2.2 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. |

   
 Notes
-----

  Note

 * Supports `check_mode`.

  See Also
--------

  See also

  [ansible.builtin.assemble](assemble_module#ansible-collections-ansible-builtin-assemble-module)

The official documentation on the **ansible.builtin.assemble** module.

  [ansible.builtin.copy](copy_module#ansible-collections-ansible-builtin-copy-module)

The official documentation on the **ansible.builtin.copy** module.

  [ansible.builtin.stat](stat_module#ansible-collections-ansible-builtin-stat-module)

The official documentation on the **ansible.builtin.stat** module.

  [ansible.builtin.template](template_module#ansible-collections-ansible-builtin-template-module)

The official documentation on the **ansible.builtin.template** module.

  [ansible.windows.win\_file](../windows/win_file_module#ansible-collections-ansible-windows-win-file-module)

The official documentation on the **ansible.windows.win\_file** module.

    Examples
--------

 
```
- name: Change file ownership, group and permissions
  ansible.builtin.file:
    path: /etc/foo.conf
    owner: foo
    group: foo
    mode: '0644'

- name: Give insecure permissions to an existing file
  ansible.builtin.file:
    path: /work
    owner: root
    group: root
    mode: '1777'

- name: Create a symbolic link
  ansible.builtin.file:
    src: /file/to/link/to
    dest: /path/to/symlink
    owner: foo
    group: foo
    state: link

- name: Create two hard links
  ansible.builtin.file:
    src: '/tmp/{{ item.src }}'
    dest: '{{ item.dest }}'
    state: hard
  loop:
    - { src: x, dest: y }
    - { src: z, dest: k }

- name: Touch a file, using symbolic modes to set the permissions (equivalent to 0644)
  ansible.builtin.file:
    path: /etc/foo.conf
    state: touch
    mode: u=rw,g=r,o=r

- name: Touch the same file, but add/remove some permissions
  ansible.builtin.file:
    path: /etc/foo.conf
    state: touch
    mode: u+rw,g-wx,o-rwx

- name: Touch again the same file, but do not change times this makes the task idempotent
  ansible.builtin.file:
    path: /etc/foo.conf
    state: touch
    mode: u+rw,g-wx,o-rwx
    modification_time: preserve
    access_time: preserve

- name: Create a directory if it does not exist
  ansible.builtin.file:
    path: /etc/some_directory
    state: directory
    mode: '0755'

- name: Update modification and access time of given file
  ansible.builtin.file:
    path: /etc/some_file
    state: file
    modification_time: now
    access_time: now

- name: Set access time based on seconds from epoch value
  ansible.builtin.file:
    path: /etc/another_file
    state: file
    access_time: '{{ "%Y%m%d%H%M.%S" | strftime(stat_var.stat.atime) }}'

- name: Recursively change ownership of a directory
  ansible.builtin.file:
    path: /etc/foo
    state: directory
    recurse: yes
    owner: foo
    group: foo

- name: Remove file (delete file)
  ansible.builtin.file:
    path: /etc/foo.txt
    state: absent

- name: Recursively remove directory
  ansible.builtin.file:
    path: /etc/foo
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **dest**  string  | state=touch, state=hard, state=link | Destination file/path, equal to the value passed to *path*.  **Sample:** /path/to/file.txt |
| **path**  string  | state=absent, state=directory, state=file | Destination file/path, equal to the value passed to *path*.  **Sample:** /path/to/file.txt |

   
  
 ### Authors

 * Ansible Core Team
* Michael DeHaan



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html>

ansible.builtin.service\_facts – Return service state information as fact data
==============================================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `service_facts` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 2.5: of ansible.builtin

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Notes](#notes)
* [Examples](#examples)
* [Returned Facts](#returned-facts)

 Synopsis
--------

 * Return service state information as fact data for various service management utilities.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * Any of the following supported init systems: systemd, sysv, upstart, AIX SRC

 Notes
-----

  Note

 * When accessing the `ansible_facts.services` facts collected by this module, it is recommended to not use “dot notation” because services can have a `-` character in their name which would result in invalid “dot notation”, such as `ansible_facts.services.zuul-gateway`. It is instead recommended to using the string value of the service name as the key in order to obtain the fact data value like `ansible_facts.services['zuul-gateway']`
* AIX SRC was added in version 2.11.
* Supports `check_mode`.

  Examples
--------

 
```
- name: Populate service facts
  ansible.builtin.service_facts:

- name: Print service facts
  ansible.builtin.debug:
    var: ansible_facts.services

```
 Returned Facts
--------------

 Facts returned by this module are added/updated in the `hostvars` host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.

 

| Fact | Returned | Description |
| --- | --- | --- |
| **services**  complex / elements=string  | always | States of the services with service name as key.   |
|  | **name**  string / elements=string  | always | Name of the service.   **Sample:** arp-ethers.service |
|  | **source**  string / elements=string  | always | Init system of the service.  One of `rcctl`, `systemd`, `sysv`, `upstart`, `src`.   **Sample:** sysv |
|  | **state**  string / elements=string  | always | State of the service.  Either `failed`, `running`, `stopped`, or `unknown`.   **Sample:** running |
|  | **status**  string / elements=string  | systemd systems or RedHat/SUSE flavored sysvinit/upstart or OpenBSD | State of the service.  Either `enabled`, `disabled`, `static`, `indirect` or `unknown`.   **Sample:** enabled |

   
  
 ### Authors

 * Adam Miller (@maxamillion)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/service_facts_module.html>

ansible.builtin.set\_stats – Define and display stats for the current ansible run
=================================================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `set_stats` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 2.3: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * This module allows setting/accumulating stats on the current ansible run, either per host or for all hosts in the run.
* This module is also supported for Windows targets.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate**  boolean  | **Choices:*** no
* **yes** ←
 | Whether the provided value is aggregated to the existing stat `yes` or will replace it `no`. |
| **data**  dictionary / required  |  | A dictionary of which each key represents a stat (or variable) you want to keep track of. |
| **per\_host**  boolean  | **Choices:*** **no** ←
* yes
 | whether the stats are per host or for all hosts in the run. |

   
 Notes
-----

  Note

 * In order for custom stats to be displayed, you must set `show_custom_stats` in section `[defaults]` in `ansible.cfg` or by defining environment variable `ANSIBLE_SHOW_CUSTOM_STATS` to `yes`.
* This module is also supported for Windows targets.

  Examples
--------

 
```
- name: Aggregating packages_installed stat per host
  ansible.builtin.set_stats:
    data:
      packages_installed: 31
    per_host: yes

- name: Aggregating random stats for all hosts using complex arguments
  ansible.builtin.set_stats:
    data:
      one_stat: 11
      other_stat: "{{ local_var * 2 }}"
      another_stat: "{{ some_registered_var.results | map(attribute='ansible_facts.some_fact') | list }}"
    per_host: no

- name: Setting stats (not aggregating)
  ansible.builtin.set_stats:
    data:
      the_answer: 42
    aggregate: no

```
 ### Authors

 * Brian Coca (@bcoca)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/set_stats_module.html>

ansible.builtin.include\_tasks – Dynamically include a task list
================================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `include_tasks` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 2.4: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Includes a file with a list of tasks to be executed in the current playbook.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **apply**  string   added in 2.7 of ansible.builtin  |  | Accepts a hash of task keywords (e.g. `tags`, `become`) that will be applied to the tasks within the include. |
| **file**  string   added in 2.7 of ansible.builtin  |  | The name of the imported file is specified directly without any other option. Unlike [ansible.builtin.import\_tasks](import_tasks_module), most keywords, including loop, with\_items, and conditionals, apply to this statement. The do until loop is not supported on [ansible.builtin.include\_tasks](include_tasks_module). |
| **free-form**  string  |  | Supplying a file name via free-form `- include_tasks: file.yml` of a file to be included is the equivalent of specifying an argument of *file*. |

   
 Notes
-----

  Note

 * This is a core feature of the Ansible, rather than a module, and cannot be overridden like a module.

  See Also
--------

  See also

  [ansible.builtin.import\_playbook](import_playbook_module#ansible-collections-ansible-builtin-import-playbook-module)

The official documentation on the **ansible.builtin.import\_playbook** module.

  [ansible.builtin.import\_role](import_role_module#ansible-collections-ansible-builtin-import-role-module)

The official documentation on the **ansible.builtin.import\_role** module.

  [ansible.builtin.import\_tasks](import_tasks_module#ansible-collections-ansible-builtin-import-tasks-module)

The official documentation on the **ansible.builtin.import\_tasks** module.

  [ansible.builtin.include\_role](include_role_module#ansible-collections-ansible-builtin-include-role-module)

The official documentation on the **ansible.builtin.include\_role** module.

  [Including and importing](../../../user_guide/playbooks_reuse_includes#playbooks-reuse-includes)

More information related to including and importing playbooks, roles and tasks.

    Examples
--------

 
```
- hosts: all
  tasks:
    - debug:
        msg: task1

    - name: Include task list in play
      include_tasks: stuff.yaml

    - debug:
        msg: task10

- hosts: all
  tasks:
    - debug:
        msg: task1

    - name: Include task list in play only if the condition is true
      include_tasks: "{{ hostvar }}.yaml"
      when: hostvar is defined

- name: Apply tags to tasks within included file
  include_tasks:
    file: install.yml
    apply:
      tags:
        - install
  tags:
    - always

- name: Apply tags to tasks within included file when using free-form
  include_tasks: install.yml
  args:
    apply:
      tags:
        - install
  tags:
    - always

```
 ### Authors

 * Ansible Core Team (@ansible)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/include_tasks_module.html>

ansible.builtin.user – Manage user accounts
===========================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `user` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 0.2: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Manage user accounts and user attributes.
* For Windows targets, use the [ansible.windows.win\_user](../windows/win_user_module#ansible-collections-ansible-windows-win-user-module) module instead.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **append**  boolean  | **Choices:*** **no** ←
* yes
 | If `yes`, add the user to the groups specified in `groups`. If `no`, user will only be added to the groups specified in `groups`, removing them from all other groups. |
| **authorization**  string   added in 2.8 of ansible.builtin  |  | Sets the authorization of the user. Does nothing when used with other platforms. Can set multiple authorizations using comma separation. To delete all authorizations, use `authorization=''`. Currently supported on Illumos/Solaris. |
| **comment**  string  |  | Optionally sets the description (aka *GECOS*) of user account. |
| **create\_home**  boolean  | **Choices:*** no
* **yes** ←
 | Unless set to `no`, a home directory will be made for the user when the account is created or if the home directory does not exist. Changed from `createhome` to `create_home` in Ansible 2.5. 
aliases: createhome |
| **expires**  float   added in 1.9 of ansible.builtin  |  | An expiry time for the user in epoch, it will be ignored on platforms that do not support this. Currently supported on GNU/Linux, FreeBSD, and DragonFlyBSD. Since Ansible 2.6 you can remove the expiry time by specifying a negative value. Currently supported on GNU/Linux and FreeBSD. |
| **force**  boolean  | **Choices:*** **no** ←
* yes
 | This only affects `state=absent`, it forces removal of the user and associated directories on supported platforms. The behavior is the same as `userdel --force`, check the man page for `userdel` on your system for details and support. When used with `generate_ssh_key=yes` this forces an existing key to be overwritten. |
| **generate\_ssh\_key**  boolean   added in 0.9 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Whether to generate a SSH key for the user in question. This will **not** overwrite an existing SSH key unless used with `force=yes`. |
| **group**  string  |  | Optionally sets the user's primary group (takes a group name). |
| **groups**  list / elements=string  |  | List of groups user will be added to. When set to an empty string `''`, the user is removed from all groups except the primary group. Before Ansible 2.3, the only input format allowed was a comma separated string. |
| **hidden**  boolean   added in 2.6 of ansible.builtin  | **Choices:*** no
* yes
 | macOS only, optionally hide the user from the login window and system preferences. The default will be `yes` if the *system* option is used. |
| **home**  path  |  | Optionally set the user's home directory. |
| **local**  boolean   added in 2.4 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Forces the use of "local" command alternatives on platforms that implement it. This is useful in environments that use centralized authentication when you want to manipulate the local users (in other words, it uses `luseradd` instead of `useradd`). This will check `/etc/passwd` for an existing account before invoking commands. If the local account database exists somewhere other than `/etc/passwd`, this setting will not work properly. This requires that the above commands as well as `/etc/passwd` must exist on the target host, otherwise it will be a fatal error. |
| **login\_class**  string  |  | Optionally sets the user's login class, a feature of most BSD OSs. |
| **move\_home**  boolean  | **Choices:*** **no** ←
* yes
 | If set to `yes` when used with `home:` , attempt to move the user's old home directory to the specified directory if it isn't there already and the old home exists. |
| **name**  string / required  |  | Name of the user to create, remove or modify. 
aliases: user |
| **non\_unique**  boolean   added in 1.1 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Optionally when used with the -u option, this option allows to change the user ID to a non-unique value. |
| **password**  string  |  | Optionally set the user's password to this crypted value. On macOS systems, this value has to be cleartext. Beware of security issues. To create a disabled account on Linux systems, set this to `'!'` or `'*'`. To create a disabled account on OpenBSD, set this to `'*************'`. See [FAQ entry](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-generate-encrypted-passwords-for-the-user-module) for details on various ways to generate these password values. |
| **password\_expire\_max**  integer   added in 2.11 of ansible.builtin  |  | Maximum number of days between password change. Supported on Linux only. |
| **password\_expire\_min**  integer   added in 2.11 of ansible.builtin  |  | Minimum number of days between password change. Supported on Linux only. |
| **password\_lock**  boolean   added in 2.6 of ansible.builtin  | **Choices:*** no
* yes
 | Lock the password (`usermod -L`, `usermod -U`, `pw lock`). Implementation differs by platform. This option does not always mean the user cannot login using other methods. This option does not disable the user, only lock the password. This must be set to `False` in order to unlock a currently locked password. The absence of this parameter will not unlock a password. Currently supported on Linux, FreeBSD, DragonFlyBSD, NetBSD, OpenBSD. |
| **profile**  string   added in 2.8 of ansible.builtin  |  | Sets the profile of the user. Does nothing when used with other platforms. Can set multiple profiles using comma separation. To delete all the profiles, use `profile=''`. Currently supported on Illumos/Solaris. |
| **remove**  boolean  | **Choices:*** **no** ←
* yes
 | This only affects `state=absent`, it attempts to remove directories associated with the user. The behavior is the same as `userdel --remove`, check the man page for details and support. |
| **role**  string   added in 2.8 of ansible.builtin  |  | Sets the role of the user. Does nothing when used with other platforms. Can set multiple roles using comma separation. To delete all roles, use `role=''`. Currently supported on Illumos/Solaris. |
| **seuser**  string   added in 2.1 of ansible.builtin  |  | Optionally sets the seuser type (user\_u) on selinux enabled systems. |
| **shell**  string  |  | Optionally set the user's shell. On macOS, before Ansible 2.5, the default shell for non-system users was `/usr/bin/false`. Since Ansible 2.5, the default shell for non-system users on macOS is `/bin/bash`. See notes for details on how other operating systems determine the default shell by the underlying tool. |
| **skeleton**  string   added in 2.0 of ansible.builtin  |  | Optionally set a home skeleton directory. Requires `create_home` option! |
| **ssh\_key\_bits**  integer   added in 0.9 of ansible.builtin  | **Default:**"default set by ssh-keygen" | Optionally specify number of bits in SSH key to create. |
| **ssh\_key\_comment**  string   added in 0.9 of ansible.builtin  | **Default:**"ansible-generated on $HOSTNAME" | Optionally define the comment for the SSH key. |
| **ssh\_key\_file**  path   added in 0.9 of ansible.builtin  |  | Optionally specify the SSH key filename. If this is a relative filename then it will be relative to the user's home directory. This parameter defaults to *.ssh/id\_rsa*. |
| **ssh\_key\_passphrase**  string   added in 0.9 of ansible.builtin  |  | Set a passphrase for the SSH key. If no passphrase is provided, the SSH key will default to having no passphrase. |
| **ssh\_key\_type**  string   added in 0.9 of ansible.builtin  | **Default:**"rsa" | Optionally specify the type of SSH key to generate. Available SSH key types will depend on implementation present on target host. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | Whether the account should exist or not, taking action if the state is different from what is stated. |
| **system**  boolean  | **Choices:*** **no** ←
* yes
 | When creating an account `state=present`, setting this to `yes` makes the user a system account. This setting cannot be changed on existing users. |
| **uid**  integer  |  | Optionally sets the *UID* of the user. |
| **update\_password**  string   added in 1.3 of ansible.builtin  | **Choices:*** **always** ←
* on\_create
 | 
`always` will update passwords if they differ. 
`on_create` will only set the password for newly created users. |

   
 Notes
-----

  Note

 * There are specific requirements per platform on user management utilities. However they generally come pre-installed with the system and Ansible will require they are present at runtime. If they are not, a descriptive error message will be shown.
* On SunOS platforms, the shadow file is backed up automatically since this module edits it directly. On other platforms, the shadow file is backed up by the underlying tools used by this module.
* On macOS, this module uses `dscl` to create, modify, and delete accounts. `dseditgroup` is used to modify group membership. Accounts are hidden from the login window by modifying `/Library/Preferences/com.apple.loginwindow.plist`.
* On FreeBSD, this module uses `pw useradd` and `chpass` to create, `pw usermod` and `chpass` to modify, `pw userdel` remove, `pw lock` to lock, and `pw unlock` to unlock accounts.
* On all other platforms, this module uses `useradd` to create, `usermod` to modify, and `userdel` to remove accounts.
* Supports `check_mode`.

  See Also
--------

  See also

  [ansible.posix.authorized\_key](../posix/authorized_key_module#ansible-collections-ansible-posix-authorized-key-module)

The official documentation on the **ansible.posix.authorized\_key** module.

  [ansible.builtin.group](group_module#ansible-collections-ansible-builtin-group-module)

The official documentation on the **ansible.builtin.group** module.

  [ansible.windows.win\_user](../windows/win_user_module#ansible-collections-ansible-windows-win-user-module)

The official documentation on the **ansible.windows.win\_user** module.

    Examples
--------

 
```
- name: Add the user 'johnd' with a specific uid and a primary group of 'admin'
  ansible.builtin.user:
    name: johnd
    comment: John Doe
    uid: 1040
    group: admin

- name: Add the user 'james' with a bash shell, appending the group 'admins' and 'developers' to the user's groups
  ansible.builtin.user:
    name: james
    shell: /bin/bash
    groups: admins,developers
    append: yes

- name: Remove the user 'johnd'
  ansible.builtin.user:
    name: johnd
    state: absent
    remove: yes

- name: Create a 2048-bit SSH key for user jsmith in ~jsmith/.ssh/id_rsa
  ansible.builtin.user:
    name: jsmith
    generate_ssh_key: yes
    ssh_key_bits: 2048
    ssh_key_file: .ssh/id_rsa

- name: Added a consultant whose account you want to expire
  ansible.builtin.user:
    name: james18
    shell: /bin/zsh
    groups: developers
    expires: 1422403387

- name: Starting at Ansible 2.6, modify user, remove expiry time
  ansible.builtin.user:
    name: james18
    expires: -1

- name: Set maximum expiration date for password
  user:
    name: ram19
    password_expire_max: 10

- name: Set minimum expiration date for password
  user:
    name: pushkar15
    password_expire_min: 5

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **append**  boolean  | When state is `present` and the user exists | Whether or not to append the user to groups.  **Sample:** True |
| **comment**  string  | When user exists | Comment section from passwd file, usually the user name.  **Sample:** Agent Smith |
| **create\_home**  boolean  | When user does not exist and not check mode | Whether or not to create the home directory.  **Sample:** True |
| **force**  boolean  | When *state* is `absent` and user exists | Whether or not a user account was forcibly deleted.  |
| **group**  integer  | When user exists | Primary user group ID  **Sample:** 1001 |
| **groups**  string  | When *groups* is not empty and *state* is `present` | List of groups of which the user is a member.  **Sample:** chrony,apache |
| **home**  string  | When *state* is `present` | Path to user's home directory.  **Sample:** /home/asmith |
| **move\_home**  boolean  | When *state* is `present` and user exists | Whether or not to move an existing home directory.  |
| **name**  string  | always | User account name.  **Sample:** asmith |
| **password**  string  | When *state* is `present` and *password* is not empty | Masked value of the password.  **Sample:** NOT\_LOGGING\_PASSWORD |
| **password\_expire\_max**  integer  | When user exists | Maximum number of days during which a password is valid.  **Sample:** 20 |
| **password\_expire\_min**  integer  | When user exists | Minimum number of days between password change  **Sample:** 20 |
| **remove**  boolean  | When *state* is `absent` and user exists | Whether or not to remove the user account.  **Sample:** True |
| **shell**  string  | When *state* is `present` | User login shell.  **Sample:** /bin/bash |
| **ssh\_fingerprint**  string  | When *generate\_ssh\_key* is `True` | Fingerprint of generated SSH key.  **Sample:** 2048 SHA256:aYNHYcyVm87Igh0IMEDMbvW0QDlRQfE0aJugp684ko8 ansible-generated on host (RSA) |
| **ssh\_key\_file**  string  | When *generate\_ssh\_key* is `True` | Path to generated SSH private key file.  **Sample:** /home/asmith/.ssh/id\_rsa |
| **ssh\_public\_key**  string  | When *generate\_ssh\_key* is `True` | Generated SSH public key file.  **Sample:** 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC95opt4SPEC06tOYsJQJIuN23BbLMGmYo8ysVZQc4h2DZE9ugbjWWGS1/pweUGjVstgzMkBEeBCByaEf/RJKNecKRPeGd2Bw9DCj/bn5Z6rGfNENKBmo 618mUJBvdlEgea96QGjOwSB7/gmonduC7gsWDMNcOdSE3wJMTim4lddiBx4RgC9yXsJ6Tkz9BHD73MXPpT5ETnse+A3fw3IGVSjaueVnlUyUmOBf7fzmZbhlFVXf2Zi2rFTXqvbdGHKkzpw1U8eB8xFPP7y d5u1u0e6Acju/8aZ/l17IDFiLke5IzlqIMRTEbDwLNeO84YQKWTm9fODHzhYe0yvxqLiK07 ansible-generated on host' |
| **stderr**  string  | When stderr is returned by a command that is run | Standard error from running commands.  **Sample:** Group wheels does not exist |
| **stdout**  string  | When standard output is returned by the command that is run | Standard output from running commands.  |
| **system**  boolean  | When *system* is passed to the module and the account does not exist | Whether or not the account is a system account.  **Sample:** True |
| **uid**  integer  | When *uid* is passed to the module | User ID of the user account.  **Sample:** 1044 |

   
  
 ### Authors

 * Stephen Fromm (@sfromm)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/user_module.html>

ansible.builtin.iptables – Modify iptables rules
================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `iptables` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 2.0: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * `iptables` is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel.
* This module does not handle the saving and/or loading of rules, but rather only manipulates the current rules that are present in memory. This is the same as the behaviour of the `iptables` and `ip6tables` command which this module uses internally.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action**  string   added in 2.2 of ansible.builtin  | **Choices:*** **append** ←
* insert
 | Whether the rule should be appended at the bottom or inserted at the top. If the rule already exists the chain will not be modified. |
| **chain**  string  |  | Specify the iptables chain to modify. This could be a user-defined chain or one of the standard iptables chains, like `INPUT`, `FORWARD`, `OUTPUT`, `PREROUTING`, `POSTROUTING`, `SECMARK` or `CONNSECMARK`. |
| **comment**  string  |  | This specifies a comment that will be added to the rule. |
| **ctstate**  list / elements=string  | **Default:**[] | A list of the connection states to match in the conntrack module. Possible values are `INVALID`, `NEW`, `ESTABLISHED`, `RELATED`, `UNTRACKED`, `SNAT`, `DNAT`. |
| **destination**  string  |  | Destination specification. Address can be either a network name, a hostname, a network IP address (with /mask), or a plain IP address. Hostnames will be resolved once only, before the rule is submitted to the kernel. Please note that specifying any name to be resolved with a remote query such as DNS is a really bad idea. The mask can be either a network mask or a plain number, specifying the number of 1's at the left side of the network mask. Thus, a mask of 24 is equivalent to 255.255.255.0. A `!` argument before the address specification inverts the sense of the address. |
| **destination\_port**  string  |  | Destination port or port range specification. This can either be a service name or a port number. An inclusive range can also be specified, using the format first:last. If the first port is omitted, '0' is assumed; if the last is omitted, '65535' is assumed. If the first port is greater than the second one they will be swapped. This is only valid if the rule also specifies one of the following protocols: tcp, udp, dccp or sctp. |
| **destination\_ports**  list / elements=string   added in 2.11 of ansible.builtin  |  | This specifies multiple destination port numbers or port ranges to match in the multiport module. It can only be used in conjunction with the protocols tcp, udp, udplite, dccp and sctp. |
| **dst\_range**  string   added in 2.8 of ansible.builtin  |  | Specifies the destination IP range to match in the iprange module. |
| **flush**  boolean   added in 2.2 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Flushes the specified table and chain of all rules. If no chain is specified then the entire table is purged. Ignores all other parameters. |
| **fragment**  string  |  | This means that the rule only refers to second and further fragments of fragmented packets. Since there is no way to tell the source or destination ports of such a packet (or ICMP type), such a packet will not match any rules which specify them. When the "!" argument precedes fragment argument, the rule will only match head fragments, or unfragmented packets. |
| **gateway**  string   added in 2.8 of ansible.builtin  |  | This specifies the IP address of host to send the cloned packets. This option is only valid when `jump` is set to `TEE`. |
| **gid\_owner**  string   added in 2.9 of ansible.builtin  |  | Specifies the GID or group to use in match by owner rule. |
| **goto**  string  |  | This specifies that the processing should continue in a user specified chain. Unlike the jump argument return will not continue processing in this chain but instead in the chain that called us via jump. |
| **icmp\_type**  string   added in 2.2 of ansible.builtin  |  | This allows specification of the ICMP type, which can be a numeric ICMP type, type/code pair, or one of the ICMP type names shown by the command 'iptables -p icmp -h' |
| **in\_interface**  string  |  | Name of an interface via which a packet was received (only for packets entering the `INPUT`, `FORWARD` and `PREROUTING` chains). When the `!` argument is used before the interface name, the sense is inverted. If the interface name ends in a `+`, then any interface which begins with this name will match. If this option is omitted, any interface name will match. |
| **ip\_version**  string  | **Choices:*** **ipv4** ←
* ipv6
 | Which version of the IP protocol this rule should apply to. |
| **jump**  string  |  | This specifies the target of the rule; i.e., what to do if the packet matches it. The target can be a user-defined chain (other than the one this rule is in), one of the special builtin targets which decide the fate of the packet immediately, or an extension (see EXTENSIONS below). If this option is omitted in a rule (and the goto parameter is not used), then matching the rule will have no effect on the packet's fate, but the counters on the rule will be incremented. |
| **limit**  string  |  | Specifies the maximum average number of matches to allow per second. The number can specify units explicitly, using `/second', `/minute', `/hour' or `/day', or parts of them (so `5/second' is the same as `5/s'). |
| **limit\_burst**  string   added in 2.1 of ansible.builtin  |  | Specifies the maximum burst before the above limit kicks in. |
| **log\_level**  string   added in 2.8 of ansible.builtin  | **Choices:*** 0
* 1
* 2
* 3
* 4
* 5
* 6
* 7
* emerg
* alert
* crit
* error
* warning
* notice
* info
* debug
 | Logging level according to the syslogd-defined priorities. The value can be strings or numbers from 1-8. This parameter is only applicable if `jump` is set to `LOG`. |
| **log\_prefix**  string   added in 2.5 of ansible.builtin  |  | Specifies a log text for the rule. Only make sense with a LOG jump. |
| **match**  list / elements=string  | **Default:**[] | Specifies a match to use, that is, an extension module that tests for a specific property. The set of matches make up the condition under which a target is invoked. Matches are evaluated first to last if specified as an array and work in short-circuit fashion, i.e. if one extension yields false, evaluation will stop. |
| **match\_set**  string   added in 2.11 of ansible.builtin  |  | Specifies a set name which can be defined by ipset. Must be used together with the match\_set\_flags parameter. When the `!` argument is prepended then it inverts the rule. Uses the iptables set extension. |
| **match\_set\_flags**  string   added in 2.11 of ansible.builtin  | **Choices:*** src
* dst
* src,dst
* dst,src
 | Specifies the necessary flags for the match\_set parameter. Must be used together with the match\_set parameter. Uses the iptables set extension. |
| **out\_interface**  string  |  | Name of an interface via which a packet is going to be sent (for packets entering the `FORWARD`, `OUTPUT` and `POSTROUTING` chains). When the `!` argument is used before the interface name, the sense is inverted. If the interface name ends in a `+`, then any interface which begins with this name will match. If this option is omitted, any interface name will match. |
| **policy**  string   added in 2.2 of ansible.builtin  | **Choices:*** ACCEPT
* DROP
* QUEUE
* RETURN
 | Set the policy for the chain to the given target. Only built-in chains can have policies. This parameter requires the `chain` parameter. If you specify this parameter, all other parameters will be ignored. This parameter is used to set default policy for the given `chain`. Do not confuse this with `jump` parameter. |
| **protocol**  string  |  | The protocol of the rule or of the packet to check. The specified protocol can be one of `tcp`, `udp`, `udplite`, `icmp`, `ipv6-icmp` or `icmpv6`, `esp`, `ah`, `sctp` or the special keyword `all`, or it can be a numeric value, representing one of these protocols or a different one. A protocol name from */etc/protocols* is also allowed. A `!` argument before the protocol inverts the test. The number zero is equivalent to all. 
`all` will match with all protocols and is taken as default when this option is omitted. |
| **reject\_with**  string   added in 2.1 of ansible.builtin  |  | Specifies the error packet type to return while rejecting. It implies "jump: REJECT". |
| **rule\_num**  string   added in 2.5 of ansible.builtin  |  | Insert the rule as the given rule number. This works only with `action=insert`. |
| **set\_counters**  string  |  | This enables the administrator to initialize the packet and byte counters of a rule (during `INSERT`, `APPEND`, `REPLACE` operations). |
| **set\_dscp\_mark**  string   added in 2.1 of ansible.builtin  |  | This allows specifying a DSCP mark to be added to packets. It takes either an integer or hex value. Mutually exclusive with `set_dscp_mark_class`. |
| **set\_dscp\_mark\_class**  string   added in 2.1 of ansible.builtin  |  | This allows specifying a predefined DiffServ class which will be translated to the corresponding DSCP mark. Mutually exclusive with `set_dscp_mark`. |
| **source**  string  |  | Source specification. Address can be either a network name, a hostname, a network IP address (with /mask), or a plain IP address. Hostnames will be resolved once only, before the rule is submitted to the kernel. Please note that specifying any name to be resolved with a remote query such as DNS is a really bad idea. The mask can be either a network mask or a plain number, specifying the number of 1's at the left side of the network mask. Thus, a mask of 24 is equivalent to 255.255.255.0. A `!` argument before the address specification inverts the sense of the address. |
| **source\_port**  string  |  | Source port or port range specification. This can either be a service name or a port number. An inclusive range can also be specified, using the format `first:last`. If the first port is omitted, `0` is assumed; if the last is omitted, `65535` is assumed. If the first port is greater than the second one they will be swapped. |
| **src\_range**  string   added in 2.8 of ansible.builtin  |  | Specifies the source IP range to match in the iprange module. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | Whether the rule should be absent or present. |
| **syn**  string   added in 2.5 of ansible.builtin  | **Choices:*** **ignore** ←
* match
* negate
 | This allows matching packets that have the SYN bit set and the ACK and RST bits unset. When negated, this matches all packets with the RST or the ACK bits set. |
| **table**  string  | **Choices:*** **filter** ←
* nat
* mangle
* raw
* security
 | This option specifies the packet matching table which the command should operate on. If the kernel is configured with automatic module loading, an attempt will be made to load the appropriate module for that table if it is not already there. |
| **tcp\_flags**  dictionary   added in 2.4 of ansible.builtin  | **Default:**{} | TCP flags specification. 
`tcp_flags` expects a dict with the two keys `flags` and `flags_set`. |
|  | **flags**  list / elements=string  |  | List of flags you want to examine. |
|  | **flags\_set**  list / elements=string  |  | Flags to be set. |
| **to\_destination**  string   added in 2.1 of ansible.builtin  |  | This specifies a destination address to use with `DNAT`. Without this, the destination address is never altered. |
| **to\_ports**  string  |  | This specifies a destination port or range of ports to use, without this, the destination port is never altered. This is only valid if the rule also specifies one of the protocol `tcp`, `udp`, `dccp` or `sctp`. |
| **to\_source**  string   added in 2.2 of ansible.builtin  |  | This specifies a source address to use with `SNAT`. Without this, the source address is never altered. |
| **uid\_owner**  string   added in 2.1 of ansible.builtin  |  | Specifies the UID or username to use in match by owner rule. From Ansible 2.6 when the `!` argument is prepended then the it inverts the rule to apply instead to all users except that one specified. |
| **wait**  string   added in 2.10 of ansible.builtin  |  | Wait N seconds for the xtables lock to prevent multiple instances of the program from running concurrently. |

   
 Notes
-----

  Note

 * This module just deals with individual rules.If you need advanced chaining of rules the recommended way is to template the iptables restore file.

  Examples
--------

 
```
- name: Block specific IP
  ansible.builtin.iptables:
    chain: INPUT
    source: 8.8.8.8
    jump: DROP
  become: yes

- name: Forward port 80 to 8600
  ansible.builtin.iptables:
    table: nat
    chain: PREROUTING
    in_interface: eth0
    protocol: tcp
    match: tcp
    destination_port: 80
    jump: REDIRECT
    to_ports: 8600
    comment: Redirect web traffic to port 8600
  become: yes

- name: Allow related and established connections
  ansible.builtin.iptables:
    chain: INPUT
    ctstate: ESTABLISHED,RELATED
    jump: ACCEPT
  become: yes

- name: Allow new incoming SYN packets on TCP port 22 (SSH)
  ansible.builtin.iptables:
    chain: INPUT
    protocol: tcp
    destination_port: 22
    ctstate: NEW
    syn: match
    jump: ACCEPT
    comment: Accept new SSH connections.

- name: Match on IP ranges
  ansible.builtin.iptables:
    chain: FORWARD
    src_range: 192.168.1.100-192.168.1.199
    dst_range: 10.0.0.1-10.0.0.50
    jump: ACCEPT

- name: Allow source IPs defined in ipset "admin_hosts" on port 22
  ansible.builtin.iptables:
    chain: INPUT
    match_set: admin_hosts
    match_set_flags: src
    destination_port: 22
    jump: ALLOW

- name: Tag all outbound tcp packets with DSCP mark 8
  ansible.builtin.iptables:
    chain: OUTPUT
    jump: DSCP
    table: mangle
    set_dscp_mark: 8
    protocol: tcp

- name: Tag all outbound tcp packets with DSCP DiffServ class CS1
  ansible.builtin.iptables:
    chain: OUTPUT
    jump: DSCP
    table: mangle
    set_dscp_mark_class: CS1
    protocol: tcp

- name: Insert a rule on line 5
  ansible.builtin.iptables:
    chain: INPUT
    protocol: tcp
    destination_port: 8080
    jump: ACCEPT
    action: insert
    rule_num: 5

# Think twice before running following task as this may lock target system
- name: Set the policy for the INPUT chain to DROP
  ansible.builtin.iptables:
    chain: INPUT
    policy: DROP

- name: Reject tcp with tcp-reset
  ansible.builtin.iptables:
    chain: INPUT
    protocol: tcp
    reject_with: tcp-reset
    ip_version: ipv4

- name: Set tcp flags
  ansible.builtin.iptables:
    chain: OUTPUT
    jump: DROP
    protocol: tcp
    tcp_flags:
      flags: ALL
      flags_set:
        - ACK
        - RST
        - SYN
        - FIN

- name: Iptables flush filter
  ansible.builtin.iptables:
    chain: "{{ item }}"
    flush: yes
  with_items:  [ 'INPUT', 'FORWARD', 'OUTPUT' ]

- name: Iptables flush nat
  ansible.builtin.iptables:
    table: nat
    chain: '{{ item }}'
    flush: yes
  with_items: [ 'INPUT', 'OUTPUT', 'PREROUTING', 'POSTROUTING' ]

- name: Log packets arriving into an user-defined chain
  ansible.builtin.iptables:
    chain: LOGGING
    action: append
    state: present
    limit: 2/second
    limit_burst: 20
    log_prefix: "IPTABLES:INFO: "
    log_level: info

- name: Allow connections on multiple ports
  ansible.builtin.iptables:
    chain: INPUT
    protocol: tcp
    destination_ports:
      - "80"
      - "443"
      - "8081:8083"
    jump: ACCEPT

```
 ### Authors

 * Linus Unnebäck (@LinusU) <[linus@folkdatorn.se](https://docs.ansible.com/cdn-cgi/l/email-protection#274b4e495254010414101c010412151c0104131f1c41484b4c434653485549010413111c5442)>
* Sébastien DA ROCHA (@sebastiendarocha)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/iptables_module.html>

ansible.netcommon.netconf – Provides a persistent connection using the netconf protocol
=======================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.netconf`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)

 Synopsis
--------

 * This connection plugin provides a connection to remote devices over the SSH NETCONF subsystem. This connection plugin is typically used by network devices for sending and receiving RPC calls over NETCONF.
* Note this connection plugin requires ncclient to be installed on the local Ansible controller.

 Requirements
------------

 The below requirements are needed on the local controller node that executes this connection.

 * ncclient

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **host**  string  | **Default:**"inventory\_hostname" |  var: ansible\_host  | Specifies the remote device FQDN or IP address to establish the SSH connection to. |
| **host\_key\_checking**  boolean  | **Choices:*** no
* **yes** ←
 |  ini entries:  [defaults]host\_key\_checking = yes   [paramiko\_connection]host\_key\_checking = yes    env:ANSIBLE\_HOST\_KEY\_CHECKING   env:ANSIBLE\_SSH\_HOST\_KEY\_CHECKING   env:ANSIBLE\_NETCONF\_HOST\_KEY\_CHECKING   var: ansible\_host\_key\_checking   var: ansible\_ssh\_host\_key\_checking   var: ansible\_netconf\_host\_key\_checking  | Set this to "False" if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host |
| **import\_modules**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [ansible\_network]import\_modules = no    env:ANSIBLE\_NETWORK\_IMPORT\_MODULES   var: ansible\_network\_import\_modules  | Reduce CPU usage and network module execution time by enabling direct execution. Instead of the module being packaged and executed by the shell, it will be directly executed by the Ansible control node using the same python interpreter as the Ansible process. Note- Incompatible with `asynchronous mode`. Note- Python 3 and Ansible 2.9.16 or greater required. Note- With Ansible 2.9.x fully qualified modules names are required in tasks. |
| **look\_for\_keys**  boolean  | **Choices:*** no
* **yes** ←
 |  ini entries:  [paramiko\_connection]look\_for\_keys = yes    env:ANSIBLE\_PARAMIKO\_LOOK\_FOR\_KEYS  | Enables looking for ssh keys in the usual locations for ssh keys (e.g. :file:`~/.ssh/id\_\*`). |
| **netconf\_ssh\_config**  string  |  |  ini entries:  [netconf\_connection]ssh\_config = None    env:ANSIBLE\_NETCONF\_SSH\_CONFIG   var: ansible\_netconf\_ssh\_config  | This variable is used to enable bastion/jump host with netconf connection. If set to True the bastion/jump host ssh settings should be present in ~/.ssh/config file, alternatively it can be set to custom ssh configuration file path to read the bastion/jump host settings. |
| **network\_os**  string  |  |  var: ansible\_network\_os  | Configures the device platform network operating system. This value is used to load a device specific netconf plugin. If this option is not configured (or set to `auto`), then Ansible will attempt to guess the correct network\_os to use. If it can not guess a network\_os correctly it will use `default`. |
| **password**  string  |  |  var: ansible\_password   var: ansible\_ssh\_pass   var: ansible\_ssh\_password   var: ansible\_netconf\_password  | Configures the user password used to authenticate to the remote device when first establishing the SSH connection. |
| **persistent\_command\_timeout**  integer  | **Default:**30 |  ini entries:  [persistent\_connection]command\_timeout = 30    env:ANSIBLE\_PERSISTENT\_COMMAND\_TIMEOUT   var: ansible\_command\_timeout  | Configures, in seconds, the amount of time to wait for a command to return from the remote device. If this timer is exceeded before the command returns, the connection plugin will raise an exception and close. |
| **persistent\_connect\_timeout**  integer  | **Default:**30 |  ini entries:  [persistent\_connection]connect\_timeout = 30    env:ANSIBLE\_PERSISTENT\_CONNECT\_TIMEOUT   var: ansible\_connect\_timeout  | Configures, in seconds, the amount of time to wait when trying to initially establish a persistent connection. If this value expires before the connection to the remote device is completed, the connection will fail. |
| **persistent\_log\_messages**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [persistent\_connection]log\_messages = no    env:ANSIBLE\_PERSISTENT\_LOG\_MESSAGES   var: ansible\_persistent\_log\_messages  | This flag will enable logging the command executed and response received from target device in the ansible log file. For this option to work 'log\_path' ansible configuration option is required to be set to a file path with write access. Be sure to fully understand the security implications of enabling this option as it could create a security vulnerability by logging sensitive information in log file. |
| **port**  integer  | **Default:**830 |  ini entries:  [defaults]remote\_port = 830    env:ANSIBLE\_REMOTE\_PORT   var: ansible\_port  | Specifies the port on the remote device that listens for connections when establishing the SSH connection. |
| **private\_key\_file**  string  |  |  ini entries:  [defaults]private\_key\_file = None    env:ANSIBLE\_PRIVATE\_KEY\_FILE   var: ansible\_private\_key\_file  | The private SSH key or certificate file used to authenticate to the remote device when first establishing the SSH connection. |
| **proxy\_command**  string  | **Default:**"" |  ini entries:  [paramiko\_connection]proxy\_command =    env:ANSIBLE\_NETCONF\_PROXY\_COMMAND   var: ansible\_paramiko\_proxy\_command   var: ansible\_netconf\_proxy\_command  | Proxy information for running the connection via a jumphost. This requires ncclient >= 0.6.10 to be installed on the controller. |
| **remote\_user**  string  |  |  ini entries:  [defaults]remote\_user = None    env:ANSIBLE\_REMOTE\_USER   var: ansible\_user  | The username used to authenticate to the remote device when the SSH connection is first established. If the remote\_user is not specified, the connection will use the username of the logged in user. Can be configured from the CLI via the `--user` or `-u` options. |

   
 ### Authors

 * Ansible Networking Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/netconf_connection.html>

Implicit ‘localhost’
====================

 When you try to reference a `localhost` and you don’t have it defined in inventory, Ansible will create an implicit one for you.:

 
```
- hosts: all
  tasks:
    - name: check that i have log file for all hosts on my local machine
      stat: path=/var/log/hosts/{{inventory_hostname}}.log
      delegate_to: localhost

```
 In a case like this (or `local_action`) when Ansible needs to contact a ‘localhost’ but you did not supply one, we create one for you. This host is defined with specific connection variables equivalent to this in an inventory:

 
```
...

hosts:
  localhost:
   vars:
     ansible_connection: local
     ansible_python_interpreter: "{{ansible_playbook_python}}"

```
 This ensures that the proper connection and Python are used to execute your tasks locally. You can override the built-in implicit version by creating a `localhost` host entry in your inventory. At that point, all implicit behaviors are ignored; the `localhost` in inventory is treated just like any other host. Group and host vars will apply, including connection vars, which includes the `ansible_python_interpreter` setting. This will also affect `delegate_to: localhost` and `local_action`, the latter being an alias to the former.

  Note

 * This host is not targetable via any group, however it will use vars from `host_vars` and from the ‘all’ group.
* Implicit localhost does not appear in the `hostvars` magic variable unless demanded, such as by `"{{ hostvars['localhost'] }}"`.
* The `inventory_file` and `inventory_dir` magic variables are not available for the implicit localhost as they are dependent on **each inventory host**.
* This implicit host also gets triggered by using `127.0.0.1` or `::1` as they are the IPv4 and IPv6 representations of ‘localhost’.
* Even though there are many ways to create it, there will only ever be ONE implicit localhost, using the name first used to create it.
* Having `connection: local` does NOT trigger an implicit localhost, you are just changing the connection for the `inventory_hostname`.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/inventory/implicit_localhost.html>

VMware Prerequisites
====================

 * [Installing vCenter SSL certificates for Ansible](#installing-vcenter-ssl-certificates-for-ansible)
* [Installing ESXi SSL certificates for Ansible](#installing-esxi-ssl-certificates-for-ansible)
* [Using custom path for SSL certificates](#using-custom-path-for-ssl-certificates)


Installing SSL Certificates
---------------------------

 All vCenter and ESXi servers require SSL encryption on all connections to enforce secure communication. You must enable SSL encryption for Ansible by installing the server’s SSL certificates on your Ansible control node or delegate node.

 If the SSL certificate of your vCenter or ESXi server is not correctly installed on your Ansible control node, you will see the following warning when using Ansible VMware modules:

 `Unable to connect to vCenter or ESXi API at xx.xx.xx.xx on TCP/443: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)`

 To install the SSL certificate for your VMware server, and run your Ansible VMware modules in encrypted mode, please follow the instructions for the server you are running with VMware.

 ### Installing vCenter SSL certificates for Ansible

 * From any web browser, go to the base URL of the vCenter Server without port number like `https://vcenter-domain.example.com`
* Click the “Download trusted root CA certificates” link at the bottom of the grey box on the right and download the file.
* Change the extension of the file to .zip. The file is a ZIP file of all root certificates and all CRLs.
* Extract the contents of the zip file. The extracted directory contains a `.certs` directory that contains two types of files. Files with a number as the extension (.0, .1, and so on) are root certificates.
* Install the certificate files are trusted certificates by the process that is appropriate for your operating system.

 ### Installing ESXi SSL certificates for Ansible

 * Enable SSH Service on ESXi either by using Ansible VMware module [vmware\_host\_service\_manager](https://github.com/ansible-collections/vmware/blob/main/plugins/modules/vmware_host_config_manager.py) or manually using vSphere Web interface.
* SSH to ESXi server using administrative credentials, and navigate to directory `/etc/vmware/ssl`
* Secure copy (SCP) `rui.crt` located in `/etc/vmware/ssl` directory to Ansible control node.
* Install the certificate file by the process that is appropriate for your operating system.

 ### Using custom path for SSL certificates

 If you need to use a custom path for SSL certificates, you can set the `REQUESTS_CA_BUNDLE` environment variable in your playbook.

 For example, if `/var/vmware/certs/vcenter1.crt` is the SSL certificate for your vCenter Server, you can use the [environment](../../user_guide/playbooks_environment#playbooks-environment) keyword to pass it to the modules:

 
```
- name: Gather all tags from vCenter
  community.vmware.vmware_tag_info:
    validate_certs: True
    hostname: '{{ vcenter_hostname }}'
    username: '{{ vcenter_username }}'
    password: '{{ vcenter_password }}'
  environment:
    REQUESTS_CA_BUNDLE: /var/vmware/certs/vcenter1.crt

```
 There is a [known issue](https://github.com/psf/requests/issues/3829) in `requests` library (version 2) which you may want to consider when using this environment variable. Basically, setting `REQUESTS_CA_BUNDLE` environment variable on managed nodes overrides the `validate_certs` value. This may result in unexpected behavior while running the playbook. Please see [community.vmware issue 601](https://github.com/ansible-collections/community.vmware/issues/601) and [vmware issue 254](https://github.com/vmware/vsphere-automation-sdk-python/issues/254) for more information.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_scenarios/vmware_requirements.html>

Using VMware dynamic inventory plugin - Hostnames
=================================================

 * [Requirements](#requirements)
* [What to expect](#what-to-expect)
* [Troubleshooting](#troubleshooting)


VMware dynamic inventory plugin - customizing hostnames
-------------------------------------------------------

 VMware inventory plugin allows you to configure hostnames using the `hostnames` configuration parameter.

 In this scenario guide we will see how you configure hostnames from the given VMware guest in the inventory.

 ### Requirements

 To use the VMware dynamic inventory plugins, you must install [pyVmomi](https://github.com/vmware/pyvmomi) on your control node (the host running Ansible).

 To include tag-related information for the virtual machines in your dynamic inventory, you also need the [vSphere Automation SDK](https://code.vmware.com/web/sdk/65/vsphere-automation-python), which supports REST API features such as tagging and content libraries, on your control node. You can install the `vSphere Automation SDK` following [these instructions](https://github.com/vmware/vsphere-automation-sdk-python#installing-required-python-packages).

 
```
$ pip install pyvmomi

```
 Starting in Ansible 2.10, the VMware dynamic inventory plugin is available in the `community.vmware` collection included Ansible. To install the latest `community.vmware` collection:

 
```
$ ansible-galaxy collection install community.vmware

```
 To use this VMware dynamic inventory plugin:

 1. Enable it first by specifying the following in the `ansible.cfg` file:

 
```
[inventory]
enable_plugins = community.vmware.vmware_vm_inventory

```
 2. Create a file that ends in `vmware.yml` or `vmware.yaml` in your working directory.

 The `vmware_vm_inventory` inventory plugin takes in the same authentication information as any other VMware modules does.

 Here’s an example of a valid inventory file with custom hostname for the given VMware guest:

 
```
plugin: community.vmware.vmware_vm_inventory
strict: False
hostname: 10.65.223.31
username: administrator@vsphere.local
password: Esxi@123$%
validate_certs: False
with_tags: False
hostnames:
- config.name

```
 Here, we have configured a custom hostname by setting the `hostnames` parameter to `config.name`. This will retrieve the `config.name` property from the virtual machine and populate it in the inventory.

 You can check all allowed properties for the given virtual machine at [Using Virtual machine attributes in VMware dynamic inventory plugin](vmware_inventory_vm_attributes#vmware-inventory-vm-attributes).

 Executing `ansible-inventory --list -i <filename>.vmware.yml` creates a list of the virtual machines that are ready to be configured using Ansible.

 ### What to expect

 You will notice that instead of default behavior of representing the hostname as `config.name + _ + config.uuid`, the inventory hosts show value as `config.name`.

 
```
{
  "_meta": {
    "hostvars": {
        "template_001": {
            "config.name": "template_001",
            "guest.toolsRunningStatus": "guestToolsNotRunning",
            ...
            "guest.toolsStatus": "toolsNotInstalled",
            "name": "template_001"
        },
        "vm_8046": {
            "config.name": "vm_8046",
            "guest.toolsRunningStatus": "guestToolsNotRunning",
            ...
            "guest.toolsStatus": "toolsNotInstalled",
            "name": "vm_8046"
        },
    ...
}

```
 ### Troubleshooting

 If the custom property specified in `hostnames` fails:

 * Check if the values provided for username and password are correct.
* Make sure it is a valid property, see [Using Virtual machine attributes in VMware dynamic inventory plugin](vmware_inventory_vm_attributes#vmware-inventory-vm-attributes).
* Use `strict: True` to get more information about the error.
* Please make sure that you are using latest version VMware collection.

  See also

  [pyVmomi](https://github.com/vmware/pyvmomi)

The GitHub Page of pyVmomi

  [pyVmomi Issue Tracker](https://github.com/vmware/pyvmomi/issues)

The issue tracker for the pyVmomi project

  [vSphere Automation SDK GitHub Page](https://github.com/vmware/vsphere-automation-sdk-python)

The GitHub Page of vSphere Automation SDK for Python

  [vSphere Automation SDK Issue Tracker](https://github.com/vmware/vsphere-automation-sdk-python/issues)

The issue tracker for vSphere Automation SDK for Python

  [Using Virtual machine attributes in VMware dynamic inventory plugin](vmware_inventory_vm_attributes#vmware-inventory-vm-attributes)

Using Virtual machine attributes in VMware dynamic inventory plugin

  [Working with playbooks](../../user_guide/playbooks#working-with-playbooks)

An introduction to playbooks

  [Using encrypted variables and files](../../user_guide/vault#playbooks-vault)

Using Vault in playbooks

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_scenarios/vmware_inventory_hostnames.html>

Using VMware dynamic inventory plugin - Filters
===============================================

 * [Requirements](#requirements)


	+ [Using `or` conditions in filters](#using-or-conditions-in-filters)
	+ [Using regular expression in filters](#using-regular-expression-in-filters)
* [What to expect](#what-to-expect)
* [Troubleshooting filters](#troubleshooting-filters)


VMware dynamic inventory plugin - filtering VMware guests
---------------------------------------------------------

 VMware inventory plugin allows you to filter VMware guests using the `filters` configuration parameter.

 This section shows how you configure `filters` for the given VMware guest in the inventory.

 ### Requirements

 To use the VMware dynamic inventory plugins, you must install [pyVmomi](https://github.com/vmware/pyvmomi) on your control node (the host running Ansible).

 To include tag-related information for the virtual machines in your dynamic inventory, you also need the [vSphere Automation SDK](https://code.vmware.com/web/sdk/65/vsphere-automation-python), which supports REST API features such as tagging and content libraries, on your control node. You can install the `vSphere Automation SDK` following [these instructions](https://github.com/vmware/vsphere-automation-sdk-python#installing-required-python-packages).

 
```
$ pip install pyvmomi

```
 Starting in Ansible 2.10, the VMware dynamic inventory plugin is available in the `community.vmware` collection included Ansible. Alternately, to install the latest `community.vmware` collection:

 
```
$ ansible-galaxy collection install community.vmware

```
 To use this VMware dynamic inventory plugin:

 1. Enable it first by specifying the following in the `ansible.cfg` file:

 
```
[inventory]
enable_plugins = community.vmware.vmware_vm_inventory

```
 2. Create a file that ends in `vmware.yml` or `vmware.yaml` in your working directory.

 The `vmware_vm_inventory` inventory plugin takes in the same authentication information as any other VMware modules does.

 Let us assume we want to list all RHEL7 VMs with the power state as “poweredOn”. A valid inventory file with filters for the given VMware guest looks as follows:

 
```
plugin: community.vmware.vmware_vm_inventory
strict: False
hostname: 10.65.223.31
username: administrator@vsphere.local
password: Esxi@123$%
validate_certs: False
with_tags: False
hostnames:
- config.name
filters:
- config.guestId == "rhel7_64Guest"
- summary.runtime.powerState == "poweredOn"

```
 Here, we have configured two filters -

 * `config.guestId` is equal to `rhel7_64Guest`
* `summary.runtime.powerState` is equal to `poweredOn`

 This retrieves all the VMs which satisfy these two conditions and populates them in the inventory. Notice that the conditions are combined using an `and` operation.

 #### Using `or` conditions in filters

 Let us assume you want filter RHEL7 and Ubuntu VMs. You can use multiple filters using `or` condition in your inventory file.

 A valid filter in the VMware inventory file for this example is:

 
```
plugin: community.vmware.vmware_vm_inventory
strict: False
hostname: 10.65.223.31
username: administrator@vsphere.local
password: Esxi@123$%
validate_certs: False
with_tags: False
hostnames:
- config.name
filters:
- config.guestId == "rhel7_64Guest" or config.guestId == "ubuntu64Guest"

```
 You can check all allowed properties for filters for the given virtual machine at [Using Virtual machine attributes in VMware dynamic inventory plugin](vmware_inventory_vm_attributes#vmware-inventory-vm-attributes).

 If you are using the `properties` parameter with custom VM properties, make sure that you include all the properties used by filters as well in your VM property list.

 For example, if we want all RHEL7 and Ubuntu VMs that are poweredOn, you can use inventory file:

 
```
plugin: community.vmware.vmware_vm_inventory
strict: False
hostname: 10.65.223.31
username: administrator@vsphere.local
password: Esxi@123$%
validate_certs: False
with_tags: False
hostnames:
- 'config.name'
properties:
- 'config.name'
- 'config.guestId'
- 'guest.ipAddress'
- 'summary.runtime.powerState'
filters:
- config.guestId == "rhel7_64Guest" or config.guestId == "ubuntu64Guest"
- summary.runtime.powerState == "poweredOn"

```
 Here, we are using minimum VM properties, that is `config.name`, `config.guestId`, `summary.runtime.powerState`, and `guest.ipAddress`.

 * `config.name` is used by the `hostnames` parameter.
* `config.guestId` and `summary.runtime.powerState` are used by the `filters` parameter.
* `guest.guestId` is used by `ansible_host` internally by the inventory plugin.

 #### Using regular expression in filters

 Let us assume you want filter VMs with specific IP range. You can use regular expression in `filters` in your inventory file.

 For example, if we want all RHEL7 and Ubuntu VMs that are poweredOn, you can use inventory file:

 
```
plugin: community.vmware.vmware_vm_inventory
strict: False
hostname: 10.65.223.31
username: administrator@vsphere.local
password: Esxi@123$%
validate_certs: False
with_tags: False
hostnames:
- 'config.name'
properties:
- 'config.name'
- 'config.guestId'
- 'guest.ipAddress'
- 'summary.runtime.powerState'
filters:
- guest.ipAddress is defined and guest.ipAddress is match('192.168.*')

```
 Here, we are using `guest.ipAddress` VM property. This property is optional and depended upon VMware tools installed on VMs. We are using `match` to validate the regular expression for the given IP range.

 Executing `ansible-inventory --list -i <filename>.vmware.yml` creates a list of the virtual machines that are ready to be configured using Ansible.

 ### What to expect

 You will notice that the inventory hosts are filtered depending on your `filters` section.

 
```
{
  "_meta": {
    "hostvars": {
        "template_001": {
            "config.name": "template_001",
            "config.guestId": "ubuntu64Guest",
            ...
            "guest.toolsStatus": "toolsNotInstalled",
            "summary.runtime.powerState": "poweredOn",
        },
        "vm_8046": {
            "config.name": "vm_8046",
            "config.guestId": "rhel7_64Guest",
            ...
            "guest.toolsStatus": "toolsNotInstalled",
            "summary.runtime.powerState": "poweredOn",
        },
    ...
}

```
 ### Troubleshooting filters

 If the custom property specified in `filters` fails:

 * Check if the values provided for username and password are correct.
* Make sure it is a valid property, see [Using Virtual machine attributes in VMware dynamic inventory plugin](vmware_inventory_vm_attributes#vmware-inventory-vm-attributes).
* Use `strict: True` to get more information about the error.
* Please make sure that you are using latest version of the VMware collection.

  See also

  [pyVmomi](https://github.com/vmware/pyvmomi)

The GitHub Page of pyVmomi

  [pyVmomi Issue Tracker](https://github.com/vmware/pyvmomi/issues)

The issue tracker for the pyVmomi project

  [vSphere Automation SDK GitHub Page](https://github.com/vmware/vsphere-automation-sdk-python)

The GitHub Page of vSphere Automation SDK for Python

  [vSphere Automation SDK Issue Tracker](https://github.com/vmware/vsphere-automation-sdk-python/issues)

The issue tracker for vSphere Automation SDK for Python

  [Using Virtual machine attributes in VMware dynamic inventory plugin](vmware_inventory_vm_attributes#vmware-inventory-vm-attributes)

Using Virtual machine attributes in VMware dynamic inventory plugin

  [Working with playbooks](../../user_guide/playbooks#working-with-playbooks)

An introduction to playbooks

  [Using encrypted variables and files](../../user_guide/vault#playbooks-vault)

Using Vault in playbooks

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_scenarios/vmware_inventory_filters.html>

Ansible VMware FAQ
==================

 vmware\_guest
-------------

 ### Can I deploy a virtual machine on a standalone ESXi server ?

 Yes. `vmware_guest` can deploy a virtual machine with required settings on a standalone ESXi server. However, you must have a paid license to deploy virtual machines this way. If you are using the free version, the API is read-only.

 ### Is `/vm` required for `vmware_guest` module ?

 Prior to Ansible version 2.5, `folder` was an optional parameter with a default value of `/vm`.

 The folder parameter was used to discover information about virtual machines in the given infrastructure.

 Starting with Ansible version 2.5, `folder` is still an optional parameter with no default value. This parameter will be now used to identify a user’s virtual machine, if multiple virtual machines or virtual machine templates are found with same name. VMware does not restrict the system administrator from creating virtual machines with same name.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_scenarios/faq.html>

How to configure the vmware\_rest collection
============================================

 * [Introduction](#introduction)
* [Environment variables](#environment-variables)
* [Module parameters](#module-parameters)
* [Ignore SSL certificate error](#ignore-ssl-certificate-error)

 Introduction
------------

 The vcenter\_rest modules need to be authenticated. There are two different

 Environment variables
---------------------

  Note

 This solution requires that you call the modules from the local machine.

  You need to export some environment variables in your shell before you call the modules.

 
```
$ export VMWARE_HOST=vcenter.test
$ export VMWARE_USER=myvcenter-user
$ export VMWARE_password=mypassword
$ ansible-playbook my-playbook.yaml

```
 Module parameters
-----------------

 All the vcenter\_rest modules accept the following arguments:

 * `vcenter_host`
* `vcenter_username`
* `vcenter_password`

 Ignore SSL certificate error
----------------------------

 It’s common to run a test environment without a proper SSL certificate configuration.

 To ignore the SSL error, you can use the `vcenter_validate_certs: no` argument or `export VMWARE_VALIDATE_CERTS=no` to set the environment variable.



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_rest_scenarios/authentication.html>

Creating K8S object
===================

 * [Introduction](#introduction)
* [Scenario Requirements](#scenario-requirements)
* [Assumptions](#assumptions)
* [Caveats](#caveats)
* [Example Description](#example-description)


	+ [What to expect](#what-to-expect)
	+ [Troubleshooting](#troubleshooting)

 Introduction
------------

 This guide will show you how to utilize Ansible to create Kubernetes objects such as Pods, Deployments, and Secrets.

 Scenario Requirements
---------------------

 * Software


	+ Ansible 2.9.10 or later must be installed
	+ The Python modules `openshift` and `kubernetes` must be installed on the Ansible controller (or Target host if not executing against localhost)
	+ Kubernetes Cluster
	+ Kubectl binary installed on the Ansible controller
* Access / Credentials


	+ Kubeconfig configured with the given Kubernetes cluster

 Assumptions
-----------

 * User has required level of authorization to create, delete and update resources on the given Kubernetes cluster.

 Caveats
-------

 * community.kubernetes 1.1.0 is going to migrate to [kubernetes.core](https://github.com/ansible-collections/kubernetes.core)

 Example Description
-------------------

 In this use case / example, we will create a Pod in the given Kubernetes Cluster. The following Ansible playbook showcases the basic parameters that are needed for this.

 
```
---
- hosts: localhost
  collections:
    - kubernetes.core
  tasks:
  - name: Create a pod
    k8s:
      state: present
      definition:
        apiVersion: v1
        kind: Pod
        metadata:
          name: "utilitypod-1"
          namespace: default
          labels:
            app: galaxy
        spec:
          containers:
          - name: utilitypod
            image: busybox

```
 Since Ansible utilizes the Kubernetes API to perform actions, in this use case we will be connecting directly to the Kubernetes cluster.

 To begin, there are a few bits of information we will need. Here you are using Kubeconfig which is pre-configured in your machine. The Kubeconfig is generally located at `~/.kube/config`. It is highly recommended to store sensitive information such as password, user certificates in a more secure fashion using [ansible-vault](../../cli/ansible-vault#ansible-vault) or using [Ansible Tower credentials](https://docs.ansible.com/ansible-tower/latest/html/userguide/credentials.html).

 Now you need to supply the information about the Pod which will be created. Using `definition` parameter of the `kubernetes.core.k8s` module, you specify [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). This PodTemplate is identical to what you provide to the `kubectl` command.

 ### What to expect

 * You will see a bit of JSON output after this playbook completes. This output shows various parameters that are returned from the module and from cluster about the newly created Pod.

 
```
{
    "changed": true,
    "method": "create",
    "result": {
        "apiVersion": "v1",
        "kind": "Pod",
        "metadata": {
            "creationTimestamp": "2020-10-03T15:36:25Z",
            "labels": {
                "app": "galaxy"
            },
            "name": "utilitypod-1",
            "namespace": "default",
            "resourceVersion": "4511073",
            "selfLink": "/api/v1/namespaces/default/pods/utilitypod-1",
            "uid": "c7dec819-09df-4efd-9d78-67cf010b4f4e"
        },
        "spec": {
            "containers": [{
                "image": "busybox",
                "imagePullPolicy": "Always",
                "name": "utilitypod",
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "terminationMessagePolicy": "File",
                "volumeMounts": [{
                    "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
                    "name": "default-token-6j842",
                    "readOnly": true
                }]
            }],
            "dnsPolicy": "ClusterFirst",
            "enableServiceLinks": true,
            "priority": 0,
            "restartPolicy": "Always",
            "schedulerName": "default-scheduler",
            "securityContext": {},
            "serviceAccount": "default",
            "serviceAccountName": "default",
            "terminationGracePeriodSeconds": 30,
            "tolerations": [{
                    "effect": "NoExecute",
                    "key": "node.kubernetes.io/not-ready",
                    "operator": "Exists",
                    "tolerationSeconds": 300
                },
                {
                    "effect": "NoExecute",
                    "key": "node.kubernetes.io/unreachable",
                    "operator": "Exists",
                    "tolerationSeconds": 300
                }
            ],
            "volumes": [{
                "name": "default-token-6j842",
                "secret": {
                    "defaultMode": 420,
                    "secretName": "default-token-6j842"
                }
            }]
        },
        "status": {
            "phase": "Pending",
            "qosClass": "BestEffort"
        }
    }
}

```
 * In the above example, ‘changed’ is `True` which notifies that the Pod creation started on the given cluster. This can take some time depending on your environment.

 ### Troubleshooting

 Things to inspect

 * Check if the values provided for username and password are correct
* Check if the Kubeconfig is populated with correct values

  See also

  [Kubernetes Python client](https://github.com/kubernetes-client/python)

The GitHub Page of Kubernetes Python client

  [Kubernetes Python client - Issue Tracker](https://github.com/kubernetes-client/python/issues)

The issue tracker for Kubernetes Python client

  [OpenShift Python client](https://github.com/openshift/openshift-restclient-python)

The GitHub Page of OpenShift Dynamic API client

  [OpenShift Python client - Issue Tracker](https://github.com/openshift/openshift-restclient-python/issues)

The issue tracker for OpenShift Dynamic API client

  [Kubectl installation](https://kubernetes.io/docs/tasks/tools/install-kubectl/)

Installation guide for installing Kubectl

  [Working with playbooks](../../user_guide/playbooks#working-with-playbooks)

An introduction to playbooks

  [Using encrypted variables and files](../../user_guide/vault#playbooks-vault)

Using Vault in playbooks

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/kubernetes_scenarios/scenario_k8s_object.html>

Introduction to Ansible for VMware
==================================

 * [Introduction](#introduction)
* [Requirements](#requirements)
* [vmware\_guest module](#vmware-guest-module)

 Introduction
------------

 Ansible provides various modules to manage VMware infrastructure, which includes datacenter, cluster, host system and virtual machine.

 Requirements
------------

 Ansible VMware modules are written on top of [pyVmomi](https://github.com/vmware/pyvmomi). pyVmomi is the Python SDK for the VMware vSphere API that allows user to manage ESX, ESXi, and vCenter infrastructure. You can install pyVmomi using pip (you may need to use pip3, depending on your OS/distro):

 
```
$ pip install pyvmomi

```
 Ansible VMware modules leveraging latest vSphere(6.0+) features are using [vSphere Automation Python SDK](https://github.com/vmware/vsphere-automation-sdk-python). The vSphere Automation Python SDK also has client libraries, documentation, and sample code for VMware Cloud on AWS Console APIs, NSX VMware Cloud on AWS integration APIs, VMware Cloud on AWS site recovery APIs, NSX-T APIs.

 You can install vSphere Automation Python SDK using pip:

 
```
$ pip install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git

```
  Note:

Installing vSphere Automation Python SDK also installs `pyvmomi`. A separate installation of `pyvmomi` is not required.

   vmware\_guest module
--------------------

 The [vmware\_guest](https://docs.ansible.com/ansible/2.9/modules/vmware_guest_module.html#vmware-guest-module "(in Ansible v2.9)") module manages various operations related to virtual machines in the given ESXi or vCenter server.

  See also

  [pyVmomi](https://github.com/vmware/pyvmomi)

The GitHub Page of pyVmomi

  [pyVmomi Issue Tracker](https://github.com/vmware/pyvmomi/issues)

The issue tracker for the pyVmomi project

  [govc](https://github.com/vmware/govmomi/tree/master/govc)

govc is a vSphere CLI built on top of govmomi

  [Working with playbooks](../../user_guide/playbooks#working-with-playbooks)

An introduction to playbooks

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_scenarios/vmware_intro.html>

Ansible for VMware Concepts
===========================

 Some of these concepts are common to all uses of Ansible, including VMware automation; some are specific to VMware. You need to understand them to use Ansible for VMware automation. This introduction provides the background you need to follow the [scenarios](vmware_scenarios#vmware-scenarios) in this guide.

 * [Control Node](#control-node)
* [Delegation](#delegation)
* [Modules](#modules)
* [Playbooks](#playbooks)
* [pyVmomi](#pyvmomi)

 Control Node
------------

 Any machine with Ansible installed. You can run commands and playbooks, invoking `/usr/bin/ansible` or `/usr/bin/ansible-playbook`, from any control node. You can use any computer that has Python installed on it as a control node - laptops, shared desktops, and servers can all run Ansible. However, you cannot use a Windows machine as a control node. You can have multiple control nodes.

 Delegation
----------

 Delegation allows you to select the system that executes a given task. If you do not have `pyVmomi` installed on your control node, use the `delegate_to` keyword on VMware-specific tasks to execute them on any host where you have `pyVmomi` installed.

 Modules
-------

 The units of code Ansible executes. Each module has a particular use, from creating virtual machines on vCenter to managing distributed virtual switches in the vCenter environment. You can invoke a single module with a task, or invoke several different modules in a playbook. For an idea of how many modules Ansible includes, take a look at the [list of cloud modules](https://docs.ansible.com/ansible/2.9/modules/list_of_cloud_modules.html#cloud-modules "(in Ansible v2.9)"), which includes VMware modules.

 Playbooks
---------

 Ordered lists of tasks, saved so you can run those tasks in that order repeatedly. Playbooks can include variables as well as tasks. Playbooks are written in YAML and are easy to read, write, share and understand.

 pyVmomi
-------

 Ansible VMware modules are written on top of [pyVmomi](https://github.com/vmware/pyvmomi). `pyVmomi` is the official Python SDK for the VMware vSphere API that allows user to manage ESX, ESXi, and vCenter infrastructure.

 You need to install this Python SDK on host from where you want to invoke VMware automation. For example, if you are using control node then `pyVmomi` must be installed on control node.

 If you are using any `delegate_to` host which is different from your control node then you need to install `pyVmomi` on that `delegate_to` node.

 You can install pyVmomi using pip:

 
```
$ pip install pyvmomi

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_scenarios/vmware_concepts.html>

Using VMware dynamic inventory plugin
=====================================

 * [VMware Dynamic Inventory Plugin](#vmware-dynamic-inventory-plugin)


	+ [Requirements](#requirements)
* [Using vaulted configuration files](#using-vaulted-configuration-files)

 VMware Dynamic Inventory Plugin
-------------------------------

 The best way to interact with your hosts is to use the VMware dynamic inventory plugin, which dynamically queries VMware APIs and tells Ansible what nodes can be managed.

 ### Requirements

 To use the VMware dynamic inventory plugins, you must install [pyVmomi](https://github.com/vmware/pyvmomi) on your control node (the host running Ansible).

 To include tag-related information for the virtual machines in your dynamic inventory, you also need the [vSphere Automation SDK](https://code.vmware.com/web/sdk/65/vsphere-automation-python), which supports REST API features like tagging and content libraries, on your control node. You can install the `vSphere Automation SDK` following [these instructions](https://github.com/vmware/vsphere-automation-sdk-python#installing-required-python-packages).

 
```
$ pip install pyvmomi

```
 To use this VMware dynamic inventory plugin, you need to enable it first by specifying the following in the `ansible.cfg` file:

 
```
[inventory]
enable_plugins = vmware_vm_inventory

```
 Then, create a file that ends in `.vmware.yml` or `.vmware.yaml` in your working directory.

 The `vmware_vm_inventory` script takes in the same authentication information as any VMware module.

 Here’s an example of a valid inventory file:

 
```
plugin: vmware_vm_inventory
strict: False
hostname: 10.65.223.31
username: administrator@vsphere.local
password: Esxi@123$%
validate_certs: False
with_tags: True

```
 Executing `ansible-inventory --list -i <filename>.vmware.yml` will create a list of VMware instances that are ready to be configured using Ansible.

 Using vaulted configuration files
---------------------------------

 Since the inventory configuration file contains vCenter password in plain text, a security risk, you may want to encrypt your entire inventory configuration file.

 You can encrypt a valid inventory configuration file as follows:

 
```
$ ansible-vault encrypt <filename>.vmware.yml
  New Vault password:
  Confirm New Vault password:
  Encryption successful

```
 And you can use this vaulted inventory configuration file using:

 
```
$ ansible-inventory -i filename.vmware.yml --list --vault-password-file=/path/to/vault_password_file

```
  See also

  [pyVmomi](https://github.com/vmware/pyvmomi)

The GitHub Page of pyVmomi

  [pyVmomi Issue Tracker](https://github.com/vmware/pyvmomi/issues)

The issue tracker for the pyVmomi project

  [vSphere Automation SDK GitHub Page](https://github.com/vmware/vsphere-automation-sdk-python)

The GitHub Page of vSphere Automation SDK for Python

  [vSphere Automation SDK Issue Tracker](https://github.com/vmware/vsphere-automation-sdk-python/issues)

The issue tracker for vSphere Automation SDK for Python

  [Working with playbooks](../../user_guide/playbooks#working-with-playbooks)

An introduction to playbooks

  [Using encrypted variables and files](../../user_guide/vault#playbooks-vault)

Using Vault in playbooks

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_scenarios/vmware_inventory.html>

Ansible for VMware Scenarios
============================

 These scenarios teach you how to accomplish common VMware tasks using Ansible. To get started, please select the task you want to accomplish.

 * [Deploy a virtual machine from a template](scenario_clone_template)
* [Rename an existing virtual machine](scenario_rename_vm)
* [Remove an existing VMware virtual machine](scenario_remove_vm)
* [Find folder path of an existing VMware virtual machine](scenario_find_vm_folder)
* [Using VMware HTTP API using Ansible](scenario_vmware_http)
* [Using vmware\_tools connection plugin](scenario_vmware_tools_connection)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_scenarios/vmware_scenarios.html>

How to create a Virtual Machine
===============================

 * [Introduction](#introduction)
* [Scenario requirements](#scenario-requirements)
* [How to create a virtual machine](#id1)


	+ [Result](#result)

 Introduction
------------

 This section shows you how to use Ansible to create a virtual machine.

 Scenario requirements
---------------------

 You’ve already followed [How to collect information about your environment](collect_information#vmware-rest-collect-info) and you’ve got the following variables defined:

 * `my_cluster_info`
* `my_datastore`
* `my_virtual_machine_folder`
* `my_cluster_info`

 How to create a virtual machine
-------------------------------

 In this example, we will use the `vcenter_vm` module to create a new guest.

 
```
- name: Create a VM
  vmware.vmware_rest.vcenter_vm:
    placement:
      cluster: "{{ my_cluster_info.id }}"
      datastore: "{{ my_datastore.datastore }}"
      folder: "{{ my_virtual_machine_folder.folder }}"
      resource_pool: "{{ my_cluster_info.value.resource_pool }}"
    name: test_vm1
    guest_OS: DEBIAN_8_64
    hardware_version: VMX_11
    memory:
      hot_add_enabled: true
      size_MiB: 1024
  register: _result

```
 ### Result

 
```
{
    "value": {
        "instant_clone_frozen": false,
        "cdroms": [],
        "memory": {
            "size_MiB": 1024,
            "hot_add_enabled": true
        },
        "disks": [
            {
                "value": {
                    "scsi": {
                        "bus": 0,
                        "unit": 0
                    },
                    "backing": {
                        "vmdk_file": "[local] test_vm1_8/test_vm1.vmdk",
                        "type": "VMDK_FILE"
                    },
                    "label": "Hard disk 1",
                    "type": "SCSI",
                    "capacity": 17179869184
                },
                "key": "2000"
            }
        ],
        "parallel_ports": [],
        "sata_adapters": [],
        "cpu": {
            "hot_remove_enabled": false,
            "count": 1,
            "hot_add_enabled": false,
            "cores_per_socket": 1
        },
        "scsi_adapters": [
            {
                "value": {
                    "scsi": {
                        "bus": 0,
                        "unit": 7
                    },
                    "label": "SCSI controller 0",
                    "sharing": "NONE",
                    "type": "PVSCSI"
                },
                "key": "1000"
            }
        ],
        "power_state": "POWERED_OFF",
        "floppies": [],
        "identity": {
            "name": "test_vm1",
            "instance_uuid": "5033c296-6954-64df-faca-d001de53763d",
            "bios_uuid": "42330d17-e603-d925-fa4b-18827dbc1409"
        },
        "nvme_adapters": [],
        "name": "test_vm1",
        "nics": [],
        "boot": {
            "delay": 0,
            "retry_delay": 10000,
            "enter_setup_mode": false,
            "type": "BIOS",
            "retry": false
        },
        "serial_ports": [],
        "boot_devices": [],
        "guest_OS": "DEBIAN_8_64",
        "hardware": {
            "upgrade_policy": "NEVER",
            "upgrade_status": "NONE",
            "version": "VMX_11"
        }
    },
    "id": "vm-1650",
    "changed": true
}

```
  Note

 `vcenter_vm` accepts more parameters, however you may prefer to start with a simple VM and use the `vcenter_vm_hardware` modules to tune it up afterwards. It’s easier this way to identify a potential problematical step.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_rest_scenarios/create_vm.html>

Other useful VMware resources
=============================

 * [VMware API and SDK Documentation](https://www.vmware.com/support/pubs/sdk_pubs.html)
* [VCSIM test container image](https://quay.io/repository/ansible/vcenter-test-container)
* [Ansible VMware community wiki page](https://github.com/ansible/community/wiki/VMware)
* [VMware’s official Guest Operating system customization matrix](https://partnerweb.vmware.com/programs/guestOS/guest-os-customization-matrix.pdf)
* [VMware Compatibility Guide](https://www.vmware.com/resources/compatibility/search.php)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_scenarios/vmware_external_doc_links.html>

Troubleshooting Ansible for VMware
==================================

 * [Debugging Ansible for VMware](#debugging-ansible-for-vmware)
* [Known issues with Ansible for VMware](#known-issues-with-ansible-for-vmware)


	+ [Network settings with vmware\_guest in Ubuntu 18.04](#network-settings-with-vmware-guest-in-ubuntu-18-04)
	
	
		- [Potential Workarounds](#potential-workarounds)

 This section lists things that can go wrong and possible ways to fix them.

 Debugging Ansible for VMware
----------------------------

 When debugging or creating a new issue, you will need information about your VMware infrastructure. You can get this information using [govc](https://github.com/vmware/govmomi/tree/master/govc), For example:

 
```
$ export GOVC_USERNAME=ESXI_OR_VCENTER_USERNAME
$ export GOVC_PASSWORD=ESXI_OR_VCENTER_PASSWORD
$ export GOVC_URL=https://ESXI_OR_VCENTER_HOSTNAME:443
$ govc find /

```
 Known issues with Ansible for VMware
------------------------------------

 ### Network settings with vmware\_guest in Ubuntu 18.04

 Setting the network with `vmware_guest` in Ubuntu 18.04 is known to be broken, due to missing support for `netplan` in the `open-vm-tools`. This issue is tracked via:

 * <https://github.com/vmware/open-vm-tools/issues/240>
* <https://github.com/ansible/ansible/issues/41133>

 #### Potential Workarounds

 There are several workarounds for this issue.

 1. Modify the Ubuntu 18.04 images and installing `ifupdown` in them via `sudo apt install ifupdown`. If so you need to remove `netplan` via `sudo apt remove netplan.io` and you need stop `systemd-networkd` via `sudo systemctl disable systemctl-networkd`.
2. Generate the `systemd-networkd` files with a task in your VMware Ansible role:

 
```
- name: make sure cache directory exists
  file: path="{{ inventory_dir }}/cache" state=directory
  delegate_to: localhost

- name: generate network templates
  template: src=network.j2 dest="{{ inventory_dir }}/cache/{{ inventory_hostname }}.network"
  delegate_to: localhost

- name: copy generated files to vm
  vmware_guest_file_operation:
    hostname: "{{ vmware_general.hostname }}"
    username: "{{ vmware_username }}"
    password: "{{ vmware_password }}"
    datacenter: "{{ vmware_general.datacenter }}"
    validate_certs: "{{ vmware_general.validate_certs }}"
    vm_id: "{{ inventory_hostname }}"
    vm_username: root
    vm_password: "{{ template_password }}"
    copy:
        src: "{{ inventory_dir }}/cache/{{ inventory_hostname }}.network"
        dest: "/etc/systemd/network/ens160.network"
        overwrite: False
  delegate_to: localhost

- name: restart systemd-networkd
  vmware_vm_shell:
    hostname: "{{ vmware_general.hostname }}"
    username: "{{ vmware_username }}"
    password: "{{ vmware_password }}"
    datacenter: "{{ vmware_general.datacenter }}"
    folder: /vm
    vm_id: "{{ inventory_hostname}}"
    vm_username: root
    vm_password: "{{ template_password }}"
    vm_shell: /bin/systemctl
    vm_shell_args: " restart systemd-networkd"
  delegate_to: localhost

- name: restart systemd-resolved
  vmware_vm_shell:
    hostname: "{{ vmware_general.hostname }}"
    username: "{{ vmware_username }}"
    password: "{{ vmware_password }}"
    datacenter: "{{ vmware_general.datacenter }}"
    folder: /vm
    vm_id: "{{ inventory_hostname}}"
    vm_username: root
    vm_password: "{{ template_password }}"
    vm_shell: /bin/systemctl
    vm_shell_args: " restart systemd-resolved"
  delegate_to: localhost

```
 3. Wait for `netplan` support in `open-vm-tools`



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_scenarios/vmware_troubleshooting.html>

Python3 in templates
====================

 Ansible uses Jinja2 to leverage Python data types and standard functions in templates and variables. You can use these data types and standard functions to perform a rich set of operations on your data. However, if you use templates, you must be aware of differences between Python versions.

 These topics help you design templates that work on both Python2 and Python3. They might also help if you are upgrading from Python2 to Python3. Upgrading within Python2 or Python3 does not usually introduce changes that affect Jinja2 templates.

 Dictionary views
----------------

 In Python2, the [`dict.keys()`](https://docs.python.org/3/library/stdtypes.html#dict.keys "(in Python v3.10)"), [`dict.values()`](https://docs.python.org/3/library/stdtypes.html#dict.values "(in Python v3.10)"), and [`dict.items()`](https://docs.python.org/3/library/stdtypes.html#dict.items "(in Python v3.10)") methods return a list. Jinja2 returns that to Ansible via a string representation that Ansible can turn back into a list.

 In Python3, those methods return a [dictionary view](https://docs.python.org/3/library/stdtypes.html#dict-views "(in Python v3.10)") object. The string representation that Jinja2 returns for dictionary views cannot be parsed back into a list by Ansible. It is, however, easy to make this portable by using the `list` filter whenever using [`dict.keys()`](https://docs.python.org/3/library/stdtypes.html#dict.keys "(in Python v3.10)"), [`dict.values()`](https://docs.python.org/3/library/stdtypes.html#dict.values "(in Python v3.10)"), or [`dict.items()`](https://docs.python.org/3/library/stdtypes.html#dict.items "(in Python v3.10)"):

 
```
vars:
  hosts:
    testhost1: 127.0.0.2
    testhost2: 127.0.0.3
tasks:
  - debug:
      msg: '{{ item }}'
    # Only works with Python 2
    #loop: "{{ hosts.keys() }}"
    # Works with both Python 2 and Python 3
    loop: "{{ hosts.keys() | list }}"

```
 dict.iteritems()
----------------

 Python2 dictionaries have [`iterkeys()`](https://docs.python.org/2/library/stdtypes.html#dict.iterkeys "(in Python v2.7)"), [`itervalues()`](https://docs.python.org/2/library/stdtypes.html#dict.itervalues "(in Python v2.7)"), and [`iteritems()`](https://docs.python.org/2/library/stdtypes.html#dict.iteritems "(in Python v2.7)") methods.

 Python3 dictionaries do not have these methods. Use [`dict.keys()`](https://docs.python.org/3/library/stdtypes.html#dict.keys "(in Python v3.10)"), [`dict.values()`](https://docs.python.org/3/library/stdtypes.html#dict.values "(in Python v3.10)"), and [`dict.items()`](https://docs.python.org/3/library/stdtypes.html#dict.items "(in Python v3.10)") to make your playbooks and templates compatible with both Python2 and Python3:

 
```
vars:
  hosts:
    testhost1: 127.0.0.2
    testhost2: 127.0.0.3
tasks:
  - debug:
      msg: '{{ item }}'
    # Only works with Python 2
    #loop: "{{ hosts.iteritems() }}"
    # Works with both Python 2 and Python 3
    loop: "{{ hosts.items() | list }}"

```
  See also

 * The [Dictionary views](#pb-py-compat-dict-views) entry for information on why the `list filter` is necessary here.

 

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_python_version.html>

Using Virtual machine attributes in VMware dynamic inventory plugin
===================================================================

 * [capability](#capability)


	+ [snapshotOperationsSupported (bool)](#snapshotoperationssupported-bool)
	+ [multipleSnapshotsSupported (bool)](#multiplesnapshotssupported-bool)
	+ [snapshotConfigSupported (bool)](#snapshotconfigsupported-bool)
	+ [poweredOffSnapshotsSupported (bool)](#poweredoffsnapshotssupported-bool)
	+ [memorySnapshotsSupported (bool)](#memorysnapshotssupported-bool)
	+ [revertToSnapshotSupported (bool)](#reverttosnapshotsupported-bool)
	+ [quiescedSnapshotsSupported (bool)](#quiescedsnapshotssupported-bool)
	+ [disableSnapshotsSupported (bool)](#disablesnapshotssupported-bool)
	+ [lockSnapshotsSupported (bool)](#locksnapshotssupported-bool)
	+ [consolePreferencesSupported (bool)](#consolepreferencessupported-bool)
	+ [cpuFeatureMaskSupported (bool)](#cpufeaturemasksupported-bool)
	+ [s1AcpiManagementSupported (bool)](#s1acpimanagementsupported-bool)
	+ [settingScreenResolutionSupported (bool)](#settingscreenresolutionsupported-bool)
	+ [toolsAutoUpdateSupported (bool)](#toolsautoupdatesupported-bool)
	+ [vmNpivWwnSupported (bool)](#vmnpivwwnsupported-bool)
	+ [npivWwnOnNonRdmVmSupported (bool)](#npivwwnonnonrdmvmsupported-bool)
	+ [vmNpivWwnDisableSupported (bool)](#vmnpivwwndisablesupported-bool)
	+ [vmNpivWwnUpdateSupported (bool)](#vmnpivwwnupdatesupported-bool)
	+ [swapPlacementSupported (bool)](#swapplacementsupported-bool)
	+ [toolsSyncTimeSupported (bool)](#toolssynctimesupported-bool)
	+ [virtualMmuUsageSupported (bool)](#virtualmmuusagesupported-bool)
	+ [diskSharesSupported (bool)](#disksharessupported-bool)
	+ [bootOptionsSupported (bool)](#bootoptionssupported-bool)
	+ [bootRetryOptionsSupported (bool)](#bootretryoptionssupported-bool)
	+ [settingVideoRamSizeSupported (bool)](#settingvideoramsizesupported-bool)
	+ [settingDisplayTopologySupported (bool)](#settingdisplaytopologysupported-bool)
	+ [recordReplaySupported (bool)](#recordreplaysupported-bool)
	+ [changeTrackingSupported (bool)](#changetrackingsupported-bool)
	+ [multipleCoresPerSocketSupported (bool)](#multiplecorespersocketsupported-bool)
	+ [hostBasedReplicationSupported (bool)](#hostbasedreplicationsupported-bool)
	+ [guestAutoLockSupported (bool)](#guestautolocksupported-bool)
	+ [memoryReservationLockSupported (bool)](#memoryreservationlocksupported-bool)
	+ [featureRequirementSupported (bool)](#featurerequirementsupported-bool)
	+ [poweredOnMonitorTypeChangeSupported (bool)](#poweredonmonitortypechangesupported-bool)
	+ [seSparseDiskSupported (bool)](#sesparsedisksupported-bool)
	+ [nestedHVSupported (bool)](#nestedhvsupported-bool)
	+ [vPMCSupported (bool)](#vpmcsupported-bool)
* [config](#config)


	+ [changeVersion (str)](#changeversion-str)
	+ [modified (datetime)](#modified-datetime)
	+ [name (str)](#name-str)
	+ [guestFullName (str)](#guestfullname-str)
	+ [version (str)](#version-str)
	+ [uuid (str)](#uuid-str)
	+ [instanceUuid (str, optional)](#instanceuuid-str-optional)
	+ [npivNodeWorldWideName (long, optional)](#npivnodeworldwidename-long-optional)
	+ [npivPortWorldWideName (long, optional)](#npivportworldwidename-long-optional)
	+ [npivWorldWideNameType (str, optional)](#npivworldwidenametype-str-optional)
	+ [npivDesiredNodeWwns (short, optional)](#npivdesirednodewwns-short-optional)
	+ [npivDesiredPortWwns (short, optional)](#npivdesiredportwwns-short-optional)
	+ [npivTemporaryDisabled (bool, optional)](#npivtemporarydisabled-bool-optional)
	+ [npivOnNonRdmDisks (bool, optional)](#npivonnonrdmdisks-bool-optional)
	+ [locationId (str, optional)](#locationid-str-optional)
	+ [template (bool)](#template-bool)
	+ [guestId (str)](#guestid-str)
	+ [alternateGuestName (str)](#alternateguestname-str)
	+ [annotation (str, optional)](#annotation-str-optional)
	+ [files (vim.vm.FileInfo)](#files-vim-vm-fileinfo)
	+ [tools (vim.vm.ToolsConfigInfo, optional)](#tools-vim-vm-toolsconfiginfo-optional)
	+ [flags (vim.vm.FlagInfo)](#flags-vim-vm-flaginfo)
	+ [consolePreferences (vim.vm.ConsolePreferences, optional)](#consolepreferences-vim-vm-consolepreferences-optional)
	+ [defaultPowerOps (vim.vm.DefaultPowerOpInfo)](#defaultpowerops-vim-vm-defaultpoweropinfo)
	+ [hardware (vim.vm.VirtualHardware)](#hardware-vim-vm-virtualhardware)
	+ [cpuAllocation (vim.ResourceAllocationInfo, optional)](#cpuallocation-vim-resourceallocationinfo-optional)
	+ [memoryAllocation (vim.ResourceAllocationInfo, optional)](#memoryallocation-vim-resourceallocationinfo-optional)
	+ [latencySensitivity (vim.LatencySensitivity, optional)](#latencysensitivity-vim-latencysensitivity-optional)
	+ [memoryHotAddEnabled (bool, optional)](#memoryhotaddenabled-bool-optional)
	+ [cpuHotAddEnabled (bool, optional)](#cpuhotaddenabled-bool-optional)
	+ [cpuHotRemoveEnabled (bool, optional)](#cpuhotremoveenabled-bool-optional)
	+ [hotPlugMemoryLimit (long, optional)](#hotplugmemorylimit-long-optional)
	+ [hotPlugMemoryIncrementSize (long, optional)](#hotplugmemoryincrementsize-long-optional)
	+ [cpuAffinity (vim.vm.AffinityInfo, optional)](#cpuaffinity-vim-vm-affinityinfo-optional)
	+ [memoryAffinity (vim.vm.AffinityInfo, optional)](#memoryaffinity-vim-vm-affinityinfo-optional)
	+ [networkShaper (vim.vm.NetworkShaperInfo, optional)](#networkshaper-vim-vm-networkshaperinfo-optional)
	+ [extraConfig (vim.option.OptionValue, optional)](#extraconfig-vim-option-optionvalue-optional)
	+ [cpuFeatureMask (vim.host.CpuIdInfo, optional)](#cpufeaturemask-vim-host-cpuidinfo-optional)
	+ [datastoreUrl (vim.vm.ConfigInfo.DatastoreUrlPair, optional)](#datastoreurl-vim-vm-configinfo-datastoreurlpair-optional)
	+ [swapPlacement (str, optional)](#swapplacement-str-optional)
	+ [bootOptions (vim.vm.BootOptions, optional)](#bootoptions-vim-vm-bootoptions-optional)
	+ [ftInfo (vim.vm.FaultToleranceConfigInfo, optional)](#ftinfo-vim-vm-faulttoleranceconfiginfo-optional)
	+ [vAppConfig (vim.vApp.VmConfigInfo, optional)](#vappconfig-vim-vapp-vmconfiginfo-optional)
	+ [vAssertsEnabled (bool, optional)](#vassertsenabled-bool-optional)
	+ [changeTrackingEnabled (bool, optional)](#changetrackingenabled-bool-optional)
	+ [firmware (str, optional)](#firmware-str-optional)
	+ [maxMksConnections (int, optional)](#maxmksconnections-int-optional)
	+ [guestAutoLockEnabled (bool, optional)](#guestautolockenabled-bool-optional)
	+ [managedBy (vim.ext.ManagedByInfo, optional)](#managedby-vim-ext-managedbyinfo-optional)
	+ [memoryReservationLockedToMax (bool, optional)](#memoryreservationlockedtomax-bool-optional)
	+ [initialOverhead (vim.vm.ConfigInfo.OverheadInfo), optional)](#initialoverhead-vim-vm-configinfo-overheadinfo-optional)
	+ [nestedHVEnabled (bool, optional)](#nestedhvenabled-bool-optional)
	+ [vPMCEnabled (bool, optional)](#vpmcenabled-bool-optional)
	+ [scheduledHardwareUpgradeInfo (vim.vm.ScheduledHardwareUpgradeInfo, optional)](#scheduledhardwareupgradeinfo-vim-vm-scheduledhardwareupgradeinfo-optional)
	+ [vFlashCacheReservation (long, optional)](#vflashcachereservation-long-optional)
* [layout](#layout)


	+ [configFile (str, optional)](#configfile-str-optional)
	+ [logFile (str, optional)](#logfile-str-optional)
	+ [disk (vim.vm.FileLayout.DiskLayout, optional)](#disk-vim-vm-filelayout-disklayout-optional)
	+ [snapshot (vim.vm.FileLayout.SnapshotLayout, optional)](#snapshot-vim-vm-filelayout-snapshotlayout-optional)
	+ [swapFile (str, optional)](#swapfile-str-optional)
* [layoutEx](#layoutex)


	+ [file (vim.vm.FileLayoutEx.FileInfo, optional)](#file-vim-vm-filelayoutex-fileinfo-optional)
	+ [disk (vim.vm.FileLayoutEx.DiskLayout, optional)](#disk-vim-vm-filelayoutex-disklayout-optional)
	+ [snapshot (vim.vm.FileLayoutEx.SnapshotLayout, optional)](#snapshot-vim-vm-filelayoutex-snapshotlayout-optional)
	+ [timestamp (datetime)](#timestamp-datetime)
* [storage (vim.vm.StorageInfo)](#storage-vim-vm-storageinfo)


	+ [perDatastoreUsage (vim.vm.StorageInfo.UsageOnDatastore, optional)](#perdatastoreusage-vim-vm-storageinfo-usageondatastore-optional)
	+ [timestamp (datetime)](#id1)
* [environmentBrowser (vim.EnvironmentBrowser)](#environmentbrowser-vim-environmentbrowser)


	+ [datastoreBrowser (vim.host.DatastoreBrowser)](#datastorebrowser-vim-host-datastorebrowser)
* [resourcePool (vim.ResourcePool)](#resourcepool-vim-resourcepool)


	+ [summary (vim.ResourcePool.Summary)](#summary-vim-resourcepool-summary)
	+ [runtime (vim.ResourcePool.RuntimeInfo)](#runtime-vim-resourcepool-runtimeinfo)
	+ [owner (vim.ComputeResource)](#owner-vim-computeresource)
	+ [resourcePool (vim.ResourcePool)](#id2)
	+ [vm (vim.VirtualMachine)](#vm-vim-virtualmachine)
	+ [config (vim.ResourceConfigSpec)](#config-vim-resourceconfigspec)
	+ [childConfiguration (vim.ResourceConfigSpec)](#childconfiguration-vim-resourceconfigspec)
* [parentVApp (vim.ManagedEntity)](#parentvapp-vim-managedentity)


	+ [parent (vim.ManagedEntity)](#parent-vim-managedentity)
	+ [customValue (vim.CustomFieldsManager.Value)](#customvalue-vim-customfieldsmanager-value)
	+ [overallStatus (vim.ManagedEntity.Status)](#overallstatus-vim-managedentity-status)
	+ [configStatus (vim.ManagedEntity.Status)](#configstatus-vim-managedentity-status)
	+ [configIssue (vim.event.Event)](#configissue-vim-event-event)
	+ [effectiveRole (int)](#effectiverole-int)
	+ [permission (vim.AuthorizationManager.Permission)](#permission-vim-authorizationmanager-permission)
	+ [name (str)](#id3)
	+ [disabledMethod (str)](#disabledmethod-str)
	+ [recentTask (vim.Task)](#recenttask-vim-task)
	+ [declaredAlarmState (vim.alarm.AlarmState)](#declaredalarmstate-vim-alarm-alarmstate)
	+ [triggeredAlarmState (vim.alarm.AlarmState)](#triggeredalarmstate-vim-alarm-alarmstate)
	+ [alarmActionsEnabled (bool)](#alarmactionsenabled-bool)
	+ [tag (vim.Tag)](#tag-vim-tag)
* [resourceConfig (vim.ResourceConfigSpec)](#resourceconfig-vim-resourceconfigspec)


	+ [entity (vim.ManagedEntity, optional)](#entity-vim-managedentity-optional)
	+ [changeVersion (str, optional)](#changeversion-str-optional)
	+ [lastModified (datetime, optional)](#lastmodified-datetime-optional)
	+ [cpuAllocation (vim.ResourceAllocationInfo)](#cpuallocation-vim-resourceallocationinfo)
	+ [memoryAllocation (vim.ResourceAllocationInfo)](#memoryallocation-vim-resourceallocationinfo)
* [runtime (vim.vm.RuntimeInfo)](#runtime-vim-vm-runtimeinfo)


	+ [device (vim.vm.DeviceRuntimeInfo, optional)](#device-vim-vm-deviceruntimeinfo-optional)
	+ [host (vim.HostSystem, optional)](#host-vim-hostsystem-optional)
	+ [connectionState (vim.VirtualMachine.ConnectionState)](#connectionstate-vim-virtualmachine-connectionstate)
	+ [powerState (vim.VirtualMachine.PowerState)](#powerstate-vim-virtualmachine-powerstate)
	+ [faultToleranceState (vim.VirtualMachine.FaultToleranceState)](#faulttolerancestate-vim-virtualmachine-faulttolerancestate)
	+ [dasVmProtection (vim.vm.RuntimeInfo.DasProtectionState, optional)](#dasvmprotection-vim-vm-runtimeinfo-dasprotectionstate-optional)
	+ [toolsInstallerMounted (bool)](#toolsinstallermounted-bool)
	+ [suspendTime (datetime, optional)](#suspendtime-datetime-optional)
	+ [bootTime (datetime, optional)](#boottime-datetime-optional)
	+ [suspendInterval (long, optional)](#suspendinterval-long-optional)
	+ [question (vim.vm.QuestionInfo, optional)](#question-vim-vm-questioninfo-optional)
	+ [memoryOverhead (long, optional)](#memoryoverhead-long-optional)
	+ [maxCpuUsage (int, optional)](#maxcpuusage-int-optional)
	+ [maxMemoryUsage (int, optional)](#maxmemoryusage-int-optional)
	+ [numMksConnections (int)](#nummksconnections-int)
	+ [recordReplayState (vim.VirtualMachine.RecordReplayState)](#recordreplaystate-vim-virtualmachine-recordreplaystate)
	+ [cleanPowerOff (bool, optional)](#cleanpoweroff-bool-optional)
	+ [needSecondaryReason (str, optional)](#needsecondaryreason-str-optional)
	+ [onlineStandby (bool)](#onlinestandby-bool)
	+ [minRequiredEVCModeKey (str, optional)](#minrequiredevcmodekey-str-optional)
	+ [consolidationNeeded (bool)](#consolidationneeded-bool)
	+ [offlineFeatureRequirement (vim.vm.FeatureRequirement, optional)](#offlinefeaturerequirement-vim-vm-featurerequirement-optional)
	+ [featureRequirement (vim.vm.FeatureRequirement, optional)](#featurerequirement-vim-vm-featurerequirement-optional)
	+ [featureMask (vim.host.FeatureMask, optional)](#featuremask-vim-host-featuremask-optional)
	+ [vFlashCacheAllocation (long, optional)](#vflashcacheallocation-long-optional)
* [guest (vim.vm.GuestInfo)](#guest-vim-vm-guestinfo)


	+ [toolsStatus (vim.vm.GuestInfo.ToolsStatus, optional)](#toolsstatus-vim-vm-guestinfo-toolsstatus-optional)
	+ [toolsVersionStatus (str, optional)](#toolsversionstatus-str-optional)
	+ [toolsVersionStatus2 (str, optional)](#toolsversionstatus2-str-optional)
	+ [toolsRunningStatus (str, optional)](#toolsrunningstatus-str-optional)
	+ [toolsVersion (str, optional)](#toolsversion-str-optional)
	+ [guestId (str, optional)](#guestid-str-optional)
	+ [guestFamily (str, optional)](#guestfamily-str-optional)
	+ [guestFullName (str, optional)](#guestfullname-str-optional)
	+ [hostName (str, optional)](#hostname-str-optional)
	+ [ipAddress (str, optional)](#ipaddress-str-optional)
	+ [net (vim.vm.GuestInfo.NicInfo, optional)](#net-vim-vm-guestinfo-nicinfo-optional)
	+ [ipStack (vim.vm.GuestInfo.StackInfo, optional)](#ipstack-vim-vm-guestinfo-stackinfo-optional)
	+ [disk (vim.vm.GuestInfo.DiskInfo, optional)](#disk-vim-vm-guestinfo-diskinfo-optional)
	+ [screen (vim.vm.GuestInfo.ScreenInfo, optional)](#screen-vim-vm-guestinfo-screeninfo-optional)
	+ [guestState (str)](#gueststate-str)
	+ [appHeartbeatStatus (str, optional)](#appheartbeatstatus-str-optional)
	+ [appState (str, optional)](#appstate-str-optional)
	+ [guestOperationsReady (bool, optional)](#guestoperationsready-bool-optional)
	+ [interactiveGuestOperationsReady (bool, optional)](#interactiveguestoperationsready-bool-optional)
	+ [generationInfo (vim.vm.GuestInfo.NamespaceGenerationInfo, privilege: VirtualMachine.Namespace.EventNotify, optional)](#generationinfo-vim-vm-guestinfo-namespacegenerationinfo-privilege-virtualmachine-namespace-eventnotify-optional)
* [summary (vim.vm.Summary)](#summary-vim-vm-summary)


	+ [vm (vim.VirtualMachine, optional)](#vm-vim-virtualmachine-optional)
	+ [runtime (vim.vm.RuntimeInfo)](#id4)
	+ [guest (vim.vm.Summary.GuestSummary, optional)](#guest-vim-vm-summary-guestsummary-optional)
	+ [config (vim.vm.Summary.ConfigSummary)](#config-vim-vm-summary-configsummary)
	+ [storage (vim.vm.Summary.StorageSummary, optional)](#storage-vim-vm-summary-storagesummary-optional)
	+ [quickStats (vim.vm.Summary.QuickStats)](#quickstats-vim-vm-summary-quickstats)
	+ [overallStatus (vim.ManagedEntity.Status)](#id5)
	+ [customValue (vim.CustomFieldsManager.Value, optional)](#customvalue-vim-customfieldsmanager-value-optional)
* [datastore (vim.Datastore)](#datastore-vim-datastore)


	+ [info (vim.Datastore.Info)](#info-vim-datastore-info)
	+ [summary (vim.Datastore.Summary)](#summary-vim-datastore-summary)
	+ [host (vim.Datastore.HostMount)](#host-vim-datastore-hostmount)
	+ [vm (vim.VirtualMachine)](#id6)
	+ [browser (vim.host.DatastoreBrowser)](#browser-vim-host-datastorebrowser)
	+ [capability (vim.Datastore.Capability)](#capability-vim-datastore-capability)
	+ [iormConfiguration (vim.StorageResourceManager.IORMConfigInfo)](#iormconfiguration-vim-storageresourcemanager-iormconfiginfo)
* [network (vim.Network)](#network-vim-network)


	+ [name (str)](#id7)
	+ [summary (vim.Network.Summary)](#summary-vim-network-summary)
	+ [host (vim.HostSystem)](#host-vim-hostsystem)
	+ [vm (vim.VirtualMachine)](#id8)
* [snapshot (vim.vm.SnapshotInfo)](#snapshot-vim-vm-snapshotinfo)


	+ [currentSnapshot (vim.vm.Snapshot, optional)](#currentsnapshot-vim-vm-snapshot-optional)
	+ [rootSnapshotList (vim.vm.SnapshotTree)](#rootsnapshotlist-vim-vm-snapshottree)
* [rootSnapshot (vim.vm.Snapshot)](#rootsnapshot-vim-vm-snapshot)


	+ [config (vim.vm.ConfigInfo)](#config-vim-vm-configinfo)
	+ [childSnapshot (vim.vm.Snapshot)](#childsnapshot-vim-vm-snapshot)
* [guestHeartbeatStatus (vim.ManagedEntity.Status)](#guestheartbeatstatus-vim-managedentity-status)


Virtual machine attributes
--------------------------

 You can use virtual machine properties which can be used to populate `hostvars` for the given virtual machine in a VMware dynamic inventory plugin.

 ### capability

 This section describes settings for the runtime capabilities of the virtual machine.

 #### snapshotOperationsSupported (bool)

 Indicates whether or not a virtual machine supports snapshot operations.

 #### multipleSnapshotsSupported (bool)

 Indicates whether or not a virtual machine supports multiple snapshots. This value is not set when the virtual machine is unavailable, for instance, when it is being created or deleted.

 #### snapshotConfigSupported (bool)

 Indicates whether or not a virtual machine supports snapshot config.

 #### poweredOffSnapshotsSupported (bool)

 Indicates whether or not a virtual machine supports snapshot operations in `poweredOff` state.

 #### memorySnapshotsSupported (bool)

 Indicates whether or not a virtual machine supports memory snapshots.

 #### revertToSnapshotSupported (bool)

 Indicates whether or not a virtual machine supports reverting to a snapshot.

 #### quiescedSnapshotsSupported (bool)

 Indicates whether or not a virtual machine supports quiesced snapshots.

 #### disableSnapshotsSupported (bool)

 Indicates whether or not snapshots can be disabled.

 #### lockSnapshotsSupported (bool)

 Indicates whether or not the snapshot tree can be locked.

 #### consolePreferencesSupported (bool)

 Indicates whether console preferences can be set for the virtual machine.

 #### cpuFeatureMaskSupported (bool)

 Indicates whether CPU feature requirements masks can be set for the virtual machine.

 #### s1AcpiManagementSupported (bool)

 Indicates whether or not a virtual machine supports ACPI S1 settings management.

 #### settingScreenResolutionSupported (bool)

 Indicates whether or not the virtual machine supports setting the screen resolution of the console window.

 #### toolsAutoUpdateSupported (bool)

 Supports tools auto-update.

 #### vmNpivWwnSupported (bool)

 Supports virtual machine NPIV WWN.

 #### npivWwnOnNonRdmVmSupported (bool)

 Supports assigning NPIV WWN to virtual machines that do not have RDM disks.

 #### vmNpivWwnDisableSupported (bool)

 Indicates whether the NPIV disabling operation is supported on the virtual machine.

 #### vmNpivWwnUpdateSupported (bool)

 Indicates whether the update of NPIV WWNs are supported on the virtual machine.

 #### swapPlacementSupported (bool)

 Flag indicating whether the virtual machine has a configurable (swapfile placement policy).

 #### toolsSyncTimeSupported (bool)

 Indicates whether asking tools to sync time with the host is supported.

 #### virtualMmuUsageSupported (bool)

 Indicates whether or not the use of nested page table hardware support can be explicitly set.

 #### diskSharesSupported (bool)

 Indicates whether resource settings for disks can be applied to the virtual machine.

 #### bootOptionsSupported (bool)

 Indicates whether boot options can be configured for the virtual machine.

 #### bootRetryOptionsSupported (bool)

 Indicates whether automatic boot retry can be configured for the virtual machine.

 #### settingVideoRamSizeSupported (bool)

 Flag indicating whether the video RAM size of the virtual machine can be configured.

 #### settingDisplayTopologySupported (bool)

 Indicates whether or not the virtual machine supports setting the display topology of the console window.

 #### recordReplaySupported (bool)

 Indicates whether record and replay functionality is supported on the virtual machine.

 #### changeTrackingSupported (bool)

 Indicates that change tracking is supported for virtual disks of the virtual machine. However, even if change tracking is supported, it might not be available for all disks of the virtual machine. For example, passthru raw disk mappings or disks backed by any Ver1BackingInfo cannot be tracked.

 #### multipleCoresPerSocketSupported (bool)

 Indicates whether multiple virtual cores per socket is supported on the virtual machine.

 #### hostBasedReplicationSupported (bool)

 Indicates that host based replication is supported on the virtual machine. However, even if host based replication is supported, it might not be available for all disk types. For example, passthru raw disk mappings can not be replicated.

 #### guestAutoLockSupported (bool)

 Indicates whether or not guest autolock is supported on the virtual machine.

 #### memoryReservationLockSupported (bool)

 Indicates whether [memoryReservationLockedToMax (bool, optional)](#memory-reservation-locked-to-max) may be set to true for the virtual machine.

 #### featureRequirementSupported (bool)

 Indicates whether the featureRequirement feature is supported.

 #### poweredOnMonitorTypeChangeSupported (bool)

 Indicates whether a monitor type change is supported while the virtual machine is in the `poweredOn` state.

 #### seSparseDiskSupported (bool)

 Indicates whether the virtual machine supports the Flex-SE (space-efficent, sparse) format for virtual disks.

 #### nestedHVSupported (bool)

 Indicates whether the virtual machine supports nested hardware-assisted virtualization.

 #### vPMCSupported (bool)

 Indicates whether the virtual machine supports virtualized CPU performance counters.

 ### config

 This section describes the configuration settings of the virtual machine, including the name and UUID. This property is set when a virtual machine is created or when the `reconfigVM` method is called. The virtual machine configuration is not guaranteed to be available. For example, the configuration information would be unavailable if the server is unable to access the virtual machine files on disk, and is often also unavailable during the initial phases of virtual machine creation.

 #### changeVersion (str)

 The changeVersion is a unique identifier for a given version of the configuration. Each change to the configuration updates this value. This is typically implemented as an ever increasing count or a time-stamp. However, a client should always treat this as an opaque string.

 #### modified (datetime)

 Last time a virtual machine’s configuration was modified.

 #### name (str)

 Display name of the virtual machine. Any / (slash), (backslash), character used in this name element is escaped. Similarly, any % (percent) character used in this name element is escaped, unless it is used to start an escape sequence. A slash is escaped as %2F or %2f. A backslash is escaped as %5C or %5c, and a percent is escaped as %25.

 #### guestFullName (str)

 This is the full name of the guest operating system for the virtual machine. For example: Windows 2000 Professional. See [alternateGuestName (str)](#alternate-guest-name).

 #### version (str)

 The version string for the virtual machine.

 #### uuid (str)

 128-bit SMBIOS UUID of a virtual machine represented as a hexadecimal string in “12345678-abcd-1234-cdef-123456789abc” format.

 #### instanceUuid (str, optional)

 VirtualCenter-specific 128-bit UUID of a virtual machine, represented as a hexademical string. This identifier is used by VirtualCenter to uniquely identify all virtual machine instances, including those that may share the same SMBIOS UUID.

 #### npivNodeWorldWideName (long, optional)

 A 64-bit node WWN (World Wide Name).

 #### npivPortWorldWideName (long, optional)

 A 64-bit port WWN (World Wide Name).

 #### npivWorldWideNameType (str, optional)

 The source that provides/generates the assigned WWNs.

 #### npivDesiredNodeWwns (short, optional)

 The NPIV node WWNs to be extended from the original list of WWN numbers.

 #### npivDesiredPortWwns (short, optional)

 The NPIV port WWNs to be extended from the original list of WWN numbers.

 #### npivTemporaryDisabled (bool, optional)

 This property is used to enable or disable the NPIV capability on a desired virtual machine on a temporary basis.

 #### npivOnNonRdmDisks (bool, optional)

 This property is used to check whether the NPIV can be enabled on the Virtual machine with non-rdm disks in the configuration, so this is potentially not enabling npiv on vmfs disks. Also this property is used to check whether RDM is required to generate WWNs for a virtual machine.

 #### locationId (str, optional)

 Hash incorporating the virtual machine’s config file location and the UUID of the host assigned to run the virtual machine.

 #### template (bool)

 Flag indicating whether or not a virtual machine is a template.

 #### guestId (str)

 Guest operating system configured on a virtual machine.

 #### alternateGuestName (str)

 Used as display name for the operating system if guestId isotherorother-64. See [guestFullName (str)](#guest-full-name).

 #### annotation (str, optional)

 Description for the virtual machine.

 #### files (vim.vm.FileInfo)

 Information about the files associated with a virtual machine. This information does not include files for specific virtual disks or snapshots.

 #### tools (vim.vm.ToolsConfigInfo, optional)

 Configuration of VMware Tools running in the guest operating system.

 #### flags (vim.vm.FlagInfo)

 Additional flags for a virtual machine.

 #### consolePreferences (vim.vm.ConsolePreferences, optional)

 Legacy console viewer preferences when doing power operations.

 #### defaultPowerOps (vim.vm.DefaultPowerOpInfo)

 Configuration of default power operations.

 #### hardware (vim.vm.VirtualHardware)

 Processor, memory, and virtual devices for a virtual machine.

 #### cpuAllocation (vim.ResourceAllocationInfo, optional)

 Resource limits for CPU.

 #### memoryAllocation (vim.ResourceAllocationInfo, optional)

 Resource limits for memory.

 #### latencySensitivity (vim.LatencySensitivity, optional)

 The latency-sensitivity of the virtual machine.

 #### memoryHotAddEnabled (bool, optional)

 Whether memory can be added while the virtual machine is running.

 #### cpuHotAddEnabled (bool, optional)

 Whether virtual processors can be added while the virtual machine is running.

 #### cpuHotRemoveEnabled (bool, optional)

 Whether virtual processors can be removed while the virtual machine is running.

 #### hotPlugMemoryLimit (long, optional)

 The maximum amount of memory, in MB, than can be added to a running virtual machine.

 #### hotPlugMemoryIncrementSize (long, optional)

 Memory, in MB that can be added to a running virtual machine.

 #### cpuAffinity (vim.vm.AffinityInfo, optional)

 Affinity settings for CPU.

 #### memoryAffinity (vim.vm.AffinityInfo, optional)

 Affinity settings for memory.

 #### networkShaper (vim.vm.NetworkShaperInfo, optional)

 Resource limits for network.

 #### extraConfig (vim.option.OptionValue, optional)

 Additional configuration information for the virtual machine.

 #### cpuFeatureMask (vim.host.CpuIdInfo, optional)

 Specifies CPU feature compatibility masks that override the defaults from the `GuestOsDescriptor` of the virtual machine’s guest OS.

 #### datastoreUrl (vim.vm.ConfigInfo.DatastoreUrlPair, optional)

 Enumerates the set of datastores that the virtual machine is stored on, as well as the URL identification for each of these.

 #### swapPlacement (str, optional)

 Virtual machine swapfile placement policy.

 #### bootOptions (vim.vm.BootOptions, optional)

 Configuration options for the boot behavior of the virtual machine.

 #### ftInfo (vim.vm.FaultToleranceConfigInfo, optional)

 Fault tolerance settings for the virtual machine.

 #### vAppConfig (vim.vApp.VmConfigInfo, optional)

 vApp meta-data for the virtual machine.

 #### vAssertsEnabled (bool, optional)

 Indicates whether user-configured virtual asserts will be triggered during virtual machine replay.

 #### changeTrackingEnabled (bool, optional)

 Indicates whether changed block tracking for the virtual machine’s disks is active.

 #### firmware (str, optional)

 Information about firmware type for the virtual machine.

 #### maxMksConnections (int, optional)

 Indicates the maximum number of active remote display connections that the virtual machine will support.

 #### guestAutoLockEnabled (bool, optional)

 Indicates whether the guest operating system will logout any active sessions whenever there are no remote display connections open to the virtual machine.

 #### managedBy (vim.ext.ManagedByInfo, optional)

 Specifies that the virtual machine is managed by a VC Extension.

 #### memoryReservationLockedToMax (bool, optional)

 If set true, memory resource reservation for the virtual machine will always be equal to the virtual machine’s memory size; increases in memory size will be rejected when a corresponding reservation increase is not possible.

 #### initialOverhead (vim.vm.ConfigInfo.OverheadInfo), optional)

 Set of values to be used only to perform admission control when determining if a host has sufficient resources for the virtual machine to power on.

 #### nestedHVEnabled (bool, optional)

 Indicates whether the virtual machine is configured to use nested hardware-assisted virtualization.

 #### vPMCEnabled (bool, optional)

 Indicates whether the virtual machine have virtual CPU performance counters enabled.

 #### scheduledHardwareUpgradeInfo (vim.vm.ScheduledHardwareUpgradeInfo, optional)

 Configuration of scheduled hardware upgrades and result from last attempt to run scheduled hardware upgrade.

 #### vFlashCacheReservation (long, optional)

 Specifies the total vFlash resource reservation for the vFlash caches associated with the virtual machine’s virtual disks, in bytes.

 ### layout

 Detailed information about the files that comprise the virtual machine.

 #### configFile (str, optional)

 A list of files that makes up the configuration of the virtual machine (excluding the .vmx file, since that file is represented in the FileInfo). These are relative paths from the configuration directory. A slash is always used as a separator. This list will typically include the NVRAM file, but could also include other meta-data files.

 #### logFile (str, optional)

 A list of files stored in the virtual machine’s log directory. These are relative paths from the `logDirectory`. A slash is always used as a separator.

 #### disk (vim.vm.FileLayout.DiskLayout, optional)

 Files making up each virtual disk.

 #### snapshot (vim.vm.FileLayout.SnapshotLayout, optional)

 Files of each snapshot.

 #### swapFile (str, optional)

 The swapfile specific to the virtual machine, if any. This is a complete datastore path, not a relative path.

 ### layoutEx

 Detailed information about the files that comprise the virtual machine.

 #### file (vim.vm.FileLayoutEx.FileInfo, optional)

 Information about all the files that constitute the virtual machine including configuration files, disks, swap file, suspend file, log files, core files, memory file and so on.

 #### disk (vim.vm.FileLayoutEx.DiskLayout, optional)

 Layout of each virtual disk attached to the virtual machine. For a virtual machine with snaphots, this property gives only those disks that are attached to it at the current point of running.

 #### snapshot (vim.vm.FileLayoutEx.SnapshotLayout, optional)

 Layout of each snapshot of the virtual machine.

 #### timestamp (datetime)

 Time when values in this structure were last updated.

 ### storage (vim.vm.StorageInfo)

 Storage space used by the virtual machine, split by datastore.

 #### perDatastoreUsage (vim.vm.StorageInfo.UsageOnDatastore, optional)

 Storage space used by the virtual machine on all datastores that it is located on. Total storage space committed to the virtual machine across all datastores is simply an aggregate of the property `committed`

 #### timestamp (datetime)

 Time when values in this structure were last updated.

 ### environmentBrowser (vim.EnvironmentBrowser)

 The current virtual machine’s environment browser object. This contains information on all the configurations that can be used on the virtual machine. This is identical to the environment browser on the ComputeResource to which the virtual machine belongs.

 #### datastoreBrowser (vim.host.DatastoreBrowser)

 DatastoreBrowser to browse datastores that are available on this entity.

 ### resourcePool (vim.ResourcePool)

 The current resource pool that specifies resource allocation for the virtual machine. This property is set when a virtual machine is created or associated with a different resource pool. Returns null if the virtual machine is a template or the session has no access to the resource pool.

 #### summary (vim.ResourcePool.Summary)

 Basic information about a resource pool.

 #### runtime (vim.ResourcePool.RuntimeInfo)

 Runtime information about a resource pool.

 #### owner (vim.ComputeResource)

 The ComputeResource to which this set of one or more nested resource pools belong.

 #### resourcePool (vim.ResourcePool)

 The set of child resource pools.

 #### vm (vim.VirtualMachine)

 The set of virtual machines associated with this resource pool.

 #### config (vim.ResourceConfigSpec)

 Configuration of this resource pool.

 #### childConfiguration (vim.ResourceConfigSpec)

 The resource configuration of all direct children (VirtualMachine and ResourcePool) of this resource group.

 ### parentVApp (vim.ManagedEntity)

 Reference to the parent vApp.

 #### parent (vim.ManagedEntity)

 Parent of this entity. This value is null for the root object and for (VirtualMachine) objects that are part of a (VirtualApp).

 #### customValue (vim.CustomFieldsManager.Value)

 Custom field values.

 #### overallStatus (vim.ManagedEntity.Status)

 General health of this managed entity.

 #### configStatus (vim.ManagedEntity.Status)

 The configStatus indicates whether or not the system has detected a configuration issue involving this entity. For example, it might have detected a duplicate IP address or MAC address, or a host in a cluster might be out of `compliance.property`.

 #### configIssue (vim.event.Event)

 Current configuration issues that have been detected for this entity.

 #### effectiveRole (int)

 Access rights the current session has to this entity.

 #### permission (vim.AuthorizationManager.Permission)

 List of permissions defined for this entity.

 #### name (str)

 Name of this entity, unique relative to its parent. Any / (slash), (backslash), character used in this name element will be escaped. Similarly, any % (percent) character used in this name element will be escaped, unless it is used to start an escape sequence. A slash is escaped as %2F or %2f. A backslash is escaped as %5C or %5c, and a percent is escaped as %25.

 #### disabledMethod (str)

 List of operations that are disabled, given the current runtime state of the entity. For example, a power-on operation always fails if a virtual machine is already powered on.

 #### recentTask (vim.Task)

 The set of recent tasks operating on this managed entity. A task in this list could be in one of the four states: pending, running, success or error.

 #### declaredAlarmState (vim.alarm.AlarmState)

 A set of alarm states for alarms that apply to this managed entity.

 #### triggeredAlarmState (vim.alarm.AlarmState)

 A set of alarm states for alarms triggered by this entity or by its descendants.

 #### alarmActionsEnabled (bool)

 Whether alarm actions are enabled for this entity. True if enabled; false otherwise.

 #### tag (vim.Tag)

 The set of tags associated with this managed entity. Experimental. Subject to change.

 ### resourceConfig (vim.ResourceConfigSpec)

 The resource configuration for a virtual machine.

 #### entity (vim.ManagedEntity, optional)

 Reference to the entity with this resource specification: either a VirtualMachine or a ResourcePool.

 #### changeVersion (str, optional)

 The changeVersion is a unique identifier for a given version of the configuration. Each change to the configuration will update this value. This is typically implemented as an ever increasing count or a time-stamp.

 #### lastModified (datetime, optional)

 Timestamp when the resources were last modified. This is ignored when the object is used to update a configuration.

 #### cpuAllocation (vim.ResourceAllocationInfo)

 Resource allocation for CPU.

 #### memoryAllocation (vim.ResourceAllocationInfo)

 Resource allocation for memory.

 ### runtime (vim.vm.RuntimeInfo)

 Execution state and history for the virtual machine.

 #### device (vim.vm.DeviceRuntimeInfo, optional)

 Per-device runtime info. This array will be empty if the host software does not provide runtime info for any of the device types currently in use by the virtual machine.

 #### host (vim.HostSystem, optional)

 The host that is responsible for running a virtual machine. This property is null if the virtual machine is not running and is not assigned to run on a particular host.

 #### connectionState (vim.VirtualMachine.ConnectionState)

 Indicates whether or not the virtual machine is available for management.

 #### powerState (vim.VirtualMachine.PowerState)

 The current power state of the virtual machine.

 #### faultToleranceState (vim.VirtualMachine.FaultToleranceState)

 The fault tolerance state of the virtual machine.

 #### dasVmProtection (vim.vm.RuntimeInfo.DasProtectionState, optional)

 The vSphere HA protection state for a virtual machine. Property is unset if vSphere HA is not enabled.

 #### toolsInstallerMounted (bool)

 Flag to indicate whether or not the VMware Tools installer is mounted as a CD-ROM.

 #### suspendTime (datetime, optional)

 The timestamp when the virtual machine was most recently suspended. This property is updated every time the virtual machine is suspended.

 #### bootTime (datetime, optional)

 The timestamp when the virtual machine was most recently powered on. This property is updated when the virtual machine is powered on from the poweredOff state, and is cleared when the virtual machine is powered off. This property is not updated when a virtual machine is resumed from a suspended state.

 #### suspendInterval (long, optional)

 The total time the virtual machine has been suspended since it was initially powered on. This time excludes the current period, if the virtual machine is currently suspended. This property is updated when the virtual machine resumes, and is reset to zero when the virtual machine is powered off.

 #### question (vim.vm.QuestionInfo, optional)

 The current question, if any, that is blocking the virtual machine’s execution.

 #### memoryOverhead (long, optional)

 The amount of memory resource (in bytes) that will be used by the virtual machine above its guest memory requirements. This value is set if and only if the virtual machine is registered on a host that supports memory resource allocation features. For powered off VMs, this is the minimum overhead required to power on the VM on the registered host. For powered on VMs, this is the current overhead reservation, a value which is almost always larger than the minimum overhead, and which grows with time.

 #### maxCpuUsage (int, optional)

 Current upper-bound on CPU usage. The upper-bound is based on the host the virtual machine is current running on, as well as limits configured on the virtual machine itself or any parent resource pool. Valid while the virtual machine is running.

 #### maxMemoryUsage (int, optional)

 Current upper-bound on memory usage. The upper-bound is based on memory configuration of the virtual machine, as well as limits configured on the virtual machine itself or any parent resource pool. Valid while the virtual machine is running.

 #### numMksConnections (int)

 Number of active MKS connections to the virtual machine.

 #### recordReplayState (vim.VirtualMachine.RecordReplayState)

 Record / replay state of the virtual machine.

 #### cleanPowerOff (bool, optional)

 For a powered off virtual machine, indicates whether the virtual machine’s last shutdown was an orderly power off or not. Unset if the virtual machine is running or suspended.

 #### needSecondaryReason (str, optional)

 If set, indicates the reason the virtual machine needs a secondary.

 #### onlineStandby (bool)

 This property indicates whether the guest has gone into one of the s1, s2 or s3 standby modes. False indicates the guest is awake.

 #### minRequiredEVCModeKey (str, optional)

 For a powered-on or suspended virtual machine in a cluster with Enhanced VMotion Compatibility (EVC) enabled, this identifies the least-featured EVC mode (among those for the appropriate CPU vendor) that could admit the virtual machine. This property will be unset if the virtual machine is powered off or is not in an EVC cluster. This property may be used as a general indicator of the CPU feature baseline currently in use by the virtual machine. However, the virtual machine may be suppressing some of the features present in the CPU feature baseline of the indicated mode, either explicitly (in the virtual machine’s configured `cpuFeatureMask`) or implicitly (in the default masks for the `GuestOsDescriptor` appropriate for the virtual machine’s configured guest OS).

 #### consolidationNeeded (bool)

 Whether any disk of the virtual machine requires consolidation. This can happen for example when a snapshot is deleted but its associated disk is not committed back to the base disk.

 #### offlineFeatureRequirement (vim.vm.FeatureRequirement, optional)

 These requirements must have equivalent host capabilities `featureCapability` in order to power on.

 #### featureRequirement (vim.vm.FeatureRequirement, optional)

 These requirements must have equivalent host capabilities `featureCapability` in order to power on, resume, or migrate to the host.

 #### featureMask (vim.host.FeatureMask, optional)

 The masks applied to an individual virtual machine as a result of its configuration.

 #### vFlashCacheAllocation (long, optional)

 Specifies the total allocated vFlash resource for the vFlash caches associated with VM’s VMDKs when VM is powered on, in bytes.

 ### guest (vim.vm.GuestInfo)

 Information about VMware Tools and about the virtual machine from the perspective of VMware Tools. Information about the guest operating system is available in VirtualCenter. Guest operating system information reflects the last known state of the virtual machine. For powered on machines, this is current information. For powered off machines, this is the last recorded state before the virtual machine was powered off.

 #### toolsStatus (vim.vm.GuestInfo.ToolsStatus, optional)

 Current status of VMware Tools in the guest operating system, if known.

 #### toolsVersionStatus (str, optional)

 Current version status of VMware Tools in the guest operating system, if known.

 #### toolsVersionStatus2 (str, optional)

 Current version status of VMware Tools in the guest operating system, if known.

 #### toolsRunningStatus (str, optional)

 Current running status of VMware Tools in the guest operating system, if known.

 #### toolsVersion (str, optional)

 Current version of VMware Tools, if known.

 #### guestId (str, optional)

 Guest operating system identifier (short name), if known.

 #### guestFamily (str, optional)

 Guest operating system family, if known.

 #### guestFullName (str, optional)

 See [guestFullName (str)](#guest-full-name).

 #### hostName (str, optional)

 Hostname of the guest operating system, if known.

 #### ipAddress (str, optional)

 Primary IP address assigned to the guest operating system, if known.

 #### net (vim.vm.GuestInfo.NicInfo, optional)

 Guest information about network adapters, if known.

 #### ipStack (vim.vm.GuestInfo.StackInfo, optional)

 Guest information about IP networking stack, if known.

 #### disk (vim.vm.GuestInfo.DiskInfo, optional)

 Guest information about disks. You can obtain Linux guest disk information for the following file system types only: Ext2, Ext3, Ext4, ReiserFS, ZFS, NTFS, VFAT, UFS, PCFS, HFS, and MS-DOS.

 #### screen (vim.vm.GuestInfo.ScreenInfo, optional)

 Guest screen resolution info, if known.

 #### guestState (str)

 Operation mode of guest operating system.

 #### appHeartbeatStatus (str, optional)

 Application heartbeat status.

 #### appState (str, optional)

 Application state. If vSphere HA is enabled and the vm is configured for Application Monitoring and this field’s value is `appStateNeedReset` then HA will attempt immediately reset the virtual machine. There are some system conditions which may delay the immediate reset. The immediate reset will be performed as soon as allowed by vSphere HA and ESX. If during these conditions the value is changed to `appStateOk` the reset will be cancelled.

 #### guestOperationsReady (bool, optional)

 Guest Operations availability. If true, the vitrual machine is ready to process guest operations.

 #### interactiveGuestOperationsReady (bool, optional)

 Interactive Guest Operations availability. If true, the virtual machine is ready to process guest operations as the user interacting with the guest desktop.

 #### generationInfo (vim.vm.GuestInfo.NamespaceGenerationInfo, privilege: VirtualMachine.Namespace.EventNotify, optional)

 A list of namespaces and their corresponding generation numbers. Only namespaces with non-zero `maxSizeEventsFromGuest` are guaranteed to be present here.

 ### summary (vim.vm.Summary)

 Basic information about the virtual machine.

 #### vm (vim.VirtualMachine, optional)

 Reference to the virtual machine managed object.

 #### runtime (vim.vm.RuntimeInfo)

 Runtime and state information of a running virtual machine. Most of this information is also available when a virtual machine is powered off. In that case, it contains information from the last run, if available.

 #### guest (vim.vm.Summary.GuestSummary, optional)

 Guest operating system and VMware Tools information.

 #### config (vim.vm.Summary.ConfigSummary)

 Basic configuration information about the virtual machine. This information is not available when the virtual machine is unavailable, for instance, when it is being created or deleted.

 #### storage (vim.vm.Summary.StorageSummary, optional)

 Storage information of the virtual machine.

 #### quickStats (vim.vm.Summary.QuickStats)

 A set of statistics that are typically updated with near real-time regularity.

 #### overallStatus (vim.ManagedEntity.Status)

 Overall alarm status on this node.

 #### customValue (vim.CustomFieldsManager.Value, optional)

 Custom field values.

 ### datastore (vim.Datastore)

 A collection of references to the subset of datastore objects in the datacenter that is used by the virtual machine.

 #### info (vim.Datastore.Info)

 Specific information about the datastore.

 #### summary (vim.Datastore.Summary)

 Global properties of the datastore.

 #### host (vim.Datastore.HostMount)

 Hosts attached to this datastore.

 #### vm (vim.VirtualMachine)

 Virtual machines stored on this datastore.

 #### browser (vim.host.DatastoreBrowser)

 DatastoreBrowser used to browse this datastore.

 #### capability (vim.Datastore.Capability)

 Capabilities of this datastore.

 #### iormConfiguration (vim.StorageResourceManager.IORMConfigInfo)

 Configuration of storage I/O resource management for the datastore. Currently VMware only support storage I/O resource management on VMFS volumes of a datastore. This configuration may not be available if the datastore is not accessible from any host, or if the datastore does not have VMFS volume.

 ### network (vim.Network)

 A collection of references to the subset of network objects in the datacenter that is used by the virtual machine.

 #### name (str)

 Name of this network.

 #### summary (vim.Network.Summary)

 Properties of a network.

 #### host (vim.HostSystem)

 Hosts attached to this network.

 #### vm (vim.VirtualMachine)

 Virtual machines using this network.

 ### snapshot (vim.vm.SnapshotInfo)

 Current snapshot and tree. The property is valid if snapshots have been created for the virtual machine.

 #### currentSnapshot (vim.vm.Snapshot, optional)

 Current snapshot of the virtual machineThis property is set by calling `Snapshot.revert` or `VirtualMachine.createSnapshot`. This property will be empty when the working snapshot is at the root of the snapshot tree.

 #### rootSnapshotList (vim.vm.SnapshotTree)

 Data for the entire set of snapshots for one virtual machine.

 ### rootSnapshot (vim.vm.Snapshot)

 The roots of all snapshot trees for the virtual machine.

 #### config (vim.vm.ConfigInfo)

 Information about the configuration of the virtual machine when this snapshot was taken. The datastore paths for the virtual machine disks point to the head of the disk chain that represents the disk at this given snapshot.

 #### childSnapshot (vim.vm.Snapshot)

 All snapshots for which this snapshot is the parent.

 ### guestHeartbeatStatus (vim.ManagedEntity.Status)

 The guest heartbeat.

  See also

  [pyVmomi](https://github.com/vmware/pyvmomi)

The GitHub Page of pyVmomi

  [pyVmomi Issue Tracker](https://github.com/vmware/pyvmomi/issues)

The issue tracker for the pyVmomi project

  rst/scenario\_guides/guide\_vmware.rst

The GitHub Page of vSphere Automation SDK for Python

  [vSphere Automation SDK Issue Tracker](https://github.com/vmware/vsphere-automation-sdk-python/issues)

The issue tracker for vSphere Automation SDK for Python

  [Working with playbooks](../../user_guide/playbooks#working-with-playbooks)

An introduction to playbooks

  [Using encrypted variables and files](../../user_guide/vault#playbooks-vault)

Using Vault in playbooks

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_scenarios/vmware_inventory_vm_attributes.html>

How to collect information about your environment
=================================================

 * [Introduction](#introduction)
* [Scenario requirements](#scenario-requirements)
* [How to collect information](#how-to-collect-information)


	+ [Datacenter](#datacenter)
	
	
		- [Result](#result)
	+ [Cluster](#cluster)
	
	
		- [Result](#id1)
		- [Result](#id2)
	+ [Datastore](#datastore)
	
	
		- [Result](#id3)
	+ [Folder](#folder)
	
	
		- [Result](#id4)
		- [Result](#id5)

 Introduction
------------

 This section shows you how to utilize Ansible to collect information about your environment. This information is useful for the other tutorials.

 Scenario requirements
---------------------

 In this scenario we’ve got a vCenter with an ESXi host.

 Our environment is pre-initialized with the following elements:

 * A datacenter called `my_dc`
* A cluster called `my_cluser`
* A cluster called `my_cluser`
* An ESXi host called `esxi1` is in the cluster
* Two datastores on the ESXi: `rw_datastore` and `ro_datastore`
* A dvswitch based guest network

 Finally, we use the environment variables to authenticate ourselves as explained in [How to configure the vmware\_rest collection](authentication#vmware-rest-authentication).

 How to collect information
--------------------------

 In these examples, we use the `vcenter_*_info` module to collect information about the associated resources.

 All these modules return a `value` key. Depending on the context, this `value` key will be either a list or a dictionary.

 ### Datacenter

 Here we use the `vcenter_datacenter_info` module to list all the datacenters:

 
```
- name: collect a list of the datacenters
  vmware.vmware_rest.vcenter_datacenter_info:
  register: my_datacenters

```
 #### Result

 As expected, the `value` key of the output is a list.

 
```
{
    "value": [
        {
            "name": "my_dc",
            "datacenter": "datacenter-1630"
        }
    ],
    "changed": false
}

```
 ### Cluster

 Here we do the same with `vcenter_cluster_info`:

 
```
- name: Build a list of all the clusters
  vmware.vmware_rest.vcenter_cluster_info:
  register: all_the_clusters

```
 #### Result

 
```
{
    "value": [
        {
            "drs_enabled": false,
            "cluster": "domain-c1636",
            "name": "my_cluster",
            "ha_enabled": false
        }
    ],
    "changed": false
}

```
 And we can also fetch the details about a specific cluster, with the `cluster` parameter:

 
```
- name: Retrieve details about the first cluster
  vmware.vmware_rest.vcenter_cluster_info:
    cluster: "{{ all_the_clusters.value[0].cluster }}"
  register: my_cluster_info

```
 #### Result

 And the `value` key of the output is this time a dictionary.

 
```
{
    "value": {
        "name": "my_cluster",
        "resource_pool": "resgroup-1637"
    },
    "id": "domain-c1636",
    "changed": false
}

```
 ### Datastore

 Here we use `vcenter_datastore_info` to get a list of all the datastores:

 
```
- name: Retrieve a list of all the datastores
  vmware.vmware_rest.vcenter_datastore_info:
  register: my_datastores

```
 #### Result

 
```
{
    "value": [
        {
            "datastore": "datastore-1644",
            "name": "local",
            "type": "VMFS",
            "free_space": 13523484672,
            "capacity": 15032385536
        },
        {
            "datastore": "datastore-1645",
            "name": "ro_datastore",
            "type": "NFS",
            "free_space": 24638349312,
            "capacity": 26831990784
        },
        {
            "datastore": "datastore-1646",
            "name": "rw_datastore",
            "type": "NFS",
            "free_space": 24638349312,
            "capacity": 26831990784
        }
    ],
    "changed": false
}

```
 ### Folder

 And here again, you use the `vcenter_folder_info` module to retrieve a list of all the folders.

 
```
- name: Build a list of all the folders
  vmware.vmware_rest.vcenter_folder_info:
  register: my_folders

```
 #### Result

 
```
{
    "value": [
        {
            "folder": "group-d1",
            "name": "Datacenters",
            "type": "DATACENTER"
        }
    ],
    "changed": false
}

```
 Most of the time, you will just want one type of folder. In this case we can use filters to reduce the amount to collect. Most of the `_info` modules come with similar filters.

 
```
- name: Build a list of all the folders with the type VIRTUAL_MACHINE and called vm
  vmware.vmware_rest.vcenter_folder_info:
    filter_type: VIRTUAL_MACHINE
    filter_names:
      - vm
  register: my_folders

```
 #### Result

 
```
{
    "value": [
        {
            "folder": "group-v1631",
            "name": "vm",
            "type": "VIRTUAL_MACHINE"
        }
    ],
    "changed": false
}

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_rest_scenarios/collect_information.html>

How to get information from a running virtual machine
=====================================================

 * [Introduction](#introduction)
* [Scenario requirements](#scenario-requirements)
* [How to collect information](#how-to-collect-information)


	+ [Filesystem](#filesystem)
	
	
		- [Result](#result)
	+ [Guest identity](#guest-identity)
	
	
		- [Result](#id1)
	+ [Network](#network)
	
	
		- [Result](#id2)
	+ [Network interfaces](#network-interfaces)
	
	
		- [Result](#id3)
	+ [Network routes](#network-routes)
	
	
		- [Result](#id4)

 Introduction
------------

 This section shows you how to collection information from a running virtual machine.

 Scenario requirements
---------------------

 You’ve already followed [How to run a virtual machine](run_a_vm#vmware-rest-run-a-vm) and your virtual machine runs VMware Tools.

 How to collect information
--------------------------

 In this example, we use the `vcenter_vm_guest_*` module to collect information about the associated resources.

 ### Filesystem

 Here we use `vcenter_vm_guest_localfilesystem_info` to retrieve the details about the filesystem of the guest. In this example we also use a `retries` loop. The VMware Tools may take a bit of time to start and by doing so, we give the VM a bit more time.

 
```
- name: Get guest filesystem information
  vmware.vmware_rest.vcenter_vm_guest_localfilesystem_info:
    vm: '{{ test_vm1_info.id }}'
  register: _result
  until:
  - _result is not failed
  retries: 60
  delay: 5

```
 #### Result

 
```
{
    "value": [
        {
            "value": {
                "mappings": [],
                "free_space": 774766592,
                "capacity": 2515173376
            },
            "key": "/"
        }
    ],
    "changed": false
}

```
 ### Guest identity

 You can use `vcenter_vm_guest_identity_info` to get details like the OS family or the hostname of the running VM.

 
```
- name: Get guest identity information
  vmware.vmware_rest.vcenter_vm_guest_identity_info:
    vm: '{{ test_vm1_info.id }}'
  register: _result

```
 #### Result

 
```
{
    "value": {
        "full_name": {
            "args": [],
            "default_message": "Red Hat Fedora (64-bit)",
            "id": "vmsg.guestos.fedora64Guest.label"
        },
        "name": "FEDORA_64",
        "ip_address": "192.168.122.242",
        "family": "LINUX",
        "host_name": "localhost.localdomain"
    },
    "changed": false
}

```
 ### Network

 `vcenter_vm_guest_networking_info` will return the OS network configuration.

 
```
- name: Get guest networking information
  vmware.vmware_rest.vcenter_vm_guest_networking_info:
    vm: '{{ test_vm1_info.id }}'
  register: _result

```
 #### Result

 
```
{
    "value": {
        "dns": {
            "ip_addresses": [
                "10.0.2.3"
            ],
            "search_domains": [
                "localdomain"
            ]
        },
        "dns_values": {
            "domain_name": "localdomain",
            "host_name": "localhost.localdomain"
        }
    },
    "changed": false
}

```
 ### Network interfaces

 `vcenter_vm_guest_networking_interfaces_info` will return a list of NIC configurations.

 See also [How to attach a VM to a network](vm_hardware_tuning#vmware-rest-attach-a-network).

 
```
- name: Get guest network interfaces information
  vmware.vmware_rest.vcenter_vm_guest_networking_interfaces_info:
    vm: '{{ test_vm1_info.id }}'
  register: _result

```
 #### Result

 
```
{
    "value": [
        {
            "mac_address": "00:50:56:b3:49:5c",
            "ip": {
                "ip_addresses": [
                    {
                        "ip_address": "192.168.122.242",
                        "prefix_length": 24,
                        "state": "PREFERRED"
                    },
                    {
                        "ip_address": "fe80::b8d0:511b:897f:65a2",
                        "prefix_length": 64,
                        "state": "UNKNOWN"
                    }
                ]
            },
            "nic": "4000"
        }
    ],
    "changed": false
}

```
 ### Network routes

 Use `vcenter_vm_guest_networking_routes_info` to explore the route table of your vitual machine.

 
```
- name: Get guest network routes information
  vmware.vmware_rest.vcenter_vm_guest_networking_routes_info:
    vm: '{{ test_vm1_info.id }}'
  register: _result

```
 #### Result

 
```
{
    "value": [
        {
            "gateway_address": "192.168.122.1",
            "interface_index": 0,
            "prefix_length": 0,
            "network": "0.0.0.0"
        },
        {
            "interface_index": 0,
            "prefix_length": 24,
            "network": "192.168.122.0"
        },
        {
            "interface_index": 0,
            "prefix_length": 64,
            "network": "fe80::"
        },
        {
            "interface_index": 0,
            "prefix_length": 128,
            "network": "fe80::b8d0:511b:897f:65a2"
        },
        {
            "interface_index": 0,
            "prefix_length": 8,
            "network": "ff00::"
        }
    ],
    "changed": false
}

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_rest_scenarios/vm_tool_information.html>

arista.eos.eos\_eapi – Manage and configure Arista EOS eAPI.
============================================================

  Note

 This plugin is part of the [arista.eos collection](https://galaxy.ansible.com/arista/eos) (version 2.2.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install arista.eos`.

 To use it in a playbook, specify: `arista.eos.eos_eapi`.

   New in version 1.0.0: of arista.eos

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Use to enable or disable eAPI access, and set the port and state of http, https, local\_http and unix-socket servers.
* When enabling eAPI access the default is to enable HTTP on port 80, enable HTTPS on port 443, disable local HTTP, and disable Unix socket server. Use the options listed below to override the default configuration.
* Requires EOS v4.12 or greater.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Requirements
------------

 The below requirements are needed on the host that executes this module.

 * EOS v4.12 or greater

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **config**  string  |  | The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The *config* argument allows the implementer to pass in the configuration to use as the base config for comparison. |
| **http**  boolean  | **Choices:*** no
* yes
 | The `http` argument controls the operating state of the HTTP transport protocol when eAPI is present in the running-config. When the value is set to True, the HTTP protocol is enabled and when the value is set to False, the HTTP protocol is disabled. By default, when eAPI is first configured, the HTTP protocol is disabled. 
aliases: enable\_http |
| **http\_port**  integer  |  | Configures the HTTP port that will listen for connections when the HTTP transport protocol is enabled. This argument accepts integer values in the valid range of 1 to 65535. |
| **https**  boolean  | **Choices:*** no
* yes
 | The `https` argument controls the operating state of the HTTPS transport protocol when eAPI is present in the running-config. When the value is set to True, the HTTPS protocol is enabled and when the value is set to False, the HTTPS protocol is disabled. By default, when eAPI is first configured, the HTTPS protocol is enabled. 
aliases: enable\_https |
| **https\_port**  integer  |  | Configures the HTTP port that will listen for connections when the HTTP transport protocol is enabled. This argument accepts integer values in the valid range of 1 to 65535. |
| **local\_http**  boolean  | **Choices:*** no
* yes
 | The `local_http` argument controls the operating state of the local HTTP transport protocol when eAPI is present in the running-config. When the value is set to True, the HTTP protocol is enabled and restricted to connections from localhost only. When the value is set to False, the HTTP local protocol is disabled. Note is value is independent of the `http` argument 
aliases: enable\_local\_http |
| **local\_http\_port**  integer  |  | Configures the HTTP port that will listen for connections when the HTTP transport protocol is enabled. This argument accepts integer values in the valid range of 1 to 65535. |
| **provider**  dictionary  |  | **Deprecated** Starting with Ansible 2.5 we recommend using `connection: network_cli`. Starting with Ansible 2.6 we recommend using `connection: httpapi` for eAPI. This option will be removed in a release after 2022-06-01. For more information please see the [EOS Platform Options guide](../network/user_guide/platform_eos). A dict object containing connection details. |
|  | **auth\_pass**  string  |  | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
|  | **authorize**  boolean  | **Choices:*** **no** ←
* yes
 | Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
|  | **host**  string  |  | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
|  | **password**  string  |  | Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either *cli* or *eapi* transports. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
|  | **port**  integer  | **Default:**0 | Specifies the port to use when building the connection to the remote device. This value applies to either *cli* or *eapi*. The port value will default to the appropriate transport common port if none is provided in the task (cli=22, http=80, https=443). |
|  | **ssh\_keyfile**  path  |  | Specifies the SSH keyfile to use to authenticate the connection to the remote device. This argument is only used for *cli* transports. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
|  | **timeout**  integer  |  | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
|  | **transport**  string  | **Choices:*** **cli** ←
* eapi
 | Configures the transport connection to use when connecting to the remote device. |
|  | **use\_proxy**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, the environment variables `http_proxy` and `https_proxy` will be ignored. |
|  | **use\_ssl**  boolean  | **Choices:*** no
* **yes** ←
 | Configures the *transport* to use SSL if set to `yes` only when the `transport=eapi`. If the transport argument is not eapi, this value is ignored. |
|  | **username**  string  |  | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the eAPI authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
|  | **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not eapi, this value is ignored. |
| **socket**  boolean  | **Choices:*** no
* yes
 | The `socket` argument controls the operating state of the UNIX Domain Socket used to receive eAPI requests. When the value of this argument is set to True, the UDS will listen for eAPI requests. When the value is set to False, the UDS will not be available to handle requests. By default when eAPI is first configured, the UDS is disabled. 
aliases: enable\_socket |
| **state**  string  | **Choices:*** **started** ←
* stopped
 | The `state` argument controls the operational state of eAPI on the remote device. When this argument is set to `started`, eAPI is enabled to receive requests and when this argument is `stopped`, eAPI is disabled and will not receive requests. |
| **timeout**  integer  | **Default:**30 | The time (in seconds) to wait for the eAPI configuration to be reflected in the running-config. |
| **vrf**  string  | **Default:**"default" | The `vrf` argument will configure eAPI to listen for connections in the specified VRF. By default, eAPI transports will listen for connections in the global table. This value requires the VRF to already be created otherwise the task will fail. |

   
 Notes
-----

  Note

 * For information on using CLI, eAPI and privileged mode see the [EOS Platform Options guide](../../../network/user_guide/platform_eos#eos-platform-options)
* For more information on using Ansible to manage network devices see the [Ansible Network Guide](../../../network/index#network-guide)
* For more information on using Ansible to manage Arista EOS devices see the [Arista integration page](https://www.ansible.com/ansible-arista-networks).

  Examples
--------

 
```
- name: Enable eAPI access with default configuration
  arista.eos.eos_eapi:
    state: started

- name: Enable eAPI with no HTTP, HTTPS at port 9443, local HTTP at port 80, and socket
    enabled
  arista.eos.eos_eapi:
    state: started
    http: false
    https_port: 9443
    local_http: yes
    local_http_port: 80
    socket: yes

- name: Shutdown eAPI access
  arista.eos.eos_eapi:
    state: stopped

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always | The list of configuration mode commands to send to the device  **Sample:** ['management api http-commands', 'protocol http port 81', 'no protocol https'] |
| **session\_name**  string  | when changed is True | The EOS config session name used to load the configuration  **Sample:** ansible\_1479315771 |
| **urls**  dictionary  | when eAPI is started | Hash of URL endpoints eAPI is listening on per interface  **Sample:** {'Management1': ['http://172.26.10.1:80']} |

   
  
 ### Authors

 * Peter Sprygada (@privateip)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/arista/eos/eos_eapi_module.html>

How to install the vmware\_rest collection
==========================================

 * [Requirements](#requirements)
* [aiohttp](#aiohttp)
* [Installation](#installation)

 Requirements
------------

 The collection depends on:

 * Ansible >=2.9.10 or greater
* Python 3.6 or greater

 aiohttp
-------

 [aiohttp](https://docs.aiohttp.org/en/stable/) is the only dependency of the collection. You can install it with `pip` if you use a virtualenv to run Ansible.

 
```
$ pip install aiohttp

```
 Or using an RPM.

 
```
$ sudo dnf install python3-aiohttp

```
 Installation
------------

 The best option to install the collection is to use the `ansible-galaxy` command:

 
```
$ ansible-galaxy collection install vmware.vmware_rest

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_rest_scenarios/installation.html>

Retrieve information from a specific VM
=======================================

 * [Introduction](#introduction)
* [Scenario requirements](#scenario-requirements)
* [How to collect virtual machine information](#how-to-collect-virtual-machine-information)


	+ [List the VM](#list-the-vm)
	+ [Result](#result)
	+ [Collect the details about a specific VM](#collect-the-details-about-a-specific-vm)
	+ [Result](#id1)
	+ [Get the hardware version of a specific VM](#get-the-hardware-version-of-a-specific-vm)
	+ [Result](#id2)
	+ [List the SCSI adapter(s) of a specific VM](#list-the-scsi-adapter-s-of-a-specific-vm)
	+ [Result](#id3)
	+ [List the CDROM drive(s) of a specific VM](#list-the-cdrom-drive-s-of-a-specific-vm)
	+ [Result](#id4)
	+ [Get the memory information of the VM](#get-the-memory-information-of-the-vm)
	+ [Result](#id5)
	
	
		- [Get the storage policy of the VM](#get-the-storage-policy-of-the-vm)
	+ [Result](#id6)
	
	
		- [Get the disk information of the VM](#get-the-disk-information-of-the-vm)
	+ [Result](#id7)

 Introduction
------------

 This section shows you how to use Ansible to retrieve information about a specific virtual machine.

 Scenario requirements
---------------------

 You’ve already followed [How to create a Virtual Machine](create_vm#vmware-rest-create-vm) and you’ve got create a new VM called `test_vm1`.

 How to collect virtual machine information
------------------------------------------

 ### List the VM

 In this example, we use the `vcenter_vm_info` module to collect information about our new VM.

 In this example, we start by asking for a list of VMs. We use a filter to limit the results to just the VM called `test_vm1`. So we are in a list context, with one single entry in the `value` key.

 
```
- name: Look up the VM called test_vm1 in the inventory
  register: search_result
  vmware.vmware_rest.vcenter_vm_info:
    filter_names:
    - test_vm1

```
 ### Result

 As expected, we get a list. And thanks to our filter, we just get one entry.

 
```
{
    "value": [
        {
            "memory_size_MiB": 1024,
            "vm": "vm-1650",
            "name": "test_vm1",
            "power_state": "POWERED_OFF",
            "cpu_count": 1
        }
    ],
    "changed": false
}

```
 ### Collect the details about a specific VM

 For the next steps, we pass the ID of the VM through the `vm` parameter. This allow us to collect more details about this specific VM.

 
```
- name: Collect information about a specific VM
  vmware.vmware_rest.vcenter_vm_info:
    vm: '{{ search_result.value[0].vm }}'
  register: test_vm1_info

```
 ### Result

 The result is a structure with all the details about our VM. You will note this is actually the same information that we get when we created the VM.

 
```
{
    "value": {
        "instant_clone_frozen": false,
        "cdroms": [],
        "memory": {
            "size_MiB": 1024,
            "hot_add_enabled": true
        },
        "disks": [
            {
                "value": {
                    "scsi": {
                        "bus": 0,
                        "unit": 0
                    },
                    "backing": {
                        "vmdk_file": "[local] test_vm1_8/test_vm1.vmdk",
                        "type": "VMDK_FILE"
                    },
                    "label": "Hard disk 1",
                    "type": "SCSI",
                    "capacity": 17179869184
                },
                "key": "2000"
            }
        ],
        "parallel_ports": [],
        "sata_adapters": [],
        "cpu": {
            "hot_remove_enabled": false,
            "count": 1,
            "hot_add_enabled": false,
            "cores_per_socket": 1
        },
        "scsi_adapters": [
            {
                "value": {
                    "scsi": {
                        "bus": 0,
                        "unit": 7
                    },
                    "label": "SCSI controller 0",
                    "sharing": "NONE",
                    "type": "PVSCSI"
                },
                "key": "1000"
            }
        ],
        "power_state": "POWERED_OFF",
        "floppies": [],
        "identity": {
            "name": "test_vm1",
            "instance_uuid": "5033c296-6954-64df-faca-d001de53763d",
            "bios_uuid": "42330d17-e603-d925-fa4b-18827dbc1409"
        },
        "nvme_adapters": [],
        "name": "test_vm1",
        "nics": [],
        "boot": {
            "delay": 0,
            "retry_delay": 10000,
            "enter_setup_mode": false,
            "type": "BIOS",
            "retry": false
        },
        "serial_ports": [],
        "boot_devices": [],
        "guest_OS": "DEBIAN_8_64",
        "hardware": {
            "upgrade_policy": "NEVER",
            "upgrade_status": "NONE",
            "version": "VMX_11"
        }
    },
    "id": "vm-1650",
    "changed": false
}

```
 ### Get the hardware version of a specific VM

 We can also use all the `vcenter_vm_*_info` modules to retrieve a smaller amount of information. Here we use `vcenter_vm_hardware_info` to know the hardware version of the VM.

 
```
- name: Collect the hardware information
  vmware.vmware_rest.vcenter_vm_hardware_info:
    vm: '{{ search_result.value[0].vm }}'
  register: my_vm1_hardware_info

```
 ### Result

 
```
{
    "value": {
        "upgrade_policy": "NEVER",
        "upgrade_status": "NONE",
        "version": "VMX_11"
    },
    "changed": false
}

```
 ### List the SCSI adapter(s) of a specific VM

 Here for instance, we list the SCSI adapter(s) of the VM:

 
```
- name: List the SCSI adapter of a given VM
  vmware.vmware_rest.vcenter_vm_hardware_adapter_scsi_info:
    vm: '{{ test_vm1_info.id }}'
  register: _result

```
 You can do the same for the SATA controllers with `vcenter_vm_adapter_sata_info`.

 ### Result

 
```
{
    "value": [
        {
            "scsi": {
                "bus": 0,
                "unit": 7
            },
            "label": "SCSI controller 0",
            "type": "PVSCSI",
            "sharing": "NONE"
        }
    ],
    "changed": false
}

```
 ### List the CDROM drive(s) of a specific VM

 And we list its CDROM drives.

 
```
- name: List the cdrom devices on the guest
  vmware.vmware_rest.vcenter_vm_hardware_cdrom_info:
    vm: '{{ test_vm1_info.id }}'
  register: _result

```
 ### Result

 
```
{
    "value": [],
    "changed": false
}

```
 ### Get the memory information of the VM

 Here we collect the memory information of the VM:

 
```
- name: Retrieve the memory information from the VM
  vmware.vmware_rest.vcenter_vm_hardware_memory_info:
    vm: '{{ test_vm1_info.id }}'
  register: _result

```
 ### Result

 
```
{
    "value": {
        "size_MiB": 1024,
        "hot_add_enabled": true
    },
    "changed": false
}

```
 #### Get the storage policy of the VM

 We use the `vcenter_vm_storage_policy_info` module for that:

 
```
- name: Get VM storage policy
  vmware.vmware_rest.vcenter_vm_storage_policy_info:
    vm: '{{ test_vm1_info.id }}'
  register: _result

```
 ### Result

 
```
{
    "value": {
        "disks": []
    },
    "changed": false
}

```
 #### Get the disk information of the VM

 We use the `vcenter_vm_hardware_disk_info` for this operation:

 
```
- name: Retrieve the disk information from the VM
  vmware.vmware_rest.vcenter_vm_hardware_disk_info:
    vm: '{{ test_vm1_info.id }}'
  register: _result

```
 ### Result

 
```
{
    "value": [
        {
            "scsi": {
                "bus": 0,
                "unit": 0
            },
            "backing": {
                "vmdk_file": "[local] test_vm1_8/test_vm1.vmdk",
                "type": "VMDK_FILE"
            },
            "label": "Hard disk 1",
            "type": "SCSI",
            "capacity": 17179869184
        }
    ],
    "changed": false
}

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_rest_scenarios/vm_info.html>

How to modify a virtual machine
===============================

 * [Introduction](#introduction)
* [Scenario requirements](#scenario-requirements)
* [How to add a CDROM drive to a virtual machine](#how-to-add-a-cdrom-drive-to-a-virtual-machine)


	+ [Add a new SATA adapter](#add-a-new-sata-adapter)
	+ [Result](#result)
	+ [Add a CDROM drive](#add-a-cdrom-drive)
	+ [Result](#id1)
* [How to attach a VM to a network](#how-to-attach-a-vm-to-a-network)


	+ [Attach a new NIC](#attach-a-new-nic)
	+ [Result](#id2)
	+ [Adjust the configuration of the NIC](#adjust-the-configuration-of-the-nic)
	+ [Result](#id3)
* [Increase the memory of the VM](#increase-the-memory-of-the-vm)


	+ [Result](#id4)
* [Upgrade the hardware version of the VM](#upgrade-the-hardware-version-of-the-vm)


	+ [Result](#id5)
* [Adjust the number of CPUs of the VM](#adjust-the-number-of-cpus-of-the-vm)


	+ [Result](#id6)
* [Remove a SATA controller](#remove-a-sata-controller)


	+ [Result](#id7)
* [Attach a floppy drive](#attach-a-floppy-drive)


	+ [Result](#id8)
* [Attach a new disk](#attach-a-new-disk)


	+ [Result](#id9)

 Introduction
------------

 This section shows you how to use Ansible to modify an existing virtual machine.

 Scenario requirements
---------------------

 You’ve already followed [How to create a Virtual Machine](create_vm#vmware-rest-create-vm) and created a VM.

 How to add a CDROM drive to a virtual machine
---------------------------------------------

 In this example, we use the `vcenter_vm_hardware_*` modules to add a new CDROM to an existing VM.

 ### Add a new SATA adapter

 First we create a new SATA adapter. We specify the `pci_slot_number`. This way if we run the task again it won’t do anything if there is already an adapter there.

 
```
- name: Create a SATA adapter at PCI slot 34
  vmware.vmware_rest.vcenter_vm_hardware_adapter_sata:
    vm: '{{ test_vm1_info.id }}'
    pci_slot_number: 34
  register: _sata_adapter_result_1

```
 ### Result

 
```
{
    "value": {
        "bus": 0,
        "pci_slot_number": 34,
        "label": "SATA controller 0",
        "type": "AHCI"
    },
    "id": "15000",
    "changed": true
}

```
 ### Add a CDROM drive

 Now we can create the CDROM drive:

 
```
- name: Attach an ISO image to a guest VM
  vmware.vmware_rest.vcenter_vm_hardware_cdrom:
    vm: '{{ test_vm1_info.id }}'
    type: SATA
    sata:
      bus: 0
      unit: 2
    start_connected: true
    backing:
      iso_file: '[ro_datastore] fedora.iso'
      type: ISO_FILE
  register: _result

```
 ### Result

 
```
{
    "value": {
        "start_connected": true,
        "backing": {
            "iso_file": "[ro_datastore] fedora.iso",
            "type": "ISO_FILE"
        },
        "allow_guest_control": false,
        "label": "CD/DVD drive 1",
        "state": "NOT_CONNECTED",
        "type": "SATA",
        "sata": {
            "bus": 0,
            "unit": 2
        }
    },
    "id": "16002",
    "changed": true
}

```
 How to attach a VM to a network
-------------------------------

 ### Attach a new NIC

 Here we attach the VM to the network (through the portgroup). We specify a `pci_slot_number` for the same reason.

 The second task adjusts the NIC configuration.

 
```
- name: Attach a VM to a dvswitch
  vmware.vmware_rest.vcenter_vm_hardware_ethernet:
    vm: '{{ test_vm1_info.id }}'
    pci_slot_number: 4
    backing:
      type: DISTRIBUTED_PORTGROUP
      network: "{{ my_portgroup_info.dvs_portgroup_info.dvswitch1[0].key }}"
    start_connected: false
  register: vm_hardware_ethernet_1

```
 ### Result

 
```
{
    "value": {
        "start_connected": false,
        "pci_slot_number": 4,
        "backing": {
            "connection_cookie": 2145337177,
            "distributed_switch_uuid": "50 33 88 3a 8c 6e f9 02-7a fd c2 c0 2c cf f2 ac",
            "distributed_port": "2",
            "type": "DISTRIBUTED_PORTGROUP",
            "network": "dvportgroup-1649"
        },
        "mac_address": "00:50:56:b3:49:5c",
        "mac_type": "ASSIGNED",
        "allow_guest_control": false,
        "wake_on_lan_enabled": false,
        "label": "Network adapter 1",
        "state": "NOT_CONNECTED",
        "type": "VMXNET3",
        "upt_compatibility_enabled": false
    },
    "id": "4000",
    "changed": true
}

```
 ### Adjust the configuration of the NIC

 
```
- name: Turn the NIC's start_connected flag on
  vmware.vmware_rest.vcenter_vm_hardware_ethernet:
    nic: '{{ vm_hardware_ethernet_1.id }}'
    start_connected: true
    vm: '{{ test_vm1_info.id }}'

```
 ### Result

 
```
{
    "id": "4000",
    "changed": true
}

```
 Increase the memory of the VM
-----------------------------

 We can also adjust the amount of memory that we dedicate to our VM.

 
```
- name: Increase the memory of a VM
  vmware.vmware_rest.vcenter_vm_hardware_memory:
    vm: '{{ test_vm1_info.id }}'
    size_MiB: 1080
  register: _result

```
 ### Result

 
```
{
    "id": null,
    "changed": true
}

```
 Upgrade the hardware version of the VM
--------------------------------------

 Here we use the `vcenter_vm_hardware` module to upgrade the version of the hardware:

 
```
- name: Upgrade the VM hardware version
  vmware.vmware_rest.vcenter_vm_hardware:
    upgrade_policy: AFTER_CLEAN_SHUTDOWN
    upgrade_version: VMX_13
    vm: '{{ test_vm1_info.id }}'
  register: _result

```
 ### Result

 
```
{
    "id": null,
    "changed": true
}

```
 Adjust the number of CPUs of the VM
-----------------------------------

 You can use `vcenter_vm_hardware_cpu` for that:

 
```
- name: Dedicate one core to the VM
  vmware.vmware_rest.vcenter_vm_hardware_cpu:
    vm: '{{ test_vm1_info.id }}'
    count: 1
  register: _result

```
 ### Result

 
```
{
    "value": {
        "hot_remove_enabled": false,
        "count": 1,
        "hot_add_enabled": false,
        "cores_per_socket": 1
    },
    "id": null,
    "changed": false
}

```
 Remove a SATA controller
------------------------

 In this example, we remove the SATA controller of the PCI slot 34.

 
```
{
    "changed": true
}

```
 ### Result

 
```
{
    "changed": true
}

```
 Attach a floppy drive
---------------------

 Here we attach a floppy drive to a VM.

 
```
- name: Add a floppy disk drive
  vmware.vmware_rest.vcenter_vm_hardware_floppy:
    vm: '{{ test_vm1_info.id }}'
    allow_guest_control: true
  register: my_floppy_drive

```
 ### Result

 
```
{
    "value": {
        "start_connected": false,
        "backing": {
            "auto_detect": true,
            "type": "HOST_DEVICE",
            "host_device": ""
        },
        "allow_guest_control": true,
        "label": "Floppy drive 1",
        "state": "NOT_CONNECTED"
    },
    "id": "8000",
    "changed": true
}

```
 Attach a new disk
-----------------

 Here we attach a tiny disk to the VM. The `capacity` is in bytes.

 
```
- name: Create a new disk
  vmware.vmware_rest.vcenter_vm_hardware_disk:
    vm: '{{ test_vm1_info.id }}'
    type: SATA
    new_vmdk:
      capacity: 320000
  register: my_new_disk

```
 ### Result

 
```
{
    "value": {
        "backing": {
            "vmdk_file": "[local] test_vm1_8/test_vm1_1.vmdk",
            "type": "VMDK_FILE"
        },
        "label": "Hard disk 2",
        "type": "SATA",
        "sata": {
            "bus": 0,
            "unit": 0
        },
        "capacity": 320000
    },
    "id": "16000",
    "changed": true
}

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_rest_scenarios/vm_hardware_tuning.html>

How to run a virtual machine
============================

 * [Introduction](#introduction)
* [Power information](#power-information)


	+ [Result](#result)
* [How to start a virtual machine](#how-to-start-a-virtual-machine)


	+ [Result](#id1)
* [How to wait until my virtual machine is ready](#how-to-wait-until-my-virtual-machine-is-ready)


	+ [Result](#id2)

 Introduction
------------

 This section covers the power management of your virtual machine.

 Power information
-----------------

 Use `vcenter_vm_power_info` to know the power state of the VM.

 
```
- name: Get guest power information
  vmware.vmware_rest.vcenter_vm_power_info:
    vm: '{{ test_vm1_info.id }}'
  register: _result

```
 ### Result

 
```
{
    "value": {
        "state": "POWERED_ON"
    },
    "changed": false
}

```
 How to start a virtual machine
------------------------------

 Use the `vcenter_vm_power` module to start your VM:

 
```
- name: Turn the power of the VM on
  vmware.vmware_rest.vcenter_vm_power:
    state: start
    vm: '{{ test_vm1_info.id }}'

```
 ### Result

 
```
{
    "changed": false
}

```
 How to wait until my virtual machine is ready
---------------------------------------------

 If your virtual machine runs VMware Tools, you can build a loop around the `center_vm_tools_info` module:

 
```
- name: Wait until my VM is ready
  vmware.vmware_rest.vcenter_vm_tools_info:
    vm: '{{ test_vm1_info.id }}'
  register: vm_tools_info
  until:
  - vm_tools_info is not failed
  - vm_tools_info.value.run_state == "RUNNING"
  retries: 60
  delay: 5

```
 ### Result

 
```
{
    "value": {
        "auto_update_supported": false,
        "upgrade_policy": "MANUAL",
        "install_attempt_count": 0,
        "version_status": "UNMANAGED",
        "version_number": 10346,
        "run_state": "RUNNING",
        "version": "10346",
        "install_type": "OPEN_VM_TOOLS"
    },
    "changed": false
}

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/vmware_rest_scenarios/run_a_vm.html>

Introduction to Ansible for Kubernetes
======================================

 * [Introduction](#introduction)
* [Requirements](#requirements)
* [Installation](#installation)
* [Authenticating with the API](#authenticating-with-the-api)
* [Reporting an issue](#reporting-an-issue)

 Introduction
------------

 Modules for interacting with the Kubernetes (K8s) and OpenShift API are under development, and can be used in preview mode. To use them, review the requirements, and then follow the installation and use instructions.

 Requirements
------------

 To use the modules, you’ll need the following:

 * Run Ansible from source. For assistance, view [Running the devel branch from a clone](../../installation_guide/intro_installation#from-source).
* [OpenShift Rest Client](https://github.com/openshift/openshift-restclient-python) installed on the host that will execute the modules.

 Installation
------------

 The Kubernetes modules are part of the [Ansible Kubernetes collection](https://github.com/ansible-collections/kubernetes.core).

 To install the collection, run the following:

 
```
$ ansible-galaxy collection install kubernetes.core

```
 Authenticating with the API
---------------------------

 By default the OpenShift Rest Client will look for `~/.kube/config`, and if found, connect using the active context. You can override the location of the file using the``kubeconfig`` parameter, and the context, using the `context` parameter.

 Basic authentication is also supported using the `username` and `password` options. You can override the URL using the `host` parameter. Certificate authentication works through the `ssl_ca_cert`, `cert_file`, and `key_file` parameters, and for token authentication, use the `api_key` parameter.

 To disable SSL certificate verification, set `verify_ssl` to false.

 Reporting an issue
------------------

 If you find a bug or have a suggestion regarding modules, please file issues at [Ansible Kubernetes collection](https://github.com/ansible-collections/kubernetes.core). If you find a bug regarding OpenShift client, please file issues at [OpenShift REST Client issues](https://github.com/openshift/openshift-restclient-python/issues). If you find a bug regarding Kubectl binary, please file issues at [Kubectl issue tracker](https://github.com/kubernetes/kubectl)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/kubernetes_scenarios/k8s_intro.html>

Using Kubernetes dynamic inventory plugin
=========================================

 * [Kubernetes dynamic inventory plugin](#kubernetes-dynamic-inventory-plugin)


	+ [Requirements](#requirements)
* [Using vaulted configuration files](#using-vaulted-configuration-files)

 Kubernetes dynamic inventory plugin
-----------------------------------

 The best way to interact with your Pods is to use the Kubernetes dynamic inventory plugin, which dynamically queries Kubernetes APIs using `kubectl` command line available on controller node and tells Ansible what Pods can be managed.

 ### Requirements

 To use the Kubernetes dynamic inventory plugins, you must install [Kubernetes Python client](https://github.com/kubernetes-client/python), [kubectl](https://github.com/kubernetes/kubectl) and [OpenShift Python client](https://github.com/openshift/openshift-restclient-python) on your control node (the host running Ansible).

 
```
$ pip install kubernetes openshift

```
 Please refer to Kubernetes official documentation for [installing kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) on the given operating systems.

 To use this Kubernetes dynamic inventory plugin, you need to enable it first by specifying the following in the `ansible.cfg` file:

 
```
[inventory]
enable_plugins = kubernetes.core.k8s

```
 Then, create a file that ends in `.k8s.yml` or `.k8s.yaml` in your working directory.

 The `kubernetes.core.k8s` inventory plugin takes in the same authentication information as any other Kubernetes modules.

 Here’s an example of a valid inventory file:

 
```
plugin: kubernetes.core.k8s

```
 Executing `ansible-inventory --list -i <filename>.k8s.yml` will create a list of Pods that are ready to be configured using Ansible.

 You can also provide the namespace to gather information about specific pods from the given namespace. For example, to gather information about Pods under the `test` namespace you will specify the `namespaces` parameter:

 
```
plugin: kubernetes.core.k8s
connections:
- namespaces:
    - test

```
 Using vaulted configuration files
---------------------------------

 Since the inventory configuration file contains Kubernetes related sensitive information in plain text, a security risk, you may want to encrypt your entire inventory configuration file.

 You can encrypt a valid inventory configuration file as follows:

 
```
$ ansible-vault encrypt <filename>.k8s.yml
  New Vault password:
  Confirm New Vault password:
  Encryption successful

$ echo "MySuperSecretPassw0rd!" > /path/to/vault_password_file

```
 And you can use this vaulted inventory configuration file using:

 
```
$ ansible-inventory -i <filename>.k8s.yml --list --vault-password-file=/path/to/vault_password_file

```
  See also

  [Kubernetes Python client](https://github.com/kubernetes-client/python)

The GitHub Page of Kubernetes Python client

  [Kubernetes Python client - Issue Tracker](https://github.com/kubernetes-client/python/issues)

The issue tracker for Kubernetes Python client

  [OpenShift Python client](https://github.com/openshift/openshift-restclient-python)

The GitHub Page of OpenShift Dynamic API client

  [OpenShift Python client - Issue Tracker](https://github.com/openshift/openshift-restclient-python/issues)

The issue tracker for OpenShift Dynamic API client

  [Kubectl installation](https://kubernetes.io/docs/tasks/tools/install-kubectl/)

Installation guide for installing Kubectl

  [Working with playbooks](../../user_guide/playbooks#working-with-playbooks)

An introduction to playbooks

  [Using encrypted variables and files](../../user_guide/vault#playbooks-vault)

Using Vault in playbooks

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/kubernetes_scenarios/k8s_inventory.html>

ansible.builtin.fetch – Fetch files from remote nodes
=====================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `fetch` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 0.2: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * This module works like [ansible.builtin.copy](copy_module#ansible-collections-ansible-builtin-copy-module), but in reverse.
* It is used for fetching files from remote machines and storing them locally in a file tree, organized by hostname.
* Files that already exist at *dest* will be overwritten if they are different than the *src*.
* This module is also supported for Windows targets.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dest**  string / required  |  | A directory to save the file into. For example, if the *dest* directory is `/backup` a *src* file named `/etc/profile` on host `host.example.com`, would be saved into `/backup/host.example.com/etc/profile`. The host name is based on the inventory name. |
| **fail\_on\_missing**  boolean   added in 1.1 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | When set to `yes`, the task will fail if the remote file cannot be read for any reason. Prior to Ansible 2.5, setting this would only fail if the source file was missing. The default was changed to `yes` in Ansible 2.5. |
| **flat**  boolean   added in 1.2 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Allows you to override the default behavior of appending hostname/path/to/file to the destination. If `dest` ends with '/', it will use the basename of the source file, similar to the copy module. This can be useful if working with a single host, or if retrieving files that are uniquely named per host. If using multiple hosts with the same filename, the file will be overwritten for each host. |
| **src**  string / required  |  | The file on the remote system to fetch. This *must* be a file, not a directory. Recursive fetching may be supported in a later release. |
| **validate\_checksum**  boolean   added in 1.4 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | Verify that the source and destination checksums match after the files are fetched. |

   
 Notes
-----

  Note

 * When running fetch with `become`, the [ansible.builtin.slurp](slurp_module#ansible-collections-ansible-builtin-slurp-module) module will also be used to fetch the contents of the file for determining the remote checksum. This effectively doubles the transfer size, and depending on the file size can consume all available memory on the remote or local hosts causing a `MemoryError`. Due to this it is advisable to run this module without `become` whenever possible.
* Prior to Ansible 2.5 this module would not fail if reading the remote file was impossible unless `fail_on_missing` was set.
* In Ansible 2.5 or later, playbook authors are encouraged to use `fail_when` or `ignore_errors` to get this ability. They may also explicitly set `fail_on_missing` to `no` to get the non-failing behaviour.
* This module is also supported for Windows targets.
* Supports `check_mode`.

  See Also
--------

  See also

  [ansible.builtin.copy](copy_module#ansible-collections-ansible-builtin-copy-module)

The official documentation on the **ansible.builtin.copy** module.

  [ansible.builtin.slurp](slurp_module#ansible-collections-ansible-builtin-slurp-module)

The official documentation on the **ansible.builtin.slurp** module.

    Examples
--------

 
```
- name: Store file into /tmp/fetched/host.example.com/tmp/somefile
  ansible.builtin.fetch:
    src: /tmp/somefile
    dest: /tmp/fetched

- name: Specifying a path directly
  ansible.builtin.fetch:
    src: /tmp/somefile
    dest: /tmp/prefix-{{ inventory_hostname }}
    flat: yes

- name: Specifying a destination path
  ansible.builtin.fetch:
    src: /tmp/uniquefile
    dest: /tmp/special/
    flat: yes

- name: Storing in a path relative to the playbook
  ansible.builtin.fetch:
    src: /tmp/uniquefile
    dest: special/prefix-{{ inventory_hostname }}
    flat: yes

```
 ### Authors

 * Ansible Core Team
* Michael DeHaan



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/fetch_module.html>

ansible.builtin.group\_by – Create Ansible groups based on facts
================================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `group_by` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 0.9: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Use facts to create ad-hoc groups that can be used later in a playbook.
* This module is also supported for Windows targets.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **key**  string / required  |  | The variables whose values will be used as groups. |
| **parents**  list / elements=string   added in 2.4 of ansible.builtin  | **Default:**"all" | The list of the parent groups. |

   
 Notes
-----

  Note

 * Spaces in group names are converted to dashes ‘-‘.
* This module is also supported for Windows targets.
* Though this module does not change the remote host, we do provide ‘changed’ status as it can be useful for those trying to track inventory changes.

  See Also
--------

  See also

  [ansible.builtin.add\_host](add_host_module#ansible-collections-ansible-builtin-add-host-module)

The official documentation on the **ansible.builtin.add\_host** module.

    Examples
--------

 
```
- name: Create groups based on the machine architecture
  ansible.builtin.group_by:
    key: machine_{{ ansible_machine }}

- name: Create groups like 'virt_kvm_host'
  ansible.builtin.group_by:
    key: virt_{{ ansible_virtualization_type }}_{{ ansible_virtualization_role }}

- name: Create nested groups
  ansible.builtin.group_by:
    key: el{{ ansible_distribution_major_version }}-{{ ansible_architecture }}
    parents:
      - el{{ ansible_distribution_major_version }}

- name: Add all active hosts to a static group
  ansible.builtin.group_by:
    key: done

```
 ### Authors

 * Jeroen Hoekx (@jhoekx)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/group_by_module.html>

Ansible for Kubernetes Scenarios
================================

 These scenarios teach you how to accomplish common Kubernetes tasks using Ansible. To get started, please select the task you want to accomplish.

 * [Creating K8S object](scenario_k8s_object)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/scenario_guides/kubernetes_scenarios/k8s_scenarios.html>

ansible.builtin.copy – Copy files to remote locations
=====================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `copy` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * The `copy` module copies a file from the local or remote machine to a location on the remote machine.
* Use the [ansible.builtin.fetch](fetch_module#ansible-collections-ansible-builtin-fetch-module) module to copy files from remote locations to the local box.
* If you need variable interpolation in copied files, use the [ansible.builtin.template](template_module#ansible-collections-ansible-builtin-template-module) module. Using a variable in the `content` field will result in unpredictable output.
* For Windows targets, use the [ansible.windows.win\_copy](../windows/win_copy_module#ansible-collections-ansible-windows-win-copy-module) module instead.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **attributes**  string   added in 2.3 of ansible.builtin  |  | The attributes the resulting file or directory should have. To get supported flags look at the man page for *chattr* on the target system. This string should contain the attributes in the same order as the one displayed by *lsattr*. The `=` operator is assumed as default, otherwise `+` or `-` operators need to be included in the string. 
aliases: attr |
| **backup**  boolean   added in 0.7 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. |
| **checksum**  string   added in 2.5 of ansible.builtin  |  | SHA1 checksum of the file being transferred. Used to validate that the copy of the file was successful. If this is not provided, ansible will use the local calculated checksum of the src file. |
| **content**  string   added in 1.1 of ansible.builtin  |  | When used instead of `src`, sets the contents of a file directly to the specified value. Works only when `dest` is a file. Creates the file if it does not exist. For advanced formatting or if `content` contains a variable, use the [ansible.builtin.template](template_module) module. |
| **decrypt**  boolean   added in 2.4 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | This option controls the autodecryption of source files using vault. |
| **dest**  path / required  |  | Remote absolute path where the file should be copied to. If `src` is a directory, this must be a directory too. If `dest` is a non-existent path and if either `dest` ends with "/" or `src` is a directory, `dest` is created. If *dest* is a relative path, the starting directory is determined by the remote host. If `src` and `dest` are files, the parent directory of `dest` is not created and the task fails if it does not already exist. |
| **directory\_mode**  raw   added in 1.5 of ansible.builtin  |  | When doing a recursive copy set the mode for the directories. If this is not set we will use the system defaults. The mode is only set on directories which are newly created, and will not affect those that already existed. |
| **follow**  boolean   added in 1.8 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | This flag indicates that filesystem links in the destination, if they exist, should be followed. |
| **force**  boolean   added in 1.1 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | Influence whether the remote file must always be replaced. If `yes`, the remote file will be replaced when contents are different than the source. If `no`, the file will only be transferred if the destination does not exist. Alias `thirsty` has been deprecated and will be removed in 2.13. 
aliases: thirsty |
| **group**  string  |  | Name of the group that should own the file/directory, as would be fed to *chown*. |
| **local\_follow**  boolean   added in 2.4 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | This flag indicates that filesystem links in the source tree, if they exist, should be followed. |
| **mode**  raw  |  | The permissions of the destination file or directory. For those used to `/usr/bin/chmod` remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like `0644` or `01777`) or quote it (like `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). As of Ansible 2.3, the mode may also be the special string `preserve`. 
`preserve` means that the file will be given the same permissions as the source file. When doing a recursive copy, see also `directory_mode`. If `mode` is not specified and the destination file **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created file. If `mode` is not specified and the destination file **does** exist, the mode of the existing file will be used. Specifying `mode` is the best way to ensure files are created with the correct permissions. See CVE-2020-1736 for further details. |
| **owner**  string  |  | Name of the user that should own the file/directory, as would be fed to *chown*. |
| **remote\_src**  boolean   added in 2.0 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Influence whether `src` needs to be transferred or already is present remotely. If `no`, it will search for `src` on the controller node. If `yes` it will search for `src` on the managed (remote) node. 
`remote_src` supports recursive copying as of version 2.8. 
`remote_src` only works with `mode=preserve` as of version 2.6. Autodecryption of files does not work when `remote_src=yes`. |
| **selevel**  string  |  | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the `range`. When set to `_default`, it will use the `level` portion of the policy if available. |
| **serole**  string  |  | The role part of the SELinux file context. When set to `_default`, it will use the `role` portion of the policy if available. |
| **setype**  string  |  | The type part of the SELinux file context. When set to `_default`, it will use the `type` portion of the policy if available. |
| **seuser**  string  |  | The user part of the SELinux file context. By default it uses the `system` policy, where applicable. When set to `_default`, it will use the `user` portion of the policy if available. |
| **src**  path  |  | Local path to a file to copy to the remote server. This can be absolute or relative. If path is a directory, it is copied recursively. In this case, if path ends with "/", only inside contents of that directory are copied to destination. Otherwise, if it does not end with "/", the directory itself with all contents is copied. This behavior is similar to the `rsync` command line tool. |
| **unsafe\_writes**  boolean   added in 2.2 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. |
| **validate**  string  |  | The validation command to run before copying into place. The path to the file to validate is passed in via '%s' which must be present as in the examples below. The command is passed securely so shell features like expansion and pipes will not work. |

   
 Notes
-----

  Note

 * The [ansible.builtin.copy](#ansible-collections-ansible-builtin-copy-module) module recursively copy facility does not scale to lots (>hundreds) of files.
* Supports `check_mode`.

  See Also
--------

  See also

  [ansible.builtin.assemble](assemble_module#ansible-collections-ansible-builtin-assemble-module)

The official documentation on the **ansible.builtin.assemble** module.

  [ansible.builtin.fetch](fetch_module#ansible-collections-ansible-builtin-fetch-module)

The official documentation on the **ansible.builtin.fetch** module.

  [ansible.builtin.file](file_module#ansible-collections-ansible-builtin-file-module)

The official documentation on the **ansible.builtin.file** module.

  [ansible.builtin.template](template_module#ansible-collections-ansible-builtin-template-module)

The official documentation on the **ansible.builtin.template** module.

  [ansible.posix.synchronize](../posix/synchronize_module#ansible-collections-ansible-posix-synchronize-module)

The official documentation on the **ansible.posix.synchronize** module.

  [ansible.windows.win\_copy](../windows/win_copy_module#ansible-collections-ansible-windows-win-copy-module)

The official documentation on the **ansible.windows.win\_copy** module.

    Examples
--------

 
```
- name: Copy file with owner and permissions
  ansible.builtin.copy:
    src: /srv/myfiles/foo.conf
    dest: /etc/foo.conf
    owner: foo
    group: foo
    mode: '0644'

- name: Copy file with owner and permission, using symbolic representation
  ansible.builtin.copy:
    src: /srv/myfiles/foo.conf
    dest: /etc/foo.conf
    owner: foo
    group: foo
    mode: u=rw,g=r,o=r

- name: Another symbolic mode example, adding some permissions and removing others
  ansible.builtin.copy:
    src: /srv/myfiles/foo.conf
    dest: /etc/foo.conf
    owner: foo
    group: foo
    mode: u+rw,g-wx,o-rwx

- name: Copy a new "ntp.conf" file into place, backing up the original if it differs from the copied version
  ansible.builtin.copy:
    src: /mine/ntp.conf
    dest: /etc/ntp.conf
    owner: root
    group: root
    mode: '0644'
    backup: yes

- name: Copy a new "sudoers" file into place, after passing validation with visudo
  ansible.builtin.copy:
    src: /mine/sudoers
    dest: /etc/sudoers
    validate: /usr/sbin/visudo -csf %s

- name: Copy a "sudoers" file on the remote machine for editing
  ansible.builtin.copy:
    src: /etc/sudoers
    dest: /etc/sudoers.edit
    remote_src: yes
    validate: /usr/sbin/visudo -csf %s

- name: Copy using inline content
  ansible.builtin.copy:
    content: '# This file was moved to /etc/other.conf'
    dest: /etc/mine.conf

- name: If follow=yes, /path/to/file will be overwritten by contents of foo.conf
  ansible.builtin.copy:
    src: /etc/foo.conf
    dest: /path/to/link  # link to /path/to/file
    follow: yes

- name: If follow=no, /path/to/link will become a file and be overwritten by contents of foo.conf
  ansible.builtin.copy:
    src: /etc/foo.conf
    dest: /path/to/link  # link to /path/to/file
    follow: no

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **backup\_file**  string  | changed and if backup=yes | Name of backup file created.  **Sample:** /path/to/file.txt.2015-02-12@22:09~ |
| **checksum**  string  | success | SHA1 checksum of the file after running copy.  **Sample:** 6e642bb8dd5c2e027bf21dd923337cbb4214f827 |
| **dest**  string  | success | Destination file/path.  **Sample:** /path/to/file.txt |
| **gid**  integer  | success | Group id of the file, after execution.  **Sample:** 100 |
| **group**  string  | success | Group of the file, after execution.  **Sample:** httpd |
| **md5sum**  string  | when supported | MD5 checksum of the file after running copy.  **Sample:** 2a5aeecc61dc98c4d780b14b330e3282 |
| **mode**  string  | success | Permissions of the target, after execution.  **Sample:** 420 |
| **owner**  string  | success | Owner of the file, after execution.  **Sample:** httpd |
| **size**  integer  | success | Size of the target, after execution.  **Sample:** 1220 |
| **src**  string  | changed | Source file used for the copy on the target machine.  **Sample:** /home/httpd/.ansible/tmp/ansible-tmp-1423796390.97-147729857856000/source |
| **state**  string  | success | State of the target, after execution.  **Sample:** file |
| **uid**  integer  | success | Owner id of the file, after execution.  **Sample:** 100 |

   
  
 ### Authors

 * Ansible Core Team
* Michael DeHaan



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/copy_module.html>

ansible.builtin.import\_tasks – Import a task list
==================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `import_tasks` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 2.4: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Imports a list of tasks to be added to the current playbook for subsequent execution.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **free-form**  string  |  | The name of the imported file is specified directly without any other option. Most keywords, including loops and conditionals, only applied to the imported tasks, not to this statement itself. If you need any of those to apply, use [ansible.builtin.include\_tasks](include_tasks_module) instead. |

   
 Notes
-----

  Note

 * This is a core feature of Ansible, rather than a module, and cannot be overridden like a module.

  See Also
--------

  See also

  [ansible.builtin.import\_playbook](import_playbook_module#ansible-collections-ansible-builtin-import-playbook-module)

The official documentation on the **ansible.builtin.import\_playbook** module.

  [ansible.builtin.import\_role](import_role_module#ansible-collections-ansible-builtin-import-role-module)

The official documentation on the **ansible.builtin.import\_role** module.

  [ansible.builtin.include\_role](include_role_module#ansible-collections-ansible-builtin-include-role-module)

The official documentation on the **ansible.builtin.include\_role** module.

  [ansible.builtin.include\_tasks](include_tasks_module#ansible-collections-ansible-builtin-include-tasks-module)

The official documentation on the **ansible.builtin.include\_tasks** module.

  [Including and importing](../../../user_guide/playbooks_reuse_includes#playbooks-reuse-includes)

More information related to including and importing playbooks, roles and tasks.

    Examples
--------

 
```
- hosts: all
  tasks:
    - debug:
        msg: task1

    - name: Include task list in play
      import_tasks: stuff.yaml

    - debug:
        msg: task10

- hosts: all
  tasks:
    - debug:
        msg: task1

    - name: Apply conditional to all imported tasks
      import_tasks: stuff.yaml
      when: hostvar is defined

```
 ### Authors

 * Ansible Core Team (@ansible)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/import_tasks_module.html>

ansible.builtin.include – Include a play or task list
=====================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `include` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 0.6: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Includes a file with a list of plays or tasks to be executed in the current playbook.
* Files with a list of plays can only be included at the top level. Lists of tasks can only be included where tasks normally run (in play).
* Before Ansible 2.0, all includes were ‘static’ and were executed when the play was compiled.
* Static includes are not subject to most directives. For example, loops or conditionals are applied instead to each inherited task.
* Since Ansible 2.0, task includes are dynamic and behave more like real tasks. This means they can be looped, skipped and use variables from any source. Ansible tries to auto detect this, but you can use the `static` directive (which was added in Ansible 2.1) to bypass autodetection.
* This module is also supported for Windows targets.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **free-form**  string  |  | This module allows you to specify the name of the file directly without any other options. |

   
 Notes
-----

  Note

 * This is a core feature of Ansible, rather than a module, and cannot be overridden like a module.
* Include has some unintuitive behaviours depending on if it is running in a static or dynamic in play or in playbook context, in an effort to clarify behaviours we are moving to a new set modules ([ansible.builtin.include\_tasks](include_tasks_module#ansible-collections-ansible-builtin-include-tasks-module), [ansible.builtin.include\_role](include_role_module#ansible-collections-ansible-builtin-include-role-module), [ansible.builtin.import\_playbook](import_playbook_module#ansible-collections-ansible-builtin-import-playbook-module), [ansible.builtin.import\_tasks](import_tasks_module#ansible-collections-ansible-builtin-import-tasks-module)) that have well established and clear behaviours.
* **This module will still be supported for some time but we are looking at deprecating it in the near future.**

  See Also
--------

  See also

  [ansible.builtin.import\_playbook](import_playbook_module#ansible-collections-ansible-builtin-import-playbook-module)

The official documentation on the **ansible.builtin.import\_playbook** module.

  [ansible.builtin.import\_role](import_role_module#ansible-collections-ansible-builtin-import-role-module)

The official documentation on the **ansible.builtin.import\_role** module.

  [ansible.builtin.import\_tasks](import_tasks_module#ansible-collections-ansible-builtin-import-tasks-module)

The official documentation on the **ansible.builtin.import\_tasks** module.

  [ansible.builtin.include\_role](include_role_module#ansible-collections-ansible-builtin-include-role-module)

The official documentation on the **ansible.builtin.include\_role** module.

  [ansible.builtin.include\_tasks](include_tasks_module#ansible-collections-ansible-builtin-include-tasks-module)

The official documentation on the **ansible.builtin.include\_tasks** module.

  [Including and importing](../../../user_guide/playbooks_reuse_includes#playbooks-reuse-includes)

More information related to including and importing playbooks, roles and tasks.

    Examples
--------

 
```
- hosts: localhost
  tasks:
    - debug:
        msg: play1

- name: Include a play after another play
  include: otherplays.yaml


- hosts: all
  tasks:
    - debug:
        msg: task1

    - name: Include task list in play
      include: stuff.yaml

    - debug:
        msg: task10

- hosts: all
  tasks:
    - debug:
        msg: task1

    - name: Include task list in play only if the condition is true
      include: "{{ hostvar }}.yaml"
      static: no
      when: hostvar is defined

```
 ### Authors

 * Ansible Core Team (@ansible)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/include_module.html>

ansible.builtin.apt – Manages apt-packages
==========================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `apt` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 0.0.2: of ansible.builtin

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Manages *apt* packages (such as for Debian/Ubuntu).

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * python-apt (python 2)
* python3-apt (python 3)
* aptitude (before 2.4)

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_unauthenticated**  boolean   added in 2.1 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Ignore if packages cannot be authenticated. This is useful for bootstrapping environments that manage their own apt-key setup. 
`allow_unauthenticated` is only supported with state: *install*/*present*
 
aliases: allow-unauthenticated |
| **autoclean**  boolean   added in 2.4 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | If `yes`, cleans the local repository of retrieved package files that can no longer be downloaded. |
| **autoremove**  boolean   added in 2.1 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | If `yes`, remove unused dependency packages for all module states except *build-dep*. It can also be used as the only option. Previous to version 2.4, autoclean was also an alias for autoremove, now it is its own separate command. See documentation for further information. |
| **cache\_valid\_time**  integer  | **Default:**0 | Update the apt cache if it is older than the *cache\_valid\_time*. This option is set in seconds. As of Ansible 2.4, if explicitly set, this sets *update\_cache=yes*. |
| **deb**  path   added in 1.6 of ansible.builtin  |  | Path to a .deb package on the remote machine. If :// in the path, ansible will attempt to download deb before installing. (Version added 2.1) Requires the `xz-utils` package to extract the control file of the deb package to install. |
| **default\_release**  string  |  | Corresponds to the `-t` option for *apt* and sets pin priorities 
aliases: default-release |
| **dpkg\_options**  string  | **Default:**"force-confdef,force-confold" | Add dpkg options to apt command. Defaults to '-o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold"' Options should be supplied as comma separated list |
| **fail\_on\_autoremove**  boolean   added in 2.11 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Corresponds to the `--no-remove` option for `apt`. If `yes`, it is ensured that no packages will be removed or the task will fail. 
`fail_on_autoremove` is only supported with state except `absent`
 |
| **force**  boolean  | **Choices:*** **no** ←
* yes
 | Corresponds to the `--force-yes` to *apt-get* and implies `allow_unauthenticated: yes`
 This option will disable checking both the packages' signatures and the certificates of the web servers they are downloaded from. This option \*is not\* the equivalent of passing the `-f` flag to *apt-get* on the command line \*\*This is a destructive operation with the potential to destroy your system, and it should almost never be used.\*\* Please also see `man apt-get` for more information. |
| **force\_apt\_get**  boolean   added in 2.4 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Force usage of apt-get instead of aptitude |
| **install\_recommends**  boolean  | **Choices:*** no
* yes
 | Corresponds to the `--no-install-recommends` option for *apt*. `yes` installs recommended packages. `no` does not install recommended packages. By default, Ansible will use the same defaults as the operating system. Suggested packages are never installed. 
aliases: install-recommends |
| **name**  list / elements=string  |  | A list of package names, like `foo`, or package specifier with version, like `foo=1.0`. Name wildcards (fnmatch) like `apt*` and version wildcards like `foo=1.0*` are also supported. 
aliases: package, pkg |
| **only\_upgrade**  boolean   added in 2.1 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Only upgrade a package if it is already installed. |
| **policy\_rc\_d**  integer   added in 2.8 of ansible.builtin  |  | Force the exit code of /usr/sbin/policy-rc.d. For example, if *policy\_rc\_d=101* the installed package will not trigger a service start. If /usr/sbin/policy-rc.d already exists, it is backed up and restored after the package installation. If `null`, the /usr/sbin/policy-rc.d isn't created/changed. |
| **purge**  boolean  | **Choices:*** **no** ←
* yes
 | Will force purging of configuration files if the module state is set to *absent*. |
| **state**  string  | **Choices:*** absent
* build-dep
* latest
* **present** ←
* fixed
 | Indicates the desired package state. `latest` ensures that the latest version is installed. `build-dep` ensures the package build dependencies are installed. `fixed` attempt to correct a system with broken dependencies in place. |
| **update\_cache**  boolean  | **Choices:*** no
* yes
 | Run the equivalent of `apt-get update` before the operation. Can be run as part of the package installation or as a separate step. Default is not to update the cache. 
aliases: update-cache |
| **update\_cache\_retries**  integer   added in 2.10 of ansible.builtin  | **Default:**5 | Amount of retries if the cache update fails. Also see *update\_cache\_retry\_max\_delay*. |
| **update\_cache\_retry\_max\_delay**  integer   added in 2.10 of ansible.builtin  | **Default:**12 | Use an exponential backoff delay for each retry (see *update\_cache\_retries*) up to this max delay in seconds. |
| **upgrade**  string   added in 1.1 of ansible.builtin  | **Choices:*** dist
* full
* **no** ←
* safe
* yes
 | If yes or safe, performs an aptitude safe-upgrade. If full, performs an aptitude full-upgrade. If dist, performs an apt-get dist-upgrade. Note: This does not upgrade a specific package, use state=latest for that. Note: Since 2.4, apt-get is used as a fall-back if aptitude is not present. |

   
 Notes
-----

  Note

 * Three of the upgrade modes (`full`, `safe` and its alias `yes`) required `aptitude` up to 2.3, since 2.4 `apt-get` is used as a fall-back.
* In most cases, packages installed with apt will start newly installed services by default. Most distributions have mechanisms to avoid this. For example when installing Postgresql-9.5 in Debian 9, creating an excutable shell script (/usr/sbin/policy-rc.d) that throws a return code of 101 will stop Postgresql 9.5 starting up after install. Remove the file or remove its execute permission afterwards.
* The apt-get commandline supports implicit regex matches here but we do not because it can let typos through easier (If you typo `foo` as `fo` apt-get would install packages that have “fo” in their name with a warning and a prompt for the user. Since we don’t have warnings and prompts before installing we disallow this.Use an explicit fnmatch pattern if you want wildcarding)
* When used with a `loop:` each package will be processed individually, it is much more efficient to pass the list directly to the `name` option.

  Examples
--------

 
```
- name: Install apache httpd  (state=present is optional)
  apt:
    name: apache2
    state: present

- name: Update repositories cache and install "foo" package
  apt:
    name: foo
    update_cache: yes

- name: Remove "foo" package
  apt:
    name: foo
    state: absent

- name: Install the package "foo"
  apt:
    name: foo

- name: Install a list of packages
  apt:
    pkg:
    - foo
    - foo-tools

- name: Install the version '1.00' of package "foo"
  apt:
    name: foo=1.00

- name: Update the repository cache and update package "nginx" to latest version using default release squeeze-backport
  apt:
    name: nginx
    state: latest
    default_release: squeeze-backports
    update_cache: yes

- name: Install zfsutils-linux with ensuring conflicted packages (e.g. zfs-fuse) will not be removed.
  apt:
    name: zfsutils-linux
    state: latest
    fail_on_autoremove: yes

- name: Install latest version of "openjdk-6-jdk" ignoring "install-recommends"
  apt:
    name: openjdk-6-jdk
    state: latest
    install_recommends: no

- name: Update all packages to their latest version
  apt:
    name: "*"
    state: latest

- name: Upgrade the OS (apt-get dist-upgrade)
  apt:
    upgrade: dist

- name: Run the equivalent of "apt-get update" as a separate step
  apt:
    update_cache: yes

- name: Only run "update_cache=yes" if the last one is more than 3600 seconds ago
  apt:
    update_cache: yes
    cache_valid_time: 3600

- name: Pass options to dpkg on run
  apt:
    upgrade: dist
    update_cache: yes
    dpkg_options: 'force-confold,force-confdef'

- name: Install a .deb package
  apt:
    deb: /tmp/mypackage.deb

- name: Install the build dependencies for package "foo"
  apt:
    pkg: foo
    state: build-dep

- name: Install a .deb package from the internet
  apt:
    deb: https://example.com/python-ppq_0.1-1_all.deb

- name: Remove useless packages from the cache
  apt:
    autoclean: yes

- name: Remove dependencies that are no longer required
  apt:
    autoremove: yes

# Sometimes apt tasks fail because apt is locked by an autoupdate or by a race condition on a thread.
# To check for a lock file before executing, and keep trying until the lock file is released:
- name: Install packages only when the apt process is not locked
  apt:
    name: foo
    state: present
  register: apt_action
  retries: 100
  until: apt_action is success or ('Failed to lock apt for exclusive operation' not in apt_action.msg and '/var/lib/dpkg/lock' not in apt_action.msg)

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **cache\_update\_time**  integer  | success, in some cases | time of the last cache update (0 if unknown)  **Sample:** 1425828348000 |
| **cache\_updated**  boolean  | success, in some cases | if the cache was updated or not  **Sample:** True |
| **stderr**  string  | success, when needed | error output from apt  **Sample:** AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to ... |
| **stdout**  string  | success, when needed | output from apt  **Sample:** Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: apache2-bin ... |

   
  
 ### Authors

 * Matthew Williams (@mgwilliams)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html>

ansible.builtin.meta – Execute Ansible ‘actions’
================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `meta` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 1.2: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Meta tasks are a special kind of task which can influence Ansible internal execution or state.
* Meta tasks can be used anywhere within your playbook.
* This module is also supported for Windows targets.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **free\_form**  string / required  | **Choices:*** clear\_facts
* clear\_host\_errors
* end\_host
* end\_play
* flush\_handlers
* noop
* refresh\_inventory
* reset\_connection
 | This module takes a free form command, as a string. There is not an actual option named "free form". See the examples! 
`flush_handlers` makes Ansible run any handler tasks which have thus far been notified. Ansible inserts these tasks internally at certain points to implicitly trigger handler runs (after pre/post tasks, the final role execution, and the main tasks section of your plays). 
`refresh_inventory` (added in Ansible 2.0) forces the reload of the inventory, which in the case of dynamic inventory scripts means they will be re-executed. If the dynamic inventory script is using a cache, Ansible cannot know this and has no way of refreshing it (you can disable the cache or, if available for your specific inventory datasource (e.g. aws), you can use the an inventory plugin instead of an inventory script). This is mainly useful when additional hosts are created and users wish to use them instead of using the [ansible.builtin.add\_host](add_host_module) module. 
`noop` (added in Ansible 2.0) This literally does 'nothing'. It is mainly used internally and not recommended for general use. 
`clear_facts` (added in Ansible 2.1) causes the gathered facts for the hosts specified in the play's list of hosts to be cleared, including the fact cache. 
`clear_host_errors` (added in Ansible 2.1) clears the failed state (if any) from hosts specified in the play's list of hosts. 
`end_play` (added in Ansible 2.2) causes the play to end without failing the host(s). Note that this affects all hosts. 
`reset_connection` (added in Ansible 2.3) interrupts a persistent connection (i.e. ssh + control persist) 
`end_host` (added in Ansible 2.8) is a per-host variation of `end_play`. Causes the play to end for the current host without failing it. |

   
 Notes
-----

  Note

 * `meta` is not really a module nor action\_plugin as such it cannot be overwritten.
* `clear_facts` will remove the persistent facts from [ansible.builtin.set\_fact](set_fact_module#ansible-collections-ansible-builtin-set-fact-module) using `cacheable=True`, but not the current host variable it creates for the current run.
* Looping on meta tasks is not supported.
* Skipping `meta` tasks with tags is not supported before Ansible 2.11.
* This module is also supported for Windows targets.

  See Also
--------

  See also

  [ansible.builtin.assert](assert_module#ansible-collections-ansible-builtin-assert-module)

The official documentation on the **ansible.builtin.assert** module.

  [ansible.builtin.fail](fail_module#ansible-collections-ansible-builtin-fail-module)

The official documentation on the **ansible.builtin.fail** module.

    Examples
--------

 
```
# Example showing flushing handlers on demand, not at end of play
- template:
    src: new.j2
    dest: /etc/config.txt
  notify: myhandler

- name: Force all notified handlers to run at this point, not waiting for normal sync points
  meta: flush_handlers

# Example showing how to refresh inventory during play
- name: Reload inventory, useful with dynamic inventories when play makes changes to the existing hosts
  cloud_guest:            # this is fake module
    name: newhost
    state: present

- name: Refresh inventory to ensure new instances exist in inventory
  meta: refresh_inventory

# Example showing how to clear all existing facts of targetted hosts
- name: Clear gathered facts from all currently targeted hosts
  meta: clear_facts

# Example showing how to continue using a failed target
- name: Bring host back to play after failure
  copy:
    src: file
    dest: /etc/file
  remote_user: imightnothavepermission

- meta: clear_host_errors

# Example showing how to reset an existing connection
- user:
    name: '{{ ansible_user }}'
    groups: input

- name: Reset ssh connection to allow user changes to affect 'current login user'
  meta: reset_connection

# Example showing how to end the play for specific targets
- name: End the play for hosts that run CentOS 6
  meta: end_host
  when:
  - ansible_distribution == 'CentOS'
  - ansible_distribution_major_version == '6'

```
 ### Authors

 * Ansible Core Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/meta_module.html>

ansible.builtin.unarchive – Unpacks an archive after (optionally) copying it from the local machine
===================================================================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `unarchive` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 1.4: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * The `unarchive` module unpacks an archive. It will not unpack a compressed file that does not contain an archive.
* By default, it will copy the source file from the local system to the target before unpacking.
* Set `remote_src=yes` to unpack an archive which already exists on the target.
* If checksum validation is desired, use [ansible.builtin.get\_url](get_url_module#ansible-collections-ansible-builtin-get-url-module) or [ansible.builtin.uri](uri_module#ansible-collections-ansible-builtin-uri-module) instead to fetch the file and set `remote_src=yes`.
* For Windows targets, use the [community.windows.win\_unzip](../../community/windows/win_unzip_module#ansible-collections-community-windows-win-unzip-module) module instead.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **attributes**  string   added in 2.3 of ansible.builtin  |  | The attributes the resulting file or directory should have. To get supported flags look at the man page for *chattr* on the target system. This string should contain the attributes in the same order as the one displayed by *lsattr*. The `=` operator is assumed as default, otherwise `+` or `-` operators need to be included in the string. 
aliases: attr |
| **copy**  boolean  | **Choices:*** no
* **yes** ←
 | If true, the file is copied from local controller to the managed (remote) node, otherwise, the plugin will look for src archive on the managed machine. This option has been deprecated in favor of `remote_src`. This option is mutually exclusive with `remote_src`. |
| **creates**  path   added in 1.6 of ansible.builtin  |  | If the specified absolute path (file or directory) already exists, this step will **not** be run. |
| **decrypt**  boolean   added in 2.4 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | This option controls the autodecryption of source files using vault. |
| **dest**  path / required  |  | Remote absolute path where the archive should be unpacked. |
| **exclude**  list / elements=string   added in 2.1 of ansible.builtin  | **Default:**[] | List the directory and file entries that you would like to exclude from the unarchive action. Mutually exclusive with `include`. |
| **extra\_opts**  list / elements=string   added in 2.1 of ansible.builtin  | **Default:**"" | Specify additional options by passing in an array. Each space-separated command-line option should be a new element of the array. See examples. Command-line options with multiple elements must use multiple lines in the array, one for each element. |
| **group**  string  |  | Name of the group that should own the file/directory, as would be fed to *chown*. |
| **include**  list / elements=string   added in 2.11 of ansible.builtin  | **Default:**[] | List of directory and file entries that you would like to extract from the archive. Only files listed here will be extracted. Mutually exclusive with `exclude`. |
| **keep\_newer**  boolean   added in 2.1 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Do not replace existing files that are newer than files from the archive. |
| **list\_files**  boolean   added in 2.0 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | If set to True, return the list of files that are contained in the tarball. |
| **mode**  raw  |  | The permissions the resulting file or directory should have. For those used to */usr/bin/chmod* remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like `0644` or `01777`) or quote it (like `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination file **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created file. If `mode` is not specified and the destination file **does** exist, the mode of the existing file will be used. Specifying `mode` is the best way to ensure files are created with the correct permissions. See CVE-2020-1736 for further details. |
| **owner**  string  |  | Name of the user that should own the file/directory, as would be fed to *chown*. |
| **remote\_src**  boolean   added in 2.2 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Set to `yes` to indicate the archived file is already on the remote system and not local to the Ansible controller. This option is mutually exclusive with `copy`. |
| **selevel**  string  |  | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the `range`. When set to `_default`, it will use the `level` portion of the policy if available. |
| **serole**  string  |  | The role part of the SELinux file context. When set to `_default`, it will use the `role` portion of the policy if available. |
| **setype**  string  |  | The type part of the SELinux file context. When set to `_default`, it will use the `type` portion of the policy if available. |
| **seuser**  string  |  | The user part of the SELinux file context. By default it uses the `system` policy, where applicable. When set to `_default`, it will use the `user` portion of the policy if available. |
| **src**  path / required  |  | If `remote_src=no` (default), local path to archive file to copy to the target server; can be absolute or relative. If `remote_src=yes`, path on the target server to existing archive file to unpack. If `remote_src=yes` and `src` contains `://`, the remote machine will download the file from the URL first. (version\_added 2.0). This is only for simple cases, for full download support use the [ansible.builtin.get\_url](get_url_module) module. |
| **unsafe\_writes**  boolean   added in 2.2 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. |
| **validate\_certs**  boolean   added in 2.2 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | This only applies if using a https URL as the source of the file. This should only set to `no` used on personally controlled sites using self-signed certificate. Prior to 2.2 the code worked as if this was set to `yes`. |

   
 Notes
-----

  Note

 * Requires `zipinfo` and `gtar`/`unzip` command on target host.
* Requires `zstd` command on target host to expand *.tar.zst* files.
* Can handle *.zip* files using `unzip` as well as *.tar*, *.tar.gz*, *.tar.bz2*, *.tar.xz*, and *.tar.zst* files using `gtar`.
* Does not handle *.gz* files, *.bz2* files, *.xz*, or *.zst* files that do not contain a *.tar* archive.
* Uses gtar’s `--diff` arg to calculate if changed or not. If this `arg` is not supported, it will always unpack the archive.
* Existing files/directories in the destination which are not in the archive are not touched. This is the same behavior as a normal archive extraction.
* Existing files/directories in the destination which are not in the archive are ignored for purposes of deciding if the archive should be unpacked or not.
* Supports `check_mode`.

  See Also
--------

  See also

  [community.general.archive](../../community/general/archive_module#ansible-collections-community-general-archive-module)

The official documentation on the **community.general.archive** module.

  [community.general.iso\_extract](../../community/general/iso_extract_module#ansible-collections-community-general-iso-extract-module)

The official documentation on the **community.general.iso\_extract** module.

  [community.windows.win\_unzip](../../community/windows/win_unzip_module#ansible-collections-community-windows-win-unzip-module)

The official documentation on the **community.windows.win\_unzip** module.

    Examples
--------

 
```
- name: Extract foo.tgz into /var/lib/foo
  ansible.builtin.unarchive:
    src: foo.tgz
    dest: /var/lib/foo

- name: Unarchive a file that is already on the remote machine
  ansible.builtin.unarchive:
    src: /tmp/foo.zip
    dest: /usr/local/bin
    remote_src: yes

- name: Unarchive a file that needs to be downloaded (added in 2.0)
  ansible.builtin.unarchive:
    src: https://example.com/example.zip
    dest: /usr/local/bin
    remote_src: yes

- name: Unarchive a file with extra options
  ansible.builtin.unarchive:
    src: /tmp/foo.zip
    dest: /usr/local/bin
    extra_opts:
    - --transform
    - s/^xxx/yyy/

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **dest**  string  | always | Path to the destination directory.  **Sample:** /opt/software |
| **files**  list / elements=string  | When *list\_files* is True | List of all the files in the archive.  **Sample:** ["file1", "file2"] |
| **gid**  integer  | always | Numerical ID of the group that owns the destination directory.  **Sample:** 1000 |
| **group**  string  | always | Name of the group that owns the destination directory.  **Sample:** librarians |
| **handler**  string  | always | Archive software handler used to extract and decompress the archive.  **Sample:** TgzArchive |
| **mode**  string  | always | String that represents the octal permissions of the destination directory.  **Sample:** 0755 |
| **owner**  string  | always | Name of the user that owns the destination directory.  **Sample:** paul |
| **size**  integer  | always | The size of destination directory in bytes. Does not include the size of files or subdirectories contained within.  **Sample:** 36 |
| **src**  string  | always | The source archive's path. If *src* was a remote web URL, or from the local ansible controller, this shows the temporary location where the download was stored.  **Sample:** /home/paul/test.tar.gz |
| **state**  string  | always | State of the destination. Effectively always "directory".  **Sample:** directory |
| **uid**  integer  | always | Numerical ID of the user that owns the destination directory.  **Sample:** 1000 |

   
  
 ### Authors

 * Michael DeHaan



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/unarchive_module.html>

ansible.builtin.assemble – Assemble configuration files from fragments
======================================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `assemble` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 0.5: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Assembles a configuration file from fragments.
* Often a particular program will take a single configuration file and does not support a `conf.d` style structure where it is easy to build up the configuration from multiple sources. `assemble` will take a directory of files that can be local or have already been transferred to the system, and concatenate them together to produce a destination file.
* Files are assembled in string sorting order.
* Puppet calls this idea *fragments*.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **attributes**  string   added in 2.3 of ansible.builtin  |  | The attributes the resulting file or directory should have. To get supported flags look at the man page for *chattr* on the target system. This string should contain the attributes in the same order as the one displayed by *lsattr*. The `=` operator is assumed as default, otherwise `+` or `-` operators need to be included in the string. 
aliases: attr |
| **backup**  boolean  | **Choices:*** **no** ←
* yes
 | Create a backup file (if `yes`), including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. |
| **decrypt**  boolean   added in 2.4 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | This option controls the autodecryption of source files using vault. |
| **delimiter**  string   added in 1.4 of ansible.builtin  |  | A delimiter to separate the file contents. |
| **dest**  path / required  |  | A file to create using the concatenation of all of the source files. |
| **group**  string  |  | Name of the group that should own the file/directory, as would be fed to *chown*. |
| **ignore\_hidden**  boolean   added in 2.0 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | A boolean that controls if files that start with a '.' will be included or not. |
| **mode**  raw  |  | The permissions the resulting file or directory should have. For those used to */usr/bin/chmod* remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like `0644` or `01777`) or quote it (like `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination file **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created file. If `mode` is not specified and the destination file **does** exist, the mode of the existing file will be used. Specifying `mode` is the best way to ensure files are created with the correct permissions. See CVE-2020-1736 for further details. |
| **owner**  string  |  | Name of the user that should own the file/directory, as would be fed to *chown*. |
| **regexp**  string  |  | Assemble files only if `regex` matches the filename. If not set, all files are assembled. Every "\" (backslash) must be escaped as "\\" to comply to YAML syntax. Uses [Python regular expressions](http://docs.python.org/2/library/re.html). |
| **remote\_src**  boolean   added in 1.4 of ansible.builtin  | **Choices:*** no
* **yes** ←
 | If `no`, it will search for src at originating/master machine. If `yes`, it will go to the remote/target machine for the src. |
| **selevel**  string  |  | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the `range`. When set to `_default`, it will use the `level` portion of the policy if available. |
| **serole**  string  |  | The role part of the SELinux file context. When set to `_default`, it will use the `role` portion of the policy if available. |
| **setype**  string  |  | The type part of the SELinux file context. When set to `_default`, it will use the `type` portion of the policy if available. |
| **seuser**  string  |  | The user part of the SELinux file context. By default it uses the `system` policy, where applicable. When set to `_default`, it will use the `user` portion of the policy if available. |
| **src**  path / required  |  | An already existing directory full of source files. |
| **unsafe\_writes**  boolean   added in 2.2 of ansible.builtin  | **Choices:*** **no** ←
* yes
 | Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. |
| **validate**  string   added in 2.0 of ansible.builtin  |  | The validation command to run before copying into place. The path to the file to validate is passed in via '%s' which must be present as in the sshd example below. The command is passed securely so shell features like expansion and pipes won't work. |

   
 See Also
--------

  See also

  [ansible.builtin.copy](copy_module#ansible-collections-ansible-builtin-copy-module)

The official documentation on the **ansible.builtin.copy** module.

  [ansible.builtin.template](template_module#ansible-collections-ansible-builtin-template-module)

The official documentation on the **ansible.builtin.template** module.

  [ansible.windows.win\_copy](../windows/win_copy_module#ansible-collections-ansible-windows-win-copy-module)

The official documentation on the **ansible.windows.win\_copy** module.

    Examples
--------

 
```
- name: Assemble from fragments from a directory
  ansible.builtin.assemble:
    src: /etc/someapp/fragments
    dest: /etc/someapp/someapp.conf

- name: Insert the provided delimiter between fragments
  ansible.builtin.assemble:
    src: /etc/someapp/fragments
    dest: /etc/someapp/someapp.conf
    delimiter: '### START FRAGMENT ###'

- name: Assemble a new "sshd_config" file into place, after passing validation with sshd
  ansible.builtin.assemble:
    src: /etc/ssh/conf.d/
    dest: /etc/ssh/sshd_config
    validate: /usr/sbin/sshd -t -f %s

```
 ### Authors

 * Stephen Fromm (@sfromm)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/assemble_module.html>

ipaddr filter
=============

  New in version 1.9.

  `ipaddr()` is a Jinja2 filter designed to provide an interface to the [netaddr](https://pypi.org/project/netaddr/) Python package from within Ansible. It can operate on strings or lists of items, test various data to check if they are valid IP addresses, and manipulate the input data to extract requested information. `ipaddr()` works with both IPv4 and IPv6 addresses in various forms. There are also additional functions available to manipulate IP subnets and MAC addresses.

  Note

 The `ipaddr()` filter migrated to the [ansible.netcommon](https://galaxy.ansible.com/ansible/netcommon) collection. Follow the installation instructions to install that collection.

  To use this filter in Ansible, you need to install the [netaddr](https://pypi.org/project/netaddr/) Python library on a computer on which you use Ansible (it is not required on remote hosts). It can usually be installed with either your system package manager or using `pip`:

 
```
pip install netaddr

```
 * [Basic tests](#basic-tests)
* [Filtering lists](#filtering-lists)
* [Wrapping IPv6 addresses in [ ] brackets](#wrapping-ipv6-addresses-in-brackets)
* [Basic queries](#basic-queries)
* [Getting information about hosts and networks](#getting-information-about-hosts-and-networks)
* [Getting information from host/prefix values](#getting-information-from-host-prefix-values)
* [Converting subnet masks to CIDR notation](#converting-subnet-masks-to-cidr-notation)
* [Getting information about the network in CIDR notation](#getting-information-about-the-network-in-cidr-notation)
* [IP address conversion](#ip-address-conversion)
* [Converting IPv4 address to a 6to4 address](#converting-ipv4-address-to-a-6to4-address)
* [Finding IP addresses within a range](#finding-ip-addresses-within-a-range)
* [Testing if a address belong to a network range](#testing-if-a-address-belong-to-a-network-range)
* [IP Math](#ip-math)
* [Subnet manipulation](#subnet-manipulation)
* [Subnet Merging](#subnet-merging)
* [MAC address filter](#mac-address-filter)
* [Generate an IPv6 address in Stateless Configuration (SLAAC)](#generate-an-ipv6-address-in-stateless-configuration-slaac)

 Basic tests
-----------

 `ipaddr()` is designed to return the input value if a query is True, and `False` if a query is False. This way it can be easily used in chained filters. To use the filter, pass a string to it:

 
```
{{ '192.0.2.0' | ansible.netcommon.ipaddr }}

```
 You can also pass the values as variables:

 
```
{{ myvar | ansible.netcommon.ipaddr }}

```
 Here are some example test results of various input strings:

 
```
# These values are valid IP addresses or network ranges
'192.168.0.1'       -> 192.168.0.1
'192.168.32.0/24'   -> 192.168.32.0/24
'fe80::100/10'      -> fe80::100/10
45443646733         -> ::a:94a7:50d
'523454/24'         -> 0.7.252.190/24

# Values that are not valid IP addresses or network ranges
'localhost'         -> False
True                -> False
'space bar'         -> False
False               -> False
''                  -> False
':'                 -> False
'fe80:/10'          -> False

```
 Sometimes you need either IPv4 or IPv6 addresses. To filter only for a particular type, `ipaddr()` filter has two “aliases”, `ipv4()` and `ipv6()`.

 Example use of an IPv4 filter:

 
```
{{ myvar | ansible.netcommon.ipv4 }}

```
 A similar example of an IPv6 filter:

 
```
{{ myvar | ansible.netcommon.ipv6 }}

```
 Here’s some example test results to look for IPv4 addresses:

 
```
'192.168.0.1'       -> 192.168.0.1
'192.168.32.0/24'   -> 192.168.32.0/24
'fe80::100/10'      -> False
45443646733         -> False
'523454/24'         -> 0.7.252.190/24

```
 And the same data filtered for IPv6 addresses:

 
```
'192.168.0.1'       -> False
'192.168.32.0/24'   -> False
'fe80::100/10'      -> fe80::100/10
45443646733         -> ::a:94a7:50d
'523454/24'         -> False

```
 Filtering lists
---------------

 You can filter entire lists - `ipaddr()` will return a list with values valid for a particular query:

 
```
# Example list of values
test_list = ['192.24.2.1', 'host.fqdn', '::1', '192.168.32.0/24', 'fe80::100/10', True, '', '42540766412265424405338506004571095040/64']

# {{ test_list | ansible.netcommon.ipaddr }}
['192.24.2.1', '::1', '192.168.32.0/24', 'fe80::100/10', '2001:db8:32c:faad::/64']

# {{ test_list | ansible.netcommon.ipv4 }}
['192.24.2.1', '192.168.32.0/24']

# {{ test_list | ansible.netcommon.ipv6 }}
['::1', 'fe80::100/10', '2001:db8:32c:faad::/64']

```
 Wrapping IPv6 addresses in [ ] brackets
---------------------------------------

 Some configuration files require IPv6 addresses to be “wrapped” in square brackets (`[ ]`). To accomplish that, you can use the `ipwrap()` filter. It will wrap all IPv6 addresses and leave any other strings intact:

 
```
# {{ test_list | ansible.netcommon.ipwrap }}
['192.24.2.1', 'host.fqdn', '[::1]', '192.168.32.0/24', '[fe80::100]/10', True, '', '[2001:db8:32c:faad::]/64']

```
 As you can see, `ipwrap()` did not filter out non-IP address values, which is usually what you want when for example you are mixing IP addresses with hostnames. If you still want to filter out all non-IP address values, you can chain both filters together:

 
```
# {{ test_list | ansible.netcommon.ipaddr | ansible.netcommon.ipwrap }}
['192.24.2.1', '[::1]', '192.168.32.0/24', '[fe80::100]/10', '[2001:db8:32c:faad::]/64']

```
 Basic queries
-------------

 You can provide a single argument to each `ipaddr()` filter. The filter will then treat it as a query and return values modified by that query. Lists will contain only values that you are querying for.

 Types of queries include:

 * query by name: `ansible.netcommon.ipaddr('address')`, `ansible.netcommon.ipv4('network')`;
* query by CIDR range: `ansible.netcommon.ipaddr('192.168.0.0/24')`, `ansible.netcommon.ipv6('2001:db8::/32')`;
* query by index number: `ansible.netcommon.ipaddr('1')`, `ansible.netcommon.ipaddr('-1')`;

 If a query type is not recognized, Ansible will raise an error.

 Getting information about hosts and networks
--------------------------------------------

 Here’s our test list again:

 
```
# Example list of values
test_list = ['192.24.2.1', 'host.fqdn', '::1', '192.168.32.0/24', 'fe80::100/10', True, '', '42540766412265424405338506004571095040/64']

```
 Let’s take the list above and get only those elements that are host IP addresses and not network ranges:

 
```
# {{ test_list | ansible.netcommon.ipaddr('address') }}
['192.24.2.1', '::1', 'fe80::100']

```
 As you can see, even though some values had a host address with a CIDR prefix, they were dropped by the filter. If you want host IP addresses with their correct CIDR prefixes (as is common with IPv6 addressing), you can use the `ipaddr('host')` filter:

 
```
# {{ test_list | ansible.netcommon.ipaddr('host') }}
['192.24.2.1/32', '::1/128', 'fe80::100/10']

```
 Filtering by IP address type also works:

 
```
# {{ test_list | ansible.netcommon.ipv4('address') }}
['192.24.2.1']

# {{ test_list | ansible.netcommon.ipv6('address') }}
['::1', 'fe80::100']

```
 You can check if IP addresses or network ranges are accessible on a public Internet, or if they are in private networks:

 
```
# {{ test_list | ansible.netcommon.ipaddr('public') }}
['192.24.2.1', '2001:db8:32c:faad::/64']

# {{ test_list | ansible.netcommon.ipaddr('private') }}
['192.168.32.0/24', 'fe80::100/10']

```
 You can check which values are specifically network ranges:

 
```
# {{ test_list | ansible.netcommon.ipaddr('net') }}
['192.168.32.0/24', '2001:db8:32c:faad::/64']

```
 You can also check how many IP addresses can be in a certain range:

 
```
# {{ test_list | ansible.netcommon.ipaddr('net') | ansible.netcommon.ipaddr('size') }}
[256, 18446744073709551616L]

```
 By specifying a network range as a query, you can check if a given value is in that range:

 
```
# {{ test_list | ansible.netcommon.ipaddr('192.0.0.0/8') }}
['192.24.2.1', '192.168.32.0/24']

```
 If you specify a positive or negative integer as a query, `ipaddr()` will treat this as an index and will return the specific IP address from a network range, in the ‘host/prefix’ format:

 
```
# First IP address (network address)
# {{ test_list | ansible.netcommon.ipaddr('net') | ansible.netcommon.ipaddr('0') }}
['192.168.32.0/24', '2001:db8:32c:faad::/64']

# Second IP address (usually the gateway host)
# {{ test_list | ansible.netcommon.ipaddr('net') | ansible.netcommon.ipaddr('1') }}
['192.168.32.1/24', '2001:db8:32c:faad::1/64']

# Last IP address (the broadcast address in IPv4 networks)
# {{ test_list | ansible.netcommon.ipaddr('net') | ansible.netcommon.ipaddr('-1') }}
['192.168.32.255/24', '2001:db8:32c:faad:ffff:ffff:ffff:ffff/64']

```
 You can also select IP addresses from a range by their index, from the start or end of the range:

 
```
# Returns from the start of the range
# {{ test_list | ansible.netcommon.ipaddr('net') | ansible.netcommon.ipaddr('200') }}
['192.168.32.200/24', '2001:db8:32c:faad::c8/64']

# Returns from the end of the range
# {{ test_list | ansible.netcommon.ipaddr('net') | ansible.netcommon.ipaddr('-200') }}
['192.168.32.56/24', '2001:db8:32c:faad:ffff:ffff:ffff:ff38/64']

# {{ test_list | ansible.netcommon.ipaddr('net') | ansible.netcommon.ipaddr('400') }}
['2001:db8:32c:faad::190/64']

```
 Getting information from host/prefix values
-------------------------------------------

 You frequently use a combination of IP addresses and subnet prefixes (“CIDR”), this is even more common with IPv6. The `ansible.netcommon.ipaddr()` filter can extract useful data from these prefixes.

 Here’s an example set of two host prefixes (with some “control” values):

 
```
host_prefix = ['2001:db8:deaf:be11::ef3/64', '192.0.2.48/24', '127.0.0.1', '192.168.0.0/16']

```
 First, let’s make sure that we only work with correct host/prefix values, not just subnets or single IP addresses:

 
```
# {{ host_prefix | ansible.netcommon.ipaddr('host/prefix') }}
['2001:db8:deaf:be11::ef3/64', '192.0.2.48/24']

```
 In Debian-based systems, the network configuration stored in the `/etc/network/interfaces` file uses a combination of IP address, network address, netmask and broadcast address to configure an IPv4 network interface. We can get these values from a single ‘host/prefix’ combination:

 
```
# Jinja2 template
{% set ipv4_host = host_prefix | unique | ansible.netcommon.ipv4('host/prefix') | first %}
iface eth0 inet static
    address   {{ ipv4_host | ansible.netcommon.ipaddr('address') }}
    network   {{ ipv4_host | ansible.netcommon.ipaddr('network') }}
    netmask   {{ ipv4_host | ansible.netcommon.ipaddr('netmask') }}
    broadcast {{ ipv4_host | ansible.netcommon.ipaddr('broadcast') }}

# Generated configuration file
iface eth0 inet static
    address   192.0.2.48
    network   192.0.2.0
    netmask   255.255.255.0
    broadcast 192.0.2.255

```
 In the above example, we needed to handle the fact that values were stored in a list, which is unusual in IPv4 networks, where only a single IP address can be set on an interface. However, IPv6 networks can have multiple IP addresses set on an interface:

 
```
# Jinja2 template
iface eth0 inet6 static
    {% set ipv6_list = host_prefix | unique | ansible.netcommon.ipv6('host/prefix') %}
    address {{ ipv6_list[0] }}
    {% if ipv6_list | length > 1 %}
    {% for subnet in ipv6_list[1:] %}
    up   /sbin/ip address add {{ subnet }} dev eth0
    down /sbin/ip address del {{ subnet }} dev eth0
    {% endfor %}
    {% endif %}

# Generated configuration file
iface eth0 inet6 static
    address 2001:db8:deaf:be11::ef3/64

```
 If needed, you can extract subnet and prefix information from the ‘host/prefix’ value:

 
```
# {{ host_prefix | ansible.netcommon.ipaddr('host/prefix') | ansible.netcommon.ipaddr('subnet') }}
['2001:db8:deaf:be11::/64', '192.0.2.0/24']

# {{ host_prefix | ansible.netcommon.ipaddr('host/prefix') | ansible.netcommon.ipaddr('prefix') }}
[64, 24]

```
 Converting subnet masks to CIDR notation
----------------------------------------

 Given a subnet in the form of network address and subnet mask, the `ipaddr()` filter can convert it into CIDR notation. This can be useful for converting Ansible facts gathered about network configuration from subnet masks into CIDR format:

 
```
ansible_default_ipv4: {
    address: "192.168.0.11",
    alias: "eth0",
    broadcast: "192.168.0.255",
    gateway: "192.168.0.1",
    interface: "eth0",
    macaddress: "fa:16:3e:c4:bd:89",
    mtu: 1500,
    netmask: "255.255.255.0",
    network: "192.168.0.0",
    type: "ether"
}

```
 First concatenate the network and netmask:

 
```
net_mask = "{{ ansible_default_ipv4.network }}/{{ ansible_default_ipv4.netmask }}"
'192.168.0.0/255.255.255.0'

```
 This result can be converted to canonical form with `ipaddr()` to produce a subnet in CIDR format:

 
```
# {{ net_mask | ansible.netcommon.ipaddr('prefix') }}
'24'

# {{ net_mask | ansible.netcommon.ipaddr('net') }}
'192.168.0.0/24'

```
 Getting information about the network in CIDR notation
------------------------------------------------------

 Given an IP address, the `ipaddr()` filter can produce the network address in CIDR notation. This can be useful when you want to obtain the network address from the IP address in CIDR format.

 Here’s an example of IP address:

 
```
ip_address = "{{ ansible_default_ipv4.address }}/{{ ansible_default_ipv4.netmask }}"
'192.168.0.11/255.255.255.0'

```
 This can be used to obtain the network address in CIDR notation format:

 
```
# {{ ip_address | ansible.netcommon.ipaddr('network/prefix') }}
'192.168.0.0/24'

```
 IP address conversion
---------------------

 Here’s our test list again:

 
```
# Example list of values
test_list = ['192.24.2.1', 'host.fqdn', '::1', '192.168.32.0/24', 'fe80::100/10', True, '', '42540766412265424405338506004571095040/64']

```
 You can convert IPv4 addresses into IPv6 addresses:

 
```
# {{ test_list | ansible.netcommon.ipv4('ipv6') }}
['::ffff:192.24.2.1/128', '::ffff:192.168.32.0/120']

```
 Converting from IPv6 to IPv4 works very rarely:

 
```
# {{ test_list | ansible.netcommon.ipv6('ipv4') }}
['0.0.0.1/32']

```
 But we can make a double conversion if needed:

 
```
# {{ test_list | ansible.netcommon.ipaddr('ipv6') | ansible.netcommon.ipaddr('ipv4') }}
['192.24.2.1/32', '0.0.0.1/32', '192.168.32.0/24']

```
 You can convert IP addresses to integers, the same way that you can convert integers into IP addresses:

 
```
# {{ test_list | ansible.netcommon.ipaddr('address') | ansible.netcommon.ipaddr('int') }}
[3222798849, 1, '3232243712/24', '338288524927261089654018896841347694848/10', '42540766412265424405338506004571095040/64']

```
 You can convert IPv4 address to [Hexadecimal notation](https://en.wikipedia.org/wiki/Hexadecimal) with optional delimiter:

 
```
# {{ '192.168.1.5' | ansible.netcommon.ip4_hex }}
c0a80105
# {{ '192.168.1.5' | ansible.netcommon.ip4_hex(':') }}
c0:a8:01:05

```
 You can convert IP addresses to PTR records:

 
```
# {% for address in test_list | ansible.netcommon.ipaddr %}
# {{ address | ansible.netcommon.ipaddr('revdns') }}
# {% endfor %}
1.2.24.192.in-addr.arpa.
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa.
0.32.168.192.in-addr.arpa.
0.0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa.
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.a.a.f.c.2.3.0.8.b.d.0.1.0.0.2.ip6.arpa.

```
 Converting IPv4 address to a 6to4 address
-----------------------------------------

 A [6to4](https://en.wikipedia.org/wiki/6to4) tunnel is a way to access the IPv6 Internet from an IPv4-only network. If you have a public IPv4 address, you can automatically configure its IPv6 equivalent in the `2002::/16` network range. After conversion you will gain access to a `2002:xxxx:xxxx::/48` subnet which could be split into 65535 `/64` subnets if needed.

 To convert your IPv4 address, just send it through the `'6to4'` filter. It will be automatically converted to a router address (with a `::1/48` host address):

 
```
# {{ '193.0.2.0' | ansible.netcommon.ipaddr('6to4') }}
2002:c100:0200::1/48

```
 Finding IP addresses within a range
-----------------------------------

 To find usable IP addresses within an IP range, try these `ipaddr` filters:

 To find the next usable IP address in a range, use `next_usable`

 
```
# {{ '192.168.122.1/24' | ansible.netcommon.ipaddr('next_usable') }}
192.168.122.2

```
 To find the last usable IP address from a range, use `last_usable`:

 
```
# {{ '192.168.122.1/24' | ansible.netcommon.ipaddr('last_usable') }}
192.168.122.254

```
 To find the available range of IP addresses from the given network address, use `range_usable`:

 
```
# {{ '192.168.122.1/24' | ansible.netcommon.ipaddr('range_usable') }}
192.168.122.1-192.168.122.254

```
 To find the peer IP address for a point to point link, use `peer`:

 
```
# {{ '192.168.122.1/31' | ansible.netcommon.ipaddr('peer') }}
192.168.122.0
# {{ '192.168.122.1/30' | ansible.netcommon.ipaddr('peer') }}
192.168.122.2

```
 To return the nth ip from a network, use the filter `nthhost`:

 
```
# {{ '10.0.0.0/8' | ansible.netcommon.nthhost(305) }}
10.0.1.49

```
 `nthhost` also supports a negative value:

 
```
# {{ '10.0.0.0/8' | ansible.netcommon.nthhost(-1) }}
10.255.255.255

```
 To find the next nth usable IP address in relation to another within a range, use `next_nth_usable` In the example, `next_nth_usable` returns the second usable IP address for the given IP range:

 
```
# {{ '192.168.122.1/24' | ansible.netcommon.next_nth_usable(2) }}
192.168.122.3

```
 If there is no usable address, it returns an empty string:

 
```
# {{ '192.168.122.254/24' | ansible.netcommon.next_nth_usable(2) }}
""

```
 Just like `next_nth_ansible`, you have `previous_nth_usable` to find the previous usable address:

 
```
# {{ '192.168.122.10/24' | ansible.netcommon.previous_nth_usable(2) }}
192.168.122.8

```
 Testing if a address belong to a network range
----------------------------------------------

 The `network_in_usable` filter returns whether an address passed as an argument is usable in a network. Usable addresses are addresses that can be assigned to a host. The network ID and the broadcast address are not usable addresses.:

 
```
# {{ '192.168.0.0/24' | ansible.netcommon.network_in_usable( '192.168.0.1' ) }}
True

# {{ '192.168.0.0/24' | ansible.netcommon.network_in_usable( '192.168.0.255' ) }}
False

# {{ '192.168.0.0/16' | ansible.netcommon.network_in_usable( '192.168.0.255' ) }}
True

```
 The `network_in_network` filter returns whether an address or a network passed as argument is in a network.:

 
```
# {{ '192.168.0.0/24' | ansible.netcommon.network_in_network( '192.168.0.1' ) }}
True

# {{ '192.168.0.0/24' | ansible.netcommon.network_in_network( '192.168.0.0/24' ) }}
True

# {{ '192.168.0.0/24' | ansible.netcommon.network_in_network( '192.168.0.255' ) }}
True

# Check in a network is part of another network
# {{ '192.168.0.0/16' | ansible.netcommon.network_in_network( '192.168.0.0/24' ) }}
True

```
 To check whether multiple addresses belong to a network, use the `reduce_on_network` filter:

 
```
# {{ ['192.168.0.34', '10.3.0.3', '192.168.2.34'] | ansible.netcommon.reduce_on_network( '192.168.0.0/24' ) }}
['192.168.0.34']

```
 IP Math
-------

  New in version 2.7.

  The `ipmath()` filter can be used to do simple IP math/arithmetic.

 Here are a few simple examples:

 
```
# Get the next five addresses based on an IP address
# {{ '192.168.1.5' | ansible.netcommon.ipmath(5) }}
192.168.1.10

# Get the ten previous addresses based on an IP address
# {{ '192.168.0.5' | ansible.netcommon.ipmath(-10) }}
192.167.255.251

# Get the next five addresses using CIDR notation
# {{ '192.168.1.1/24' | ansible.netcommon.ipmath(5) }}
192.168.1.6

# Get the previous five addresses using CIDR notation
# {{ '192.168.1.6/24' | ansible.netcommon.ipmath(-5) }}
192.168.1.1

# Get the previous ten address using cidr notation
# It returns a address of the previous network range
# {{ '192.168.2.6/24' | ansible.netcommon.ipmath(-10) }}
192.168.1.252

# Get the next ten addresses in IPv6
# {{ '2001::1' | ansible.netcommon.ipmath(10) }}
2001::b

# Get the previous ten address in IPv6
# {{ '2001::5' | ansible.netcommon.ipmath(-10) }}
2000:ffff:ffff:ffff:ffff:ffff:ffff:fffb

```
 Subnet manipulation
-------------------

 The `ipsubnet()` filter can be used to manipulate network subnets in several ways.

 Here is an example IP address and subnet:

 
```
address = '192.168.144.5'
subnet  = '192.168.0.0/16'

```
 To check if a given string is a subnet, pass it through the filter without any arguments. If the given string is an IP address, it will be converted into a subnet:

 
```
# {{ address | ansible.netcommon.ipsubnet }}
192.168.144.5/32

# {{ subnet | ansible.netcommon.ipsubnet }}
192.168.0.0/16

```
 If you specify a subnet size as the first parameter of the `ipsubnet()` filter, and the subnet size is **smaller than the current one**, you will get the number of subnets a given subnet can be split into:

 
```
# {{ subnet | ansible.netcommon.ipsubnet(20) }}
16

```
 The second argument of the `ipsubnet()` filter is an index number; by specifying it you can get a new subnet with the specified size:

 
```
# First subnet
# {{ subnet | ansible.netcommon.ipsubnet(20, 0) }}
192.168.0.0/20

# Last subnet
# {{ subnet | ansible.netcommon.ipsubnet(20, -1) }}
192.168.240.0/20

# Fifth subnet
# {{ subnet | ansible.netcommon.ipsubnet(20, 5) }}
192.168.80.0/20

# Fifth to last subnet
# {{ subnet | ansible.netcommon.ipsubnet(20, -5) }}
192.168.176.0/20

```
 If you specify an IP address instead of a subnet, and give a subnet size as the first argument, the `ipsubnet()` filter will instead return the biggest subnet that contains that given IP address:

 
```
# {{ address | ansible.netcommon.ipsubnet(20) }}
192.168.144.0/20

```
 By specifying an index number as a second argument, you can select smaller and smaller subnets:

 
```
# First subnet
# {{ address | ansible.netcommon.ipsubnet(18, 0) }}
192.168.128.0/18

# Last subnet
# {{ address | ansible.netcommon.ipsubnet(18, -1) }}
192.168.144.4/31

# Fifth subnet
# {{ address | ansible.netcommon.ipsubnet(18, 5) }}
192.168.144.0/23

# Fifth to last subnet
# {{ address | ansible.netcommon.ipsubnet(18, -5) }}
192.168.144.0/27

```
 By specifying another subnet as a second argument, if the second subnet includes the first, you can determine the rank of the first subnet in the second

 
```
# The rank of the IP in the subnet (the IP is the 36870nth /32 of the subnet)
# {{ address | ansible.netcommon.ipsubnet(subnet) }}
36870

# The rank in the /24 that contain the address
# {{ address | ansible.netcommon.ipsubnet('192.168.144.0/24') }}
6

# An IP with the subnet in the first /30 in a /24
# {{ '192.168.144.1/30' | ansible.netcommon.ipsubnet('192.168.144.0/24') }}
1

# The fifth subnet /30 in a /24
# {{ '192.168.144.16/30' | ansible.netcommon.ipsubnet('192.168.144.0/24') }}
5

```
 If the second subnet doesn’t include the first subnet, the `ipsubnet()` filter raises an error.

 You can use the `ipsubnet()` filter with the `ipaddr()` filter to, for example, split a given `/48` prefix into smaller `/64` subnets:

 
```
# {{ '193.0.2.0' | ansible.netcommon.ipaddr('6to4') | ipsubnet(64, 58820) | ansible.netcommon.ipaddr('1') }}
2002:c100:200:e5c4::1/64

```
 Because of the size of IPv6 subnets, iteration over all of them to find the correct one may take some time on slower computers, depending on the size difference between the subnets.

 Subnet Merging
--------------

  New in version 2.6.

  The `cidr_merge()` filter can be used to merge subnets or individual addresses into their minimal representation, collapsing overlapping subnets and merging adjacent ones wherever possible:

 
```
{{ ['192.168.0.0/17', '192.168.128.0/17', '192.168.128.1' ] | cidr_merge }}
# => ['192.168.0.0/16']

{{ ['192.168.0.0/24', '192.168.1.0/24', '192.168.3.0/24'] | cidr_merge }}
# => ['192.168.0.0/23', '192.168.3.0/24']

```
 Changing the action from ‘merge’ to ‘span’ will instead return the smallest subnet which contains all of the inputs:

 
```
{{ ['192.168.0.0/24', '192.168.3.0/24'] | ansible.netcommon.cidr_merge('span') }}
# => '192.168.0.0/22'

{{ ['192.168.1.42', '192.168.42.1'] | ansible.netcommon.cidr_merge('span') }}
# => '192.168.0.0/18'

```
 MAC address filter
------------------

 You can use the `hwaddr()` filter to check if a given string is a MAC address or convert it between various formats. Examples:

 
```
# Example MAC address
macaddress = '1a:2b:3c:4d:5e:6f'

# Check if given string is a MAC address
# {{ macaddress | ansible.netcommon.hwaddr }}
1a:2b:3c:4d:5e:6f

# Convert MAC address to PostgreSQL format
# {{ macaddress | ansible.netcommon.hwaddr('pgsql') }}
1a2b3c:4d5e6f

# Convert MAC address to Cisco format
# {{ macaddress | ansible.netcommon.hwaddr('cisco') }}
1a2b.3c4d.5e6f

```
 The supported formats result in the following conversions for the `1a:2b:3c:4d:5e:6f` MAC address:

 
```
bare: 1A2B3C4D5E6F
bool: True
int: 28772997619311
cisco: 1a2b.3c4d.5e6f
eui48 or win: 1A-2B-3C-4D-5E-6F
linux or unix: 1a:2b:3c:4d:5e:6f:
pgsql, postgresql, or psql: 1a2b3c:4d5e6f

```
 Generate an IPv6 address in Stateless Configuration (SLAAC)
-----------------------------------------------------------

 the filter `slaac()` generates an IPv6 address for a given network and a MAC Address in Stateless Configuration:

 
```
# {{ 'fdcf:1894:23b5:d38c:0000:0000:0000:0000' | slaac('c2:31:b3:83:bf:2b') }}
fdcf:1894:23b5:d38c:c031:b3ff:fe83:bf2b

```
  See also

  [ansible.netcommon](https://galaxy.ansible.com/ansible/netcommon)

Ansible network collection for common code

  [Intro to playbooks](playbooks_intro#about-playbooks)

An introduction to playbooks

  [Using filters to manipulate data](playbooks_filters#playbooks-filters)

Introduction to Jinja2 filters and their uses

  [Conditionals](playbooks_conditionals#playbooks-conditionals)

Conditional statements in playbooks

  [Using Variables](playbooks_variables#playbooks-variables)

All about variables

  [Loops](playbooks_loops#playbooks-loops)

Looping in playbooks

  [Roles](playbooks_reuse_roles#playbooks-reuse-roles)

Playbook organization by roles

  [Tips and tricks](playbooks_best_practices#playbooks-best-practices)

Tips and tricks for playbooks

  [User Mailing List](https://groups.google.com/group/ansible-devel)

Have a question? Stop by the google group!

  [irc.libera.chat](https://libera.chat/)

#ansible IRC chat channel

   

 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters_ipaddr.html>

amazon.aws.s3\_bucket – Manage S3 buckets in AWS, DigitalOcean, Ceph, Walrus, FakeS3 and StorageGRID
====================================================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.s3_bucket`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * Manage S3 buckets in AWS, DigitalOcean, Ceph, Walrus, FakeS3 and StorageGRID.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **ceph**  boolean  | **Choices:*** **no** ←
* yes
 | Enable API compatibility with Ceph. It takes into account the S3 API subset working with Ceph in order to provide the same module behaviour where possible. |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **delete\_public\_access**  boolean   added in 1.3.0 of amazon.aws  | **Choices:*** **no** ←
* yes
 | Delete public access block configuration from bucket. This option cannot be used together with a *public\_access* definition. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **encryption**  string  | **Choices:*** none
* AES256
* aws:kms
 | Describes the default server-side encryption to apply to new objects in the bucket. In order to remove the server-side encryption, the encryption needs to be set to 'none' explicitly. |
| **encryption\_key\_id**  string  |  | KMS master key ID to use for the default encryption. This parameter is allowed if *encryption* is `aws:kms`. If not specified then it will default to the AWS provided KMS key. |
| **force**  boolean  | **Choices:*** **no** ←
* yes
 | When trying to delete a bucket, delete all keys (including versions and delete markers) in the bucket first (an S3 bucket must be empty for a successful deletion). |
| **name**  string / required  |  | Name of the S3 bucket. |
| **policy**  json  |  | The JSON policy as a string. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **public\_access**  dictionary   added in 1.3.0 of amazon.aws  |  | Configure public access block for S3 bucket. This option cannot be used together with *delete\_public\_access*. |
|  | **block\_public\_acls**  boolean  | **Choices:*** **no** ←
* yes
 | Sets BlockPublicAcls value. |
|  | **block\_public\_policy**  boolean  | **Choices:*** **no** ←
* yes
 | Sets BlockPublicPolicy value. |
|  | **ignore\_public\_acls**  boolean  | **Choices:*** **no** ←
* yes
 | Sets IgnorePublicAcls value. |
|  | **restrict\_public\_buckets**  boolean  | **Choices:*** **no** ←
* yes
 | Sets RestrictPublicAcls value. |
| **purge\_tags**  boolean  | **Choices:*** no
* **yes** ←
 | Whether to remove tags that aren't present in the *tags* parameter. |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **requester\_pays**  boolean  | **Choices:*** no
* yes
 | With Requester Pays buckets, the requester instead of the bucket owner pays the cost of the request and the data download from the bucket. |
| **s3\_url**  string  |  | S3 URL endpoint for usage with DigitalOcean, Ceph, Eucalyptus and FakeS3 etc. Assumes AWS if not specified. For Walrus, use FQDN of the endpoint without scheme nor path. 
aliases: S3\_URL |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **state**  string  | **Choices:*** **present** ←
* absent
 | Create or remove the S3 bucket. |
| **tags**  dictionary  |  | Tags dict to apply to bucket. |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |
| **versioning**  boolean  | **Choices:*** no
* yes
 | Whether versioning is enabled or disabled (note that once versioning is enabled, it can only be suspended). |

   
 Notes
-----

  Note

 * If `requestPayment`, `policy`, `tagging` or `versioning` operations/API aren’t implemented by the endpoint, module doesn’t fail if each parameter satisfies the following condition. *requester\_pays* is `False`, *policy*, *tags*, and *versioning* are `None`.
* If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

# Create a simple S3 bucket
- amazon.aws.s3_bucket:
    name: mys3bucket
    state: present

# Create a simple S3 bucket on Ceph Rados Gateway
- amazon.aws.s3_bucket:
    name: mys3bucket
    s3_url: http://your-ceph-rados-gateway-server.xxx
    ceph: true

# Remove an S3 bucket and any keys it contains
- amazon.aws.s3_bucket:
    name: mys3bucket
    state: absent
    force: yes

# Create a bucket, add a policy from a file, enable requester pays, enable versioning and tag
- amazon.aws.s3_bucket:
    name: mys3bucket
    policy: "{{ lookup('file','policy.json') }}"
    requester_pays: yes
    versioning: yes
    tags:
      example: tag1
      another: tag2

# Create a simple DigitalOcean Spaces bucket using their provided regional endpoint
- amazon.aws.s3_bucket:
    name: mydobucket
    s3_url: 'https://nyc3.digitaloceanspaces.com'

# Create a bucket with AES256 encryption
- amazon.aws.s3_bucket:
    name: mys3bucket
    state: present
    encryption: "AES256"

# Create a bucket with aws:kms encryption, KMS key
- amazon.aws.s3_bucket:
    name: mys3bucket
    state: present
    encryption: "aws:kms"
    encryption_key_id: "arn:aws:kms:us-east-1:1234/5678example"

# Create a bucket with aws:kms encryption, default key
- amazon.aws.s3_bucket:
    name: mys3bucket
    state: present
    encryption: "aws:kms"

# Create a bucket with public policy block configuration
- amazon.aws.s3_bucket:
    name: mys3bucket
    state: present
    public_access:
        block_public_acls: true
        ignore_public_acls: true
        ## keys == 'false' can be ommited, undefined keys defaults to 'false'
        # block_public_policy: false
        # restrict_public_buckets: false

# Delete public policy block from bucket
- amazon.aws.s3_bucket:
    name: mys3bucket
    state: present
    delete_public_access: true

```
 ### Authors

 * Rob White (@wimnat)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/s3_bucket_module.html>

chocolatey.chocolatey.win\_chocolatey\_source – Manages Chocolatey sources
==========================================================================

  Note

 This plugin is part of the [chocolatey.chocolatey collection](https://galaxy.ansible.com/chocolatey/chocolatey) (version 1.1.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install chocolatey.chocolatey`.

 To use it in a playbook, specify: `chocolatey.chocolatey.win_chocolatey_source`.

   New in version 0.2.7: of chocolatey.chocolatey

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Used to managed Chocolatey sources configured on the client.
* Requires Chocolatey to be already installed on the remote host.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **admin\_only**  boolean  | **Choices:*** no
* yes
 | Makes the source visible to Administrators only. Requires Chocolatey >= 0.10.8. When creating a new source, this defaults to `no`. |
| **allow\_self\_service**  boolean  | **Choices:*** no
* yes
 | Allow the source to be used with self-service Requires Chocolatey >= 0.10.4. When creating a new source, this defaults to `no`. |
| **bypass\_proxy**  boolean  | **Choices:*** no
* yes
 | Bypass the proxy when using this source. Requires Chocolatey >= 0.10.4. When creating a new source, this defaults to `no`. |
| **certificate**  string  |  | The path to a .pfx file to use for X509 authenticated feeds. Requires Chocolatey >= 0.9.10. |
| **certificate\_password**  string  |  | The password for *certificate* if required. Requires Chocolatey >= 0.9.10. |
| **name**  string / required  |  | The name of the source to configure. |
| **priority**  integer  |  | The priority order of this source compared to other sources, lower is better. All priorities above `0` will be evaluated first, then zero-based values will be evaluated in config file order. Requires Chocolatey >= 0.9.9.9. When creating a new source, this defaults to `0`. |
| **source**  string  |  | The file/folder/url of the source. Required when *state* is `present` or `disabled` and the source does not already exist. |
| **source\_password**  string  |  | The password for *source\_username*. Required if *source\_username* is set. |
| **source\_username**  string  |  | The username used to access *source*. |
| **state**  string  | **Choices:*** absent
* disabled
* **present** ←
 | When `absent`, will remove the source. When `disabled`, will ensure the source exists but is disabled. When `present`, will ensure the source exists and is enabled. |
| **update\_password**  string  | **Choices:*** **always** ←
* on\_create
 | When `always`, the module will always set the password and report a change if *certificate\_password* or *source\_password* is set. When `on_create`, the module will only set the password if the source is being created. |

   
 See Also
--------

  See also

  M(win\_chocolatey)

The official documentation on the **win\_chocolatey** module.

  M(win\_chocolatey\_config)

The official documentation on the **win\_chocolatey\_config** module.

  M(win\_chocolatey\_facts)

The official documentation on the **win\_chocolatey\_facts** module.

  M(win\_chocolatey\_feature)

The official documentation on the **win\_chocolatey\_feature** module.

    Examples
--------

 
```
- name: Remove the default public source
  win_chocolatey_source:
    name: chocolatey
    state: absent

- name: Add new internal source
  win_chocolatey_source:
    name: internal repo
    state: present
    source: http://chocolatey-server/chocolatey

- name: Create HTTP source with credentials
  win_chocolatey_source:
    name: internal repo
    state: present
    source: https://chocolatey-server/chocolatey
    source_username: username
    source_password: password

- name: Disable Chocolatey source
  win_chocolatey_source:
    name: chocolatey
    state: disabled

```
 ### Authors

 * Jordan Borean (@jborean93)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/chocolatey/chocolatey/win_chocolatey_source_module.html>

ansible.builtin.inventory\_hostnames – list of inventory hosts matching a host pattern
======================================================================================

  Note

 This lookup plugin is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short plugin name `inventory_hostnames` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same lookup plugin name.

   New in version 1.3: of ansible.builtin

  * [Synopsis](#synopsis)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * This lookup understands ‘host patterns’ as used by the `hosts:` keyword in plays and can return a list of matching hosts from inventory

 Notes
-----

  Note

 * this is only worth for ‘hostname patterns’ it is easier to loop over the group/group\_names variables otherwise.

  Examples
--------

 
```
- name: show all the hosts matching the pattern, i.e. all but the group www
  debug:
    msg: "{{ item }}"
  with_inventory_hostnames:
    - all:!www

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:

 

| Key | Returned | Description |
| --- | --- | --- |
| **\_hostnames**  list / elements=string  | success | list of hostnames that matched the host pattern in inventory  |

   
  
 ### Authors

 * Michael DeHaan
* Steven Dossett (!UNKNOWN) <[sdossett@panath.com](https://docs.ansible.com/cdn-cgi/l/email-protection#c2b1a6adb1b1a7b6b6e4e1f1f5f9e4e1f7f0f9e4e1f6faf9b2a3aca3b6aae4e1f6f4f9a1adaf)>



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/inventory_hostnames_lookup.html>

ansible.builtin.linear – Executes tasks in a linear fashion
===========================================================

  Note

 This strategy plugin is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short plugin name `linear` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same strategy plugin name.

   New in version 2.0: of ansible.builtin

  * [Synopsis](#synopsis)
* [Notes](#notes)

 Synopsis
--------

 * Task execution is in lockstep per host batch as defined by `serial` (default all). Up to the fork limit of hosts will execute each task at the same time and then the next series of hosts until the batch is done, before going on to the next task.

 Notes
-----

  Note

 * This was the default Ansible behaviour before ‘strategy plugins’ were introduced in 2.0.

  ### Authors

 * Ansible Core Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/linear_strategy.html>

ansible.builtin.debug – Executes tasks in interactive debug session.
====================================================================

  Note

 This strategy plugin is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short plugin name `debug` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same strategy plugin name.

   New in version 2.1: of ansible.builtin

  Synopsis
--------

 * Task execution is ‘linear’ but controlled by an interactive debug session.

 ### Authors

 * Kishin Yagami (!UNKNOWN)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/debug_strategy.html>

ansible.builtin.free – Executes tasks without waiting for all hosts
===================================================================

  Note

 This strategy plugin is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short plugin name `free` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same strategy plugin name.

   New in version 2.0: of ansible.builtin

  Synopsis
--------

 * Task execution is as fast as possible per batch as defined by `serial` (default all). Ansible will not wait for other hosts to finish the current task before queuing more tasks for other hosts. All hosts are still attempted for the current task, but it prevents blocking new tasks for hosts that have already finished.
* With the free strategy, unlike the default linear strategy, a host that is slow or stuck on a specific task won’t hold up the rest of the hosts and tasks.

 ### Authors

 * Ansible Core Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/free_strategy.html>

ansible.builtin.async\_status – Obtain status of asynchronous task
==================================================================

  Note

 This module is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short module name `async_status` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

   New in version 0.5: of ansible.builtin

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * This module gets the status of an asynchronous task.
* This module is also supported for Windows targets.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **jid**  string / required  |  | Job or task identifier |
| **mode**  string  | **Choices:*** cleanup
* **status** ←
 | If `status`, obtain the status. If `cleanup`, clean up the async job cache (by default in `~/.ansible_async/`) for the specified job *jid*. |

   
 Notes
-----

  Note

 * This module is also supported for Windows targets.

  See Also
--------

  See also

  [Asynchronous actions and polling](../../../user_guide/playbooks_async#playbooks-async)

Detailed information on how to use asynchronous actions and polling.

    Examples
--------

 
```
---
- name: Asynchronous yum task
  yum:
    name: docker-io
    state: present
  async: 1000
  poll: 0
  register: yum_sleeper

- name: Wait for asynchronous job to end
  async_status:
    jid: '{{ yum_sleeper.ansible_job_id }}'
  register: job_result
  until: job_result.finished
  retries: 100
  delay: 10

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_job\_id**  string  | success | The asynchronous job id  **Sample:** 360874038559.4169 |
| **finished**  integer  | success | Whether the asynchronous job has finished (`1`) or not (`0`)  **Sample:** 1 |
| **started**  integer  | success | Whether the asynchronous job has started (`1`) or not (`0`)  **Sample:** 1 |

   
  
 ### Authors

 * Ansible Core Team
* Michael DeHaan



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/async_status_module.html>

ansible.builtin.host\_group\_vars – In charge of loading group\_vars and host\_vars
===================================================================================

  Note

 This vars plugin is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short plugin name `host_group_vars` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same vars plugin name.

   New in version 2.4: of ansible.builtin

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)

 Synopsis
--------

 * Loads YAML vars into corresponding groups/hosts in group\_vars/ and host\_vars/ directories.
* Files are restricted by extension to one of .yaml, .json, .yml or no extension.
* Hidden (starting with ‘.’) and backup (ending with ‘~’) files and directories are ignored.
* Only applies to inventory sources that are existing paths.
* Starting in 2.10, this plugin requires whitelisting and is whitelisted by default.

 Requirements
------------

 The below requirements are needed on the local controller node that executes this vars.

 * whitelist in configuration

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_valid\_extensions**  list / elements=string  | **Default:**[".yml", ".yaml", ".json"] |  ini entries:  [yaml\_valid\_extensions]defaults = ['.yml', '.yaml', '.json']    env:ANSIBLE\_YAML\_FILENAME\_EXT  | Check all of these extensions when looking for 'variable' files which should be YAML or JSON or vaulted versions of these. This affects vars\_files, include\_vars, inventory and vars plugins among others. |
| **stage**  string   added in 2.10 of ansible.builtin  | **Choices:*** all
* task
* inventory
 |  ini entries:  [vars\_host\_group\_vars]stage = None    env:ANSIBLE\_VARS\_PLUGIN\_STAGE  | Control when this vars plugin may be executed. Setting this option to `all` will run the vars plugin after importing inventory and whenever it is demanded by a task. Setting this option to `task` will only run the vars plugin whenever it is demanded by a task. Setting this option to `inventory` will only run the vars plugin after parsing inventory. If this option is omitted, the global *RUN\_VARS\_PLUGINS* configuration is used to determine when to execute the vars plugin. |

   


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/host_group_vars_vars.html>

arista.eos.eos\_vrf – Manage VRFs on Arista EOS network devices
===============================================================

  Note

 This plugin is part of the [arista.eos collection](https://galaxy.ansible.com/arista/eos) (version 2.2.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install arista.eos`.

 To use it in a playbook, specify: `arista.eos.eos_vrf`.

   New in version 1.0.0: of arista.eos

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * This module provides declarative management of VRFs on Arista EOS network devices.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate**  list / elements=dictionary  |  | List of VRFs definitions |
|  | **associated\_interfaces**  list / elements=string  |  | This is a intent option and checks the operational state of the for given vrf `name` for associated interfaces. If the value in the `associated_interfaces` does not match with the operational state of vrf interfaces on device it will result in failure. |
|  | **delay**  integer  | **Default:**10 | Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state arguments. |
|  | **interfaces**  list / elements=string  |  | Identifies the set of interfaces that should be configured in the VRF. Interfaces must be routed interfaces in order to be placed into a VRF. The name of interface should be in expanded format and not abbreviated. |
|  | **name**  string / required  |  | Name of the VRF. |
|  | **rd**  string  |  | Route distinguisher of the VRF |
|  | **state**  string  | **Choices:*** **present** ←
* absent
 | State of the VRF configuration. |
| **associated\_interfaces**  list / elements=string  |  | This is a intent option and checks the operational state of the for given vrf `name` for associated interfaces. If the value in the `associated_interfaces` does not match with the operational state of vrf interfaces on device it will result in failure. |
| **delay**  integer  | **Default:**10 | Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state arguments. |
| **interfaces**  list / elements=string  |  | Identifies the set of interfaces that should be configured in the VRF. Interfaces must be routed interfaces in order to be placed into a VRF. The name of interface should be in expanded format and not abbreviated. |
| **name**  string  |  | Name of the VRF. |
| **provider**  dictionary  |  | **Deprecated** Starting with Ansible 2.5 we recommend using `connection: network_cli`. Starting with Ansible 2.6 we recommend using `connection: httpapi` for eAPI. This option will be removed in a release after 2022-06-01. For more information please see the [EOS Platform Options guide](../network/user_guide/platform_eos). A dict object containing connection details. |
|  | **auth\_pass**  string  |  | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
|  | **authorize**  boolean  | **Choices:*** **no** ←
* yes
 | Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
|  | **host**  string  |  | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
|  | **password**  string  |  | Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either *cli* or *eapi* transports. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
|  | **port**  integer  | **Default:**0 | Specifies the port to use when building the connection to the remote device. This value applies to either *cli* or *eapi*. The port value will default to the appropriate transport common port if none is provided in the task (cli=22, http=80, https=443). |
|  | **ssh\_keyfile**  path  |  | Specifies the SSH keyfile to use to authenticate the connection to the remote device. This argument is only used for *cli* transports. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
|  | **timeout**  integer  |  | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
|  | **transport**  string  | **Choices:*** **cli** ←
* eapi
 | Configures the transport connection to use when connecting to the remote device. |
|  | **use\_proxy**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, the environment variables `http_proxy` and `https_proxy` will be ignored. |
|  | **use\_ssl**  boolean  | **Choices:*** no
* **yes** ←
 | Configures the *transport* to use SSL if set to `yes` only when the `transport=eapi`. If the transport argument is not eapi, this value is ignored. |
|  | **username**  string  |  | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the eAPI authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
|  | **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not eapi, this value is ignored. |
| **purge**  boolean  | **Choices:*** **no** ←
* yes
 | Purge VRFs not defined in the *aggregate* parameter. |
| **rd**  string  |  | Route distinguisher of the VRF |
| **state**  string  | **Choices:*** **present** ←
* absent
 | State of the VRF configuration. |

   
 Notes
-----

  Note

 * Tested against EOS 4.15
* For information on using CLI, eAPI and privileged mode see the [EOS Platform Options guide](../../../network/user_guide/platform_eos#eos-platform-options)
* For more information on using Ansible to manage network devices see the [Ansible Network Guide](../../../network/index#network-guide)
* For more information on using Ansible to manage Arista EOS devices see the [Arista integration page](https://www.ansible.com/ansible-arista-networks).

  Examples
--------

 
```
- name: Create vrf
  arista.eos.eos_vrf:
    name: test
    rd: 1:200
    interfaces:
    - Ethernet2
    state: present

- name: Delete VRFs
  arista.eos.eos_vrf:
    name: test
    state: absent

- name: Create aggregate of VRFs with purge
  arista.eos.eos_vrf:
    aggregate:
    - name: test4
      rd: 1:204
    - name: test5
      rd: 1:205
    state: present
    purge: yes

- name: Delete aggregate of VRFs
  arista.eos.eos_vrf:
    aggregate:
    - name: test2
    - name: test3
    - name: test4
    - name: test5
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always | The list of configuration mode commands to send to the device  **Sample:** ['vrf definition test', 'rd 1:100', 'interface Ethernet1', 'vrf forwarding test'] |

   
  
 ### Authors

 * Ricardo Carrillo Cruz (@rcarrillocruz)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/arista/eos/eos_vrf_module.html>

azure.azcollection.azure\_rm\_webappvnetconnection\_info – Get Azure web app virtual network connection facts
=============================================================================================================

  Note

 This plugin is part of the [azure.azcollection collection](https://galaxy.ansible.com/azure/azcollection) (version 1.10.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install azure.azcollection`.

 To use it in a playbook, specify: `azure.azcollection.azure_rm_webappvnetconnection_info`.

   New in version 1.8.0: of azure.azcollection

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Get facts for a web app’s virtual network connection.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * python >= 2.7
* The host that executes this module must have the azure.azcollection collection installed via galaxy
* All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection
* Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection>

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **ad\_user**  string  |  | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. |
| **adfs\_authority\_url**  string   added in 0.0.1 of azure.azcollection  |  | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. |
| **api\_profile**  string   added in 0.0.1 of azure.azcollection  | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. |
| **auth\_source**  string   added in 0.0.1 of azure.azcollection  | **Choices:*** **auto** ←
* cli
* credential\_file
* env
* msi
 | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. |
| **cert\_validation\_mode**  string   added in 0.0.1 of azure.azcollection  | **Choices:*** ignore
* validate
 | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. |
| **client\_id**  string  |  | Azure client ID. Use when authenticating with a Service Principal. |
| **cloud\_environment**  string   added in 0.0.1 of azure.azcollection  | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. |
| **log\_mode**  string  |  | Parent argument. |
| **log\_path**  string  |  | Parent argument. |
| **name**  string / required  |  | Name of the web app. |
| **password**  string  |  | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. |
| **profile**  string  |  | Security profile found in ~/.azure/credentials file. |
| **resource\_group**  string / required  |  | Resource group of the web app. |
| **secret**  string  |  | Azure client secret. Use when authenticating with a Service Principal. |
| **subscription\_id**  string  |  | Your Azure subscription Id. |
| **tenant**  string  |  | Azure tenant ID. Use when authenticating with a Service Principal. |

   
 Notes
-----

  Note

 * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`.
* Authentication is also possible using a service principal or Active Directory user.
* To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT.
* To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment.
* Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment.

  See Also
--------

  See also

  [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest)

How to authenticate using the `az login` command.

    Examples
--------

 
```
- name: Get web app virtual network connection
  azure_rm_webappvnetconnection_info:
    name: "MyWebapp"
    resource_group: "MyResourceGroup"

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **connection**  complex  | always | The web app's virtual network connection.  |
|  | **id**  string  | always | ID of the web app virtual network connection.  **Sample:** /subscriptions/xxx-xxx/resourceGroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp/virtualNetworkConnections/yyy-yyy\_subnet |
|  | **name**  string  | always | Name of the web app virtual network connection.  **Sample:** yyy-yyy\_subnet |
|  | **subnet\_name**  string  | always | Name of the subnet connected to the web app.  **Sample:** mySubnet |
|  | **vnet\_name**  string  | always | Name of the virtual network connected to the web app.  **Sample:** myVnet |
|  | **vnet\_resource\_group**  string  | always | Name of the resource group the virtual network is in.  **Sample:** myResourceGroup |
|  | **vnet\_resource\_id**  string  | always | ID of the virtual network/subnet connected to the web app.  **Sample:** /subscriptions/xxx-xxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet |

   
  
 ### Authors

 * Ross Bender (@l3ender)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/azure/azcollection/azure_rm_webappvnetconnection_info_module.html>

ansible.windows.win\_whoami – Get information about the current user and process
================================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_whoami`.

  * [Synopsis](#synopsis)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Designed to return the same information as the `whoami /all` command.
* Also includes information missing from `whoami` such as logon metadata like logon rights, id, type.

 Notes
-----

  Note

 * If running this module with a non admin user, the logon rights will be an empty list as Administrator rights are required to query LSA for the information.

  See Also
--------

  See also

  [community.windows.win\_credential](../../community/windows/win_credential_module#ansible-collections-community-windows-win-credential-module)

The official documentation on the **community.windows.win\_credential** module.

  [ansible.windows.win\_group\_membership](win_group_membership_module#ansible-collections-ansible-windows-win-group-membership-module)

The official documentation on the **ansible.windows.win\_group\_membership** module.

  [ansible.windows.win\_user\_right](win_user_right_module#ansible-collections-ansible-windows-win-user-right-module)

The official documentation on the **ansible.windows.win\_user\_right** module.

    Examples
--------

 
```
- name: Get whoami information
  ansible.windows.win_whoami:

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **account**  complex  | success | The running account SID details.  |
|  | **account\_name**  string  | success | The account name of the account SID.  **Sample:** Administrator |
|  | **domain\_name**  string  | success | The domain name of the account SID.  **Sample:** DOMAIN |
|  | **sid**  string  | success | The SID in string form.  **Sample:** S-1-5-21-1654078763-769949647-2968445802-500 |
|  | **type**  string  | success | The type of SID.  **Sample:** User |
| **authentication\_package**  string  | success | The name of the authentication package used to authenticate the user in the session.  **Sample:** Negotiate |
| **dns\_domain\_name**  string  | success | The DNS name of the logon session, this is an empty string if this is not set.  **Sample:** DOMAIN.COM |
| **groups**  list / elements=string  | success | A list of groups and attributes that the user is a member of.  **Sample:** [{'account\_name': 'Domain Users', 'attributes': ['Mandatory', 'Enabled by default', 'Enabled'], 'domain\_name': 'DOMAIN', 'sid': 'S-1-5-21-1654078763-769949647-2968445802-513', 'type': 'Group'}, {'account\_name': 'Administrators', 'attributes': ['Mandatory', 'Enabled by default', 'Enabled', 'Owner'], 'domain\_name': 'BUILTIN', 'sid': 'S-1-5-32-544', 'type': 'Alias'}] |
| **impersonation\_level**  string  | success | The impersonation level of the token, only valid if `token_type` is `TokenImpersonation`, see <https://msdn.microsoft.com/en-us/library/windows/desktop/aa379572.aspx>.  **Sample:** SecurityAnonymous |
| **label**  complex  | success | The mandatory label set to the logon session.  |
|  | **account\_name**  string  | success | The account name of the label SID.  **Sample:** High Mandatory Level |
|  | **domain\_name**  string  | success | The domain name of the label SID.  **Sample:** Mandatory Label |
|  | **sid**  string  | success | The SID in string form.  **Sample:** S-1-16-12288 |
|  | **type**  string  | success | The type of SID.  **Sample:** Label |
| **login\_domain**  string  | success | The name of the domain used to authenticate the owner of the session.  **Sample:** DOMAIN |
| **login\_time**  string  | success | The logon time in ISO 8601 format  **Sample:** 2017-11-27T06:24:14.3321665+10:00 |
| **logon\_id**  integer  | success | The unique identifier of the logon session.  **Sample:** 20470143 |
| **logon\_server**  string  | success | The name of the server used to authenticate the owner of the logon session.  **Sample:** DC01 |
| **logon\_type**  string  | success | The logon type that identifies the logon method, see <https://msdn.microsoft.com/en-us/library/windows/desktop/aa380129.aspx>.  **Sample:** Network |
| **privileges**  dictionary  | success | A dictionary of privileges and their state on the logon token.  **Sample:** {'SeChangeNotifyPrivileges': 'enabled-by-default', 'SeDebugPrivilege': 'enabled', 'SeRemoteShutdownPrivilege': 'disabled'} |
| **rights**  list / elements=string  | success and running user is a member of the local Administrators group | A list of logon rights assigned to the logon.  **Sample:** ['SeNetworkLogonRight', 'SeInteractiveLogonRight', 'SeBatchLogonRight', 'SeRemoteInteractiveLogonRight'] |
| **token\_type**  string  | success | The token type to indicate whether it is a primary or impersonation token.  **Sample:** TokenPrimary |
| **upn**  string  | success | The user principal name of the current user.  **Sample:** Administrator@DOMAIN.COM |
| **user\_flags**  string  | success | The user flags for the logon session, see UserFlags in <https://msdn.microsoft.com/en-us/library/windows/desktop/aa380128>.  **Sample:** Winlogon |

   
  
 ### Authors

 * Jordan Borean (@jborean93)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_whoami_module.html>

ansible.builtin.ssh – connect via ssh client binary
===================================================

  Note

 This connection plugin is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short plugin name `ssh` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same connection plugin name.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)

 Synopsis
--------

 * This connection plugin allows ansible to communicate to the target machines via normal ssh command line.
* Ansible does not expose a channel to allow communication between the user and the ssh process to accept a password manually to decrypt an ssh key when using this connection plugin (which is the default). The use of `ssh-agent` is highly recommended.

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **control\_path**  string  |  |  ini entries:  [ssh\_connection]control\_path = None    env:ANSIBLE\_SSH\_CONTROL\_PATH   var: ansible\_control\_path  added in 2.7 of ansible.builtin   | This is the location to save ssh's ControlPath sockets, it uses ssh's variable substitution. Since 2.3, if null (default), ansible will generate a unique hash. Use `%(directory)s` to indicate where to use the control dir path setting. Before 2.3 it defaulted to `control\_path=%(directory)s/ansible-ssh-%%h-%%p-%%r`. Be aware that this setting is ignored if `-o ControlPath` is set in ssh args. |
| **control\_path\_dir**  string  | **Default:**"~/.ansible/cp" |  ini entries:  [ssh\_connection]control\_path\_dir = ~/.ansible/cp    env:ANSIBLE\_SSH\_CONTROL\_PATH\_DIR   var: ansible\_control\_path\_dir  added in 2.7 of ansible.builtin   | This sets the directory to use for ssh control path if the control path setting is null. Also, provides the `%(directory)s` variable for the control path setting. |
| **host**  string  |  |  var: inventory\_hostname   var: ansible\_host   var: ansible\_ssh\_host   var: delegated\_vars['ansible\_host']   var: delegated\_vars['ansible\_ssh\_host']  | Hostname/ip to connect to. |
| **host\_key\_checking**  boolean  | **Choices:*** no
* yes
 |  ini entries:  [defaults]host\_key\_checking = None   [ssh\_connection]host\_key\_checking = None 
 added in 2.5 of ansible.builtin    env:ANSIBLE\_HOST\_KEY\_CHECKING   env:ANSIBLE\_SSH\_HOST\_KEY\_CHECKING  added in 2.5 of ansible.builtin    var: ansible\_host\_key\_checking  added in 2.5 of ansible.builtin    var: ansible\_ssh\_host\_key\_checking  added in 2.5 of ansible.builtin   | Determines if ssh should check host keys |
| **password**  string  |  |  var: ansible\_password   var: ansible\_ssh\_pass   var: ansible\_ssh\_password  | Authentication password for the `remote_user`. Can be supplied as CLI option. |
| **pipelining**  boolean  | **Choices:*** no
* yes

**Default:**"ANSIBLE\_PIPELINING" |  ini entries:  [connection]pipelining = ANSIBLE\_PIPELINING   [ssh\_connection]pipelining = ANSIBLE\_PIPELINING    env:ANSIBLE\_PIPELINING   env:ANSIBLE\_SSH\_PIPELINING   var: ansible\_pipelining   var: ansible\_ssh\_pipelining  | Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers. This can result in a very significant performance improvement when enabled. However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts, which is why this feature is disabled by default. |
| **port**  integer  |  |  ini entries:  [defaults]remote\_port = None    env:ANSIBLE\_REMOTE\_PORT   var: ansible\_port   var: ansible\_ssh\_port  | Remote port to connect to. |
| **private\_key\_file**  string  |  |  ini entries:  [defaults]private\_key\_file = None    env:ANSIBLE\_PRIVATE\_KEY\_FILE   var: ansible\_private\_key\_file   var: ansible\_ssh\_private\_key\_file   cli: --private-key-file  | Path to private key file to use for authentication |
| **reconnection\_retries**  integer  | **Default:**0 |  ini entries:  [connection]retries = 0   [ssh\_connection]retries = 0    env:ANSIBLE\_SSH\_RETRIES   var: ansible\_ssh\_retries  added in 2.7 of ansible.builtin   | Number of attempts to connect. |
| **remote\_user**  string  |  |  ini entries:  [defaults]remote\_user = None    env:ANSIBLE\_REMOTE\_USER   var: ansible\_user   var: ansible\_ssh\_user   cli: --user  | User name with which to login to the remote server, normally set by the remote\_user keyword. If no user is supplied, Ansible will let the ssh client binary choose the user as it normally |
| **scp\_executable**  string   added in 2.6 of ansible.builtin  | **Default:**"scp" |  ini entries:  [ssh\_connection]scp\_executable = scp    env:ANSIBLE\_SCP\_EXECUTABLE   var: ansible\_scp\_executable  added in 2.7 of ansible.builtin   | This defines the location of the scp binary. It defaults to `scp` which will use the first binary available in $PATH. |
| **scp\_extra\_args**  string  | **Default:**"" |  ini entries:  [ssh\_connection]scp\_extra\_args = 
 added in 2.7 of ansible.builtin    env:ANSIBLE\_SCP\_EXTRA\_ARGS  added in 2.7 of ansible.builtin    var: ansible\_scp\_extra\_args   cli: --scp-extra-args  | Extra exclusive to the ``scp`` CLI |
| **scp\_if\_ssh**  string  | **Default:**"smart" |  ini entries:  [ssh\_connection]scp\_if\_ssh = smart    env:ANSIBLE\_SCP\_IF\_SSH   var: ansible\_scp\_if\_ssh  added in 2.7 of ansible.builtin   | Preferred method to use when transfering files over ssh When set to smart, Ansible will try them until one succeeds or they all fail If set to True, it will force 'scp', if False it will use 'sftp' |
| **sftp\_batch\_mode**  boolean  | **Choices:*** no
* **yes** ←
 |  ini entries:  [ssh\_connection]sftp\_batch\_mode = yes    env:ANSIBLE\_SFTP\_BATCH\_MODE   var: ansible\_sftp\_batch\_mode  added in 2.7 of ansible.builtin   | TODO: write it |
| **sftp\_executable**  string   added in 2.6 of ansible.builtin  | **Default:**"sftp" |  ini entries:  [ssh\_connection]sftp\_executable = sftp    env:ANSIBLE\_SFTP\_EXECUTABLE   var: ansible\_sftp\_executable  added in 2.7 of ansible.builtin   | This defines the location of the sftp binary. It defaults to ``sftp`` which will use the first binary available in $PATH. |
| **sftp\_extra\_args**  string  | **Default:**"" |  ini entries:  [ssh\_connection]sftp\_extra\_args = 
 added in 2.7 of ansible.builtin    env:ANSIBLE\_SFTP\_EXTRA\_ARGS  added in 2.7 of ansible.builtin    var: ansible\_sftp\_extra\_args   cli: --sftp-extra-args  | Extra exclusive to the ``sftp`` CLI |
| **ssh\_args**  string  | **Default:**"-C -o ControlMaster=auto -o ControlPersist=60s" |  ini entries:  [ssh\_connection]ssh\_args = -C -o ControlMaster=auto -o ControlPersist=60s    env:ANSIBLE\_SSH\_ARGS   var: ansible\_ssh\_args  added in 2.7 of ansible.builtin    cli: --ssh-args  | Arguments to pass to all ssh cli tools |
| **ssh\_common\_args**  string  | **Default:**"" |  ini entries:  [ssh\_connection]ssh\_common\_args = 
 added in 2.7 of ansible.builtin    env:ANSIBLE\_SSH\_COMMON\_ARGS  added in 2.7 of ansible.builtin    var: ansible\_ssh\_common\_args   cli: --ssh-common-args  | Common extra args for all ssh CLI tools |
| **ssh\_executable**  string   added in 2.2 of ansible.builtin  | **Default:**"ssh" |  ini entries:  [ssh\_connection]ssh\_executable = ssh    env:ANSIBLE\_SSH\_EXECUTABLE   var: ansible\_ssh\_executable  added in 2.7 of ansible.builtin   | This defines the location of the ssh binary. It defaults to ``ssh`` which will use the first ssh binary available in $PATH. This option is usually not required, it might be useful when access to system ssh is restricted, or when using ssh wrappers to connect to remote hosts. |
| **ssh\_extra\_args**  string  | **Default:**"" |  ini entries:  [ssh\_connection]ssh\_extra\_args = 
 added in 2.7 of ansible.builtin    env:ANSIBLE\_SSH\_EXTRA\_ARGS  added in 2.7 of ansible.builtin    var: ansible\_ssh\_extra\_args   cli: --ssh-extra-args  | Extra exclusive to the 'ssh' CLI |
| **ssh\_transfer\_method**  string  | **Choices:*** sftp
* scp
* piped
* smart
 |  ini entries:  [ssh\_connection]transfer\_method = None    env:ANSIBLE\_SSH\_TRANSFER\_METHOD  | Preferred method to use when transferring files over ssh Setting to 'smart' (default) will try them in order, until one succeeds or they all fail Using 'piped' creates an ssh pipe with ``dd`` on either side to copy the data |
| **sshpass\_prompt**  string   added in 2.10 of ansible.builtin  | **Default:**"" |  ini entries:  [ssh\_connection]sshpass\_prompt =    env:ANSIBLE\_SSHPASS\_PROMPT   var: ansible\_sshpass\_prompt  | Password prompt that sshpass should search for. Supported by sshpass 1.06 and up. |
| **timeout**  integer  | **Default:**10 |  ini entries:  [defaults]timeout = 10   [ssh\_connection]timeout = 10 
 added in 2.11 of ansible.builtin    env:ANSIBLE\_TIMEOUT   env:ANSIBLE\_SSH\_TIMEOUT  added in 2.11 of ansible.builtin    var: ansible\_ssh\_timeout  added in 2.11 of ansible.builtin    cli: --timeout  | This is the default ammount of time we will wait while establishing an ssh connection It also controls how long we can wait to access reading the connection once established (select on the socket) |
| **use\_tty**  boolean   added in 2.5 of ansible.builtin  | **Choices:*** no
* **yes** ←
 |  ini entries:  [ssh\_connection]usetty = yes    env:ANSIBLE\_SSH\_USETTY   var: ansible\_ssh\_use\_tty  added in 2.7 of ansible.builtin   | add -tt to ssh commands to force tty allocation |

   
 Notes
-----

  Note

 * Many options default to ‘None’ here but that only means we don’t override the ssh tool’s defaults and/or configuration. For example, if you specify the port in this plugin it will override any `Port` entry in your `.ssh/config`.

  ### Authors

 * ansible (@core)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/ssh_connection.html>

ansible.builtin.local – execute on controller
=============================================

  Note

 This connection plugin is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short plugin name `local` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same connection plugin name.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)

 Synopsis
--------

 * This connection plugin allows ansible to execute tasks on the Ansible ‘controller’ instead of on a remote host.

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **pipelining**  boolean  | **Choices:*** no
* yes

**Default:**"ANSIBLE\_PIPELINING" |  ini entries:  [defaults]pipelining = ANSIBLE\_PIPELINING    env:ANSIBLE\_PIPELINING   var: ansible\_pipelining  | Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers. This can result in a very significant performance improvement when enabled. However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts, which is why this feature is disabled by default. |

   
 Notes
-----

  Note

 * The remote user is ignored, the user with which the ansible CLI was executed is used instead.

  ### Authors

 * ansible (@core)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/local_connection.html>

ansible.builtin.winrm – Run tasks over Microsoft’s WinRM
========================================================

  Note

 This connection plugin is part of `ansible-core` and included in all Ansible installations. In most cases, you can use the short plugin name `winrm` even without specifying the `collections:` keyword. However, we recommend you use the FQCN for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same connection plugin name.

   New in version 2.0: of ansible.builtin

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)

 Synopsis
--------

 * Run commands or put/fetch on a target via WinRM
* This plugin allows extra arguments to be passed that are supported by the protocol but not explicitly defined here. They should take the form of variables declared with the following pattern `ansible_winrm_<option>`.

 Requirements
------------

 The below requirements are needed on the local controller node that executes this connection.

 * pywinrm (python library)

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **connection\_timeout**  integer  |  |  var: ansible\_winrm\_connection\_timeout  | Sets the operation and read timeout settings for the WinRM connection. Corresponds to the `operation_timeout_sec` and `read_timeout_sec` args in pywinrm so avoid setting these vars with this one. The default value is whatever is set in the installed version of pywinrm. |
| **kerberos\_command**  string  | **Default:**"kinit" |  var: ansible\_winrm\_kinit\_cmd  | kerberos command to use to request a authentication ticket |
| **kerberos\_mode**  string  | **Choices:*** managed
* manual
 |  var: ansible\_winrm\_kinit\_mode  | kerberos usage mode. The managed option means Ansible will obtain kerberos ticket. While the manual one means a ticket must already have been obtained by the user. If having issues with Ansible freezing when trying to obtain the Kerberos ticket, you can either set this to `manual` and obtain it outside Ansible or install `pexpect` through pip and try again. |
| **kinit\_args**  string   added in 2.11 of ansible.builtin  |  |  var: ansible\_winrm\_kinit\_args  | Extra arguments to pass to `kinit` when getting the Kerberos authentication ticket. By default no extra arguments are passed into `kinit` unless *ansible\_winrm\_kerberos\_delegation* is also set. In that case `-f` is added to the `kinit` args so a forwardable ticket is retrieved. If set, the args will overwrite any existing defaults for `kinit`, including `-f` for a delegated ticket. |
| **path**  string  | **Default:**"/wsman" |  var: ansible\_winrm\_path  | URI path to connect to |
| **pipelining**  boolean  | **Choices:*** no
* yes

**Default:**"ANSIBLE\_PIPELINING" |  ini entries:  [defaults]pipelining = ANSIBLE\_PIPELINING    env:ANSIBLE\_PIPELINING   var: ansible\_pipelining  | Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers. This can result in a very significant performance improvement when enabled. However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts, which is why this feature is disabled by default. |
| **port**  integer  | **Default:**5986 |  var: ansible\_port   var: ansible\_winrm\_port  | port for winrm to connect on remote target The default is the https (5986) port, if using http it should be 5985 |
| **remote\_addr**  string  | **Default:**"inventory\_hostname" |  var: ansible\_host   var: ansible\_winrm\_host  | Address of the windows machine |
| **remote\_password**  string  |  |  var: ansible\_password   var: ansible\_winrm\_pass   var: ansible\_winrm\_password  | Authentication password for the `remote_user`. Can be supplied as CLI option. 
aliases: password |
| **remote\_user**  string  |  |  var: ansible\_user   var: ansible\_winrm\_user  | The user to log in as to the Windows machine |
| **scheme**  string  | **Choices:*** http
* https
 |  var: ansible\_winrm\_scheme  | URI scheme to use If not set, then will default to `https` or `http` if *port* is `5985`. |
| **transport**  list / elements=string  |  |  var: ansible\_winrm\_transport  | List of winrm transports to attempt to use (ssl, plaintext, kerberos, etc) If None (the default) the plugin will try to automatically guess the correct list The choices available depend on your version of pywinrm |

   
 ### Authors

 * Ansible Core Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/winrm_connection.html>

cloudscale\_ch.cloud.volume – Manages volumes on the cloudscale.ch IaaS service.
================================================================================

  Note

 This plugin is part of the [cloudscale\_ch.cloud collection](https://galaxy.ansible.com/cloudscale_ch/cloud) (version 2.2.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install cloudscale_ch.cloud`.

 To use it in a playbook, specify: `cloudscale_ch.cloud.volume`.

   New in version 1.0.0: of cloudscale\_ch.cloud

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Create, attach/detach, update and delete volumes on the cloudscale.ch IaaS service.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_timeout**  integer  | **Default:**45 | Timeout in seconds for calls to the cloudscale.ch API. This can also be passed in the `CLOUDSCALE_API_TIMEOUT` environment variable. |
| **api\_token**  string / required  |  | cloudscale.ch API token. This can also be passed in the `CLOUDSCALE_API_TOKEN` environment variable. |
| **api\_url**  string   added in 1.3.0 of cloudscale\_ch.cloud  | **Default:**"https://api.cloudscale.ch/v1" | cloudscale.ch API URL. This can also be passed in the `CLOUDSCALE_API_URL` environment variable. |
| **name**  string  |  | Name of the volume. Either name or UUID must be present to change an existing volume. |
| **servers**  list / elements=string  |  | UUIDs of the servers this volume is attached to. Set this to `[]` to detach the volume. Currently a volume can only be attached to a single server. The aliases `server_uuids` and `server_uuid` are deprecated and will be removed in version 3.0.0 of this collection. 
aliases: server\_uuids, server\_uuid |
| **size\_gb**  integer  |  | Size of the volume in GB. |
| **state**  string  | **Choices:*** **present** ←
* absent
 | State of the volume. |
| **tags**  dictionary  |  | Tags associated with the volume. Set this to `{}` to clear any tags. |
| **type**  string  | **Choices:*** ssd
* bulk
 | Type of the volume. Cannot be changed after creating the volume. Defaults to `ssd` on volume creation. |
| **uuid**  string  |  | UUID of the volume. Either name or UUID must be present to change an existing volume. |
| **zone**  string  |  | Zone in which the volume resides (e.g. `lgp1` or `rma1`). Cannot be changed after creating the volume. Defaults to the project default zone. |

   
 Notes
-----

  Note

 * To create a new volume at least the *name* and *size\_gb* options are required.
* A volume can be created and attached to a server in the same task.
* All operations are performed using the cloudscale.ch public API v1.
* For details consult the full API documentation: <https://www.cloudscale.ch/en/api/v1>.
* A valid API token is required for all operations. You can create as many tokens as you like using the cloudscale.ch control panel at <https://control.cloudscale.ch>.

  Examples
--------

 
```
# Create a new SSD volume
- name: Create an SSD volume
  cloudscale_ch.cloud.volume:
    name: my_ssd_volume
    zone: 'lpg1'
    size_gb: 50
    api_token: xxxxxx
  register: my_ssd_volume

# Attach an existing volume to a server
- name: Attach volume to server
  cloudscale_ch.cloud.volume:
    uuid: "{{ my_ssd_volume.uuid }}"
    servers:
      - ea3b39a3-77a8-4d0b-881d-0bb00a1e7f48
    api_token: xxxxxx

# Create and attach a volume to a server
- name: Create and attach volume to server
  cloudscale_ch.cloud.volume:
    name: my_ssd_volume
    zone: 'lpg1'
    size_gb: 50
    servers:
      - ea3b39a3-77a8-4d0b-881d-0bb00a1e7f48
    api_token: xxxxxx

# Detach volume from server
- name: Detach volume from server
  cloudscale_ch.cloud.volume:
    uuid: "{{ my_ssd_volume.uuid }}"
    servers: []
    api_token: xxxxxx

# Delete a volume
- name: Delete volume
  cloudscale_ch.cloud.volume:
    name: my_ssd_volume
    state: absent
    api_token: xxxxxx

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **href**  string  | state == present | The API URL to get details about this volume.  **Sample:** https://api.cloudscale.ch/v1/volumes/2db69ba3-1864-4608-853a-0771b6885a3a |
| **name**  string  | state == present | The display name of the volume.  **Sample:** my\_ssd\_volume |
| **server\_uuids**  list / elements=string  | state == present | The UUIDs of the servers this volume is attached to. This return value is deprecated and will disappear in the future when the field is removed from the API.  **Sample:** ['47cec963-fcd2-482f-bdb6-24461b2d47b1'] |
| **servers**  list / elements=string  | state == present | The list of servers this volume is attached to.  **Sample:** [{'href': 'https://api.cloudscale.ch/v1/servers/47cec963-fcd2-482f-bdb6-24461b2d47b1', 'name': 'my\_server', 'uuid': '47cec963-fcd2-482f-bdb6-24461b2d47b1'}] |
| **size\_gb**  string  | state == present | The size of the volume in GB.  **Sample:** 50 |
| **state**  string  | success | The current status of the volume.  **Sample:** present |
| **tags**  dictionary  | state == present | Tags associated with the volume.  **Sample:** {'project': 'my project'} |
| **type**  string  | state == present | The type of the volume.  **Sample:** bulk |
| **uuid**  string  | state == present | The unique identifier for this volume.  **Sample:** 2db69ba3-1864-4608-853a-0771b6885a3a |
| **zone**  dictionary  | state == present | The zone of the volume.  **Sample:** {'slug': 'lpg1'} |

   
  
 ### Authors

 * Gaudenz Steinlin (@gaudenz)
* René Moser (@resmo)
* Denis Krienbühl (@href)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cloudscale_ch/cloud/volume_module.html>

check\_point.mgmt.cp\_mgmt\_wildcard\_facts – Get wildcard objects facts on Check Point over Web Services API
=============================================================================================================

  Note

 This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install check_point.mgmt`.

 To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_wildcard_facts`.

   New in version 2.9: of check\_point.mgmt

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)

 Synopsis
--------

 * Get wildcard objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter ‘name’.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level**  string  | **Choices:*** uid
* standard
* full
 | The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit**  integer  |  | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name**  string  |  | Object name. This parameter is relevant only for getting a specific object. |
| **offset**  integer  |  | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order**  list / elements=string  |  | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
|  | **ASC**  string  | **Choices:*** name
 | Sorts results by the given field in ascending order. |
|  | **DESC**  string  | **Choices:*** name
 | Sorts results by the given field in descending order. |
| **version**  string  |  | Version of checkpoint. If not given one, the latest version taken. |

   
 Examples
--------

 
```
- name: show-wildcard
  cp_mgmt_wildcard_facts:
    name: New Wildcard 1

- name: show-wildcards
  cp_mgmt_wildcard_facts:
    details_level: standard
    limit: 50
    offset: 0

```
 ### Authors

 * Or Soffer (@chkp-orso)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/check_point/mgmt/cp_mgmt_wildcard_facts_module.html>

cisco.ucs.ucs\_wwn\_pool – Configures WWNN or WWPN pools on Cisco UCS Manager
=============================================================================

  Note

 This plugin is part of the [cisco.ucs collection](https://galaxy.ansible.com/cisco/ucs) (version 1.6.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install cisco.ucs`.

 To use it in a playbook, specify: `cisco.ucs.ucs_wwn_pool`.

   New in version 2.5: of cisco.ucs

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)

 Synopsis
--------

 * Configures WWNNs or WWPN pools on Cisco UCS Manager.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * ucsmsdk

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **description**  string  |  | A description of the WWNN or WWPN pool. Enter up to 256 characters. You can use any characters or spaces except the following: ` (accent mark), (backslash), ^ (carat), " (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote). 
aliases: descr |
| **first\_addr**  string  |  | The first initiator in the World Wide Name (WWN) block. This is the From field in the UCS Manager Add WWN Blocks menu. |
| **hostname**  string / required  |  | IP address or hostname of Cisco UCS Manager. Modules can be used with the UCS Platform Emulator <https://cs.co/ucspe>
 |
| **last\_addr**  string  |  | The last initiator in the World Wide Name (WWN) block. This is the To field in the UCS Manager Add WWN Blocks menu. For WWxN pools, the pool size must be a multiple of ports-per-node + 1. For example, if there are 7 ports per node, the pool size must be a multiple of 8. If there are 63 ports per node, the pool size must be a multiple of 64. |
| **name**  string / required  |  | The name of the World Wide Node Name (WWNN) or World Wide Port Name (WWPN) pool. This name can be between 1 and 32 alphanumeric characters. You cannot use spaces or any special characters other than - (hyphen), "\_" (underscore), : (colon), and . (period). You cannot change this name after the WWNN or WWPN pool is created. |
| **order**  string  | **Choices:*** **default** ←
* sequential
 | The Assignment Order field. This can be one of the following: default - Cisco UCS Manager selects a random identity from the pool. sequential - Cisco UCS Manager selects the lowest available identity from the pool. |
| **org\_dn**  string  | **Default:**"org-root" | Org dn (distinguished name) |
| **password**  string / required  |  | Password for Cisco UCS Manager authentication. |
| **port**  integer  |  | Port number to be used during connection (by default uses 443 for https and 80 for http connection). |
| **proxy**  string  |  | If use\_proxy is no, specfies proxy to be used for connection. e.g. 'http://proxy.xy.z:8080' |
| **purpose**  string / required  | **Choices:*** node
* port
 | Specify whether this is a node (WWNN) or port (WWPN) pool. Optional if state is absent. |
| **state**  string  | **Choices:*** **present** ←
* absent
 | If `present`, will verify WWNNs/WWPNs are present and will create if needed. If `absent`, will verify WWNNs/WWPNs are absent and will delete if needed. |
| **use\_proxy**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, will not use the proxy as defined by system environment variable. |
| **use\_ssl**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, an HTTP connection will be used instead of the default HTTPS connection. |
| **username**  string  | **Default:**"admin" | Username for Cisco UCS Manager authentication. |

   
 Examples
--------

 
```
- name: Configure WWNN/WWPN pools
  cisco.ucs.ucs_wwn_pool:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: WWNN-Pool
    purpose: node
    first_addr: 20:00:00:25:B5:48:00:00
    last_addr: 20:00:00:25:B5:48:00:0F
- cisco.ucs.ucs_wwn_pool:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: WWPN-Pool-A
    purpose: port
    order: sequential
    first_addr: 20:00:00:25:B5:48:0A:00
    last_addr: 20:00:00:25:B5:48:0A:0F

- name: Remove WWNN/WWPN pools
  cisco.ucs.ucs_wwn_pool:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: WWNN-Pool
    state: absent
- cisco.ucs.ucs_wwn_pool:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: WWPN-Pool-A
    state: absent

```
 ### Authors

 * David Soper (@dsoper2)
* John McDonough (@movinalot)
* CiscoUcs (@CiscoUcs)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cisco/ucs/ucs_wwn_pool_module.html>

containers.podman.podman\_volume\_info – Gather info about podman volumes
=========================================================================

  Note

 This plugin is part of the [containers.podman collection](https://galaxy.ansible.com/containers/podman) (version 1.8.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install containers.podman`.

 To use it in a playbook, specify: `containers.podman.podman_volume_info`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gather info about podman volumes with podman inspect command.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * Podman installed on host

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **executable**  string  | **Default:**"podman" | Path to `podman` executable if it is not in the `$PATH` on the machine running `podman`
 |
| **name**  string  |  | Name of the volume |

   
 Examples
--------

 
```
- name: Gather info about all present volumes
  podman_volume_info:

- name: Gather info about specific volume
  podman_volume_info:
    name: specific_volume

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **volumes**  list / elements=string  | always | Facts from all or specified volumes  **Sample:** [{'driver': 'local', 'labels': {}, 'mountPoint': '/home/ansible/.local/share/testvolume/\_data', 'name': 'testvolume', 'options': {}, 'scope': 'local'}] |

   
  
 ### Authors

 * Sagi Shnaidman (@sshnaidm)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/containers/podman/podman_volume_info_module.html>

awx.awx.workflow\_node\_wait – Approve an approval node in a workflow job.
==========================================================================

  Note

 This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install awx.awx`.

 To use it in a playbook, specify: `awx.awx.workflow_node_wait`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * Approve an approval node in a workflow job. See <https://www.ansible.com/tower> for an overview.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file**  path  |  | Path to the controller config file. If provided, the other locations for config files will not be considered. 
aliases: tower\_config\_file |
| **controller\_host**  string  |  | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used 
aliases: tower\_host |
| **controller\_oauthtoken**  raw   added in 3.7.0 of awx.awx  |  | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files 
aliases: tower\_oauthtoken |
| **controller\_password**  string  |  | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files 
aliases: tower\_password |
| **controller\_username**  string  |  | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files 
aliases: tower\_username |
| **interval**  float  | **Default:**1 | The interval in sections, to request an update from the controller. |
| **name**  string / required  |  | Name of the workflow node to wait on. |
| **timeout**  integer  | **Default:**10 | Maximum time in seconds to wait for a workflow job to to reach approval node. |
| **validate\_certs**  boolean  | **Choices:*** no
* yes
 | Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files 
aliases: tower\_verify\_ssl |
| **workflow\_job\_id**  integer / required  |  | ID of the workflow job to monitor for node. |

   
 Notes
-----

  Note

 * If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password

  Examples
--------

 
```
- name: Launch a workflow with a timeout of 10 seconds
  workflow_launch:
    workflow_template: "Test Workflow"
    wait: False
  register: workflow

- name: Wait for a workflow node to finish
  workflow_node_wait:
    workflow_job_id: "{{ workflow.id }}"
    name: Approval Data Step
    timeout: 120

```
 ### Authors

 * Sean Sullivan (@sean-m-sullivan)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/awx/awx/workflow_node_wait_module.html>

fortinet.fortios.fortios\_wireless\_controller\_wtp\_status – Wireless controller WTP-status in Fortinet’s FortiOS and FortiGate.
=================================================================================================================================

  Note

 This plugin is part of the [fortinet.fortios collection](https://galaxy.ansible.com/fortinet/fortios) (version 2.1.2).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install fortinet.fortios`.

 To use it in a playbook, specify: `fortinet.fortios.fortios_wireless_controller_wtp_status`.

   New in version 2.10: of fortinet.fortios

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wireless\_controller feature and wtp\_status category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * ansible>=2.9.0

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access\_token**  string  |  | Token-based authentication. Generated from GUI of Fortigate. |
| **enable\_log**  boolean  | **Choices:*** **no** ←
* yes
 | Enable/Disable logging for task. |
| **vdom**  string  | **Default:**"root" | Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. |
| **wireless\_controller\_wtp\_status**  dictionary  |  | Wireless controller WTP-status. |
|  |  string  |  | WTP ID. |

   
 Notes
-----

  Note

 * Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks

  Examples
--------

 
```
- hosts: fortigates
  collections:
    - fortinet.fortios
  connection: httpapi
  vars:
   vdom: "root"
   ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   ansible_httpapi_port: 443
  tasks:
  - name: Wireless controller WTP-status.
    fortios_wireless_controller_wtp_status:
      vdom:  "{{ vdom }}"
      wireless_controller_wtp_status:
        <wtp_id>: "<your_own_value>"

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **build**  string  | always | Build number of the fortigate image  **Sample:** 1547 |
| **http\_method**  string  | always | Last method used to provision the content into FortiGate  **Sample:** PUT |
| **http\_status**  string  | always | Last result given by FortiGate on last operation applied  **Sample:** 200 |
| **mkey**  string  | success | Master key (id) used in the last call to FortiGate  **Sample:** id |
| **name**  string  | always | Name of the table used to fulfill the request  **Sample:** urlfilter |
| **path**  string  | always | Path of the table used to fulfill the request  **Sample:** webfilter |
| **revision**  string  | always | Internal revision number  **Sample:** 17.0.2.10658 |
| **serial**  string  | always | Serial number of the unit  **Sample:** FGVMEVYYQT3AB5352 |
| **status**  string  | always | Indication of the operation's result  **Sample:** success |
| **vdom**  string  | always | Virtual domain used  **Sample:** root |
| **version**  string  | always | Version of the FortiGate  **Sample:** v5.6.3 |

   
  
 ### Authors

 * Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Hongbin Lu (@fgtdev-hblu)
* Frank Shen (@frankshen01)
* Miguel Angel Munoz (@mamunozgonzalez)
* Nicolas Thomas (@thomnico)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/fortinet/fortios/fortios_wireless_controller_wtp_status_module.html>

community.zabbix.zabbix\_valuemap – Create/update/delete Zabbix value maps
==========================================================================

  Note

 This plugin is part of the [community.zabbix collection](https://galaxy.ansible.com/community/zabbix) (version 1.5.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install community.zabbix`.

 To use it in a playbook, specify: `community.zabbix.zabbix_valuemap`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * This module allows you to create, modify and delete Zabbix value maps.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * zabbix-api >= 0.5.4

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **http\_login\_password**  string  |  | Basic Auth password |
| **http\_login\_user**  string  |  | Basic Auth login |
| **login\_password**  string / required  |  | Zabbix user password. If not set the environment variable `ZABBIX_PASSWORD` will be used. |
| **login\_user**  string / required  |  | Zabbix user name. If not set the environment variable `ZABBIX_USERNAME` will be used. |
| **mappings**  list / elements=dictionary  |  | List of value mappings for the value map. Required when *state=present*. |
|  | **map\_to**  string / required  |  | Value to which the original value is mapped to. |
|  | **value**  string / required  |  | Original value. |
| **name**  string / required  |  | Name of the value map. |
| **server\_url**  string / required  |  | URL of Zabbix server, with protocol (http or https). `url` is an alias for `server_url`. If not set the environment variable `ZABBIX_SERVER` will be used. 
aliases: url |
| **state**  string  | **Choices:*** **present** ←
* absent
 | State of the value map. On `present`, it will create a value map if it does not exist or update the value map if the associated data is different. On `absent`, it will remove the value map if it exists. |
| **timeout**  integer  | **Default:**10 | The timeout of API request (seconds). |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | If set to False, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If not set the environment variable `ZABBIX_VALIDATE_CERTS` will be used. |

   
 Notes
-----

  Note

 * If you use *login\_password=zabbix*, the word “zabbix” is replaced by “**\*\*\*\***” in all module output, because *login\_password* uses `no_log`. See [this FAQ](../../../network/user_guide/faq#why-is-my-output-sometimes-replaced-with) for more information.

  Examples
--------

 
```
- name: Create a value map
  local_action:
    module: community.zabbix.zabbix_valuemap
    server_url: http://zabbix.example.com
    login_user: username
    login_password: password
    name: Numbers
    mappings:
      - value: 1
        map_to: one
      - value: 2
        map_to: two
    state: present

```
 ### Authors

 * Ruben Tsirunyan (@rubentsirunyan)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/community/zabbix/zabbix_valuemap_module.html>

cyberark.pas.cyberark\_user – CyberArk User Management using PAS Web Services SDK.
==================================================================================

  Note

 This plugin is part of the [cyberark.pas collection](https://galaxy.ansible.com/cyberark/pas) (version 1.0.7).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install cyberark.pas`.

 To use it in a playbook, specify: `cyberark.pas.cyberark_user`.

   New in version 2.4: of cyberark.pas

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * CyberArk User Management using PAS Web Services SDK, It currently supports the following actions Get User Details, Add User, Update User, Delete User.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **change\_password\_on\_the\_next\_logon**  boolean  | **Choices:*** **no** ←
* yes
 | Whether or not the user must change their password in their next logon. |
| **cyberark\_session**  dictionary / required  |  | Dictionary set by a CyberArk authentication containing the different values to perform actions on a logged-on CyberArk session, please see M(cyberark\_authentication) module for an example of cyberark\_session. |
| **disabled**  boolean  | **Choices:*** **no** ←
* yes
 | Whether or not the user will be disabled. |
| **email**  string  |  | The user email address. |
| **expiry\_date**  string  |  | The date and time when the user account will expire and become disabled. |
| **first\_name**  string  |  | The user first name. |
| **group\_name**  string  |  | The name of the group the user will be added to. |
| **initial\_password**  string  |  | The password that the new user will use to log on the first time. This password must meet the password policy requirements. This parameter is required when state is present -- Add User. |
| **last\_name**  string  |  | The user last name. |
| **location**  string  |  | The Vault Location for the user. |
| **logging\_file**  string  | **Default:**"/tmp/ansible\_cyberark.log" | Setting the log file name and location for troubleshooting logs. |
| **logging\_level**  string / required  | **Choices:*** **NOTSET** ←
* DEBUG
* INFO
 | Parameter used to define the level of troubleshooting output to the `logging_file` value. |
| **new\_password**  string  |  | The user updated password. Make sure that this password meets the password policy requirements. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | Specifies the state needed for the user present for create user, absent for delete user. |
| **user\_type\_name**  string  |  | The type of user. The parameter defaults to `EPVUser`. |
| **username**  string / required  |  | The name of the user who will be queried (for details), added, updated or deleted. |

   
 Examples
--------

 
```
- name: Logon to CyberArk Vault using PAS Web Services SDK
  cyberark_authentication:
    api_base_url: https://components.cyberark.local
    use_shared_logon_authentication: yes

- name: Create user & immediately add it to a group
  cyberark_user:
    username: username
    initial_password: password
    user_type_name: EPVUser
    change_password_on_the_next_logon: no
    group_name: GroupOfUser
    state: present
    cyberark_session: '{{ cyberark_session }}'

- name: Make sure user is present and reset user credential if present
  cyberark_user:
    username: Username
    new_password: password
    disabled: no
    state: present
    cyberark_session: '{{ cyberark_session }}'

- name: Logoff from CyberArk Vault
  cyberark_authentication:
    state: absent
    cyberark_session: '{{ cyberark_session }}'

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **changed**  boolean  | always | Whether there was a change done.  |
| **cyberark\_user**  complex  | always | Dictionary containing result properties.  |
|  | **result**  dictionary  | success | user properties when state is present  |
| **status\_code**  integer  | success | Result HTTP Status code  **Sample:** 200 |

   
  
 ### Authors

 * Edward Nunez (@enunez-cyberark)
* Cyberark Bizdev (@cyberark-bizdev)
* Erasmo Acosta (@erasmix)
* James Stutes (@jimmyjamcabd)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/cyberark/pas/cyberark_user_module.html>

f5networks.f5\_modules.bigiq\_utility\_license\_assignment – Manage utility license assignment on BIG-IPs from a BIG-IQ
=======================================================================================================================

  Note

 This plugin is part of the [f5networks.f5\_modules collection](https://galaxy.ansible.com/f5networks/f5_modules) (version 1.12.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install f5networks.f5_modules`.

 To use it in a playbook, specify: `f5networks.f5_modules.bigiq_utility_license_assignment`.

   New in version 1.0.0: of f5networks.f5\_modules

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * Manages the assignment of utility licenses on a BIG-IQ. Assignment means the license is assigned to a BIG-IP, or it needs to be assigned to a BIG-IP. Additionally, this module supports revoking the assignments from BIG-IP devices.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **device**  string / required  |  | When `managed` is `no`, specifies the address, or hostname, where the BIG-IQ can reach the remote device to register. When `managed` is `yes`, specifies the managed device, or device UUID, you want to register. If `managed` is `yes`, it is very important you do not have more than one device with the same name. BIG-IQ internally recognizes devices by their ID, and therefore, this module cannot guarantee the correct device will be registered. The device returned is the device that is used. |
| **device\_password**  string  |  | The password of the `device_username`. When `managed` is `no`, this parameter is required. |
| **device\_port**  integer  | **Default:**443 | Specifies the port of the remote device to connect to. If this parameter is not specified, the default is `443`. |
| **device\_username**  string  |  | The username used to connect to the remote device. This username should be one that has sufficient privileges on the remote device to do licensing. Usually this is the `Administrator` role. When `managed` is `no`, this parameter is required. |
| **key**  string / required  |  | The registration key from which you want choose an offering. |
| **managed**  boolean  | **Choices:*** no
* yes
 | Whether the specified device is a managed or un-managed device. When `state` is `present`, this parameter is required. |
| **offering**  string / required  |  | Name of the license offering to assign to the device. |
| **provider**  dictionary   added in 1.0.0 of f5networks.f5\_modules  |  | A dict object containing connection details. |
|  | **auth\_provider**  string  |  | Configures the auth provider for to obtain authentication tokens from the remote device. This option is really used when working with BIG-IQ devices. |
|  | **no\_f5\_teem**  boolean  | **Choices:*** **no** ←
* yes
 | If `yes`, TEEM telemetry data is not sent to F5. You may omit this option by setting the environment variable `F5_TELEMETRY_OFF`. Previously used variable `F5_TEEM` is deprecated as its name was confusing. |
|  | **password**  string / required  |  | The password for the user account used to connect to the BIG-IP. You may omit this option by setting the environment variable `F5_PASSWORD`. 
aliases: pass, pwd |
|  | **server**  string / required  |  | The BIG-IP host. You may omit this option by setting the environment variable `F5_SERVER`. |
|  | **server\_port**  integer  | **Default:**443 | The BIG-IP server port. You may omit this option by setting the environment variable `F5_SERVER_PORT`. |
|  | **timeout**  integer  |  | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
|  | **transport**  string  | **Choices:*** **rest** ←
 | Configures the transport connection to use when connecting to the remote device. |
|  | **user**  string / required  |  | The username to connect to the BIG-IP with. This user must have administrative privileges on the device. You may omit this option by setting the environment variable `F5_USER`. |
|  | **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, SSL certificates are not validated. Use this only on personally controlled sites using self-signed certificates. You may omit this option by setting the environment variable `F5_VALIDATE_CERTS`. |
| **state**  string  | **Choices:*** **present** ←
* absent
 | When `present`, ensures the device is assigned the specified license. When `absent`, ensures the license is revokes from the remote device and freed on the BIG-IQ. |
| **unit\_of\_measure**  string  | **Choices:*** **hourly** ←
* daily
* monthly
* yearly
 | Sets the rate at which this license usage is billed. Depending on your license, you may have different units of measure available to you. If a particular unit is not available to you, the module notifies you at licensing time. |

   
 Notes
-----

  Note

 * For more information on using Ansible to manage F5 Networks devices see <https://www.ansible.com/integrations/networks/f5>.
* Requires BIG-IP software version >= 12.
* The F5 modules only manipulate the running configuration of the F5 product. To ensure that BIG-IP specific configuration persists to disk, be sure to include at least one task that uses the [f5networks.f5\_modules.bigip\_config](bigip_config_module#ansible-collections-f5networks-f5-modules-bigip-config-module) module to save the running configuration. Refer to the module’s documentation for the correct usage of the module to save your running configuration.

  Examples
--------

 
```
- name: Register an unmanaged device
  bigiq_utility_license_assignment:
    key: XXXX-XXXX-XXXX-XXXX-XXXX
    offering: F5-BIG-MSP-AFM-10G-LIC
    device: 1.1.1.1
    managed: no
    device_username: admin
    device_password: secret
    state: present
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Register a managed device, by name
  bigiq_utility_license_assignment:
    key: XXXX-XXXX-XXXX-XXXX-XXXX
    offering: F5-BIG-MSP-AFM-10G-LIC
    device: bigi1.foo.com
    managed: yes
    state: present
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Register a managed device, by UUID
  bigiq_utility_license_assignment:
    key: XXXX-XXXX-XXXX-XXXX-XXXX
    offering: F5-BIG-MSP-AFM-10G-LIC
    device: 7141a063-7cf8-423f-9829-9d40599fa3e0
    managed: yes
    state: present
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

```
 ### Authors

 * Tim Rupp (@caphrim007)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/f5networks/f5_modules/bigiq_utility_license_assignment_module.html>

mellanox.onyx.onyx\_wjh – Configure what-just-happend module
============================================================

  Note

 This plugin is part of the [mellanox.onyx collection](https://galaxy.ansible.com/mellanox/onyx) (version 1.0.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install mellanox.onyx`.

 To use it in a playbook, specify: `mellanox.onyx.onyx_wjh`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * This module provides declarative management of wjh on Mellanox ONYX network devices.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_export**  boolean  | **Choices:*** no
* yes
 | wjh group auto export pcap file status |
| **clear\_group**  string  | **Choices:*** all
* user
* auto-export
 | clear pcap file by group |
| **enabled**  boolean  | **Choices:*** no
* yes
 | wjh group status |
| **export\_group**  string  | **Choices:*** all
* forwarding
* acl
 | wjh group auto export group |
| **group**  string  | **Choices:*** all
* forwarding
* acl
 | Name of wjh group. |

   
 Examples
--------

 
```
- name: Enable wjh
  onyx_wjh:
      group: forwarding
      enabled: True

- name: Disable wjh
  onyx_wjh:
      group: forwarding
      enabled: False

- name: Enable auto-export
  onyx_wjh:
        auto_export: True
        export_group: forwarding
- name: Disable auto-export
  onyx_wjh:
        auto_export: False
        export_group: forwarding
- name: Clear pcap file
  onyx_wjh:
        clear_group: auto-export

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always | The list of configuration mode commands to send to the device.  **Sample:** ['what-just-happend forwarding enable', 'what-just-happend auto-export forwarding enable', 'clear what-just-happend pcap-file user'] |

   
  
 ### Authors

 * Anas Shami (@anass)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/mellanox/onyx/onyx_wjh_module.html>

frr.frr.frr\_facts – Collect facts from remote devices running Free Range Routing (FRR).
========================================================================================

  Note

 This plugin is part of the [frr.frr collection](https://galaxy.ansible.com/frr/frr) (version 1.0.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install frr.frr`.

 To use it in a playbook, specify: `frr.frr.frr_facts`.

   New in version 1.0.0: of frr.frr

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Collects a base set of device facts from a remote device that is running FRR. This module prepends all of the base network fact keys with `ansible_net_<fact>`. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **gather\_subset**  list / elements=string  | **Default:**"!config" | When supplied, this argument restricts the facts collected to a given subset. Possible values for this argument include `all`, `hardware`, `config`, and `interfaces`. Specify a list of values to include a larger subset. Use a value with an initial `!` to collect all facts except that subset. |

   
 Notes
-----

  Note

 * Tested against FRR 6.0.

  Examples
--------

 
```
- name: Collect all facts from the device
  frr.frr.frr_facts:
    gather_subset: all

- name: Collect only the config and default facts
  frr.frr.frr_facts:
    gather_subset:
    - config

- name: Collect the config and hardware facts
  frr.frr.frr_facts:
    gather_subset:
    - config
    - hardware

- name: Do not collect hardware facts
  frr.frr.frr_facts:
    gather_subset:
    - '!hardware'

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_net\_all\_ipv4\_addresses**  list / elements=string  | when interfaces is configured | All IPv4 addresses configured on the device  |
| **ansible\_net\_all\_ipv6\_addresses**  list / elements=string  | when interfaces is configured | All IPv6 addresses configured on the device  |
| **ansible\_net\_api**  string  | always | The name of the transport  |
| **ansible\_net\_config**  string  | when config is configured | The current active config from the device  |
| **ansible\_net\_gather\_subset**  list / elements=string  | always | The list of fact subsets collected from the device  |
| **ansible\_net\_hostname**  string  | always | The configured hostname of the device  |
| **ansible\_net\_interfaces**  dictionary  | when interfaces is configured | A hash of all interfaces running on the system  |
| **ansible\_net\_mem\_stats**  dictionary  | when hardware is configured | The memory statistics fetched from the device  |
| **ansible\_net\_mpls\_ldp\_neighbors**  dictionary  | when interfaces is configured and LDP daemon is running on the device | The list of MPLS LDP neighbors from the remote device  |
| **ansible\_net\_python\_version**  string  | always | The Python version that the Ansible controller is using  |
| **ansible\_net\_version**  string  | always | The FRR version running on the remote device  |

   
  
 ### Authors

 * Nilashish Chakraborty (@NilashishC)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/frr/frr/frr_facts_module.html>

dellemc.os9.os9\_facts – Collect facts from remote devices running Dell EMC Networking OS9
==========================================================================================

  Note

 This plugin is part of the [dellemc.os9 collection](https://galaxy.ansible.com/dellemc/os9) (version 1.0.4).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install dellemc.os9`.

 To use it in a playbook, specify: `dellemc.os9.os9_facts`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Collects a base set of device facts from a remote device that is running OS9. This module prepends all of the base network fact keys with `ansible_net_<fact>`. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **gather\_subset**  list / elements=string  | **Default:**["!config"] | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial `M(!`) to specify that a specific subset should not be collected. |
| **provider**  dictionary  |  | A dict object containing connection details. |
|  | **auth\_pass**  string  |  | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
|  | **authorize**  boolean  | **Choices:*** no
* yes
 | Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
|  | **host**  string  |  | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
|  | **password**  string  |  | Password to authenticate the SSH session to the remote device. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
|  | **port**  integer  |  | Specifies the port to use when building the connection to the remote device. |
|  | **ssh\_keyfile**  path  |  | Path to an ssh key used to authenticate the SSH session to the remote device. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
|  | **timeout**  integer  |  | Specifies idle timeout (in seconds) for the connection. Useful if the console freezes before continuing. For example when saving configurations. |
|  | **username**  string  |  | User to authenticate the SSH session to the remote device. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |

   
 Notes
-----

  Note

 * This module requires OS9 version 9.10.0.1P13 or above.
* This module requires an increase of the SSH connection rate limit. Use the following command *ip ssh connection-rate-limit 60* to configure the same. This can be also be done with the M(os9\_config) module.
* For more information on using Ansible to manage Dell EMC Network devices see <https://www.ansible.com/ansible-dell-networking>.

  Examples
--------

 
```
# Collect all facts from the device
- os9_facts:
    gather_subset: all
# Collect only the config and default facts
- os9_facts:
    gather_subset:
      - config
# Do not collect hardware facts
- os9_facts:
    gather_subset:
      - "!hardware"

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_net\_all\_ipv4\_addresses**  list / elements=string  | when interfaces is configured | All IPv4 addresses configured on the device  |
| **ansible\_net\_all\_ipv6\_addresses**  list / elements=string  | when interfaces is configured | All IPv6 addresses configured on the device  |
| **ansible\_net\_config**  string  | when config is configured | The current active config from the device  |
| **ansible\_net\_filesystems**  list / elements=string  | when hardware is configured | All file system names available on the device  |
| **ansible\_net\_gather\_subset**  list / elements=string  | always | The list of fact subsets collected from the device  |
| **ansible\_net\_hostname**  string  | always | The configured hostname of the device  |
| **ansible\_net\_image**  string  | always | The image file the device is running  |
| **ansible\_net\_interfaces**  dictionary  | when interfaces is configured | A hash of all interfaces running on the system  |
| **ansible\_net\_memfree\_mb**  integer  | when hardware is configured | The available free memory on the remote device in Mb  |
| **ansible\_net\_memtotal\_mb**  integer  | when hardware is configured | The total memory on the remote device in Mb  |
| **ansible\_net\_model**  string  | always | The model name returned from the device  |
| **ansible\_net\_neighbors**  dictionary  | when interfaces is configured | The list of LLDP neighbors from the remote device  |
| **ansible\_net\_serialnum**  string  | always | The serial number of the remote device  |
| **ansible\_net\_servicetags**  list / elements=string  | always | The servicetags from remote device  |
| **ansible\_net\_version**  string  | always | The operating system version running on the remote device  |

   
  
 ### Authors

 * Dhivya P (@dhivyap)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/dellemc/os9/os9_facts_module.html>

infinidat.infinibox.infini\_vol – Create, Delete or Modify volumes on Infinibox
===============================================================================

  Note

 This plugin is part of the [infinidat.infinibox collection](https://galaxy.ansible.com/infinidat/infinibox) (version 1.2.4).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install infinidat.infinibox`.

 To use it in a playbook, specify: `infinidat.infinibox.infini_vol`.

   New in version 2.3: of infinidat.infinibox

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * This module creates, deletes or modifies a volume on Infinibox.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * capacity
* infinisdk (<https://infinisdk.readthedocs.io/en/latest/>)
* python2 >= 2.7 or python3 >= 3.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name**  string / required  |  | Volume Name |
| **parent\_volume\_name**  string  |  | Specify a volume name. This is the volume parent for creating a snapshot. Required if volume\_type is snapshot. |
| **password**  string  |  | Infinibox User password. |
| **pool**  string  |  | Pool that master volume will reside within. Required for creating a master volume, but not a snapshot. |
| **size**  string  |  | Volume size in MB, GB or TB units. Required for creating a master volume, but not a snapshot |
| **snapshot\_lock\_expires\_at**  string  |  | This will cause a snapshot to be locked at the specified date-time. Uses python's datetime format YYYY-mm-dd HH:MM:SS.ffffff, e.g. 2020-02-13 16:21:59.699700 |
| **snapshot\_lock\_only**  boolean  | **Choices:*** **no** ←
* yes
 | This will lock an existing snapshot but will suppress refreshing the snapshot. |
| **state**  string  | **Choices:*** stat
* **present** ←
* absent
 | Creates/Modifies master volume or snapshot when present or removes when absent. |
| **system**  string / required  |  | Infinibox Hostname or IPv4 Address. |
| **thin\_provision**  boolean   added in 2.8 of infinidat.infinibox  | **Choices:*** no
* **yes** ←
 | Whether the master volume should be thin provisioned. Required for creating a master volume, but not a snapshot. |
| **user**  string  |  | Infinibox User username with sufficient priveledges ( see notes ). |
| **volume\_type**  string  | **Choices:*** **master** ←
* snapshot
 | Specifies the volume type, regular volume or snapshot. |

   
 Notes
-----

  Note

 * This module requires infinisdk python library
* You must set INFINIBOX\_USER and INFINIBOX\_PASSWORD environment variables if user and password arguments are not passed to the module directly
* Ansible uses the infinisdk configuration file `~/.infinidat/infinisdk.ini` if no credentials are provided. See <http://infinisdk.readthedocs.io/en/latest/getting_started.html>
* All Infinidat modules support check mode (–check). However, a dryrun that creates resources may fail if the resource dependencies are not met for a task. For example, consider a task that creates a volume in a pool. If the pool does not exist, the volume creation task will fail. It will fail even if there was a previous task in the playbook that would have created the pool but did not because the pool creation was also part of the dry run.

  Examples
--------

 
```
- name: Create new volume named foo under pool named bar
  infini_vol:
    name: foo
    # volume_type: master  # Default
    size: 1TB
    thin_provision: yes
    pool: bar
    state: present
    user: admin
    password: secret
    system: ibox001
- name: Create snapshot named foo_snap from volume named foo
  infini_vol:
    name: foo_snap
    volume_type: snapshot
    parent_volume_name: foo
    state: present
    user: admin
    password: secret
    system: ibox001
- name: Stat snapshot, also a volume, named foo_snap
  infini_vol:
    name: foo_snap
    state: present
    user: admin
    password: secret
    system: ibox001
- name: Remove snapshot, also a volume, named foo_snap
  infini_vol:
    name: foo_snap
    state: absent
    user: admin
    password: secret
    system: ibox001

```
 ### Authors

 * Gregory Shulov (@GR360RY)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/infinidat/infinibox/infini_vol_module.html>

google.cloud.gcp\_tpu\_node\_info – Gather info for GCP Node
============================================================

  Note

 This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install google.cloud`.

 To use it in a playbook, specify: `google.cloud.gcp_tpu_node_info`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gather info for GCP Node

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind**  string / required  | **Choices:*** application
* machineaccount
* serviceaccount
 | The type of credential used. |
| **env\_type**  string  |  | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project**  string  |  | The Google Cloud Platform project to use. |
| **scopes**  list / elements=string  |  | Array of scopes to be used |
| **service\_account\_contents**  jsonarg  |  | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email**  string  |  | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file**  path  |  | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **zone**  string  |  | The GCP location for the TPU. If it is not provided, the provider zone is used. |

   
 Notes
-----

  Note

 * for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.

  Examples
--------

 
```
- name: get info on a node
  gcp_tpu_node_info:
    zone: us-central1-b
    project: test_project
    auth_kind: serviceaccount
    service_account_file: "/tmp/auth.pem"

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **resources**  complex  | always | List of resources  |
|  | **acceleratorType**  string  | success | The type of hardware accelerators associated with this node.  |
|  | **cidrBlock**  string  | success | The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.  |
|  | **description**  string  | success | The user-supplied description of the TPU. Maximum of 512 characters.  |
|  | **labels**  dictionary  | success | Resource labels to represent user provided metadata.  |
|  | **name**  string  | success | The immutable name of the TPU.  |
|  | **network**  string  | success | The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used.  |
|  | **networkEndpoints**  complex  | success | The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node first reach out to the first (index 0) entry.  |
|  |  | **ipAddress**  string  | success | The IP address of this network endpoint.  |
|  |  | **port**  integer  | success | The port of this network endpoint.  |
|  | **schedulingConfig**  complex  | success | Sets the scheduling options for this TPU instance.  |
|  |  | **preemptible**  boolean  | success | Defines whether the TPU instance is preemptible.  |
|  | **serviceAccount**  string  | success | The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.  |
|  | **tensorflowVersion**  string  | success | The version of Tensorflow running in the Node.  |
|  | **useServiceNetworking**  boolean  | success | Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr\_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled.  |
|  | **zone**  string  | success | The GCP location for the TPU. If it is not provided, the provider zone is used.  |

   
  
 ### Authors

 * Google Inc. (@googlecloudplatform)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/google/cloud/gcp_tpu_node_info_module.html>

hetzner.hcloud.hcloud\_volume\_info – Gather infos about your Hetzner Cloud Volumes.
====================================================================================

  Note

 This plugin is part of the [hetzner.hcloud collection](https://galaxy.ansible.com/hetzner/hcloud) (version 1.6.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install hetzner.hcloud`.

 To use it in a playbook, specify: `hetzner.hcloud.hcloud_volume_info`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gather infos about your Hetzner Cloud Volumes.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * hcloud-python >= 1.0.0

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token**  string / required  |  | This is the API Token for the Hetzner Cloud. |
| **endpoint**  string  | **Default:**"https://api.hetzner.cloud/v1" | This is the API Endpoint for the Hetzner Cloud. |
| **id**  integer  |  | The ID of the Volume you want to get. |
| **label\_selector**  string  |  | The label selector for the Volume you want to get. |
| **name**  string  |  | The name of the Volume you want to get. |

   
 See Also
--------

  See also

  [Documentation for Hetzner Cloud API](https://docs.hetzner.cloud/)

Complete reference for the Hetzner Cloud API.

    Examples
--------

 
```
- name: Gather hcloud Volume infos
  hcloud_volume_info:
  register: output
- name: Print the gathered infos
  debug:
    var: output.hcloud_volume_info

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **hcloud\_volume\_info**  complex  | always | The Volume infos as list  |
|  | **delete\_protection**  boolean  added in 0.1.0 of hetzner.hcloud | always | True if the Volume is protected for deletion  |
|  | **id**  integer  | always | Numeric identifier of the Volume  **Sample:** 1937415 |
|  | **labels**  dictionary  | always | User-defined labels (key-value pairs)  |
|  | **linux\_device**  string  added in 0.1.0 of hetzner.hcloud | always | Path to the device that contains the Volume.  **Sample:** /dev/disk/by-id/scsi-0HC\_Volume\_12345 |
|  | **location**  string  | always | Name of the location where the Volume resides in  **Sample:** fsn1 |
|  | **name**  string  | always | Name of the Volume  **Sample:** my-volume |
|  | **server**  string  | always | Name of the server where the Volume is attached to  **Sample:** my-server |
|  | **size**  string  | always | Size of the Volume  **Sample:** 10 |

   
  
 ### Authors

 * Lukas Kaemmerling (@LKaemmerling)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/hetzner/hcloud/hcloud_volume_info_module.html>

gluster.gluster.gluster\_volume – Manage GlusterFS volumes
==========================================================

  Note

 This plugin is part of the [gluster.gluster collection](https://galaxy.ansible.com/gluster/gluster) (version 1.0.2).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install gluster.gluster`.

 To use it in a playbook, specify: `gluster.gluster.gluster_volume`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * Create, remove, start, stop and tune GlusterFS volumes

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **arbiters**  integer  |  | Arbiter count for volume. |
| **bricks**  string  |  | Brick paths on servers. Multiple brick paths can be separated by commas. 
aliases: brick |
| **cluster**  list / elements=string  |  | List of hosts to use for probing and brick setup. |
| **directory**  string  |  | Directory for limit-usage. |
| **disperses**  integer  |  | Disperse count for volume. |
| **force**  boolean  | **Choices:*** no
* yes
 | If brick is being created in the root partition, module will fail. Set force to true to override this behaviour. |
| **host**  string  |  | Override local hostname (for peer probing purposes). |
| **name**  string / required  |  | The volume name. 
aliases: volume |
| **options**  dictionary  |  | A dictionary/hash with options/settings for the volume. |
| **quota**  string  |  | Quota value for limit-usage (be sure to use 10.0MB instead of 10MB, see quota list). |
| **rebalance**  boolean  | **Choices:*** **no** ←
* yes
 | Controls whether the cluster is rebalanced after changes. |
| **redundancies**  integer  |  | Redundancy count for volume. |
| **replicas**  integer  |  | Replica count for volume. |
| **start\_on\_create**  boolean  | **Choices:*** no
* **yes** ←
 | Controls whether the volume is started after creation or not. |
| **state**  string / required  | **Choices:*** absent
* present
* started
* stopped
 | Use present/absent ensure if a volume exists or not. Use started/stopped to control its availability. |
| **stripes**  integer  |  | Stripe count for volume. |
| **transport**  string  | **Choices:*** **tcp** ←
* rdma
* tcp,rdma
 | Transport type for volume. |

   
 Notes
-----

  Note

 * Requires cli tools for GlusterFS on servers.
* Will add new bricks, but not remove them.

  Examples
--------

 
```
- name: create gluster volume
  gluster.gluster.gluster_volume:
    state: present
    name: test1
    bricks: /bricks/brick1/g1
    rebalance: yes
    cluster:
      - 192.0.2.10
      - 192.0.2.11
  run_once: true

- name: tune
  gluster.gluster.gluster_volume:
    state: present
    name: test1
    options:
      performance.cache-size: 256MB

- name: Set multiple options on GlusterFS volume
  gluster.gluster.gluster_volume:
    state: present
    name: test1
    options:
      { performance.cache-size: 128MB,
        write-behind: 'off',
        quick-read: 'on'
      }

- name: start gluster volume
  gluster.gluster.gluster_volume:
    state: started
    name: test1

- name: limit usage
  gluster.gluster.gluster_volume:
    state: present
    name: test1
    directory: /foo
    quota: 20.0MB

- name: stop gluster volume
  gluster.gluster.gluster_volume:
    state: stopped
    name: test1

- name: remove gluster volume
  gluster.gluster.gluster_volume:
    state: absent
    name: test1

- name: create gluster volume with multiple bricks
  gluster.gluster.gluster_volume:
    state: present
    name: test2
    bricks: /bricks/brick1/g2,/bricks/brick2/g2
    cluster:
      - 192.0.2.10
      - 192.0.2.11
  run_once: true

- name: Remove the bricks from gluster volume
  gluster.gluster.gluster_volume:
    state: present
    name: testvol
    bricks: /bricks/brick1/b1,/bricks/brick2/b2
    cluster:
      - 10.70.42.85
    force: true
  run_once: true

- name: Reduce cluster configuration
  gluster.gluster.gluster_volume:
    state: present
    name: testvol
    bricks: /bricks/brick3/b1,/bricks/brick4/b2
    replicas: 2
    cluster:
      - 10.70.42.85
    force: true
  run_once: true

```
 ### Authors

 * Taneli Leppä (@rosmo)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/gluster/gluster/gluster_volume_module.html>

hpe.nimble.hpe\_nimble\_volume\_collection – Manage the HPE Nimble Storage volume collections
=============================================================================================

  Note

 This plugin is part of the [hpe.nimble collection](https://galaxy.ansible.com/hpe/nimble) (version 1.1.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install hpe.nimble`.

 To use it in a playbook, specify: `hpe.nimble.hpe_nimble_volume_collection`.

   New in version 1.0.0: of hpe.nimble

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * Manage the volume collections on an HPE Nimble Storage group.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * Ansible 2.9 or later
* Python 3.6 or later
* HPE Nimble Storage SDK for Python
* HPE Nimble Storage arrays running NimbleOS 5.0 or later

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **abort\_handover**  boolean  | **Choices:*** no
* yes
 | Abort in-progress handover. If for some reason a previously invoked handover request is unable to complete, this action can be used to cancel it. This operation is not supported for synchronous replication volume collections. |
| **agent\_hostname**  string  |  | Generic backup agent hostname. |
| **agent\_password**  string  |  | Generic backup agent password. |
| **agent\_username**  string  |  | Generic backup agent username. |
| **app\_cluster**  string  |  | If the application is running within a Windows cluster environment, this is the cluster name. |
| **app\_id**  string  | **Choices:*** inval
* exchange
* exchange\_dag
* hyperv
* sql2005
* sql2008
* sql2012
* sql2014
* sql2016
* sql2017
 | Application ID running on the server. |
| **app\_server**  string  |  | Application server hostname. |
| **app\_service**  string  |  | If the application is running within a windows cluster environment then this is the instance name of the service running within the cluster environment. |
| **app\_sync**  string  | **Choices:*** none
* vss
* vmware
* generic
 | Application synchronization. |
| **change\_name**  string  |  | Change name of the existing volume collection. |
| **demote**  boolean  | **Choices:*** no
* yes
 | Release ownership of the specified volume collection. The volumes associated with the volume collection will be set to offline and a snapshot will be created, then full control over the volume collection will be transferred to the new owner. This option can be used following a promote to revert the volume collection back to its prior configured state. This operation does not alter the configuration on the new owner itself, but does require the new owner to be running in order to obtain its identity information. This operation is not supported for synchronous replication volume collections. |
| **description**  string  |  | Text description of volume collection. |
| **handover**  boolean  | **Choices:*** no
* yes
 | Gracefully transfer ownership of the specified volume collection. This action can be used to pass control of the volume collection to the downstream replication partner. Ownership and full control over the volume collection will be given to the downstream replication partner. The volumes associated with the volume collection will be set to offline prior to the final snapshot being taken and replicated, thus ensuring full data synchronization as part of the transfer. By default, the new owner will automatically begin replicating the volume collection back to this node when the handover completes. |
| **host**  string / required  |  | HPE Nimble Storage IP address. |
| **invoke\_on\_upstream\_partner**  boolean  | **Choices:*** no
* yes
 | Invoke handover request on upstream partner. This operation is not supported for synchronous replication volume collections. |
| **is\_standalone\_volcoll**  boolean  | **Choices:*** no
* yes
 | Indicates whether this is a standalone volume collection. |
| **metadata**  dictionary  |  | User defined key-value pairs that augment a volume collection attributes. List of key-value pairs. Keys must be unique and non-empty. When creating an object, values must be non-empty. When updating an object, an empty value causes the corresponding key to be removed. |
| **name**  string / required  |  | Name of the volume collection. |
| **no\_reverse**  boolean  | **Choices:*** no
* yes
 | Do not automatically reverse direction of replication. Using this argument will prevent the new owner from automatically replicating the volume collection to this node when the handover completes. |
| **override\_upstream\_down**  boolean  | **Choices:*** no
* yes
 | Allow the handover request to proceed even if upstream array is down. The default behavior is to return an error when upstream is down. This option is applicable for synchronous replication only. |
| **password**  string / required  |  | HPE Nimble Storage password. |
| **promote**  boolean  | **Choices:*** no
* yes
 | Take ownership of the specified volume collection. The volumes associated with the volume collection will be set to online and be available for reading and writing. Replication will be disabled on the affected schedules and must be re-configured if desired. Snapshot retention for the affected schedules will be set to the greater of the current local or replica retention values. This operation is not supported for synchronous replication volume collections. |
| **prot\_template**  string  |  | Name of the protection template whose attributes will be used to create this volume collection. This attribute is only used for input when creating a volume collection and is not outputted. |
| **replication\_partner**  string  |  | Name of the new volume collection owner. |
| **replication\_type**  string  | **Choices:*** periodic\_snapshot
* synchronous
 | Type of replication configured for the volume collection. |
| **state**  string / required  | **Choices:*** present
* absent
* create
 | The volume collection operations. |
| **username**  string / required  |  | HPE Nimble Storage user name. |
| **validate**  boolean  | **Choices:*** no
* yes
 | Validate a volume collection with either Microsoft VSS or VMware application synchronization. |
| **vcenter\_hostname**  string  |  | VMware vCenter hostname. |
| **vcenter\_password**  string  |  | Application VMware vCenter password. A password with few constraints. |
| **vcenter\_username**  string  |  | Application VMware vCenter username. String of up to 80 alphanumeric characters, beginning with a letter. It can include ampersand (@), backslash (\), dash (-), period (.), and underscore (\_). |

   
 Notes
-----

  Note

 * This module does not support `check_mode`.

  Examples
--------

 
```
# if state is create , then create a volcoll if not present. Fails if already present.
# if state is present, then create a volcoll if not present. Succeed if it already exists.
- name: Create volume collection if not present
  hpe.nimble.hpe_nimble_volume_collection:
    host: "{{ host }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "{{ name }}"
    description: "{{ description | default(None)}}"
    state: "{{ state | default('present') }}"

- name: Delete volume collection
  hpe.nimble.hpe_nimble_volume_collection:
    host: "{{ host }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "{{ name }}"
    state: absent

- name: Promote volume collection
  hpe.nimble.hpe_nimble_volume_collection:
    host: "{{ host }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "{{ name }}"
    state: present
    promote: True

- name: Demote volume collection
  hpe.nimble.hpe_nimble_volume_collection:
    host: "{{ host }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "{{ name }}"
    state: present
    demote: True

- name: Handover volume collection
  hpe.nimble.hpe_nimble_volume_collection:
    host: "{{ host }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "{{ name }}"
    state: present
    handover: True

- name: Abort handover volume collection
  hpe.nimble.hpe_nimble_volume_collection:
    host: "{{ host }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "{{ name }}"
    state: present
    abort_handover: True

- name: Validate volume collection
  hpe.nimble.hpe_nimble_volume_collection:
    host: "{{ host }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "{{ name }}"
    state: present
    validate: True

```
 ### Authors

 * HPE Nimble Storage Ansible Team (@ar-india) <[nimble-dcs-storage-automation-eng@hpe.com](https://docs.ansible.com/cdn-cgi/l/email-protection#b9d7d0d4dbd5dc94dddaca94cacdd6cbd8dedc94d8cccdd6d4d8cdd0d6d794dcd7de9f9a8a8e829f9a8c8b829f9a8d8182d1c9dc9f9a8d8f82dad6d4)>



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/hpe/nimble/hpe_nimble_volume_collection_module.html>

junipernetworks.junos.junos – Use junos netconf plugin to run netconf commands on Juniper JUNOS platform
========================================================================================================

  Note

 This plugin is part of the [junipernetworks.junos collection](https://galaxy.ansible.com/junipernetworks/junos) (version 2.6.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install junipernetworks.junos`.

 To use it in a playbook, specify: `junipernetworks.junos.junos`.

   New in version 1.0.0: of junipernetworks.junos

  * [Synopsis](#synopsis)
* [Parameters](#parameters)

 Synopsis
--------

 * This junos plugin provides low level abstraction apis for sending and receiving netconf commands from Juniper JUNOS network devices.

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **ncclient\_device\_handler**  string  | **Default:**"junos" |  | Specifies the ncclient device handler name for Juniper junos network os. To identify the ncclient device handler name refer ncclient library documentation. |

   
 ### Authors

 * Ansible Networking Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/junipernetworks/junos/junos_netconf.html>

netapp.um\_info.na\_um\_volumes\_info – NetApp Unified Manager list volumes.
============================================================================

  Note

 This plugin is part of the [netapp.um\_info collection](https://galaxy.ansible.com/netapp/um_info) (version 21.7.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install netapp.um_info`.

 To use it in a playbook, specify: `netapp.um_info.na_um_volumes_info`.

   New in version 20.6.0: of netapp.um\_info

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * List Volumes on AIQUM.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * A AIQUM 9.7 system.
* Ansible 2.9 or later.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **feature\_flags**  dictionary   added in 21.7.0 of netapp.um\_info  |  | Enable or disable a new feature. This can be used to enable an experimental feature or disable a new feature that breaks backward compatibility. Supported keys and values are subject to change without notice. Unknown keys are ignored. trace\_apis can be set to true to enable tracing, data is written to /tmp/um\_apis.log. |
| **hostname**  string / required  |  | The hostname or IP address of the Unified Manager instance. |
| **http\_port**  integer  |  | Override the default port (443) with this port |
| **max\_records**  integer   added in 21.7.0 of netapp.um\_info  |  | Maximum number of records retrieved in a single GET request. This module loops on GET requests until all available records are fetched. If absent, AIQUM uses 1000. |
| **password**  string / required  |  | Password for the specified user. |
| **username**  string / required  |  | username of the Unified Manager instance. |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | If set to `False`, the SSL certificates will not be validated. This should only set to `False` used on personally controlled sites using self-signed certificates. |

   
 Notes
-----

  Note

 * With the 21.6.0 release, all modules have been renamed to na\_um\_<module>\_info. The old ones will continue to work but will be depecrated in the future.
* The modules prefixed with na\_um are built to support the AIQUM 9.7 platform.
* Supports check\_mode.

  Examples
--------

 
```
- name: List Volumes
  netapp.um_info.na_um_volumes_info:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **records**  list / elements=string  | always | Returns list of Volumes information  **Sample:** [{'\_links': {'self': {'href': '...'}}, 'aggregates': [{'...': None}], 'autosize': {'...': None}, 'cluster': {'...': None}, 'create\_time': '...', 'key': '...', 'language': '...', 'name': '...', 'qos': {'...': None}, 'snapmirror': {'...': None}, 'snapshot\_policy': {'...': None}, 'space': {'...': None}, 'state': '...', 'style': '...', 'svm': {'...': None, '\_links': {'self': {'...': None}}}, 'tiering': {'...': None}, 'type': '...', 'uuid': '...'}] |

   
  
 ### Authors

 * NetApp Ansible Team (@carchi8py) <[ng-ansibleteam@netapp.com](https://docs.ansible.com/cdn-cgi/l/email-protection#ddb3baf0bcb3aeb4bfb1b8a9b8bcb0fbfeeeeae6fbfee8efe6fbfee9e5e6b3b8a9bcadadfbfee9ebe6beb2b0)>



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/netapp/um_info/na_um_volumes_info_module.html>

openvswitch.openvswitch.openvswitch\_port – Manage Open vSwitch ports
=====================================================================

  Note

 This plugin is part of the [openvswitch.openvswitch collection](https://galaxy.ansible.com/openvswitch/openvswitch) (version 2.0.2).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install openvswitch.openvswitch`.

 To use it in a playbook, specify: `openvswitch.openvswitch.openvswitch_port`.

   New in version 1.0.0: of openvswitch.openvswitch

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)

 Synopsis
--------

 * Manage Open vSwitch ports

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * ovs-vsctl

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bridge**  string / required  |  | Name of bridge to manage |
| **external\_ids**  dictionary  | **Default:**{} | Dictionary of external\_ids applied to a port. |
| **port**  string / required  |  | Name of port to manage on the bridge |
| **set**  list / elements=string  |  | Set multiple properties on a port. |
| **state**  string  | **Choices:*** **present** ←
* absent
 | Whether the port should exist |
| **tag**  string  |  | VLAN tag for this port. Must be a value between 0 and 4095. |
| **timeout**  integer  | **Default:**5 | How long to wait for ovs-vswitchd to respond |

   
 Examples
--------

 
```
# Creates port eth2 on bridge br-ex
- openvswitch.openvswitch.openvswitch_port:
    bridge: br-ex
    port: eth2
    state: present

# Creates port eth6
- openvswitch.openvswitch.openvswitch_port:
    bridge: bridge-loop
    port: eth6
    state: present
    set: Interface eth6

# Creates port vlan10 with tag 10 on bridge br-ex
- openvswitch.openvswitch.openvswitch_port:
    bridge: br-ex
    port: vlan10
    tag: 10
    state: present
    set: Interface vlan10

# Assign interface id server1-vifeth6 and mac address 00:00:5E:00:53:23
# to port vifeth6 and setup port to be managed by a controller.
- openvswitch.openvswitch.openvswitch_port:
    bridge: br-int
    port: vifeth6
    state: present
  args:
    external_ids:
      iface-id: '{{ inventory_hostname }}-vifeth6'
      attached-mac: 00:00:5E:00:53:23
      vm-id: '{{ inventory_hostname }}'
      iface-status: active

```
 ### Authors

 * David Stygstra (@stygstra)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/openvswitch/openvswitch/openvswitch_port_module.html>

inspur.sm.volt\_info – Get volt information.
============================================

  Note

 This plugin is part of the [inspur.sm collection](https://galaxy.ansible.com/inspur/sm) (version 1.3.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install inspur.sm`.

 To use it in a playbook, specify: `inspur.sm.volt_info`.

   New in version 0.1.0: of inspur.sm

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Get volt information on Inspur server.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **host**  string  |  | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
| **password**  string  |  | Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
| **provider**  dictionary  |  | A dict object containing connection details. |
|  | **host**  string  |  | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
|  | **password**  string  |  | Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
|  | **username**  string  |  | Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
| **username**  string  |  | Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |

   
 Examples
--------

 
```
- name: Volt test
  hosts: ism
  connection: local
  gather_facts: no
  vars:
    ism:
      host: "{{ ansible_ssh_host }}"
      username: "{{ username }}"
      password: "{{ password }}"

  tasks:

  - name: "Get volt information"
    inspur.sm.volt_info:
      provider: "{{ ism }}"

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **changed**  boolean  | always | Check to see if a change was made on the device.  |
| **message**  string  | always | Messages returned after module execution.  |
| **state**  string  | always | Status after module execution.  |

   
  
 ### Authors

 * WangBaoshan (@ISIB-group)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/inspur/sm/volt_info_module.html>

purestorage.flashblade.purefb\_virtualhost – Manage FlashBlade Object Store Virtual Hosts
=========================================================================================

  Note

 This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install purestorage.flashblade`.

 To use it in a playbook, specify: `purestorage.flashblade.purefb_virtualhost`.

   New in version 1.6.0: of purestorage.flashblade

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * Add or delete FlashBlade Object Store Virtual Hosts

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token**  string  |  | FlashBlade API token for admin privileged user. |
| **fb\_url**  string  |  | FlashBlade management IP address or Hostname. |
| **name**  string / required  |  | Name of the Object Store Virtual Host A hostname or domain by which the array can be addressed for virtual hosted-style S3 requests. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | Define whether the Object Store Virtual Host should be added or deleted |

   
 Notes
-----

  Note

 * This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly

  Examples
--------

 
```
- name: Add Object Store Virtual Host
  purefb_virtualhost:
    name: "s3.acme.com"
    fb_url: 10.10.10.2
    api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3

- name: Delete Object Store Virtual Host
  purefb_virtualhost:
    name: "nohost.acme.com"
    state: absent
    fb_url: 10.10.10.2
    api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3

```
 ### Authors

 * Pure Storage Ansible Team (@sdodsley) <[pure-ansible-team@purestorage.com](https://docs.ansible.com/cdn-cgi/l/email-protection#e090959285cd818e9389828c85cd9485818dc6c3d3d7dbc6c3d5d2dbc6c3d4d8db9095928593948f92818785c6c3d4d6db838f8d)>



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/purestorage/flashblade/purefb_virtualhost_module.html>

ibm.qradar.rule\_info – Obtain information about one or many QRadar Rules, with filter options
==============================================================================================

  Note

 This plugin is part of the [ibm.qradar collection](https://galaxy.ansible.com/ibm/qradar) (version 1.0.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ibm.qradar`.

 To use it in a playbook, specify: `ibm.qradar.rule_info`.

   New in version 1.0.0: of ibm.qradar

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * This module obtains information about one or many QRadar Rules, with filter options

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **id**  integer  |  | Obtain only information of the Rule with provided ID |
| **name**  string  |  | Obtain only information of the Rule that matches the provided name |
| **origin**  string  | **Choices:*** SYSTEM
* OVERRIDE
* USER
 | Obtain only information of Rules that are of a certain origin |
| **owner**  string  |  | Obtain only information of Rules owned by a certain user |
| **type**  string  | **Choices:*** EVENT
* FLOW
* COMMON
* USER
 | Obtain only information for the Rules of a certain type |

   
 Notes
-----

  Note

 * You may provide many filters and they will all be applied, except for `id` as that will return only the Rule identified by the unique ID provided.

  Examples
--------

 
```
- name: Get information about the Rule named "Custom Company DDoS Rule"
  ibm.qradar.rule_info:
    name: "Custom Company DDoS Rule"
  register: custom_ddos_rule_info

- name: debugging output of the custom_ddos_rule_info registered variable
  debug:
    var: custom_ddos_rule_info

```
 ### Authors

 * Ansible Security Automation Team (@maxamillion) <<https://github.com/ansible-security>>”



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ibm/qradar/rule_info_module.html>

kubernetes.core.k8s\_service – Manage Services on Kubernetes
============================================================

  Note

 This plugin is part of the [kubernetes.core collection](https://galaxy.ansible.com/kubernetes/core) (version 1.2.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install kubernetes.core`.

 To use it in a playbook, specify: `kubernetes.core.k8s_service`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Use Openshift Python SDK to manage Services on Kubernetes

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Requirements
------------

 The below requirements are needed on the host that executes this module.

 * python >= 2.7
* openshift >= 0.6.2

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key**  string  |  | Token used to authenticate with the API. Can also be specified via K8S\_AUTH\_API\_KEY environment variable. |
| **apply**  boolean  | **Choices:*** **no** ←
* yes
 | 
`apply` compares the desired resource definition with the previously supplied resource definition, ignoring properties that are automatically generated 
`apply` works better with Services than 'force=yes' mutually exclusive with `merge_type`
 |
| **ca\_cert**  path  |  | Path to a CA certificate used to authenticate with the API. The full certificate chain must be provided to avoid certificate validation errors. Can also be specified via K8S\_AUTH\_SSL\_CA\_CERT environment variable. 
aliases: ssl\_ca\_cert |
| **client\_cert**  path  |  | Path to a certificate used to authenticate with the API. Can also be specified via K8S\_AUTH\_CERT\_FILE environment variable. 
aliases: cert\_file |
| **client\_key**  path  |  | Path to a key file used to authenticate with the API. Can also be specified via K8S\_AUTH\_KEY\_FILE environment variable. 
aliases: key\_file |
| **context**  string  |  | The name of a context found in the config file. Can also be specified via K8S\_AUTH\_CONTEXT environment variable. |
| **force**  boolean  | **Choices:*** **no** ←
* yes
 | If set to `yes`, and *state* is `present`, an existing object will be replaced. |
| **host**  string  |  | Provide a URL for accessing the API. Can also be specified via K8S\_AUTH\_HOST environment variable. |
| **kubeconfig**  path  |  | Path to an existing Kubernetes config file. If not provided, and no other connection options are provided, the openshift client will attempt to load the default configuration file from *~/.kube/config.json*. Can also be specified via K8S\_AUTH\_KUBECONFIG environment variable. |
| **merge\_type**  list / elements=string  | **Choices:*** json
* merge
* strategic-merge
 | Whether to override the default patch merge approach with a specific type. By default, the strategic merge will typically be used. For example, Custom Resource Definitions typically aren't updatable by the usual strategic merge. You may want to use `merge` if you see "strategic merge patch format is not supported" See <https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/#use-a-json-merge-patch-to-update-a-deployment>
 Requires openshift >= 0.6.2 If more than one merge\_type is given, the merge\_types will be tried in order If openshift >= 0.6.2, this defaults to `['strategic-merge', 'merge']`, which is ideal for using the same parameters on resource kinds that combine Custom Resources and built-in resources. For openshift < 0.6.2, the default is simply `strategic-merge`. |
| **name**  string / required  |  | Use to specify a Service object name. |
| **namespace**  string / required  |  | Use to specify a Service object namespace. |
| **password**  string  |  | Provide a password for authenticating with the API. Can also be specified via K8S\_AUTH\_PASSWORD environment variable. Please read the description of the `username` option for a discussion of when this option is applicable. |
| **persist\_config**  boolean  | **Choices:*** no
* yes
 | Whether or not to save the kube config refresh tokens. Can also be specified via K8S\_AUTH\_PERSIST\_CONFIG environment variable. When the k8s context is using a user credentials with refresh tokens (like oidc or gke/gcloud auth), the token is refreshed by the k8s python client library but not saved by default. So the old refresh token can expire and the next auth might fail. Setting this flag to true will tell the k8s python client to save the new refresh token to the kube config file. Default to false. Please note that the current version of the k8s python client library does not support setting this flag to True yet. The fix for this k8s python library is here: https://github.com/kubernetes-client/python-base/pull/169 |
| **ports**  list / elements=dictionary  |  | A list of ports to expose. <https://kubernetes.io/docs/concepts/services-networking/service/#multi-port-services> |
| **proxy**  string  |  | The URL of an HTTP proxy to use for the connection. Can also be specified via K8S\_AUTH\_PROXY environment variable. Please note that this module does not pick up typical proxy settings from the environment (e.g. HTTP\_PROXY). |
| **resource\_definition**  string  |  | Provide a valid YAML definition (either as a string, list, or dict) for an object when creating or updating. NOTE: *kind*, *api\_version*, *name*, and *namespace* will be overwritten by corresponding values found in the provided *resource\_definition*. 
aliases: definition, inline |
| **selector**  dictionary  |  | Label selectors identify objects this Service should apply to. <https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/> |
| **src**  path  |  | Provide a path to a file containing a valid YAML definition of an object or objects to be created or updated. Mutually exclusive with *resource\_definition*. NOTE: *kind*, *api\_version*, *name*, and *namespace* will be overwritten by corresponding values found in the configuration read in from the *src* file. Reads from the local file system. To read from the Ansible controller's file system, including vaulted files, use the file lookup plugin or template lookup plugin, combined with the from\_yaml filter, and pass the result to *resource\_definition*. See Examples below. Mutually exclusive with *template* in case of M(k8s) module. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | Determines if an object should be created, patched, or deleted. When set to `present`, an object will be created, if it does not already exist. If set to `absent`, an existing object will be deleted. If set to `present`, an existing object will be patched, if its attributes differ from those specified using *resource\_definition* or *src*. |
| **type**  string  | **Choices:*** NodePort
* ClusterIP
* LoadBalancer
* ExternalName
 | Specifies the type of Service to create. See <https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types>
 |
| **username**  string  |  | Provide a username for authenticating with the API. Can also be specified via K8S\_AUTH\_USERNAME environment variable. Please note that this only works with clusters configured to use HTTP Basic Auth. If your cluster has a different form of authentication (e.g. OAuth2 in OpenShift), this option will not work as expected and you should look into the `k8s_auth` module, as that might do what you need. |
| **validate\_certs**  boolean  | **Choices:*** no
* yes
 | Whether or not to verify the API server's SSL certificates. Can also be specified via K8S\_AUTH\_VERIFY\_SSL environment variable. 
aliases: verify\_ssl |

   
 Notes
-----

  Note

 * The OpenShift Python client wraps the K8s Python client, providing full access to all of the APIS and models available on both platforms. For API version details and additional information visit <https://github.com/openshift/openshift-restclient-python>
* To avoid SSL certificate validation errors when `validate_certs` is *True*, the full certificate chain for the API server must be provided via `ca_cert` or in the kubeconfig file.

  Examples
--------

 
```
- name: Expose https port with ClusterIP
  kubernetes.core.k8s_service:
    state: present
    name: test-https
    namespace: default
    ports:
    - port: 443
      protocol: TCP
    selector:
      key: special

- name: Expose https port with ClusterIP using spec
  kubernetes.core.k8s_service:
    state: present
    name: test-https
    namespace: default
    inline:
      spec:
        ports:
        - port: 443
          protocol: TCP
        selector:
          key: special

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **result**  complex  | success | The created, patched, or otherwise present Service object. Will be empty in the case of a deletion.  |
|  | **api\_version**  string  | success | The versioned schema of this representation of an object.  |
|  | **kind**  string  | success | Always 'Service'.  |
|  | **metadata**  complex  | success | Standard object metadata. Includes name, namespace, annotations, labels, etc.  |
|  | **spec**  complex  | success | Specific attributes of the object. Will vary based on the *api\_version* and *kind*.  |
|  | **status**  complex  | success | Current status details for the object.  |

   
  
 ### Authors

 * KubeVirt Team (@kubevirt)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/kubernetes/core/k8s_service_module.html>

ngine\_io.vultr.vultr\_user\_info – Get information about the Vultr user available.
===================================================================================

  Note

 This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ngine_io.vultr`.

 To use it in a playbook, specify: `ngine_io.vultr.vultr_user_info`.

   New in version 0.1.0: of ngine\_io.vultr

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Get infos about users available in Vultr.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account**  string  | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint**  string  |  | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key**  string  |  | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries**  integer  |  | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay**  integer  |  | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout**  integer  |  | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | Validate SSL certs of the Vultr API. |

   
 Notes
-----

  Note

 * Also see the API documentation on <https://www.vultr.com/api/>.

  Examples
--------

 
```
- name: Get Vultr user infos
  ngine_io.vultr.vultr_user_info:
  register: result

- name: Print the infos
  debug:
    var: result.vultr_user_info

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api**  complex  | success | Response from Vultr API with a few additions/modification  |
|  | **api\_account**  string  | success | Account used in the ini file to select the key  **Sample:** default |
|  | **api\_endpoint**  string  | success | Endpoint used for the API requests  **Sample:** https://api.vultr.com |
|  | **api\_retries**  integer  | success | Amount of max retries for the API requests  **Sample:** 5 |
|  | **api\_retry\_max\_delay**  integer  | success | Exponential backoff delay in seconds between retries up to this max delay value.  **Sample:** 12 |
|  | **api\_timeout**  integer  | success | Timeout used for the API requests  **Sample:** 60 |
| **vultr\_user\_info**  complex  | available | Response from Vultr API as list  |
|  | **acls**  list / elements=string  | success | List of ACLs of the user.  **Sample:** ['manage\_users', 'support', 'upgrade'] |
|  | **api\_enabled**  boolean  | success | Whether the API is enabled or not.  **Sample:** True |
|  | **api\_key**  string  | only after resource was created | API key of the user.  **Sample:** 567E6K567E6K567E6K567E6K567E6K |
|  | **email**  string  | success | Email of the user.  **Sample:** john@example.com |
|  | **id**  string  | success | ID of the user.  **Sample:** 5904bc6ed9234 |
|  | **name**  string  | success | Name of the user.  **Sample:** john |

   
  
 ### Authors

 * Yanis Guenane (@Spredzy)
* René Moser (@resmo)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ngine_io/vultr/vultr_user_info_module.html>

netbox.netbox.netbox\_vrf – Create, update or delete vrfs within Netbox
=======================================================================

  Note

 This plugin is part of the [netbox.netbox collection](https://galaxy.ansible.com/netbox/netbox) (version 3.3.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install netbox.netbox`.

 To use it in a playbook, specify: `netbox.netbox.netbox_vrf`.

   New in version 0.1.0: of netbox.netbox

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Creates, updates or removes vrfs from Netbox

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * pynetbox

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cert**  raw  |  | Certificate path |
| **data**  dictionary / required  |  | Defines the vrf configuration |
|  | **custom\_fields**  dictionary  |  | must exist in Netbox |
|  | **description**  string  |  | The description of the vrf |
|  | **enforce\_unique**  boolean  | **Choices:*** no
* yes
 | Prevent duplicate prefixes/IP addresses within this VRF |
|  | **export\_targets**  list / elements=string   added in 2.0.0 of netbox.netbox  |  | Export targets tied to VRF |
|  | **import\_targets**  list / elements=string   added in 2.0.0 of netbox.netbox  |  | Import targets tied to VRF |
|  | **name**  string / required  |  | The name of the vrf |
|  | **rd**  string  |  | The RD of the VRF. Must be quoted to pass as a string. |
|  | **tags**  list / elements=raw  |  | Any tags that the vrf may need to be associated with |
|  | **tenant**  raw  |  | The tenant that the vrf will be assigned to |
| **netbox\_token**  string / required  |  | The token created within Netbox to authorize API access |
| **netbox\_url**  string / required  |  | URL of the Netbox instance resolvable by Ansible control host |
| **query\_params**  list / elements=string  |  | This can be used to override the specified values in ALLOWED\_QUERY\_PARAMS that is defined in plugins/module\_utils/netbox\_utils.py and provides control to users on what may make an object unique in their environment. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | Use `present` or `absent` for adding or removing. |
| **validate\_certs**  raw  | **Default:**"yes" | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |

   
 Notes
-----

  Note

 * Tags should be defined as a YAML list
* This should be ran with connection `local` and hosts `localhost`

  Examples
--------

 
```
- name: "Test Netbox modules"
  connection: local
  hosts: localhost
  gather_facts: False

  tasks:
    - name: Create vrf within Netbox with only required information
      netbox_vrf:
        netbox_url: http://netbox.local
        netbox_token: thisIsMyToken
        data:
          name: Test VRF
        state: present

    - name: Delete vrf within netbox
      netbox_vrf:
        netbox_url: http://netbox.local
        netbox_token: thisIsMyToken
        data:
          name: Test VRF
        state: absent

    - name: Create vrf with all information
      netbox_vrf:
        netbox_url: http://netbox.local
        netbox_token: thisIsMyToken
        data:
          name: Test VRF
          rd: "65000:1"
          tenant: Test Tenant
          enforce_unique: true
          import_targets:
            - "65000:65001"
          export_targets:
            - "65000:65001"
          description: VRF description
          tags:
            - Schnozzberry
        state: present

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **msg**  string  | always | Message indicating failure or info about what has been achieved  |
| **vrf**  dictionary  | success (when *state=present*) | Serialized object as created or already existent within Netbox  |

   
  
 ### Authors

 * Mikhail Yohman (@FragmentedPacket)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/netbox/netbox/netbox_vrf_module.html>

netapp\_eseries.santricity.netapp\_e\_volume\_copy – NetApp E-Series create volume copy pairs
=============================================================================================

  Note

 This plugin is part of the [netapp\_eseries.santricity collection](https://galaxy.ansible.com/netapp_eseries/santricity) (version 1.2.13).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install netapp_eseries.santricity`.

 To use it in a playbook, specify: `netapp_eseries.santricity.netapp_e_volume_copy`.

   New in version 2.2: of netapp\_eseries.santricity

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Create and delete snapshots images on volume groups for NetApp E-series storage arrays.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_password**  string / required  |  | The password to authenticate with the SANtricity WebServices Proxy or embedded REST API. |
| **api\_url**  string / required  |  | The url to the SANtricity WebServices Proxy or embedded REST API, for example `https://prod-1.wahoo.acme.com/devmgr/v2`. |
| **api\_username**  string / required  |  | The username to authenticate with the SANtricity WebServices Proxy or embedded REST API. |
| **copy\_priority**  integer  | **Default:**0 | Copy priority level |
| **create\_copy\_pair\_if\_does\_not\_exist**  boolean  | **Choices:*** no
* **yes** ←
 | Defines if a copy pair will be created if it does not exist. If set to True destination\_volume\_id and source\_volume\_id are required. |
| **destination\_volume\_id**  string  |  | The id of the volume copy destination. If used, must be paired with source\_volume\_id Mutually exclusive with volume\_copy\_pair\_id, and search\_volume\_id |
| **onlineCopy**  boolean  | **Choices:*** **no** ←
* yes
 | Whether copy should be online |
| **search\_volume\_id**  string  |  | Searches for all valid potential target and source volumes that could be used in a copy\_pair Mutually exclusive with volume\_copy\_pair\_id, destination\_volume\_id and source\_volume\_id |
| **source\_volume\_id**  string  |  | The id of the volume copy source. If used, must be paired with destination\_volume\_id Mutually exclusive with volume\_copy\_pair\_id, and search\_volume\_id |
| **ssid**  string  | **Default:**"1" | Storage system identifier |
| **start\_stop\_copy**  string  | **Choices:*** start
* stop
 | starts a re-copy or stops a copy in progress Note: If you stop the initial file copy before it it done the copy pair will be destroyed Requires volume\_copy\_pair\_id |
| **state**  string / required  | **Choices:*** present
* absent
 | Whether the specified volume copy pair should exist or not. |
| **targetWriteProtected**  boolean  | **Choices:*** no
* **yes** ←
 | Whether target should be write protected |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | Should https certificates be validated? |
| **volume\_copy\_pair\_id**  string  |  | The id of a given volume copy pair Mutually exclusive with destination\_volume\_id, source\_volume\_id, and search\_volume\_id Can use to delete or check presence of volume pairs Must specify this or (destination\_volume\_id and source\_volume\_id) |

   
 Notes
-----

  Note

 * The E-Series Ansible modules require either an instance of the Web Services Proxy (WSP), to be available to manage the storage-system, or an E-Series storage-system that supports the Embedded Web Services API.
* Embedded Web Services is currently available on the E2800, E5700, EF570, and newer hardware models.
* M(netapp\_e\_storage\_system) may be utilized for configuring the systems managed by a WSP instance.

  Examples
--------

 
```
---
msg:
    description: Success message
    returned: success
    type: str
    sample: Json facts for the volume copy that was created.

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **msg**  string  | success | Success message  **Sample:** Created Volume Copy Pair with ID |

   
  
 ### Authors

 * Kevin Hulquest (@hulquest)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/netapp_eseries/santricity/netapp_e_volume_copy_module.html>

ovirt.ovirt.ovirt\_vnic\_profile\_info – Retrieve information about one or more oVirt/RHV vnic profiles
=======================================================================================================

  Note

 This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ovirt.ovirt`.

 To use it in a playbook, specify: `ovirt.ovirt.ovirt_vnic_profile_info`.

   New in version 1.0.0: of ovirt.ovirt

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Retrieve information about one or more oVirt/RHV vnic profiles.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth**  dictionary / required  |  | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
|  | **ca\_file**  string  |  | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
|  | **compress**  boolean  | **Choices:*** no
* **yes** ←
 | Flag indicating if compression is used for connection. |
|  | **headers**  dictionary  |  | Dictionary of HTTP headers to be added to each API call. |
|  | **hostname**  string  |  | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
|  | **insecure**  boolean  | **Choices:*** **no** ←
* yes
 | A boolean flag that indicates if the server TLS certificate and host name should be checked. |
|  | **kerberos**  boolean  | **Choices:*** no
* yes
 | A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
|  | **password**  string  |  | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
|  | **timeout**  integer  |  | Number of seconds to wait for response. |
|  | **token**  string  |  | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
|  | **url**  string  |  | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
|  | **username**  string  |  | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested**  boolean  | **Choices:*** **no** ←
* yes
 | If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows**  list / elements=string   added in 1.5.0 of ovirt.ovirt  |  | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **max**  integer  |  | The maximum number of results to return. |
| **name**  string  |  | Name of vnic profile. |
| **nested\_attributes**  list / elements=string  |  | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |

   
 Notes
-----

  Note

 * This module returns a variable `ovirt_vnic_profiles`, which contains a list of vnic profiles. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure it’s installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0

  Examples
--------

 
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:

# Gather information 10 vnic profiles
- ovirt.ovirt.ovirt_vnic_profile_info:
    max: 10
  register: result
- ansible.builtin.debug:
    msg: "{{ result.ovirt_vnic_profiles }}"

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_vnic\_profiles**  list / elements=string  | On success. | List of dictionaries describing the vnic profiles. Vnic\_profile attributes are mapped to dictionary keys, all vnic profiles attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/vnic\_profile.  |

   
  
 ### Authors

 * Martin Necas (@mnecas)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ovirt/ovirt/ovirt_vnic_profile_info_module.html>

servicenow.servicenow.snow\_record\_find – Search for multiple records from ServiceNow
======================================================================================

  Note

 This plugin is part of the [servicenow.servicenow collection](https://galaxy.ansible.com/servicenow/servicenow) (version 1.0.6).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install servicenow.servicenow`.

 To use it in a playbook, specify: `servicenow.servicenow.snow_record_find`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gets multiple records from a specified table from ServiceNow based on a query dictionary.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * python pysnow (pysnow)
* python requests (requests)

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth**  string  | **Choices:*** **basic** ←
* oauth
* token
* openid
 | The method used to authenticate with the Service Now instance. Basic authentication uses user name and password. OAuth authentication uses a client id and secret in addition to Basic authentication. Token authentication uses a bearer token in addition to OAuth authentication. OpenID Connect authentication, an extension of OAuth 2.0, uses a provider, like Okta, to obtain a bearer token. If the vaule is not specified in the task, the value of environment variable `SN_AUTH` will be used instead. |
| **client\_id**  string  |  | Client ID generated by ServiceNow. Required when using OAuth or OpenID authentication, unless token is specified. If the value is not specified in the task, the value of environment variable `SN_CLIENTID` will be used instead. |
| **client\_secret**  string  |  | Client Secret associated with client id. Required when using OAuth or OpenID authentication, unless token is specified. If the value is not specified in the task, the value of environment variable `SN_CLIENTSECRET` will be used instead. |
| **display\_value**  boolean  | **Choices:*** **no** ←
* yes
 | sysparm\_display\_value |
| **exclude\_reference\_link**  boolean  | **Choices:*** **no** ←
* yes
 | sysparm\_exclude\_reference\_link |
| **host**  string  |  | The ServiceNow hostname. This value is FQDN for ServiceNow host. If the value is not specified in the task, the value of environment variable `SN_HOST` will be used instead. Mutually exclusive with `instance`. |
| **instance**  string  |  | The ServiceNow instance name, without the domain, service-now.com. If the value is not specified in the task, the value of environment variable `SN_INSTANCE` will be used instead. |
| **log\_level**  string  | **Choices:*** debug
* info
* **normal** ←
 | Set the logging level of the module |
| **max\_records**  integer  | **Default:**20 | Maximum number of records to return. |
| **openid**  dictionary  |  | If the result of a previous SNOW method, using OpenID, was registered, supply the `openid` key, from the result. The `openid` key contains a dictionary with the bearer token, which, if still valid, can be reused. If the bearer token is no longer valid, the dictionary includes all of the previously supplied `openid_` fields needed to make a new token request. Any other credentials previously supplied, must be provided again. |
| **openid\_issuer**  string  |  | The URL for your organization's OpenID Connect provider. Okta, an OpenID provider, supports Single Sign-On with a url like 'https://yourorg.oktapreview.com/oauth2'. Okta supports application-level authentication using a url like 'https://yourorg.oktapreview.com/oauth2/TH151s50m3L0ngSTr1NG'. If the value is not specified in the task, the value of environment variable `OPENID_ISSUER` will be used instead. |
| **openid\_scope**  list / elements=string  | **Default:**["openid"] | A list of scopes to be included in the access token. Supported scopes for this application are address, email, groups, openid, phone, profile, of which, openid must be one. If the value is not specified in the task, the value of environment variable `OPENID_SCOPE` will be used instead. |
| **order\_by**  string  | **Default:**"-created\_on" | Field to sort the results on. Can prefix with "-" or "+" to change descending or ascending sort order. |
| **password**  string  |  | Password for username. Required whether using Basic, OAuth or OpenID authentication. If the value is not specified in the task, the value of environment variable `SN_PASSWORD` will be used instead. |
| **query**  dictionary / required  |  | Dict to query for records. |
| **raise\_on\_empty**  boolean  | **Choices:*** no
* **yes** ←
 | If set to false, will not cause a SNOW method to raise an exception should it return no records. This is particurlarly useful in snow\_record\_find, when not sure if any record exists. |
| **return\_fields**  list / elements=string  |  | Fields of the record to return in the json. By default, all fields will be returned. |
| **suppress\_pagination\_header**  boolean  | **Choices:*** **no** ←
* yes
 | sysparm\_suppress\_pagination\_header |
| **table**  string  | **Default:**"incident" | Table to query for records. |
| **token**  string  |  | Bearer token associated with client id and secret. Can be used in place of client id and secret for OpenID authentication. If the value is not specified in the task, the value of environment variable `SN_TOKEN` will be used instead. |
| **username**  string  |  | Name of user for connection to ServiceNow. Required whether using Basic, OAuth or OpenID authentication. If the value is not specified in the task, the value of environment variable `SN_USERNAME` will be used instead. |

   
 Examples
--------

 
```
- name: Search for incident assigned to group, return specific fields
  servicenow.servicenow.snow_record_find:
    username: ansible_test
    password: my_password
    instance: dev99999
    table: incident
    query:
      assignment_group: d625dccec0a8016700a222a0f7900d06
    return_fields:
      - number
      - opened_at

- name: Search for incident assigned to group, explicitly using basic authentication, return specific fields, and suppress exception if not found
  servicenow.servicenow.snow_record_find:
    auth: basic
    username: ansible_test
    password: my_password
    instance: dev99999
    raise_on_empty: False
    table: incident
    query:
      assignment_group: d625dccec0a8016700a222a0f7900d06
    return_fields:
      - number
      - opened_at

- name: Search for incident using host instead of instance
  servicenow.servicenow.snow_record_find:
    username: ansible_test
    password: my_password
    host: dev99999.mycustom.domain.com
    table: incident
    query:
      assignment_group: d625dccec0a8016700a222a0f7900d06
    return_fields:
      - number
      - opened_at

- name: Using OAuth, search for incident assigned to group, return specific fields
  servicenow.servicenow.snow_record_find:
    auth: oauth
    username: ansible_test
    password: my_password
    client_id: "1234567890abcdef1234567890abcdef"
    client_secret: "Password1!"
    instance: dev99999
    table: incident
    query:
      assignment_group: d625dccec0a8016700a222a0f7900d06
    return_fields:
      - number
      - opened_at

- name: Using a bearer token, search for incident assigned to group, return specific fields
  servicenow.servicenow.snow_record_find:
    auth: token
    username: ansible_test
    password: my_password
    token: "y0urHorrend0u51yL0ngT0kenG0esH3r3..."
    instance: dev99999
    table: incident
    query:
      assignment_group: d625dccec0a8016700a222a0f7900d06
    return_fields:
      - number
      - opened_at

- name: Using OpenID, search for incident assigned to group, return specific fields
  servicenow.servicenow.snow_record_find:
    auth: openid
    username: ansible_test
    password: my_password
    client_id: "1234567890abcdef1234567890abcdef"
    client_secret: "Password1!"
    openid_issuer: "https://yourorg.oktapreview.com/oauth2/TH151s50M3L0ngStr1NG"
    openid_scope: "openid email"
    instance: dev99999
    table: incident
    query:
      assignment_group: d625dccec0a8016700a222a0f7900d06
    return_fields:
      - number
      - opened_at
  register: response

- name: Using previous OpenID response, search for incident assigned to group, return specific fields
  servicenow.servicenow.snow_record_find:
    auth: openid
    username: ansible_test
    password: my_password
    client_id: "1234567890abcdef1234567890abcdef"
    client_secret: "Password1!"
    openid: "{{ response['openid'] }}"
    instance: dev99999
    table: incident
    query:
      assignment_group: d625dccec0a8016700a222a0f7900d06
    return_fields:
      - number
      - opened_at

- name: Find open standard changes with my template
  servicenow.servicenow.snow_record_find:
    username: ansible_test
    password: my_password
    instance: dev99999
    table: change_request
    query:
      AND:
        equals:
          active: "True"
          type: "standard"
          u_change_stage: "80"
        contains:
          u_template: "MY-Template"
    return_fields:
      - sys_id
      - number
      - sys_created_on
      - sys_updated_on
      - u_template
      - active
      - type
      - u_change_stage
      - sys_created_by
      - description
      - short_description

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **record**  dictionary  | always | The full contents of the matching ServiceNow records as a list of records.  |

   
  
 ### Authors

 * Tim Rightnour (@garbled1)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/servicenow/servicenow/snow_record_find_module.html>

amazon.aws.aws\_resource\_actions – summarizes all “resource:actions” completed
===============================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.aws_resource_actions`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Examples](#examples)

 Synopsis
--------

 * Ansible callback plugin for collecting the AWS actions completed by all boto3 modules using AnsibleAWSModule in a playbook. Botocore endpoint logs need to be enabled for those modules, which can be done easily by setting debug\_botocore\_endpoint\_logs to True for group/aws using module\_defaults.

 Requirements
------------

 The below requirements are needed on the local controller node that executes this callback.

 * whitelisting in configuration - see examples section below for details.

 Examples
--------

 
```
example: >
  To enable, add this to your ansible.cfg file in the defaults block
    [defaults]
    callback_whitelist = aws_resource_actions
sample output: >
#
# AWS ACTIONS: ['s3:PutBucketAcl', 's3:HeadObject', 's3:DeleteObject', 's3:PutObjectAcl', 's3:CreateMultipartUpload',
#               's3:DeleteBucket', 's3:GetObject', 's3:DeleteObjects', 's3:CreateBucket', 's3:CompleteMultipartUpload',
#               's3:ListObjectsV2', 's3:HeadBucket', 's3:UploadPart', 's3:PutObject']
#
sample output: >
#
# AWS ACTIONS: ['ec2:DescribeVpcAttribute', 'ec2:DescribeVpcClassicLink', 'ec2:ModifyVpcAttribute', 'ec2:CreateTags',
#               'sts:GetCallerIdentity', 'ec2:DescribeSecurityGroups', 'ec2:DescribeTags', 'ec2:DescribeVpcs', 'ec2:CreateVpc']
#

```


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_resource_actions_callback.html>

amazon.aws.aws\_ec2 – EC2 inventory source
==========================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.aws_ec2`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * Get inventory hosts from Amazon Web Services EC2.
* Uses a YAML configuration file that ends with `aws_ec2.(yml|yaml`).

 Requirements
------------

 The below requirements are needed on the local controller node that executes this inventory.

 * boto3
* botocore

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **aws\_access\_key**  string  |  |  env:EC2\_ACCESS\_KEY   env:AWS\_ACCESS\_KEY   env:AWS\_ACCESS\_KEY\_ID  | The AWS access key to use. 
aliases: aws\_access\_key\_id |
| **aws\_profile**  string  |  |  env:AWS\_DEFAULT\_PROFILE   env:AWS\_PROFILE  | The AWS profile 
aliases: boto\_profile |
| **aws\_secret\_key**  string  |  |  env:EC2\_SECRET\_KEY   env:AWS\_SECRET\_KEY   env:AWS\_SECRET\_ACCESS\_KEY  | The AWS secret key that corresponds to the access key. 
aliases: aws\_secret\_access\_key |
| **aws\_security\_token**  string  |  |  env:EC2\_SECURITY\_TOKEN   env:AWS\_SESSION\_TOKEN   env:AWS\_SECURITY\_TOKEN  | The AWS security token if using temporary access and secret keys. |
| **cache**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [inventory]cache = no    env:ANSIBLE\_INVENTORY\_CACHE  | Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work. |
| **cache\_connection**  string  |  |  ini entries:  [defaults]fact\_caching\_connection = None   [inventory]cache\_connection = None    env:ANSIBLE\_CACHE\_PLUGIN\_CONNECTION   env:ANSIBLE\_INVENTORY\_CACHE\_CONNECTION  | Cache connection data or path, read cache plugin documentation for specifics. |
| **cache\_plugin**  string  | **Default:**"memory" |  ini entries:  [defaults]fact\_caching = memory   [inventory]cache\_plugin = memory    env:ANSIBLE\_CACHE\_PLUGIN   env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN  | Cache plugin to use for the inventory's source data. |
| **cache\_prefix**  string  | **Default:**"ansible\_inventory\_" |  ini entries:  [default]fact\_caching\_prefix = ansible\_inventory\_   [inventory]cache\_prefix = ansible\_inventory\_    env:ANSIBLE\_CACHE\_PLUGIN\_PREFIX   env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN\_PREFIX  | Prefix to use for cache plugin files/tables |
| **cache\_timeout**  integer  | **Default:**3600 |  ini entries:  [defaults]fact\_caching\_timeout = 3600   [inventory]cache\_timeout = 3600    env:ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT   env:ANSIBLE\_INVENTORY\_CACHE\_TIMEOUT  | Cache duration in seconds |
| **compose**  dictionary  | **Default:**{} |  | Create vars from jinja2 expressions. |
| **exclude\_filters**  list / elements=string  | **Default:**[] |  | A list of filters. Any instances matching one of the filters are excluded from the result. The filters from `exclude_filters` take priority over the `include_filters` and `filters` keys Available filters are listed here <http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html#options>. Every entry in this list triggers a search query. As such, from a performance point of view, it's better to keep the list as short as possible. |
| **filters**  dictionary  | **Default:**{} |  | A dictionary of filter value pairs. Available filters are listed here <http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html#options>. |
| **groups**  dictionary  | **Default:**{} |  | Add hosts to group based on Jinja2 conditionals. |
| **hostnames**  list / elements=string  | **Default:**[] |  | A list in order of precedence for hostname variables. You can use the options specified in <http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html#options>. To use tags as hostnames use the syntax tag:Name=Value to use the hostname Name\_Value, or tag:Name to use the value of the Name tag. |
| **iam\_role\_arn**  string  |  |  | The ARN of the IAM role to assume to perform the inventory lookup. You should still provide AWS credentials with enough privilege to perform the AssumeRole action. |
| **include\_extra\_api\_calls**  boolean  | **Choices:*** **no** ←
* yes
 |  | Add two additional API calls for every instance to include 'persistent' and 'events' host variables. Spot instances may be persistent and instances may have associated events. |
| **include\_filters**  list / elements=string  | **Default:**[] |  | A list of filters. Any instances matching at least one of the filters are included in the result. Available filters are listed here <http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html#options>. Every entry in this list triggers a search query. As such, from a performance point of view, it's better to keep the list as short as possible. |
| **keyed\_groups**  list / elements=string  | **Default:**[] |  | Add hosts to group based on the values of a variable. |
| **leading\_separator**  boolean   added in 2.11 of ansible.builtin  | **Choices:*** no
* **yes** ←
 |  | Use in conjunction with keyed\_groups. By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is "" and the default separator is "\_". Set this option to False to omit the leading underscore (or other separator) if no prefix is given. If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. |
| **plugin**  string / required  | **Choices:*** aws\_ec2
* amazon.aws.aws\_ec2
 |  | Token that ensures this is a source file for the plugin. |
| **regions**  list / elements=string  | **Default:**[] |  | A list of regions in which to describe EC2 instances. If empty (the default) default this will include all regions, except possibly restricted ones like us-gov-west-1 and cn-north-1. |
| **strict**  boolean  | **Choices:*** **no** ←
* yes
 |  | If `yes` make invalid entries a fatal error, otherwise skip and continue. Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. |
| **strict\_permissions**  boolean  | **Choices:*** no
* **yes** ←
 |  | By default if a 403 (Forbidden) error code is encountered this plugin will fail. You can set this option to False in the inventory config file which will allow 403 errors to be gracefully skipped. |
| **use\_contrib\_script\_compatible\_ec2\_tag\_keys**  boolean  | **Choices:*** **no** ←
* yes
 |  | Expose the host tags with ec2\_tag\_TAGNAME keys like the old ec2.py inventory script. The use of this feature is discouraged and we advise to migrate to the new ``tags`` structure. |
| **use\_contrib\_script\_compatible\_sanitization**  boolean  | **Choices:*** **no** ←
* yes
 |  | By default this plugin is using a general group name sanitization to create safe and usable group names for use in Ansible. This option allows you to override that, in efforts to allow migration from the old inventory script and matches the sanitization of groups when the script's ``replace\_dash\_in\_groups`` option is set to ``False``. To replicate behavior of ``replace\_dash\_in\_groups = True`` with constructed groups, you will need to replace hyphens with underscores via the regex\_replace filter for those entries. For this to work you should also turn off the TRANSFORM\_INVALID\_GROUP\_CHARS setting, otherwise the core engine will just use the standard sanitization on top. This is not the default as such names break certain functionality as not all characters are valid Python identifiers which group names end up being used as. |
| **use\_extra\_vars**  boolean   added in 2.11 of ansible.builtin  | **Choices:*** **no** ←
* yes
 |  ini entries:  [inventory\_plugins]use\_extra\_vars = no    env:ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS  | Merge extra vars into the available variables for composition (highest precedence). |

   
 Notes
-----

  Note

 * If no credentials are provided and the control node has an associated IAM instance profile then the role will be used for authentication.

  Examples
--------

 
```
# Minimal example using environment vars or instance role credentials
# Fetch all hosts in us-east-1, the hostname is the public DNS if it exists, otherwise the private IP address
plugin: aws_ec2
regions:
  - us-east-1

# Example using filters, ignoring permission errors, and specifying the hostname precedence
plugin: aws_ec2
# The values for profile, access key, secret key and token can be hardcoded like:
boto_profile: aws_profile
# or you could use Jinja as:
# boto_profile: "{{ lookup('env', 'AWS_PROFILE') | default('aws_profile', true) }}"
# Populate inventory with instances in these regions
regions:
  - us-east-1
  - us-east-2
filters:
  # All instances with their `Environment` tag set to `dev`
  tag:Environment: dev
  # All dev and QA hosts
  tag:Environment:
    - dev
    - qa
  instance.group-id: sg-xxxxxxxx
# Ignores 403 errors rather than failing
strict_permissions: False
# Note: I(hostnames) sets the inventory_hostname. To modify ansible_host without modifying
# inventory_hostname use compose (see example below).
hostnames:
  - tag:Name=Tag1,Name=Tag2  # Return specific hosts only
  - tag:CustomDNSName
  - dns-name
  - name: 'tag:Name=Tag1,Name=Tag2'
  - name: 'private-ip-address'
    separator: '_'
    prefix: 'tag:Name'

# Example using constructed features to create groups and set ansible_host
plugin: aws_ec2
regions:
  - us-east-1
  - us-west-1
# keyed_groups may be used to create custom groups
strict: False
keyed_groups:
  # Add e.g. x86_64 hosts to an arch_x86_64 group
  - prefix: arch
    key: 'architecture'
  # Add hosts to tag_Name_Value groups for each Name/Value tag pair
  - prefix: tag
    key: tags
  # Add hosts to e.g. instance_type_z3_tiny
  - prefix: instance_type
    key: instance_type
  # Create security_groups_sg_abcd1234 group for each SG
  - key: 'security_groups|json_query("[].group_id")'
    prefix: 'security_groups'
  # Create a group for each value of the Application tag
  - key: tags.Application
    separator: ''
  # Create a group per region e.g. aws_region_us_east_2
  - key: placement.region
    prefix: aws_region
  # Create a group (or groups) based on the value of a custom tag "Role" and add them to a metagroup called "project"
  - key: tags['Role']
    prefix: foo
    parent_group: "project"
# Set individual variables with compose
compose:
  # Use the private IP address to connect to the host
  # (note: this does not modify inventory_hostname, which is set via I(hostnames))
  ansible_host: private_ip_address

# Example using include_filters and exclude_filters to compose the inventory.
plugin: aws_ec2
regions:
  - us-east-1
  - us-west-1
include_filters:
- tag:Name:
  - 'my_second_tag'
- tag:Name:
  - 'my_third_tag'
exclude_filters:
- tag:Name:
  - 'my_first_tag'

```
 ### Authors

 * Sloane Hertel (@s-hertel)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_ec2_inventory.html>

amazon.aws.aws\_rds – rds instance source
=========================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.aws_rds`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)

 Synopsis
--------

 * Get instances and clusters from Amazon Web Services RDS.
* Uses a YAML configuration file that ends with aws\_rds.(yml|yaml).

 Requirements
------------

 The below requirements are needed on the local controller node that executes this inventory.

 * boto3
* botocore

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **aws\_access\_key**  string  |  |  env:EC2\_ACCESS\_KEY   env:AWS\_ACCESS\_KEY   env:AWS\_ACCESS\_KEY\_ID  | The AWS access key to use. 
aliases: aws\_access\_key\_id |
| **aws\_profile**  string  |  |  env:AWS\_DEFAULT\_PROFILE   env:AWS\_PROFILE  | The AWS profile 
aliases: boto\_profile |
| **aws\_secret\_key**  string  |  |  env:EC2\_SECRET\_KEY   env:AWS\_SECRET\_KEY   env:AWS\_SECRET\_ACCESS\_KEY  | The AWS secret key that corresponds to the access key. 
aliases: aws\_secret\_access\_key |
| **aws\_security\_token**  string  |  |  env:EC2\_SECURITY\_TOKEN   env:AWS\_SESSION\_TOKEN   env:AWS\_SECURITY\_TOKEN  | The AWS security token if using temporary access and secret keys. |
| **cache**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [inventory]cache = no    env:ANSIBLE\_INVENTORY\_CACHE  | Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work. |
| **cache\_connection**  string  |  |  ini entries:  [defaults]fact\_caching\_connection = None   [inventory]cache\_connection = None    env:ANSIBLE\_CACHE\_PLUGIN\_CONNECTION   env:ANSIBLE\_INVENTORY\_CACHE\_CONNECTION  | Cache connection data or path, read cache plugin documentation for specifics. |
| **cache\_plugin**  string  | **Default:**"memory" |  ini entries:  [defaults]fact\_caching = memory   [inventory]cache\_plugin = memory    env:ANSIBLE\_CACHE\_PLUGIN   env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN  | Cache plugin to use for the inventory's source data. |
| **cache\_prefix**  string  | **Default:**"ansible\_inventory\_" |  ini entries:  [default]fact\_caching\_prefix = ansible\_inventory\_   [inventory]cache\_prefix = ansible\_inventory\_    env:ANSIBLE\_CACHE\_PLUGIN\_PREFIX   env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN\_PREFIX  | Prefix to use for cache plugin files/tables |
| **cache\_timeout**  integer  | **Default:**3600 |  ini entries:  [defaults]fact\_caching\_timeout = 3600   [inventory]cache\_timeout = 3600    env:ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT   env:ANSIBLE\_INVENTORY\_CACHE\_TIMEOUT  | Cache duration in seconds |
| **compose**  dictionary  | **Default:**{} |  | Create vars from jinja2 expressions. |
| **filters**  string  | **Default:**{} |  | A dictionary of filter value pairs. Available filters are listed here <https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-instances.html#options>. If you filter by db-cluster-id and *include\_clusters* is True it will apply to clusters as well. |
| **groups**  dictionary  | **Default:**{} |  | Add hosts to group based on Jinja2 conditionals. |
| **iam\_role\_arn**  string  |  |  | The ARN of the IAM role to assume to perform the inventory lookup. You should still provide AWS credentials with enough privilege to perform the AssumeRole action. |
| **include\_clusters**  boolean  | **Choices:*** **no** ←
* yes
 |  | Whether or not to query for Aurora clusters as well as instances |
| **keyed\_groups**  list / elements=string  | **Default:**[] |  | Add hosts to group based on the values of a variable. |
| **leading\_separator**  boolean   added in 2.11 of ansible.builtin  | **Choices:*** no
* **yes** ←
 |  | Use in conjunction with keyed\_groups. By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is "" and the default separator is "\_". Set this option to False to omit the leading underscore (or other separator) if no prefix is given. If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. |
| **regions**  string  | **Default:**[] |  | A list of regions in which to describe RDS instances and clusters. Available regions are listed here <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html>
 |
| **statuses**  list / elements=string  | **Default:**["creating", "available"] |  | A list of desired states for instances/clusters to be added to inventory. Set to ['all'] as a shorthand to find everything. |
| **strict**  boolean  | **Choices:*** **no** ←
* yes
 |  | If `yes` make invalid entries a fatal error, otherwise skip and continue. Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. |
| **strict\_permissions**  boolean  | **Choices:*** no
* **yes** ←
 |  | By default if an AccessDenied exception is encountered this plugin will fail. You can set strict\_permissions to False in the inventory config file which will allow the restrictions to be gracefully skipped. |
| **use\_extra\_vars**  boolean   added in 2.11 of ansible.builtin  | **Choices:*** **no** ←
* yes
 |  ini entries:  [inventory\_plugins]use\_extra\_vars = no    env:ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS  | Merge extra vars into the available variables for composition (highest precedence). |

   
 Examples
--------

 
```
plugin: aws_rds
regions:
  - us-east-1
  - ca-central-1
keyed_groups:
  - key: 'db_parameter_groups|json_query("[].db_parameter_group_name")'
    prefix: rds_parameter_group
  - key: engine
    prefix: rds
  - key: tags
  - key: region

```
 ### Authors

 * Sloane Hertel (@s-hertel)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_rds_inventory.html>

amazon.aws.aws\_account\_attribute – Look up AWS account attributes.
====================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.aws_account_attribute`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Describes attributes of your AWS account. You can specify one of the listed attribute choices or omit it to see all attributes.

 Requirements
------------

 The below requirements are needed on the local controller node that executes this lookup.

 * boto3
* botocore

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **attribute**  string  | **Choices:*** supported-platforms
* default-vpc
* max-instances
* vpc-max-security-groups-per-interface
* max-elastic-ips
* vpc-max-elastic-ips
* has-ec2-classic
 |  | The attribute for which to get the value(s). |
| **aws\_access\_key**  string  |  |  env:EC2\_ACCESS\_KEY   env:AWS\_ACCESS\_KEY   env:AWS\_ACCESS\_KEY\_ID  | The AWS access key to use. 
aliases: aws\_access\_key\_id |
| **aws\_profile**  string  |  |  env:AWS\_DEFAULT\_PROFILE   env:AWS\_PROFILE  | The AWS profile 
aliases: boto\_profile |
| **aws\_secret\_key**  string  |  |  env:EC2\_SECRET\_KEY   env:AWS\_SECRET\_KEY   env:AWS\_SECRET\_ACCESS\_KEY  | The AWS secret key that corresponds to the access key. 
aliases: aws\_secret\_access\_key |
| **aws\_security\_token**  string  |  |  env:EC2\_SECURITY\_TOKEN   env:AWS\_SESSION\_TOKEN   env:AWS\_SECURITY\_TOKEN  | The AWS security token if using temporary access and secret keys. |
| **region**  string  |  |  env:EC2\_REGION   env:AWS\_REGION  | The region for which to create the connection. |

   
 Examples
--------

 
```
vars:
  has_ec2_classic: "{{ lookup('aws_account_attribute', attribute='has-ec2-classic') }}"
  # true | false

  default_vpc_id: "{{ lookup('aws_account_attribute', attribute='default-vpc') }}"
  # vpc-xxxxxxxx | none

  account_details: "{{ lookup('aws_account_attribute', wantlist='true') }}"
  # {'default-vpc': ['vpc-xxxxxxxx'], 'max-elastic-ips': ['5'], 'max-instances': ['20'],
  #  'supported-platforms': ['VPC', 'EC2'], 'vpc-max-elastic-ips': ['5'], 'vpc-max-security-groups-per-interface': ['5']}

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:

 

| Key | Returned | Description |
| --- | --- | --- |
| **\_raw**  string  | success | Returns a boolean when *attribute* is check\_ec2\_classic. Otherwise returns the value(s) of the attribute (or all attributes if one is not specified).  |

   
  
 ### Authors

 * Sloane Hertel <[shertel@redhat.com](https://docs.ansible.com/cdn-cgi/l/email-protection#dfacb7baadabbab3f9fcece8e4f9fceaede4f9fcebe7e4adbabbb7beabf9fcebe9e4bcb0b2)>



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_account_attribute_lookup.html>

amazon.aws.aws\_secret – Look up secrets stored in AWS Secrets Manager.
=======================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.aws_secret`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Look up secrets stored in AWS Secrets Manager provided the caller has the appropriate permissions to read the secret.
* Lookup is based on the secret’s *Name* value.
* Optional parameters can be passed into this lookup; *version\_id* and *version\_stage*

 Requirements
------------

 The below requirements are needed on the local controller node that executes this lookup.

 * boto3
* botocore>=1.10.0

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_terms**  string / required  |  |  | Name of the secret to look up in AWS Secrets Manager. |
| **aws\_access\_key**  string  |  |  env:EC2\_ACCESS\_KEY   env:AWS\_ACCESS\_KEY   env:AWS\_ACCESS\_KEY\_ID  | The AWS access key to use. 
aliases: aws\_access\_key\_id |
| **aws\_profile**  string  |  |  env:AWS\_DEFAULT\_PROFILE   env:AWS\_PROFILE  | The AWS profile 
aliases: boto\_profile |
| **aws\_secret\_key**  string  |  |  env:EC2\_SECRET\_KEY   env:AWS\_SECRET\_KEY   env:AWS\_SECRET\_ACCESS\_KEY  | The AWS secret key that corresponds to the access key. 
aliases: aws\_secret\_access\_key |
| **aws\_security\_token**  string  |  |  env:EC2\_SECURITY\_TOKEN   env:AWS\_SESSION\_TOKEN   env:AWS\_SECURITY\_TOKEN  | The AWS security token if using temporary access and secret keys. |
| **bypath**  boolean   added in 1.4.0 of amazon.aws  | **Choices:*** **no** ←
* yes
 |  | A boolean to indicate whether the parameter is provided as a hierarchy. |
| **join**  boolean  | **Choices:*** **no** ←
* yes
 |  | Join two or more entries to form an extended secret. This is useful for overcoming the 4096 character limit imposed by AWS. No effect when used with *bypath*. |
| **nested**  boolean   added in 1.4.0 of amazon.aws  | **Choices:*** **no** ←
* yes
 |  | A boolean to indicate the secret contains nested values. |
| **on\_denied**  string  | **Choices:*** **error** ←
* skip
* warn
 |  | Action to take if access to the secret is denied. 
`error` will raise a fatal error when access to the secret is denied. 
`skip` will silently ignore the denied secret. 
`warn` will skip over the denied secret but issue a warning. |
| **on\_missing**  string  | **Choices:*** **error** ←
* skip
* warn
 |  | Action to take if the secret is missing. 
`error` will raise a fatal error when the secret is missing. 
`skip` will silently ignore the missing secret. 
`warn` will skip over the missing secret but issue a warning. |
| **region**  string  |  |  env:EC2\_REGION   env:AWS\_REGION  | The region for which to create the connection. |
| **version\_id**  string  |  |  | Version of the secret(s). |
| **version\_stage**  string  |  |  | Stage of the secret version. |

   
 Examples
--------

 
```
- name: lookup secretsmanager secret in the current region
  debug: msg="{{ lookup('amazon.aws.aws_secret', '/path/to/secrets', bypath=true) }}"

- name: Create RDS instance with aws_secret lookup for password param
  rds:
    command: create
    instance_name: app-db
    db_engine: MySQL
    size: 10
    instance_type: db.m1.small
    username: dbadmin
    password: "{{ lookup('amazon.aws.aws_secret', 'DbSecret') }}"
    tags:
      Environment: staging

- name: skip if secret does not exist
  debug: msg="{{ lookup('amazon.aws.aws_secret', 'secret-not-exist', on_missing='skip')}}"

- name: warn if access to the secret is denied
  debug: msg="{{ lookup('amazon.aws.aws_secret', 'secret-denied', on_denied='warn')}}"

- name: lookup secretsmanager secret in the current region using the nested feature
  debug: msg="{{ lookup('amazon.aws.aws_secret', 'secrets.environments.production.password', nested=true) }}"
  # The secret can be queried using the following syntax: `aws_secret_object_name.key1.key2.key3`.
  # If an object is of the form `{"key1":{"key2":{"key3":1}}}` the query would return the value `1`.

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:

 

| Key | Returned | Description |
| --- | --- | --- |
| **\_raw**  string  | success | Returns the value of the secret stored in AWS Secrets Manager.  |

   
  
 ### Authors

 * Aaron Smith <[ajsmith10381@gmail.com](https://docs.ansible.com/cdn-cgi/l/email-protection#c3a2a9b0aeaab7abf2f3f0fbf2e5e0f0f4f8e5e0f6f1f8e5e0f7fbf8a4aea2aaafe5e0f7f5f8a0acae)>



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_secret_lookup.html>

amazon.aws.aws\_service\_ip\_ranges – Look up the IP ranges for services provided in AWS such as EC2 and S3.
============================================================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.aws_service_ip_ranges`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * AWS publishes IP ranges used on the public internet by EC2, S3, CloudFront, CodeBuild, Route53, and Route53 Health Checking.
* This module produces a list of all the ranges (by default) or can narrow down the list to the specified region or service.

 Requirements
------------

 The below requirements are needed on the local controller node that executes this lookup.

 * must have public internet connectivity

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **region**  string  |  |  | The AWS region to narrow the ranges to. Examples: us-east-1, eu-west-2, ap-southeast-1 |
| **service**  string  |  |  | The service to filter ranges by. Options: EC2, S3, CLOUDFRONT, CODEbUILD, ROUTE53, ROUTE53\_HEALTHCHECKS |

   
 Examples
--------

 
```
vars:
  ec2_ranges: "{{ lookup('aws_service_ip_ranges', region='ap-southeast-2', service='EC2', wantlist=True) }}"
tasks:

- name: "use list return option and iterate as a loop"
  debug: msg="{% for cidr in ec2_ranges %}{{ cidr }} {% endfor %}"
# "52.62.0.0/15 52.64.0.0/17 52.64.128.0/17 52.65.0.0/16 52.95.241.0/24 52.95.255.16/28 54.66.0.0/16 "

- name: "Pull S3 IP ranges, and print the default return style"
  debug: msg="{{ lookup('aws_service_ip_ranges', region='us-east-1', service='S3') }}"
# "52.92.16.0/20,52.216.0.0/15,54.231.0.0/17"

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:

 

| Key | Returned | Description |
| --- | --- | --- |
| **\_raw**  string  | success | comma-separated list of CIDR ranges  |

   
  
 ### Authors

 * James Turner <[turnerjsm@gmail.com](https://docs.ansible.com/cdn-cgi/l/email-protection#84f0f1f6eae1f6eef7e9a2a7b7b3bfa2a7b1b6bfa2a7b0bcbfe3e9e5ede8a2a7b0b2bfe7ebe9)>



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_service_ip_ranges_lookup.html>

amazon.aws.aws\_ssm – Get the value for a SSM parameter or all parameters under a path.
=======================================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.aws_ssm`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)

 Synopsis
--------

 * Get the value for an Amazon Simple Systems Manager parameter or a hierarchy of parameters. The first argument you pass the lookup can either be a parameter name or a hierarchy of parameters. Hierarchies start with a forward slash and end with the parameter name. Up to 5 layers may be specified.
* If looking up an explicitly listed parameter by name which does not exist then the lookup will return a None value which will be interpreted by Jinja2 as an empty string. You can use the ``default`` filter to give a default value in this case but must set the second parameter to true (see examples below)
* When looking up a path for parameters under it a dictionary will be returned for each path. If there is no parameter under that path then the return will be successful but the dictionary will be empty.
* If the lookup fails due to lack of permissions or due to an AWS client error then the aws\_ssm will generate an error, normally crashing the current ansible task. This is normally the right thing since ignoring a value that IAM isn’t giving access to could cause bigger problems and wrong behaviour or loss of data. If you want to continue in this case then you will have to set up two ansible tasks, one which sets a variable and ignores failures one which uses the value of that variable with a default. See the examples below.

 Requirements
------------

 The below requirements are needed on the local controller node that executes this lookup.

 * boto3
* botocore

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **bypath**  boolean  | **Choices:*** **no** ←
* yes
 |  | A boolean to indicate whether the parameter is provided as a hierarchy. |
| **decrypt**  boolean  | **Choices:*** no
* **yes** ←
 |  | A boolean to indicate whether to decrypt the parameter. |
| **recursive**  boolean  | **Choices:*** **no** ←
* yes
 |  | A boolean to indicate whether to retrieve all parameters within a hierarchy. |
| **shortnames**  boolean  | **Choices:*** **no** ←
* yes
 |  | Indicates whether to return the name only without path if using a parameter hierarchy. |

   
 Examples
--------

 
```
# lookup sample:
- name: lookup ssm parameter store in the current region
  debug: msg="{{ lookup('aws_ssm', 'Hello' ) }}"

- name: lookup ssm parameter store in nominated region
  debug: msg="{{ lookup('aws_ssm', 'Hello', region='us-east-2' ) }}"

- name: lookup ssm parameter store without decrypted
  debug: msg="{{ lookup('aws_ssm', 'Hello', decrypt=False ) }}"

- name: lookup ssm parameter store in nominated aws profile
  debug: msg="{{ lookup('aws_ssm', 'Hello', aws_profile='myprofile' ) }}"

- name: lookup ssm parameter store using explicit aws credentials
  debug: msg="{{ lookup('aws_ssm', 'Hello', aws_access_key=my_aws_access_key, aws_secret_key=my_aws_secret_key, aws_security_token=my_security_token ) }}"

- name: lookup ssm parameter store with all options.
  debug: msg="{{ lookup('aws_ssm', 'Hello', decrypt=false, region='us-east-2', aws_profile='myprofile') }}"

- name: lookup a key which doesn't exist, returns ""
  debug: msg="{{ lookup('aws_ssm', 'NoKey') }}"

- name: lookup a key which doesn't exist, returning a default ('root')
  debug: msg="{{ lookup('aws_ssm', 'AdminID') | default('root', true) }}"

- name: lookup a key which doesn't exist failing to store it in a fact
  set_fact:
    temp_secret: "{{ lookup('aws_ssm', '/NoAccess/hiddensecret') }}"
  ignore_errors: true

- name: show fact default to "access failed" if we don't have access
  debug: msg="{{ 'the secret was:' ~ temp_secret | default('could not access secret') }}"

- name: return a dictionary of ssm parameters from a hierarchy path
  debug: msg="{{ lookup('aws_ssm', '/PATH/to/params', region='ap-southeast-2', bypath=true, recursive=true ) }}"

- name: return a dictionary of ssm parameters from a hierarchy path with shortened names (param instead of /PATH/to/param)
  debug: msg="{{ lookup('aws_ssm', '/PATH/to/params', region='ap-southeast-2', shortnames=true, bypath=true, recursive=true ) }}"

- name: Iterate over a parameter hierarchy (one iteration per parameter)
  debug: msg='Key contains {{ item.key }} , with value {{ item.value }}'
  loop: '{{ lookup("aws_ssm", "/demo/", region="ap-southeast-2", bypath=True) | dict2items }}'

- name: Iterate over multiple paths as dictionaries (one iteration per path)
  debug: msg='Path contains {{ item }}'
  loop: '{{ lookup("aws_ssm", "/demo/", "/demo1/", bypath=True)}}'

```
 ### Authors

 * Bill Wang <ozbillwang(at)gmail.com>
* Marat Bakeev <hawara(at)gmail.com>
* Michael De La Rue <[siblemitcom.mddlr@spamgourmet.com](https://docs.ansible.com/cdn-cgi/l/email-protection#e7948e858b828a8e9384888ac1c4d3d1dc8a83838b95c1c4d4d0dcc1c4d2d5dcc1c4d3dfdc9497868a808892958a8293c1c4d3d1dc84888a)>



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_ssm_lookup.html>

amazon.aws.aws\_az\_info – Gather information about availability zones in AWS.
==============================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.aws_az_info`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gather information about availability zones in AWS.
* This module was called [amazon.aws.aws\_az\_facts](aws_az_facts_module#ansible-collections-amazon-aws-aws-az-facts-module) before Ansible 2.9. The usage did not change.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* botocore
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **filters**  dictionary  | **Default:**{} | A dict of filters to apply. Each dict item consists of a filter key and a filter value. See <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html> for possible filters. Filter names and values are case sensitive. You can use underscores instead of dashes (-) in the filter keys. Filter keys with underscores will take precedence in case of conflict. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

- name: Gather information about all availability zones
  amazon.aws.aws_az_info:

- name: Gather information about a single availability zone
  amazon.aws.aws_az_info:
    filters:
      zone-name: eu-west-1a

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **availability\_zones**  list / elements=string  | on success | Availability zones that match the provided filters. Each element consists of a dict with all the information related to that available zone.  **Sample:** [ { 'messages': [], 'region\_name': 'us-west-1', 'state': 'available', 'zone\_name': 'us-west-1b' }, { 'messages': [], 'region\_name': 'us-west-1', 'state': 'available', 'zone\_name': 'us-west-1c' } ] |

   
  
 ### Authors

 * Henrique Rodrigues (@Sodki)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_az_info_module.html>

amazon.aws.aws\_s3 – manage objects in S3.
==========================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.aws_s3`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * This module allows the user to manage S3 buckets and the objects within them. Includes support for creating and deleting both objects and buckets, retrieving objects as files or strings and generating download links. This module has a dependency on boto3 and botocore.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* botocore
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **bucket**  string / required  |  | Bucket name. |
| **content**  string   added in 1.3.0 of amazon.aws  |  | The content to PUT into an object. The parameter value will be treated as a string and converted to UTF-8 before sending it to S3. To send binary data, use the *content\_base64* parameter instead. Either *content*, *content\_base64* or *src* must be specified for a PUT operation. Ignored otherwise. |
| **content\_base64**  string   added in 1.3.0 of amazon.aws  |  | The base64-encoded binary data to PUT into an object. Use this if you need to put raw binary data, and don't forget to encode in base64. Either *content*, *content\_base64* or *src* must be specified for a PUT operation. Ignored otherwise. |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **dest**  path  |  | The destination file path when downloading an object/key with a GET operation. |
| **dualstack**  boolean  | **Choices:*** **no** ←
* yes
 | Enables Amazon S3 Dual-Stack Endpoints, allowing S3 communications using both IPv4 and IPv6. Requires at least botocore version 1.4.45. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **encrypt**  boolean  | **Choices:*** no
* **yes** ←
 | When set for PUT mode, asks for server-side encryption. |
| **encryption\_kms\_key\_id**  string  |  | KMS key id to use when encrypting objects using *encrypting=aws:kms*. Ignored if *encryption* is not `aws:kms`. |
| **encryption\_mode**  string  | **Choices:*** **AES256** ←
* aws:kms
 | What encryption mode to use if *encrypt=true*. |
| **expiry**  integer  | **Default:**600 | Time limit (in seconds) for the URL generated and returned by S3/Walrus when performing a *mode=put* or *mode=geturl* operation. 
aliases: expiration |
| **headers**  dictionary  |  | Custom headers for PUT operation, as a dictionary of `key=value` and `key=value,key=value`. |
| **ignore\_nonexistent\_bucket**  boolean  | **Choices:*** **no** ←
* yes
 | Overrides initial bucket lookups in case bucket or iam policies are restrictive. Example: a user may have the GetObject permission but no other permissions. In this case using the option mode: get will fail without specifying *ignore\_nonexistent\_bucket=true*. |
| **marker**  string  |  | Specifies the key to start with when using list mode. Object keys are returned in alphabetical order, starting with key after the marker in order. |
| **max\_keys**  integer  | **Default:**1000 | Max number of results to return in list mode, set this if you want to retrieve fewer than the default 1000 keys. |
| **metadata**  dictionary  |  | Metadata for PUT operation, as a dictionary of `key=value` and `key=value,key=value`. |
| **mode**  string / required  | **Choices:*** get
* put
* delete
* create
* geturl
* getstr
* delobj
* list
 | Switches the module behaviour between `put` (upload), `get` (download), `geturl` (return download url, Ansible 1.3+), `getstr` (download object as string (1.3+)), `list` (list keys, Ansible 2.0+), `create` (bucket), `delete` (bucket), and delobj (delete object, Ansible 2.0+). |
| **object**  string  |  | Keyname of the object inside the bucket. Can be used to create "virtual directories", see examples. |
| **overwrite**  string  | **Default:**"always" | Force overwrite either locally on the filesystem or remotely with the object/key. Used with PUT and GET operations. Must be a Boolean, `always`, `never` or `different`. 
`true` is the same as `always`. 
`false` is equal to `never`. When this is set to `different` the MD5 sum of the local file is compared with the 'ETag' of the object/key in S3. The ETag may or may not be an MD5 digest of the object data. See the ETag response header here <https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonResponseHeaders.html>. 
aliases: force |
| **permission**  list / elements=string  | **Default:**["private"] | This option lets the user set the canned permissions on the object/bucket that are created. The permissions that can be set are `private`, `public-read`, `public-read-write`, `authenticated-read` for a bucket or `private`, `public-read`, `public-read-write`, `aws-exec-read`, `authenticated-read`, `bucket-owner-read`, `bucket-owner-full-control` for an object. Multiple permissions can be specified as a list. |
| **prefix**  string  | **Default:**"" | Limits the response to keys that begin with the specified prefix for list mode. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **retries**  integer  | **Default:**0 | On recoverable failure, how many times to retry before actually failing. 
aliases: retry |
| **rgw**  boolean  | **Choices:*** **no** ←
* yes
 | Enable Ceph RGW S3 support. This option requires an explicit url via *s3\_url*. |
| **s3\_url**  string  |  | S3 URL endpoint for usage with Ceph, Eucalyptus and fakes3 etc. Otherwise assumes AWS. 
aliases: S3\_URL |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **src**  path  |  | The source file path when performing a PUT operation. Either *content*, *content\_base64* or *src* must be specified for a PUT operation. Ignored otherwise. |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |
| **version**  string  |  | Version ID of the object inside the bucket. Can be used to get a specific version of a file if versioning is enabled in the target bucket. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
- name: Simple PUT operation
  amazon.aws.aws_s3:
    bucket: mybucket
    object: /my/desired/key.txt
    src: /usr/local/myfile.txt
    mode: put

- name: PUT operation from a rendered template
  amazon.aws.aws_s3:
    bucket: mybucket
    object: /object.yaml
    content: "{{ lookup('template', 'templates/object.yaml.j2') }}"
    mode: put

- name: Simple PUT operation in Ceph RGW S3
  amazon.aws.aws_s3:
    bucket: mybucket
    object: /my/desired/key.txt
    src: /usr/local/myfile.txt
    mode: put
    rgw: true
    s3_url: "http://localhost:8000"

- name: Simple GET operation
  amazon.aws.aws_s3:
    bucket: mybucket
    object: /my/desired/key.txt
    dest: /usr/local/myfile.txt
    mode: get

- name: Get a specific version of an object.
  amazon.aws.aws_s3:
    bucket: mybucket
    object: /my/desired/key.txt
    version: 48c9ee5131af7a716edc22df9772aa6f
    dest: /usr/local/myfile.txt
    mode: get

- name: PUT/upload with metadata
  amazon.aws.aws_s3:
    bucket: mybucket
    object: /my/desired/key.txt
    src: /usr/local/myfile.txt
    mode: put
    metadata: 'Content-Encoding=gzip,Cache-Control=no-cache'

- name: PUT/upload with custom headers
  amazon.aws.aws_s3:
    bucket: mybucket
    object: /my/desired/key.txt
    src: /usr/local/myfile.txt
    mode: put
    headers: 'x-amz-grant-full-control=emailAddress=owner@example.com'

- name: List keys simple
  amazon.aws.aws_s3:
    bucket: mybucket
    mode: list

- name: List keys all options
  amazon.aws.aws_s3:
    bucket: mybucket
    mode: list
    prefix: /my/desired/
    marker: /my/desired/0023.txt
    max_keys: 472

- name: Create an empty bucket
  amazon.aws.aws_s3:
    bucket: mybucket
    mode: create
    permission: public-read

- name: Create a bucket with key as directory, in the EU region
  amazon.aws.aws_s3:
    bucket: mybucket
    object: /my/directory/path
    mode: create
    region: eu-west-1

- name: Delete a bucket and all contents
  amazon.aws.aws_s3:
    bucket: mybucket
    mode: delete

- name: GET an object but don't download if the file checksums match. New in 2.0
  amazon.aws.aws_s3:
    bucket: mybucket
    object: /my/desired/key.txt
    dest: /usr/local/myfile.txt
    mode: get
    overwrite: different

- name: Delete an object from a bucket
  amazon.aws.aws_s3:
    bucket: mybucket
    object: /my/desired/key.txt
    mode: delobj

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **contents**  string  | (for getstr operation) | Contents of the object as string.  **Sample:** Hello, world! |
| **expiry**  integer  | (for geturl operation) | Number of seconds the presigned url is valid for.  **Sample:** 600 |
| **msg**  string  | always | Message indicating the status of the operation.  **Sample:** PUT operation complete |
| **s3\_keys**  list / elements=string  | (for list operation) | List of object keys.  **Sample:** ['prefix1/', 'prefix1/key1', 'prefix1/key2'] |
| **url**  string  | (for put and geturl operations) | URL of the object.  **Sample:** https://my-bucket.s3.amazonaws.com/my-key.txt?AWSAccessKeyId=<access-key>&Expires=1506888865&Signature=<signature> |

   
  
 ### Authors

 * Lester Wade (@lwade)
* Sloane Hertel (@s-hertel)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_s3_module.html>

amazon.aws.aws\_caller\_info – Get information about the user and account being used to make AWS calls.
=======================================================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.aws_caller_info`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * This module returns information about the account and user / role from which the AWS access tokens originate.
* The primary use of this is to get the account id for templating into ARNs or similar to avoid needing to specify this information in inventory.
* This module was called [amazon.aws.aws\_caller\_facts](aws_caller_facts_module#ansible-collections-amazon-aws-aws-caller-facts-module) before Ansible 2.9. The usage did not change.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* botocore
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

- name: Get the current caller identity information
  amazon.aws.aws_caller_info:
  register: caller_info

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **account**  string  | success | The account id the access credentials are associated with.  **Sample:** 123456789012 |
| **account\_alias**  string  | when caller has the iam:ListAccountAliases permission | The account alias the access credentials are associated with.  **Sample:** acme-production |
| **arn**  string  | success | The arn identifying the user the credentials are associated with.  **Sample:** arn:aws:sts::123456789012:federated-user/my-federated-user-name |
| **user\_id**  string  | success | The user id the access credentials are associated with. Note that this may not correspond to anything you can look up in the case of roles or federated identities.  **Sample:** 123456789012:my-federated-user-name |

   
  
 ### Authors

 * Ed Costello (@orthanc)
* Stijn Dubrul (@sdubrul)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_caller_info_module.html>

amazon.aws.cloudformation – Create or delete an AWS CloudFormation stack
========================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.cloudformation`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Launches or updates an AWS CloudFormation stack and waits for it complete.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* botocore>=1.5.45
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **backoff\_delay**  integer  | **Default:**3 | Number of seconds to wait for the next retry. |
| **backoff\_max\_delay**  integer  | **Default:**30 | Maximum amount of time to wait between retries. |
| **backoff\_retries**  integer  | **Default:**10 | Number of times to retry operation. AWS API throttling mechanism fails CloudFormation module so we have to retry a couple of times. |
| **capabilities**  list / elements=string  | **Default:**["CAPABILITY\_IAM", "CAPABILITY\_NAMED\_IAM"] | Specify capabilities that stack template contains. Valid values are `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM` and `CAPABILITY_AUTO_EXPAND`. |
| **changeset\_name**  string  |  | Name given to the changeset when creating a changeset. Only used when *create\_changeset=true*. By default a name prefixed with Ansible-STACKNAME is generated based on input parameters. See the AWS Change Sets docs for more information <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-changesets.html>
 |
| **create\_changeset**  boolean  | **Choices:*** **no** ←
* yes
 | If stack already exists create a changeset instead of directly applying changes. See the AWS Change Sets docs <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-changesets.html>. WARNING: if the stack does not exist, it will be created without changeset. If *state=absent*, the stack will be deleted immediately with no changeset. |
| **create\_timeout**  integer  |  | The amount of time (in minutes) that can pass before the stack status becomes CREATE\_FAILED |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **disable\_rollback**  boolean  | **Choices:*** **no** ←
* yes
 | If a stacks fails to form, rollback will remove the stack. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **events\_limit**  integer  | **Default:**200 | Maximum number of CloudFormation events to fetch from a stack when creating or updating it. |
| **notification\_arns**  string  |  | A comma separated list of Simple Notification Service (SNS) topic ARNs to publish stack related events. |
| **on\_create\_failure**  string  | **Choices:*** DO\_NOTHING
* ROLLBACK
* DELETE
 | Action to take upon failure of stack creation. Incompatible with the *disable\_rollback* option. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **role\_arn**  string  |  | The role that AWS CloudFormation assumes to create the stack. See the AWS CloudFormation Service Role docs <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html>
 |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **stack\_name**  string / required  |  | Name of the CloudFormation stack. |
| **stack\_policy**  string  |  | The path of the file containing the CloudFormation stack policy. A policy cannot be removed once placed, but it can be modified. for instance, allow all updates <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html#d0e9051>
 |
| **stack\_policy\_body**  json   added in 1.5.0 of amazon.aws  |  | The CloudFormation stack policy in JSON. A policy cannot be removed once placed, but it can be modified. for instance, allow all updates <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html#d0e9051>
 |
| **stack\_policy\_on\_update\_body**  json   added in 1.5.0 of amazon.aws  |  | the body of the cloudformation stack policy only applied during this update. |
| **state**  string  | **Choices:*** **present** ←
* absent
 | If *state=present*, stack will be created. If *state=present* and if stack exists and template has changed, it will be updated. If *state=absent*, stack will be removed. |
| **tags**  dictionary  |  | Dictionary of tags to associate with stack and its resources during stack creation. Can be updated later, updating tags removes previous entries. |
| **template**  path  |  | The local path of the CloudFormation template. This must be the full path to the file, relative to the working directory. If using roles this may look like `roles/cloudformation/files/cloudformation-example.json`. If *state=present* and the stack does not exist yet, either *template*, *template\_body* or *template\_url* must be specified (but only one of them). If *state=present*, the stack does exist, and neither *template*, *template\_body* nor *template\_url* are specified, the previous template will be reused. |
| **template\_body**  string  |  | Template body. Use this to pass in the actual body of the CloudFormation template. If *state=present* and the stack does not exist yet, either *template*, *template\_body* or *template\_url* must be specified (but only one of them). If *state=present*, the stack does exist, and neither *template*, *template\_body* nor *template\_url* are specified, the previous template will be reused. |
| **template\_format**  string  |  | This parameter is ignored since Ansible 2.3 and will be removed after 2022-06-01. Templates are now passed raw to CloudFormation regardless of format. |
| **template\_parameters**  dictionary  | **Default:**{} | A list of hashes of all the template variables for the stack. The value can be a string or a dict. Dict can be used to set additional template parameter attributes like UsePreviousValue (see example). |
| **template\_url**  string  |  | Location of file containing the template body. The URL must point to a template (max size 307,200 bytes) located in an S3 bucket in the same region as the stack. If *state=present* and the stack does not exist yet, either *template*, *template\_body* or *template\_url* must be specified (but only one of them). If *state=present*, the stack does exist, and neither *template*, *template\_body* nor *template\_url* are specified, the previous template will be reused. |
| **termination\_protection**  boolean  | **Choices:*** no
* yes
 | Enable or disable termination protection on the stack. Only works with botocore >= 1.7.18. |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * CloudFormation features change often, and this module tries to keep up. That means your botocore version should be fresh. The version listed in the requirements is the oldest version that works with the module as a whole. Some features may require recent versions, and we do not pinpoint a minimum version for each feature. Instead of relying on the minimum version, keep botocore up to date. AWS is always releasing features and fixing bugs.
* If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
- name: create a cloudformation stack
  amazon.aws.cloudformation:
    stack_name: "ansible-cloudformation"
    state: "present"
    region: "us-east-1"
    disable_rollback: true
    template: "files/cloudformation-example.json"
    template_parameters:
      KeyName: "jmartin"
      DiskType: "ephemeral"
      InstanceType: "m1.small"
      ClusterSize: 3
    tags:
      Stack: "ansible-cloudformation"

# Basic role example
- name: create a stack, specify role that cloudformation assumes
  amazon.aws.cloudformation:
    stack_name: "ansible-cloudformation"
    state: "present"
    region: "us-east-1"
    disable_rollback: true
    template: "roles/cloudformation/files/cloudformation-example.json"
    role_arn: 'arn:aws:iam::123456789012:role/cloudformation-iam-role'

- name: delete a stack
  amazon.aws.cloudformation:
    stack_name: "ansible-cloudformation-old"
    state: "absent"

# Create a stack, pass in template from a URL, disable rollback if stack creation fails,
# pass in some parameters to the template, provide tags for resources created
- name: create a stack, pass in the template via an URL
  amazon.aws.cloudformation:
    stack_name: "ansible-cloudformation"
    state: present
    region: us-east-1
    disable_rollback: true
    template_url: https://s3.amazonaws.com/my-bucket/cloudformation.template
    template_parameters:
      KeyName: jmartin
      DiskType: ephemeral
      InstanceType: m1.small
      ClusterSize: 3
    tags:
      Stack: ansible-cloudformation

# Create a stack, passing in template body using lookup of Jinja2 template, disable rollback if stack creation fails,
# pass in some parameters to the template, provide tags for resources created
- name: create a stack, pass in the template body via lookup template
  amazon.aws.cloudformation:
    stack_name: "ansible-cloudformation"
    state: present
    region: us-east-1
    disable_rollback: true
    template_body: "{{ lookup('template', 'cloudformation.j2') }}"
    template_parameters:
      KeyName: jmartin
      DiskType: ephemeral
      InstanceType: m1.small
      ClusterSize: 3
    tags:
      Stack: ansible-cloudformation

# Pass a template parameter which uses CloudFormation's UsePreviousValue attribute
# When use_previous_value is set to True, the given value will be ignored and
# CloudFormation will use the value from a previously submitted template.
# If use_previous_value is set to False (default) the given value is used.
- amazon.aws.cloudformation:
    stack_name: "ansible-cloudformation"
    state: "present"
    region: "us-east-1"
    template: "files/cloudformation-example.json"
    template_parameters:
      DBSnapshotIdentifier:
        use_previous_value: True
        value: arn:aws:rds:es-east-1:000000000000:snapshot:rds:my-db-snapshot
      DBName:
        use_previous_value: True
    tags:
      Stack: "ansible-cloudformation"

# Enable termination protection on a stack.
# If the stack already exists, this will update its termination protection
- name: enable termination protection during stack creation
  amazon.aws.cloudformation:
    stack_name: my_stack
    state: present
    template_url: https://s3.amazonaws.com/my-bucket/cloudformation.template
    termination_protection: yes

# Configure TimeoutInMinutes before the stack status becomes CREATE_FAILED
# In this case, if disable_rollback is not set or is set to false, the stack will be rolled back.
- name: enable termination protection during stack creation
  amazon.aws.cloudformation:
    stack_name: my_stack
    state: present
    template_url: https://s3.amazonaws.com/my-bucket/cloudformation.template
    create_timeout: 5

# Configure rollback behaviour on the unsuccessful creation of a stack allowing
# CloudFormation to clean up, or do nothing in the event of an unsuccessful
# deployment
# In this case, if on_create_failure is set to "DELETE", it will clean up the stack if
# it fails to create
- name: create stack which will delete on creation failure
  amazon.aws.cloudformation:
    stack_name: my_stack
    state: present
    template_url: https://s3.amazonaws.com/my-bucket/cloudformation.template
    on_create_failure: DELETE

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **change\_set\_id**  string  | *state=present* and *create\_changeset=true* | The ID of the stack change set if one was created  **Sample:** arn:aws:cloudformation:us-east-1:012345678901:changeSet/Ansible-StackName-f4496805bd1b2be824d1e315c6884247ede41eb0 |
| **events**  list / elements=string  | always | Most recent events in CloudFormation's event log. This may be from a previous run in some cases.  **Sample:** ['StackEvent AWS::CloudFormation::Stack stackname UPDATE\_COMPLETE', 'StackEvent AWS::CloudFormation::Stack stackname UPDATE\_COMPLETE\_CLEANUP\_IN\_PROGRESS'] |
| **log**  list / elements=string  | always | Debugging logs. Useful when modifying or finding an error.  **Sample:** ['updating stack'] |
| **stack\_outputs**  dictionary  | state == present | A key:value dictionary of all the stack outputs currently defined. If there are no stack outputs, it is an empty dictionary.  **Sample:** {'MySg': 'AnsibleModuleTestYAML-CFTestSg-C8UVS567B6NS'} |
| **stack\_resources**  list / elements=string  | state == present | AWS stack resources and their status. List of dictionaries, one dict per resource.  **Sample:** [{'last\_updated\_time': '2016-10-11T19:40:14.979000+00:00', 'logical\_resource\_id': 'CFTestSg', 'physical\_resource\_id': 'cloudformation2-CFTestSg-16UQ4CYQ57O9F', 'resource\_type': 'AWS::EC2::SecurityGroup', 'status': 'UPDATE\_COMPLETE', 'status\_reason': None}] |

   
  
 ### Authors

 * James S. Martin (@jsmartin)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/cloudformation_module.html>

amazon.aws.cloudformation\_info – Obtain information about an AWS CloudFormation stack
======================================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.cloudformation_info`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gets information about an AWS CloudFormation stack.
* This module was called `amazon.aws.cloudformation_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [amazon.aws.cloudformation\_info](#ansible-collections-amazon-aws-cloudformation-info-module) module no longer returns `ansible_facts`!

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3 >= 1.0.0
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **all\_facts**  boolean  | **Choices:*** **no** ←
* yes
 | Get all stack information for the stack. |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **stack\_change\_sets**  boolean  | **Choices:*** **no** ←
* yes
 | Get stack change sets for the stack |
| **stack\_events**  boolean  | **Choices:*** **no** ←
* yes
 | Get stack events for the stack. |
| **stack\_name**  string  |  | The name or id of the CloudFormation stack. Gathers information on all stacks by default. |
| **stack\_policy**  boolean  | **Choices:*** **no** ←
* yes
 | Get stack policy for the stack. |
| **stack\_resources**  boolean  | **Choices:*** **no** ←
* yes
 | Get stack resources for the stack. |
| **stack\_template**  boolean  | **Choices:*** **no** ←
* yes
 | Get stack template body for the stack. |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

- name: Get summary information about a stack
  amazon.aws.cloudformation_info:
    stack_name: my-cloudformation-stack
  register: output

- debug:
    msg: "{{ output['cloudformation']['my-cloudformation-stack'] }}"

# When the module is called as cloudformation_facts, return values are published
# in ansible_facts['cloudformation'][<stack_name>] and can be used as follows.
# Note that this is deprecated and will stop working in Ansible after 2021-12-01.

- amazon.aws.cloudformation_facts:
    stack_name: my-cloudformation-stack

- debug:
    msg: "{{ ansible_facts['cloudformation']['my-cloudformation-stack'] }}"

# Get stack outputs, when you have the stack name available as a fact
- set_fact:
    stack_name: my-awesome-stack

- amazon.aws.cloudformation_info:
    stack_name: "{{ stack_name }}"
  register: my_stack

- debug:
    msg: "{{ my_stack.cloudformation[stack_name].stack_outputs }}"

# Get all stack information about a stack
- amazon.aws.cloudformation_info:
    stack_name: my-cloudformation-stack
    all_facts: true

# Get stack resource and stack policy information about a stack
- amazon.aws.cloudformation_info:
    stack_name: my-cloudformation-stack
    stack_resources: true
    stack_policy: true

# Fail if the stack doesn't exist
- name: try to get facts about a stack but fail if it doesn't exist
  amazon.aws.cloudformation_info:
    stack_name: nonexistent-stack
    all_facts: yes
  failed_when: cloudformation['nonexistent-stack'] is undefined

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **stack\_change\_sets**  list / elements=string  | only if all\_facts or stack\_change\_sets is true and the stack exists | A list of stack change sets. Each item in the list represents the details of a specific changeset  |
| **stack\_description**  dictionary  | if the stack exists | Summary facts about the stack  |
| **stack\_events**  list / elements=string  | only if all\_facts or stack\_events is true and the stack exists | All stack events for the stack  |
| **stack\_outputs**  dictionary  | if the stack exists | Dictionary of stack outputs keyed by the value of each output 'OutputKey' parameter and corresponding value of each output 'OutputValue' parameter  **Sample:** {'ApplicationDatabaseName': 'dazvlpr01xj55a.ap-southeast-2.rds.amazonaws.com'} |
| **stack\_parameters**  dictionary  | if the stack exists | Dictionary of stack parameters keyed by the value of each parameter 'ParameterKey' parameter and corresponding value of each parameter 'ParameterValue' parameter  **Sample:** {'DatabaseEngine': 'mysql', 'DatabasePassword': '\*\*\*'} |
| **stack\_policy**  dictionary  | only if all\_facts or stack\_policy is true and the stack exists | Describes the stack policy for the stack  |
| **stack\_resource\_list**  list / elements=string  | only if all\_facts or stack\_resources is true and the stack exists | Describes stack resources for the stack  |
| **stack\_resources**  dictionary  | only if all\_facts or stack\_resources is true and the stack exists | Dictionary of stack resources keyed by the value of each resource 'LogicalResourceId' parameter and corresponding value of each resource 'PhysicalResourceId' parameter  **Sample:** {'ApplicationDatabase': 'dazvlpr01xj55a', 'AutoScalingGroup': 'dev-someapp-AutoscalingGroup-1SKEXXBCAN0S7', 'AutoScalingSecurityGroup': 'sg-abcd1234'} |
| **stack\_template**  dictionary  | only if all\_facts or stack\_template is true and the stack exists | Describes the stack template for the stack  |

   
  
 ### Authors

 * Justin Menga (@jmenga)
* Kevin Coming (@waffie1)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/cloudformation_info_module.html>

amazon.aws.ec2 – create, terminate, start or stop an instance in ec2
====================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * Creates or terminates ec2 instances.
* Note: This module uses the older boto Python module to interact with the EC2 API. [amazon.aws.ec2](#ansible-collections-amazon-aws-ec2-module) will still receive bug fixes, but no new features. Consider using the amazon.aws.ec2\_instance module instead. If amazon.aws.ec2\_instance does not support a feature you need that is available in [amazon.aws.ec2](#ansible-collections-amazon-aws-ec2-module), please file a feature request.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * python >= 2.6
* boto

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **assign\_public\_ip**  boolean  | **Choices:*** no
* yes
 | When provisioning within vpc, assign a public IP address. Boto library must be 2.13.0+. |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **count**  integer  | **Default:**1 | Number of instances to launch. |
| **count\_tag**  raw  |  | Used with *exact\_count* to determine how many nodes based on a specific tag criteria should be running. This can be expressed in multiple ways and is shown in the EXAMPLES section. For instance, one can request 25 servers that are tagged with `class=webserver`. The specified tag must already exist or be passed in as the *instance\_tags* option. |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ebs\_optimized**  boolean  | **Choices:*** **no** ←
* yes
 | Whether instance is using optimized EBS volumes, see <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html>. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **exact\_count**  integer  |  | An integer value which indicates how many instances that match the 'count\_tag' parameter should be running. Instances are either created or terminated based on this value. |
| **group**  list / elements=string  |  | Security group (or list of groups) to use with the instance. 
aliases: groups |
| **group\_id**  list / elements=string  |  | Security group id (or list of ids) to use with the instance. |
| **id**  string  |  | Identifier for this instance or set of instances, so that the module will be idempotent with respect to EC2 instances. This identifier is valid for at least 24 hours after the termination of the instance, and should not be reused for another call later on. For details, see the description of client token at <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html>. |
| **image**  string  |  | 
*ami* ID to use for the instance. Required when *state=present*. |
| **instance\_ids**  list / elements=string  |  | list of instance ids, currently used for states: absent, running, stopped 
aliases: instance\_id |
| **instance\_initiated\_shutdown\_behavior**  string  | **Choices:*** **stop** ←
* terminate
 | Set whether AWS will Stop or Terminate an instance on shutdown. This parameter is ignored when using instance-store. images (which require termination on shutdown). |
| **instance\_profile\_name**  string  |  | Name of the IAM instance profile (i.e. what the EC2 console refers to as an "IAM Role") to use. Boto library must be 2.5.0+. |
| **instance\_tags**  dictionary  |  | A hash/dictionary of tags to add to the new instance or for instances to start/stop by tag. For example `{"key":"value"}` or `{"key":"value","key2":"value2"}`. |
| **instance\_type**  string  |  | Instance type to use for the instance, see <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>. Required when creating a new instance. 
aliases: type |
| **kernel**  string  |  | Kernel eki to use for the instance. |
| **key\_name**  string  |  | Key pair to use on the instance. The SSH key must already exist in AWS in order to use this argument. Keys can be created / deleted using the [amazon.aws.ec2\_key](ec2_key_module) module. 
aliases: keypair |
| **monitoring**  boolean  | **Choices:*** **no** ←
* yes
 | Enable detailed monitoring (CloudWatch) for the instance. |
| **network\_interfaces**  list / elements=string  |  | A list of existing network interfaces to attach to the instance at launch. When specifying existing network interfaces, none of the *assign\_public\_ip*, *private\_ip*, *vpc\_subnet\_id*, *group*, or *group\_id* parameters may be used. (Those parameters are for creating a new network interface at launch.) 
aliases: network\_interface |
| **placement\_group**  string  |  | Placement group for the instance when using EC2 Clustered Compute. |
| **private\_ip**  string  |  | The private ip address to assign the instance (from the vpc subnet). |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **ramdisk**  string  |  | Ramdisk eri to use for the instance. |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **source\_dest\_check**  boolean  | **Choices:*** no
* yes
 | Enable or Disable the Source/Destination checks (for NAT instances and Virtual Routers). When initially creating an instance the EC2 API defaults this to `True`. |
| **spot\_launch\_group**  string  |  | Launch group for spot requests, see <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-spot-instances-work.html#spot-launch-group>. |
| **spot\_price**  string  |  | Maximum spot price to bid. If not set, a regular on-demand instance is requested. A spot request is made with this maximum bid. When it is filled, the instance is started. |
| **spot\_type**  string  | **Choices:*** **one-time** ←
* persistent
 | The type of spot request. After being interrupted a `persistent` spot instance will be started once there is capacity to fill the request again. |
| **spot\_wait\_timeout**  integer  | **Default:**600 | How long to wait for the spot instance request to be fulfilled. Affects 'Request valid until' for setting spot request lifespan. |
| **state**  string  | **Choices:*** absent
* **present** ←
* restarted
* running
* stopped
 | Create, terminate, start, stop or restart instances. The state 'restarted' was added in Ansible 2.2. When *state=absent*, *instance\_ids* is required. When *state=running*, *state=stopped* or *state=restarted* then either *instance\_ids* or *instance\_tags* is required. |
| **tenancy**  string  | **Choices:*** **default** ←
* dedicated
 | An instance with a tenancy of `dedicated` runs on single-tenant hardware and can only be launched into a VPC. Note that to use dedicated tenancy you MUST specify a *vpc\_subnet\_id* as well. Dedicated tenancy is not available for EC2 "micro" instances. |
| **termination\_protection**  boolean  | **Choices:*** no
* yes
 | Enable or Disable the Termination Protection. Defaults to `false`. |
| **user\_data**  string  |  | Opaque blob of data which is made available to the EC2 instance. |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |
| **volumes**  list / elements=dictionary  |  | A list of hash/dictionaries of volumes to add to the new instance. |
|  | **delete\_on\_termination**  boolean  | **Choices:*** **no** ←
* yes
 | Whether the volume should be automatically deleted when the instance is terminated. |
|  | **device\_name**  string / required  |  | A name for the device (For example `/dev/sda`). |
|  | **encrypted**  boolean  | **Choices:*** **no** ←
* yes
 | Whether the volume should be encrypted using the 'aws/ebs' KMS CMK. |
|  | **ephemeral**  string  |  | Whether the volume should be ephemeral. Data on ephemeral volumes is lost when the instance is stopped. Mutually exclusive with the *snapshot* parameter. |
|  | **iops**  integer  |  | The number of IOPS per second to provision for the volume. Required when *volume\_type=io1*. |
|  | **snapshot**  string  |  | The ID of an EBS snapshot to copy when creating the volume. Mutually exclusive with the *ephemeral* parameter. |
|  | **volume\_size**  integer  |  | The size of the volume (in GiB). |
|  | **volume\_type**  string  |  | The type of volume to create. See <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html> for more information on the available volume types. |
| **vpc\_subnet\_id**  string  |  | The subnet ID in which to launch the instance (VPC). |
| **wait**  boolean  | **Choices:*** **no** ←
* yes
 | Wait for the instance to reach its desired state before returning. Does not wait for SSH, see the 'wait\_for\_connection' example for details. |
| **wait\_timeout**  integer  | **Default:**300 | How long before wait gives up, in seconds. |
| **zone**  string  |  | AWS availability zone in which to launch the instance. 
aliases: aws\_zone, ec2\_zone |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

# Basic provisioning example
- amazon.aws.ec2:
    key_name: mykey
    instance_type: t2.micro
    image: ami-123456
    wait: yes
    group: webserver
    count: 3
    vpc_subnet_id: subnet-29e63245
    assign_public_ip: yes

# Advanced example with tagging and CloudWatch
- amazon.aws.ec2:
    key_name: mykey
    group: databases
    instance_type: t2.micro
    image: ami-123456
    wait: yes
    wait_timeout: 500
    count: 5
    instance_tags:
       db: postgres
    monitoring: yes
    vpc_subnet_id: subnet-29e63245
    assign_public_ip: yes

# Single instance with additional IOPS volume from snapshot and volume delete on termination
- amazon.aws.ec2:
    key_name: mykey
    group: webserver
    instance_type: c3.medium
    image: ami-123456
    wait: yes
    wait_timeout: 500
    volumes:
      - device_name: /dev/sdb
        snapshot: snap-abcdef12
        volume_type: io1
        iops: 1000
        volume_size: 100
        delete_on_termination: true
    monitoring: yes
    vpc_subnet_id: subnet-29e63245
    assign_public_ip: yes

# Single instance with ssd gp2 root volume
- amazon.aws.ec2:
    key_name: mykey
    group: webserver
    instance_type: c3.medium
    image: ami-123456
    wait: yes
    wait_timeout: 500
    volumes:
      - device_name: /dev/xvda
        volume_type: gp2
        volume_size: 8
    vpc_subnet_id: subnet-29e63245
    assign_public_ip: yes
    count_tag:
      Name: dbserver
    exact_count: 1

# Multiple groups example
- amazon.aws.ec2:
    key_name: mykey
    group: ['databases', 'internal-services', 'sshable', 'and-so-forth']
    instance_type: m1.large
    image: ami-6e649707
    wait: yes
    wait_timeout: 500
    count: 5
    instance_tags:
        db: postgres
    monitoring: yes
    vpc_subnet_id: subnet-29e63245
    assign_public_ip: yes

# Multiple instances with additional volume from snapshot
- amazon.aws.ec2:
    key_name: mykey
    group: webserver
    instance_type: m1.large
    image: ami-6e649707
    wait: yes
    wait_timeout: 500
    count: 5
    volumes:
    - device_name: /dev/sdb
      snapshot: snap-abcdef12
      volume_size: 10
    monitoring: yes
    vpc_subnet_id: subnet-29e63245
    assign_public_ip: yes

# Dedicated tenancy example
- amazon.aws.ec2:
    assign_public_ip: yes
    group_id: sg-1dc53f72
    key_name: mykey
    image: ami-6e649707
    instance_type: m1.small
    tenancy: dedicated
    vpc_subnet_id: subnet-29e63245
    wait: yes

# Spot instance example
- amazon.aws.ec2:
    spot_price: 0.24
    spot_wait_timeout: 600
    keypair: mykey
    group_id: sg-1dc53f72
    instance_type: m1.small
    image: ami-6e649707
    wait: yes
    vpc_subnet_id: subnet-29e63245
    assign_public_ip: yes
    spot_launch_group: report_generators
    instance_initiated_shutdown_behavior: terminate

# Examples using pre-existing network interfaces
- amazon.aws.ec2:
    key_name: mykey
    instance_type: t2.small
    image: ami-f005ba11
    network_interface: eni-deadbeef

- amazon.aws.ec2:
    key_name: mykey
    instance_type: t2.small
    image: ami-f005ba11
    network_interfaces: ['eni-deadbeef', 'eni-5ca1ab1e']

# Launch instances, runs some tasks
# and then terminate them

- name: Create a sandbox instance
  hosts: localhost
  gather_facts: False
  vars:
    keypair: my_keypair
    instance_type: m1.small
    security_group: my_securitygroup
    image: my_ami_id
    region: us-east-1
  tasks:
    - name: Launch instance
      amazon.aws.ec2:
         key_name: "{{ keypair }}"
         group: "{{ security_group }}"
         instance_type: "{{ instance_type }}"
         image: "{{ image }}"
         wait: true
         region: "{{ region }}"
         vpc_subnet_id: subnet-29e63245
         assign_public_ip: yes
      register: ec2

    - name: Add new instance to host group
      add_host:
        hostname: "{{ item.public_ip }}"
        groupname: launched
      loop: "{{ ec2.instances }}"

    - name: Wait for SSH to come up
      delegate_to: "{{ item.public_dns_name }}"
      wait_for_connection:
        delay: 60
        timeout: 320
      loop: "{{ ec2.instances }}"

- name: Configure instance(s)
  hosts: launched
  become: True
  gather_facts: True
  roles:
    - my_awesome_role
    - my_awesome_test

- name: Terminate instances
  hosts: localhost
  tasks:
    - name: Terminate instances that were previously launched
      amazon.aws.ec2:
        state: 'absent'
        instance_ids: '{{ ec2.instance_ids }}'

# Start a few existing instances, run some tasks
# and stop the instances

- name: Start sandbox instances
  hosts: localhost
  gather_facts: false
  vars:
    instance_ids:
      - 'i-xxxxxx'
      - 'i-xxxxxx'
      - 'i-xxxxxx'
    region: us-east-1
  tasks:
    - name: Start the sandbox instances
      amazon.aws.ec2:
        instance_ids: '{{ instance_ids }}'
        region: '{{ region }}'
        state: running
        wait: True
        vpc_subnet_id: subnet-29e63245
        assign_public_ip: yes
  roles:
    - do_neat_stuff
    - do_more_neat_stuff

- name: Stop sandbox instances
  hosts: localhost
  gather_facts: false
  vars:
    instance_ids:
      - 'i-xxxxxx'
      - 'i-xxxxxx'
      - 'i-xxxxxx'
    region: us-east-1
  tasks:
    - name: Stop the sandbox instances
      amazon.aws.ec2:
        instance_ids: '{{ instance_ids }}'
        region: '{{ region }}'
        state: stopped
        wait: True
        vpc_subnet_id: subnet-29e63245
        assign_public_ip: yes

#
# Start stopped instances specified by tag
#
- amazon.aws.ec2:
    instance_tags:
        Name: ExtraPower
    state: running

#
# Restart instances specified by tag
#
- amazon.aws.ec2:
    instance_tags:
        Name: ExtraPower
    state: restarted

#
# Enforce that 5 instances with a tag "foo" are running
# (Highly recommended!)
#

- amazon.aws.ec2:
    key_name: mykey
    instance_type: c1.medium
    image: ami-40603AD1
    wait: yes
    group: webserver
    instance_tags:
        foo: bar
    exact_count: 5
    count_tag: foo
    vpc_subnet_id: subnet-29e63245
    assign_public_ip: yes

#
# Enforce that 5 running instances named "database" with a "dbtype" of "postgres"
#

- amazon.aws.ec2:
    key_name: mykey
    instance_type: c1.medium
    image: ami-40603AD1
    wait: yes
    group: webserver
    instance_tags:
        Name: database
        dbtype: postgres
    exact_count: 5
    count_tag:
        Name: database
        dbtype: postgres
    vpc_subnet_id: subnet-29e63245
    assign_public_ip: yes

#
# count_tag complex argument examples
#

    # instances with tag foo
- amazon.aws.ec2:
    count_tag:
        foo:

    # instances with tag foo=bar
- amazon.aws.ec2:
    count_tag:
        foo: bar

    # instances with tags foo=bar & baz
- amazon.aws.ec2:
    count_tag:
        foo: bar
        baz:

    # instances with tags foo & bar & baz=bang
- amazon.aws.ec2:
    count_tag:
        - foo
        - bar
        - baz: bang

```
 ### Authors

 * Tim Gerla (@tgerla)
* Lester Wade (@lwade)
* Seth Vidal (@skvidal)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_module.html>

amazon.aws.ec2\_elb\_lb – Creates, updates or destroys an Amazon ELB.
=====================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_elb_lb`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * Returns information about the load balancer.
* Will be marked changed when called only if state is changed.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * python >= 2.6
* boto

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access\_logs**  dictionary  |  | An associative array of access logs configuration settings (see examples). |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **connection\_draining\_timeout**  integer  |  | Wait a specified timeout allowing connections to drain before terminating an instance. |
| **cross\_az\_load\_balancing**  boolean  | **Choices:*** no
* yes
 | Distribute load across all configured Availability Zones. Defaults to `false`. |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **health\_check**  dictionary  |  | An associative array of health check configuration settings (see examples). |
| **idle\_timeout**  integer  |  | ELB connections from clients and to servers are timed out after this amount of time. |
| **instance\_ids**  list / elements=string  |  | List of instance ids to attach to this ELB. |
| **listeners**  list / elements=dictionary  |  | List of ports/protocols for this ELB to listen on (see examples). |
| **name**  string / required  |  | The name of the ELB. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **purge\_instance\_ids**  boolean  | **Choices:*** **no** ←
* yes
 | Purge existing instance ids on ELB that are not found in instance\_ids. |
| **purge\_listeners**  boolean  | **Choices:*** no
* **yes** ←
 | Purge existing listeners on ELB that are not found in listeners. |
| **purge\_subnets**  boolean  | **Choices:*** **no** ←
* yes
 | Purge existing subnet on ELB that are not found in subnets. |
| **purge\_zones**  boolean  | **Choices:*** **no** ←
* yes
 | Purge existing availability zones on ELB that are not found in zones. |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **scheme**  string  | **Choices:*** internal
* **internet-facing** ←
 | The scheme to use when creating the ELB. For a private VPC-visible ELB use `internal`. If you choose to update your scheme with a different value the ELB will be destroyed and recreated. To update scheme you must use the option *wait*. |
| **security\_group\_ids**  list / elements=string  |  | A list of security groups to apply to the ELB. |
| **security\_group\_names**  list / elements=string  |  | A list of security group names to apply to the ELB. |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **state**  string / required  | **Choices:*** absent
* present
 | Create or destroy the ELB. |
| **stickiness**  dictionary  |  | An associative array of stickiness policy settings. Policy will be applied to all listeners (see examples). |
| **subnets**  list / elements=string  |  | A list of VPC subnets to use when creating ELB. Zones should be empty if using this. |
| **tags**  dictionary  |  | An associative array of tags. To delete all tags, supply an empty dict (`{}`). |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |
| **wait**  boolean  | **Choices:*** **no** ←
* yes
 | When specified, Ansible will check the status of the load balancer to ensure it has been successfully removed from AWS. |
| **wait\_timeout**  integer  | **Default:**60 | Used in conjunction with wait. Number of seconds to wait for the ELB to be terminated. A maximum of 600 seconds (10 minutes) is allowed. |
| **zones**  list / elements=string  |  | List of availability zones to enable on this ELB. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: None of these examples set aws_access_key, aws_secret_key, or region.
# It is assumed that their matching environment variables are set.

# Basic provisioning example (non-VPC)

- amazon.aws.ec2_elb_lb:
    name: "test-please-delete"
    state: present
    zones:
      - us-east-1a
      - us-east-1d
    listeners:
      - protocol: http # options are http, https, ssl, tcp
        load_balancer_port: 80
        instance_port: 80
        proxy_protocol: True
      - protocol: https
        load_balancer_port: 443
        instance_protocol: http # optional, defaults to value of protocol setting
        instance_port: 80
        # ssl certificate required for https or ssl
        ssl_certificate_id: "arn:aws:iam::123456789012:server-certificate/company/servercerts/ProdServerCert"

# Internal ELB example

- amazon.aws.ec2_elb_lb:
    name: "test-vpc"
    scheme: internal
    state: present
    instance_ids:
      - i-abcd1234
    purge_instance_ids: true
    subnets:
      - subnet-abcd1234
      - subnet-1a2b3c4d
    listeners:
      - protocol: http # options are http, https, ssl, tcp
        load_balancer_port: 80
        instance_port: 80

# Configure a health check and the access logs
- amazon.aws.ec2_elb_lb:
    name: "test-please-delete"
    state: present
    zones:
      - us-east-1d
    listeners:
      - protocol: http
        load_balancer_port: 80
        instance_port: 80
    health_check:
        ping_protocol: http # options are http, https, ssl, tcp
        ping_port: 80
        ping_path: "/index.html" # not required for tcp or ssl
        response_timeout: 5 # seconds
        interval: 30 # seconds
        unhealthy_threshold: 2
        healthy_threshold: 10
    access_logs:
        interval: 5 # minutes (defaults to 60)
        s3_location: "my-bucket" # This value is required if access_logs is set
        s3_prefix: "logs"

# Ensure ELB is gone
- amazon.aws.ec2_elb_lb:
    name: "test-please-delete"
    state: absent

# Ensure ELB is gone and wait for check (for default timeout)
- amazon.aws.ec2_elb_lb:
    name: "test-please-delete"
    state: absent
    wait: yes

# Ensure ELB is gone and wait for check with timeout value
- amazon.aws.ec2_elb_lb:
    name: "test-please-delete"
    state: absent
    wait: yes
    wait_timeout: 600

# Normally, this module will purge any listeners that exist on the ELB
# but aren't specified in the listeners parameter. If purge_listeners is
# false it leaves them alone
- amazon.aws.ec2_elb_lb:
    name: "test-please-delete"
    state: present
    zones:
      - us-east-1a
      - us-east-1d
    listeners:
      - protocol: http
        load_balancer_port: 80
        instance_port: 80
    purge_listeners: no

# Normally, this module will leave availability zones that are enabled
# on the ELB alone. If purge_zones is true, then any extraneous zones
# will be removed
- amazon.aws.ec2_elb_lb:
    name: "test-please-delete"
    state: present
    zones:
      - us-east-1a
      - us-east-1d
    listeners:
      - protocol: http
        load_balancer_port: 80
        instance_port: 80
    purge_zones: yes

# Creates a ELB and assigns a list of subnets to it.
- amazon.aws.ec2_elb_lb:
    state: present
    name: 'New ELB'
    security_group_ids: 'sg-123456, sg-67890'
    region: us-west-2
    subnets: 'subnet-123456,subnet-67890'
    purge_subnets: yes
    listeners:
      - protocol: http
        load_balancer_port: 80
        instance_port: 80

# Create an ELB with connection draining, increased idle timeout and cross availability
# zone load balancing
- amazon.aws.ec2_elb_lb:
    name: "New ELB"
    state: present
    connection_draining_timeout: 60
    idle_timeout: 300
    cross_az_load_balancing: "yes"
    region: us-east-1
    zones:
      - us-east-1a
      - us-east-1d
    listeners:
      - protocol: http
        load_balancer_port: 80
        instance_port: 80

# Create an ELB with load balancer stickiness enabled
- amazon.aws.ec2_elb_lb:
    name: "New ELB"
    state: present
    region: us-east-1
    zones:
      - us-east-1a
      - us-east-1d
    listeners:
      - protocol: http
        load_balancer_port: 80
        instance_port: 80
    stickiness:
      type: loadbalancer
      enabled: yes
      expiration: 300

# Create an ELB with application stickiness enabled
- amazon.aws.ec2_elb_lb:
    name: "New ELB"
    state: present
    region: us-east-1
    zones:
      - us-east-1a
      - us-east-1d
    listeners:
      - protocol: http
        load_balancer_port: 80
        instance_port: 80
    stickiness:
      type: application
      enabled: yes
      cookie: SESSIONID

# Create an ELB and add tags
- amazon.aws.ec2_elb_lb:
    name: "New ELB"
    state: present
    region: us-east-1
    zones:
      - us-east-1a
      - us-east-1d
    listeners:
      - protocol: http
        load_balancer_port: 80
        instance_port: 80
    tags:
      Name: "New ELB"
      stack: "production"
      client: "Bob"

# Delete all tags from an ELB
- amazon.aws.ec2_elb_lb:
    name: "New ELB"
    state: present
    region: us-east-1
    zones:
      - us-east-1a
      - us-east-1d
    listeners:
      - protocol: http
        load_balancer_port: 80
        instance_port: 80
    tags: {}

```
 ### Authors

 * Jim Dalton (@jsdalton)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_elb_lb_module.html>

amazon.aws.ec2\_eni – Create and optionally attach an Elastic Network Interface (ENI) to an instance
====================================================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_eni`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Create and optionally attach an Elastic Network Interface (ENI) to an instance. If an ENI ID or private\_ip is provided, the existing ENI (if any) will be modified. The ‘attached’ parameter controls the attachment status of the network interface.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * python >= 2.6
* boto

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_reassignment**  boolean  | **Choices:*** **no** ←
* yes
 | Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface. |
| **attached**  boolean  | **Choices:*** no
* yes
 | Specifies if network interface should be attached or detached from instance. If omitted, attachment status won't change |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **delete\_on\_termination**  boolean  | **Choices:*** no
* yes
 | Delete the interface when the instance it is attached to is terminated. You can only specify this flag when the interface is being modified, not on creation. |
| **description**  string  |  | Optional description of the ENI. |
| **device\_index**  integer  | **Default:**0 | The index of the device for the network interface attachment on the instance. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **eni\_id**  string  |  | The ID of the ENI (to modify). If *eni\_id=None* and *state=present*, a new eni will be created. |
| **force\_detach**  boolean  | **Choices:*** **no** ←
* yes
 | Force detachment of the interface. This applies either when explicitly detaching the interface by setting *instance\_id=None* or when deleting an interface with *state=absent*. |
| **instance\_id**  string  |  | Instance ID that you wish to attach ENI to. Since version 2.2, use the *attached* parameter to attach or detach an ENI. Prior to 2.2, to detach an ENI from an instance, use `None`. |
| **name**  string  |  | Name for the ENI. This will create a tag called "Name" with the value assigned here. This can be used in conjunction with *subnet\_id* as another means of identifiying a network interface. AWS does not enforce unique Name tags, so duplicate names are possible if you configure it that way. If that is the case, you will need to provide other identifying information such as *private\_ip\_address* or *eni\_id*. |
| **private\_ip\_address**  string  |  | Private IP address. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **purge\_secondary\_private\_ip\_addresses**  boolean  | **Choices:*** **no** ←
* yes
 | To be used with *secondary\_private\_ip\_addresses* to determine whether or not to remove any secondary IP addresses other than those specified. Set *secondary\_private\_ip\_addresses=[]* to purge all secondary addresses. |
| **purge\_tags**  boolean   added in 1.3.0 of amazon.aws  | **Choices:*** no
* **yes** ←
 | Indicates whether to remove tags not specified in *tags* or *name*. This means you have to specify all the desired tags on each task affecting a network interface. If *tags* is omitted or None this option is disregarded. |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **secondary\_private\_ip\_address\_count**  integer  |  | The number of secondary IP addresses to assign to the network interface. This option is mutually exclusive of *secondary\_private\_ip\_addresses*
 |
| **secondary\_private\_ip\_addresses**  list / elements=string  |  | A list of IP addresses to assign as secondary IP addresses to the network interface. This option is mutually exclusive of *secondary\_private\_ip\_address\_count*
 |
| **security\_groups**  list / elements=string  |  | List of security groups associated with the interface. Only used when *state=present*. Since version 2.2, you can specify security groups by ID or by name or a combination of both. Prior to 2.2, you can specify only by ID. |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **source\_dest\_check**  boolean  | **Choices:*** no
* yes
 | By default, interfaces perform source/destination checks. NAT instances however need this check to be disabled. You can only specify this flag when the interface is being modified, not on creation. |
| **state**  string  | **Choices:*** **present** ←
* absent
 | Create or delete ENI. |
| **subnet\_id**  string  |  | ID of subnet in which to create the ENI. |
| **tags**  dictionary   added in 1.3.0 of amazon.aws  |  | A hash/dictionary of tags to add to the new ENI or to add/remove from an existing one. Please note that the name field sets the "Name" tag. To clear all tags, set this option to an empty dictionary to use in conjunction with *purge\_tags*. If you provide *name*, that tag will not be removed. To prevent removing any tags set *purge\_tags* to false. |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * This module identifies and ENI based on either the *eni\_id*, a combination of *private\_ip\_address* and *subnet\_id*, or a combination of *instance\_id* and *device\_id*. Any of these options will let you specify a particular ENI.
* If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

# Create an ENI. As no security group is defined, ENI will be created in default security group
- amazon.aws.ec2_eni:
    private_ip_address: 172.31.0.20
    subnet_id: subnet-xxxxxxxx
    state: present

# Create an ENI and attach it to an instance
- amazon.aws.ec2_eni:
    instance_id: i-xxxxxxx
    device_index: 1
    private_ip_address: 172.31.0.20
    subnet_id: subnet-xxxxxxxx
    state: present

# Create an ENI with two secondary addresses
- amazon.aws.ec2_eni:
    subnet_id: subnet-xxxxxxxx
    state: present
    secondary_private_ip_address_count: 2

# Assign a secondary IP address to an existing ENI
# This will purge any existing IPs
- amazon.aws.ec2_eni:
    subnet_id: subnet-xxxxxxxx
    eni_id: eni-yyyyyyyy
    state: present
    secondary_private_ip_addresses:
      - 172.16.1.1

# Remove any secondary IP addresses from an existing ENI
- amazon.aws.ec2_eni:
    subnet_id: subnet-xxxxxxxx
    eni_id: eni-yyyyyyyy
    state: present
    secondary_private_ip_address_count: 0

# Destroy an ENI, detaching it from any instance if necessary
- amazon.aws.ec2_eni:
    eni_id: eni-xxxxxxx
    force_detach: true
    state: absent

# Update an ENI
- amazon.aws.ec2_eni:
    eni_id: eni-xxxxxxx
    description: "My new description"
    state: present

# Update an ENI using name and subnet_id
- amazon.aws.ec2_eni:
    name: eni-20
    subnet_id: subnet-xxxxxxx
    description: "My new description"
    state: present

# Update an ENI identifying it by private_ip_address and subnet_id
- amazon.aws.ec2_eni:
    subnet_id: subnet-xxxxxxx
    private_ip_address: 172.16.1.1
    description: "My new description"

# Detach an ENI from an instance
- amazon.aws.ec2_eni:
    eni_id: eni-xxxxxxx
    instance_id: None
    state: present

### Delete an interface on termination
# First create the interface
- amazon.aws.ec2_eni:
    instance_id: i-xxxxxxx
    device_index: 1
    private_ip_address: 172.31.0.20
    subnet_id: subnet-xxxxxxxx
    state: present
  register: eni

# Modify the interface to enable the delete_on_terminaton flag
- amazon.aws.ec2_eni:
    eni_id: "{{ eni.interface.id }}"
    delete_on_termination: true

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **interface**  complex  | when state != absent | Network interface attributes  |
|  | **description**  string  | success | interface description  **Sample:** Firewall network interface |
|  | **groups**  list / elements=dictionary  | success | list of security groups  **Sample:** [{'sg-f8a8a9da': 'default'}] |
|  | **id**  string  | success | network interface id  **Sample:** eni-1d889198 |
|  | **mac\_address**  string  | success | interface's physical address  **Sample:** 00:00:5E:00:53:23 |
|  | **name**  string  | success | The name of the ENI  **Sample:** my-eni-20 |
|  | **owner\_id**  string  | success | aws account id  **Sample:** 812381371 |
|  | **private\_ip\_address**  string  | success | primary ip address of this interface  **Sample:** 10.20.30.40 |
|  | **private\_ip\_addresses**  list / elements=dictionary  | success | list of all private ip addresses associated to this interface  **Sample:** [{'primary\_address': True, 'private\_ip\_address': '10.20.30.40'}] |
|  | **source\_dest\_check**  boolean  | success | value of source/dest check flag  **Sample:** True |
|  | **status**  string  | success | network interface status  **Sample:** pending |
|  | **subnet\_id**  string  | success | which vpc subnet the interface is bound  **Sample:** subnet-b0a0393c |
|  | **tags**  dictionary  | success | The dictionary of tags associated with the ENI  **Sample:** {'Name': 'my-eni', 'group': 'Finance'} |
|  | **vpc\_id**  string  | success | which vpc this network interface is bound  **Sample:** vpc-9a9a9da |

   
  
 ### Authors

 * Rob White (@wimnat)
* Mike Healey (@healem)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_eni_module.html>

amazon.aws.ec2\_eni\_info – Gather information about ec2 ENI interfaces in AWS
==============================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_eni_info`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gather information about ec2 ENI interfaces in AWS.
* This module was called `ec2_eni_facts` before Ansible 2.9. The usage did not change.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **eni\_id**  string   added in 1.3.0 of amazon.aws  |  | The ID of the ENI. This option is mutually exclusive of *filters*. |
| **filters**  dictionary  |  | A dict of filters to apply. Each dict item consists of a filter key and a filter value. See <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeNetworkInterfaces.html> for possible filters. This option is mutually exclusive of *eni\_id*. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

# Gather information about all ENIs
- amazon.aws.ec2_eni_info:

# Gather information about a particular ENI
- amazon.aws.ec2_eni_info:
    filters:
      network-interface-id: eni-xxxxxxx

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **network\_interfaces**  complex  | always | List of matching elastic network interfaces  |
|  | **association**  dictionary  | When an ENI is associated with an EIP | Info of associated elastic IP (EIP)  **Sample:** {'allocation\_id': 'eipalloc-5sdf123', 'association\_id': 'eipassoc-8sdf123', 'ip\_owner\_id': '4415120123456', 'public\_dns\_name': 'ec2-52-1-0-63.compute-1.amazonaws.com', 'public\_ip': '52.1.0.63'} |
|  | **attachment**  dictionary  | When an ENI is attached to an ec2 instance | Info about attached ec2 instance  **Sample:** {'attach\_time': '2017-08-05T15:25:47+00:00', 'attachment\_id': 'eni-attach-149d21234', 'delete\_on\_termination': False, 'device\_index': 1, 'instance\_id': 'i-15b8d3cadbafa1234', 'instance\_owner\_id': '4415120123456', 'status': 'attached'} |
|  | **availability\_zone**  string  | always | Availability zone of ENI  **Sample:** us-east-1b |
|  | **description**  string  | always | Description text for ENI  **Sample:** My favourite network interface |
|  | **groups**  list / elements=string  | always | List of attached security groups  **Sample:** [{'group\_id': 'sg-26d0f1234', 'group\_name': 'my\_ec2\_security\_group'}] |
|  | **id**  string  | always | The id of the ENI (alias for network\_interface\_id)  **Sample:** eni-392fsdf |
|  | **interface\_type**  string  | always | Type of the network interface  **Sample:** interface |
|  | **ipv6\_addresses**  list / elements=string  | always | List of IPv6 addresses for this interface  |
|  | **mac\_address**  string  | always | MAC address of the network interface  **Sample:** 0a:f8:10:2f:ab:a1 |
|  | **name**  string  added in 1.3.0 of amazon.aws | When a Name tag has been set | The Name tag of the ENI, often displayed in the AWS UIs as Name  |
|  | **network\_interface\_id**  string  | always | The id of the ENI  **Sample:** eni-392fsdf |
|  | **owner\_id**  string  | always | AWS account id of the owner of the ENI  **Sample:** 4415120123456 |
|  | **private\_dns\_name**  string  | always | Private DNS name for the ENI  **Sample:** ip-172-16-1-180.ec2.internal |
|  | **private\_ip\_address**  string  | always | Private IP address for the ENI  **Sample:** 172.16.1.180 |
|  | **private\_ip\_addresses**  list / elements=string  | always | List of private IP addresses attached to the ENI  |
|  | **requester\_id**  string  | always | The ID of the entity that launched the ENI  **Sample:** AIDAIONYVJQNIAZFT3ABC |
|  | **requester\_managed**  boolean  | always | Indicates whether the network interface is being managed by an AWS service.  |
|  | **source\_dest\_check**  boolean  | always | Indicates whether the network interface performs source/destination checking.  |
|  | **status**  string  | always | Indicates if the network interface is attached to an instance or not  **Sample:** in-use |
|  | **subnet\_id**  string  | always | Subnet ID the ENI is in  **Sample:** subnet-7bbf01234 |
|  | **tag\_set**  dictionary  | always | Dictionary of tags added to the ENI  |
|  | **tags**  dictionary  added in 1.3.0 of amazon.aws | always | Dictionary of tags added to the ENI  |
|  | **vpc\_id**  string  | always | ID of the VPC the network interface it part of  **Sample:** vpc-b3f1f123 |

   
  
 ### Authors

 * Rob White (@wimnat)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_eni_info_module.html>

amazon.aws.ec2\_group\_info – Gather information about ec2 security groups in AWS.
==================================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_group_info`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gather information about ec2 security groups in AWS.
* This module was called `amazon.aws.ec2_group_facts` before Ansible 2.9. The usage did not change.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **filters**  dictionary  | **Default:**{} | A dict of filters to apply. Each dict item consists of a filter key and a filter value. See <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html> for possible filters. Filter names and values are case sensitive. You can also use underscores (\_) instead of dashes (-) in the filter keys, which will take precedence in case of conflict. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * By default, the module will return all security groups. To limit results use the appropriate filters.
* If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

# Gather information about all security groups
- amazon.aws.ec2_group_info:

# Gather information about all security groups in a specific VPC
- amazon.aws.ec2_group_info:
    filters:
      vpc-id: vpc-12345678

# Gather information about all security groups in a specific VPC
- amazon.aws.ec2_group_info:
    filters:
      vpc-id: vpc-12345678

# Gather information about a security group
- amazon.aws.ec2_group_info:
    filters:
      group-name: example-1

# Gather information about a security group by id
- amazon.aws.ec2_group_info:
    filters:
      group-id: sg-12345678

# Gather information about a security group with multiple filters, also mixing the use of underscores as filter keys
- amazon.aws.ec2_group_info:
    filters:
      group_id: sg-12345678
      vpc-id: vpc-12345678

# Gather information about various security groups
- amazon.aws.ec2_group_info:
    filters:
      group-name:
        - example-1
        - example-2
        - example-3

# Gather information about any security group with a tag key Name and value Example.
# The quotes around 'tag:name' are important because of the colon in the value
- amazon.aws.ec2_group_info:
    filters:
      "tag:Name": Example

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **security\_groups**  list / elements=string  | always | Security groups that match the provided filters. Each element consists of a dict with all the information related to that security group.  |

   
  
 ### Authors

 * Henrique Rodrigues (@Sodki)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_group_info_module.html>

amazon.aws.ec2\_ami – Create or destroy an image (AMI) in ec2
=============================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_ami`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Registers or deregisters ec2 images.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * python >= 2.6
* boto

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **architecture**  string  | **Default:**"x86\_64" | The target architecture of the image to register |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **billing\_products**  list / elements=string  |  | A list of valid billing codes. To be used with valid accounts by aws marketplace vendors. |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **delete\_snapshot**  boolean  | **Choices:*** **no** ←
* yes
 | Delete snapshots when deregistering the AMI. |
| **description**  string  |  | Human-readable string describing the contents and purpose of the AMI. |
| **device\_mapping**  list / elements=dictionary  |  | List of device hashes/dictionaries with custom configurations (same block-device-mapping parameters). |
|  | **delete\_on\_termination**  boolean  | **Choices:*** no
* yes
 | Whether the device should be automatically deleted when the Instance is terminated. |
|  | **device\_name**  string / required  |  | The device name. For example `/dev/sda`. 
aliases: DeviceName |
|  | **encrypted**  boolean  | **Choices:*** no
* yes
 | Whether the volume should be encrypted. |
|  | **iops**  integer  |  | When using an `io1` *volume\_type* this sets the number of IOPS provisioned for the volume |
|  | **no\_device**  boolean  | **Choices:*** no
* yes
 | Suppresses the specified device included in the block device mapping of the AMI. Alias `NoDevice` has been deprecated and will be removed after 2022-06-01. 
aliases: NoDevice |
|  | **snapshot\_id**  string  |  | The ID of the Snapshot. |
|  | **virtual\_name**  string  |  | The virtual name for the device. See the AWS documentation for more detail <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_BlockDeviceMapping.html>. Alias `VirtualName` has been deprecated and will be removed after 2022-06-01. 
aliases: VirtualName |
|  | **volume\_size**  integer  |  | The size of the volume (in GiB) 
aliases: size |
|  | **volume\_type**  string  |  | The volume type. Defaults to `gp2` when not set. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **enhanced\_networking**  boolean  | **Choices:*** no
* yes
 | A boolean representing whether enhanced networking with ENA is enabled or not. |
| **image\_id**  string  |  | Image ID to be deregistered. |
| **image\_location**  string  |  | The s3 location of an image to use for the AMI. |
| **instance\_id**  string  |  | Instance ID to create the AMI from. |
| **kernel\_id**  string  |  | The target kernel id of the image to register. |
| **launch\_permissions**  dictionary  |  | Users and groups that should be able to launch the AMI. Expects dictionary with a key of user\_ids and/or group\_names. user\_ids should be a list of account ids. group\_name should be a list of groups, "all" is the only acceptable value currently. You must pass all desired launch permissions if you wish to modify existing launch permissions (passing just groups will remove all users) |
| **name**  string  |  | The name of the new AMI. |
| **no\_reboot**  boolean  | **Choices:*** **no** ←
* yes
 | Flag indicating that the bundling process should not attempt to shutdown the instance before bundling. If this flag is True, the responsibility of maintaining file system integrity is left to the owner of the instance. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **purge\_tags**  boolean  | **Choices:*** **no** ←
* yes
 | Whether to remove existing tags that aren't passed in the `tags` parameter |
| **ramdisk\_id**  string  |  | The ID of the RAM disk. |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **root\_device\_name**  string  |  | The root device name of the image to register. |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **sriov\_net\_support**  string  |  | Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | Register or deregister an AMI. |
| **tags**  dictionary  |  | A dictionary of tags to add to the new image; '{"key":"value"}' and '{"key":"value","key":"value"}' |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |
| **virtualization\_type**  string  | **Default:**"hvm" | The virtualization type of the image to register. |
| **wait**  boolean  | **Choices:*** **no** ←
* yes
 | Wait for the AMI to be in state 'available' before returning. |
| **wait\_timeout**  integer  | **Default:**1200 | How long before wait gives up, in seconds. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

- name: Basic AMI Creation
  amazon.aws.ec2_ami:
    instance_id: i-xxxxxx
    wait: yes
    name: newtest
    tags:
      Name: newtest
      Service: TestService

- name: Basic AMI Creation, without waiting
  amazon.aws.ec2_ami:
    instance_id: i-xxxxxx
    wait: no
    name: newtest

- name: AMI Registration from EBS Snapshot
  amazon.aws.ec2_ami:
    name: newtest
    state: present
    architecture: x86_64
    virtualization_type: hvm
    root_device_name: /dev/xvda
    device_mapping:
      - device_name: /dev/xvda
        volume_size: 8
        snapshot_id: snap-xxxxxxxx
        delete_on_termination: true
        volume_type: gp2

- name: AMI Creation, with a custom root-device size and another EBS attached
  amazon.aws.ec2_ami:
    instance_id: i-xxxxxx
    name: newtest
    device_mapping:
        - device_name: /dev/sda1
          size: XXX
          delete_on_termination: true
          volume_type: gp2
        - device_name: /dev/sdb
          size: YYY
          delete_on_termination: false
          volume_type: gp2

- name: AMI Creation, excluding a volume attached at /dev/sdb
  amazon.aws.ec2_ami:
    instance_id: i-xxxxxx
    name: newtest
    device_mapping:
        - device_name: /dev/sda1
          size: XXX
          delete_on_termination: true
          volume_type: gp2
        - device_name: /dev/sdb
          no_device: yes

- name: Deregister/Delete AMI (keep associated snapshots)
  amazon.aws.ec2_ami:
    image_id: "{{ instance.image_id }}"
    delete_snapshot: False
    state: absent

- name: Deregister AMI (delete associated snapshots too)
  amazon.aws.ec2_ami:
    image_id: "{{ instance.image_id }}"
    delete_snapshot: True
    state: absent

- name: Update AMI Launch Permissions, making it public
  amazon.aws.ec2_ami:
    image_id: "{{ instance.image_id }}"
    state: present
    launch_permissions:
      group_names: ['all']

- name: Allow AMI to be launched by another account
  amazon.aws.ec2_ami:
    image_id: "{{ instance.image_id }}"
    state: present
    launch_permissions:
      user_ids: ['123456789012']

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **architecture**  string  | when AMI is created or already exists | Architecture of image.  **Sample:** x86\_64 |
| **block\_device\_mapping**  dictionary  | when AMI is created or already exists | Block device mapping associated with image.  **Sample:** {'/dev/sda1': {'delete\_on\_termination': True, 'encrypted': False, 'size': 10, 'snapshot\_id': 'snap-1a03b80e7', 'volume\_type': 'standard'}} |
| **creationDate**  string  | when AMI is created or already exists | Creation date of image.  **Sample:** 2015-10-15T22:43:44.000Z |
| **description**  string  | when AMI is created or already exists | Description of image.  **Sample:** nat-server |
| **hypervisor**  string  | when AMI is created or already exists | Type of hypervisor.  **Sample:** xen |
| **image\_id**  string  | when AMI is created or already exists | ID of the image.  **Sample:** ami-1234abcd |
| **is\_public**  boolean  | when AMI is created or already exists | Whether image is public.  |
| **launch\_permission**  list / elements=string  | when AMI is created or already exists | Permissions allowing other accounts to access the AMI.  **Sample:** [{'group': 'all'}] |
| **location**  string  | when AMI is created or already exists | Location of image.  **Sample:** 315210894379/nat-server |
| **name**  string  | when AMI is created or already exists | AMI name of image.  **Sample:** nat-server |
| **ownerId**  string  | when AMI is created or already exists | Owner of image.  **Sample:** 435210894375 |
| **platform**  string  | when AMI is created or already exists | Platform of image.  |
| **root\_device\_name**  string  | when AMI is created or already exists | Root device name of image.  **Sample:** /dev/sda1 |
| **root\_device\_type**  string  | when AMI is created or already exists | Root device type of image.  **Sample:** ebs |
| **snapshots\_deleted**  list / elements=string  | after AMI is deregistered, if *delete\_snapshot=true* | A list of snapshot ids deleted after deregistering image.  **Sample:** ['snap-fbcccb8f', 'snap-cfe7cdb4'] |
| **state**  string  | when AMI is created or already exists | State of image.  **Sample:** available |
| **tags**  dictionary  | when AMI is created or already exists | A dictionary of tags assigned to image.  **Sample:** {'Env': 'devel', 'Name': 'nat-server'} |
| **virtualization\_type**  string  | when AMI is created or already exists | Image virtualization type.  **Sample:** hvm |

   
  
 ### Authors

 * Evan Duffield (@scicoin-project) <[eduffield@iacquire.com](https://docs.ansible.com/cdn-cgi/l/email-protection#583d3c2d3e3e313d343c7e7b6b6f637e7b6d6a637e7b6c606331393b292d312a3d7e7b6c6e633b3735)>
* Constantin Bugneac (@Constantin07) <[constantin.bugneac@endava.com](https://docs.ansible.com/cdn-cgi/l/email-protection#ed8e82839e998c83998483cbced9dbd68f988a83888c8ecbcededad6cbced8dfd6cbced9d5d68883898c9b8ccbced9dbd68e8280)>
* Ross Williams (@gunzy83) <[gunzy83au@gmail.com](https://docs.ansible.com/cdn-cgi/l/email-protection#1b7c6e75616223287a6e3d38282c203d382e29203d382f23207c767a72773d382f2d20787476)>
* Willem van Ketwich (@wilvk) <[willvk@gmail.com](https://docs.ansible.com/cdn-cgi/l/email-protection#47302e2b2b312c616474707c616472757c6164737f7c202a262e2b616473717c24282a)>



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_ami_module.html>

amazon.aws.ec2\_ami\_info – Gather information about ec2 AMIs
=============================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_ami_info`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gather information about ec2 AMIs
* This module was called `amazon.aws.ec2_ami_facts` before Ansible 2.9. The usage did not change.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **describe\_image\_attributes**  boolean  | **Choices:*** **no** ←
* yes
 | Describe attributes (like launchPermission) of the images found. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **executable\_users**  list / elements=string  |  | Filter images by users with explicit launch permissions. Valid options are an AWS account ID, self, or all (public AMIs). 
aliases: executable\_user |
| **filters**  dictionary  |  | A dict of filters to apply. Each dict item consists of a filter key and a filter value. See <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html> for possible filters. Filter names and values are case sensitive. |
| **image\_ids**  list / elements=string  |  | One or more image IDs. 
aliases: image\_id |
| **owners**  list / elements=string  |  | Filter the images by the owner. Valid options are an AWS account ID, self, or an AWS owner alias ( amazon | aws-marketplace | microsoft ). 
aliases: owner |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

- name: gather information about an AMI using ami-id
  amazon.aws.ec2_ami_info:
    image_ids: ami-5b488823

- name: gather information about all AMIs with tag key Name and value webapp
  amazon.aws.ec2_ami_info:
    filters:
      "tag:Name": webapp

- name: gather information about an AMI with 'AMI Name' equal to foobar
  amazon.aws.ec2_ami_info:
    filters:
      name: foobar

- name: gather information about Ubuntu 17.04 AMIs published by Canonical (099720109477)
  amazon.aws.ec2_ami_info:
    owners: 099720109477
    filters:
      name: "ubuntu/images/ubuntu-zesty-17.04-*"

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **images**  list / elements=dictionary  | always | A list of images.  |
|  | **architecture**  string  | always | The architecture of the image.  **Sample:** x86\_64 |
|  | **block\_device\_mappings**  list / elements=dictionary  | always | Any block device mapping entries.  |
|  |  | **device\_name**  string  | always | The device name exposed to the instance.  **Sample:** /dev/sda1 |
|  |  | **ebs**  complex  | always | EBS volumes  |
|  | **creation\_date**  string  | always | The date and time the image was created.  **Sample:** 2017-10-16T19:22:13.000Z |
|  | **description**  string  | always | The description of the AMI.  |
|  | **ena\_support**  boolean  | always | Whether enhanced networking with ENA is enabled.  **Sample:** True |
|  | **hypervisor**  string  | always | The hypervisor type of the image.  **Sample:** xen |
|  | **image\_id**  string  | always | The ID of the AMI.  **Sample:** ami-5b466623 |
|  | **image\_location**  string  | always | The location of the AMI.  **Sample:** 408466080000/Webapp |
|  | **image\_type**  string  | always | The type of image.  **Sample:** machine |
|  | **launch\_permissions**  list / elements=dictionary  | When image is owned by calling account and *describe\_image\_attributes* is yes. | A List of AWS accounts may launch the AMI.  **Sample:** [{'group': 'all'}, {'user\_id': '408466080000'}] |
|  |  | **group**  string  | success | A value of 'all' means the AMI is public.  |
|  |  | **user\_id**  string  | success | An AWS account ID with permissions to launch the AMI.  |
|  | **name**  string  | always | The name of the AMI that was provided during image creation.  **Sample:** Webapp |
|  | **owner\_id**  string  | always | The AWS account ID of the image owner.  **Sample:** 408466080000 |
|  | **public**  boolean  | always | Whether the image has public launch permissions.  **Sample:** True |
|  | **root\_device\_name**  string  | always | The device name of the root device.  **Sample:** /dev/sda1 |
|  | **root\_device\_type**  string  | always | The type of root device used by the AMI.  **Sample:** ebs |
|  | **sriov\_net\_support**  string  | always | Whether enhanced networking is enabled.  **Sample:** simple |
|  | **state**  string  | always | The current state of the AMI.  **Sample:** available |
|  | **tags**  dictionary  | always | Any tags assigned to the image.  |
|  | **virtualization\_type**  string  | always | The type of virtualization of the AMI.  **Sample:** hvm |

   
  
 ### Authors

 * Prasad Katti (@prasadkatti)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_ami_info_module.html>

amazon.aws.ec2\_group – maintain an ec2 VPC security group.
===========================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_group`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Maintains ec2 security groups.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **description**  string  |  | Description of the security group. Required when `state` is `present`. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **group\_id**  string  |  | Id of group to delete (works only with absent). One of and only one of *name* or *group\_id* is required. |
| **name**  string  |  | Name of the security group. One of and only one of *name* or *group\_id* is required. Required if *state=present*. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **purge\_rules**  boolean  | **Choices:*** no
* yes

**Default:**"true" | Purge existing rules on security group that are not found in rules. |
| **purge\_rules\_egress**  boolean  | **Choices:*** no
* yes

**Default:**"true" | Purge existing rules\_egress on security group that are not found in rules\_egress. |
| **purge\_tags**  boolean  | **Choices:*** no
* **yes** ←
 | If yes, existing tags will be purged from the resource to match exactly what is defined by *tags* parameter. If the *tags* parameter is not set then tags will not be modified. |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **rules**  list / elements=dictionary  |  | List of firewall inbound rules to enforce in this group (see example). If none are supplied, no inbound rules will be enabled. Rules list may include its own name in `group\_name`. This allows idempotent loopback additions (e.g. allow group to access itself). Rule sources list support was added in version 2.4. This allows to define multiple sources per source type as well as multiple source types per rule. Prior to 2.4 an individual source is allowed. In version 2.5 support for rule descriptions was added. |
|  | **cidr\_ip**  string  |  | The IPv4 CIDR range traffic is coming from. You can specify only one of *cidr\_ip*, *cidr\_ipv6*, *ip\_prefix*, *group\_id* and *group\_name*. |
|  | **cidr\_ipv6**  string  |  | The IPv6 CIDR range traffic is coming from. You can specify only one of *cidr\_ip*, *cidr\_ipv6*, *ip\_prefix*, *group\_id* and *group\_name*. |
|  | **from\_port**  integer  |  | The start of the range of ports that traffic is coming from. A value of `-1` indicates all ports. |
|  | **group\_desc**  string  |  | If the *group\_name* is set and the Security Group doesn't exist a new Security Group will be created with *group\_desc* as the description. |
|  | **group\_id**  string  |  | The ID of the Security Group that traffic is coming from. You can specify only one of *cidr\_ip*, *cidr\_ipv6*, *ip\_prefix*, *group\_id* and *group\_name*. |
|  | **group\_name**  string  |  | Name of the Security Group that traffic is coming from. If the Security Group doesn't exist a new Security Group will be created with *group\_desc* as the description. You can specify only one of *cidr\_ip*, *cidr\_ipv6*, *ip\_prefix*, *group\_id* and *group\_name*. |
|  | **ip\_prefix**  string  |  | The IP Prefix <https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-prefix-lists.html> that traffic is coming from. You can specify only one of *cidr\_ip*, *cidr\_ipv6*, *ip\_prefix*, *group\_id* and *group\_name*. |
|  | **proto**  string  |  | The IP protocol name (`tcp`, `udp`, `icmp`, `icmpv6`) or number (<https://en.wikipedia.org/wiki/List_of_IP_protocol_numbers>) |
|  | **rule\_desc**  string  |  | A description for the rule. |
|  | **to\_port**  integer  |  | The end of the range of ports that traffic is coming from. A value of `-1` indicates all ports. |
| **rules\_egress**  list / elements=dictionary  |  | List of firewall outbound rules to enforce in this group (see example). If none are supplied, a default all-out rule is assumed. If an empty list is supplied, no outbound rules will be enabled. Rule Egress sources list support was added in version 2.4. In version 2.5 support for rule descriptions was added. |
|  | **cidr\_ip**  string  |  | The IPv4 CIDR range traffic is going to. You can specify only one of *cidr\_ip*, *cidr\_ipv6*, *ip\_prefix*, *group\_id* and *group\_name*. |
|  | **cidr\_ipv6**  string  |  | The IPv6 CIDR range traffic is going to. You can specify only one of *cidr\_ip*, *cidr\_ipv6*, *ip\_prefix*, *group\_id* and *group\_name*. |
|  | **from\_port**  integer  |  | The start of the range of ports that traffic is going to. A value of `-1` indicates all ports. |
|  | **group\_desc**  string  |  | If the *group\_name* is set and the Security Group doesn't exist a new Security Group will be created with *group\_desc* as the description. |
|  | **group\_id**  string  |  | The ID of the Security Group that traffic is going to. You can specify only one of *cidr\_ip*, *cidr\_ipv6*, *ip\_prefix*, *group\_id* and *group\_name*. |
|  | **group\_name**  string  |  | Name of the Security Group that traffic is going to. If the Security Group doesn't exist a new Security Group will be created with *group\_desc* as the description. You can specify only one of *cidr\_ip*, *cidr\_ipv6*, *ip\_prefix*, *group\_id* and *group\_name*. |
|  | **ip\_prefix**  string  |  | The IP Prefix <https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-prefix-lists.html> that traffic is going to. You can specify only one of *cidr\_ip*, *cidr\_ipv6*, *ip\_prefix*, *group\_id* and *group\_name*. |
|  | **proto**  string  |  | The IP protocol name (`tcp`, `udp`, `icmp`, `icmpv6`) or number (<https://en.wikipedia.org/wiki/List_of_IP_protocol_numbers>) |
|  | **rule\_desc**  string  |  | A description for the rule. |
|  | **to\_port**  integer  |  | The end of the range of ports that traffic is going to. A value of `-1` indicates all ports. |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **state**  string  | **Choices:*** **present** ←
* absent
 | Create or delete a security group. |
| **tags**  dictionary  |  | A dictionary of one or more tags to assign to the security group. 
aliases: resource\_tags |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |
| **vpc\_id**  string  |  | ID of the VPC to create the group in. |

   
 Notes
-----

  Note

 * If a rule declares a group\_name and that group doesn’t exist, it will be automatically created. In that case, group\_desc should be provided as well. The module will refuse to create a depended-on group without a description.
* Preview diff mode support is added in version 2.7.
* If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
- name: example using security group rule descriptions
  amazon.aws.ec2_group:
    name: "{{ name }}"
    description: sg with rule descriptions
    vpc_id: vpc-xxxxxxxx
    profile: "{{ aws_profile }}"
    region: us-east-1
    rules:
      - proto: tcp
        ports:
        - 80
        cidr_ip: 0.0.0.0/0
        rule_desc: allow all on port 80

- name: example ec2 group
  amazon.aws.ec2_group:
    name: example
    description: an example EC2 group
    vpc_id: 12345
    region: eu-west-1
    aws_secret_key: SECRET
    aws_access_key: ACCESS
    rules:
      - proto: tcp
        from_port: 80
        to_port: 80
        cidr_ip: 0.0.0.0/0
      - proto: tcp
        from_port: 22
        to_port: 22
        cidr_ip: 10.0.0.0/8
      - proto: tcp
        from_port: 443
        to_port: 443
        # this should only be needed for EC2 Classic security group rules
        # because in a VPC an ELB will use a user-account security group
        group_id: amazon-elb/sg-87654321/amazon-elb-sg
      - proto: tcp
        from_port: 3306
        to_port: 3306
        group_id: 123412341234/sg-87654321/exact-name-of-sg
      - proto: udp
        from_port: 10050
        to_port: 10050
        cidr_ip: 10.0.0.0/8
      - proto: udp
        from_port: 10051
        to_port: 10051
        group_id: sg-12345678
      - proto: icmp
        from_port: 8 # icmp type, -1 = any type
        to_port:  -1 # icmp subtype, -1 = any subtype
        cidr_ip: 10.0.0.0/8
      - proto: all
        # the containing group name may be specified here
        group_name: example
      - proto: all
        # in the 'proto' attribute, if you specify -1, all, or a protocol number other than tcp, udp, icmp, or 58 (ICMPv6),
        # traffic on all ports is allowed, regardless of any ports you specify
        from_port: 10050 # this value is ignored
        to_port: 10050 # this value is ignored
        cidr_ip: 10.0.0.0/8

    rules_egress:
      - proto: tcp
        from_port: 80
        to_port: 80
        cidr_ip: 0.0.0.0/0
        cidr_ipv6: 64:ff9b::/96
        group_name: example-other
        # description to use if example-other needs to be created
        group_desc: other example EC2 group

- name: example2 ec2 group
  amazon.aws.ec2_group:
    name: example2
    description: an example2 EC2 group
    vpc_id: 12345
    region: eu-west-1
    rules:
      # 'ports' rule keyword was introduced in version 2.4. It accepts a single port value or a list of values including ranges (from_port-to_port).
      - proto: tcp
        ports: 22
        group_name: example-vpn
      - proto: tcp
        ports:
          - 80
          - 443
          - 8080-8099
        cidr_ip: 0.0.0.0/0
      # Rule sources list support was added in version 2.4. This allows to define multiple sources per source type as well as multiple source types per rule.
      - proto: tcp
        ports:
          - 6379
          - 26379
        group_name:
          - example-vpn
          - example-redis
      - proto: tcp
        ports: 5665
        group_name: example-vpn
        cidr_ip:
          - 172.16.1.0/24
          - 172.16.17.0/24
        cidr_ipv6:
          - 2607:F8B0::/32
          - 64:ff9b::/96
        group_id:
          - sg-edcd9784
  diff: True

- name: "Delete group by its id"
  amazon.aws.ec2_group:
    region: eu-west-1
    group_id: sg-33b4ee5b
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **description**  string  | on create/update | Description of security group  **Sample:** My Security Group |
| **group\_id**  string  | on create/update | Security group id  **Sample:** sg-abcd1234 |
| **group\_name**  string  | on create/update | Security group name  **Sample:** My Security Group |
| **ip\_permissions**  list / elements=string  | on create/update | Inbound rules associated with the security group.  **Sample:** [{'from\_port': 8182, 'ip\_protocol': 'tcp', 'ip\_ranges': [{'cidr\_ip': '198.51.100.1/32'}], 'ipv6\_ranges': [], 'prefix\_list\_ids': [], 'to\_port': 8182, 'user\_id\_group\_pairs': []}] |
| **ip\_permissions\_egress**  list / elements=string  | on create/update | Outbound rules associated with the security group.  **Sample:** [{'ip\_protocol': -1, 'ip\_ranges': [{'cidr\_ip': '0.0.0.0/0', 'ipv6\_ranges': [], 'prefix\_list\_ids': [], 'user\_id\_group\_pairs': []}]}] |
| **owner\_id**  integer  | on create/update | AWS Account ID of the security group  **Sample:** 123456789012 |
| **tags**  dictionary  | on create/update | Tags associated with the security group  **Sample:** {'Name': 'My Security Group', 'Purpose': 'protecting stuff'} |
| **vpc\_id**  string  | on create/update | ID of VPC to which the security group belongs  **Sample:** vpc-abcd1234 |

   
  
 ### Authors

 * Andrew de Quincey (@adq)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_group_module.html>

amazon.aws.ec2\_key – create or delete an ec2 key pair
======================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_key`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * create or delete an ec2 key pair.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **force**  boolean  | **Choices:*** no
* **yes** ←
 | Force overwrite of already existing key pair if key has changed. |
| **key\_material**  string  |  | Public key material. |
| **name**  string / required  |  | Name of the key pair. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **state**  string  | **Choices:*** **present** ←
* absent
 | create or delete keypair |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |
| **wait**  boolean  | **Choices:*** no
* yes
 | This option has no effect since version 2.5 and will be removed after 2022-06-01. |
| **wait\_timeout**  integer  |  | This option has no effect since version 2.5 and will be removed after 2022-06-01. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

- name: create a new ec2 key pair, returns generated private key
  amazon.aws.ec2_key:
    name: my_keypair

- name: create key pair using provided key_material
  amazon.aws.ec2_key:
    name: my_keypair
    key_material: 'ssh-rsa AAAAxyz...== me@example.com'

- name: create key pair using key_material obtained using 'file' lookup plugin
  amazon.aws.ec2_key:
    name: my_keypair
    key_material: "{{ lookup('file', '/path/to/public_key/id_rsa.pub') }}"

# try creating a key pair with the name of an already existing keypair
# but don't overwrite it even if the key is different (force=false)
- name: try creating a key pair with name of an already existing keypair
  amazon.aws.ec2_key:
    name: my_existing_keypair
    key_material: 'ssh-rsa AAAAxyz...== me@example.com'
    force: false

- name: remove key pair by name
  amazon.aws.ec2_key:
    name: my_keypair
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **changed**  boolean  | always | whether a keypair was created/deleted  **Sample:** True |
| **key**  complex  | always | details of the keypair (this is set to null when state is absent)  |
|  | **fingerprint**  string  | when state is present | fingerprint of the key  **Sample:** b0:22:49:61:d9:44:9d:0c:7e:ac:8a:32:93:21:6c:e8:fb:59:62:43 |
|  | **name**  string  | when state is present | name of the keypair  **Sample:** my\_keypair |
|  | **private\_key**  string  | when a new keypair is created by AWS (key\_material is not provided) | private key of a newly created keypair  **Sample:** -----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKC... -----END RSA PRIVATE KEY----- |
| **msg**  string  | always | short message describing the action taken  **Sample:** key pair created |

   
  
 ### Authors

 * Vincent Viallet (@zbal)
* Prasad Katti (@prasadkatti)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_key_module.html>

amazon.aws.ec2\_metadata\_facts – gathers facts (instance metadata) about remote hosts within EC2
=================================================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_metadata_facts`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Notes](#notes)
* [Examples](#examples)
* [Returned Facts](#returned-facts)

 Synopsis
--------

 * This module fetches data from the instance metadata endpoint in EC2 as per <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html>.
* The module must be called from within the EC2 instance itself.
* The module is configured to utilize the session oriented Instance Metadata Service v2 (IMDSv2) <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html>.
* If the HttpEndpoint parameter <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceMetadataOptions.html#API_ModifyInstanceMetadataOptions_RequestParameters> is set to disabled for the EC2 instance, the module will return an error while retrieving a session token.

 Notes
-----

  Note

 * Parameters to filter on ec2\_metadata\_facts may be added later.

  Examples
--------

 
```
# Gather EC2 metadata facts
- amazon.aws.ec2_metadata_facts:

- debug:
    msg: "This instance is a t1.micro"
  when: ansible_ec2_instance_type == "t1.micro"

```
 Returned Facts
--------------

 Facts returned by this module are added/updated in the `hostvars` host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.

 

| Fact | Returned | Description |
| --- | --- | --- |
| **ansible\_ec2\_ami\_id**  string / elements=string  | success | The AMI ID used to launch the instance.   **Sample:** ami-XXXXXXXX |
| **ansible\_ec2\_ami\_launch\_index**  string / elements=string  | success | If you started more than one instance at the same time, this value indicates the order in which the instance was launched.  The value of the first instance launched is 0.   **Sample:** 0 |
| **ansible\_ec2\_ami\_manifest\_path**  string / elements=string  | success | The path to the AMI manifest file in Amazon S3.  If you used an Amazon EBS-backed AMI to launch the instance, the returned result is unknown.   **Sample:** (unknown) |
| **ansible\_ec2\_ancestor\_ami\_ids**  string / elements=string  | success | The AMI IDs of any instances that were rebundled to create this AMI.  This value will only exist if the AMI manifest file contained an ancestor-amis key.   **Sample:** (unknown) |
| **ansible\_ec2\_block\_device\_mapping\_ami**  string / elements=string  | success | The virtual device that contains the root/boot file system.   **Sample:** /dev/sda1 |
| **ansible\_ec2\_block\_device\_mapping\_ebsN**  string / elements=string  | success | The virtual devices associated with Amazon EBS volumes, if any are present.  Amazon EBS volumes are only available in metadata if they were present at launch time or when the instance was last started.  The N indicates the index of the Amazon EBS volume (such as ebs1 or ebs2).   **Sample:** /dev/xvdb |
| **ansible\_ec2\_block\_device\_mapping\_ephemeralN**  string / elements=string  | success | The virtual devices associated with ephemeral devices, if any are present. The N indicates the index of the ephemeral volume.   **Sample:** /dev/xvdc |
| **ansible\_ec2\_block\_device\_mapping\_root**  string / elements=string  | success | The virtual devices or partitions associated with the root devices, or partitions on the virtual device, where the root (/ or C) file system is associated with the given instance.   **Sample:** /dev/sda1 |
| **ansible\_ec2\_block\_device\_mapping\_swap**  string / elements=string  | success | The virtual devices associated with swap. Not always present.   **Sample:** /dev/sda2 |
| **ansible\_ec2\_fws\_instance\_monitoring**  string / elements=string  | success | Value showing whether the customer has enabled detailed one-minute monitoring in CloudWatch.   **Sample:** enabled |
| **ansible\_ec2\_hostname**  string / elements=string  | success | The private IPv4 DNS hostname of the instance.  In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0).   **Sample:** ip-10-0-0-1.ec2.internal |
| **ansible\_ec2\_iam\_info**  complex / elements=string  | success | If there is an IAM role associated with the instance, contains information about the last time the instance profile was updated, including the instance's LastUpdated date, InstanceProfileArn, and InstanceProfileId. Otherwise, not present.   |
|  | **InstanceProfileArn**  string / elements=string  | success | The ARN of the InstanceProfile associated with the Instance.   |
|  | **InstanceProfileId**  string / elements=string  | success | The Id of the InstanceProfile associated with the Instance.   |
|  | **LastUpdated**  string / elements=string  | success | The last time which InstanceProfile is associated with the Instance changed.   |
| **ansible\_ec2\_iam\_info\_instanceprofilearn**  string / elements=string  | success | The IAM instance profile ARN.   **Sample:** arn:aws:iam::<account id>:instance-profile/<role name> |
| **ansible\_ec2\_iam\_info\_instanceprofileid**  string / elements=string  | success | IAM instance profile ID.   |
| **ansible\_ec2\_iam\_info\_lastupdated**  string / elements=string  | success | IAM info last updated time.   **Sample:** 2017-05-12T02:42:27Z |
| **ansible\_ec2\_iam\_instance\_profile\_role**  string / elements=string  | success | IAM instance role.   **Sample:** role\_name |
| **ansible\_ec2\_iam\_security\_credentials\_**  string / elements=string  | success | If there is an IAM role associated with the instance, role-name is the name of the role, and role-name contains the temporary security credentials associated with the role. Otherwise, not present.   |
| **ansible\_ec2\_iam\_security\_credentials\_\_accesskeyid**  string / elements=string  | success | IAM role access key ID.   |
| **ansible\_ec2\_iam\_security\_credentials\_\_code**  string / elements=string  | success | IAM code.   **Sample:** Success |
| **ansible\_ec2\_iam\_security\_credentials\_\_expiration**  string / elements=string  | success | IAM role credentials expiration time.   **Sample:** 2017-05-12T09:11:41Z |
| **ansible\_ec2\_iam\_security\_credentials\_\_lastupdated**  string / elements=string  | success | IAM role last updated time.   **Sample:** 2017-05-12T02:40:44Z |
| **ansible\_ec2\_iam\_security\_credentials\_\_secretaccesskey**  string / elements=string  | success | IAM role secret access key.   |
| **ansible\_ec2\_iam\_security\_credentials\_\_token**  string / elements=string  | success | IAM role token.   |
| **ansible\_ec2\_iam\_security\_credentials\_\_type**  string / elements=string  | success | IAM role type.   **Sample:** AWS-HMAC |
| **ansible\_ec2\_instance\_action**  string / elements=string  | success | Notifies the instance that it should reboot in preparation for bundling.   **Sample:** none |
| **ansible\_ec2\_instance\_id**  string / elements=string  | success | The ID of this instance.   **Sample:** i-XXXXXXXXXXXXXXXXX |
| **ansible\_ec2\_instance\_identity\_document**  string / elements=string  | success | JSON containing instance attributes, such as instance-id, private IP address, etc.   |
| **ansible\_ec2\_instance\_identity\_document\_accountid**  string / elements=string  | success |  **Sample:** 012345678901 |
| **ansible\_ec2\_instance\_identity\_document\_architecture**  string / elements=string  | success | Instance system architecture.   **Sample:** x86\_64 |
| **ansible\_ec2\_instance\_identity\_document\_availabilityzone**  string / elements=string  | success | The Availability Zone in which the instance launched.   **Sample:** us-east-1a |
| **ansible\_ec2\_instance\_identity\_document\_billingproducts**  string / elements=string  | success | Billing products for this instance.   |
| **ansible\_ec2\_instance\_identity\_document\_devpayproductcodes**  string / elements=string  | success | Product codes for the launched AMI.   |
| **ansible\_ec2\_instance\_identity\_document\_imageid**  string / elements=string  | success | The AMI ID used to launch the instance.   **Sample:** ami-01234567 |
| **ansible\_ec2\_instance\_identity\_document\_instanceid**  string / elements=string  | success | The ID of this instance.   **Sample:** i-0123456789abcdef0 |
| **ansible\_ec2\_instance\_identity\_document\_instancetype**  string / elements=string  | success | The type of instance.   **Sample:** m4.large |
| **ansible\_ec2\_instance\_identity\_document\_kernelid**  string / elements=string  | success | The ID of the kernel launched with this instance, if applicable.   |
| **ansible\_ec2\_instance\_identity\_document\_pendingtime**  string / elements=string  | success | The instance pending time.   **Sample:** 2017-05-11T20:51:20Z |
| **ansible\_ec2\_instance\_identity\_document\_privateip**  string / elements=string  | success | The private IPv4 address of the instance.  In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0).   **Sample:** 10.0.0.1 |
| **ansible\_ec2\_instance\_identity\_document\_ramdiskid**  string / elements=string  | success | The ID of the RAM disk specified at launch time, if applicable.   |
| **ansible\_ec2\_instance\_identity\_document\_region**  string / elements=string  | success | The Region in which the instance launched.   **Sample:** us-east-1 |
| **ansible\_ec2\_instance\_identity\_document\_version**  string / elements=string  | success | Identity document version.   **Sample:** 2010-08-31 |
| **ansible\_ec2\_instance\_identity\_pkcs7**  string / elements=string  | success | Used to verify the document's authenticity and content against the signature.   |
| **ansible\_ec2\_instance\_identity\_rsa2048**  string / elements=string  | success | Used to verify the document's authenticity and content against the signature.   |
| **ansible\_ec2\_instance\_identity\_signature**  string / elements=string  | success | Data that can be used by other parties to verify its origin and authenticity.   |
| **ansible\_ec2\_instance\_life\_cycle**  string / elements=string  | success | The purchasing option of the instance.   **Sample:** on-demand |
| **ansible\_ec2\_instance\_type**  string / elements=string  | success | The type of the instance.   **Sample:** m4.large |
| **ansible\_ec2\_local\_hostname**  string / elements=string  | success | The private IPv4 DNS hostname of the instance.  In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0).   **Sample:** ip-10-0-0-1.ec2.internal |
| **ansible\_ec2\_local\_ipv4**  string / elements=string  | success | The private IPv4 address of the instance.  In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0).   **Sample:** 10.0.0.1 |
| **ansible\_ec2\_mac**  string / elements=string  | success | The instance's media access control (MAC) address.  In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0).   **Sample:** 00:11:22:33:44:55 |
| **ansible\_ec2\_metrics\_vhostmd**  string / elements=string  | success | Metrics; no longer available.   |
| **ansible\_ec2\_network\_interfaces\_macs\_\_device\_number**  string / elements=string  | success | The unique device number associated with that interface. The device number corresponds to the device name; for example, a device-number of 2 is for the eth2 device.  This category corresponds to the DeviceIndex and device-index fields that are used by the Amazon EC2 API and the EC2 commands for the AWS CLI.   **Sample:** 0 |
| **ansible\_ec2\_network\_interfaces\_macs\_\_interface\_id**  string / elements=string  | success | The elastic network interface ID.   **Sample:** eni-12345678 |
| **ansible\_ec2\_network\_interfaces\_macs\_\_ipv4\_associations\_**  string / elements=string  | success | The private IPv4 addresses that are associated with each public-ip address and assigned to that interface.   |
| **ansible\_ec2\_network\_interfaces\_macs\_\_ipv6s**  string / elements=string  | success | The IPv6 addresses associated with the interface. Returned only for instances launched into a VPC.   |
| **ansible\_ec2\_network\_interfaces\_macs\_\_local\_hostname**  string / elements=string  | success | The interface's local hostname.   |
| **ansible\_ec2\_network\_interfaces\_macs\_\_local\_ipv4s**  string / elements=string  | success | The private IPv4 addresses associated with the interface.   |
| **ansible\_ec2\_network\_interfaces\_macs\_\_mac**  string / elements=string  | success | The instance's MAC address.   **Sample:** 00:11:22:33:44:55 |
| **ansible\_ec2\_network\_interfaces\_macs\_\_owner\_id**  string / elements=string  | success | The ID of the owner of the network interface.  In multiple-interface environments, an interface can be attached by a third party, such as Elastic Load Balancing.  Traffic on an interface is always billed to the interface owner.   **Sample:** 01234567890 |
| **ansible\_ec2\_network\_interfaces\_macs\_\_public\_hostname**  string / elements=string  | success | The interface's public DNS (IPv4). If the instance is in a VPC, this category is only returned if the enableDnsHostnames attribute is set to true.   **Sample:** ec2-1-2-3-4.compute-1.amazonaws.com |
| **ansible\_ec2\_network\_interfaces\_macs\_\_public\_ipv4s**  string / elements=string  | success | The Elastic IP addresses associated with the interface. There may be multiple IPv4 addresses on an instance.   **Sample:** 1.2.3.4 |
| **ansible\_ec2\_network\_interfaces\_macs\_\_security\_group\_ids**  string / elements=string  | success | The IDs of the security groups to which the network interface belongs. Returned only for instances launched into a VPC.   **Sample:** sg-01234567,sg-01234568 |
| **ansible\_ec2\_network\_interfaces\_macs\_\_security\_groups**  string / elements=string  | success | Security groups to which the network interface belongs. Returned only for instances launched into a VPC.   **Sample:** secgroup1,secgroup2 |
| **ansible\_ec2\_network\_interfaces\_macs\_\_subnet\_id**  string / elements=string  | success | The ID of the subnet in which the interface resides. Returned only for instances launched into a VPC.   **Sample:** subnet-01234567 |
| **ansible\_ec2\_network\_interfaces\_macs\_\_subnet\_ipv4\_cidr\_block**  string / elements=string  | success | The IPv4 CIDR block of the subnet in which the interface resides. Returned only for instances launched into a VPC.   **Sample:** 10.0.1.0/24 |
| **ansible\_ec2\_network\_interfaces\_macs\_\_subnet\_ipv6\_cidr\_blocks**  string / elements=string  | success | The IPv6 CIDR block of the subnet in which the interface resides. Returned only for instances launched into a VPC.   |
| **ansible\_ec2\_network\_interfaces\_macs\_\_vpc\_id**  string / elements=string  | success | The ID of the VPC in which the interface resides. Returned only for instances launched into a VPC.   **Sample:** vpc-0123456 |
| **ansible\_ec2\_network\_interfaces\_macs\_\_vpc\_ipv4\_cidr\_block**  string / elements=string  | success | The IPv4 CIDR block of the VPC in which the interface resides. Returned only for instances launched into a VPC.   **Sample:** 10.0.0.0/16 |
| **ansible\_ec2\_network\_interfaces\_macs\_\_vpc\_ipv4\_cidr\_blocks**  string / elements=string  | success | The IPv4 CIDR block of the VPC in which the interface resides. Returned only for instances launched into a VPC.   **Sample:** 10.0.0.0/16 |
| **ansible\_ec2\_network\_interfaces\_macs\_\_vpc\_ipv6\_cidr\_blocks**  string / elements=string  | success | The IPv6 CIDR block of the VPC in which the interface resides. Returned only for instances launched into a VPC.   |
| **ansible\_ec2\_placement\_availability\_zone**  string / elements=string  | success | The Availability Zone in which the instance launched.   **Sample:** us-east-1a |
| **ansible\_ec2\_placement\_region**  string / elements=string  | success | The Region in which the instance launched.   **Sample:** us-east-1 |
| **ansible\_ec2\_product\_codes**  string / elements=string  | success | Product codes associated with the instance, if any.   **Sample:** aw0evgkw8e5c1q413zgy5pjce |
| **ansible\_ec2\_profile**  string / elements=string  | success | EC2 instance hardware profile.   **Sample:** default-hvm |
| **ansible\_ec2\_public\_hostname**  string / elements=string  | success | The instance's public DNS. If the instance is in a VPC, this category is only returned if the enableDnsHostnames attribute is set to true.   **Sample:** ec2-1-2-3-4.compute-1.amazonaws.com |
| **ansible\_ec2\_public\_ipv4**  string / elements=string  | success | The public IPv4 address. If an Elastic IP address is associated with the instance, the value returned is the Elastic IP address.   **Sample:** 1.2.3.4 |
| **ansible\_ec2\_public\_key**  string / elements=string  | success | Public key. Only available if supplied at instance launch time.   |
| **ansible\_ec2\_ramdisk\_id**  string / elements=string  | success | The ID of the RAM disk specified at launch time, if applicable.   |
| **ansible\_ec2\_reservation\_id**  string / elements=string  | success | The ID of the reservation.   **Sample:** r-0123456789abcdef0 |
| **ansible\_ec2\_security\_groups**  string / elements=string  | success | The names of the security groups applied to the instance. After launch, you can only change the security groups of instances running in a VPC.  Such changes are reflected here and in network/interfaces/macs/mac/security-groups.   **Sample:** securitygroup1,securitygroup2 |
| **ansible\_ec2\_services\_domain**  string / elements=string  | success | The domain for AWS resources for the region; for example, amazonaws.com for us-east-1.   **Sample:** amazonaws.com |
| **ansible\_ec2\_services\_partition**  string / elements=string  | success | The partition that the resource is in. For standard AWS regions, the partition is aws.  If you have resources in other partitions, the partition is aws-partitionname.  For example, the partition for resources in the China (Beijing) region is aws-cn.   **Sample:** aws |
| **ansible\_ec2\_spot\_termination\_time**  string / elements=string  | success | The approximate time, in UTC, that the operating system for your Spot instance will receive the shutdown signal.  This item is present and contains a time value only if the Spot instance has been marked for termination by Amazon EC2.  The termination-time item is not set to a time if you terminated the Spot instance yourself.   **Sample:** 2015-01-05T18:02:00Z |
| **ansible\_ec2\_user\_data**  string / elements=string  | success | The instance user data.   **Sample:** #!/bin/bash |

   
  
 ### Authors

 * Silviu Dicu (@silviud)
* Vinay Dandekar (@roadmapper)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_metadata_facts_module.html>

amazon.aws.ec2\_snapshot – Creates a snapshot from an existing volume
=====================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_snapshot`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Creates an EC2 snapshot from an existing EBS volume.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * python >= 2.6
* boto

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **description**  string  |  | Description to be applied to the snapshot. |
| **device\_name**  string  |  | Device name of a mounted volume to be snapshotted. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **instance\_id**  string  |  | Instance that has the required volume to snapshot mounted. |
| **last\_snapshot\_min\_age**  integer  | **Default:**0 | If the volume's most recent snapshot has started less than `last\_snapshot\_min\_age' minutes ago, a new snapshot will not be created. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **snapshot\_id**  string  |  | Snapshot id to remove. |
| **snapshot\_tags**  dictionary  |  | A dictionary of tags to add to the snapshot. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | Whether to add or create a snapshot. |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |
| **volume\_id**  string  |  | Volume from which to take the snapshot. |
| **wait**  boolean  | **Choices:*** no
* **yes** ←
 | Wait for the snapshot to be ready. |
| **wait\_timeout**  integer  | **Default:**0 | How long before wait gives up, in seconds. Specify 0 to wait forever. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Simple snapshot of volume using volume_id
- amazon.aws.ec2_snapshot:
    volume_id: vol-abcdef12
    description: snapshot of /data from DB123 taken 2013/11/28 12:18:32

# Snapshot of volume mounted on device_name attached to instance_id
- amazon.aws.ec2_snapshot:
    instance_id: i-12345678
    device_name: /dev/sdb1
    description: snapshot of /data from DB123 taken 2013/11/28 12:18:32

# Snapshot of volume with tagging
- amazon.aws.ec2_snapshot:
    instance_id: i-12345678
    device_name: /dev/sdb1
    snapshot_tags:
        frequency: hourly
        source: /data

# Remove a snapshot
- amazon.aws.ec2_snapshot:
    snapshot_id: snap-abcd1234
    state: absent

# Create a snapshot only if the most recent one is older than 1 hour
- amazon.aws.ec2_snapshot:
    volume_id: vol-abcdef12
    last_snapshot_min_age: 60

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **snapshot\_id**  string  | always | The ID of the snapshot. Each snapshot receives a unique identifier when it is created.  **Sample:** snap-01234567 |
| **tags**  dictionary  | always | Any tags assigned to the snapshot.  **Sample:** { 'Name': 'instance-name' } |
| **volume\_id**  string  | always | The ID of the volume that was used to create the snapshot.  **Sample:** vol-01234567 |
| **volume\_size**  integer  | always | The size of the volume, in GiB.  **Sample:** 8 |

   
  
 ### Authors

 * Will Thames (@willthames)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_snapshot_module.html>

amazon.aws.ec2\_snapshot\_info – Gather information about ec2 volume snapshots in AWS
=====================================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_snapshot_info`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gather information about ec2 volume snapshots in AWS.
* This module was called `ec2_snapshot_facts` before Ansible 2.9. The usage did not change.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **filters**  dictionary  | **Default:**{} | A dict of filters to apply. Each dict item consists of a filter key and a filter value. See <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSnapshots.html> for possible filters. Filter names and values are case sensitive. |
| **max\_results**  integer  |  | The maximum number of snapshot results returned in paginated output. When used only a single page along with a `next_token_id` response element will be returned. The remaining results of the initial request can be seen by sending another request with the returned `next_token_id` value. This value can be between 5 and 1000; if *next\_token\_id* is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. This parameter is mutually exclusive with *snapshot\_ids*. |
| **next\_token\_id**  string  |  | Contains the value returned from a previous paginated request where *max\_results* was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the *next\_token\_id* value. This parameter is mutually exclusive with *snapshot\_ids*
 |
| **owner\_ids**  list / elements=string  | **Default:**[] | If you specify one or more snapshot owners, only snapshots from the specified owners and for which you have access are returned. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **restorable\_by\_user\_ids**  list / elements=string  | **Default:**[] | If you specify a list of restorable users, only snapshots with create snapshot permissions for those users are returned. |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **snapshot\_ids**  list / elements=string  | **Default:**[] | If you specify one or more snapshot IDs, only snapshots that have the specified IDs are returned. |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * By default, the module will return all snapshots, including public ones. To limit results to snapshots owned by the account use the filter ‘owner-id’.
* If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

# Gather information about all snapshots, including public ones
- amazon.aws.ec2_snapshot_info:

# Gather information about all snapshots owned by the account 0123456789
- amazon.aws.ec2_snapshot_info:
    filters:
      owner-id: 0123456789

# Or alternatively...
- amazon.aws.ec2_snapshot_info:
    owner_ids:
      - 0123456789

# Gather information about a particular snapshot using ID
- amazon.aws.ec2_snapshot_info:
    filters:
      snapshot-id: snap-00112233

# Or alternatively...
- amazon.aws.ec2_snapshot_info:
    snapshot_ids:
      - snap-00112233

# Gather information about any snapshot with a tag key Name and value Example
- amazon.aws.ec2_snapshot_info:
    filters:
      "tag:Name": Example

# Gather information about any snapshot with an error status
- amazon.aws.ec2_snapshot_info:
    filters:
      status: error

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **next\_token\_id**  string  | when option `max_results` is set in input | Contains the value returned from a previous paginated request where `max_results` was used and the results exceeded the value of that parameter. This value is null when there are no more results to return.  |
| **snapshots**  list / elements=dictionary  | success | snapshots retrieved  |
|  | **data\_encryption\_key\_id**  string  | always | The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy.  **Sample:** arn:aws:kms:ap-southeast-2:012345678900:key/74c9742a-a1b2-45cb-b3fe-abcdef123456 |
|  | **description**  string  | always | The description for the snapshot.  **Sample:** My important backup |
|  | **encrypted**  boolean  | always | Indicates whether the snapshot is encrypted.  **Sample:** True |
|  | **kms\_key\_id**  string  | always | The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the parent volume.  **Sample:** 74c9742a-a1b2-45cb-b3fe-abcdef123456 |
|  | **owner\_alias**  string  | always | The AWS account alias (for example, amazon, self) or AWS account ID that owns the snapshot.  **Sample:** 033440102211 |
|  | **owner\_id**  string  | always | The AWS account ID of the EBS snapshot owner.  **Sample:** 099720109477 |
|  | **progress**  string  | always | The progress of the snapshot, as a percentage.  **Sample:** 100% |
|  | **snapshot\_id**  string  | always | The ID of the snapshot. Each snapshot receives a unique identifier when it is created.  **Sample:** snap-01234567 |
|  | **start\_time**  string  | always | The time stamp when the snapshot was initiated.  **Sample:** 2015-02-12T02:14:02+00:00 |
|  | **state**  string  | always | The snapshot state (completed, pending or error).  **Sample:** completed |
|  | **state\_message**  string  | always | Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper AWS Key Management Service (AWS KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred.  |
|  | **tags**  dictionary  | always | Any tags assigned to the snapshot.  **Sample:** { 'my\_tag\_key': 'my\_tag\_value' } |
|  | **volume\_id**  string  | always | The ID of the volume that was used to create the snapshot.  **Sample:** vol-01234567 |
|  | **volume\_size**  integer  | always | The size of the volume, in GiB.  **Sample:** 8 |

   
  
 ### Authors

 * Rob White (@wimnat)
* Aubin Bikouo (@abikouo)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_snapshot_info_module.html>

amazon.aws.ec2\_vol – Create and attach a volume, return volume id and device map
=================================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_vol`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Creates an EBS volume and optionally attaches it to an instance.
* If both *instance* and *name* are given and the instance has a device at the device name, then no volume is created and no attachment is made.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3>=1.16.33
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **delete\_on\_termination**  boolean  | **Choices:*** **no** ←
* yes
 | When set to `true`, the volume will be deleted upon instance termination. |
| **device\_name**  string  |  | Device id to override device mapping. Assumes /dev/sdf for Linux/UNIX and /dev/xvdf for Windows. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **encrypted**  boolean  | **Choices:*** **no** ←
* yes
 | Enable encryption at rest for this volume. |
| **id**  string  |  | Volume id if you wish to attach an existing volume (requires instance) or remove an existing volume |
| **instance**  string  |  | Instance ID if you wish to attach the volume. Since 1.9 you can set to None to detach. |
| **iops**  integer  |  | The provisioned IOPs you want to associate with this volume (integer). |
| **kms\_key\_id**  string  |  | Specify the id of the KMS key to use. |
| **modify\_volume**  boolean   added in 1.4.0 of amazon.aws  | **Choices:*** **no** ←
* yes
 | The volume won't be modify unless this key is `true`. |
| **name**  string  |  | Volume Name tag if you wish to attach an existing volume (requires instance) |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **purge\_tags**  boolean   added in 1.5.0 of amazon.aws  | **Choices:*** **no** ←
* yes
 | Whether to remove existing tags that aren't passed in the *tags* parameter |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **snapshot**  string  |  | Snapshot ID on which to base the volume. |
| **state**  string  | **Choices:*** absent
* **present** ←
* list
 | Whether to ensure the volume is present or absent. The use of *state=list* to interrogate the volume has been deprecated and will be removed after 2022-06-01. The 'list' functionality has been moved to a dedicated module [amazon.aws.ec2\_vol\_info](ec2_vol_info_module). |
| **tags**  dictionary  | **Default:**{} | tag:value pairs to add to the volume after creation. |
| **throughput**  integer   added in 1.4.0 of amazon.aws  |  | Volume throughput in MB/s. This parameter is only valid for gp3 volumes. Valid range is from 125 to 1000. |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |
| **volume\_size**  integer  |  | Size of volume (in GiB) to create. |
| **volume\_type**  string  | **Choices:*** **standard** ←
* gp2
* io1
* st1
* sc1
* gp3
* io2
 | Type of EBS volume; standard (magnetic), gp2 (SSD), gp3 (SSD), io1 (Provisioned IOPS), io2 (Provisioned IOPS), st1 (Throughput Optimized HDD), sc1 (Cold HDD). "Standard" is the old EBS default and continues to remain the Ansible default for backwards compatibility. |
| **zone**  string  |  | Zone in which to create the volume, if unset uses the zone the instance is in (if set). 
aliases: availability\_zone, aws\_zone, ec2\_zone |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Simple attachment action
- amazon.aws.ec2_vol:
    instance: XXXXXX
    volume_size: 5
    device_name: sdd
    region: us-west-2

# Example using custom iops params
- amazon.aws.ec2_vol:
    instance: XXXXXX
    volume_size: 5
    iops: 100
    device_name: sdd
    region: us-west-2

# Example using snapshot id
- amazon.aws.ec2_vol:
    instance: XXXXXX
    snapshot: "{{ snapshot }}"

# Playbook example combined with instance launch
- amazon.aws.ec2:
    keypair: "{{ keypair }}"
    image: "{{ image }}"
    wait: yes
    count: 3
  register: ec2
- amazon.aws.ec2_vol:
    instance: "{{ item.id }}"
    volume_size: 5
  loop: "{{ ec2.instances }}"
  register: ec2_vol

# Example: Launch an instance and then add a volume if not already attached
#   * Volume will be created with the given name if not already created.
#   * Nothing will happen if the volume is already attached.
#   * Requires Ansible 2.0

- amazon.aws.ec2:
    keypair: "{{ keypair }}"
    image: "{{ image }}"
    zone: YYYYYY
    id: my_instance
    wait: yes
    count: 1
  register: ec2

- amazon.aws.ec2_vol:
    instance: "{{ item.id }}"
    name: my_existing_volume_Name_tag
    device_name: /dev/xvdf
  loop: "{{ ec2.instances }}"
  register: ec2_vol

# Remove a volume
- amazon.aws.ec2_vol:
    id: vol-XXXXXXXX
    state: absent

# Detach a volume (since 1.9)
- amazon.aws.ec2_vol:
    id: vol-XXXXXXXX
    instance: None
    region: us-west-2

# List volumes for an instance
- amazon.aws.ec2_vol:
    instance: i-XXXXXX
    state: list
    region: us-west-2

# Create new volume using SSD storage
- amazon.aws.ec2_vol:
    instance: XXXXXX
    volume_size: 50
    volume_type: gp2
    device_name: /dev/xvdf

# Attach an existing volume to instance. The volume will be deleted upon instance termination.
- amazon.aws.ec2_vol:
    instance: XXXXXX
    id: XXXXXX
    device_name: /dev/sdf
    delete_on_termination: yes

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **device**  string  | when success | device name of attached volume  **Sample:** /def/sdf |
| **volume**  string  | when success | a dictionary containing detailed attributes of the volume  **Sample:** {'attachment\_set': {'attach\_time': '2015-10-23T00:22:29.000Z', 'deleteOnTermination': 'false', 'device': '/dev/sdf', 'instance\_id': 'i-8356263c', 'status': 'attached'}, 'create\_time': '2015-10-21T14:36:08.870Z', 'encrypted': False, 'id': 'vol-35b333d9', 'iops': None, 'size': 1, 'snapshot\_id': '', 'status': 'in-use', 'tags': {'env': 'dev'}, 'type': 'standard', 'zone': 'us-east-1b'} |
| **volume\_id**  string  | when success | the id of volume  **Sample:** vol-35b333d9 |
| **volume\_type**  string  | when success | the volume type  **Sample:** standard |

   
  
 ### Authors

 * Lester Wade (@lwade)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_vol_module.html>

amazon.aws.ec2\_vol\_info – Gather information about ec2 volumes in AWS
=======================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_vol_info`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gather information about ec2 volumes in AWS.
* This module was called `ec2_vol_facts` before Ansible 2.9. The usage did not change.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **filters**  dictionary  |  | A dict of filters to apply. Each dict item consists of a filter key and a filter value. See <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVolumes.html> for possible filters. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

# Gather information about all volumes
- amazon.aws.ec2_vol_info:

# Gather information about a particular volume using volume ID
- amazon.aws.ec2_vol_info:
    filters:
      volume-id: vol-00112233

# Gather information about any volume with a tag key Name and value Example
- amazon.aws.ec2_vol_info:
    filters:
      "tag:Name": Example

# Gather information about any volume that is attached
- amazon.aws.ec2_vol_info:
    filters:
      attachment.status: attached

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **volumes**  list / elements=dictionary  | always | Volumes that match the provided filters. Each element consists of a dict with all the information related to that volume.  |
|  | **attachment\_set**  dictionary  | success | Information about the volume attachments.  **Sample:** {'attach\_time': '2015-10-23T00:22:29.000Z', 'deleteOnTermination': 'false', 'device': '/dev/sdf', 'instance\_id': 'i-8356263c', 'status': 'attached'} |
|  | **create\_time**  string  | success | The time stamp when volume creation was initiated.  **Sample:** 2015-10-21T14:36:08.870Z |
|  | **encrypted**  boolean  | success | Indicates whether the volume is encrypted.  |
|  | **id**  string  | success | The ID of the volume.  **Sample:** vol-35b333d9 |
|  | **iops**  integer  | success | The number of I/O operations per second (IOPS) that the volume supports.  |
|  | **size**  integer  | success | The size of the volume, in GiBs.  **Sample:** 1 |
|  | **snapshot\_id**  string  | success | The snapshot from which the volume was created, if applicable.  |
|  | **status**  string  | success | The volume state.  **Sample:** in-use |
|  | **tags**  dictionary  | success | Any tags assigned to the volume.  **Sample:** {'env': 'dev'} |
|  | **type**  string  | success | The volume type. This can be gp2, io1, st1, sc1, or standard.  **Sample:** standard |
|  | **zone**  string  | success | The Availability Zone of the volume.  **Sample:** us-east-1b |

   
  
 ### Authors

 * Rob White (@wimnat)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_vol_info_module.html>

amazon.aws.ec2\_vpc\_dhcp\_option – Manages DHCP Options, and can ensure the DHCP options for the given VPC match what’s requested
==================================================================================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_vpc_dhcp_option`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * This module removes, or creates DHCP option sets, and can associate them to a VPC. Optionally, a new DHCP Options set can be created that converges a VPC’s existing DHCP option set with values provided. When dhcp\_options\_id is provided, the module will 1. remove (with state=’absent’) 2. ensure tags are applied (if state=’present’ and tags are provided 3. attach it to a VPC (if state=’present’ and a vpc\_id is provided. If any of the optional values are missing, they will either be treated as a no-op (i.e., inherit what already exists for the VPC) To remove existing options while inheriting, supply an empty value (e.g. set ntp\_servers to [] if you want to remove them from the VPC’s options) Most of the options should be self-explanatory.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **delete\_old**  boolean  | **Choices:*** no
* **yes** ←
 | Whether to delete the old VPC DHCP option set when associating a new one. This is primarily useful for debugging/development purposes when you want to quickly roll back to the old option set. Note that this setting will be ignored, and the old DHCP option set will be preserved, if it is in use by any other VPC. (Otherwise, AWS will return an error.) |
| **dhcp\_options\_id**  string  |  | The resource\_id of an existing DHCP options set. If this is specified, then it will override other settings, except tags (which will be updated to match) |
| **dns\_servers**  list / elements=string  |  | A list of hosts to set the DNS servers for the VPC to. (Should be a list of IP addresses rather than host names.) |
| **domain\_name**  string  |  | The domain name to set in the DHCP option sets |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **inherit\_existing**  boolean  | **Choices:*** **no** ←
* yes
 | For any DHCP options not specified in these parameters, whether to inherit them from the options set already applied to vpc\_id, or to reset them to be empty. |
| **netbios\_name\_servers**  list / elements=string  |  | List of hosts to advertise as NetBIOS servers. |
| **netbios\_node\_type**  integer  |  | NetBIOS node type to advertise in the DHCP options. The AWS recommendation is to use 2 (when using netbios name services) <https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html>
 |
| **ntp\_servers**  list / elements=string  |  | List of hosts to advertise as NTP servers for the VPC. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **state**  string  | **Choices:*** absent
* **present** ←
 | create/assign or remove the DHCP options. If state is set to absent, then a DHCP options set matched either by id, or tags and options will be removed if possible. |
| **tags**  dictionary  |  | Tags to be applied to a VPC options set if a new one is created, or if the resource\_id is provided. (options must match) 
aliases: resource\_tags |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |
| **vpc\_id**  string  |  | VPC ID to associate with the requested DHCP option set. If no vpc id is provided, and no matching option set is found then a new DHCP option set is created. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Completely overrides the VPC DHCP options associated with VPC vpc-123456 and deletes any existing
# DHCP option set that may have been attached to that VPC.
- amazon.aws.ec2_vpc_dhcp_option:
    domain_name: "foo.example.com"
    region: us-east-1
    dns_servers:
        - 10.0.0.1
        - 10.0.1.1
    ntp_servers:
        - 10.0.0.2
        - 10.0.1.2
    netbios_name_servers:
        - 10.0.0.1
        - 10.0.1.1
    netbios_node_type: 2
    vpc_id: vpc-123456
    delete_old: True
    inherit_existing: False


# Ensure the DHCP option set for the VPC has 10.0.0.4 and 10.0.1.4 as the specified DNS servers, but
# keep any other existing settings. Also, keep the old DHCP option set around.
- amazon.aws.ec2_vpc_dhcp_option:
    region: us-east-1
    dns_servers:
      - "{{groups['dns-primary']}}"
      - "{{groups['dns-secondary']}}"
    vpc_id: vpc-123456
    inherit_existing: True
    delete_old: False


## Create a DHCP option set with 4.4.4.4 and 8.8.8.8 as the specified DNS servers, with tags
## but do not assign to a VPC
- amazon.aws.ec2_vpc_dhcp_option:
    region: us-east-1
    dns_servers:
      - 4.4.4.4
      - 8.8.8.8
    tags:
      Name: google servers
      Environment: Test

## Delete a DHCP options set that matches the tags and options specified
- amazon.aws.ec2_vpc_dhcp_option:
    region: us-east-1
    dns_servers:
      - 4.4.4.4
      - 8.8.8.8
    tags:
      Name: google servers
      Environment: Test
    state: absent

## Associate a DHCP options set with a VPC by ID
- amazon.aws.ec2_vpc_dhcp_option:
    region: us-east-1
    dhcp_options_id: dopt-12345678
    vpc_id: vpc-123456

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **changed**  boolean  | always | Whether the dhcp options were changed  |
| **dhcp\_options\_id**  string  | when available | The aws resource id of the primary DCHP options set created, found or removed  |
| **new\_options**  dictionary  | when appropriate | The DHCP options created, associated or found  **Sample:** {'domain-name': 'my.example.com', 'domain-name-servers': ['10.0.0.1', '10.0.1.1'], 'netbios-node-type': 2, 'netbois-name-servers': ['10.0.0.1', '10.0.1.1']} |

   
  
 ### Authors

 * Joel Thompson (@joelthompson)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_vpc_dhcp_option_module.html>

amazon.aws.ec2\_tag – create and remove tags on ec2 resources
=============================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_tag`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Creates, modifies and removes tags for any EC2 resource.
* Resources are referenced by their resource id (for example, an instance being i-XXXXXXX, a VPC being vpc-XXXXXXX).
* This module is designed to be used with complex args (tags), see the examples.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* botocore
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **purge\_tags**  boolean  | **Choices:*** **no** ←
* yes
 | Whether unspecified tags should be removed from the resource. Note that when combined with *state=absent*, specified tags with non-matching values are not purged. |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **resource**  string / required  |  | The EC2 resource id. |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **state**  string  | **Choices:*** **present** ←
* absent
* list
 | Whether the tags should be present or absent on the resource. The use of *state=list* to interrogate the tags of an instance has been deprecated and will be removed after 2022-06-01. The 'list' functionality has been moved to a dedicated module [amazon.aws.ec2\_tag\_info](ec2_tag_info_module). |
| **tags**  dictionary  |  | A dictionary of tags to add or remove from the resource. If the value provided for a key is not set and *state=absent*, the tag will be removed regardless of its current value. Required when *state=present* or *state=absent*. |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
- name: Ensure tags are present on a resource
  amazon.aws.ec2_tag:
    region: eu-west-1
    resource: vol-XXXXXX
    state: present
    tags:
      Name: ubervol
      env: prod

- name: Ensure all volumes are tagged
  amazon.aws.ec2_tag:
    region:  eu-west-1
    resource: '{{ item.id }}'
    state: present
    tags:
      Name: dbserver
      Env: production
  loop: '{{ ec2_vol.volumes }}'

- name: Remove the Env tag
  amazon.aws.ec2_tag:
    region: eu-west-1
    resource: i-xxxxxxxxxxxxxxxxx
    tags:
      Env:
    state: absent

- name: Remove the Env tag if it's currently 'development'
  amazon.aws.ec2_tag:
    region: eu-west-1
    resource: i-xxxxxxxxxxxxxxxxx
    tags:
      Env: development
    state: absent

- name: Remove all tags except for Name from an instance
  amazon.aws.ec2_tag:
    region: eu-west-1
    resource: i-xxxxxxxxxxxxxxxxx
    tags:
        Name: ''
    state: absent
    purge_tags: true

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **added\_tags**  dictionary  | If tags were added | A dict of tags that were added to the resource  |
| **removed\_tags**  dictionary  | If tags were removed | A dict of tags that were removed from the resource  |
| **tags**  dictionary  | always | A dict containing the tags on the resource  |

   
  
 ### Authors

 * Lester Wade (@lwade)
* Paul Arthur (@flowerysong)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_tag_module.html>

amazon.aws.ec2\_tag\_info – list tags on ec2 resources
======================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_tag_info`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Lists tags for any EC2 resource.
* Resources are referenced by their resource id (e.g. an instance being i-XXXXXXX, a vpc being vpc-XXXXXX).
* Resource tags can be managed using the [amazon.aws.ec2\_tag](ec2_tag_module#ansible-collections-amazon-aws-ec2-tag-module) module.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* botocore
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **resource**  string / required  |  | The EC2 resource id (for example i-XXXXXX or vpc-XXXXXX). |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
- name: Retrieve all tags on an instance
  amazon.aws.ec2_tag_info:
    region: eu-west-1
    resource: i-xxxxxxxxxxxxxxxxx
  register: instance_tags

- name: Retrieve all tags on a VPC
  amazon.aws.ec2_tag_info:
    region: eu-west-1
    resource: vpc-xxxxxxxxxxxxxxxxx
  register: vpc_tags

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **tags**  dictionary  | always | A dict containing the tags on the resource  |

   
  
 ### Authors

 * Mark Chappell (@tremble)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_tag_info_module.html>

amazon.aws.ec2\_vpc\_dhcp\_option\_info – Gather information about dhcp options sets in AWS
===========================================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_vpc_dhcp_option_info`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gather information about dhcp options sets in AWS.
* This module was called `ec2_vpc_dhcp_option_facts` before Ansible 2.9. The usage did not change.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **dhcp\_options\_ids**  list / elements=string  |  | Get details of specific DHCP Option IDs. 
aliases: DhcpOptionIds |
| **dry\_run**  boolean  | **Choices:*** **no** ←
* yes
 | Checks whether you have the required permissions to view the DHCP Options. 
aliases: DryRun |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **filters**  dictionary  |  | A dict of filters to apply. Each dict item consists of a filter key and a filter value. See <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeDhcpOptions.html> for possible filters. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# # Note: These examples do not set authentication details, see the AWS Guide for details.

- name: Gather information about all DHCP Option sets for an account or profile
  amazon.aws.ec2_vpc_dhcp_option_info:
    region: ap-southeast-2
    profile: production
  register: dhcp_info

- name: Gather information about a filtered list of DHCP Option sets
  amazon.aws.ec2_vpc_dhcp_option_info:
    region: ap-southeast-2
    profile: production
    filters:
        "tag:Name": "abc-123"
  register: dhcp_info

- name: Gather information about a specific DHCP Option set by DhcpOptionId
  amazon.aws.ec2_vpc_dhcp_option_info:
    region: ap-southeast-2
    profile: production
    DhcpOptionsIds: dopt-123fece2
  register: dhcp_info

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **changed**  boolean  | always | True if listing the dhcp options succeeds  |
| **dhcp\_options**  list / elements=string  | always | The dhcp option sets for the account  |

   
  
 ### Authors

 * Nick Aslanidis (@naslanidis)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_vpc_dhcp_option_info_module.html>

amazon.aws.ec2\_vpc\_net – Configure AWS virtual private clouds
===============================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_vpc_net`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Create, modify, and terminate AWS virtual private clouds.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* botocore
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **cidr\_block**  list / elements=string / required  |  | The primary CIDR of the VPC. After 2.5 a list of CIDRs can be provided. The first in the list will be used as the primary CIDR and is used in conjunction with the `name` to ensure idempotence. |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **dhcp\_opts\_id**  string  |  | The id of the DHCP options to use for this VPC. |
| **dns\_hostnames**  boolean  | **Choices:*** no
* **yes** ←
 | Whether to enable AWS hostname support. |
| **dns\_support**  boolean  | **Choices:*** no
* **yes** ←
 | Whether to enable AWS DNS support. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **ipv6\_cidr**  boolean  | **Choices:*** **no** ←
* yes
 | Request an Amazon-provided IPv6 CIDR block with /56 prefix length. You cannot specify the range of IPv6 addresses, or the size of the CIDR block. |
| **multi\_ok**  boolean  | **Choices:*** **no** ←
* yes
 | By default the module will not create another VPC if there is another VPC with the same name and CIDR block. Specify this as true if you want duplicate VPCs created. |
| **name**  string / required  |  | The name to give your VPC. This is used in combination with `cidr_block` to determine if a VPC already exists. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **purge\_cidrs**  boolean  | **Choices:*** **no** ←
* yes
 | Remove CIDRs that are associated with the VPC and are not specified in `cidr_block`. |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **state**  string  | **Choices:*** **present** ←
* absent
 | The state of the VPC. Either absent or present. |
| **tags**  dictionary  |  | The tags you want attached to the VPC. This is independent of the name value, note if you pass a 'Name' key it would override the Name of the VPC if it's different. 
aliases: resource\_tags |
| **tenancy**  string  | **Choices:*** **default** ←
* dedicated
 | Whether to be default or dedicated tenancy. This cannot be changed after the VPC has been created. |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

- name: create a VPC with dedicated tenancy and a couple of tags
  amazon.aws.ec2_vpc_net:
    name: Module_dev2
    cidr_block: 10.10.0.0/16
    region: us-east-1
    tags:
      module: ec2_vpc_net
      this: works
    tenancy: dedicated

- name: create a VPC with dedicated tenancy and request an IPv6 CIDR
  amazon.aws.ec2_vpc_net:
    name: Module_dev2
    cidr_block: 10.10.0.0/16
    ipv6_cidr: True
    region: us-east-1
    tenancy: dedicated

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **vpc**  complex  | always | info about the VPC that was created or deleted  |
|  | **cidr\_block**  string  | always | The CIDR of the VPC  **Sample:** 10.0.0.0/16 |
|  | **cidr\_block\_association\_set**  list / elements=string  | success | IPv4 CIDR blocks associated with the VPC  **Sample:** {'cidr\_block\_association\_set': [{'association\_id': 'vpc-cidr-assoc-97aeeefd', 'cidr\_block': '10.0.0.0/24', 'cidr\_block\_state': {'state': 'associated'}}]} |
|  | **classic\_link\_enabled**  boolean  | always | indicates whether ClassicLink is enabled  |
|  | **dhcp\_options\_id**  string  | always | the id of the DHCP options associated with this VPC  **Sample:** dopt-12345678 |
|  | **id**  string  | always | VPC resource id  **Sample:** vpc-12345678 |
|  | **instance\_tenancy**  string  | always | indicates whether VPC uses default or dedicated tenancy  **Sample:** default |
|  | **ipv6\_cidr\_block\_association\_set**  list / elements=string  | success | IPv6 CIDR blocks associated with the VPC  **Sample:** {'ipv6\_cidr\_block\_association\_set': [{'association\_id': 'vpc-cidr-assoc-97aeeefd', 'ipv6\_cidr\_block': '2001:db8::/56', 'ipv6\_cidr\_block\_state': {'state': 'associated'}}]} |
|  | **is\_default**  boolean  | always | indicates whether this is the default VPC  |
|  | **owner\_id**  string  | always | The AWS account which owns the VPC.  **Sample:** 123456789012 |
|  | **state**  string  | always | state of the VPC  **Sample:** available |
|  | **tags**  complex  | always | tags attached to the VPC, includes name  |
|  |  | **Name**  string  | always | name tag for the VPC  **Sample:** pk\_vpc4 |

   
  
 ### Authors

 * Jonathan Davila (@defionscode)
* Sloane Hertel (@s-hertel)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_vpc_net_module.html>

amazon.aws.ec2\_vpc\_net\_info – Gather information about ec2 VPCs in AWS
=========================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_vpc_net_info`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gather information about ec2 VPCs in AWS
* This module was called `ec2_vpc_net_facts` before Ansible 2.9. The usage did not change.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* botocore
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **filters**  dictionary  |  | A dict of filters to apply. Each dict item consists of a filter key and a filter value. See <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcs.html> for possible filters. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |
| **vpc\_ids**  list / elements=string  |  | A list of VPC IDs that exist in your account. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

# Gather information about all VPCs
- amazon.aws.ec2_vpc_net_info:

# Gather information about a particular VPC using VPC ID
- amazon.aws.ec2_vpc_net_info:
    vpc_ids: vpc-00112233

# Gather information about any VPC with a tag key Name and value Example
- amazon.aws.ec2_vpc_net_info:
    filters:
      "tag:Name": Example

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **vpcs**  complex  | success | Returns an array of complex objects as described below.  |
|  | **cidr\_block**  string  | always | The IPv4 CIDR block assigned to the VPC.  |
|  | **cidr\_block\_association\_set**  complex  | always | An array of IPv4 cidr block association set information.  |
|  |  | **association\_id**  string  | always | The association ID  |
|  |  | **cidr\_block**  string  | always | The IPv4 CIDR block that is associated with the VPC.  |
|  |  | **cidr\_block\_state**  dictionary  | always | A hash/dict that contains a single item. The state of the cidr block association.  |
|  |  |  | **state**  string  | always | The CIDR block association state.  |
|  | **classic\_link\_dns\_supported**  boolean  | always | True/False depending on attribute setting for classic link DNS support.  |
|  | **classic\_link\_enabled**  boolean  | always | True/False depending on if classic link support is enabled.  |
|  | **dhcp\_options\_id**  string  | always | The ID of the DHCP options associated with this VPC.  **Sample:** dopt-12345678 |
|  | **enable\_dns\_hostnames**  boolean  | always | True/False depending on attribute setting for DNS hostnames support.  |
|  | **enable\_dns\_support**  boolean  | always | True/False depending on attribute setting for DNS support.  |
|  | **id**  string  | always | The ID of the VPC (for backwards compatibility).  |
|  | **instance\_tenancy**  string  | always | The instance tenancy setting for the VPC.  |
|  | **ipv6\_cidr\_block\_association\_set**  complex  | always | An array of IPv6 cidr block association set information.  |
|  |  | **association\_id**  string  | always | The association ID  |
|  |  | **ipv6\_cidr\_block**  string  | always | The IPv6 CIDR block that is associated with the VPC.  |
|  |  | **ipv6\_cidr\_block\_state**  dictionary  | always | A hash/dict that contains a single item. The state of the cidr block association.  |
|  |  |  | **state**  string  | always | The CIDR block association state.  |
|  | **is\_default**  boolean  | always | True if this is the default VPC for account.  |
|  | **owner\_id**  string  | always | The AWS account which owns the VPC.  **Sample:** 123456789012 |
|  | **state**  string  | always | The state of the VPC.  |
|  | **tags**  dictionary  | always | A dict of tags associated with the VPC.  |
|  | **vpc\_id**  string  | always | The ID of the VPC .  |

   
  
 ### Authors

 * Rob White (@wimnat)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_vpc_net_info_module.html>

amazon.aws.ec2\_vpc\_subnet – Manage subnets in AWS virtual private clouds
==========================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_vpc_subnet`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Manage subnets in AWS virtual private clouds.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **assign\_instances\_ipv6**  boolean  | **Choices:*** **no** ←
* yes
 | Specify `yes` to indicate that instances launched into the subnet should be automatically assigned an IPv6 address. |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **az**  string  |  | The availability zone for the subnet. |
| **cidr**  string / required  |  | The CIDR block for the subnet. E.g. 192.0.2.0/24. |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **ipv6\_cidr**  string  |  | The IPv6 CIDR block for the subnet. The VPC must have a /56 block assigned and this value must be a valid IPv6 /64 that falls in the VPC range. Required if *assign\_instances\_ipv6=true*
 |
| **map\_public**  boolean  | **Choices:*** **no** ←
* yes
 | Specify `yes` to indicate that instances launched into the subnet should be assigned public IP address by default. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **purge\_tags**  boolean  | **Choices:*** no
* **yes** ←
 | Whether or not to remove tags that do not appear in the *tags* list. |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **state**  string  | **Choices:*** **present** ←
* absent
 | Create or remove the subnet. |
| **tags**  dictionary  |  | A dict of tags to apply to the subnet. Any tags currently applied to the subnet and not present here will be removed. 
aliases: resource\_tags |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |
| **vpc\_id**  string / required  |  | VPC ID of the VPC in which to create or delete the subnet. |
| **wait**  boolean  | **Choices:*** no
* **yes** ←
 | When *wait=true* and *state=present*, module will wait for subnet to be in available state before continuing. |
| **wait\_timeout**  integer  | **Default:**300 | Number of seconds to wait for subnet to become available *wait=True*. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

- name: Create subnet for database servers
  amazon.aws.ec2_vpc_subnet:
    state: present
    vpc_id: vpc-123456
    cidr: 10.0.1.16/28
    tags:
      Name: Database Subnet
  register: database_subnet

- name: Remove subnet for database servers
  amazon.aws.ec2_vpc_subnet:
    state: absent
    vpc_id: vpc-123456
    cidr: 10.0.1.16/28

- name: Create subnet with IPv6 block assigned
  amazon.aws.ec2_vpc_subnet:
    state: present
    vpc_id: vpc-123456
    cidr: 10.1.100.0/24
    ipv6_cidr: 2001:db8:0:102::/64

- name: Remove IPv6 block assigned to subnet
  amazon.aws.ec2_vpc_subnet:
    state: present
    vpc_id: vpc-123456
    cidr: 10.1.100.0/24
    ipv6_cidr: ''

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **subnet**  complex  | *state=present* | Dictionary of subnet values  |
|  | **assign\_ipv6\_address\_on\_creation**  boolean  | *state=present* | whether IPv6 address is auto-assigned to new instances  |
|  | **availability\_zone**  string  | *state=present* | Availability zone of the Subnet  **Sample:** us-east-1a |
|  | **available\_ip\_address\_count**  string  | *state=present* | number of available IPv4 addresses  **Sample:** 251 |
|  | **cidr\_block**  string  | *state=present* | The IPv4 CIDR of the Subnet  **Sample:** 10.0.0.0/16 |
|  | **default\_for\_az**  boolean  | *state=present* | indicates whether this is the default Subnet for this Availability Zone  |
|  | **id**  string  | *state=present* | Subnet resource id  **Sample:** subnet-b883b2c4 |
|  | **ipv6\_association\_id**  string  | *state=present* | The IPv6 association ID for the currently associated CIDR  **Sample:** subnet-cidr-assoc-b85c74d2 |
|  | **ipv6\_cidr\_block**  string  | *state=present* | The IPv6 CIDR block actively associated with the Subnet  **Sample:** 2001:db8:0:102::/64 |
|  | **ipv6\_cidr\_block\_association\_set**  complex  | *state=present* | An array of IPv6 cidr block association set information.  |
|  |  | **association\_id**  string  | always | The association ID  |
|  |  | **ipv6\_cidr\_block**  string  | always | The IPv6 CIDR block that is associated with the subnet.  |
|  |  | **ipv6\_cidr\_block\_state**  dictionary  | always | A hash/dict that contains a single item. The state of the cidr block association.  |
|  |  |  | **state**  string  | always | The CIDR block association state.  |
|  | **map\_public\_ip\_on\_launch**  boolean  | *state=present* | whether public IP is auto-assigned to new instances  |
|  | **state**  string  | *state=present* | state of the Subnet  **Sample:** available |
|  | **tags**  dictionary  | *state=present* | tags attached to the Subnet, includes name  **Sample:** {'Name': 'My Subnet', 'env': 'staging'} |
|  | **vpc\_id**  string  | *state=present* | the id of the VPC where this Subnet exists  **Sample:** vpc-67236184 |

   
  
 ### Authors

 * Robert Estelle (@erydo)
* Brad Davidson (@brandond)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_vpc_subnet_module.html>

amazon.aws.ec2\_vpc\_subnet\_info – Gather information about ec2 VPC subnets in AWS
===================================================================================

  Note

 This plugin is part of the [amazon.aws collection](https://galaxy.ansible.com/amazon/aws) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install amazon.aws`.

 To use it in a playbook, specify: `amazon.aws.ec2_vpc_subnet_info`.

   New in version 1.0.0: of amazon.aws

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gather information about ec2 VPC subnets in AWS
* This module was called `ec2_vpc_subnet_facts` before Ansible 2.9. The usage did not change.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * boto
* boto3
* botocore
* python >= 2.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aws\_access\_key**  string  |  | AWS access key. If not set then the value of the AWS\_ACCESS\_KEY\_ID, AWS\_ACCESS\_KEY or EC2\_ACCESS\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_access\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_access\_key, access\_key |
| **aws\_ca\_bundle**  path  |  | The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. |
| **aws\_config**  dictionary  |  | A dictionary to modify the botocore configuration. Parameters can be found at <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>. Only the 'user\_agent' key is used for boto modules. See <http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto> for more boto configuration. |
| **aws\_secret\_key**  string  |  | AWS secret key. If not set then the value of the AWS\_SECRET\_ACCESS\_KEY, AWS\_SECRET\_KEY, or EC2\_SECRET\_KEY environment variable is used. If *profile* is set this parameter is ignored. Passing the *aws\_secret\_key* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: ec2\_secret\_key, secret\_key |
| **debug\_botocore\_endpoint\_logs**  boolean  | **Choices:*** **no** ←
* yes
 | Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource\_actions key in the task results. Use the aws\_resource\_action callback to output to total list made during a playbook. The ANSIBLE\_DEBUG\_BOTOCORE\_LOGS environment variable may also be used. |
| **ec2\_url**  string  |  | Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2\_URL environment variable, if any, is used. 
aliases: aws\_endpoint\_url, endpoint\_url |
| **filters**  dictionary  |  | A dict of filters to apply. Each dict item consists of a filter key and a filter value. See <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSubnets.html> for possible filters. |
| **profile**  string  |  | Uses a boto profile. Only works with boto >= 2.24.0. Using *profile* will override *aws\_access\_key*, *aws\_secret\_key* and *security\_token* and support for passing them at the same time as *profile* has been deprecated. 
*aws\_access\_key*, *aws\_secret\_key* and *security\_token* will be made mutually exclusive with *profile* after 2022-06-01. 
aliases: aws\_profile |
| **region**  string  |  | The AWS region to use. If not specified then the value of the AWS\_REGION or EC2\_REGION environment variable, if any, is used. See <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>
 
aliases: aws\_region, ec2\_region |
| **security\_token**  string  |  | AWS STS security token. If not set then the value of the AWS\_SECURITY\_TOKEN or EC2\_SECURITY\_TOKEN environment variable is used. If *profile* is set this parameter is ignored. Passing the *security\_token* and *profile* options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. 
aliases: aws\_security\_token, access\_token |
| **subnet\_ids**  list / elements=string  |  | A list of subnet IDs to gather information for. 
aliases: subnet\_id |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. |

   
 Notes
-----

  Note

 * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `AWS_URL` or `EC2_URL`, `AWS_PROFILE` or `AWS_DEFAULT_PROFILE`, `AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY` or `EC2_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_KEY` or `EC2_SECRET_KEY`, `AWS_SECURITY_TOKEN` or `EC2_SECURITY_TOKEN`, `AWS_REGION` or `EC2_REGION`, `AWS_CA_BUNDLE`
* Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See <https://boto.readthedocs.io/en/latest/boto_config_tut.html>
* `AWS_REGION` or `EC2_REGION` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

  Examples
--------

 
```
# Note: These examples do not set authentication details, see the AWS Guide for details.

# Gather information about all VPC subnets
- amazon.aws.ec2_vpc_subnet_info:

# Gather information about a particular VPC subnet using ID
- amazon.aws.ec2_vpc_subnet_info:
    subnet_ids: subnet-00112233

# Gather information about any VPC subnet with a tag key Name and value Example
- amazon.aws.ec2_vpc_subnet_info:
    filters:
      "tag:Name": Example

# Gather information about any VPC subnet within VPC with ID vpc-abcdef00
- amazon.aws.ec2_vpc_subnet_info:
    filters:
      vpc-id: vpc-abcdef00

# Gather information about a set of VPC subnets, publicA, publicB and publicC within a
# VPC with ID vpc-abcdef00 and then use the jinja map function to return the
# subnet_ids as a list.

- amazon.aws.ec2_vpc_subnet_info:
    filters:
      vpc-id: vpc-abcdef00
      "tag:Name": "{{ item }}"
  loop:
    - publicA
    - publicB
    - publicC
  register: subnet_info

- set_fact:
    subnet_ids: "{{ subnet_info.subnets|map(attribute='id')|list }}"

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **subnets**  complex  | success | Returns an array of complex objects as described below.  |
|  | **assign\_ipv6\_address\_on\_creation**  boolean  | always | True/False depending on attribute setting for IPv6 address assignment.  |
|  | **availability\_zone**  string  | always | The availability zone where the subnet exists.  |
|  | **available\_ip\_address\_count**  string  | always | Count of available IPs in subnet.  |
|  | **cidr\_block**  string  | always | The IPv4 CIDR block assigned to the subnet.  |
|  | **default\_for\_az**  boolean  | always | True if this is the default subnet for AZ.  |
|  | **id**  string  | always | The ID of the Subnet (for backwards compatibility).  |
|  | **ipv6\_cidr\_block\_association\_set**  complex  | always | An array of IPv6 cidr block association set information.  |
|  |  | **association\_id**  string  | always | The association ID  |
|  |  | **ipv6\_cidr\_block**  string  | always | The IPv6 CIDR block that is associated with the subnet.  |
|  |  | **ipv6\_cidr\_block\_state**  dictionary  | always | A hash/dict that contains a single item. The state of the cidr block association.  |
|  |  |  | **state**  string  | always | The CIDR block association state.  |
|  | **map\_public\_ip\_on\_launch**  boolean  | always | True/False depending on attribute setting for public IP mapping.  |
|  | **state**  string  | always | The state of the subnet.  |
|  | **subnet\_id**  string  | always | The ID of the Subnet.  |
|  | **tags**  dictionary  | always | A dict of tags associated with the Subnet.  |
|  | **vpc\_id**  string  | always | The ID of the VPC .  |

   
  
 ### Authors

 * Rob White (@wimnat)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_vpc_subnet_info_module.html>

ansible.netcommon.enable – Switch to elevated permissions on a network device
=============================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.enable`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)

 Synopsis
--------

 * This become plugins allows elevated permissions on a remote network device.

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **become\_pass**  string  |  |  ini entries:  [enable\_become\_plugin]password = None    env:ANSIBLE\_BECOME\_PASS   env:ANSIBLE\_ENABLE\_PASS   var: ansible\_become\_password   var: ansible\_become\_pass   var: ansible\_enable\_pass  | password |

   
 Notes
-----

  Note

 * enable is really implemented in the network connection handler and as such can only be used with network connections.
* This plugin ignores the ‘become\_exe’ and ‘become\_user’ settings as it uses an API and not an executable.

  ### Authors

 * Ansible Networking Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/enable_become.html>

ansible.netcommon.memory – RAM backed, non persistent cache.
============================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.memory`.

   New in version 2.0.0: of ansible.netcommon

  Synopsis
--------

 * RAM backed cache that is not persistent.
* Tailored for networking use case.

 ### Authors

 * Ansible Networking Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/memory_cache.html>

ansible.netcommon.httpapi – Use httpapi to run command on network appliances
============================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.httpapi`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Parameters](#parameters)

 Synopsis
--------

 * This connection plugin provides a connection to remote devices over a HTTP(S)-based api.

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **become**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [privilege\_escalation]become = no    env:ANSIBLE\_BECOME   var: ansible\_become  | The become option will instruct the CLI session to attempt privilege escalation on platforms that support it. Normally this means transitioning from user mode to `enable` mode in the CLI session. If become is set to True and the remote device does not support privilege escalation or the privilege has already been elevated, then this option is silently ignored. Can be configured from the CLI via the `--become` or `-b` options. |
| **become\_method**  string  | **Default:**"sudo" |  ini entries:  [privilege\_escalation]become\_method = sudo    env:ANSIBLE\_BECOME\_METHOD   var: ansible\_become\_method  | This option allows the become method to be specified in for handling privilege escalation. Typically the become\_method value is set to `enable` but could be defined as other values. |
| **host**  string  | **Default:**"inventory\_hostname" |  var: ansible\_host  | Specifies the remote device FQDN or IP address to establish the HTTP(S) connection to. |
| **import\_modules**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [ansible\_network]import\_modules = no    env:ANSIBLE\_NETWORK\_IMPORT\_MODULES   var: ansible\_network\_import\_modules  | Reduce CPU usage and network module execution time by enabling direct execution. Instead of the module being packaged and executed by the shell, it will be directly executed by the Ansible control node using the same python interpreter as the Ansible process. Note- Incompatible with `asynchronous mode`. Note- Python 3 and Ansible 2.9.16 or greater required. Note- With Ansible 2.9.x fully qualified modules names are required in tasks. |
| **network\_os**  string  |  |  var: ansible\_network\_os  | Configures the device platform network operating system. This value is used to load the correct httpapi plugin to communicate with the remote device |
| **password**  string  |  |  var: ansible\_password   var: ansible\_httpapi\_pass   var: ansible\_httpapi\_password  | Configures the user password used to authenticate to the remote device when needed for the device API. |
| **persistent\_command\_timeout**  integer  | **Default:**30 |  ini entries:  [persistent\_connection]command\_timeout = 30    env:ANSIBLE\_PERSISTENT\_COMMAND\_TIMEOUT   var: ansible\_command\_timeout  | Configures, in seconds, the amount of time to wait for a command to return from the remote device. If this timer is exceeded before the command returns, the connection plugin will raise an exception and close. |
| **persistent\_connect\_timeout**  integer  | **Default:**30 |  ini entries:  [persistent\_connection]connect\_timeout = 30    env:ANSIBLE\_PERSISTENT\_CONNECT\_TIMEOUT   var: ansible\_connect\_timeout  | Configures, in seconds, the amount of time to wait when trying to initially establish a persistent connection. If this value expires before the connection to the remote device is completed, the connection will fail. |
| **persistent\_log\_messages**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [persistent\_connection]log\_messages = no    env:ANSIBLE\_PERSISTENT\_LOG\_MESSAGES   var: ansible\_persistent\_log\_messages  | This flag will enable logging the command executed and response received from target device in the ansible log file. For this option to work 'log\_path' ansible configuration option is required to be set to a file path with write access. Be sure to fully understand the security implications of enabling this option as it could create a security vulnerability by logging sensitive information in log file. |
| **port**  integer  |  |  ini entries:  [defaults]remote\_port = None    env:ANSIBLE\_REMOTE\_PORT   var: ansible\_httpapi\_port  | Specifies the port on the remote device that listens for connections when establishing the HTTP(S) connection. When unspecified, will pick 80 or 443 based on the value of use\_ssl. |
| **remote\_user**  string  |  |  ini entries:  [defaults]remote\_user = None    env:ANSIBLE\_REMOTE\_USER   var: ansible\_user  | The username used to authenticate to the remote device when the API connection is first established. If the remote\_user is not specified, the connection will use the username of the logged in user. Can be configured from the CLI via the `--user` or `-u` options. |
| **session\_key**  dictionary  |  |  var: ansible\_httpapi\_session\_key  | Configures the session key to be used to authenticate to the remote device when needed for the device API. This should contain a dictionary representing the key name and value for the token. When specified, *password* is ignored. |
| **use\_proxy**  boolean  | **Choices:*** no
* **yes** ←
 |  var: ansible\_httpapi\_use\_proxy  | Whether to use https\_proxy for requests. |
| **use\_ssl**  boolean  | **Choices:*** **no** ←
* yes
 |  var: ansible\_httpapi\_use\_ssl  | Whether to connect using SSL (HTTPS) or not (HTTP). |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 |  var: ansible\_httpapi\_validate\_certs  | Whether to validate SSL certificates |

   
 ### Authors

 * Ansible Networking Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/httpapi_connection.html>

ansible.netcommon.persistent – Use a persistent unix socket for connection
==========================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.persistent`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Parameters](#parameters)

 Synopsis
--------

 * This is a helper plugin to allow making other connections persistent.

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **persistent\_command\_timeout**  integer  | **Default:**30 |  ini entries:  [persistent\_connection]command\_timeout = 30    env:ANSIBLE\_PERSISTENT\_COMMAND\_TIMEOUT   var: ansible\_command\_timeout  | Configures, in seconds, the amount of time to wait for a command to return from the remote device. If this timer is exceeded before the command returns, the connection plugin will raise an exception and close. |
| **persistent\_connect\_timeout**  integer  | **Default:**30 |  ini entries:  [persistent\_connection]connect\_timeout = 30    env:ANSIBLE\_PERSISTENT\_CONNECT\_TIMEOUT   var: ansible\_connect\_timeout  | Configures, in seconds, the amount of time to wait when trying to initially establish a persistent connection. If this value expires before the connection to the remote device is completed, the connection will fail. |
| **persistent\_log\_messages**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [persistent\_connection]log\_messages = no    env:ANSIBLE\_PERSISTENT\_LOG\_MESSAGES   var: ansible\_persistent\_log\_messages  | This flag will enable logging the command executed and response received from target device in the ansible log file. For this option to work 'log\_path' ansible configuration option is required to be set to a file path with write access. Be sure to fully understand the security implications of enabling this option as it could create a security vulnerability by logging sensitive information in log file. |

   
 ### Authors

 * Ansible Networking Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/persistent_connection.html>

ansible.netcommon.restconf – HttpApi Plugin for devices supporting Restconf API
===============================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.restconf`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Parameters](#parameters)

 Synopsis
--------

 * This HttpApi plugin provides methods to connect to Restconf API endpoints.

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **root\_path**  string  | **Default:**"/restconf" |  var: ansible\_httpapi\_restconf\_root  | Specifies the location of the Restconf root. |

   
 ### Authors

 * Ansible Networking Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/restconf_httpapi.html>

ansible.netcommon.net\_banner – (deprecated, removed after 2022-06-01) Manage multiline banners on network devices
==================================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_banner`.

   New in version 1.0.0: of ansible.netcommon

  * [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)

 DEPRECATED
----------

  Removed in 
major release after 2022-06-01

  Why 
Updated modules released with more functionality

  Alternative 
Use platform-specific “[netos]\_banner” module

   Synopsis
--------

 * This will configure both login and motd banners on network devices. It allows playbooks to add or remove banner text from the active running configuration.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **banner**  string / required  | **Choices:*** login
* motd
 | Specifies which banner that should be configured on the remote device. |
| **state**  string  | **Choices:*** **present** ←
* absent
 | Specifies whether or not the configuration is present in the current devices active running configuration. |
| **text**  string  |  | The banner text that should be present in the remote device running configuration. This argument accepts a multiline string, with no empty lines. Requires *state=present*. |

   
 Notes
-----

  Note

 * This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: configure the login banner
  ansible.netcommon.net_banner:
    banner: login
    text: |
      this is my login banner
      that contains a multiline
      string
    state: present

- name: remove the motd banner
  ansible.netcommon.net_banner:
    banner: motd
    state: absent

- name: Configure banner from file
  ansible.netcommon.net_banner:
    banner: motd
    text: "{{ lookup('file', './config_partial/raw_banner.cfg') }}"
    state: present

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device  **Sample:** ['banner login', 'this is my login banner', 'that contains a multiline', 'string'] |

   
  
 Status
------

 * This module will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).

 ### Authors

 * Ricardo Carrillo Cruz (@rcarrillocruz)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_banner_module.html>

ansible.netcommon.net\_get – Copy a file from a network device to Ansible Controller
====================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_get`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * This module provides functionality to copy file from network device to ansible controller.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Requirements
------------

 The below requirements are needed on the host that executes this module.

 * scp if using protocol=scp with paramiko

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dest**  string  | **Default:**["Same filename as specified in I(src). The path will be playbook root or role root directory if playbook is part of a role."] | Specifies the destination file. The path to the destination file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. |
| **protocol**  string  | **Choices:*** **scp** ←
* sftp
 | Protocol used to transfer file. |
| **src**  string / required  |  | Specifies the source file. The path to the source file can either be the full path on the network device or a relative path as per path supported by destination network device. |

   
 Notes
-----

  Note

 * Some devices need specific configurations to be enabled before scp can work These configuration should be pre-configured before using this module e.g ios - `ip scp server enable`.
* User privilege to do scp on network device should be pre-configured e.g. ios - need user privilege 15 by default for allowing scp.
* Default destination of source file.
* This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: copy file from the network device to Ansible controller
  ansible.netcommon.net_get:
    src: running_cfg_ios1.txt

- name: copy file from ios to common location at /tmp
  ansible.netcommon.net_get:
    src: running_cfg_sw1.txt
    dest: /tmp/ios1.txt

```
 ### Authors

 * Deepak Agrawal (@dagrawal)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_get_module.html>

ansible.netcommon.net\_l3\_interface – (deprecated, removed after 2022-06-01) Manage L3 interfaces on network devices
=====================================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_l3_interface`.

   New in version 1.0.0: of ansible.netcommon

  * [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)

 DEPRECATED
----------

  Removed in 
major release after 2022-06-01

  Why 
Updated modules released with more functionality

  Alternative 
Use platform-specific “[netos]\_l3\_interfaces” module

   Synopsis
--------

 * This module provides declarative management of L3 interfaces on network devices.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate**  string  |  | List of L3 interfaces definitions |
| **ipv4**  string  |  | IPv4 of the L3 interface. |
| **ipv6**  string  |  | IPv6 of the L3 interface. |
| **name**  string  |  | Name of the L3 interface. |
| **purge**  string  | **Default:**"no" | Purge L3 interfaces not defined in the *aggregate* parameter. |
| **state**  string  | **Choices:*** **present** ←
* absent
 | State of the L3 interface configuration. |

   
 Notes
-----

  Note

 * This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: Set eth0 IPv4 address
  ansible.netcommon.net_l3_interface:
    name: eth0
    ipv4: 192.168.0.1/24

- name: Remove eth0 IPv4 address
  ansible.netcommon.net_l3_interface:
    name: eth0
    state: absent

- name: Set IP addresses on aggregate
  ansible.netcommon.net_l3_interface:
    aggregate:
    - name: eth1
      ipv4: 192.168.2.10/24
    - name: eth2
      ipv4: 192.168.3.10/24
      ipv6: fd5d:12c9:2201:1::1/64

- name: Remove IP addresses on aggregate
  ansible.netcommon.net_l3_interface:
    aggregate:
    - name: eth1
      ipv4: 192.168.2.10/24
    - name: eth2
      ipv4: 192.168.3.10/24
      ipv6: fd5d:12c9:2201:1::1/64
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device  **Sample:** ["set interfaces ethernet eth0 address '192.168.0.1/24'"] |

   
  
 Status
------

 * This module will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).

 ### Authors

 * Ricardo Carrillo Cruz (@rcarrillocruz)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_l3_interface_module.html>

ansible.netcommon.libssh – (Tech preview) Run tasks using libssh for ssh connection
===================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.libssh`.

   New in version 2.10: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Parameters](#parameters)

 Synopsis
--------

 * Use the ansible-pylibssh python bindings to connect to targets
* The python bindings use libssh C library (<https://www.libssh.org/>) to connect to targets
* This plugin borrows a lot of settings from the ssh plugin as they both cover the same protocol.

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **host\_key\_auto\_add**  boolean  | **Choices:*** no
* yes
 |  ini entries:  [libssh\_connection]host\_key\_auto\_add = None    env:ANSIBLE\_LIBSSH\_HOST\_KEY\_AUTO\_ADD  | TODO: write it |
| **host\_key\_checking**  boolean  | **Choices:*** no
* **yes** ←
 |  ini entries:  [defaults]host\_key\_checking = yes   [libssh\_connection]host\_key\_checking = yes    env:ANSIBLE\_HOST\_KEY\_CHECKING   env:ANSIBLE\_SSH\_HOST\_KEY\_CHECKING   env:ANSIBLE\_LIBSSH\_HOST\_KEY\_CHECKING   var: ansible\_host\_key\_checking   var: ansible\_ssh\_host\_key\_checking   var: ansible\_libssh\_host\_key\_checking  | Set this to "False" if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host |
| **look\_for\_keys**  boolean  | **Choices:*** no
* **yes** ←
 |  ini entries:  [libssh\_connection]look\_for\_keys = yes    env:ANSIBLE\_LIBSSH\_LOOK\_FOR\_KEYS  | TODO: write it |
| **password**  string  |  |  var: ansible\_password   var: ansible\_ssh\_pass   var: ansible\_ssh\_password   var: ansible\_libssh\_pass   var: ansible\_libssh\_password  | Secret used to either login the ssh server or as a passphrase for ssh keys that require it Can be set from the CLI via the `--ask-pass` option. |
| **proxy\_command**  string  | **Default:**"" |  ini entries:  [libssh\_connection]proxy\_command =    env:ANSIBLE\_LIBSSH\_PROXY\_COMMAND   var: ansible\_paramiko\_proxy\_command   var: ansible\_libssh\_proxy\_command  | Proxy information for running the connection via a jumphost. Also this plugin will scan 'ssh\_args', 'ssh\_extra\_args' and 'ssh\_common\_args' from the 'ssh' plugin settings for proxy information if set. |
| **pty**  boolean  | **Choices:*** no
* **yes** ←
 |  ini entries:  [libssh\_connection]pty = yes    env:ANSIBLE\_LIBSSH\_PTY  | TODO: write it |
| **remote\_addr**  string  | **Default:**"inventory\_hostname" |  var: ansible\_host   var: ansible\_ssh\_host   var: ansible\_libssh\_host  | Address of the remote target |
| **remote\_user**  string  |  |  ini entries:  [defaults]remote\_user = None   [libssh\_connection]remote\_user = None    env:ANSIBLE\_REMOTE\_USER   env:ANSIBLE\_LIBSSH\_REMOTE\_USER   var: ansible\_user   var: ansible\_ssh\_user   var: ansible\_libssh\_user  | User to login/authenticate as Can be set from the CLI via the `--user` or `-u` options. |
| **use\_persistent\_connections**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [defaults]use\_persistent\_connections = no    env:ANSIBLE\_USE\_PERSISTENT\_CONNECTIONS  | Toggles the use of persistence for connections |

   
 ### Authors

 * Ansible Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/libssh_connection.html>

ansible.netcommon.cli\_config – Push text based configuration to network devices over network\_cli
==================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.cli_config`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * This module provides platform agnostic way of pushing text based configuration to network devices over network\_cli connection plugin.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **backup**  boolean  | **Choices:*** **no** ←
* yes
 | This argument will cause the module to create a full backup of the current running config from the remote device before any changes are made. If the `backup_options` value is not given, the backup file is written to the `backup` folder in the playbook root directory or role root directory, if playbook is part of an ansible role. If the directory does not exist, it is created. |
| **backup\_options**  dictionary  |  | This is a dict object containing configurable options related to backup file path. The value of this option is read only when `backup` is set to *yes*, if `backup` is set to *no* this option will be silently ignored. |
|  | **dir\_path**  path  |  | This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of `filename` or default filename as described in `filename` options description. If the path value is not given in that case a *backup* directory will be created in the current working directory and backup configuration will be copied in `filename` within *backup* directory. |
|  | **filename**  string  |  | The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by <hostname>\_config.<current-date>@<current-time> |
| **commit**  boolean  | **Choices:*** no
* yes
 | The `commit` argument instructs the module to push the configuration to the device. This is mapped to module check mode. |
| **commit\_comment**  string  |  | The `commit_comment` argument specifies a text string to be used when committing the configuration. If the `commit` argument is set to False, this argument is silently ignored. This argument is only valid for the platforms that support commit operation with comment. |
| **config**  string  |  | The config to be pushed to the network device. This argument is mutually exclusive with `rollback` and either one of the option should be given as input. To ensure idempotency and correct diff the configuration lines should be similar to how they appear if present in the running configuration on device including the indentation. |
| **defaults**  boolean  | **Choices:*** **no** ←
* yes
 | The *defaults* argument will influence how the running-config is collected from the device. When the value is set to true, the command used to collect the running-config is append with the all keyword. When the value is set to false, the command is issued without the all keyword. |
| **diff\_ignore\_lines**  list / elements=string  |  | Use this argument to specify one or more lines that should be ignored during the diff. This is used for lines in the configuration that are automatically updated by the system. This argument takes a list of regular expressions or exact line matches. Note that this parameter will be ignored if the platform has onbox diff support. |
| **diff\_match**  string  | **Choices:*** line
* strict
* exact
* none
 | Instructs the module on the way to perform the matching of the set of commands against the current device config. If `diff_match` is set to *line*, commands are matched line by line. If `diff_match` is set to *strict*, command lines are matched with respect to position. If `diff_match` is set to *exact*, command lines must be an equal match. Finally, if `diff_match` is set to *none*, the module will not attempt to compare the source configuration with the running configuration on the remote device. Note that this parameter will be ignored if the platform has onbox diff support. |
| **diff\_replace**  string  | **Choices:*** line
* block
* config
 | Instructs the module on the way to perform the configuration on the device. If the `diff_replace` argument is set to *line* then the modified lines are pushed to the device in configuration mode. If the argument is set to *block* then the entire command block is pushed to the device in configuration mode if any line is not correct. Note that this parameter will be ignored if the platform has onbox diff support. |
| **multiline\_delimiter**  string  |  | This argument is used when pushing a multiline configuration element to the device. It specifies the character to use as the delimiting character. This only applies to the configuration action. |
| **replace**  string  |  | If the `replace` argument is set to `yes`, it will replace the entire running-config of the device with the `config` argument value. For devices that support replacing running configuration from file on device like NXOS/JUNOS, the `replace` argument takes path to the file on the device that will be used for replacing the entire running-config. The value of `config` option should be *None* for such devices. Nexus 9K devices only support replace. Use *net\_put* or *nxos\_file\_copy* in case of NXOS module to copy the flat file to remote device and then use set the fullpath to this argument. |
| **rollback**  integer  |  | The `rollback` argument instructs the module to rollback the current configuration to the identifier specified in the argument. If the specified rollback identifier does not exist on the remote device, the module will fail. To rollback to the most recent commit, set the `rollback` argument to 0. This option is mutually exclusive with `config`. |

   
 Notes
-----

  Note

 * The commands will be returned only for platforms that do not support onbox diff. The `--diff` option with the playbook will return the difference in configuration for devices that has support for onbox diff
* To ensure idempotency and correct diff the configuration lines in the relevant module options should be similar to how they appear if present in the running configuration on device including the indentation.
* This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: configure device with config
  ansible.netcommon.cli_config:
    config: "{{ lookup('template', 'basic/config.j2') }}"

- name: multiline config
  ansible.netcommon.cli_config:
    config: |
      hostname foo
      feature nxapi

- name: configure device with config with defaults enabled
  ansible.netcommon.cli_config:
    config: "{{ lookup('template', 'basic/config.j2') }}"
    defaults: yes

- name: Use diff_match
  ansible.netcommon.cli_config:
    config: "{{ lookup('file', 'interface_config') }}"
    diff_match: none

- name: nxos replace config
  ansible.netcommon.cli_config:
    replace: bootflash:nxoscfg

- name: junos replace config
  ansible.netcommon.cli_config:
    replace: /var/home/ansible/junos01.cfg

- name: commit with comment
  ansible.netcommon.cli_config:
    config: set system host-name foo
    commit_comment: this is a test

- name: configurable backup path
  ansible.netcommon.cli_config:
    config: "{{ lookup('template', 'basic/config.j2') }}"
    backup: yes
    backup_options:
      filename: backup.cfg
      dir_path: /home/user

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **backup\_path**  string  | when backup is yes | The full path to the backup file  **Sample:** /playbooks/ansible/backup/hostname\_config.2016-07-16@22:28:34 |
| **commands**  list / elements=string  | When *supports\_generated\_diff=True* and *supports\_onbox\_diff=False* in the platform's cliconf plugin | The set of commands that will be pushed to the remote device  **Sample:** ['interface Loopback999', 'no shutdown'] |
| **diff**  string  | When *supports\_onbox\_diff=True* in the platform's cliconf plugin | The diff generated on the device when the commands were applied  **Sample:** --- system:/running-config +++ session:/ansible\_1599745461-session-config @@ -4,7 +4,7 @@ ! transceiver qsfp default-mode 4x10G ! -hostname veos +hostname veos3 ! spanning-tree mode mstp |

   
  
 ### Authors

 * Trishna Guha (@trishnaguha)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/cli_config_module.html>

ansible.netcommon.net\_interface – (deprecated, removed after 2022-06-01) Manage Interface on network devices
=============================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_interface`.

   New in version 1.0.0: of ansible.netcommon

  * [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)

 DEPRECATED
----------

  Removed in 
major release after 2022-06-01

  Why 
Updated modules released with more functionality

  Alternative 
Use platform-specific “[netos]\_interfaces” module

   Synopsis
--------

 * This module provides declarative management of Interfaces on network devices.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate**  string  |  | List of Interfaces definitions. |
| **delay**  string  | **Default:**10 | Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state argument which are *state* with values `up`/`down`, *tx\_rate* and *rx\_rate*. |
| **description**  string  |  | Description of Interface. |
| **duplex**  string  | **Choices:*** full
* half
* **auto** ←
 | Interface link status |
| **enabled**  string  |  | Configure interface link status. |
| **mtu**  string  |  | Maximum size of transmit packet. |
| **name**  string / required  |  | Name of the Interface. |
| **purge**  string  | **Default:**"no" | Purge Interfaces not defined in the aggregate parameter. This applies only for logical interface. |
| **rx\_rate**  string  |  | Receiver rate in bits per second (bps). This is state check parameter only. Supports conditionals, see [Conditionals in Networking Modules](../network/user_guide/network_working_with_command_output)
 |
| **speed**  string  |  | Interface link speed. |
| **state**  string  | **Choices:*** **present** ←
* absent
* up
* down
 | State of the Interface configuration, `up` indicates present and operationally up and `down` indicates present and operationally `down`
 |
| **tx\_rate**  string  |  | Transmit rate in bits per second (bps). This is state check parameter only. Supports conditionals, see [Conditionals in Networking Modules](../network/user_guide/network_working_with_command_output)
 |

   
 Notes
-----

  Note

 * This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: configure interface
  ansible.netcommon.net_interface:
    name: ge-0/0/1
    description: test-interface

- name: remove interface
  ansible.netcommon.net_interface:
    name: ge-0/0/1
    state: absent

- name: make interface up
  ansible.netcommon.net_interface:
    name: ge-0/0/1
    description: test-interface
    enabled: true

- name: make interface down
  ansible.netcommon.net_interface:
    name: ge-0/0/1
    description: test-interface
    enabled: false

- name: Create interface using aggregate
  ansible.netcommon.net_interface:
    aggregate:
    - {name: ge-0/0/1, description: test-interface-1}
    - {name: ge-0/0/2, description: test-interface-2}
    speed: 1g
    duplex: full
    mtu: 512

- name: Delete interface using aggregate
  ansible.netcommon.net_interface:
    aggregate:
    - {name: ge-0/0/1}
    - {name: ge-0/0/2}
    state: absent

- name: Check intent arguments
  ansible.netcommon.net_interface:
    name: fxp0
    state: up
    tx_rate: ge(0)
    rx_rate: le(0)

- name: Config + intent
  ansible.netcommon.net_interface:
    name: fxp0
    enabled: false
    state: down

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device.  **Sample:** ['interface 20', 'name test-interface'] |

   
  
 Status
------

 * This module will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).

 ### Authors

 * Ganesh Nalawade (@ganeshrn)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_interface_module.html>

ansible.netcommon.net\_l2\_interface – (deprecated, removed after 2022-06-01) Manage Layer-2 interface on network devices
=========================================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_l2_interface`.

   New in version 1.0.0: of ansible.netcommon

  * [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)

 DEPRECATED
----------

  Removed in 
major release after 2022-06-01

  Why 
Updated modules released with more functionality

  Alternative 
Use platform-specific “[netos]\_l2\_interfaces” module

   Synopsis
--------

 * This module provides declarative management of Layer-2 interface on network devices.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access\_vlan**  string  |  | Configure given VLAN in access port. |
| **aggregate**  string  |  | List of Layer-2 interface definitions. |
| **mode**  string  | **Choices:*** **access** ←
* trunk
 | Mode in which interface needs to be configured. |
| **name**  string  |  | Name of the interface excluding any logical unit number. |
| **native\_vlan**  string  |  | Native VLAN to be configured in trunk port. |
| **state**  string  | **Choices:*** **present** ←
* absent
 | State of the Layer-2 Interface configuration. |
| **trunk\_allowed\_vlans**  string  |  | List of allowed VLAN's in a given trunk port. |
| **trunk\_vlans**  string  |  | List of VLANs to be configured in trunk port. |

   
 Notes
-----

  Note

 * This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: configure Layer-2 interface
  ansible.netcommon.net_l2_interface:
    name: gigabitethernet0/0/1
    mode: access
    access_vlan: 30

- name: remove Layer-2 interface configuration
  ansible.netcommon.net_l2_interface:
    name: gigabitethernet0/0/1
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device  **Sample:** ['interface gigabitethernet0/0/1', 'switchport mode access', 'switchport access vlan 30'] |

   
  
 Status
------

 * This module will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).

 ### Authors

 * Ganesh Nalawade (@ganeshrn)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_l2_interface_module.html>

ansible.netcommon.napalm – Provides persistent connection using NAPALM
======================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.napalm`.

   New in version 1.0.0: of ansible.netcommon

  * [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Status](#status)

 DEPRECATED
----------

  Removed in 
major release after 2022-06-01

  Why 
I am pretty sure no one has ever tried to use these modules

  Alternative 
None. If anyone actually wants to use this plugin, open an issue and we’ll rescind the deprecation

   Synopsis
--------

 * This connection plugin provides connectivity to network devices using the NAPALM network device abstraction library. This library requires certain features to be enabled on network devices depending on the destination device operating system. The connection plugin requires `napalm` to be installed locally on the Ansible controller.

 Requirements
------------

 The below requirements are needed on the local controller node that executes this connection.

 * napalm

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **host**  string  | **Default:**"inventory\_hostname" |  var: ansible\_host  | Specifies the remote device FQDN or IP address to establish the SSH connection to. |
| **host\_key\_auto\_add**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [paramiko\_connection]host\_key\_auto\_add = no    env:ANSIBLE\_HOST\_KEY\_AUTO\_ADD  | By default, Ansible will prompt the user before adding SSH keys to the known hosts file. By enabling this option, unknown host keys will automatically be added to the known hosts file. Be sure to fully understand the security implications of enabling this option on production systems as it could create a security vulnerability. |
| **network\_os**  string  |  |  var: ansible\_network\_os  | Configures the device platform network operating system. This value is used to load a napalm device abstraction. |
| **password**  string  |  |  var: ansible\_password   var: ansible\_ssh\_pass   var: ansible\_ssh\_password  | Configures the user password used to authenticate to the remote device when first establishing the SSH connection. |
| **persistent\_command\_timeout**  integer  | **Default:**30 |  ini entries:  [persistent\_connection]command\_timeout = 30    env:ANSIBLE\_PERSISTENT\_COMMAND\_TIMEOUT   var: ansible\_command\_timeout  | Configures, in seconds, the amount of time to wait for a command to return from the remote device. If this timer is exceeded before the command returns, the connection plugin will raise an exception and close. |
| **persistent\_connect\_timeout**  integer  | **Default:**30 |  ini entries:  [persistent\_connection]connect\_timeout = 30    env:ANSIBLE\_PERSISTENT\_CONNECT\_TIMEOUT   var: ansible\_connect\_timeout  | Configures, in seconds, the amount of time to wait when trying to initially establish a persistent connection. If this value expires before the connection to the remote device is completed, the connection will fail. |
| **persistent\_log\_messages**  boolean  | **Choices:*** **no** ←
* yes
 |  ini entries:  [persistent\_connection]log\_messages = no    env:ANSIBLE\_PERSISTENT\_LOG\_MESSAGES   var: ansible\_persistent\_log\_messages  | This flag will enable logging the command executed and response received from target device in the ansible log file. For this option to work 'log\_path' ansible configuration option is required to be set to a file path with write access. Be sure to fully understand the security implications of enabling this option as it could create a security vulnerability by logging sensitive information in log file. |
| **port**  integer  | **Default:**22 |  ini entries:  [defaults]remote\_port = 22    env:ANSIBLE\_REMOTE\_PORT   var: ansible\_port  | Specifies the port on the remote device that listens for connections when establishing the SSH connection. |
| **private\_key\_file**  string  |  |  ini entries:  [defaults]private\_key\_file = None    env:ANSIBLE\_PRIVATE\_KEY\_FILE   var: ansible\_private\_key\_file  | The private SSH key or certificate file used to authenticate to the remote device when first establishing the SSH connection. |
| **remote\_user**  string  |  |  ini entries:  [defaults]remote\_user = None    env:ANSIBLE\_REMOTE\_USER   var: ansible\_user  | The username used to authenticate to the remote device when the SSH connection is first established. If the remote\_user is not specified, the connection will use the username of the logged in user. Can be configured from the CLI via the `--user` or `-u` options. |
| **timeout**  integer  | **Default:**120 |  | Sets the connection time, in seconds, for communicating with the remote device. This timeout is used as the default timeout value for commands when issuing a command to the network CLI. If the command does not return in timeout seconds, an error is generated. |

   
 Status
------

 * This connection will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).

 ### Authors

 * Ansible Networking Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/napalm_connection.html>

ansible.netcommon.net\_logging – (deprecated, removed after 2022-06-01) Manage logging on network devices
=========================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_logging`.

   New in version 1.0.0: of ansible.netcommon

  * [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)

 DEPRECATED
----------

  Removed in 
major release after 2022-06-01

  Why 
Updated modules released with more functionality

  Alternative 
Use platform-specific “[netos]\_logging” module

   Synopsis
--------

 * This module provides declarative management of logging on network devices.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate**  string  |  | List of logging definitions. |
| **dest**  string  | **Choices:*** console
* host
 | Destination of the logs. |
| **facility**  string  |  | Set logging facility. |
| **level**  string  |  | Set logging severity levels. |
| **name**  string  |  | If value of `dest` is *host* it indicates file-name the host name to be notified. |
| **purge**  string  | **Default:**"no" | Purge logging not defined in the *aggregate* parameter. |
| **state**  string  | **Choices:*** **present** ←
* absent
 | State of the logging configuration. |

   
 Notes
-----

  Note

 * This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: configure console logging
  ansible.netcommon.net_logging:
    dest: console
    facility: any
    level: critical

- name: remove console logging configuration
  ansible.netcommon.net_logging:
    dest: console
    state: absent

- name: configure host logging
  ansible.netcommon.net_logging:
    dest: host
    name: 192.0.2.1
    facility: kernel
    level: critical

- name: Configure file logging using aggregate
  ansible.netcommon.net_logging:
    dest: file
    aggregate:
    - name: test-1
      facility: pfe
      level: critical
    - name: test-2
      facility: kernel
      level: emergency
- name: Delete file logging using aggregate
  ansible.netcommon.net_logging:
    dest: file
    aggregate:
    - name: test-1
      facility: pfe
      level: critical
    - name: test-2
      facility: kernel
      level: emergency
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device  **Sample:** ['logging console critical'] |

   
  
 Status
------

 * This module will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).

 ### Authors

 * Ganesh Nalawade (@ganeshrn)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_logging_module.html>

ansible.netcommon.net\_put – Copy a file from Ansible Controller to a network device
====================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_put`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)

 Synopsis
--------

 * This module provides functionality to copy file from Ansible controller to network devices.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Requirements
------------

 The below requirements are needed on the host that executes this module.

 * scp if using protocol=scp with paramiko

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dest**  string  | **Default:**["Filename from src and at default directory of user shell on network\_os."] | Specifies the destination file. The path to destination file can either be the full path or relative path as supported by network\_os. |
| **mode**  string  | **Choices:*** **binary** ←
* text
 | Set the file transfer mode. If mode is set to *text* then *src* file will go through Jinja2 template engine to replace any vars if present in the src file. If mode is set to *binary* then file will be copied as it is to destination device. |
| **protocol**  string  | **Choices:*** **scp** ←
* sftp
 | Protocol used to transfer file. |
| **src**  string / required  |  | Specifies the source file. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. |

   
 Notes
-----

  Note

 * Some devices need specific configurations to be enabled before scp can work These configuration should be pre-configured before using this module e.g ios - `ip scp server enable`.
* User privilege to do scp on network device should be pre-configured e.g. ios - need user privilege 15 by default for allowing scp.
* Default destination of source file.
* This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: copy file from ansible controller to a network device
  ansible.netcommon.net_put:
    src: running_cfg_ios1.txt

- name: copy file at root dir of flash in slot 3 of sw1(ios)
  ansible.netcommon.net_put:
    src: running_cfg_sw1.txt
    protocol: sftp
    dest: flash3:/running_cfg_sw1.txt

```
 ### Authors

 * Deepak Agrawal (@dagrawal)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_put_module.html>

ansible.netcommon.net\_system – (deprecated, removed after 2022-06-01) Manage the system attributes on network devices
======================================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_system`.

   New in version 1.0.0: of ansible.netcommon

  * [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)

 DEPRECATED
----------

  Removed in 
major release after 2022-06-01

  Why 
Updated modules released with more functionality

  Alternative 
Use platform-specific “[netos]\_system” module

   Synopsis
--------

 * This module provides declarative management of node system attributes on network devices. It provides an option to configure host system parameters or remove those parameters from the device active configuration.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **domain\_name**  string  |  | Configure the IP domain name on the remote device to the provided value. Value should be in the dotted name form and will be appended to the `hostname` to create a fully-qualified domain name. |
| **domain\_search**  string  |  | Provides the list of domain suffixes to append to the hostname for the purpose of doing name resolution. This argument accepts a name or list of names and will be reconciled with the current active configuration on the running node. |
| **hostname**  string  |  | Configure the device hostname parameter. This option takes an ASCII string value. |
| **lookup\_source**  string  |  | Provides one or more source interfaces to use for performing DNS lookups. The interface provided in `lookup_source` must be a valid interface configured on the device. |
| **name\_servers**  string  |  | List of DNS name servers by IP address to use to perform name resolution lookups. This argument accepts either a list of DNS servers See examples. |
| **state**  string  | **Choices:*** **present** ←
* absent
 | State of the configuration values in the device's current active configuration. When set to *present*, the values should be configured in the device active configuration and when set to *absent* the values should not be in the device active configuration |

   
 Notes
-----

  Note

 * This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: configure hostname and domain name
  ansible.netcommon.net_system:
    hostname: ios01
    domain_name: test.example.com
    domain_search:
    - ansible.com
    - redhat.com
    - cisco.com

- name: domain search on single domain
  ansible.netcommon.net_system:
    domain_search: ansible.com

- name: remove configuration
  ansible.netcommon.net_system:
    state: absent

- name: configure DNS lookup sources
  ansible.netcommon.net_system:
    lookup_source: MgmtEth0/0/CPU0/0

- name: configure name servers
  ansible.netcommon.net_system:
    name_servers:
    - 8.8.8.8
    - 8.8.4.4

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device  **Sample:** ['hostname ios01', 'ip domain name test.example.com'] |

   
  
 Status
------

 * This module will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).

 ### Authors

 * Ricardo Carrillo Cruz (@rcarrillocruz)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_system_module.html>

ansible.netcommon.net\_user – (deprecated, removed after 2022-06-01) Manage the aggregate of local users on network device
==========================================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_user`.

   New in version 1.0.0: of ansible.netcommon

  * [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)

 DEPRECATED
----------

  Removed in 
major release after 2022-06-01

  Why 
Updated modules released with more functionality

  Alternative 
Use platform-specific “[netos]\_user” module

   Synopsis
--------

 * This module provides declarative management of the local usernames configured on network devices. It allows playbooks to manage either individual usernames or the aggregate of usernames in the current running config. It also supports purging usernames from the configuration that are not explicitly defined.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate**  string  |  | The set of username objects to be configured on the remote network device. The list entries can either be the username or a hash of username and properties. This argument is mutually exclusive with the `name` argument. |
| **configured\_password**  string  |  | The password to be configured on the remote network device. The password needs to be provided in clear and it will be encrypted on the device. Please note that this option is not same as `provider password`. |
| **name**  string  |  | The username to be configured on the remote network device. This argument accepts a string value and is mutually exclusive with the `aggregate` argument. Please note that this option is not same as `provider username`. |
| **nopassword**  boolean  | **Choices:*** no
* yes
 | Defines the username without assigning a password. This will allow the user to login to the system without being authenticated by a password. |
| **privilege**  string  |  | The `privilege` argument configures the privilege level of the user when logged into the system. This argument accepts integer values in the range of 1 to 15. |
| **purge**  boolean  | **Choices:*** **no** ←
* yes
 | Instructs the module to consider the resource definition absolute. It will remove any previously configured usernames on the device with the exception of the `admin` user (the current defined set of users). |
| **role**  string  |  | Configures the role for the username in the device running configuration. The argument accepts a string value defining the role name. This argument does not check if the role has been configured on the device. |
| **sshkey**  string  |  | Specifies the SSH public key to configure for the given username. This argument accepts a valid SSH key value. |
| **state**  string  | **Choices:*** **present** ←
* absent
 | Configures the state of the username definition as it relates to the device operational configuration. When set to *present*, the username(s) should be configured in the device active configuration and when set to *absent* the username(s) should not be in the device active configuration |
| **update\_password**  string  | **Choices:*** on\_create
* **always** ←
 | Since passwords are encrypted in the device running config, this argument will instruct the module when to change the password. When set to `always`, the password will always be updated in the device and when set to `on_create` the password will be updated only if the username is created. |

   
 Notes
-----

  Note

 * This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: create a new user
  ansible.netcommon.net_user:
    name: ansible
    sshkey: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
    state: present

- name: remove all users except admin
  ansible.netcommon.net_user:
    purge: yes

- name: set multiple users to privilege level 15
  ansible.netcommon.net_user:
    aggregate:
    - {name: netop}
    - {name: netend}
    privilege: 15
    state: present

- name: Change Password for User netop
  ansible.netcommon.net_user:
    name: netop
    configured_password: '{{ new_password }}'
    update_password: always
    state: present

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always | The list of configuration mode commands to send to the device  **Sample:** ['username ansible secret password', 'username admin secret admin'] |

   
  
 Status
------

 * This module will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).

 ### Authors

 * Trishna Guha (@trishnaguha)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_user_module.html>

ansible.netcommon.net\_vlan – (deprecated, removed after 2022-06-01) Manage VLANs on network devices
====================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_vlan`.

   New in version 1.0.0: of ansible.netcommon

  * [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)

 DEPRECATED
----------

  Removed in 
major release after 2022-06-01

  Why 
Updated modules released with more functionality

  Alternative 
Use platform-specific “[netos]\_vlans” module

   Synopsis
--------

 * This module provides declarative management of VLANs on network devices.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate**  string  |  | List of VLANs definitions. |
| **interfaces**  string  |  | List of interfaces the VLAN should be configured on. |
| **name**  string  |  | Name of the VLAN. |
| **purge**  string  | **Default:**"no" | Purge VLANs not defined in the *aggregate* parameter. |
| **state**  string  | **Choices:*** **present** ←
* absent
* active
* suspend
 | State of the VLAN configuration. |
| **vlan\_id**  string  |  | ID of the VLAN. |

   
 Notes
-----

  Note

 * This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: configure VLAN ID and name
  ansible.netcommon.net_vlan:
    vlan_id: 20
    name: test-vlan

- name: remove configuration
  ansible.netcommon.net_vlan:
    state: absent

- name: configure VLAN state
  ansible.netcommon.net_vlan:
    vlan_id:
    state: suspend

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device  **Sample:** ['vlan 20', 'name test-vlan'] |

   
  
 Status
------

 * This module will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).

 ### Authors

 * Ricardo Carrillo Cruz (@rcarrillocruz)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_vlan_module.html>

ansible.netcommon.net\_linkagg – (deprecated, removed after 2022-06-01) Manage link aggregation groups on network devices
=========================================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_linkagg`.

   New in version 1.0.0: of ansible.netcommon

  * [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)

 DEPRECATED
----------

  Removed in 
major release after 2022-06-01

  Why 
Updated modules released with more functionality

  Alternative 
Use platform-specific “[netos]\_lag\_interfaces” module

   Synopsis
--------

 * This module provides declarative management of link aggregation groups on network devices.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate**  string  |  | List of link aggregation definitions. |
| **members**  string / required  |  | List of members interfaces of the link aggregation group. The value can be single interface or list of interfaces. |
| **min\_links**  string  |  | Minimum members that should be up before bringing up the link aggregation group. |
| **mode**  string  | **Choices:*** True
* active
* passive

**Default:**"yes" | Mode of the link aggregation group. A value of `on` will enable LACP. `active` configures the link to actively information about the state of the link, or it can be configured in `passive` mode ie. send link state information only when received them from another link. |
| **name**  string / required  |  | Name of the link aggregation group. |
| **purge**  string  | **Default:**"no" | Purge link aggregation groups not defined in the *aggregate* parameter. |
| **state**  string  | **Choices:*** **present** ←
* absent
* up
* down
 | State of the link aggregation group. |

   
 Notes
-----

  Note

 * This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: configure link aggregation group
  ansible.netcommon.net_linkagg:
    name: bond0
    members:
    - eth0
    - eth1

- name: remove configuration
  ansible.netcommon.net_linkagg:
    name: bond0
    state: absent

- name: Create aggregate of linkagg definitions
  ansible.netcommon.net_linkagg:
    aggregate:
    - {name: bond0, members: [eth1]}
    - {name: bond1, members: [eth2]}

- name: Remove aggregate of linkagg definitions
  ansible.netcommon.net_linkagg:
    aggregate:
    - name: bond0
    - name: bond1
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device  **Sample:** ['set interfaces bonding bond0', "set interfaces ethernet eth0 bond-group 'bond0'", "set interfaces ethernet eth1 bond-group 'bond0'"] |

   
  
 Status
------

 * This module will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).

 ### Authors

 * Ricardo Carrillo Cruz (@rcarrillocruz)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_linkagg_module.html>

ansible.netcommon.net\_lldp – (deprecated, removed after 2022-06-01) Manage LLDP service configuration on network devices
=========================================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_lldp`.

   New in version 1.0.0: of ansible.netcommon

  * [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)

 DEPRECATED
----------

  Removed in 
major release after 2022-06-01

  Why 
Updated modules released with more functionality

  Alternative 
Use platform-specific “[netos]\_lldp\_global” module

   Synopsis
--------

 * This module provides declarative management of LLDP service configuration on network devices.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **state**  string  | **Choices:*** **present** ←
* absent
 | State of the LLDP service configuration. |

   
 Notes
-----

  Note

 * This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: Enable LLDP service
  ansible.netcommon.net_lldp:
    state: present

- name: Disable LLDP service
  ansible.netcommon.net_lldp:
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device  **Sample:** ['set service lldp'] |

   
  
 Status
------

 * This module will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).

 ### Authors

 * Ricardo Carrillo Cruz (@rcarrillocruz)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_lldp_module.html>

ansible.netcommon.net\_lldp\_interface – (deprecated, removed after 2022-06-01) Manage LLDP interfaces configuration on network devices
=======================================================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_lldp_interface`.

   New in version 1.0.0: of ansible.netcommon

  * [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)

 DEPRECATED
----------

  Removed in 
major release after 2022-06-01

  Why 
Updated modules released with more functionality

  Alternative 
Use platform-specific “[netos]\_lldp\_interfaces” module

   Synopsis
--------

 * This module provides declarative management of LLDP interfaces configuration on network devices.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate**  string  |  | List of interfaces LLDP should be configured on. |
| **name**  string  |  | Name of the interface LLDP should be configured on. |
| **purge**  string  | **Default:**"no" | Purge interfaces not defined in the aggregate parameter. |
| **state**  string  | **Choices:*** **present** ←
* absent
* enabled
* disabled
 | State of the LLDP configuration. |

   
 Notes
-----

  Note

 * This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: Configure LLDP on specific interfaces
  ansible.netcommon.net_lldp_interface:
    name: eth1
    state: present

- name: Disable LLDP on specific interfaces
  ansible.netcommon.net_lldp_interface:
    name: eth1
    state: disabled

- name: Enable LLDP on specific interfaces
  ansible.netcommon.net_lldp_interface:
    name: eth1
    state: enabled

- name: Delete LLDP on specific interfaces
  ansible.netcommon.net_lldp_interface:
    name: eth1
    state: absent

- name: Create aggregate of LLDP interface configurations
  ansible.netcommon.net_lldp_interface:
    aggregate:
    - {name: eth1}
    - {name: eth2}
    state: present

- name: Delete aggregate of LLDP interface configurations
  ansible.netcommon.net_lldp_interface:
    aggregate:
    - {name: eth1}
    - {name: eth2}
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device  **Sample:** ['set service lldp eth1 disable'] |

   
  
 Status
------

 * This module will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).

 ### Authors

 * Ganesh Nalawade (@ganeshrn)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_lldp_interface_module.html>

ansible.netcommon.netconf\_get – Fetch configuration/state data from NETCONF enabled network devices.
=====================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.netconf_get`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * NETCONF is a network management protocol developed and standardized by the IETF. It is documented in RFC 6241.
* This module allows the user to fetch configuration and state data from NETCONF enabled network devices.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * ncclient (>=v0.5.2)
* jxmlease (for display=json)
* xmltodict (for display=native)

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **display**  string  | **Choices:*** json
* pretty
* xml
* native
 | Encoding scheme to use when serializing output from the device. The option *json* will serialize the output as JSON data. If the option value is *json* it requires jxmlease to be installed on control node. The option *pretty* is similar to received XML response but is using human readable format (spaces, new lines). The option value *xml* is similar to received XML response but removes all XML namespaces. |
| **filter**  raw  |  | This argument specifies the string which acts as a filter to restrict the portions of the data to be are retrieved from the remote device. If this option is not specified entire configuration or state data is returned in result depending on the value of `source` option. The `filter` value can be either XML string or XPath or JSON string or native python dictionary, if the filter is in XPath format the NETCONF server running on remote host should support xpath capability else it will result in an error. If the filter is in JSON format the xmltodict library should be installed on the control node for JSON to XML conversion. |
| **lock**  string  | **Choices:*** **never** ←
* always
* if-supported
 | Instructs the module to explicitly lock the datastore specified as `source`. If no *source* is defined, the *running* datastore will be locked. By setting the option value *always* is will explicitly lock the datastore mentioned in `source` option. By setting the option value *never* it will not lock the `source` datastore. The value *if-supported* allows better interworking with NETCONF servers, which do not support the (un)lock operation for all supported datastores. |
| **source**  string  | **Choices:*** running
* candidate
* startup
 | This argument specifies the datastore from which configuration data should be fetched. Valid values are *running*, *candidate* and *startup*. If the `source` value is not set both configuration and state information are returned in response from running datastore. |

   
 Notes
-----

  Note

 * This module requires the NETCONF system service be enabled on the remote device being managed.
* This module supports the use of connection=netconf
* This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: Get running configuration and state data
  ansible.netcommon.netconf_get:

- name: Get configuration and state data from startup datastore
  ansible.netcommon.netconf_get:
    source: startup

- name: Get system configuration data from running datastore state (junos)
  ansible.netcommon.netconf_get:
    source: running
    filter: <configuration><system></system></configuration>

- name: Get configuration and state data in JSON format
  ansible.netcommon.netconf_get:
    display: json

- name: get schema list using subtree w/ namespaces
  ansible.netcommon.netconf_get:
    display: json
    filter: <netconf-state xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"><schemas><schema/></schemas></netconf-state>
    lock: never

- name: get schema list using xpath
  ansible.netcommon.netconf_get:
    display: xml
    filter: /netconf-state/schemas/schema

- name: get interface configuration with filter (iosxr)
  ansible.netcommon.netconf_get:
    display: pretty
    filter: <interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"></interface-configurations>
    lock: if-supported

- name: Get system configuration data from running datastore state (junos)
  ansible.netcommon.netconf_get:
    source: running
    filter: <configuration><system></system></configuration>
    lock: if-supported

- name: Get complete configuration data from running datastore (SROS)
  ansible.netcommon.netconf_get:
    source: running
    filter: <configure xmlns="urn:nokia.com:sros:ns:yang:sr:conf"/>

- name: Get complete state data (SROS)
  ansible.netcommon.netconf_get:
    filter: <state xmlns="urn:nokia.com:sros:ns:yang:sr:state"/>

- name: "get configuration with json filter string and native output (using xmltodict)"
  netconf_get:
    filter: |
              {
                  "interface-configurations": {
                      "@xmlns": "http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg",
                      "interface-configuration": null
                  }
              }
    display: native

- name: Define the Cisco IOSXR interface filter
  set_fact:
    filter:
      interface-configurations:
        "@xmlns": "http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"
        interface-configuration: null

- name: "get configuration with native filter type using set_facts"
  ansible.netcommon.netconf_get:
    filter: "{{ filter }}"
    display: native
  register: result

- name: "get configuration with direct native filter type"
  ansible.netcommon.netconf_get:
    filter: {
            "interface-configurations": {
            "@xmlns": "http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg",
            "interface-configuration": null
      }
    }
    display: native
  register: result


# Make a round-trip interface description change, diff the before and after
# this demonstrates the use of the native display format and several utilities
# from the ansible.utils collection

- name: Define the openconfig interface filter
  set_fact:
    filter:
      interfaces:
        "@xmlns": "http://openconfig.net/yang/interfaces"
        interface:
          name: Ethernet2

- name: Get the pre-change config using the filter
  ansible.netcommon.netconf_get:
    source: running
    filter: "{{ filter }}"
    display: native
  register: pre

- name: Update the description
  ansible.utils.update_fact:
    updates:
    - path: pre.output.data.interfaces.interface.config.description
      value: "Configured by ansible {{ 100 | random }}"
  register: updated

- name: Apply the new configuration
  ansible.netcommon.netconf_config:
    content:
      config:
        interfaces: "{{ updated.pre.output.data.interfaces }}"

- name: Get the post-change config using the filter
  ansible.netcommon.netconf_get:
    source: running
    filter: "{{ filter }}"
    display: native
  register: post

- name: Show the differences between the pre and post configurations
  ansible.utils.fact_diff:
    before: "{{ pre.output.data|ansible.utils.to_paths }}"
    after: "{{ post.output.data|ansible.utils.to_paths }}"

# TASK [Show the differences between the pre and post configurations] ********
# --- before
# +++ after
# @@ -1,11 +1,11 @@
#  {
# -    "@time-modified": "2020-10-23T12:27:17.462332477Z",
# +    "@time-modified": "2020-10-23T12:27:21.744541708Z",
#      "@xmlns": "urn:ietf:params:xml:ns:netconf:base:1.0",
#      "interfaces.interface.aggregation.config['fallback-timeout']['#text']": "90",
#      "interfaces.interface.aggregation.config['fallback-timeout']['@xmlns']": "http://arista.com/yang/openconfig/interfaces/augments",
#      "interfaces.interface.aggregation.config['min-links']": "0",
#      "interfaces.interface.aggregation['@xmlns']": "http://openconfig.net/yang/interfaces/aggregate",
# -    "interfaces.interface.config.description": "Configured by ansible 56",
# +    "interfaces.interface.config.description": "Configured by ansible 67",
#      "interfaces.interface.config.enabled": "true",
#      "interfaces.interface.config.mtu": "0",
#      "interfaces.interface.config.name": "Ethernet2",

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **output**  complex  | If the display format is selected as *json* it is returned as dict type and the conversion is done using jxmlease python library. If the display format is selected as *native* it is returned as dict type and the conversion is done using xmltodict python library. If the display format is xml or pretty it is returned as a string apart from low-level errors (such as action plugin). | Based on the value of display option will return either the set of transformed XML to JSON format from the RPC response with type dict or pretty XML string response (human-readable) or response with namespace removed from XML string.  |
|  | **formatted\_output**  string  | success | Contains formatted response received from remote host as per the value in display format.  |
| **stdout**  string  | always apart from low-level errors (such as action plugin) | The raw XML string containing configuration or state data received from the underlying ncclient library.  **Sample:** ... |
| **stdout\_lines**  list / elements=string  | always apart from low-level errors (such as action plugin) | The value of stdout split into a list  **Sample:** ['...', '...'] |

   
  
 ### Authors

 * Ganesh Nalawade (@ganeshrn)
* Sven Wisotzky (@wisotzky)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/netconf_get_module.html>

ansible.netcommon.net\_ping – Tests reachability using ping from a network device
=================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_ping`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Tests reachability using ping from network device to a remote destination.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **count**  string  | **Default:**5 | Number of packets to send. |
| **dest**  string / required  |  | The IP Address or hostname (resolvable by switch) of the remote node. |
| **source**  string  |  | The source IP Address. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | Determines if the expected result is success or fail. |
| **vrf**  string  | **Default:**"default" | The VRF to use for forwarding. |

   
 Notes
-----

  Note

 * For targets running Python, use the [ansible.builtin.shell](../builtin/shell_module#ansible-collections-ansible-builtin-shell-module) module along with ping command instead.
* This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: Test reachability to 10.10.10.10 using default vrf
  ansible.netcommon.net_ping:
    dest: 10.10.10.10

- name: Test reachability to 10.20.20.20 using prod vrf
  ansible.netcommon.net_ping:
    dest: 10.20.20.20
    vrf: prod

- name: Test unreachability to 10.30.30.30 using default vrf
  ansible.netcommon.net_ping:
    dest: 10.30.30.30
    state: absent

- name: Test reachability to 10.40.40.40 using prod vrf and setting count and source
  ansible.netcommon.net_ping:
    dest: 10.40.40.40
    source: loopback0
    vrf: prod
    count: 20

- Note:
    - For targets running Python, use the M(ansible.builtin.shell) module along with ping command instead.
    - Example:
        name: ping
        shell: ping -c 1 <remote-ip>

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always | Show the command sent.  **Sample:** ['ping vrf prod 10.40.40.40 count 20 source loopback0'] |
| **packet\_loss**  string  | always | Percentage of packets lost.  **Sample:** 0% |
| **packets\_rx**  integer  | always | Packets successfully received.  **Sample:** 20 |
| **packets\_tx**  integer  | always | Packets successfully transmitted.  **Sample:** 20 |
| **rtt**  dictionary  | always | Show RTT stats.  **Sample:** {'avg': 2, 'max': 8, 'min': 1} |

   
  
 ### Authors

 * Jacob McGill (@jmcgill298)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_ping_module.html>

ansible.netcommon.net\_static\_route – (deprecated, removed after 2022-06-01) Manage static IP routes on network appliances (routers, switches et. al.)
=======================================================================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_static_route`.

   New in version 1.0.0: of ansible.netcommon

  * [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)

 DEPRECATED
----------

  Removed in 
major release after 2022-06-01

  Why 
Updated modules released with more functionality

  Alternative 
Use platform-specific “[netos]\_static\_route” module

   Synopsis
--------

 * This module provides declarative management of static IP routes on network appliances (routers, switches et. al.).

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **admin\_distance**  string  |  | Admin distance of the static route. |
| **aggregate**  string  |  | List of static route definitions |
| **mask**  string / required  |  | Network prefix mask of the static route. |
| **next\_hop**  string / required  |  | Next hop IP of the static route. |
| **prefix**  string / required  |  | Network prefix of the static route. |
| **purge**  string  | **Default:**"no" | Purge static routes not defined in the *aggregate* parameter. |
| **state**  string  | **Choices:*** **present** ←
* absent
 | State of the static route configuration. |

   
 Notes
-----

  Note

 * This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: configure static route
  ansible.netcommon.net_static_route:
    prefix: 192.168.2.0
    mask: 255.255.255.0
    next_hop: 10.0.0.1

- name: remove configuration
  ansible.netcommon.net_static_route:
    prefix: 192.168.2.0
    mask: 255.255.255.0
    next_hop: 10.0.0.1
    state: absent

- name: configure aggregates of static routes
  ansible.netcommon.net_static_route:
    aggregate:
    - {prefix: 192.168.2.0, mask: 255.255.255.0, next_hop: 10.0.0.1}
    - {prefix: 192.168.3.0, mask: 255.255.255.0, next_hop: 10.0.2.1}

- name: Remove static route collections
  ansible.netcommon.net_static_route:
    aggregate:
    - {prefix: 172.24.1.0/24, next_hop: 192.168.42.64}
    - {prefix: 172.24.3.0/24, next_hop: 192.168.42.64}
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always | The list of configuration mode commands to send to the device  **Sample:** ['ip route 192.168.2.0/24 10.0.0.1'] |

   
  
 Status
------

 * This module will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).

 ### Authors

 * Ricardo Carrillo Cruz (@rcarrillocruz)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_static_route_module.html>

ansible.netcommon.net\_vrf – (deprecated, removed after 2022-06-01) Manage VRFs on network devices
==================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.net_vrf`.

   New in version 1.0.0: of ansible.netcommon

  * [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)

 DEPRECATED
----------

  Removed in 
major release after 2022-06-01

  Why 
Updated modules released with more functionality

  Alternative 
Use platform-specific “[netos]\_vrf” module

   Synopsis
--------

 * This module provides declarative management of VRFs on network devices.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate**  string  |  | List of VRFs definitions |
| **interfaces**  string  |  | List of interfaces the VRF should be configured on. |
| **name**  string  |  | Name of the VRF. |
| **purge**  string  | **Default:**"no" | Purge VRFs not defined in the *aggregate* parameter. |
| **state**  string  | **Choices:*** **present** ←
* absent
 | State of the VRF configuration. |

   
 Notes
-----

  Note

 * This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: Create VRF named MANAGEMENT
  ansible.netcommon.net_vrf:
    name: MANAGEMENT

- name: remove VRF named MANAGEMENT
  ansible.netcommon.net_vrf:
    name: MANAGEMENT
    state: absent

- name: Create aggregate of VRFs with purge
  ansible.netcommon.net_vrf:
    aggregate:
    - name: test4
      rd: 1:204
    - name: test5
      rd: 1:205
    state: present
    purge: yes

- name: Delete aggregate of VRFs
  ansible.netcommon.net_vrf:
    aggregate:
    - name: test2
    - name: test3
    - name: test4
    - name: test5
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **commands**  list / elements=string  | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device  **Sample:** ['vrf definition MANAGEMENT'] |

   
  
 Status
------

 * This module will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).

 ### Authors

 * Ricardo Carrillo Cruz (@rcarrillocruz)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_vrf_module.html>

ansible.netcommon.telnet – Executes a low-down and dirty telnet command
=======================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.telnet`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Executes a low-down and dirty telnet command, not going through the module subsystem.
* This is mostly to be used for enabling ssh on devices that only have telnet enabled by default.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **command**  list / elements=string / required  |  | List of commands to be executed in the telnet session. 
aliases: commands |
| **host**  string  | **Default:**"remote\_addr" | The host/target on which to execute the command |
| **login\_prompt**  string  | **Default:**"login: " | Login or username prompt to expect |
| **password**  string  |  | The password for login |
| **password\_prompt**  string  | **Default:**"Password: " | Login or username prompt to expect |
| **pause**  integer  | **Default:**1 | Seconds to pause between each command issued |
| **port**  integer  | **Default:**23 | Remote port to use |
| **prompts**  list / elements=string  | **Default:**["$"] | List of prompts expected before sending next command |
| **send\_newline**  boolean  | **Choices:*** **no** ←
* yes
 | Sends a newline character upon successful connection to start the terminal session. |
| **timeout**  integer  | **Default:**120 | timeout for remote operations |
| **user**  string  | **Default:**"remote\_user" | The user for login |

   
 Notes
-----

  Note

 * The `environment` keyword does not work with this task

  Examples
--------

 
```
- name: send configuration commands to IOS
  ansible.netcommon.telnet:
    user: cisco
    password: cisco
    login_prompt: 'Username: '
    prompts:
    - '[>#]'
    command:
    - terminal length 0
    - configure terminal
    - hostname ios01

- name: run show commands
  ansible.netcommon.telnet:
    user: cisco
    password: cisco
    login_prompt: 'Username: '
    prompts:
    - '[>#]'
    command:
    - terminal length 0
    - show version

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **output**  list / elements=string  | always | output of each command is an element in this list  **Sample:** ['success', 'success', '', 'warning .. something'] |

   
  
 ### Authors

 * Ansible Core Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/telnet_module.html>

splunk.es.data\_input\_network – Manage Splunk Data Inputs of type TCP or UDP
=============================================================================

  Note

 This plugin is part of the [splunk.es collection](https://galaxy.ansible.com/splunk/es) (version 1.0.2).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install splunk.es`.

 To use it in a playbook, specify: `splunk.es.data_input_network`.

   New in version 1.0.0: of splunk.es

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)

 Synopsis
--------

 * This module allows for addition or deletion of TCP and UDP Data Inputs in Splunk.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **connection\_host**  string  | **Choices:*** **ip** ←
* dns
* none
 | Set the host for the remote server that is sending data. 
`ip` sets the host to the IP address of the remote server sending data. 
`dns` sets the host to the reverse DNS entry for the IP address of the remote server sending data. 
`none` leaves the host as specified in inputs.conf, which is typically the Splunk system hostname. |
| **datatype**  string  | **Choices:*** cooked
* **raw** ←
 | Forwarders can transmit three types of data: raw, unparsed, or parsed. `cooked` data refers to parsed and unparsed formats. |
| **host**  string  |  | Host from which the indexer gets data. |
| **index**  string  |  | default Index to store generated events. |
| **name**  string / required  |  | The input port which receives raw data. |
| **protocol**  string / required  | **Choices:*** tcp
* udp
 | Choose between tcp or udp |
| **queue**  string  | **Choices:*** **parsingQueue** ←
* indexQueue
 | Specifies where the input processor should deposit the events it reads. Defaults to parsingQueue. Set queue to parsingQueue to apply props.conf and other parsing rules to your data. For more information about props.conf and rules for timestamping and linebreaking, refer to props.conf and the online documentation at "Monitor files and directories with inputs.conf" Set queue to indexQueue to send your data directly into the index. |
| **rawTcpDoneTimeout**  integer  | **Default:**10 | Specifies in seconds the timeout value for adding a Done-key. If a connection over the port specified by name remains idle after receiving data for specified number of seconds, it adds a Done-key. This implies the last event is completely received. |
| **restrictToHost**  string  |  | Allows for restricting this input to only accept data from the host specified here. |
| **source**  string  |  | Sets the source key/field for events from this input. Defaults to the input file path. Sets the source key initial value. The key is used during parsing/indexing, in particular to set the source field during indexing. It is also the source field used at search time. As a convenience, the chosen string is prepended with 'source::'. Note: Overriding the source key is generally not recommended. Typically, the input layer provides a more accurate string to aid in problem analysis and investigation, accurately recording the file from which the data was retrieved. Consider use of source types, tagging, and search wildcards before overriding this value. |
| **sourcetype**  string  |  | Set the source type for events from this input. "sourcetype=" is automatically prepended to <string>. Defaults to audittrail (if signedaudit=True) or fschange (if signedaudit=False). |
| **ssl**  boolean  | **Choices:*** no
* yes
 | Enable or disble ssl for the data stream |
| **state**  string  | **Choices:*** **present** ←
* absent
* enabled
* disable
 | Enable, disable, create, or destroy |

   
 Examples
--------

 
```
- name: Example adding data input network with splunk.es.data_input_network
  splunk.es.data_input_network:
    name: "8099"
    protocol: "tcp"
    state: "present"

```
 ### Authors

 * Ansible Security Automation Team (@maxamillion) <<https://github.com/ansible-security>>



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/splunk/es/data_input_network_module.html>

ansible.netcommon.netconf\_config – netconf device configuration
================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.netconf_config`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Netconf is a network management protocol developed and standardized by the IETF. It is documented in RFC 6241.
* This module allows the user to send a configuration XML file to a netconf device, and detects if there was a configuration change.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * ncclient

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **backup**  boolean  | **Choices:*** **no** ←
* yes
 | This argument will cause the module to create a full backup of the current `running-config` from the remote device before any changes are made. If the `backup_options` value is not given, the backup file is written to the `backup` folder in the playbook root directory or role root directory, if playbook is part of an ansible role. If the directory does not exist, it is created. |
| **backup\_options**  dictionary  |  | This is a dict object containing configurable options related to backup file path. The value of this option is read only when `backup` is set to *yes*, if `backup` is set to *no* this option will be silently ignored. |
|  | **dir\_path**  path  |  | This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of `filename` or default filename as described in `filename` options description. If the path value is not given in that case a *backup* directory will be created in the current working directory and backup configuration will be copied in `filename` within *backup* directory. |
|  | **filename**  string  |  | The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by <hostname>\_config.<current-date>@<current-time> |
| **commit**  boolean  | **Choices:*** no
* **yes** ←
 | This boolean flag controls if the configuration changes should be committed or not after editing the candidate datastore. This option is supported only if remote Netconf server supports :candidate capability. If the value is set to *False* commit won't be issued after edit-config operation and user needs to handle commit or discard-changes explicitly. |
| **confirm**  integer  | **Default:**0 | This argument will configure a timeout value for the commit to be confirmed before it is automatically rolled back. If the `confirm_commit` argument is set to False, this argument is silently ignored. If the value of this argument is set to 0, the commit is confirmed immediately. The remote host MUST support :candidate and :confirmed-commit capability for this option to . |
| **confirm\_commit**  boolean  | **Choices:*** **no** ←
* yes
 | This argument will execute commit operation on remote device. It can be used to confirm a previous commit. |
| **content**  raw  |  | The configuration data as defined by the device's data models, the value can be either in xml string format or text format or python dictionary representation of JSON format. In case of json string format it will be converted to the corresponding xml string using xmltodict library before pushing onto the remote host. In case the value of this option isn *text* format the format should be supported by remote Netconf server. If the value of `content` option is in *xml* format in that case the xml value should have *config* as root tag. 
aliases: xml |
| **default\_operation**  string  | **Choices:*** merge
* replace
* none
 | The default operation for <edit-config> rpc, valid values are *merge*, *replace* and *none*. If the default value is merge, the configuration data in the `content` option is merged at the corresponding level in the `target` datastore. If the value is replace the data in the `content` option completely replaces the configuration in the `target` datastore. If the value is none the `target` datastore is unaffected by the configuration in the config option, unless and until the incoming configuration data uses the `operation` operation to request a different operation. |
| **delete**  boolean  | **Choices:*** **no** ←
* yes
 | It instructs the module to delete the configuration from value mentioned in `target` datastore. |
| **error\_option**  string  | **Choices:*** **stop-on-error** ←
* continue-on-error
* rollback-on-error
 | This option controls the netconf server action after an error occurs while editing the configuration. If *error\_option=stop-on-error*, abort the config edit on first error. If *error\_option=continue-on-error*, continue to process configuration data on error. The error is recorded and negative response is generated if any errors occur. If *error\_option=rollback-on-error*, rollback to the original configuration if any error occurs. This requires the remote Netconf server to support the *error\_option=rollback-on-error* capability. |
| **format**  string  | **Choices:*** xml
* text
* json
 | The format of the configuration provided as value of `content`. In case of json string format it will be converted to the corresponding xml string using xmltodict library before pushing onto the remote host. In case of *text* format of the configuration should be supported by remote Netconf server. If the value of `format` options is not given it tries to guess the data format of `content` option as one of *xml* or *json* or *text*. If the data format is not identified it is set to *xml* by default. |
| **get\_filter**  raw  |  | This argument specifies the XML string which acts as a filter to restrict the portions of the data retrieved from the remote device when comparing the before and after state of the device following calls to edit\_config. When not specified, the entire configuration or state data is returned for comparison depending on the value of `source` option. The `get_filter` value can be either XML string or XPath or JSON string or native python dictionary, if the filter is in XPath format the NETCONF server running on remote host should support xpath capability else it will result in an error. |
| **lock**  string  | **Choices:*** never
* **always** ←
* if-supported
 | Instructs the module to explicitly lock the datastore specified as `target`. By setting the option value *always* is will explicitly lock the datastore mentioned in `target` option. It the value is *never* it will not lock the `target` datastore. The value *if-supported* lock the `target` datastore only if it is supported by the remote Netconf server. |
| **save**  boolean  | **Choices:*** **no** ←
* yes
 | The `save` argument instructs the module to save the configuration in `target` datastore to the startup-config if changed and if :startup capability is supported by Netconf server. |
| **source\_datastore**  string  |  | Name of the configuration datastore to use as the source to copy the configuration to the datastore mentioned by `target` option. The values can be either *running*, *candidate*, *startup* or a remote URL 
aliases: source |
| **target**  string  | **Choices:*** **auto** ←
* candidate
* running
 | Name of the configuration datastore to be edited. - auto, uses candidate and fallback to running - candidate, edit <candidate/> datastore and then commit - running, edit <running/> datastore directly 
aliases: datastore |
| **validate**  boolean  | **Choices:*** **no** ←
* yes
 | This boolean flag if set validates the content of datastore given in `target` option. For this option to work remote Netconf server should support :validate capability. |

   
 Notes
-----

  Note

 * This module requires the netconf system service be enabled on the remote device being managed.
* This module supports devices with and without the candidate and confirmed-commit capabilities. It will always use the safer feature.
* This module supports the use of connection=netconf
* This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: use lookup filter to provide xml configuration
  ansible.netcommon.netconf_config:
    content: "{{ lookup('file', './config.xml') }}"

- name: set ntp server in the device
  ansible.netcommon.netconf_config:
    content: |
      <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
          <system xmlns="urn:ietf:params:xml:ns:yang:ietf-system">
              <ntp>
                  <enabled>true</enabled>
                  <server>
                      <name>ntp1</name>
                      <udp><address>127.0.0.1</address></udp>
                  </server>
              </ntp>
          </system>
      </config>

- name: wipe ntp configuration
  ansible.netcommon.netconf_config:
    content: |
      <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
          <system xmlns="urn:ietf:params:xml:ns:yang:ietf-system">
              <ntp>
                  <enabled>false</enabled>
                  <server operation="remove">
                      <name>ntp1</name>
                  </server>
              </ntp>
          </system>
      </config>

- name: configure interface while providing different private key file path (for connection=netconf)
  ansible.netcommon.netconf_config:
    backup: yes
  register: backup_junos_location
  vars:
    ansible_private_key_file: /home/admin/.ssh/newprivatekeyfile

- name: configurable backup path
  ansible.netcommon.netconf_config:
    backup: yes
    backup_options:
      filename: backup.cfg
      dir_path: /home/user

- name: "configure using direct native format configuration (cisco iosxr)"
  ansible.netcommon.netconf_config:
    format: json
    content: {
                "config": {
                    "interface-configurations": {
                        "@xmlns": "http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg",
                        "interface-configuration": {
                            "active": "act",
                            "description": "test for ansible Loopback999",
                            "interface-name": "Loopback999"
                        }
                    }
                }
            }
    get_filter: {
                  "interface-configurations": {
                      "@xmlns": "http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg",
                      "interface-configuration": null
                  }
              }

- name: "configure using json string format configuration (cisco iosxr)"
  ansible.netcommon.netconf_config:
    format: json
    content: |
            {
                "config": {
                    "interface-configurations": {
                        "@xmlns": "http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg",
                        "interface-configuration": {
                            "active": "act",
                            "description": "test for ansible Loopback999",
                            "interface-name": "Loopback999"
                        }
                    }
                }
            }
    get_filter: |
            {
                  "interface-configurations": {
                      "@xmlns": "http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg",
                      "interface-configuration": null
                  }
              }


# Make a round-trip interface description change, diff the before and after
# this demonstrates the use of the native display format and several utilities
# from the ansible.utils collection

- name: Define the openconfig interface filter
  set_fact:
    filter:
      interfaces:
        "@xmlns": "http://openconfig.net/yang/interfaces"
        interface:
          name: Ethernet2

- name: Get the pre-change config using the filter
  ansible.netcommon.netconf_get:
    source: running
    filter: "{{ filter }}"
    display: native
  register: pre

- name: Update the description
  ansible.utils.update_fact:
    updates:
    - path: pre.output.data.interfaces.interface.config.description
      value: "Configured by ansible {{ 100 | random }}"
  register: updated

- name: Apply the new configuration
  ansible.netcommon.netconf_config:
    content:
      config:
        interfaces: "{{ updated.pre.output.data.interfaces }}"

- name: Get the post-change config using the filter
  ansible.netcommon.netconf_get:
    source: running
    filter: "{{ filter }}"
    display: native
  register: post

- name: Show the differences between the pre and post configurations
  ansible.utils.fact_diff:
    before: "{{ pre.output.data|ansible.utils.to_paths }}"
    after: "{{ post.output.data|ansible.utils.to_paths }}"

# TASK [Show the differences between the pre and post configurations] ********
# --- before
# +++ after
# @@ -1,11 +1,11 @@
#  {
# -    "@time-modified": "2020-10-23T12:27:17.462332477Z",
# +    "@time-modified": "2020-10-23T12:27:21.744541708Z",
#      "@xmlns": "urn:ietf:params:xml:ns:netconf:base:1.0",
#      "interfaces.interface.aggregation.config['fallback-timeout']['#text']": "90",
#      "interfaces.interface.aggregation.config['fallback-timeout']['@xmlns']": "http://arista.com/yang/openconfig/interfaces/augments",
#      "interfaces.interface.aggregation.config['min-links']": "0",
#      "interfaces.interface.aggregation['@xmlns']": "http://openconfig.net/yang/interfaces/aggregate",
# -    "interfaces.interface.config.description": "Configured by ansible 56",
# +    "interfaces.interface.config.description": "Configured by ansible 67",
#      "interfaces.interface.config.enabled": "true",
#      "interfaces.interface.config.mtu": "0",
#      "interfaces.interface.config.name": "Ethernet2",

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **backup\_path**  string  | when backup is yes | The full path to the backup file  **Sample:** /playbooks/ansible/backup/config.2016-07-16@22:28:34 |
| **diff**  dictionary  | when diff is enabled | If --diff option in enabled while running, the before and after configuration change are returned as part of before and after key.  **Sample:** {'after': '<rpc-reply> <data> <configuration> <version>17.3R1.10</version>...<--snip-->', 'before': '<rpc-reply> <data> <configuration> <version>17.3R1.10</version>...<--snip-->'} |
| **server\_capabilities**  list / elements=string  | success | list of capabilities of the server  **Sample:** ['urn:ietf:params:netconf:base:1.1', 'urn:ietf:params:netconf:capability:confirmed-commit:1.0', 'urn:ietf:params:netconf:capability:candidate:1.0'] |

   
  
 ### Authors

 * Leandro Lisboa Penz (@lpenz)
* Ganesh Nalawade (@ganeshrn)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/netconf_config_module.html>

ansible.netcommon.netconf\_rpc – Execute operations on NETCONF enabled network devices.
=======================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.netconf_rpc`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * NETCONF is a network management protocol developed and standardized by the IETF. It is documented in RFC 6241.
* This module allows the user to execute NETCONF RPC requests as defined by IETF RFC standards as well as proprietary requests.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * ncclient (>=v0.5.2)
* jxmlease

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **content**  string  |  | This argument specifies the optional request content (all RPC attributes). The *content* value can either be provided as XML formatted string or as dictionary. |
| **display**  string  | **Choices:*** json
* pretty
* xml
 | Encoding scheme to use when serializing output from the device. The option *json* will serialize the output as JSON data. If the option value is *json* it requires jxmlease to be installed on control node. The option *pretty* is similar to received XML response but is using human readable format (spaces, new lines). The option value *xml* is similar to received XML response but removes all XML namespaces. |
| **rpc**  string / required  |  | This argument specifies the request (name of the operation) to be executed on the remote NETCONF enabled device. |
| **xmlns**  string  |  | NETCONF operations not defined in rfc6241 typically require the appropriate XML namespace to be set. In the case the *request* option is not already provided in XML format, the namespace can be defined by the *xmlns* option. |

   
 Notes
-----

  Note

 * This module requires the NETCONF system service be enabled on the remote device being managed.
* This module supports the use of connection=netconf
* To execute `get-config`, `get` or `edit-config` requests it is recommended to use the Ansible *netconf\_get* and *netconf\_config* modules.
* This module is supported on `ansible_network_os` network platforms. See the [Network Platform Options](../../../network/user_guide/platform_index#platform-options) for details.

  Examples
--------

 
```
- name: lock candidate
  ansible.netcommon.netconf_rpc:
    rpc: lock
    content:
      target:
        candidate:

- name: unlock candidate
  ansible.netcommon.netconf_rpc:
    rpc: unlock
    xmlns: urn:ietf:params:xml:ns:netconf:base:1.0
    content: "{'target': {'candidate': None}}"

- name: discard changes
  ansible.netcommon.netconf_rpc:
    rpc: discard-changes

- name: get-schema
  ansible.netcommon.netconf_rpc:
    rpc: get-schema
    xmlns: urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring
    content:
      identifier: ietf-netconf
      version: '2011-06-01'

- name: copy running to startup
  ansible.netcommon.netconf_rpc:
    rpc: copy-config
    content:
      source:
        running:
      target:
        startup:

- name: get schema list with JSON output
  ansible.netcommon.netconf_rpc:
    rpc: get
    content: |
      <filter>
        <netconf-state xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
          <schemas/>
        </netconf-state>
      </filter>
    display: json

- name: get schema using XML request
  ansible.netcommon.netconf_rpc:
    rpc: get-schema
    xmlns: urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring
    content: |
      <identifier>ietf-netconf-monitoring</identifier>
      <version>2010-10-04</version>
    display: json

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **output**  complex  | when the display format is selected as JSON it is returned as dict type, if the display format is xml or pretty pretty it is returned as a string apart from low-level errors (such as action plugin). | Based on the value of display option will return either the set of transformed XML to JSON format from the RPC response with type dict or pretty XML string response (human-readable) or response with namespace removed from XML string.  |
|  | **formatted\_output**  string  | success | Contains formatted response received from remote host as per the value in display format.  |
| **stdout**  string  | always apart from low-level errors (such as action plugin) | The raw XML string containing configuration or state data received from the underlying ncclient library.  **Sample:** ... |
| **stdout\_lines**  list / elements=string  | always apart from low-level errors (such as action plugin) | The value of stdout split into a list  **Sample:** ['...', '...'] |

   
  
 ### Authors

 * Ganesh Nalawade (@ganeshrn)
* Sven Wisotzky (@wisotzky)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/netconf_rpc_module.html>

ansible.netcommon.network\_resource – Manage resource modules
=============================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.network_resource`.

   New in version 2.4.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Get list of available resource modules for given os name
* Retrieve given resource module configuration facts
* Push given resource module configuration

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **config**  raw  |  | The resource module configuration. For details on the type and structure of this option refer the individual resource module platform documentation. |
| **name**  string  |  | The name of the resource module to manage. The resource module should be supported for given *os\_name*, if not supported it will result in error. |
| **os\_name**  string  |  | The name of the os to manage the resource modules. The name should be fully qualified collection name format, that is *<namespace>.<collection-name>.<plugin-name>*. If value of this option is not set the os value will be read from *ansible\_network\_os* variable. If value of both *os\_name* and *ansible\_network\_os* is not set it will result in error. |
| **running\_config**  string  |  | This option is used only with state *parsed*. The value of this option should be the output received from the host device by executing the cli command to get the resource configuration on host. The state *parsed* reads the configuration from `running_config` option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the *parsed* key within the result. |
| **state**  string  |  | The state the configuration should be left in. For supported values refer the individual resource module platform documentation. |

   
 Notes
-----

  Note

 * Refer the individual module documentation for the valid inputs of *state* and *config* modules.

  Examples
--------

 
```
- name: get list of resource modules for given network_os
  ansible.netcommon.network_resource:
  register: result

- name: fetch acl config for
  ansible.netcommon.network_resource:
    os_name: cisco.ios.ios
    name: acls
    state: gathered

- name: manage acl config for cisco.ios.ios network os.
  ansible.netcommon.network_resource:
    name: acls
    config:
      - afi: ipv4
        acls:
          - name: test_acl
            acl_type: extended
            aces:
              - grant: deny
                protocol_options:
                  tcp:
                    fin: true
                source:
                  address: 192.0.2.0
                  wildcard_bits: 0.0.0.255
                destination:
                  address: 192.0.3.0
                  wildcard_bits: 0.0.0.255
                  port_protocol:
                    eq: www
                option:
                  traceroute: true
                ttl:
                  eq: 10
    state: merged

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **after**  list / elements=string  | when changed and when *state* and/or *config* option is set | The configuration as structured data after module completion.  **Sample:** The configuration returned will always be in the same format of the parameters above. |
| **before**  list / elements=string  | When *state* and/or *config* option is set | The configuration as structured data prior to module invocation.  **Sample:** The configuration returned will always be in the same format of the parameters above. |
| **commands**  list / elements=string  | When *state* and/or *config* option is set | The set of commands pushed to the remote device  **Sample:** ['ip access-list extended 110'] |
| **modules**  list / elements=string  | When only *os\_name* or *ansible\_network\_os* is set | List of resource modules supported for given OS.  **Sample:** ['acl\_interfaces', 'acls', 'bgp\_global'] |

   
  
 ### Authors

 * Ganesh B. Nalawade (@ganeshrn)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/network_resource_module.html>

ansible.netcommon.restconf\_config – Handles create, update, read and delete of configuration data on RESTCONF enabled devices.
===============================================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.restconf_config`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * RESTCONF is a standard mechanisms to allow web applications to configure and manage data. RESTCONF is a IETF standard and documented on RFC 8040.
* This module allows the user to configure data on RESTCONF enabled devices.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **content**  string  |  | The configuration data in format as specififed in `format` option. Required unless `method` is *delete*. |
| **format**  string  | **Choices:*** **json** ←
* xml
 | The format of the configuration provided as value of `content`. Accepted values are *xml* and *json* and the given configuration format should be supported by remote RESTCONF server. |
| **method**  string  | **Choices:*** **post** ←
* put
* patch
* delete
 | The RESTCONF method to manage the configuration change on device. The value *post* is used to create a data resource or invoke an operation resource, *put* is used to replace the target data resource, *patch* is used to modify the target resource, and *delete* is used to delete the target resource. |
| **path**  string / required  |  | URI being used to execute API calls. |

   
 Notes
-----

  Note

 * This module requires the RESTCONF system service be enabled on the remote device being managed.
* This module is supported with *ansible\_connection* value of *ansible.netcommon.httpapi* and *ansible\_network\_os* value of *ansible.netcommon.restconf*.
* This module is tested against Cisco IOSXE 16.12.02 version.

  Examples
--------

 
```
- name: create l3vpn services
  ansible.netcommon.restconf_config:
    path: /config/ietf-l3vpn-svc:l3vpn-svc/vpn-services
    content: |
      {
        "vpn-service":[
                        {
                          "vpn-id": "red_vpn2",
                          "customer-name": "blue",
                          "vpn-service-topology": "ietf-l3vpn-svc:any-to-any"
                        },
                        {
                          "vpn-id": "blue_vpn1",
                          "customer-name": "red",
                          "vpn-service-topology": "ietf-l3vpn-svc:any-to-any"
                        }
                      ]
       }

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **candidate**  dictionary  | When the method is not delete | The configuration sent to the device.  **Sample:** { "vpn-service": [ { "customer-name": "red", "vpn-id": "blue\_vpn1", "vpn-service-topology": "ietf-l3vpn-svc:any-to-any" } ] } |
| **running**  dictionary  | When the method is not delete | The current running configuration on the device.  **Sample:** { "vpn-service": [ { "vpn-id": "red\_vpn2", "customer-name": "blue", "vpn-service-topology": "ietf-l3vpn-svc:any-to-any" }, { "vpn-id": "blue\_vpn1", "customer-name": "red", "vpn-service-topology": "ietf-l3vpn-svc:any-to-any" } ] } |

   
  
 ### Authors

 * Ganesh Nalawade (@ganeshrn)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/restconf_config_module.html>

ansible.netcommon.restconf\_get – Fetch configuration/state data from RESTCONF enabled devices.
===============================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.restconf_get`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * RESTCONF is a standard mechanisms to allow web applications to access the configuration data and state data developed and standardized by the IETF. It is documented in RFC 8040.
* This module allows the user to fetch configuration and state data from RESTCONF enabled devices.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **content**  string  | **Choices:*** config
* nonconfig
* all
 | The `content` is a query parameter that controls how descendant nodes of the requested data nodes in `path` will be processed in the reply. If value is *config* return only configuration descendant data nodes of value in `path`. If value is *nonconfig* return only non-configuration descendant data nodes of value in `path`. If value is *all* return all descendant data nodes of value in `path`
 |
| **output**  string  | **Choices:*** **json** ←
* xml
 | The output of response received. |
| **path**  string / required  |  | URI being used to execute API calls. |

   
 Notes
-----

  Note

 * This module requires the RESTCONF system service be enabled on the remote device being managed.
* This module is supported with *ansible\_connection* value of *ansible.netcommon.httpapi* and *ansible\_network\_os* value of *ansible.netcommon.restconf*.
* This module is tested against Cisco IOSXE 16.12.02 version.

  Examples
--------

 
```
- name: get l3vpn services
  ansible.netcommon.restconf_get:
    path: /config/ietf-l3vpn-svc:l3vpn-svc/vpn-services

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **response**  dictionary  | when the device response is valid JSON | A dictionary representing a JSON-formatted response  **Sample:** { "vpn-services": { "vpn-service": [ { "customer-name": "red", "vpn-id": "blue\_vpn1", "vpn-service-topology": "ietf-l3vpn-svc:any-to-any" } ] } } |

   
  
 ### Authors

 * Ganesh Nalawade (@ganeshrn)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/restconf_get_module.html>

ansible.netcommon.default – Use default netconf plugin to run standard netconf commands as per RFC
==================================================================================================

  Note

 This plugin is part of the [ansible.netcommon collection](https://galaxy.ansible.com/ansible/netcommon) (version 2.4.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.netcommon`.

 To use it in a playbook, specify: `ansible.netcommon.default`.

   New in version 1.0.0: of ansible.netcommon

  * [Synopsis](#synopsis)
* [Parameters](#parameters)

 Synopsis
--------

 * This default plugin provides low level abstraction apis for sending and receiving netconf commands as per Netconf RFC specification.

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **ncclient\_device\_handler**  string  | **Default:**"default" |  | Specifies the ncclient device handler name for network os that support default netconf implementation as per Netconf RFC specification. To identify the ncclient device handler name refer ncclient library documentation. |

   
 ### Authors

 * Ansible Networking Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/default_netconf.html>

sensu.sensu\_go.install – Enable Sensu Go repos and install selected packages
=============================================================================

  Note

 This role is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).

 To install it use: `ansible-galaxy collection install sensu.sensu_go`.

 To use it in a playbook, specify: `sensu.sensu_go.install`.

  * [Entry point `main` – Enable Sensu Go repos and install selected packages](#entry-point-main-enable-sensu-go-repos-and-install-selected-packages)


	+ [Synopsis](#synopsis)
	+ [Parameters](#parameters)
* [Entry point `packages` – Install selected Sensu Go packages](#entry-point-packages-install-selected-sensu-go-packages)


	+ [Synopsis](#id1)
	+ [Parameters](#id2)
* [Entry point `repositories` – Enable Sensu Go repos](#entry-point-repositories-enable-sensu-go-repos)


	+ [Synopsis](#id3)
	+ [Parameters](#id4)

 Entry point `main` – Enable Sensu Go repos and install selected packages
------------------------------------------------------------------------

 ### Synopsis

 * The main entry point just combines the repositories and packages entry points.

 ### Parameters

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **build**  string  | **Default:**"latest" | Package build to install. Can be any valid build string such as `8290` or a special value latest. If the *version* variable is set to latest, this variable is ignored and the latest available build is installed. |
| **channel**  string  | **Default:**"stable" | Repository channel that serves as a source of packages. Visit the packagecloud site to find all available channels. |
| **components**  list / elements=string  | **Choices:*** **sensu-go-backend** ←
* **sensu-go-agent** ←
* **sensu-go-cli** ←

**Default:**["sensu-go-backend", "sensu-go-agent", "sensu-go-cli"] | List of components to install. |
| **version**  string  | **Default:**"latest" | Package version to install. Can be any valid version string such as `6.2.5` or special value `latest`. |

   
 Entry point `packages` – Install selected Sensu Go packages
-----------------------------------------------------------

 ### Synopsis

 * Make sure selected packages are installed.
* By default, the role will install latest available package version. This will change in the next major version of the collection where the *version* will become a required variable.

 ### Parameters

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **build**  string  | **Default:**"latest" | Package build to install. Can be any valid build string such as `8290` or a special value latest. If the *version* variable is set to latest, this variable is ignored and the latest available build is installed. |
| **components**  list / elements=string  | **Choices:*** **sensu-go-backend** ←
* **sensu-go-agent** ←
* **sensu-go-cli** ←

**Default:**["sensu-go-backend", "sensu-go-agent", "sensu-go-cli"] | List of components to install. |
| **version**  string  | **Default:**"latest" | Package version to install. Can be any valid version string such as `6.2.5` or special value `latest`. |

   
 Entry point `repositories` – Enable Sensu Go repos
--------------------------------------------------

 ### Synopsis

 * Install required repository files on supported distributions.
* This entry point does not work on Windows because there is no concept of repository there.

 ### Parameters

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **channel**  string  | **Default:**"stable" | Repository channel that serves as a source of packages. Visit the packagecloud site to find all available channels. |

   


 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/sensu/sensu_go/install_role.html>

ansible.windows.win\_acl – Set file/directory/registry permissions for a system user or group
=============================================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_acl`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Add or remove rights/permissions for a given user or group for the specified file, folder, registry key or AppPool identifies.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **inherit**  string  | **Choices:*** ContainerInherit
* ObjectInherit
 | Inherit flags on the ACL rules. Can be specified as a comma separated list, e.g. `ContainerInherit`, `ObjectInherit`. For more information on the choices see MSDN InheritanceFlags enumeration at <https://msdn.microsoft.com/en-us/library/system.security.accesscontrol.inheritanceflags.aspx>. Defaults to `ContainerInherit, ObjectInherit` for Directories. |
| **path**  string / required  |  | The path to the file or directory. |
| **propagation**  string  | **Choices:*** InheritOnly
* **None** ←
* NoPropagateInherit
 | Propagation flag on the ACL rules. For more information on the choices see MSDN PropagationFlags enumeration at <https://msdn.microsoft.com/en-us/library/system.security.accesscontrol.propagationflags.aspx>. |
| **rights**  string / required  |  | The rights/permissions that are to be allowed/denied for the specified user or group for the item at `path`. If `path` is a file or directory, rights can be any right under MSDN FileSystemRights <https://msdn.microsoft.com/en-us/library/system.security.accesscontrol.filesystemrights.aspx>. If `path` is a registry key, rights can be any right under MSDN RegistryRights <https://msdn.microsoft.com/en-us/library/system.security.accesscontrol.registryrights.aspx>. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | Specify whether to add `present` or remove `absent` the specified access rule. |
| **type**  string / required  | **Choices:*** allow
* deny
 | Specify whether to allow or deny the rights specified. |
| **user**  string / required  |  | User or Group to add specified rights to act on src file/folder or registry key. |

   
 Notes
-----

  Note

 * If adding ACL’s for AppPool identities, the Windows Feature “Web-Scripting-Tools” must be enabled.

  See Also
--------

  See also

  [ansible.windows.win\_acl\_inheritance](win_acl_inheritance_module#ansible-collections-ansible-windows-win-acl-inheritance-module)

The official documentation on the **ansible.windows.win\_acl\_inheritance** module.

  [ansible.windows.win\_file](win_file_module#ansible-collections-ansible-windows-win-file-module)

The official documentation on the **ansible.windows.win\_file** module.

  [ansible.windows.win\_owner](win_owner_module#ansible-collections-ansible-windows-win-owner-module)

The official documentation on the **ansible.windows.win\_owner** module.

  [ansible.windows.win\_stat](win_stat_module#ansible-collections-ansible-windows-win-stat-module)

The official documentation on the **ansible.windows.win\_stat** module.

    Examples
--------

 
```
- name: Restrict write and execute access to User Fed-Phil
  ansible.windows.win_acl:
    user: Fed-Phil
    path: C:\Important\Executable.exe
    type: deny
    rights: ExecuteFile,Write

- name: Add IIS_IUSRS allow rights
  ansible.windows.win_acl:
    path: C:\inetpub\wwwroot\MySite
    user: IIS_IUSRS
    rights: FullControl
    type: allow
    state: present
    inherit: ContainerInherit, ObjectInherit
    propagation: 'None'

- name: Set registry key right
  ansible.windows.win_acl:
    path: HKCU:\Bovine\Key
    user: BUILTIN\Users
    rights: EnumerateSubKeys
    type: allow
    state: present
    inherit: ContainerInherit, ObjectInherit
    propagation: 'None'

- name: Remove FullControl AccessRule for IIS_IUSRS
  ansible.windows.win_acl:
    path: C:\inetpub\wwwroot\MySite
    user: IIS_IUSRS
    rights: FullControl
    type: allow
    state: absent
    inherit: ContainerInherit, ObjectInherit
    propagation: 'None'

- name: Deny Intern
  ansible.windows.win_acl:
    path: C:\Administrator\Documents
    user: Intern
    rights: Read,Write,Modify,FullControl,Delete
    type: deny
    state: present

```
 ### Authors

 * Phil Schwartz (@schwartzmx)
* Trond Hindenes (@trondhindenes)
* Hans-Joachim Kliemeck (@h0nIg)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_acl_module.html>

ansible.windows.win\_acl\_inheritance – Change ACL inheritance
==============================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_acl_inheritance`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Change ACL (Access Control List) inheritance and optionally copy inherited ACE’s (Access Control Entry) to dedicated ACE’s or vice versa.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **path**  path / required  |  | Path to be used for changing inheritance |
| **reorganize**  boolean  | **Choices:*** **no** ←
* yes
 | For P(state) = *absent*, indicates if the inherited ACE's should be copied from the parent directory. This is necessary (in combination with removal) for a simple ACL instead of using multiple ACE deny entries. For P(state) = *present*, indicates if the inherited ACE's should be deduplicated compared to the parent directory. This removes complexity of the ACL structure. |
| **state**  string  | **Choices:*** **absent** ←
* present
 | Specify whether to enable *present* or disable *absent* ACL inheritance. |

   
 See Also
--------

  See also

  [ansible.windows.win\_acl](win_acl_module#ansible-collections-ansible-windows-win-acl-module)

The official documentation on the **ansible.windows.win\_acl** module.

  [ansible.windows.win\_file](win_file_module#ansible-collections-ansible-windows-win-file-module)

The official documentation on the **ansible.windows.win\_file** module.

  [ansible.windows.win\_stat](win_stat_module#ansible-collections-ansible-windows-win-stat-module)

The official documentation on the **ansible.windows.win\_stat** module.

    Examples
--------

 
```
- name: Disable inherited ACE's
  ansible.windows.win_acl_inheritance:
    path: C:\apache
    state: absent

- name: Disable and copy inherited ACE's
  ansible.windows.win_acl_inheritance:
    path: C:\apache
    state: absent
    reorganize: yes

- name: Enable and remove dedicated ACE's
  ansible.windows.win_acl_inheritance:
    path: C:\apache
    state: present
    reorganize: yes

```
 ### Authors

 * Hans-Joachim Kliemeck (@h0nIg)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_acl_inheritance_module.html>

ansible.windows.win\_certificate\_store – Manages the certificate store
=======================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_certificate_store`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Used to import/export and remove certificates and keys from the local certificate store.
* This module is not used to create certificates and will only manage existing certs as a file or in the store.
* It can be used to import PEM, DER, P7B, PKCS12 (PFX) certificates and export PEM, DER and PKCS12 certificates.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **file\_type**  string  | **Choices:*** **der** ←
* pem
* pkcs12
 | The file type to export the certificate as when `state=exported`. 
`der` is a binary ASN.1 encoded file. 
`pem` is a base64 encoded file of a der file in the OpenSSL form. 
`pkcs12` (also known as pfx) is a binary container that contains both the certificate and private key unlike the other options. When `pkcs12` is set and the private key is not exportable or accessible by the current user, it will throw an exception. |
| **key\_exportable**  boolean  | **Choices:*** no
* **yes** ←
 | Whether to allow the private key to be exported. If `no`, then this module and other process will only be able to export the certificate and the private key cannot be exported. Used when `state=present` only. |
| **key\_storage**  string  | **Choices:*** **default** ←
* machine
* user
 | Specifies where Windows will store the private key when it is imported. When set to `default`, the default option as set by Windows is used, typically `user`. When set to `machine`, the key is stored in a path accessible by various users. When set to `user`, the key is stored in a path only accessible by the current user. Used when `state=present` only and cannot be changed once imported. See <https://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509keystorageflags.aspx> for more details. |
| **password**  string  |  | The password of the pkcs12 certificate key. This is used when reading a pkcs12 certificate file or the password to set when `state=exported` and `file_type=pkcs12`. If the pkcs12 file has no password set or no password should be set on the exported file, do not set this option. |
| **path**  path  |  | The path to a certificate file. This is required when *state* is `present` or `exported`. When *state* is `absent` and *thumbprint* is not specified, the thumbprint is derived from the certificate at this path. |
| **state**  string  | **Choices:*** absent
* exported
* **present** ←
 | If `present`, will ensure that the certificate at *path* is imported into the certificate store specified. If `absent`, will ensure that the certificate specified by *thumbprint* or the thumbprint of the cert at *path* is removed from the store specified. If `exported`, will ensure the file at *path* is a certificate specified by *thumbprint*. When exporting a certificate, if *path* is a directory then the module will fail, otherwise the file will be replaced if needed. |
| **store\_location**  string  | **Default:**"LocalMachine" | The store location to use when importing a certificate or searching for a certificate. Can be set to `CurrentUser` or `LocalMachine` when `store_type=system`. Defaults to `LocalMachine` when `store_type=system`. Must be set to any service name when `store_type=service`. |
| **store\_name**  string  | **Default:**"My" | The store name to use when importing a certificate or searching for a certificate. 
`AddressBook`: The X.509 certificate store for other users 
`AuthRoot`: The X.509 certificate store for third-party certificate authorities (CAs) 
`CertificateAuthority`: The X.509 certificate store for intermediate certificate authorities (CAs) 
`Disallowed`: The X.509 certificate store for revoked certificates 
`My`: The X.509 certificate store for personal certificates 
`Root`: The X.509 certificate store for trusted root certificate authorities (CAs) 
`TrustedPeople`: The X.509 certificate store for directly trusted people and resources 
`TrustedPublisher`: The X.509 certificate store for directly trusted publishers |
| **store\_type**  string   added in 1.5.0 of ansible.windows  | **Choices:*** **system** ←
* service
 | The store type to manage. Use `system` to manage locations in the system store, `LocalMachine` and `CurrentUser`. Use `service` to manage the store of a service account specified by *store\_location*. |
| **thumbprint**  string  |  | The thumbprint as a hex string to either export or remove. See the examples for how to specify the thumbprint. |

   
 Notes
-----

  Note

 * Some actions on PKCS12 certificates and keys may fail with the error `the specified network password is not correct`, either use CredSSP or Kerberos with credential delegation, or use `become` to bypass these restrictions.
* The certificates must be located on the Windows host to be set with *path*.
* When importing a certificate for usage in IIS, it is generally required to use the `machine` key\_storage option, as both `default` and `user` will make the private key unreadable to IIS APPPOOL identities and prevent binding the certificate to the https endpoint.

  Examples
--------

 
```
- name: Import a certificate
  ansible.windows.win_certificate_store:
    path: C:\Temp\cert.pem
    state: present

- name: Import pfx certificate that is password protected
  ansible.windows.win_certificate_store:
    path: C:\Temp\cert.pfx
    state: present
    password: VeryStrongPasswordHere!
  become: yes
  become_method: runas

- name: Import pfx certificate without password and set private key as un-exportable
  ansible.windows.win_certificate_store:
    path: C:\Temp\cert.pfx
    state: present
    key_exportable: no
  # usually you don't set this here but it is for illustrative purposes
  vars:
    ansible_winrm_transport: credssp

- name: Remove a certificate based on file thumbprint
  ansible.windows.win_certificate_store:
    path: C:\Temp\cert.pem
    state: absent

- name: Remove a certificate based on thumbprint
  ansible.windows.win_certificate_store:
    thumbprint: BD7AF104CF1872BDB518D95C9534EA941665FD27
    state: absent

- name: Remove certificate based on thumbprint is CurrentUser/TrustedPublishers store
  ansible.windows.win_certificate_store:
    thumbprint: BD7AF104CF1872BDB518D95C9534EA941665FD27
    state: absent
    store_location: CurrentUser
    store_name: TrustedPublisher

- name: Export certificate as der encoded file
  ansible.windows.win_certificate_store:
    path: C:\Temp\cert.cer
    state: exported
    file_type: der

- name: Export certificate and key as pfx encoded file
  ansible.windows.win_certificate_store:
    path: C:\Temp\cert.pfx
    state: exported
    file_type: pkcs12
    password: AnotherStrongPass!
  become: yes
  become_method: runas
  become_user: SYSTEM

- name: Import certificate be used by IIS
  ansible.windows.win_certificate_store:
    path: C:\Temp\cert.pfx
    file_type: pkcs12
    password: StrongPassword!
    store_location: LocalMachine
    key_storage: machine
    state: present
  become: yes
  become_method: runas
  become_user: SYSTEM

- name: Import certificate to be used for LDAPS
  ansible.windows.win_certificate_store:
    path: C:\Temp\cert.pfx
    password: StrongPassword!
    store_type: service
    store_location: NTDS
    key_exportable: no
    key_storage: machine
    state: present

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **thumbprints**  list / elements=string  | success | A list of certificate thumbprints that were touched by the module.  **Sample:** ['BC05633694E675449136679A658281F17A191087'] |

   
  
 ### Authors

 * Jordan Borean (@jborean93)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_certificate_store_module.html>

openstack.cloud.volume\_snapshot\_info – Get volume snapshots
=============================================================

  Note

 This plugin is part of the [openstack.cloud collection](https://galaxy.ansible.com/openstack/cloud) (version 1.5.1).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install openstack.cloud`.

 To use it in a playbook, specify: `openstack.cloud.volume_snapshot_info`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Get Volume Snapshot info from the Openstack cloud.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * openstacksdk
* openstacksdk >= 0.12.0
* python >= 3.6

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_timeout**  integer  |  | How long should the socket layer wait before timing out for API calls. If this is omitted, nothing will be passed to the requests library. |
| **auth**  dictionary  |  | Dictionary containing auth information as needed by the cloud's auth plugin strategy. For the default *password* plugin, this would contain *auth\_url*, *username*, *password*, *project\_name* and any information about domains (for example, *user\_domain\_name* or *project\_domain\_name*) if the cloud supports them. For other plugins, this param will need to contain whatever parameters that auth plugin requires. This parameter is not needed if a named cloud is provided or OpenStack OS\_\* environment variables are present. |
| **auth\_type**  string  |  | Name of the auth plugin to use. If the cloud uses something other than password authentication, the name of the plugin should be indicated here and the contents of the *auth* parameter should be updated accordingly. |
| **availability\_zone**  string  |  | Ignored. Present for backwards compatibility |
| **ca\_cert**  string  |  | A path to a CA Cert bundle that can be used as part of verifying SSL API requests. 
aliases: cacert |
| **client\_cert**  string  |  | A path to a client certificate to use as part of the SSL transaction. 
aliases: cert |
| **client\_key**  string  |  | A path to a client key to use as part of the SSL transaction. 
aliases: key |
| **cloud**  raw  |  | Named cloud or cloud config to operate against. If *cloud* is a string, it references a named cloud config as defined in an OpenStack clouds.yaml file. Provides default values for *auth* and *auth\_type*. This parameter is not needed if *auth* is provided or if OpenStack OS\_\* environment variables are present. If *cloud* is a dict, it contains a complete cloud configuration like would be in a section of clouds.yaml. |
| **details**  boolean  | **Choices:*** no
* **yes** ←
 | More detailed output |
| **interface**  string  | **Choices:*** admin
* internal
* **public** ←
 | Endpoint URL type to fetch from the service catalog. 
aliases: endpoint\_type |
| **name**  string  |  | Name of the Snapshot. |
| **region\_name**  string  |  | Name of the region. |
| **status**  string  | **Choices:*** creating
* available
* error
* deleting
* error\_deleting
* rollbacking
* backing-up
 | Specifies the snapshot status. |
| **timeout**  integer  | **Default:**180 | How long should ansible wait for the requested resource. |
| **validate\_certs**  boolean  | **Choices:*** no
* yes
 | Whether or not SSL API requests should be verified. Before Ansible 2.3 this defaulted to `yes`. 
aliases: verify |
| **volume**  string  |  | Name of the volume. |
| **wait**  boolean  | **Choices:*** no
* **yes** ←
 | Should ansible wait until the requested resource is complete. |

   
 Notes
-----

  Note

 * The standard OpenStack environment variables, such as `OS_USERNAME` may be used instead of providing explicit values.
* Auth information is driven by openstacksdk, which means that values can come from a yaml config file in /etc/ansible/openstack.yaml, /etc/openstack/clouds.yaml or ~/.config/openstack/clouds.yaml, then from standard environment variables, then finally by explicit parameters in plays. More information can be found at <https://docs.openstack.org/openstacksdk/>

  Examples
--------

 
```
# Get snapshots.
- openstack.cloud.volume_snapshot_info:
  register: snapshots

- openstack.cloud.volume_snapshotbackup_info:
    name: my_fake_snapshot
  register: snapshot

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **volume\_snapshots**  list / elements=dictionary  | always. | List of dictionaries describing volume snapshots.  |
|  | **created\_at**  string  | success | Snapshot creation time.  |
|  | **description**  string  | success | Snapshot desciption.  |
|  | **id**  string  | success | Unique UUID.  **Sample:** 39007a7e-ee4f-4d13-8283-b4da2e037c69 |
|  | **metadata**  dictionary  | success | Snapshot metadata.  |
|  | **name**  string  | success | Snapshot Name.  |
|  | **status**  string  | success | Snapshot status.  |
|  | **updated\_at**  string  | success | Snapshot update time.  |
|  | **volume\_id**  string  | success | Volume ID.  |

   
  
 ### Authors

 * OpenStack Ansible SIG



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/openstack/cloud/volume_snapshot_info_module.html>

ansible.windows.win\_copy – Copies files to remote locations on windows hosts
=============================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_copy`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * The `win_copy` module copies a file on the local box to remote windows locations.
* For non-Windows targets, use the [ansible.builtin.copy](../builtin/copy_module#ansible-collections-ansible-builtin-copy-module) module instead.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **backup**  boolean  | **Choices:*** **no** ←
* yes
 | Determine whether a backup should be created. When set to `yes`, create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. No backup is taken when `remote_src=False` and multiple files are being copied. |
| **content**  string  |  | When used instead of `src`, sets the contents of a file directly to the specified value. This is for simple values, for anything complex or with formatting please switch to the [ansible.windows.win\_template](win_template_module) module. |
| **decrypt**  boolean  | **Choices:*** no
* **yes** ←
 | This option controls the autodecryption of source files using vault. |
| **dest**  path / required  |  | Remote absolute path where the file should be copied to. If `src` is a directory, this must be a directory too. Use \ for path separators or \\ when in "double quotes". If `dest` ends with \ then source or the contents of source will be copied to the directory without renaming. If `dest` is a nonexistent path, it will only be created if `dest` ends with "/" or "\", or `src` is a directory. If `src` and `dest` are files and if the parent directory of `dest` doesn't exist, then the task will fail. |
| **force**  boolean  | **Choices:*** no
* **yes** ←
 | If set to `yes`, the file will only be transferred if the content is different than destination. If set to `no`, the file will only be transferred if the destination does not exist. If set to `no`, no checksuming of the content is performed which can help improve performance on larger files. |
| **local\_follow**  boolean  | **Choices:*** no
* **yes** ←
 | This flag indicates that filesystem links in the source tree, if they exist, should be followed. |
| **remote\_src**  boolean  | **Choices:*** **no** ←
* yes
 | If `no`, it will search for src at originating/controller machine. If `yes`, it will go to the remote/target machine for the src. |
| **src**  path  |  | Local path to a file to copy to the remote server; can be absolute or relative. If path is a directory, it is copied (including the source folder name) recursively to `dest`. If path is a directory and ends with "/", only the inside contents of that directory are copied to the destination. Otherwise, if it does not end with "/", the directory itself with all contents is copied. If path is a file and dest ends with "\", the file is copied to the folder with the same filename. Required unless using `content`. |

   
 Notes
-----

  Note

 * Currently win\_copy does not support copying symbolic links from both local to remote and remote to remote.
* It is recommended that backslashes `\` are used instead of `/` when dealing with remote paths.
* Because win\_copy runs over WinRM, it is not a very efficient transfer mechanism. If sending large files consider hosting them on a web service and using [ansible.windows.win\_get\_url](win_get_url_module#ansible-collections-ansible-windows-win-get-url-module) instead.

  See Also
--------

  See also

  community.general.assemble

The official documentation on the **community.general.assemble** module.

  [ansible.builtin.copy](../builtin/copy_module#ansible-collections-ansible-builtin-copy-module)

The official documentation on the **ansible.builtin.copy** module.

  [ansible.windows.win\_get\_url](win_get_url_module#ansible-collections-ansible-windows-win-get-url-module)

The official documentation on the **ansible.windows.win\_get\_url** module.

  [community.windows.win\_robocopy](../../community/windows/win_robocopy_module#ansible-collections-community-windows-win-robocopy-module)

The official documentation on the **community.windows.win\_robocopy** module.

    Examples
--------

 
```
- name: Copy a single file
  ansible.windows.win_copy:
    src: /srv/myfiles/foo.conf
    dest: C:\Temp\renamed-foo.conf

- name: Copy a single file, but keep a backup
  ansible.windows.win_copy:
    src: /srv/myfiles/foo.conf
    dest: C:\Temp\renamed-foo.conf
    backup: yes

- name: Copy a single file keeping the filename
  ansible.windows.win_copy:
    src: /src/myfiles/foo.conf
    dest: C:\Temp\

- name: Copy folder to C:\Temp (results in C:\Temp\temp_files)
  ansible.windows.win_copy:
    src: files/temp_files
    dest: C:\Temp

- name: Copy folder contents recursively
  ansible.windows.win_copy:
    src: files/temp_files/
    dest: C:\Temp

- name: Copy a single file where the source is on the remote host
  ansible.windows.win_copy:
    src: C:\Temp\foo.txt
    dest: C:\ansible\foo.txt
    remote_src: yes

- name: Copy a folder recursively where the source is on the remote host
  ansible.windows.win_copy:
    src: C:\Temp
    dest: C:\ansible
    remote_src: yes

- name: Set the contents of a file
  ansible.windows.win_copy:
    content: abc123
    dest: C:\Temp\foo.txt

- name: Copy a single file as another user
  ansible.windows.win_copy:
    src: NuGet.config
    dest: '%AppData%\NuGet\NuGet.config'
  vars:
    ansible_become_user: user
    ansible_become_password: pass
    # The tmp dir must be set when using win_copy as another user
    # This ensures the become user will have permissions for the operation
    # Make sure to specify a folder both the ansible_user and the become_user have access to (i.e not %TEMP% which is user specific and requires Admin)
    ansible_remote_tmp: 'c:\tmp'

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **backup\_file**  string  | if backup=yes | Name of the backup file that was created.  **Sample:** C:\Path\To\File.txt.11540.20150212-220915.bak |
| **checksum**  string  | success, src is a file | SHA1 checksum of the file after running copy.  **Sample:** 6e642bb8dd5c2e027bf21dd923337cbb4214f827 |
| **dest**  string  | changed | Destination file/path.  **Sample:** C:\Temp\ |
| **operation**  string  | success | Whether a single file copy took place or a folder copy.  **Sample:** file\_copy |
| **original\_basename**  string  | changed, src is a file | Basename of the copied file.  **Sample:** foo.txt |
| **size**  integer  | changed, src is a file | Size of the target, after execution.  **Sample:** 1220 |
| **src**  string  | changed | Source file used for the copy on the target machine.  **Sample:** /home/httpd/.ansible/tmp/ansible-tmp-1423796390.97-147729857856000/source |

   
  
 ### Authors

 * Jon Hawkesworth (@jhawkesworth)
* Jordan Borean (@jborean93)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_copy_module.html>

ansible.windows.win\_dns\_client – Configures DNS lookup on Windows hosts
=========================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_dns_client`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)

 Synopsis
--------

 * The [ansible.windows.win\_dns\_client](#ansible-collections-ansible-windows-win-dns-client-module) module configures the DNS client on Windows network adapters.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adapter\_names**  list / elements=string / required  |  | Adapter name or list of adapter names for which to manage DNS settings ('\*' is supported as a wildcard value). The adapter name used is the connection caption in the Network Control Panel or the InterfaceAlias of `Get-DnsClientServerAddress`. |
| **dns\_servers**  list / elements=string / required  |  | Single or ordered list of DNS servers (IPv4 and IPv6 addresses) to configure for lookup. An empty list will configure the adapter to use the DHCP-assigned values on connections where DHCP is enabled, or disable DNS lookup on statically-configured connections. IPv6 DNS servers can only be set on Windows Server 2012 or newer, older hosts can only set IPv4 addresses. 
aliases: ipv4\_addresses, ip\_addresses, addresses |

   
 Examples
--------

 
```
- name: Set a single address on the adapter named Ethernet
  ansible.windows.win_dns_client:
    adapter_names: Ethernet
    dns_servers: 192.168.34.5

- name: Set multiple lookup addresses on all visible adapters (usually physical adapters that are in the Up state), with debug logging to a file
  ansible.windows.win_dns_client:
    adapter_names: '*'
    dns_servers:
    - 192.168.34.5
    - 192.168.34.6
    log_path: C:\dns_log.txt

- name: Set IPv6 DNS servers on the adapter named Ethernet
  ansible.windows.win_dns_client:
    adapter_names: Ethernet
    dns_servers:
    - '2001:db8::2'
    - '2001:db8::3'

- name: Configure all adapters whose names begin with Ethernet to use DHCP-assigned DNS values
  ansible.windows.win_dns_client:
    adapter_names: 'Ethernet*'
    dns_servers: []

```
 ### Authors

 * Matt Davis (@nitzmahone)
* Brian Scholer (@briantist)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_dns_client_module.html>

ansible.windows.win\_domain – Ensures the existence of a Windows domain
=======================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_domain`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Ensure that the domain named by `dns_domain_name` exists and is reachable.
* If the domain is not reachable, the domain is created in a new forest on the target Windows Server 2012R2+ host.
* This module may require subsequent use of the [ansible.windows.win\_reboot](win_reboot_module#ansible-collections-ansible-windows-win-reboot-module) action if changes are made.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **create\_dns\_delegation**  boolean  | **Choices:*** no
* yes
 | Whether to create a DNS delegation that references the new DNS server that you install along with the domain controller. Valid for Active Directory-integrated DNS only. The default is computed automatically based on the environment. |
| **database\_path**  path  |  | The path to a directory on a fixed disk of the Windows host where the domain database will be created. If not set then the default path is `%SYSTEMROOT%\NTDS`. |
| **dns\_domain\_name**  string / required  |  | The DNS name of the domain which should exist and be reachable or reside on the target Windows host. |
| **domain\_mode**  string  | **Choices:*** Win2003
* Win2008
* Win2008R2
* Win2012
* Win2012R2
* WinThreshold
 | Specifies the domain functional level of the first domain in the creation of a new forest. The domain functional level cannot be lower than the forest functional level, but it can be higher. The default is automatically computed and set. |
| **domain\_netbios\_name**  string  |  | The NetBIOS name for the root domain in the new forest. For NetBIOS names to be valid for use with this parameter they must be single label names of 15 characters or less, if not it will fail. If this parameter is not set, then the default is automatically computed from the value of the *domain\_name* parameter. |
| **forest\_mode**  string  | **Choices:*** Win2003
* Win2008
* Win2008R2
* Win2012
* Win2012R2
* WinThreshold
 | Specifies the forest functional level for the new forest. The default forest functional level in Windows Server is typically the same as the version you are running. |
| **install\_dns**  boolean  | **Choices:*** no
* **yes** ←
 | Whether to install the DNS service when creating the domain controller. |
| **log\_path**  path  |  | Specifies the fully qualified, non-UNC path to a directory on a fixed disk of the local computer where the log file for this operation is written. If not set then the default path is `%SYSTEMROOT%\NTDS`. |
| **safe\_mode\_password**  string / required  |  | Safe mode password for the domain controller. |
| **sysvol\_path**  path  |  | The path to a directory on a fixed disk of the Windows host where the Sysvol file will be created. If not set then the default path is `%SYSTEMROOT%\SYSVOL`. |

   
 See Also
--------

  See also

  [ansible.windows.win\_domain\_controller](win_domain_controller_module#ansible-collections-ansible-windows-win-domain-controller-module)

The official documentation on the **ansible.windows.win\_domain\_controller** module.

  [community.windows.win\_domain\_computer](../../community/windows/win_domain_computer_module#ansible-collections-community-windows-win-domain-computer-module)

The official documentation on the **community.windows.win\_domain\_computer** module.

  [community.windows.win\_domain\_group](../../community/windows/win_domain_group_module#ansible-collections-community-windows-win-domain-group-module)

The official documentation on the **community.windows.win\_domain\_group** module.

  [ansible.windows.win\_domain\_membership](win_domain_membership_module#ansible-collections-ansible-windows-win-domain-membership-module)

The official documentation on the **ansible.windows.win\_domain\_membership** module.

  [community.windows.win\_domain\_user](../../community/windows/win_domain_user_module#ansible-collections-community-windows-win-domain-user-module)

The official documentation on the **community.windows.win\_domain\_user** module.

    Examples
--------

 
```
- name: Create new domain in a new forest on the target host
  ansible.windows.win_domain:
    dns_domain_name: ansible.vagrant
    safe_mode_password: password123!

- name: Create new Windows domain in a new forest with specific parameters
  ansible.windows.win_domain:
    create_dns_delegation: no
    database_path: C:\Windows\NTDS
    dns_domain_name: ansible.vagrant
    domain_mode: Win2012R2
    domain_netbios_name: ANSIBLE
    forest_mode: Win2012R2
    safe_mode_password: password123!
    sysvol_path: C:\Windows\SYSVOL
  register: domain_install

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **reboot\_required**  boolean  | always | True if changes were made that require a reboot.  **Sample:** True |

   
  
 ### Authors

 * Matt Davis (@nitzmahone)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_domain_module.html>

ansible.windows.win\_domain\_membership – Manage domain/workgroup membership for a Windows host
===============================================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_domain_membership`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Manages domain membership or workgroup membership for a Windows host. Also supports hostname changes.
* This module may require subsequent use of the [ansible.windows.win\_reboot](win_reboot_module#ansible-collections-ansible-windows-win-reboot-module) action if changes are made.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dns\_domain\_name**  string  |  | When `state` is `domain`, the DNS name of the domain to which the targeted Windows host should be joined. |
| **domain\_admin\_password**  string  |  | Password for the specified `domain_admin_user`. |
| **domain\_admin\_user**  string / required  |  | Username of a domain admin for the target domain (required to join or leave the domain). |
| **domain\_ou\_path**  string  |  | The desired OU path for adding the computer object. This is only used when adding the target host to a domain, if it is already a member then it is ignored. |
| **hostname**  string  |  | The desired hostname for the Windows host. |
| **state**  string  | **Choices:*** domain
* workgroup
 | Whether the target host should be a member of a domain or workgroup. |
| **workgroup\_name**  string  |  | When `state` is `workgroup`, the name of the workgroup that the Windows host should be in. |

   
 See Also
--------

  See also

  [ansible.windows.win\_domain](win_domain_module#ansible-collections-ansible-windows-win-domain-module)

The official documentation on the **ansible.windows.win\_domain** module.

  [ansible.windows.win\_domain\_controller](win_domain_controller_module#ansible-collections-ansible-windows-win-domain-controller-module)

The official documentation on the **ansible.windows.win\_domain\_controller** module.

  [community.windows.win\_domain\_computer](../../community/windows/win_domain_computer_module#ansible-collections-community-windows-win-domain-computer-module)

The official documentation on the **community.windows.win\_domain\_computer** module.

  [community.windows.win\_domain\_group](../../community/windows/win_domain_group_module#ansible-collections-community-windows-win-domain-group-module)

The official documentation on the **community.windows.win\_domain\_group** module.

  [community.windows.win\_domain\_user](../../community/windows/win_domain_user_module#ansible-collections-community-windows-win-domain-user-module)

The official documentation on the **community.windows.win\_domain\_user** module.

  [ansible.windows.win\_group](win_group_module#ansible-collections-ansible-windows-win-group-module)

The official documentation on the **ansible.windows.win\_group** module.

  [ansible.windows.win\_group\_membership](win_group_membership_module#ansible-collections-ansible-windows-win-group-membership-module)

The official documentation on the **ansible.windows.win\_group\_membership** module.

  [ansible.windows.win\_user](win_user_module#ansible-collections-ansible-windows-win-user-module)

The official documentation on the **ansible.windows.win\_user** module.

    Examples
--------

 
```
# host should be a member of domain ansible.vagrant; module will ensure the hostname is mydomainclient
# and will use the passed credentials to join domain if necessary.
# Ansible connection should use local credentials if possible.
# If a reboot is required, the second task will trigger one and wait until the host is available.
- hosts: winclient
  gather_facts: no
  tasks:
  - ansible.windows.win_domain_membership:
      dns_domain_name: ansible.vagrant
      hostname: mydomainclient
      domain_admin_user: testguy@ansible.vagrant
      domain_admin_password: password123!
      domain_ou_path: "OU=Windows,OU=Servers,DC=ansible,DC=vagrant"
      state: domain
    register: domain_state

  - ansible.windows.win_reboot:
    when: domain_state.reboot_required



# Host should be in workgroup mywg- module will use the passed credentials to clean-unjoin domain if possible.
# Ansible connection should use local credentials if possible.
# The domain admin credentials can be sourced from a vault-encrypted variable
- hosts: winclient
  gather_facts: no
  tasks:
  - ansible.windows.win_domain_membership:
      workgroup_name: mywg
      domain_admin_user: '{{ win_domain_admin_user }}'
      domain_admin_password: '{{ win_domain_admin_password }}'
      state: workgroup

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **reboot\_required**  boolean  | always | True if changes were made that require a reboot.  **Sample:** True |

   
  
 ### Authors

 * Matt Davis (@nitzmahone)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_domain_membership_module.html>

ansible.windows.win\_dsc – Invokes a PowerShell DSC configuration
=================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_dsc`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Configures a resource using PowerShell DSC.
* Requires PowerShell version 5.0 or newer.
* Most of the options for this module are dynamic and will vary depending on the DSC Resource specified in *resource\_name*.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **free\_form**  string / required  |  | The [ansible.windows.win\_dsc](win_dsc_module) module takes in multiple free form options based on the DSC resource being invoked by *resource\_name*. There is no option actually named `free_form` so see the examples. This module will try and convert the option to the correct type required by the DSC resource and throw a warning if it fails. If the type of the DSC resource option is a `CimInstance` or `CimInstance[]`, this means the value should be a dictionary or list of dictionaries based on the values required by that option. If the type of the DSC resource option is a `PSCredential` then there needs to be 2 options set in the Ansible task definition suffixed with `_username` and `_password`. If the type of the DSC resource option is an array, then a list should be provided but a comma separated string also work. Use a list where possible as no escaping is required and it works with more complex types list `CimInstance[]`. If the type of the DSC resource option is a `DateTime`, you should use a string in the form of an ISO 8901 string to ensure the exact date is used. |
| **module\_version**  string  | **Default:**"latest" | Can be used to configure the exact version of the DSC resource to be invoked. Useful if the target node has multiple versions installed of the module containing the DSC resource. If not specified, the module will follow standard PowerShell convention and use the highest version available. |
| **resource\_name**  string / required  |  | The name of the DSC Resource to use. Must be accessible to PowerShell using any of the default paths. |

   
 Notes
-----

  Note

 * By default there are a few builtin resources that come with PowerShell 5.0, See <https://docs.microsoft.com/en-us/powershell/scripting/dsc/resources/resources> for more information on these resources.
* Custom DSC resources can be installed with [community.windows.win\_psmodule](../../community/windows/win_psmodule_module#ansible-collections-community-windows-win-psmodule-module) using the *name* option.
* The DSC engine run’s each task as the SYSTEM account, any resources that need to be accessed with a different account need to have `PsDscRunAsCredential` set.
* To see the valid options for a DSC resource, run the module with `-vvv` to show the possible module invocation. Default values are not shown in this output but are applied within the DSC engine.
* The DSC engine requires the HTTP WSMan listener to be online and its port configured as the default listener for HTTP. This is set up by default but if a custom HTTP port is used or only a HTTPS listener is present then the module will fail. See the examples for a way to check this out in PowerShell.
* The Local Configuration Manager `LCM` on the targeted host in question should be disabled to avoid any conflicts with resources being applied by this module. See <https://devblogs.microsoft.com/powershell/invoking-powershell-dsc-resources-directly/> for more information on hwo to disable `LCM`.

  Examples
--------

 
```
- name: Verify the WSMan HTTP listener is active and configured correctly
  ansible.windows.win_shell: |
    $port = (Get-Item -LiteralPath WSMan:\localhost\Client\DefaultPorts\HTTP).Value
    $onlinePorts = @(Get-ChildItem -LiteralPath WSMan:\localhost\Listener |
        Where-Object { 'Transport=HTTP' -in $_.Keys } |
        Get-ChildItem |
        Where-Object Name -eq Port |
        Select-Object -ExpandProperty Value)

    if ($port -notin $onlinePorts) {
        "The default client port $port is not set up as a WSMan HTTP listener, win_dsc will not work."
    }

- name: Extract zip file
  ansible.windows.win_dsc:
    resource_name: Archive
    Ensure: Present
    Path: C:\Temp\zipfile.zip
    Destination: C:\Temp\Temp2

- name: Install a Windows feature with the WindowsFeature resource
  ansible.windows.win_dsc:
    resource_name: WindowsFeature
    Name: telnet-client

- name: Edit HKCU reg key under specific user
  ansible.windows.win_dsc:
    resource_name: Registry
    Ensure: Present
    Key: HKEY_CURRENT_USER\ExampleKey
    ValueName: TestValue
    ValueData: TestData
    PsDscRunAsCredential_username: '{{ansible_user}}'
    PsDscRunAsCredential_password: '{{ansible_password}}'
  no_log: true

- name: Create file with multiple attributes
  ansible.windows.win_dsc:
    resource_name: File
    DestinationPath: C:\ansible\dsc
    Attributes: # can also be a comma separated string, e.g. 'Hidden, System'
    - Hidden
    - System
    Ensure: Present
    Type: Directory

- name: Call DSC resource with DateTime option
  ansible.windows.win_dsc:
    resource_name: DateTimeResource
    DateTimeOption: '2019-02-22T13:57:31.2311892+00:00'

# more complex example using custom DSC resource and dict values
- name: Setup the xWebAdministration module
  ansible.windows.win_psmodule:
    name: xWebAdministration
    state: present

- name: Create IIS Website with Binding and Authentication options
  ansible.windows.win_dsc:
    resource_name: xWebsite
    Ensure: Present
    Name: DSC Website
    State: Started
    PhysicalPath: C:\inetpub\wwwroot
    BindingInfo: # Example of a CimInstance[] DSC parameter (list of dicts)
    - Protocol: https
      Port: 1234
      CertificateStoreName: MY
      CertificateThumbprint: C676A89018C4D5902353545343634F35E6B3A659
      HostName: DSCTest
      IPAddress: '*'
      SSLFlags: '1'
    - Protocol: http
      Port: 4321
      IPAddress: '*'
    AuthenticationInfo: # Example of a CimInstance DSC parameter (dict)
      Anonymous: no
      Basic: true
      Digest: false
      Windows: yes

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **module\_version**  string  | always | The version of the dsc resource/module used.  **Sample:** 1.0.1 |
| **reboot\_required**  boolean  | always | Flag returned from the DSC engine indicating whether or not the machine requires a reboot for the invoked changes to take effect.  **Sample:** True |
| **verbose\_set**  list / elements=string  | Ansible verbosity is -vvv or greater and a change occurred | The verbose output as a list from executing the DSC Set method.  **Sample:** ["Perform operation 'Invoke CimMethod' with the following parameters, ", '[SERVER]: LCM: [Start Set ] [[File]DirectResourceAccess]', "Operation 'Invoke CimMethod' complete."] |
| **verbose\_test**  list / elements=string  | Ansible verbosity is -vvv or greater | The verbose output as a list from executing the DSC test method.  **Sample:** ["Perform operation 'Invoke CimMethod' with the following parameters, ", '[SERVER]: LCM: [Start Test ] [[File]DirectResourceAccess]', "Operation 'Invoke CimMethod' complete."] |

   
  
 ### Authors

 * Trond Hindenes (@trondhindenes)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_dsc_module.html>

ansible.windows.win\_feature – Installs and uninstalls Windows Features on Windows Server
=========================================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_feature`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Installs or uninstalls Windows Roles or Features on Windows Server.
* This module uses the Add/Remove-WindowsFeature Cmdlets on Windows 2008 R2 and Install/Uninstall-WindowsFeature Cmdlets on Windows 2012, which are not available on client os machines.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **include\_management\_tools**  boolean  | **Choices:*** **no** ←
* yes
 | Adds the corresponding management tools to the specified feature. Not supported in Windows 2008 R2 and will be ignored. |
| **include\_sub\_features**  boolean  | **Choices:*** **no** ←
* yes
 | Adds all subfeatures of the specified feature. |
| **name**  list / elements=string / required  |  | Names of roles or features to install as a single feature or a comma-separated list of features. To list all available features use the PowerShell command `Get-WindowsFeature`. |
| **source**  string  |  | Specify a source to install the feature from. Not supported in Windows 2008 R2 and will be ignored. Can either be `{driveletter}:\sources\sxs` or `\\{IP}\share\sources\sxs`. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | State of the features or roles on the system. |

   
 See Also
--------

  See also

  [chocolatey.chocolatey.win\_chocolatey](../../chocolatey/chocolatey/win_chocolatey_module#ansible-collections-chocolatey-chocolatey-win-chocolatey-module)

The official documentation on the **chocolatey.chocolatey.win\_chocolatey** module.

  [ansible.windows.win\_package](win_package_module#ansible-collections-ansible-windows-win-package-module)

The official documentation on the **ansible.windows.win\_package** module.

    Examples
--------

 
```
- name: Install IIS (Web-Server only)
  ansible.windows.win_feature:
    name: Web-Server
    state: present

- name: Install IIS (Web-Server and Web-Common-Http)
  ansible.windows.win_feature:
    name:
    - Web-Server
    - Web-Common-Http
    state: present

- name: Install NET-Framework-Core from file
  ansible.windows.win_feature:
    name: NET-Framework-Core
    source: C:\Temp\iso\sources\sxs
    state: present

- name: Install IIS Web-Server with sub features and management tools
  ansible.windows.win_feature:
    name: Web-Server
    state: present
    include_sub_features: yes
    include_management_tools: yes
  register: win_feature

- name: Reboot if installing Web-Server feature requires it
  ansible.windows.win_reboot:
  when: win_feature.reboot_required

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **exitcode**  string  | always | The stringified exit code from the feature installation/removal command.  **Sample:** Success |
| **feature\_result**  complex  | success | List of features that were installed or removed.  |
|  | **display\_name**  string  | always | Feature display name.  **Sample:** Telnet Client |
|  | **id**  integer  | always | A list of KB article IDs that apply to the update.  **Sample:** 44 |
|  | **message**  list / elements=string  | always | Any messages returned from the feature subsystem that occurred during installation or removal of this feature.  |
|  | **reboot\_required**  boolean  | always | True when the target server requires a reboot as a result of installing or removing this feature.  **Sample:** True |
|  | **restart\_needed**  boolean  | always | DEPRECATED in Ansible 2.4 (refer to `reboot_required` instead). True when the target server requires a reboot as a result of installing or removing this feature.  **Sample:** True |
|  | **skip\_reason**  string  | always | The reason a feature installation or removal was skipped.  **Sample:** NotSkipped |
|  | **success**  boolean  | always | If the feature installation or removal was successful.  **Sample:** True |
| **reboot\_required**  boolean  | success | True when the target server requires a reboot to complete updates (no further updates can be installed until after a reboot).  **Sample:** True |

   
  
 ### Authors

 * Paul Durivage (@angstwad)
* Trond Hindenes (@trondhindenes)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_feature_module.html>

ansible.windows.win\_command – Executes a command on a remote Windows node
==========================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_command`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * The `win_command` module takes the command name followed by a list of space-delimited arguments.
* The given command will be executed on all selected nodes. It will not be processed through the shell, so variables like `$env:HOME` and operations like `"<"`, `">"`, `"|"`, and `";"` will not work (use the [ansible.windows.win\_shell](win_shell_module#ansible-collections-ansible-windows-win-shell-module) module if you need these features).
* For non-Windows targets, use the [ansible.builtin.command](../builtin/command_module#ansible-collections-ansible-builtin-command-module) module instead.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **chdir**  path  |  | Set the specified path as the current working directory before executing a command. |
| **creates**  path  |  | A path or path filter pattern; when the referenced path exists on the target host, the task will be skipped. |
| **free\_form**  string / required  |  | The `win_command` module takes a free form command to run. There is no parameter actually named 'free form'. See the examples! |
| **output\_encoding\_override**  string  |  | This option overrides the encoding of stdout/stderr output. You can use this option when you need to run a command which ignore the console's codepage. You should only need to use this option in very rare circumstances. This value can be any valid encoding `Name` based on the output of `[System.Text.Encoding]::GetEncodings(`). See <https://docs.microsoft.com/dotnet/api/system.text.encoding.getencodings>. |
| **removes**  path  |  | A path or path filter pattern; when the referenced path **does not** exist on the target host, the task will be skipped. |
| **stdin**  string  |  | Set the stdin of the command directly to the specified value. |

   
 Notes
-----

  Note

 * If you want to run a command through a shell (say you are using `<`, `>`, `|`, etc), you actually want the [ansible.windows.win\_shell](win_shell_module#ansible-collections-ansible-windows-win-shell-module) module instead. The [ansible.windows.win\_command](#ansible-collections-ansible-windows-win-command-module) module is much more secure as it’s not affected by the user’s environment.
* `creates`, `removes`, and `chdir` can be specified after the command. For instance, if you only want to run a command if a certain file does not exist, use this.

  See Also
--------

  See also

  [ansible.builtin.command](../builtin/command_module#ansible-collections-ansible-builtin-command-module)

The official documentation on the **ansible.builtin.command** module.

  [community.windows.psexec](../../community/windows/psexec_module#ansible-collections-community-windows-psexec-module)

The official documentation on the **community.windows.psexec** module.

  [ansible.builtin.raw](../builtin/raw_module#ansible-collections-ansible-builtin-raw-module)

The official documentation on the **ansible.builtin.raw** module.

  [community.windows.win\_psexec](../../community/windows/win_psexec_module#ansible-collections-community-windows-win-psexec-module)

The official documentation on the **community.windows.win\_psexec** module.

  [ansible.windows.win\_shell](win_shell_module#ansible-collections-ansible-windows-win-shell-module)

The official documentation on the **ansible.windows.win\_shell** module.

    Examples
--------

 
```
- name: Save the result of 'whoami' in 'whoami_out'
  ansible.windows.win_command: whoami
  register: whoami_out

- name: Run command that only runs if folder exists and runs from a specific folder
  ansible.windows.win_command: wbadmin -backupTarget:C:\backup\
  args:
    chdir: C:\somedir\
    creates: C:\backup\

- name: Run an executable and send data to the stdin for the executable
  ansible.windows.win_command: powershell.exe -
  args:
    stdin: Write-Host test

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **cmd**  string  | always | The command executed by the task  **Sample:** rabbitmqctl join\_cluster rabbit@main |
| **delta**  string  | always | The command execution delta time  **Sample:** 0:00:00.325771 |
| **end**  string  | always | The command execution end time  **Sample:** 2016-02-25 09:18:26.755339 |
| **msg**  boolean  | always | changed  **Sample:** True |
| **rc**  integer  | always | The command return code (0 means success)  |
| **start**  string  | always | The command execution start time  **Sample:** 2016-02-25 09:18:26.429568 |
| **stderr**  string  | always | The command standard error  **Sample:** ls: cannot access foo: No such file or directory |
| **stdout**  string  | always | The command standard output  **Sample:** Clustering node rabbit@slave1 with rabbit@main ... |
| **stdout\_lines**  list / elements=string  | always | The command standard output split in lines  **Sample:** ["u'Clustering node rabbit@slave1 with rabbit@main ...'"] |

   
  
 ### Authors

 * Matt Davis (@nitzmahone)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_command_module.html>

ansible.windows.win\_domain\_controller – Manage domain controller/member server state for a Windows host
=========================================================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_domain_controller`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Ensure that a Windows Server 2012+ host is configured as a domain controller or demoted to member server.
* This module may require subsequent use of the [ansible.windows.win\_reboot](win_reboot_module#ansible-collections-ansible-windows-win-reboot-module) action if changes are made.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **database\_path**  path  |  | The path to a directory on a fixed disk of the Windows host where the domain database will be created.. If not set then the default path is `%SYSTEMROOT%\NTDS`. |
| **dns\_domain\_name**  string  |  | When `state` is `domain_controller`, the DNS name of the domain for which the targeted Windows host should be a DC. |
| **domain\_admin\_password**  string / required  |  | Password for the specified `domain_admin_user`. |
| **domain\_admin\_user**  string / required  |  | Username of a domain admin for the target domain (necessary to promote or demote a domain controller). |
| **domain\_log\_path**  path  |  | Specified the fully qualified, non-UNC path to a directory on a fixed disk of the local computer that will contain the domain log files. |
| **install\_dns**  boolean  | **Choices:*** no
* yes
 | Whether to install the DNS service when creating the domain controller. If not specified then the `-InstallDns` option is not supplied to `Install-ADDSDomainController` command, see <https://docs.microsoft.com/en-us/powershell/module/addsdeployment/install-addsdomaincontroller>. |
| **install\_media\_path**  path  |  | The path to a directory on a fixed disk of the Windows host where the Install From Media `IFC` data will be used. See the [Install using IFM guide](https://social.technet.microsoft.com/wiki/contents/articles/8630.active-directory-step-by-step-guide-to-install-an-additional-domain-controller-using-ifm.aspx) for more information. |
| **local\_admin\_password**  string  |  | Password to be assigned to the local `Administrator` user (required when `state` is `member_server`). |
| **log\_path**  string  |  | The path to log any debug information when running the module. This option is deprecated and should not be used, it will be removed on the major release after `2022-07-01`. This does not relate to the `-LogPath` paramter of the install controller cmdlet. |
| **read\_only**  boolean  | **Choices:*** **no** ←
* yes
 | Whether to install the domain controller as a read only replica for an existing domain. |
| **safe\_mode\_password**  string  |  | Safe mode password for the domain controller (required when `state` is `domain_controller`). |
| **site\_name**  string  |  | Specifies the name of an existing site where you can place the new domain controller. This option is required when *read\_only* is `yes`. |
| **state**  string / required  | **Choices:*** domain\_controller
* member\_server
 | Whether the target host should be a domain controller or a member server. |
| **sysvol\_path**  path  |  | The path to a directory on a fixed disk of the Windows host where the Sysvol folder will be created. If not set then the default path is `%SYSTEMROOT%\SYSVOL`. |

   
 See Also
--------

  See also

  [ansible.windows.win\_domain](win_domain_module#ansible-collections-ansible-windows-win-domain-module)

The official documentation on the **ansible.windows.win\_domain** module.

  ansible.windows.win\_domain\_computer

The official documentation on the **ansible.windows.win\_domain\_computer** module.

  [community.windows.win\_domain\_group](../../community/windows/win_domain_group_module#ansible-collections-community-windows-win-domain-group-module)

The official documentation on the **community.windows.win\_domain\_group** module.

  [ansible.windows.win\_domain\_membership](win_domain_membership_module#ansible-collections-ansible-windows-win-domain-membership-module)

The official documentation on the **ansible.windows.win\_domain\_membership** module.

  [community.windows.win\_domain\_user](../../community/windows/win_domain_user_module#ansible-collections-community-windows-win-domain-user-module)

The official documentation on the **community.windows.win\_domain\_user** module.

    Examples
--------

 
```
- name: Ensure a server is a domain controller
  ansible.windows.win_domain_controller:
    dns_domain_name: ansible.vagrant
    domain_admin_user: testguy@ansible.vagrant
    domain_admin_password: password123!
    safe_mode_password: password123!
    state: domain_controller

# note that without an action wrapper, in the case where a DC is demoted,
# the task will fail with a 401 Unauthorized, because the domain credential
# becomes invalid to fetch the final output over WinRM. This requires win_async
# with credential switching (or other clever credential-switching
# mechanism to get the output and trigger the required reboot)
- name: Ensure a server is not a domain controller
  ansible.windows.win_domain_controller:
    domain_admin_user: testguy@ansible.vagrant
    domain_admin_password: password123!
    local_admin_password: password123!
    state: member_server

- name: Promote server as a read only domain controller
  ansible.windows.win_domain_controller:
    dns_domain_name: ansible.vagrant
    domain_admin_user: testguy@ansible.vagrant
    domain_admin_password: password123!
    safe_mode_password: password123!
    state: domain_controller
    read_only: yes
    site_name: London

- name: Promote server with custom paths
  ansible.windows.win_domain_controller:
    dns_domain_name: ansible.vagrant
    domain_admin_user: testguy@ansible.vagrant
    domain_admin_password: password123!
    safe_mode_password: password123!
    state: domain_controller
    sysvol_path: D:\SYSVOL
    database_path: D:\NTDS
    domain_log_path: D:\NTDS
  register: dc_promotion

- name: Reboot after promotion
  ansible.windows.win_reboot:
  when: dc_promotion.reboot_required

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **reboot\_required**  boolean  | always | True if changes were made that require a reboot.  **Sample:** True |

   
  
 ### Authors

 * Matt Davis (@nitzmahone)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_domain_controller_module.html>

ansible.windows.win\_environment – Modify environment variables on windows hosts
================================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_environment`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Uses .net Environment to set or remove environment variables and can set at User, Machine or Process level.
* User level environment variables will be set, but not available until the user has logged off and on again.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **level**  string / required  | **Choices:*** machine
* process
* user
 | The level at which to set the environment variable. Use `machine` to set for all users. Use `user` to set for the current user that ansible is connected as. Use `process` to set for the current process. Probably not that useful. |
| **name**  string  |  | The name of the environment variable. Required when *state=absent*. |
| **state**  string  | **Choices:*** absent
* present
 | Set to `present` to ensure environment variable is set. Set to `absent` to ensure it is removed. When using *variables*, do not set this option. |
| **value**  string  |  | The value to store in the environment variable. Must be set when *state=present* and cannot be an empty string. Should be omitted for *state=absent* and *variables*. |
| **variables**  dictionary   added in 1.3.0 of ansible.windows  |  | A dictionary where multiple environment variables can be defined at once. Not valid when *state* is set. Variables with a value will be set (`present`) and variables with an empty value will be unset (`absent`). 
*level* applies to all vars defined this way. |

   
 Notes
-----

  Note

 * This module is best-suited for setting the entire value of an environment variable. For safe element-based management of path-like environment vars, use the [ansible.windows.win\_path](win_path_module#ansible-collections-ansible-windows-win-path-module) module.
* This module does not broadcast change events. This means that the minority of windows applications which can have their environment changed without restarting will not be notified and therefore will need restarting to pick up new environment settings. User level environment variables will require the user to log out and in again before they become available.
* In the return, `before_value` and `value` will be set to the last values when using *variables*. It’s best to use `values` in that case if you need to find a specific variable’s before and after values.

  See Also
--------

  See also

  [ansible.windows.win\_path](win_path_module#ansible-collections-ansible-windows-win-path-module)

The official documentation on the **ansible.windows.win\_path** module.

    Examples
--------

 
```
- name: Set an environment variable for all users
  ansible.windows.win_environment:
    state: present
    name: TestVariable
    value: Test value
    level: machine

- name: Remove an environment variable for the current user
  ansible.windows.win_environment:
    state: absent
    name: TestVariable
    level: user

- name: Set several variables at once
  ansible.windows.win_environment:
    level: machine
    variables:
      TestVariable: Test value
      CUSTOM_APP_VAR: 'Very important value'
      ANOTHER_VAR: '{{ my_ansible_var }}'

- name: Set and remove multiple variables at once
  ansible.windows.win_environment:
    level: user
    variables:
      TestVariable: Test value
      CUSTOM_APP_VAR: 'Very important value'
      ANOTHER_VAR: '{{ my_ansible_var }}'
      UNWANTED_VAR: ''  # < this will be removed

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **before\_value**  string  | always | the value of the environment key before a change, this is null if it didn't exist  **Sample:** C:\Windows\System32 |
| **value**  string  | always | the value the environment key has been set to, this is null if removed  **Sample:** C:\Program Files\jdk1.8 |
| **values**  dictionary  added in 1.3.0 of ansible.windows | always | dictionary of before and after values; each key is a variable name, each value is another dict with `before`, `after`, and `changed` keys  |

   
  
 ### Authors

 * Jon Hawkesworth (@jhawkesworth)
* Brian Scholer (@briantist)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_environment_module.html>

ansible.windows.win\_group – Add and remove local groups
========================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_group`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Add and remove local groups.
* For non-Windows targets, please use the [ansible.builtin.group](../builtin/group_module#ansible-collections-ansible-builtin-group-module) module instead.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **description**  string  |  | Description of the group. |
| **name**  string / required  |  | Name of the group. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | Create or remove the group. |

   
 See Also
--------

  See also

  [ansible.builtin.group](../builtin/group_module#ansible-collections-ansible-builtin-group-module)

The official documentation on the **ansible.builtin.group** module.

  [community.windows.win\_domain\_group](../../community/windows/win_domain_group_module#ansible-collections-community-windows-win-domain-group-module)

The official documentation on the **community.windows.win\_domain\_group** module.

  [ansible.windows.win\_group\_membership](win_group_membership_module#ansible-collections-ansible-windows-win-group-membership-module)

The official documentation on the **ansible.windows.win\_group\_membership** module.

    Examples
--------

 
```
- name: Create a new group
  ansible.windows.win_group:
    name: deploy
    description: Deploy Group
    state: present

- name: Remove a group
  ansible.windows.win_group:
    name: deploy
    state: absent

```
 ### Authors

 * Chris Hoffman (@chrishoffman)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_group_module.html>

ansible.windows.win\_hostname – Manages local Windows computer name
===================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_hostname`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Manages local Windows computer name.
* A reboot is required for the computer name to take effect.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name**  string / required  |  | The hostname to set for the computer. |

   
 See Also
--------

  See also

  [ansible.windows.win\_dns\_client](win_dns_client_module#ansible-collections-ansible-windows-win-dns-client-module)

The official documentation on the **ansible.windows.win\_dns\_client** module.

    Examples
--------

 
```
- name: Change the hostname to sample-hostname
  ansible.windows.win_hostname:
    name: sample-hostname
  register: res

- name: Reboot
  ansible.windows.win_reboot:
  when: res.reboot_required

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **old\_name**  string  | always | The original hostname that was set before it was changed.  **Sample:** old\_hostname |
| **reboot\_required**  boolean  | always | Whether a reboot is required to complete the hostname change.  **Sample:** True |

   
  
 ### Authors

 * Ripon Banik (@riponbanik)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_hostname_module.html>

ansible.windows.win\_file – Creates, touches or removes files or directories
============================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_file`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Creates (empty) files, updates file modification stamps of existing files, and can create or remove directories.
* Unlike [ansible.builtin.file](../builtin/file_module#ansible-collections-ansible-builtin-file-module), does not modify ownership, permissions or manipulate links.
* For non-Windows targets, use the [ansible.builtin.file](../builtin/file_module#ansible-collections-ansible-builtin-file-module) module instead.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **path**  path / required  |  | Path to the file being managed. 
aliases: dest, name |
| **state**  string  | **Choices:*** absent
* directory
* file
* touch
 | If `directory`, all immediate subdirectories will be created if they do not exist. If `file`, the file will NOT be created if it does not exist, see the [ansible.windows.win\_copy](win_copy_module) or [ansible.windows.win\_template](win_template_module) module if you want that behavior. If `absent`, directories will be recursively deleted, and files will be removed. If `touch`, an empty file will be created if the `path` does not exist, while an existing file or directory will receive updated file access and modification times (similar to the way `touch` works from the command line). |

   
 See Also
--------

  See also

  [ansible.builtin.file](../builtin/file_module#ansible-collections-ansible-builtin-file-module)

The official documentation on the **ansible.builtin.file** module.

  [ansible.windows.win\_acl](win_acl_module#ansible-collections-ansible-windows-win-acl-module)

The official documentation on the **ansible.windows.win\_acl** module.

  [ansible.windows.win\_acl\_inheritance](win_acl_inheritance_module#ansible-collections-ansible-windows-win-acl-inheritance-module)

The official documentation on the **ansible.windows.win\_acl\_inheritance** module.

  [ansible.windows.win\_owner](win_owner_module#ansible-collections-ansible-windows-win-owner-module)

The official documentation on the **ansible.windows.win\_owner** module.

  [ansible.windows.win\_stat](win_stat_module#ansible-collections-ansible-windows-win-stat-module)

The official documentation on the **ansible.windows.win\_stat** module.

    Examples
--------

 
```
- name: Touch a file (creates if not present, updates modification time if present)
  ansible.windows.win_file:
    path: C:\Temp\foo.conf
    state: touch

- name: Remove a file, if present
  ansible.windows.win_file:
    path: C:\Temp\foo.conf
    state: absent

- name: Create directory structure
  ansible.windows.win_file:
    path: C:\Temp\folder\subfolder
    state: directory

- name: Remove directory structure
  ansible.windows.win_file:
    path: C:\Temp
    state: absent

```
 ### Authors

 * Jon Hawkesworth (@jhawkesworth)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_file_module.html>

ansible.windows.win\_find – Return a list of files based on specific criteria
=============================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_find`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Return a list of files based on specified criteria.
* Multiple criteria are AND’d together.
* For non-Windows targets, use the [ansible.builtin.find](../builtin/find_module#ansible-collections-ansible-builtin-find-module) module instead.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **age**  string  |  | Select files or folders whose age is equal to or greater than the specified time. Use a negative age to find files equal to or less than the specified time. You can choose seconds, minutes, hours, days or weeks by specifying the first letter of an of those words (e.g., "2s", "10d", 1w"). |
| **age\_stamp**  string  | **Choices:*** atime
* ctime
* **mtime** ←
 | Choose the file property against which we compare `age`. The default attribute we compare with is the last modification time. |
| **checksum\_algorithm**  string  | **Choices:*** md5
* **sha1** ←
* sha256
* sha384
* sha512
 | Algorithm to determine the checksum of a file. Will throw an error if the host is unable to use specified algorithm. |
| **file\_type**  string  | **Choices:*** directory
* **file** ←
 | Type of file to search for. |
| **follow**  boolean  | **Choices:*** **no** ←
* yes
 | Set this to `yes` to follow symlinks in the path. This needs to be used in conjunction with `recurse`. |
| **get\_checksum**  boolean  | **Choices:*** no
* **yes** ←
 | Whether to return a checksum of the file in the return info (default sha1), use `checksum_algorithm` to change from the default. |
| **hidden**  boolean  | **Choices:*** **no** ←
* yes
 | Set this to include hidden files or folders. |
| **paths**  list / elements=string / required  |  | List of paths of directories to search for files or folders in. This can be supplied as a single path or a list of paths. |
| **patterns**  list / elements=string  |  | One or more (powershell or regex) patterns to compare filenames with. The type of pattern matching is controlled by `use_regex` option. The patterns restrict the list of files or folders to be returned based on the filenames. For a file to be matched it only has to match with one pattern in a list provided. 
aliases: regex, regexp |
| **recurse**  boolean  | **Choices:*** **no** ←
* yes
 | Will recursively descend into the directory looking for files or folders. |
| **size**  string  |  | Select files or folders whose size is equal to or greater than the specified size. Use a negative value to find files equal to or less than the specified size. You can specify the size with a suffix of the byte type i.e. kilo = k, mega = m... Size is not evaluated for symbolic links. |
| **use\_regex**  boolean  | **Choices:*** **no** ←
* yes
 | Will set patterns to run as a regex check if set to `yes`. |

   
 Examples
--------

 
```
- name: Find files in path
  ansible.windows.win_find:
    paths: D:\Temp

- name: Find hidden files in path
  ansible.windows.win_find:
    paths: D:\Temp
    hidden: yes

- name: Find files in multiple paths
  ansible.windows.win_find:
    paths:
    - C:\Temp
    - D:\Temp

- name: Find files in directory while searching recursively
  ansible.windows.win_find:
    paths: D:\Temp
    recurse: yes

- name: Find files in directory while following symlinks
  ansible.windows.win_find:
    paths: D:\Temp
    recurse: yes
    follow: yes

- name: Find files with .log and .out extension using powershell wildcards
  ansible.windows.win_find:
    paths: D:\Temp
    patterns: [ '*.log', '*.out' ]

- name: Find files in path based on regex pattern
  ansible.windows.win_find:
    paths: D:\Temp
    patterns: out_\d{8}-\d{6}.log

- name: Find files older than 1 day
  ansible.windows.win_find:
    paths: D:\Temp
    age: 86400

- name: Find files older than 1 day based on create time
  ansible.windows.win_find:
    paths: D:\Temp
    age: 86400
    age_stamp: ctime

- name: Find files older than 1 day with unit syntax
  ansible.windows.win_find:
    paths: D:\Temp
    age: 1d

- name: Find files newer than 1 hour
  ansible.windows.win_find:
    paths: D:\Temp
    age: -3600

- name: Find files newer than 1 hour with unit syntax
  ansible.windows.win_find:
    paths: D:\Temp
    age: -1h

- name: Find files larger than 1MB
  ansible.windows.win_find:
    paths: D:\Temp
    size: 1048576

- name: Find files larger than 1GB with unit syntax
  ansible.windows.win_find:
    paths: D:\Temp
    size: 1g

- name: Find files smaller than 1MB
  ansible.windows.win_find:
    paths: D:\Temp
    size: -1048576

- name: Find files smaller than 1GB with unit syntax
  ansible.windows.win_find:
    paths: D:\Temp
    size: -1g

- name: Find folders/symlinks in multiple paths
  ansible.windows.win_find:
    paths:
    - C:\Temp
    - D:\Temp
    file_type: directory

- name: Find files and return SHA256 checksum of files found
  ansible.windows.win_find:
    paths: C:\Temp
    get_checksum: yes
    checksum_algorithm: sha256

- name: Find files and do not return the checksum
  ansible.windows.win_find:
    paths: C:\Temp
    get_checksum: no

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **examined**  integer  | always | The number of files/folders that was checked.  **Sample:** 10 |
| **files**  complex  | success | Information on the files/folders that match the criteria returned as a list of dictionary elements for each file matched. The entries are sorted by the path value alphabetically.  |
|  | **attributes**  string  | success, path exists | attributes of the file at path in raw form.  **Sample:** Archive, Hidden |
|  | **checksum**  string  | success, path exists, path is a file, get\_checksum == True | The checksum of a file based on checksum\_algorithm specified.  **Sample:** 09cb79e8fc7453c84a07f644e441fd81623b7f98 |
|  | **creationtime**  float  | success, path exists | The create time of the file represented in seconds since epoch.  **Sample:** 1477984205.15 |
|  | **exists**  boolean  | success, path exists | Whether the file exists, will always be true for [ansible.windows.win\_find](win_find_module).  **Sample:** True |
|  | **extension**  string  | success, path exists, path is a file | The extension of the file at path.  **Sample:** .ps1 |
|  | **filename**  string  | success, path exists | The name of the file.  **Sample:** temp |
|  | **hlnk\_targets**  list / elements=string  | success, path exists | List of other files pointing to the same file (hard links), excludes the current file.  **Sample:** ['C:\\temp\\file.txt', 'C:\\Windows\\update.log'] |
|  | **isarchive**  boolean  | success, path exists | If the path is ready for archiving or not.  **Sample:** True |
|  | **isdir**  boolean  | success, path exists | If the path is a directory or not.  **Sample:** True |
|  | **ishidden**  boolean  | success, path exists | If the path is hidden or not.  **Sample:** True |
|  | **isjunction**  boolean  | success, path exists | If the path is a junction point.  **Sample:** True |
|  | **islnk**  boolean  | success, path exists | If the path is a symbolic link.  **Sample:** True |
|  | **isreadonly**  boolean  | success, path exists | If the path is read only or not.  **Sample:** True |
|  | **isreg**  boolean  | success, path exists | If the path is a regular file or not.  **Sample:** True |
|  | **isshared**  boolean  | success, path exists | If the path is shared or not.  **Sample:** True |
|  | **lastaccesstime**  float  | success, path exists | The last access time of the file represented in seconds since epoch.  **Sample:** 1477984205.15 |
|  | **lastwritetime**  float  | success, path exists | The last modification time of the file represented in seconds since epoch.  **Sample:** 1477984205.15 |
|  | **lnk\_source**  string  | success, path exists, path is a symbolic link or junction point | The target of the symlink normalized for the remote filesystem.  **Sample:** C:\temp |
|  | **lnk\_target**  string  | success, path exists, path is a symbolic link or junction point | The target of the symlink. Note that relative paths remain relative, will return null if not a link.  **Sample:** temp |
|  | **nlink**  integer  | success, path exists | Number of links to the file (hard links)  **Sample:** 1 |
|  | **owner**  string  | success, path exists | The owner of the file.  **Sample:** BUILTIN\Administrators |
|  | **path**  string  | success, path exists | The full absolute path to the file.  **Sample:** BUILTIN\Administrators |
|  | **sharename**  string  | success, path exists, path is a directory and isshared == True | The name of share if folder is shared.  **Sample:** file-share |
|  | **size**  integer  | success, path exists, path is a file | The size in bytes of the file.  **Sample:** 1024 |
| **matched**  integer  | always | The number of files/folders that match the criteria.  **Sample:** 2 |

   
  
 ### Authors

 * Jordan Borean (@jborean93)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_find_module.html>

ansible.windows.win\_get\_url – Downloads file from HTTP, HTTPS, or FTP to node
===============================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_get_url`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Downloads files from HTTP, HTTPS, or FTP to the remote server.
* The remote server *must* have direct access to the remote resource.
* For non-Windows targets, use the [ansible.builtin.get\_url](../builtin/get_url_module#ansible-collections-ansible-builtin-get-url-module) module instead.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **checksum**  string  |  | If a *checksum* is passed to this parameter, the digest of the destination file will be calculated after it is downloaded to ensure its integrity and verify that the transfer completed successfully. This option cannot be set with *checksum\_url*. |
| **checksum\_algorithm**  string  | **Choices:*** md5
* **sha1** ←
* sha256
* sha384
* sha512
 | Specifies the hashing algorithm used when calculating the checksum of the remote and destination file. |
| **checksum\_url**  string  |  | Specifies a URL that contains the checksum values for the resource at *url*. Like `checksum`, this is used to verify the integrity of the remote transfer. This option cannot be set with *checksum*. |
| **client\_cert**  string  |  | The path to the client certificate (.pfx) that is used for X509 authentication. This path can either be the path to the `pfx` on the filesystem or the PowerShell certificate path `Cert:\CurrentUser\My\<thumbprint>`. The WinRM connection must be authenticated with `CredSSP` or `become` is used on the task if the certificate file is not password protected. Other authentication types can set *client\_cert\_password* when the cert is password protected. |
| **client\_cert\_password**  string  |  | The password for *client\_cert* if the cert is password protected. |
| **dest**  path / required  |  | The location to save the file at the URL. Be sure to include a filename and extension as appropriate. |
| **follow\_redirects**  string  | **Choices:*** all
* none
* **safe** ←
 | Whether or the module should follow redirects. 
`all` will follow all redirect. 
`none` will not follow any redirect. 
`safe` will follow only "safe" redirects, where "safe" means that the client is only doing a `GET` or `HEAD` on the URI to which it is being redirected. When following a redirected URL, the `Authorization` header and any credentials set will be dropped and not redirected. |
| **force**  boolean  | **Choices:*** no
* **yes** ←
 | If `yes`, will download the file every time and replace the file if the contents change. If `no`, will only download the file if it does not exist or the remote file has been modified more recently than the local file. This works by sending an http HEAD request to retrieve last modified time of the requested resource, so for this to work, the remote web server must support HEAD requests. |
| **force\_basic\_auth**  boolean  | **Choices:*** **no** ←
* yes
 | By default the authentication header is only sent when a webservice responses to an initial request with a 401 status. Since some basic auth services do not properly send a 401, logins will fail. This option forces the sending of the Basic authentication header upon the original request. |
| **headers**  dictionary  |  | Extra headers to set on the request. This should be a dictionary where the key is the header name and the value is the value for that header. |
| **http\_agent**  string  | **Default:**"ansible-httpget" | Header to identify as, generally appears in web server logs. This is set to the `User-Agent` header on a HTTP request. |
| **maximum\_redirection**  integer  | **Default:**50 | Specify how many times the module will redirect a connection to an alternative URI before the connection fails. If set to `0` or *follow\_redirects* is set to `none`, or `safe` when not doing a `GET` or `HEAD` it prevents all redirection. |
| **proxy\_password**  string  |  | The password for *proxy\_username*. |
| **proxy\_url**  string  |  | An explicit proxy to use for the request. By default, the request will use the IE defined proxy unless *use\_proxy* is set to `no`. |
| **proxy\_use\_default\_credential**  boolean  | **Choices:*** **no** ←
* yes
 | Uses the current user's credentials when authenticating with a proxy host protected with `NTLM`, `Kerberos`, or `Negotiate` authentication. Proxies that use `Basic` auth will still require explicit credentials through the *proxy\_username* and *proxy\_password* options. The module will only have access to the user's credentials if using `become` with a password, you are connecting with SSH using a password, or connecting with WinRM using `CredSSP` or `Kerberos with delegation`. If not using `become` or a different auth method to the ones stated above, there will be no default credentials available and no proxy authentication will occur. |
| **proxy\_username**  string  |  | The username to use for proxy authentication. |
| **url**  string / required  |  | The full URL of a file to download. |
| **url\_method**  string  |  | The HTTP Method of the request. 
aliases: method |
| **url\_password**  string  |  | The password for *url\_username*. The alias *password* is deprecated and will be removed on the major release after `2022-07-01`. 
aliases: password |
| **url\_timeout**  integer  | **Default:**30 | Specifies how long the request can be pending before it times out (in seconds). Set to `0` to specify an infinite timeout. 
aliases: timeout |
| **url\_username**  string  |  | The username to use for authentication. The alias *user* and *username* is deprecated and will be removed on the major release after `2022-07-01`. 
aliases: user, username |
| **use\_default\_credential**  boolean  | **Choices:*** **no** ←
* yes
 | Uses the current user's credentials when authenticating with a server protected with `NTLM`, `Kerberos`, or `Negotiate` authentication. Sites that use `Basic` auth will still require explicit credentials through the *url\_username* and *url\_password* options. The module will only have access to the user's credentials if using `become` with a password, you are connecting with SSH using a password, or connecting with WinRM using `CredSSP` or `Kerberos with delegation`. If not using `become` or a different auth method to the ones stated above, there will be no default credentials available and no authentication will occur. |
| **use\_proxy**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, it will not use the proxy defined in IE for the current user. |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |

   
 Notes
-----

  Note

 * If your URL includes an escaped slash character (%2F) this module will convert it to a real slash. This is a result of the behaviour of the System.Uri class as described in [the documentation](https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/network/schemesettings-element-uri-settings#remarks).

  See Also
--------

  See also

  [ansible.builtin.get\_url](../builtin/get_url_module#ansible-collections-ansible-builtin-get-url-module)

The official documentation on the **ansible.builtin.get\_url** module.

  [ansible.builtin.uri](../builtin/uri_module#ansible-collections-ansible-builtin-uri-module)

The official documentation on the **ansible.builtin.uri** module.

  [ansible.windows.win\_uri](win_uri_module#ansible-collections-ansible-windows-win-uri-module)

The official documentation on the **ansible.windows.win\_uri** module.

  [community.windows.win\_inet\_proxy](../../community/windows/win_inet_proxy_module#ansible-collections-community-windows-win-inet-proxy-module)

The official documentation on the **community.windows.win\_inet\_proxy** module.

    Examples
--------

 
```
- name: Download earthrise.jpg to specified path
  ansible.windows.win_get_url:
    url: http://www.example.com/earthrise.jpg
    dest: C:\Users\RandomUser\earthrise.jpg

- name: Download earthrise.jpg to specified path only if modified
  ansible.windows.win_get_url:
    url: http://www.example.com/earthrise.jpg
    dest: C:\Users\RandomUser\earthrise.jpg
    force: no

- name: Download earthrise.jpg to specified path through a proxy server.
  ansible.windows.win_get_url:
    url: http://www.example.com/earthrise.jpg
    dest: C:\Users\RandomUser\earthrise.jpg
    proxy_url: http://10.0.0.1:8080
    proxy_username: username
    proxy_password: password

- name: Download file from FTP with authentication
  ansible.windows.win_get_url:
    url: ftp://server/file.txt
    dest: '%TEMP%\ftp-file.txt'
    url_username: ftp-user
    url_password: ftp-password

- name: Download src with sha256 checksum url
  ansible.windows.win_get_url:
    url: http://www.example.com/earthrise.jpg
    dest: C:\temp\earthrise.jpg
    checksum_url: http://www.example.com/sha256sum.txt
    checksum_algorithm: sha256
    force: True

- name: Download src with sha256 checksum url
  ansible.windows.win_get_url:
    url: http://www.example.com/earthrise.jpg
    dest: C:\temp\earthrise.jpg
    checksum: a97e6837f60cec6da4491bab387296bbcd72bdba
    checksum_algorithm: sha1
    force: True

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **checksum\_dest**  string  | success and dest has been downloaded | <algorithm> checksum of the file after the download  **Sample:** 6e642bb8dd5c2e027bf21dd923337cbb4214f827 |
| **checksum\_src**  string  | force=yes or dest did not exist | <algorithm> checksum of the remote resource  **Sample:** 6e642bb8dd5c2e027bf21dd923337cbb4214f827 |
| **dest**  string  | always | destination file/path  **Sample:** C:\Users\RandomUser\earthrise.jpg |
| **elapsed**  float  | always | The elapsed seconds between the start of poll and the end of the module.  **Sample:** 2.1406487 |
| **msg**  string  | always | Error message, or HTTP status message from web-server  **Sample:** OK |
| **size**  integer  | success | size of the dest file  **Sample:** 1220 |
| **status\_code**  integer  | always | HTTP status code  **Sample:** 200 |
| **url**  string  | always | requested url  **Sample:** http://www.example.com/earthrise.jpg |

   
  
 ### Authors

 * Paul Durivage (@angstwad)
* Takeshi Kuramochi (@tksarah)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_get_url_module.html>

ansible.windows.win\_group\_membership – Manage Windows local group membership
==============================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_group_membership`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Allows the addition and removal of local, service and domain users, and domain groups from a local group.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **members**  list / elements=string / required  |  | A list of members to ensure are present/absent from the group. Accepts local users as .\username, and SERVERNAME\username. Accepts domain users and groups as DOMAIN\username and username@DOMAIN. Accepts service users as NT AUTHORITY\username. Accepts all local, domain and service user types as username, favoring domain lookups when in a domain. |
| **name**  string / required  |  | Name of the local group to manage membership on. |
| **state**  string  | **Choices:*** absent
* **present** ←
* pure
 | Desired state of the members in the group. When `state` is `pure`, only the members specified will exist, and all other existing members not specified are removed. |

   
 See Also
--------

  See also

  [community.windows.win\_domain\_group](../../community/windows/win_domain_group_module#ansible-collections-community-windows-win-domain-group-module)

The official documentation on the **community.windows.win\_domain\_group** module.

  [ansible.windows.win\_domain\_membership](win_domain_membership_module#ansible-collections-ansible-windows-win-domain-membership-module)

The official documentation on the **ansible.windows.win\_domain\_membership** module.

  [ansible.windows.win\_group](win_group_module#ansible-collections-ansible-windows-win-group-module)

The official documentation on the **ansible.windows.win\_group** module.

    Examples
--------

 
```
- name: Add a local and domain user to a local group
  ansible.windows.win_group_membership:
    name: Remote Desktop Users
    members:
      - NewLocalAdmin
      - DOMAIN\TestUser
    state: present

- name: Remove a domain group and service user from a local group
  ansible.windows.win_group_membership:
    name: Backup Operators
    members:
      - DOMAIN\TestGroup
      - NT AUTHORITY\SYSTEM
    state: absent

- name: Ensure only a domain user exists in a local group
  ansible.windows.win_group_membership:
    name: Remote Desktop Users
    members:
      - DOMAIN\TestUser
    state: pure

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **added**  list / elements=string  | success and `state` is `present` | A list of members added when `state` is `present` or `pure`; this is empty if no members are added.  **Sample:** ['SERVERNAME\\NewLocalAdmin', 'DOMAIN\\TestUser'] |
| **members**  list / elements=string  | success | A list of all local group members at completion; this is empty if the group contains no members.  **Sample:** ['DOMAIN\\TestUser', 'SERVERNAME\\NewLocalAdmin'] |
| **name**  string  | always | The name of the target local group.  **Sample:** Administrators |
| **removed**  list / elements=string  | success and `state` is `absent` | A list of members removed when `state` is `absent` or `pure`; this is empty if no members are removed.  **Sample:** ['DOMAIN\\TestGroup', 'NT AUTHORITY\\SYSTEM'] |

   
  
 ### Authors

 * Andrew Saraceni (@andrewsaraceni)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_group_membership_module.html>

ansible.windows.win\_optional\_feature – Manage optional Windows features
=========================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_optional_feature`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Install or uninstall optional Windows features on non-Server Windows.
* This module uses the `Enable-WindowsOptionalFeature` and `Disable-WindowsOptionalFeature` cmdlets.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **include\_parent**  boolean  | **Choices:*** **no** ←
* yes
 | Whether to enable the parent feature and the parent's dependencies. |
| **name**  list / elements=string / required  |  | The name(s) of the feature to install. This relates to `FeatureName` in the Powershell cmdlet. To list all available features use the PowerShell command `Get-WindowsOptionalFeature`. |
| **source**  string  |  | Specify a source to install the feature from. Can either be `{driveletter}:\sources\sxs` or `\\{IP}\share\sources\sxs`. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | Whether to ensure the feature is absent or present on the system. |

   
 See Also
--------

  See also

  [chocolatey.chocolatey.win\_chocolatey](../../chocolatey/chocolatey/win_chocolatey_module#ansible-collections-chocolatey-chocolatey-win-chocolatey-module)

The official documentation on the **chocolatey.chocolatey.win\_chocolatey** module.

  [ansible.windows.win\_feature](win_feature_module#ansible-collections-ansible-windows-win-feature-module)

The official documentation on the **ansible.windows.win\_feature** module.

  [ansible.windows.win\_package](win_package_module#ansible-collections-ansible-windows-win-package-module)

The official documentation on the **ansible.windows.win\_package** module.

    Examples
--------

 
```
- name: Install .Net 3.5
  ansible.windows.win_optional_feature:
    name: NetFx3
    state: present

- name: Install .Net 3.5 from source
  ansible.windows.win_optional_feature:
    name: NetFx3
    source: \\share01\win10\sources\sxs
    state: present

- name: Install Microsoft Subsystem for Linux
  ansible.windows.win_optional_feature:
    name: Microsoft-Windows-Subsystem-Linux
    state: present
  register: wsl_status

- name: Reboot if installing Linux Subsytem as feature requires it
  ansible.windows.win_reboot:
  when: wsl_status.reboot_required

- name: Install multiple features in one task
  ansible.windows.win_optional_feature:
    name:
    - NetFx3
    - Microsoft-Windows-Subsystem-Linux
    state: present

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **reboot\_required**  boolean  | success | True when the target server requires a reboot to complete updates  **Sample:** True |

   
  
 ### Authors

 * Carson Anderson (@rcanderson23)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_optional_feature_module.html>

ansible.windows.win\_owner – Set owner
======================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_owner`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Set owner of files or directories.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **path**  path / required  |  | Path to be used for changing owner. |
| **recurse**  boolean  | **Choices:*** **no** ←
* yes
 | Indicates if the owner should be changed recursively. |
| **user**  string / required  |  | Name to be used for changing owner. |

   
 See Also
--------

  See also

  [ansible.windows.win\_acl](win_acl_module#ansible-collections-ansible-windows-win-acl-module)

The official documentation on the **ansible.windows.win\_acl** module.

  [ansible.windows.win\_file](win_file_module#ansible-collections-ansible-windows-win-file-module)

The official documentation on the **ansible.windows.win\_file** module.

  [ansible.windows.win\_stat](win_stat_module#ansible-collections-ansible-windows-win-stat-module)

The official documentation on the **ansible.windows.win\_stat** module.

    Examples
--------

 
```
- name: Change owner of path
  ansible.windows.win_owner:
    path: C:\apache
    user: apache
    recurse: yes

- name: Set the owner of root directory
  ansible.windows.win_owner:
    path: C:\apache
    user: SYSTEM
    recurse: no

```
 ### Authors

 * Hans-Joachim Kliemeck (@h0nIg)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_owner_module.html>

ansible.windows.win\_path – Manage Windows path environment variables
=====================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_path`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)

 Synopsis
--------

 * Allows element-based ordering, addition, and removal of Windows path environment variables.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **elements**  list / elements=string / required  |  | A single path element, or a list of path elements (ie, directories) to add or remove. When multiple elements are included in the list (and `state` is `present`), the elements are guaranteed to appear in the same relative order in the resultant path value. Variable expansions (eg, `%VARNAME%`) are allowed, and are stored unexpanded in the target path element. Any existing path elements not mentioned in `elements` are always preserved in their current order. New path elements are appended to the path, and existing path elements may be moved closer to the end to satisfy the requested ordering. Paths are compared in a case-insensitive fashion, and trailing backslashes are ignored for comparison purposes. However, note that trailing backslashes in YAML require quotes. |
| **name**  string  | **Default:**"PATH" | Target path environment variable name. |
| **scope**  string  | **Choices:*** **machine** ←
* user
 | The level at which the environment variable specified by `name` should be managed (either for the current user or global machine scope). |
| **state**  string  | **Choices:*** absent
* present
 | Whether the path elements specified in `elements` should be present or absent. |

   
 Notes
-----

  Note

 * This module is for modifying individual elements of path-like environment variables. For general-purpose management of other environment vars, use the [ansible.windows.win\_environment](win_environment_module#ansible-collections-ansible-windows-win-environment-module) module.
* This module does not broadcast change events. This means that the minority of windows applications which can have their environment changed without restarting will not be notified and therefore will need restarting to pick up new environment settings.
* User level environment variables will require an interactive user to log out and in again before they become available.

  See Also
--------

  See also

  [ansible.windows.win\_environment](win_environment_module#ansible-collections-ansible-windows-win-environment-module)

The official documentation on the **ansible.windows.win\_environment** module.

    Examples
--------

 
```
- name: Ensure that system32 and Powershell are present on the global system path, and in the specified order
  ansible.windows.win_path:
    elements:
    - '%SystemRoot%\system32'
    - '%SystemRoot%\system32\WindowsPowerShell\v1.0'

- name: Ensure that C:\Program Files\MyJavaThing is not on the current user's CLASSPATH
  ansible.windows.win_path:
    name: CLASSPATH
    elements: C:\Program Files\MyJavaThing
    scope: user
    state: absent

```
 ### Authors

 * Matt Davis (@nitzmahone)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_path_module.html>

ansible.windows.win\_package – Installs/uninstalls an installable package
=========================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_package`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Installs or uninstalls software packages for Windows.
* Supports `.exe`, `.msi`, `.msp`, `.appx`, `.appxbundle`, `.msix`, and `.msixbundle`.
* These packages can be sourced from the local file system, network file share or a url.
* See *provider* for more info on each package type that is supported.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **arguments**  raw  |  | Any arguments the installer needs to either install or uninstall the package. If the package is an MSI do not supply the `/qn`, `/log` or `/norestart` arguments. This is only used for the `msi`, `msp`, and `registry` providers. Can be a list of arguments and the module will escape the arguments as necessary, it is recommended to use a string when dealing with MSI packages due to the unique escaping issues with msiexec. When using a list of arguments each item in the list is considered to be a single argument. As such, if an argument in the list contains a space then Ansible will quote this to ensure that this is seen by Windows as a single argument. Should this behaviour not be what is required, the argument should be split into two separate list items. See the examples section for more detail. |
| **chdir**  path  |  | Set the specified path as the current working directory before installing or uninstalling a package. This is only used for the `msi`, `msp`, and `registry` providers. |
| **client\_cert**  string  |  | The path to the client certificate (.pfx) that is used for X509 authentication. This path can either be the path to the `pfx` on the filesystem or the PowerShell certificate path `Cert:\CurrentUser\My\<thumbprint>`. The WinRM connection must be authenticated with `CredSSP` or `become` is used on the task if the certificate file is not password protected. Other authentication types can set *client\_cert\_password* when the cert is password protected. |
| **client\_cert\_password**  string  |  | The password for *client\_cert* if the cert is password protected. |
| **creates\_path**  path  |  | Will check the existence of the path specified and use the result to determine whether the package is already installed. You can use this in conjunction with `product_id` and other `creates_*`. |
| **creates\_service**  string  |  | Will check the existing of the service specified and use the result to determine whether the package is already installed. You can use this in conjunction with `product_id` and other `creates_*`. |
| **creates\_version**  string  |  | Will check the file version property of the file at `creates_path` and use the result to determine whether the package is already installed. 
`creates_path` MUST be set and is a file. You can use this in conjunction with `product_id` and other `creates_*`. |
| **expected\_return\_code**  list / elements=integer  | **Default:**[0, 3010] | One or more return codes from the package installation that indicates success. The return codes are read as a signed integer, any values greater than 2147483647 need to be represented as the signed equivalent, i.e. `4294967295` is `-1`. To convert a unsigned number to the signed equivalent you can run "[Int32]("0x{0:X}" -f ([UInt32]3221225477))". A return code of `3010` usually means that a reboot is required, the `reboot_required` return value is set if the return code is `3010`. This is only used for the `msi`, `msp`, and `registry` providers. |
| **follow\_redirects**  string  | **Choices:*** all
* none
* **safe** ←
 | Whether or the module should follow redirects. 
`all` will follow all redirect. 
`none` will not follow any redirect. 
`safe` will follow only "safe" redirects, where "safe" means that the client is only doing a `GET` or `HEAD` on the URI to which it is being redirected. When following a redirected URL, the `Authorization` header and any credentials set will be dropped and not redirected. |
| **force\_basic\_auth**  boolean  | **Choices:*** **no** ←
* yes
 | By default the authentication header is only sent when a webservice responses to an initial request with a 401 status. Since some basic auth services do not properly send a 401, logins will fail. This option forces the sending of the Basic authentication header upon the original request. |
| **headers**  dictionary  |  | Extra headers to set on the request. This should be a dictionary where the key is the header name and the value is the value for that header. |
| **http\_agent**  string  | **Default:**"ansible-httpget" | Header to identify as, generally appears in web server logs. This is set to the `User-Agent` header on a HTTP request. |
| **log\_path**  path  |  | Specifies the path to a log file that is persisted after a package is installed or uninstalled. This is only used for the `msi` or `msp` provider. When omitted, a temporary log file is used instead for those providers. This is only valid for MSI files, use `arguments` for the `registry` provider. |
| **maximum\_redirection**  integer  | **Default:**50 | Specify how many times the module will redirect a connection to an alternative URI before the connection fails. If set to `0` or *follow\_redirects* is set to `none`, or `safe` when not doing a `GET` or `HEAD` it prevents all redirection. |
| **password**  string  |  | The password for `user_name`, must be set when `user_name` is. This option is deprecated in favour of using become, see examples for more information. Will be removed on the major release after `2022-07-01`. 
aliases: user\_password |
| **path**  string  |  | Location of the package to be installed or uninstalled. This package can either be on the local file system, network share or a url. When `state=present`, `product_id` is not set and the path is a URL, this file will always be downloaded to a temporary directory for idempotency checks, otherwise the file will only be downloaded if the package has not been installed based on the `product_id` checks. If `state=present` then this value MUST be set. If `state=absent` then this value does not need to be set if `product_id` is. |
| **product\_id**  string  |  | The product id of the installed packaged. This is used for checking whether the product is already installed and getting the uninstall information if `state=absent`. For msi packages, this is the `ProductCode` (GUID) of the package. This can be found under the same registry paths as the `registry` provider. For msp packages, this is the `PatchCode` (GUID) of the package which can found under the `Details -> Revision number` of the file's properties. For msix packages, this is the `Name` or `PackageFullName` of the package found under the `Get-AppxPackage` cmdlet. For registry (exe) packages, this is the registry key name under the registry paths specified in *provider*. This value is ignored if `path` is set to a local accesible file path and the package is not an `exe`. This SHOULD be set when the package is an `exe`, or the path is a url or a network share and credential delegation is not being used. The `creates_*` options can be used instead but is not recommended. The alias *productid* is deprecated and will be removed on the major release after `2022-07-01`. 
aliases: productid |
| **provider**  string  | **Choices:*** **auto** ←
* msi
* msix
* msp
* registry
 | Set the package provider to use when searching for a package. The `auto` provider will select the proper provider if *path* otherwise it scans all the other providers based on the *product\_id*. The `msi` provider scans for MSI packages installed on a machine wide and current user context based on the `ProductCode` of the MSI. The `msix` provider is used to install `.appx`, `.msix`, `.appxbundle`, or `.msixbundle` packages. These packages are only installed or removed on the current use. The host must be set to allow sideloaded apps or in developer mode. See the examples for how to enable this. If a package is already installed but `path` points to an updated package, this will be installed over the top of the existing one. The `msp` provider scans for all MSP patches installed on a machine wide and current user context based on the `PatchCode` of the MSP. A `msp` will be applied or removed on all `msi` products that it applies to and is installed. If the patch is obsoleted or superseded then no action will be taken. The `registry` provider is used for traditional `exe` installers and uses the following registry path to determine if a product was installed; `HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall`, `HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall`, `HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall`, and `HKCU:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall`. |
| **proxy\_password**  string  |  | The password for *proxy\_username*. |
| **proxy\_url**  string  |  | An explicit proxy to use for the request. By default, the request will use the IE defined proxy unless *use\_proxy* is set to `no`. |
| **proxy\_use\_default\_credential**  boolean  | **Choices:*** **no** ←
* yes
 | Uses the current user's credentials when authenticating with a proxy host protected with `NTLM`, `Kerberos`, or `Negotiate` authentication. Proxies that use `Basic` auth will still require explicit credentials through the *proxy\_username* and *proxy\_password* options. The module will only have access to the user's credentials if using `become` with a password, you are connecting with SSH using a password, or connecting with WinRM using `CredSSP` or `Kerberos with delegation`. If not using `become` or a different auth method to the ones stated above, there will be no default credentials available and no proxy authentication will occur. |
| **proxy\_username**  string  |  | The username to use for proxy authentication. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | Whether to install or uninstall the package. The module uses *product\_id* to determine whether the package is installed or not. For all providers but `auto`, the *path* can be used for idempotency checks if it is locally accesible filesystem path. The alias *ensure* is deprecated and will be removed on the major release after `2022-07-01`. 
aliases: ensure |
| **url\_method**  string  |  | The HTTP Method of the request. |
| **url\_password**  string  |  | The password for *url\_username*. |
| **url\_timeout**  integer  | **Default:**30 | Specifies how long the request can be pending before it times out (in seconds). Set to `0` to specify an infinite timeout. |
| **url\_username**  string  |  | The username to use for authentication. |
| **use\_default\_credential**  boolean  | **Choices:*** **no** ←
* yes
 | Uses the current user's credentials when authenticating with a server protected with `NTLM`, `Kerberos`, or `Negotiate` authentication. Sites that use `Basic` auth will still require explicit credentials through the *url\_username* and *url\_password* options. The module will only have access to the user's credentials if using `become` with a password, you are connecting with SSH using a password, or connecting with WinRM using `CredSSP` or `Kerberos with delegation`. If not using `become` or a different auth method to the ones stated above, there will be no default credentials available and no authentication will occur. |
| **use\_proxy**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, it will not use the proxy defined in IE for the current user. |
| **username**  string  |  | Username of an account with access to the package if it is located on a file share. This is only needed if the WinRM transport is over an auth method that does not support credential delegation like Basic or NTLM or become is not used. This option is deprecated in favour of using become, see examples for more information. Will be removed on the major release after `2022-07-01`. 
aliases: user\_name |
| **validate\_certs**  boolean  | **Choices:*** no
* **yes** ←
 | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
| **wait\_for\_children**  boolean   added in 1.3.0 of ansible.windows  | **Choices:*** **no** ←
* yes
 | The module will wait for the process it spawns to finish but any processes spawned in that child process as ignored. Set to `yes` to wait for all descendent processes to finish before the module returns. This is useful if the install/uninstaller is just a wrapper which then calls the actual installer as its own child process. When this option is `yes` then the module will wait for both processes to finish before returning. This should not be required for most installers and setting to `yes` could result in the module not returning until the process it is waiting for has been stopped manually. Requires Windows Server 2012 or Windows 8 or newer to use. |

   
 Notes
-----

  Note

 * When `state=absent` and the product is an exe, the path may be different from what was used to install the package originally. If path is not set then the path used will be what is set under `QuietUninstallString` or `UninstallString` in the registry for that *product\_id*.
* By default all msi installs and uninstalls will be run with the arguments `/log, /qn, /norestart`.
* All the installation checks under `product_id` and `creates_*` add together, if one fails then the program is considered to be absent.

  See Also
--------

  See also

  [chocolatey.chocolatey.win\_chocolatey](../../chocolatey/chocolatey/win_chocolatey_module#ansible-collections-chocolatey-chocolatey-win-chocolatey-module)

The official documentation on the **chocolatey.chocolatey.win\_chocolatey** module.

  [community.windows.win\_hotfix](../../community/windows/win_hotfix_module#ansible-collections-community-windows-win-hotfix-module)

The official documentation on the **community.windows.win\_hotfix** module.

  [ansible.windows.win\_updates](win_updates_module#ansible-collections-ansible-windows-win-updates-module)

The official documentation on the **ansible.windows.win\_updates** module.

  [community.windows.win\_inet\_proxy](../../community/windows/win_inet_proxy_module#ansible-collections-community-windows-win-inet-proxy-module)

The official documentation on the **community.windows.win\_inet\_proxy** module.

    Examples
--------

 
```
- name: Install the Visual C thingy
  ansible.windows.win_package:
    path: http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe
    product_id: '{CF2BEA3C-26EA-32F8-AA9B-331F7E34BA97}'
    arguments: /install /passive /norestart

- name: Install Visual C thingy with list of arguments instead of a string
  ansible.windows.win_package:
    path: http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe
    product_id: '{CF2BEA3C-26EA-32F8-AA9B-331F7E34BA97}'
    arguments:
    - /install
    - /passive
    - /norestart

- name: Install MSBuild thingy with arguments split to prevent quotes
  ansible.windows.win_package:
    path: https://download.visualstudio.microsoft.com/download/pr/9665567e-f580-4acd-85f2-bc94a1db745f/vs_BuildTools.exe
    product_id: '{D1437F51-786A-4F57-A99C-F8E94FBA1BD8}'
    arguments:
    - --norestart
    - --passive
    - --wait
    - --add
    - Microsoft.Net.Component.4.6.1.TargetingPack
    - --add
    - Microsoft.Net.Component.4.6.TargetingPack

- name: Install Remote Desktop Connection Manager from msi with a permanent log
  ansible.windows.win_package:
    path: https://download.microsoft.com/download/A/F/0/AF0071F3-B198-4A35-AA90-C68D103BDCCF/rdcman.msi
    product_id: '{0240359E-6A4C-4884-9E94-B397A02D893C}'
    state: present
    log_path: D:\logs\vcredist_x64-exe-{{lookup('pipe', 'date +%Y%m%dT%H%M%S')}}.log

- name: Uninstall Remote Desktop Connection Manager
  ansible.windows.win_package:
    product_id: '{0240359E-6A4C-4884-9E94-B397A02D893C}'
    state: absent

- name: Install Remote Desktop Connection Manager locally omitting the product_id
  ansible.windows.win_package:
    path: C:\temp\rdcman.msi
    state: present

- name: Uninstall Remote Desktop Connection Manager from local MSI omitting the product_id
  ansible.windows.win_package:
    path: C:\temp\rdcman.msi
    state: absent

# 7-Zip exe doesn't use a guid for the Product ID
- name: Install 7zip from a network share with specific credentials
  ansible.windows.win_package:
    path: \\domain\programs\7z.exe
    product_id: 7-Zip
    arguments: /S
    state: present
  become: yes
  become_method: runas
  become_flags: logon_type=new_credential logon_flags=netcredentials_only
  vars:
    ansible_become_user: DOMAIN\User
    ansible_become_password: Password

- name: Install 7zip and use a file version for the installation check
  ansible.windows.win_package:
    path: C:\temp\7z.exe
    creates_path: C:\Program Files\7-Zip\7z.exe
    creates_version: 16.04
    state: present

- name: Uninstall 7zip from the exe
  ansible.windows.win_package:
    path: C:\Program Files\7-Zip\Uninstall.exe
    product_id: 7-Zip
    arguments: /S
    state: absent

- name: Uninstall 7zip without specifying the path
  ansible.windows.win_package:
    product_id: 7-Zip
    arguments: /S
    state: absent

- name: Install application and override expected return codes
  ansible.windows.win_package:
    path: https://download.microsoft.com/download/1/6/7/167F0D79-9317-48AE-AEDB-17120579F8E2/NDP451-KB2858728-x86-x64-AllOS-ENU.exe
    product_id: '{7DEBE4EB-6B40-3766-BB35-5CBBC385DA37}'
    arguments: '/q /norestart'
    state: present
    expected_return_code: [0, 666, 3010]

- name: Install a .msp patch
  ansible.windows.win_package:
    path: C:\Patches\Product.msp
    state: present

- name: Remove a .msp patch
  ansible.windows.win_package:
    product_id: '{AC76BA86-A440-FFFF-A440-0C13154E5D00}'
    state: absent

- name: Enable installation of 3rd party MSIX packages
  ansible.windows.win_regedit:
    path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock
    name: AllowAllTrustedApps
    data: 1
    type: dword
    state: present

- name: Install an MSIX package for the current user
  ansible.windows.win_package:
    path: C:\Installers\Calculator.msix  # Can be .appx, .msixbundle, or .appxbundle
    state: present

- name: Uninstall an MSIX package using the product_id
  ansible.windows.win_package:
    product_id: InputApp
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **log**  string  | installation/uninstallation failure for MSI or MSP packages | The contents of the MSI or MSP log.  **Sample:** Installation completed successfully |
| **rc**  integer  | change occurred | The return code of the package process.  |
| **reboot\_required**  boolean  | always | Whether a reboot is required to finalise package. This is set to true if the executable return code is 3010.  **Sample:** True |
| **stderr**  string  | failure during install or uninstall | The stderr stream of the package process.  **Sample:** Failed to install program |
| **stdout**  string  | failure during install or uninstall | The stdout stream of the package process.  **Sample:** Installing program |

   
  
 ### Authors

 * Trond Hindenes (@trondhindenes)
* Jordan Borean (@jborean93)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_package_module.html>

ansible.windows.win\_ping – A windows version of the classic ping module
========================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_ping`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Checks management connectivity of a windows host.
* This is NOT ICMP ping, this is just a trivial test module.
* For non-Windows targets, use the [ansible.builtin.ping](../builtin/ping_module#ansible-collections-ansible-builtin-ping-module) module instead.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **data**  string  | **Default:**"pong" | Alternate data to return instead of 'pong'. If this parameter is set to `crash`, the module will cause an exception. |

   
 See Also
--------

  See also

  [ansible.builtin.ping](../builtin/ping_module#ansible-collections-ansible-builtin-ping-module)

The official documentation on the **ansible.builtin.ping** module.

    Examples
--------

 
```
# Test connectivity to a windows host
# ansible winserver -m ansible.windows.win_ping

- name: Example from an Ansible Playbook
  ansible.windows.win_ping:

- name: Induce an exception to see what happens
  ansible.windows.win_ping:
    data: crash

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **ping**  string  | success | Value provided with the data parameter.  **Sample:** pong |

   
  
 ### Authors

 * Chris Church (@cchurch)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_ping_module.html>

ansible.windows.win\_reboot – Reboot a windows machine
======================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_reboot`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Reboot a Windows machine, wait for it to go down, come back up, and respond to commands.
* For non-Windows targets, use the [ansible.builtin.reboot](../builtin/reboot_module#ansible-collections-ansible-builtin-reboot-module) module instead.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **boot\_time\_command**  string  | **Default:**"(Get-CimInstance -ClassName Win32\_OperatingSystem -Property LastBootUpTime).LastBootUpTime.ToFileTime()" | Command to run that returns a unique string indicating the last time the system was booted. Setting this to a command that has different output each time it is run will cause the task to fail. |
| **connect\_timeout**  float  | **Default:**5 | Maximum seconds to wait for a single successful TCP connection to the WinRM endpoint before trying again. 
aliases: connect\_timeout\_sec |
| **msg**  string  | **Default:**"Reboot initiated by Ansible" | Message to display to users. |
| **post\_reboot\_delay**  float  | **Default:**0 | Seconds to wait after the reboot command was successful before attempting to validate the system rebooted successfully. This is useful if you want wait for something to settle despite your connection already working. 
aliases: post\_reboot\_delay\_sec |
| **pre\_reboot\_delay**  float  | **Default:**2 | Seconds to wait before reboot. Passed as a parameter to the reboot command. 
aliases: pre\_reboot\_delay\_sec |
| **reboot\_timeout**  float  | **Default:**600 | Maximum seconds to wait for machine to re-appear on the network and respond to a test command. This timeout is evaluated separately for both reboot verification and test command success so maximum clock time is actually twice this value. 
aliases: reboot\_timeout\_sec |
| **test\_command**  string  |  | Command to expect success for to determine the machine is ready for management. By default this test command is a custom one to detect when the Windows Logon screen is up and ready to accept credentials. Using a custom command will replace this behaviour and just run the command specified. |

   
 Notes
-----

  Note

 * If a shutdown was already scheduled on the system, [ansible.windows.win\_reboot](#ansible-collections-ansible-windows-win-reboot-module) will abort the scheduled shutdown and enforce its own shutdown.
* Beware that when [ansible.windows.win\_reboot](#ansible-collections-ansible-windows-win-reboot-module) returns, the Windows system may not have settled yet and some base services could be in limbo. This can result in unexpected behavior. Check the examples for ways to mitigate this. This has been slightly mitigated in the `1.6.0` release of `ansible.windows` but it is not guranteed to always wait until the logon prompt is shown.
* The connection user must have the `SeRemoteShutdownPrivilege` privilege enabled, see <https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/force-shutdown-from-a-remote-system> for more information.

  See Also
--------

  See also

  [ansible.builtin.reboot](../builtin/reboot_module#ansible-collections-ansible-builtin-reboot-module)

The official documentation on the **ansible.builtin.reboot** module.

    Examples
--------

 
```
- name: Reboot the machine with all defaults
  ansible.windows.win_reboot:

- name: Reboot a slow machine that might have lots of updates to apply
  ansible.windows.win_reboot:
    reboot_timeout: 3600

# Install a Windows feature and reboot if necessary
- name: Install IIS Web-Server
  ansible.windows.win_feature:
    name: Web-Server
  register: iis_install

- name: Reboot when Web-Server feature requires it
  ansible.windows.win_reboot:
  when: iis_install.reboot_required

# One way to ensure the system is reliable, is to set WinRM to a delayed startup
- name: Ensure WinRM starts when the system has settled and is ready to work reliably
  ansible.windows.win_service:
    name: WinRM
    start_mode: delayed

# Additionally, you can add a delay before running the next task
- name: Reboot a machine that takes time to settle after being booted
  ansible.windows.win_reboot:
    post_reboot_delay: 120

# Or you can make win_reboot validate exactly what you need to work before running the next task
- name: Validate that the netlogon service has started, before running the next task
  ansible.windows.win_reboot:
    test_command: 'exit (Get-Service -Name Netlogon).Status -ne "Running"'

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **elapsed**  float  | always | The number of seconds that elapsed waiting for the system to be rebooted.  **Sample:** 23.2 |
| **rebooted**  boolean  | always | True if the machine was rebooted.  **Sample:** True |

   
  
 ### Authors

 * Matt Davis (@nitzmahone)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_reboot_module.html>

ansible.windows.win\_reg\_stat – Get information about Windows registry keys
============================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_reg_stat`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Like [ansible.windows.win\_file](win_file_module#ansible-collections-ansible-windows-win-file-module), [ansible.windows.win\_reg\_stat](#ansible-collections-ansible-windows-win-reg-stat-module) will return whether the key/property exists.
* It also returns the sub keys and properties of the key specified.
* If specifying a property name through *property*, it will return the information specific for that property.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name**  string  |  | The registry property name to get information for, the return json will not include the sub\_keys and properties entries for the *key* specified. Set to an empty string to target the registry key's `(Default`) property value. 
aliases: entry, value, property |
| **path**  string / required  |  | The full registry key path including the hive to search for. 
aliases: key |

   
 Notes
-----

  Note

 * The `properties` return value will contain an empty string key `""` that refers to the key’s `Default` value. If the value has not been set then this key is not returned.

  See Also
--------

  See also

  [ansible.windows.win\_regedit](win_regedit_module#ansible-collections-ansible-windows-win-regedit-module)

The official documentation on the **ansible.windows.win\_regedit** module.

  ansible.windows.win\_regmerge

The official documentation on the **ansible.windows.win\_regmerge** module.

    Examples
--------

 
```
- name: Obtain information about a registry key using short form
  ansible.windows.win_reg_stat:
    path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion
  register: current_version

- name: Obtain information about a registry key property
  ansible.windows.win_reg_stat:
    path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion
    name: CommonFilesDir
  register: common_files_dir

- name: Obtain the registry key's (Default) property
  ansible.windows.win_reg_stat:
    path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion
    name: ''
  register: current_version_default

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **changed**  boolean  | always | Whether anything was changed.  **Sample:** True |
| **exists**  boolean  | success and path/property exists | States whether the registry key/property exists.  **Sample:** True |
| **properties**  dictionary  | success, path exists and property not specified | A dictionary containing all the properties and their values in the registry key.  **Sample:** {'': {'raw\_value': '', 'type': 'REG\_SZ', 'value': ''}, 'binary\_property': {'raw\_value': ['0x01', '0x16'], 'type': 'REG\_BINARY', 'value': [1, 22]}, 'multi\_string\_property': {'raw\_value': ['a', 'b'], 'type': 'REG\_MULTI\_SZ', 'value': ['a', 'b']}} |
| **raw\_value**  string  | success, path/property exists and property specified | Returns the raw value of the registry property, REG\_EXPAND\_SZ has no string expansion, REG\_BINARY or REG\_NONE is in hex 0x format. REG\_NONE, this value is a hex string in the 0x format.  **Sample:** %ProgramDir%\\Common Files |
| **sub\_keys**  list / elements=string  | success, path exists and property not specified | A list of all the sub keys of the key specified.  **Sample:** ['AppHost', 'Casting', 'DateTime'] |
| **type**  string  | success, path/property exists and property specified | The property type.  **Sample:** REG\_EXPAND\_SZ |
| **value**  string  | success, path/property exists and property specified | The value of the property.  **Sample:** C:\\Program Files\\Common Files |

   
  
 ### Authors

 * Jordan Borean (@jborean93)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_reg_stat_module.html>

ansible.windows.win\_service – Manage and query Windows services
================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_service`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Manage and query Windows services.
* For non-Windows targets, use the [ansible.builtin.service](../builtin/service_module#ansible-collections-ansible-builtin-service-module) module instead.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dependencies**  list / elements=string  |  | A list of service dependencies to set for this particular service. This should be a list of service names and not the display name of the service. This works by `dependency_action` to either add/remove or set the services in this list. |
| **dependency\_action**  string  | **Choices:*** add
* remove
* **set** ←
 | Used in conjunction with `dependency` to either add the dependencies to the existing service dependencies. Remove the dependencies to the existing dependencies. Set the dependencies to only the values in the list replacing the existing dependencies. |
| **description**  string  |  | The description to set for the service. |
| **desktop\_interact**  boolean  | **Choices:*** **no** ←
* yes
 | Whether to allow the service user to interact with the desktop. This can only be set to `yes` when using the `LocalSystem` username. This can only be set to `yes` when the *service\_type* is `win32_own_process` or `win32_share_process`. |
| **display\_name**  string  |  | The display name to set for the service. |
| **error\_control**  string  | **Choices:*** critical
* ignore
* normal
* severe
 | The severity of the error and action token if the service fails to start. A new service defaults to `normal`. 
`critical` will log the error and restart the system with the last-known good configuration. If the startup fails on reboot then the system will fail to operate. 
`ignore` ignores the error. 
`normal` logs the error in the event log but continues. 
`severe` is like `critical` but a failure on the last-known good configuration reboot startup will be ignored. |
| **failure\_actions**  list / elements=dictionary  |  | A list of failure actions the service controller should take on each failure of a service. The service manager will run the actions from first to last defined until the service starts. If *failure\_reset\_period\_sec* has been exceeded then the failure actions will restart from the beginning. If all actions have been performed the the service manager will repeat the last service defined. The existing actions will be replaced with the list defined in the task if there is a mismatch with any of them. Set to an empty list to delete all failure actions on a service otherwise an omitted or null value preserves the existing actions on the service. |
|  | **delay\_ms**  raw  | **Default:**0 | The time to wait, in milliseconds, before performing the specified action. 
aliases: delay |
|  | **type**  string / required  | **Choices:*** none
* reboot
* restart
* run\_command
 | The action to be performed. 
`none` will perform no action, when used this should only be set as the last action. 
`reboot` will reboot the host, when used this should only be set as the last action as the reboot will reset the action list back to the beginning. 
`restart` will restart the service. 
`run_command` will run the command specified by *failure\_command*. |
| **failure\_actions\_on\_non\_crash\_failure**  boolean  | **Choices:*** no
* yes
 | Controls whether failure actions will be performed on non crash failures or not. |
| **failure\_command**  string  |  | The command to run for a `run_command` failure action. Set to an empty string to remove the command. |
| **failure\_reboot\_msg**  string  |  | The message to be broadcast to users logged on the host for a `reboot` failure action. Set to an empty string to remove the message. |
| **failure\_reset\_period\_sec**  raw  |  | The time in seconds after which the failure action list resets back to the start of the list if there are no failures. To set this value, *failure\_actions* must have at least 1 action present. Specify `'0xFFFFFFFF'` to set an infinite reset period. 
aliases: failure\_reset\_period |
| **force\_dependent\_services**  boolean  | **Choices:*** **no** ←
* yes
 | If `yes`, stopping or restarting a service with dependent services will force the dependent services to stop or restart also. If `no`, stopping or restarting a service with dependent services may fail. |
| **load\_order\_group**  string  |  | The name of the load ordering group of which this service is a member. Specify an empty string to remove the existing load order group of a service. |
| **name**  string / required  |  | Name of the service. If only the name parameter is specified, the module will report on whether the service exists or not without making any changes. |
| **password**  string  |  | The password to set the service to start as. This and the `username` argument should be supplied together when using a local or domain account. If omitted then the password will continue to use the existing value password set. If specifying `LocalSystem`, `NetworkService`, `LocalService`, the `NT SERVICE`, or a gMSA this field can be omitted as those accounts have no password. |
| **path**  string  |  | The path to the executable to set for the service. |
| **pre\_shutdown\_timeout\_ms**  raw  |  | The time in which the service manager waits after sending a preshutdown notification to the service until it proceeds to continue with the other shutdown actions. 
aliases: pre\_shutdown\_timeout |
| **required\_privileges**  list / elements=string  |  | A list of privileges the service must have when starting up. When set the service will only have the privileges specified on its access token. The *username* of the service must already have the privileges assigned. The existing privileges will be replace with the list defined in the task if there is a mismatch with any of them. Set to an empty list to remove all required privileges, otherwise an omitted or null value will keep the existing privileges. See [privilege text constants](https://docs.microsoft.com/en-us/windows/win32/secauthz/privilege-constants) for a list of privilege constants that can be used. |
| **service\_type**  string  | **Choices:*** user\_own\_process
* user\_share\_process
* win32\_own\_process
* win32\_share\_process
 | The type of service. The default type of a new service is `win32_own_process`. 
*desktop\_interact* can only be set if the service type is `win32_own_process` or `win32_share_process`. |
| **sid\_info**  string  | **Choices:*** none
* restricted
* unrestricted
 | Used to define the behaviour of the service's access token groups. 
`none` will not add any groups to the token. 
`restricted` will add the `NT SERVICE\<service name>` SID to the access token's groups and restricted groups. 
`unrestricted` will add the `NT SERVICE\<service name>` SID to the access token's groups. |
| **start\_mode**  string  | **Choices:*** auto
* delayed
* disabled
* manual
 | Set the startup type for the service. A newly created service will default to `auto`. |
| **state**  string  | **Choices:*** absent
* paused
* started
* stopped
* restarted
 | The desired state of the service. 
`started`/`stopped`/`absent`/`paused` are idempotent actions that will not run commands unless necessary. 
`restarted` will always bounce the service. Only services that support the paused state can be paused, you can check the return value `can_pause_and_continue`. You can only pause a service that is already started. A newly created service will default to `stopped`. |
| **update\_password**  string  | **Choices:*** always
* on\_create
 | When set to `always` and *password* is set, the module will always report a change and set the password. Set to `on_create` to only set the password if the module needs to create the service. If *username* was specified and the service changed to that username then *password* will also be changed if specified. The current default is `on_create` but this behaviour may change in the future, it is best to be explicit here. |
| **username**  string  |  | The username to set the service to start as. Can also be set to `LocalSystem` or `SYSTEM` to use the SYSTEM account. A newly created service will default to `LocalSystem`. If using a custom user account, it must have the `SeServiceLogonRight` granted to be able to start up. You can use the [ansible.windows.win\_user\_right](win_user_right_module) module to grant this user right for you. Set to `NT SERVICE\service name` to run as the NT SERVICE account for that service. This can also be a gMSA in the form `DOMAIN\gMSA$`. |

   
 Notes
-----

  Note

 * This module historically returning information about the service in its return values. These should be avoided in favour of the [ansible.windows.win\_service\_info](win_service_info_module#ansible-collections-ansible-windows-win-service-info-module) module.
* Most of the options in this module are non-driver services that you can view in SCManager. While you can edit driver services, not all functionality may be available.
* The user running the module must have the following access rights on the service to be able to use it with this module - `SERVICE_CHANGE_CONFIG`, `SERVICE_ENUMERATE_DEPENDENTS`, `SERVICE_QUERY_CONFIG`, `SERVICE_QUERY_STATUS`.
* Changing the state or removing the service will also require futher rights depending on what needs to be done.

  See Also
--------

  See also

  [ansible.builtin.service](../builtin/service_module#ansible-collections-ansible-builtin-service-module)

The official documentation on the **ansible.builtin.service** module.

  [community.windows.win\_nssm](../../community/windows/win_nssm_module#ansible-collections-community-windows-win-nssm-module)

The official documentation on the **community.windows.win\_nssm** module.

  [ansible.windows.win\_service\_info](win_service_info_module#ansible-collections-ansible-windows-win-service-info-module)

The official documentation on the **ansible.windows.win\_service\_info** module.

  [ansible.windows.win\_user\_right](win_user_right_module#ansible-collections-ansible-windows-win-user-right-module)

The official documentation on the **ansible.windows.win\_user\_right** module.

    Examples
--------

 
```
- name: Restart a service
  ansible.windows.win_service:
    name: spooler
    state: restarted

- name: Set service startup mode to auto and ensure it is started
  ansible.windows.win_service:
    name: spooler
    start_mode: auto
    state: started

- name: Pause a service
  ansible.windows.win_service:
    name: Netlogon
    state: paused

- name: Ensure that WinRM is started when the system has settled
  ansible.windows.win_service:
    name: WinRM
    start_mode: delayed

# A new service will also default to the following values:
# - username: LocalSystem
# - state: stopped
# - start_mode: auto
- name: Create a new service
  ansible.windows.win_service:
    name: service name
    path: C:\temp\test.exe

- name: Create a new service with extra details
  ansible.windows.win_service:
    name: service name
    path: C:\temp\test.exe
    display_name: Service Name
    description: A test service description

- name: Remove a service
  ansible.windows.win_service:
    name: service name
    state: absent

# This is required to be set for non-service accounts that need to run as a service
- name: Grant domain account the SeServiceLogonRight user right
  ansible.windows.win_user_right:
    name: SeServiceLogonRight
    users:
    - DOMAIN\User
    action: add

- name: Set the log on user to a domain account
  ansible.windows.win_service:
    name: service name
    state: restarted
    username: DOMAIN\User
    password: Password

- name: Set the log on user to a local account
  ansible.windows.win_service:
    name: service name
    state: restarted
    username: .\Administrator
    password: Password

- name: Set the log on user to Local System
  ansible.windows.win_service:
    name: service name
    state: restarted
    username: SYSTEM

- name: Set the log on user to Local System and allow it to interact with the desktop
  ansible.windows.win_service:
    name: service name
    state: restarted
    username: SYSTEM
    desktop_interact: yes

- name: Set the log on user to Network Service
  ansible.windows.win_service:
    name: service name
    state: restarted
    username: NT AUTHORITY\NetworkService

- name: Set the log on user to Local Service
  ansible.windows.win_service:
    name: service name
    state: restarted
    username: NT AUTHORITY\LocalService

- name: Set the log on user as the services' virtual account
  ansible.windows.win_service:
    name: service name
    username: NT SERVICE\service name

- name: Set the log on user as a gMSA
  ansible.windows.win_service:
    name: service name
    username: DOMAIN\gMSA$  # The end $ is important and should be set for all gMSA

- name: Set dependencies to ones only in the list
  ansible.windows.win_service:
    name: service name
    dependencies: [ service1, service2 ]

- name: Add dependencies to existing dependencies
  ansible.windows.win_service:
    name: service name
    dependencies: [ service1, service2 ]
    dependency_action: add

- name: Remove dependencies from existing dependencies
  ansible.windows.win_service:
    name: service name
    dependencies:
    - service1
    - service2
    dependency_action: remove

- name: Set required privileges for a service
  ansible.windows.win_service:
    name: service name
    username: NT SERVICE\LocalService
    required_privileges:
    - SeBackupPrivilege
    - SeRestorePrivilege

- name: Remove all required privileges for a service
  ansible.windows.win_service:
    name: service name
    username: NT SERVICE\LocalService
    required_privileges: []

- name: Set failure actions for a service with no reset period
  ansible.windows.win_service:
    name: service name
    failure_actions:
    - type: restart
    - type: run_command
      delay_ms: 1000
    - type: restart
      delay_ms: 5000
    - type: reboot
    failure_command: C:\Windows\System32\cmd.exe /c mkdir C:\temp
    failure_reboot_msg: Restarting host because service name has failed
    failure_reset_period_sec: '0xFFFFFFFF'

- name: Set only 1 failure action without a repeat of the last action
  ansible.windows.win_service:
    name: service name
    failure_actions:
    - type: restart
      delay_ms: 5000
    - type: none

- name: Remove failure action information
  ansible.windows.win_service:
    name: service name
    failure_actions: []
    failure_command: ''  # removes the existing command
    failure_reboot_msg: ''  # removes the existing reboot msg

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **can\_pause\_and\_continue**  boolean  | success and service exists | Whether the service can be paused and unpaused.  **Sample:** True |
| **depended\_by**  list / elements=string  | success and service exists | A list of services that depend on this service.  |
| **dependencies**  list / elements=string  | success and service exists | A list of services that is depended by this service.  |
| **description**  string  | success and service exists | The description of the service.  **Sample:** Manages communication between system components. |
| **desktop\_interact**  boolean  | success and service exists | Whether the current user is allowed to interact with the desktop.  |
| **display\_name**  string  | success and service exists | The display name of the installed service.  **Sample:** CoreMessaging |
| **exists**  boolean  | success | Whether the service exists or not.  **Sample:** True |
| **name**  string  | success and service exists | The service name or id of the service.  **Sample:** CoreMessagingRegistrar |
| **path**  string  | success and service exists | The path to the service executable.  **Sample:** C:\Windows\system32\svchost.exe -k LocalServiceNoNetwork |
| **start\_mode**  string  | success and service exists | The startup type of the service.  **Sample:** manual |
| **state**  string  | success and service exists | The current running status of the service.  **Sample:** stopped |
| **username**  string  | success and service exists | The username that runs the service.  **Sample:** LocalSystem |

   
  
 ### Authors

 * Chris Hoffman (@chrishoffman)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_service_module.html>

ansible.windows.win\_stat – Get information about Windows files
===============================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_stat`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Returns information about a Windows file.
* For non-Windows targets, use the [ansible.builtin.stat](../builtin/stat_module#ansible-collections-ansible-builtin-stat-module) module instead.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **checksum\_algorithm**  string  | **Choices:*** md5
* **sha1** ←
* sha256
* sha384
* sha512
 | Algorithm to determine checksum of file. Will throw an error if the host is unable to use specified algorithm. |
| **follow**  boolean  | **Choices:*** **no** ←
* yes
 | Whether to follow symlinks or junction points. In the case of `path` pointing to another link, then that will be followed until no more links are found. |
| **get\_checksum**  boolean  | **Choices:*** no
* **yes** ←
 | Whether to return a checksum of the file (default sha1) |
| **path**  path / required  |  | The full path of the file/object to get the facts of; both forward and back slashes are accepted. 
aliases: dest, name |

   
 See Also
--------

  See also

  [ansible.builtin.stat](../builtin/stat_module#ansible-collections-ansible-builtin-stat-module)

The official documentation on the **ansible.builtin.stat** module.

  [ansible.windows.win\_acl](win_acl_module#ansible-collections-ansible-windows-win-acl-module)

The official documentation on the **ansible.windows.win\_acl** module.

  [ansible.windows.win\_file](win_file_module#ansible-collections-ansible-windows-win-file-module)

The official documentation on the **ansible.windows.win\_file** module.

  [ansible.windows.win\_owner](win_owner_module#ansible-collections-ansible-windows-win-owner-module)

The official documentation on the **ansible.windows.win\_owner** module.

    Examples
--------

 
```
- name: Obtain information about a file
  ansible.windows.win_stat:
    path: C:\foo.ini
  register: file_info

- name: Obtain information about a folder
  ansible.windows.win_stat:
    path: C:\bar
  register: folder_info

- name: Get MD5 checksum of a file
  ansible.windows.win_stat:
    path: C:\foo.ini
    get_checksum: yes
    checksum_algorithm: md5
  register: md5_checksum

- debug:
    var: md5_checksum.stat.checksum

- name: Get SHA1 checksum of file
  ansible.windows.win_stat:
    path: C:\foo.ini
    get_checksum: yes
  register: sha1_checksum

- debug:
    var: sha1_checksum.stat.checksum

- name: Get SHA256 checksum of file
  ansible.windows.win_stat:
    path: C:\foo.ini
    get_checksum: yes
    checksum_algorithm: sha256
  register: sha256_checksum

- debug:
    var: sha256_checksum.stat.checksum

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **changed**  boolean  | always | Whether anything was changed  **Sample:** True |
| **stat**  complex  | success | dictionary containing all the stat data  |
|  | **attributes**  string  | success, path exists | Attributes of the file at path in raw form.  **Sample:** Archive, Hidden |
|  | **checksum**  string  | success, path exist, path is a file, get\_checksum == True checksum\_algorithm specified is supported | The checksum of a file based on checksum\_algorithm specified.  **Sample:** 09cb79e8fc7453c84a07f644e441fd81623b7f98 |
|  | **creationtime**  float  | success, path exists | The create time of the file represented in seconds since epoch.  **Sample:** 1477984205.15 |
|  | **exists**  boolean  | success | If the path exists or not.  **Sample:** True |
|  | **extension**  string  | success, path exists, path is a file | The extension of the file at path.  **Sample:** .ps1 |
|  | **filename**  string  | success, path exists, path is a file | The name of the file (without path).  **Sample:** foo.ini |
|  | **hlnk\_targets**  list / elements=string  | success, path exists | List of other files pointing to the same file (hard links), excludes the current file.  **Sample:** ['C:\\temp\\file.txt', 'C:\\Windows\\update.log'] |
|  | **isarchive**  boolean  | success, path exists | If the path is ready for archiving or not.  **Sample:** True |
|  | **isdir**  boolean  | success, path exists | If the path is a directory or not.  **Sample:** True |
|  | **ishidden**  boolean  | success, path exists | If the path is hidden or not.  **Sample:** True |
|  | **isjunction**  boolean  | success, path exists | If the path is a junction point or not.  **Sample:** True |
|  | **islnk**  boolean  | success, path exists | If the path is a symbolic link or not.  **Sample:** True |
|  | **isreadonly**  boolean  | success, path exists | If the path is read only or not.  **Sample:** True |
|  | **isreg**  boolean  | success, path exists | If the path is a regular file.  **Sample:** True |
|  | **isshared**  boolean  | success, path exists | If the path is shared or not.  **Sample:** True |
|  | **lastaccesstime**  float  | success, path exists | The last access time of the file represented in seconds since epoch.  **Sample:** 1477984205.15 |
|  | **lastwritetime**  float  | success, path exists | The last modification time of the file represented in seconds since epoch.  **Sample:** 1477984205.15 |
|  | **lnk\_source**  string  | success, path exists and the path is a symbolic link or junction point | Target of the symlink normalized for the remote filesystem.  **Sample:** C:\temp\link |
|  | **lnk\_target**  string  | success, path exists and the path is a symbolic link or junction point | Target of the symlink. Note that relative paths remain relative.  **Sample:** ..\link |
|  | **nlink**  integer  | success, path exists | Number of links to the file (hard links).  **Sample:** 1 |
|  | **owner**  string  | success, path exists | The owner of the file.  **Sample:** BUILTIN\Administrators |
|  | **path**  string  | success, path exists, file exists | The full absolute path to the file.  **Sample:** C:\foo.ini |
|  | **sharename**  string  | success, path exists, file is a directory and isshared == True | The name of share if folder is shared.  **Sample:** file-share |
|  | **size**  integer  | success, path exists, file is not a link | The size in bytes of a file or folder.  **Sample:** 1024 |

   
  
 ### Authors

 * Chris Church (@cchurch)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_stat_module.html>

ansible.windows.win\_powershell – Run PowerShell scripts
========================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_powershell`.

   New in version 1.5.0: of ansible.windows

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Runs a PowerShell script and outputs the data in a structured format.
* Use [ansible.windows.win\_command](win_command_module#ansible-collections-ansible-windows-win-command-module) or [ansible.windows.win\_shell](win_shell_module#ansible-collections-ansible-windows-win-shell-module) to run a tranditional PowerShell process with stdout, stderr, and rc results.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **arguments**  list / elements=string  |  | A list of arguments to pass to *executable* when running a script in another PowerShell process. These are not arguments to pass to *script*, use *parameters* for that purpose. |
| **chdir**  string  |  | The PowerShell location to set when starting the script. This can be a location in any of the PowerShell providers. The default location is dependent on many factors, if relative paths are used then set this option. |
| **creates**  string  |  | A path or path filter pattern; when the referenced path exists on the target host, the task will be skipped. |
| **depth**  integer  | **Default:**2 | How deep the return values are serialized for `result`, `output`, and `information[x].message_data`. Setting this to a higher value can dramatically increase the amount of data that needs to be returned. |
| **error\_action**  string  | **Choices:*** silently\_continue
* **continue** ←
* stop
 | The `$ErrorActionPreference` to set before executing *script*. 
`silently_continue` will ignore any errors and exceptions raised. 
`continue` is the default behaviour in PowerShell, errors are present in the *error* return value but only terminating exceptions will stop the script from continuing and set it as failed. 
`stop` will treat errors like exceptions, will stop the script and set it as failed. |
| **executable**  string  |  | A custom PowerShell executable to run the script in. When not defined the script will run in the current module PowerShell interpreter. Both the remote PowerShell and the one specified by *executable* must be running on PowerShell v5.1 or newer. Setting this value may change the values returned in the `output` return value depending on the underlying .NET type. |
| **parameters**  dictionary  |  | Parameters to pass into the script as key value pairs. The key corresponds to the parameter name and the value is the value for that parameter. |
| **removes**  string  |  | A path or path filter pattern; when the referenced path **does not** exist on the target host, the task will be skipped. |
| **script**  string / required  |  | The PowerShell script to run. |

   
 Notes
-----

  Note

 * The module is set as failed when a terminating exception is throw, or `error_action=stop` and a normal error record is raised.
* The output values are processed using a custom filter and while it mostly matches the `ConvertTo-Json` result the following value types are different.
* `DateTime` will be an ISO 8601 string in UTC, `DateTimeOffset` will have the offset as specified by the value.
* `Enum` will contain a dictionary with `Type`, `String`, `Value` being the type name, string representation and raw integer value respectively.
* `Type` will contain a dictionary with `Name`, `FullName`, `AssemblyQualifiedName`, `BaseType` being the type name, the type name including the namespace, the full assembly name the type was defined in and the base type it derives from.
* The script has access to the `$Ansible` variable where it can set `Result`, `Changed`, `Failed`, or access `Tmpdir`.
* `$Ansible.Result` is a value that is returned back to the controller as is.
* `$Ansible.Changed` can be set to `true` or `false` to reflect whether the module made a change or not. By default this is set to `true`.
* `$Ansible.Failed` can be set to `true` if the script wants to return the failure back to the controller.
* `$Ansible.Tmpdir` is the path to a temporary directory to use as a scratch location that is cleaned up after the module has finished.
* Any host/console output like `Write-Host` or `[Console]::WriteLine` is not considered an output object, they are returned as a string in *host\_out* and *host\_err*.
* The module will skip running the script when in check mode unless the script defines `[CmdletBinding(SupportsShouldProcess`]).

  See Also
--------

  See also

  [ansible.windows.win\_command](win_command_module#ansible-collections-ansible-windows-win-command-module)

The official documentation on the **ansible.windows.win\_command** module.

  [ansible.windows.win\_shell](win_shell_module#ansible-collections-ansible-windows-win-shell-module)

The official documentation on the **ansible.windows.win\_shell** module.

    Examples
--------

 
```
- name: Run basic PowerShell script
  ansible.windows.win_powershell:
    script: |
      echo "Hello World"

- name: Run PowerShell script with parameters
  ansible.windows.win_powershell:
    script: |
      [CmdletBinding()]
      param (
          [String]
          $Path,

          [Switch]
          $Force
      )

      New-Item -Path $Path -ItemType Direcotry -Force:$Force
    parameters:
      Path: C:\temp
      Force: true

- name: Run PowerShell script that modifies the module changed result
  ansible.windows.win_powershell:
    script: |
      if (Get-Service -Name test -ErrorAction SilentlyContinue) {
          Remove-Service -Name test
      }
      else {
          $Ansible.Changed = $false
      }

- name: Run PowerShell script in PowerShell 7
  ansible.windows.win_powershell:
    script: |
      $PSVersionTable.PSVersion.Major
    executable: pwsh.exe
    arguments:
    - -ExecutionPolicy
    - ByPass
  register: pwsh_output
  failed_when:
  - pwsh_output.output[0] != 7

- name: Run code in check mode
  ansible.windows.win_powershell:
    script: |
      [CmdletBinding(SupportsShouldProcess)]
      param ()

      # Use $Ansible to detect check mode
      if ($Ansible.CheckMode) {
          echo 'running in check mode'
      }
      else {
          echo 'running in normal mode'
      }

      # Use builtin ShouldProcess (-WhatIf)
      if ($PSCmdlet.ShouldProcess('target')) {
          echo 'also running in normal mode'
      }
      else {
          echo 'also running in check mode'
      }
  check_mode: yes

- name: Return a failure back to Ansible
  ansible.windows.win_powershell:
    script: |
      if (Test-Path C:\bad.file) {
          $Ansible.Failed = $true
      }

- name: Define when the script made a change or not
  ansible.windows.win_powershell:
    script: |
      if ((Get-Item WSMan:\localhost\Service\Auth\Basic).Value -eq 'true') {
          Set-Item WSMan:\localhost\Service\Auth\Basic -Value false
      }
      else {
          $Ansible.Changed = $true
      }

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **debug**  list / elements=string  | always | A list of warning messages created by the script. Debug messages only appear when `$DebugPreference = 'Continue'`.  **Sample:** ['debug record'] |
| **error**  list / elements=dictionary  | always | A list of error records created by the script.  |
|  | **category\_info**  dictionary  | success | More information about the error record.  |
|  |  | **activity**  string  | always | Description of the operation which encountered the error.  **Sample:** Write-Error |
|  |  | **category**  string  | always | The category name of the error record.  **Sample:** NotSpecified |
|  |  | **category\_id**  integer  | always | The integer representation of the category.  |
|  |  | **reason**  string  | always | Description of the error.  **Sample:** WriteErrorException |
|  |  | **target\_name**  string  | always | Description of the target object. Can be an empty string if no target was specified.  **Sample:** C:\Windows |
|  |  | **target\_type**  string  | always | Description of the type of the target object. Can be an empty string if no target object was specified.  **Sample:** String |
|  | **error\_details**  dictionary  | success | Additional details about an ErrorRecord. Can be null if there are not additional details.  |
|  |  | **message**  string  | always | Message for the error record.  **Sample:** Specific error message |
|  |  | **recommended\_action**  string  | always | Recommended action in the even that this error occurs. This is empty unless the code which generates the error adds this explicitly.  **Sample:** Delete file |
|  | **exception**  dictionary  | success | Details about the exception behind the error record.  |
|  |  | **help\_link**  string  | always | A link to the help details for the exception. May not be set as it's dependent on whether the .NET exception class provides this info.  **Sample:** http://docs.ansible.com/ |
|  |  | **hresult**  integer  | always | The signed integer assigned to this exception. May not be set as it's dependent on whether the .NET exception class provides this info.  **Sample:** -1 |
|  |  | **inner\_exception**  dictionary  | always | The inner exception details if there is one present. The dict contains the same keys as a normal exception.  |
|  |  | **message**  string  | always | The exception message.  **Sample:** The method ran into an error |
|  |  | **source**  string  | always | Name of the application or object that causes the error. This may be an empty string as it's dependent on the code that raises the exception.  **Sample:** C:\Windows |
|  |  | **type**  string  | always | The full .NET type of the Exception class.  **Sample:** System.Exception |
|  | **fully\_qualified\_error\_id**  string  | always | The unique identifier for the error condition May be null if no id was specified when the record was created.  **Sample:** ParameterBindingFailed |
|  | **output**  string  | always | The formatted error record message as typically seen in a PowerShell console.  **Sample:** Write-Error "error" : error + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException |
|  | **pipeline\_iteration\_info**  list / elements=integer  | always | The status of the pipeline when this record was created. The values are 0 index based. Each element entry represents the command index in a pipeline statement. The value of each element represents the pipeline input idx in that command. For Example `'C:\Windows', 'C:\temp' | Get-ChildItem | Get-Item`, `[1, 2, 9]` represents an error occured with the 2nd output, 3rd, and 9th output of the 1st, 2nd, and 3rd command in that pipeline respectively.  **Sample:** [0, 0] |
|  | **script\_stack\_trace**  string  | always | The script stack trace for the error record.  **Sample:** at <ScriptBlock>, <No file>: line 1 |
|  | **target\_object**  string  | always | The object which the error occured. May be null if no object was specified when the record was created.  **Sample:** C:\Windows |
| **host\_err**  string  | always | The strings written to the host error output, typically the stderr. This is not the same as objects sent to the error stream in PowerShell.  **Sample:** Error 1 Error 2 |
| **host\_out**  string  | always | The strings written to the host output, typically the stdout. This is not the same as objects sent to the output stream in PowerShell.  **Sample:** Line 1 Line 2 |
| **information**  list / elements=dictionary  | always | A list of information records created by the script. The information stream was only added in PowerShell v5, older versions will always have an empty list as a value.  |
|  | **message\_data**  complex  | always | Message data associated with the record. The value here can be of any type.  **Sample:** information record |
|  | **source**  string  | always | The source of the record.  **Sample:** Write-Information |
|  | **tags**  list / elements=string  | always | A list of tags associated with the record.  **Sample:** ['Host'] |
|  | **time\_generated**  string  | always | The time the record was generated. This is the time in UTC as an ISO 8601 formatted string.  **Sample:** 2021-02-11T04:46:00.4694240Z |
| **output**  list / elements=string  | always | A list containing all the objects outputted by the script. The list elements can be anything as it is based on what was ran.  **Sample:** ['output 1', 2, ['inner list'], {'key': 'value'}, 'None'] |
| **result**  complex  | always | The values that were set by `$Ansible.Result` in the script. Defaults to an empty dict but can be set to anything by the script.  **Sample:** {'key': 'value', 'other key': 1} |
| **verbose**  list / elements=string  | always | A list of warning messages created by the script. Verbose messages only appear when `$VerbosePreference = 'Continue'`.  **Sample:** ['verbose record'] |
| **warning**  list / elements=string  | always | A list of warning messages created by the script. Warning messages only appear when `$WarningPreference = 'Continue'`.  **Sample:** ['warning record'] |

   
  
 ### Authors

 * Jordan Borean (@jborean93)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_powershell_module.html>

ansible.windows.win\_regedit – Add, change, or remove registry keys and values
==============================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_regedit`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Add, modify or remove registry keys and values.
* More information about the windows registry from Wikipedia <https://en.wikipedia.org/wiki/Windows_Registry>.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **data**  raw  |  | Value of the registry entry `name` in `path`. If not specified then the value for the property will be null for the corresponding `type`. Binary and None data should be expressed in a yaml byte array or as comma separated hex values. An easy way to generate this is to run `regedit.exe` and use the *export* option to save the registry values to a file. In the exported file, binary value will look like `hex:be,ef,be,ef`, the `hex:` prefix is optional. DWORD and QWORD values should either be represented as a decimal number or a hex value. Multistring values should be passed in as a list. See the examples for more details on how to format this data. |
| **delete\_key**  boolean  | **Choices:*** no
* **yes** ←
 | When `state` is 'absent' then this will delete the entire key. If `no` then it will only clear out the '(Default)' property for that key. |
| **hive**  path  |  | A path to a hive key like C:\Users\Default\NTUSER.DAT to load in the registry. This hive is loaded under the HKLM:\ANSIBLE key which can then be used in *name* like any other path. This can be used to load the default user profile registry hive or any other hive saved as a file. Using this function requires the user to have the `SeRestorePrivilege` and `SeBackupPrivilege` privileges enabled. |
| **name**  string  |  | Name of the registry entry in the above `path` parameters. If not provided, or empty then the '(Default)' property for the key will be used. 
aliases: entry, value |
| **path**  string / required  |  | Name of the registry path. Should be in one of the following registry hives: HKCC, HKCR, HKCU, HKLM, HKU. 
aliases: key |
| **state**  string  | **Choices:*** absent
* **present** ←
 | The state of the registry entry. |
| **type**  string  | **Choices:*** none
* binary
* dword
* expandstring
* multistring
* **string** ←
* qword
 | The registry value data type. 
aliases: datatype |

   
 Notes
-----

  Note

 * Check-mode `-C/--check` and diff output `-D/--diff` are supported, so that you can test every change against the active configuration before applying changes.
* Beware that some registry hives (`HKEY_USERS` in particular) do not allow to create new registry paths in the root folder.

  See Also
--------

  See also

  [ansible.windows.win\_reg\_stat](win_reg_stat_module#ansible-collections-ansible-windows-win-reg-stat-module)

The official documentation on the **ansible.windows.win\_reg\_stat** module.

  ansible.windows.win\_regmerge

The official documentation on the **ansible.windows.win\_regmerge** module.

    Examples
--------

 
```
- name: Create registry path MyCompany
  ansible.windows.win_regedit:
    path: HKCU:\Software\MyCompany

- name: Add or update registry path MyCompany, with entry 'hello', and containing 'world'
  ansible.windows.win_regedit:
    path: HKCU:\Software\MyCompany
    name: hello
    data: world

- name: Add or update registry path MyCompany, with dword entry 'hello', and containing 1337 as the decimal value
  ansible.windows.win_regedit:
    path: HKCU:\Software\MyCompany
    name: hello
    data: 1337
    type: dword

- name: Add or update registry path MyCompany, with dword entry 'hello', and containing 0xff2500ae as the hex value
  ansible.windows.win_regedit:
    path: HKCU:\Software\MyCompany
    name: hello
    data: 0xff2500ae
    type: dword

- name: Add or update registry path MyCompany, with binary entry 'hello', and containing binary data in hex-string format
  ansible.windows.win_regedit:
    path: HKCU:\Software\MyCompany
    name: hello
    data: hex:be,ef,be,ef,be,ef,be,ef,be,ef
    type: binary

- name: Add or update registry path MyCompany, with binary entry 'hello', and containing binary data in yaml format
  ansible.windows.win_regedit:
    path: HKCU:\Software\MyCompany
    name: hello
    data: [0xbe,0xef,0xbe,0xef,0xbe,0xef,0xbe,0xef,0xbe,0xef]
    type: binary

- name: Add or update registry path MyCompany, with expand string entry 'hello'
  ansible.windows.win_regedit:
    path: HKCU:\Software\MyCompany
    name: hello
    data: '%appdata%\local'
    type: expandstring

- name: Add or update registry path MyCompany, with multi string entry 'hello'
  ansible.windows.win_regedit:
    path: HKCU:\Software\MyCompany
    name: hello
    data: ['hello', 'world']
    type: multistring

- name: Disable keyboard layout hotkey for all users (changes existing)
  ansible.windows.win_regedit:
    path: HKU:\.DEFAULT\Keyboard Layout\Toggle
    name: Layout Hotkey
    data: 3
    type: dword

- name: Disable language hotkey for current users (adds new)
  ansible.windows.win_regedit:
    path: HKCU:\Keyboard Layout\Toggle
    name: Language Hotkey
    data: 3
    type: dword

- name: Remove registry path MyCompany (including all entries it contains)
  ansible.windows.win_regedit:
    path: HKCU:\Software\MyCompany
    state: absent
    delete_key: yes

- name: Clear the existing (Default) entry at path MyCompany
  ansible.windows.win_regedit:
    path: HKCU:\Software\MyCompany
    state: absent
    delete_key: no

- name: Remove entry 'hello' from registry path MyCompany
  ansible.windows.win_regedit:
    path: HKCU:\Software\MyCompany
    name: hello
    state: absent

- name: Change default mouse trailing settings for new users
  ansible.windows.win_regedit:
    path: HKLM:\ANSIBLE\Control Panel\Mouse
    name: MouseTrails
    data: 10
    type: string
    state: present
    hive: C:\Users\Default\NTUSER.dat

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **data\_changed**  boolean  | success | Whether this invocation changed the data in the registry value.  |
| **data\_type\_changed**  boolean  | success | Whether this invocation changed the datatype of the registry value.  **Sample:** True |

   
  
 ### Authors

 * Adam Keech (@smadam813)
* Josh Ludwig (@joshludwig)
* Jordan Borean (@jborean93)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_regedit_module.html>

ansible.windows.win\_service\_info – Gather information about Windows services
==============================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_service_info`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Gather information about all or a specific installed Windows service(s).

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name**  string  |  | If specified, this is used to match the `name` or `display_name` of the Windows service to get the info for. Can be a wildcard to match multiple services but the wildcard will only be matched on the `name` of the service and not `display_name`. If omitted then all services will returned. |

   
 See Also
--------

  See also

  [ansible.windows.win\_service](win_service_module#ansible-collections-ansible-windows-win-service-module)

The official documentation on the **ansible.windows.win\_service** module.

    Examples
--------

 
```
- name: Get info for all installed services
  ansible.windows.win_service_info:
  register: service_info

- name: Get info for a single service
  ansible.windows.win_service_info:
    name: WinRM
  register: service_info

- name: Get info for a service using its display name
  ansible.windows.win_service_info:
    name: Windows Remote Management (WS-Management)

- name: Find all services that start with 'win'
  ansible.windows.win_service_info:
    name: win*

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **exists**  boolean  | always | Whether any services were found based on the criteria specified.  **Sample:** True |
| **services**  list / elements=dictionary  | always | A list of service(s) that were found based on the criteria. Will be an empty list if no services were found.  |
|  | **checkpoint**  integer  | success | A check-point value that the service increments periodically to report its progress.  |
|  | **controls\_accepted**  list / elements=string  | success | A list of controls that the service can accept. Common controls are `stop`, `pause_continue`, `shutdown`.  **Sample:** ['stop', 'shutdown'] |
|  | **dependencies**  list / elements=string  | success | A list of services by their `name` that this service is dependent on.  **Sample:** ['HTTP', 'RPCSS'] |
|  | **dependency\_of**  list / elements=string  | success | A list of services by their `name` that depend on this service.  **Sample:** ['upnphost', 'WMPNetworkSvc'] |
|  | **description**  string  | success | The description of the service.  **Sample:** Example description of the Windows service. |
|  | **desktop\_interact**  boolean  | success | Whether the service can interact with the desktop, only valid for services running as `SYSTEM`.  |
|  | **display\_name**  string  | success | The display name to be used by SCM to identify the service.  **Sample:** Windows Remote Management (WS-Management) |
|  | **error\_control**  string  | success | The action to take if a service fails to start. Common values are `critical`, `ignore`, `normal`, `severe`.  **Sample:** normal |
|  | **failure\_action\_on\_non\_crash\_failure**  boolean  | success | Controls when failure actions are fired based on how the service was stopped.  |
|  | **failure\_actions**  list / elements=dictionary  | success | A list of failure actions to run in the event of a failure.  |
|  |  | **delay\_ms**  integer  | success | The time to wait, in milliseconds, before performing the specified action.  **Sample:** 120000 |
|  |  | **type**  string  | success | The action that will be performed. Common values are `none`, `reboot`, `restart`, `run_command`.  **Sample:** run\_command |
|  | **failure\_command**  string  | success | The command line that will be run when a `run_command` failure action is fired.  **Sample:** runme.exe |
|  | **failure\_reboot\_msg**  string  | success | The message to be broadcast to server users before rebooting when a `reboot` failure action is fired.  **Sample:** Service failed, rebooting host. |
|  | **failure\_reset\_period\_sec**  integer  | success | The time, in seconds, after which to reset the failure count to zero.  **Sample:** 86400 |
|  | **launch\_protection**  string  | success | The protection type of the service. Common values are `none`, `windows`, `windows_light`, or `antimalware_light`.  **Sample:** none |
|  | **load\_order\_group**  string  | success | The name of the load ordering group to which the service belongs. Will be an empty string if it does not belong to any group.  **Sample:** My group |
|  | **name**  string  | success | The name of the service.  **Sample:** WinRM |
|  | **path**  string  | success | The path to the service binary and any arguments used when starting the service. The binary part can be quoted to ensure any spaces in path are not treated as arguments.  **Sample:** C:\Windows\System32\svchost.exe -k netsvcs -p |
|  | **pre\_shutdown\_timeout\_ms**  integer  | success | The preshutdown timeout out value in milliseconds.  **Sample:** 10000 |
|  | **preferred\_node**  integer  | success | The node number for the preferred node. This will be `null` if the Windows host has no NUMA configuration.  |
|  | **process\_id**  integer  | success | The process identifier of the running service.  **Sample:** 5135 |
|  | **required\_privileges**  list / elements=string  | success | A list of privileges that the service requires and will run with  **Sample:** ['SeBackupPrivilege', 'SeRestorePrivilege'] |
|  | **service\_exit\_code**  integer  | success | A service-specific error code that is set while the service is starting or stopping.  |
|  | **service\_flags**  list / elements=string  | success | Shows more information about the behaviour of a running service. Currently the only flag that can be set is `runs_in_system_process`.  **Sample:** ['runs\_in\_system\_process'] |
|  | **service\_type**  string  | success | The type of service. Common types are `win32_own_process`, `win32_share_process`, `user_own_process`, `user_share_process`, `kernel_driver`.  **Sample:** win32\_own\_process |
|  | **sid\_info**  string  | success | The behavior of how the service's access token is generated and how to add the service SID to the token. Common values are `none`, `restricted`, or `unrestricted`.  **Sample:** none |
|  | **start\_mode**  string  | success | When the service is set to start. Common values are `auto`, `manual`, `disabled`, `delayed`.  **Sample:** auto |
|  | **state**  string  | success | The current running state of the service. Common values are `stopped`, `start_pending`, `stop_pending`, `started`, `continue_pending`, `pause_pending`, `paused`.  **Sample:** started |
|  | **triggers**  list / elements=dictionary  | success | A list of triggers defined for the service.  |
|  |  | **action**  string  | success | The action to perform once triggered, can be `start_service` or `stop_service`.  **Sample:** start\_service |
|  |  | **data\_items**  list / elements=dictionary  | success | A list of trigger data items that contain trigger specific data. A trigger can contain 0 or multiple data items.  |
|  |  |  | **data**  complex  | success | The trigger data item value. Can be a string, list of string, int, or base64 string of binary data.  **Sample:** named pipe |
|  |  |  | **type**  string  | success | The type of `data` for the trigger. Common values are `string`, `binary`, `level`, `keyword_any`, or `keyword_all`.  **Sample:** string |
|  |  | **sub\_type**  string  | success | The trigger event sub type that is specific to each `type`. Common values are `named_pipe_event`, `domain_join`, `domain_leave`, `firewall_port_open`, and others.  |
|  |  | **sub\_type\_guid**  string  | success | The guid which represents the trigger sub type.  **Sample:** 1ce20aba-9851-4421-9430-1ddeb766e809 |
|  |  | **type**  string  | success | The trigger event type. Common values are `custom`, `rpc_interface_event`, `domain_join`, `group_policy`, and others.  **Sample:** domain\_join |
|  | **username**  string  | success | The username used to run the service. Can be null for user services and certain driver services.  **Sample:** NT AUTHORITY\SYSTEM |
|  | **wait\_hint\_ms**  integer  | success | The estimated time in milliseconds required for a pending start, stop, pause,or continue operations.  |
|  | **win32\_exitcode**  integer  | success | The error code returned from the service binary once it has stopped. When set to `1066` then a service specific error is returned on `service_exit_code`.  |

   
  
 ### Authors

 * Jordan Borean (@jborean93)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_service_info_module.html>

ansible.windows.win\_share – Manage Windows shares
==================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_share`.

  * [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Add, modify or remove Windows share and set share permissions.

 Requirements
------------

 The below requirements are needed on the host that executes this module.

 * As this module used newer cmdlets like New-SmbShare this can only run on Windows 8 / Windows 2012 or newer.
* This is due to the reliance on the WMI provider MSFT\_SmbShare <https://msdn.microsoft.com/en-us/library/hh830471> which was only added with these Windows releases.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **caching\_mode**  string  | **Choices:*** BranchCache
* Documents
* **Manual** ←
* None
* Programs
* Unknown
 | Set the CachingMode for this share. |
| **change**  string  |  | Specify user list that should get read and write access on share, separated by comma. |
| **deny**  string  |  | Specify user list that should get no access, regardless of implied access on share, separated by comma. |
| **description**  string  |  | Share description. |
| **encrypt**  boolean  | **Choices:*** **no** ←
* yes
 | Sets whether to encrypt the traffic to the share or not. |
| **full**  string  |  | Specify user list that should get full access on share, separated by comma. |
| **list**  boolean  | **Choices:*** **no** ←
* yes
 | Specify whether to allow or deny file listing, in case user has no permission on share. Also known as Access-Based Enumeration. |
| **name**  string / required  |  | Share name. |
| **path**  path / required  |  | Share directory. |
| **read**  string  |  | Specify user list that should get read access on share, separated by comma. |
| **rule\_action**  string  | **Choices:*** **set** ←
* add
 | Whether to add or set (replace) access control entries. |
| **state**  string  | **Choices:*** absent
* **present** ←
 | Specify whether to add `present` or remove `absent` the specified share. |

   
 Examples
--------

 
```
- name: Add secret share
  ansible.windows.win_share:
    name: internal
    description: top secret share
    path: C:\shares\internal
    list: no
    full: Administrators,CEO
    read: HR-Global
    deny: HR-External

- name: Add public company share
  ansible.windows.win_share:
    name: company
    description: top secret share
    path: C:\shares\company
    list: yes
    full: Administrators,CEO
    read: Global

- name: Remove previously added share
  ansible.windows.win_share:
    name: internal
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **actions**  list / elements=string  | success | A list of action cmdlets that were run by the module.  **Sample:** ['New-SmbShare -Name share -Path C:\\temp'] |

   
  
 ### Authors

 * Hans-Joachim Kliemeck (@h0nIg)
* David Baumann (@daBONDi)
* Shachaf Goldstein (@Shachaf92)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_share_module.html>

ansible.windows.win\_shell – Execute shell commands on target hosts
===================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_shell`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * The [ansible.windows.win\_shell](#ansible-collections-ansible-windows-win-shell-module) module takes the command name followed by a list of space-delimited arguments. It is similar to the [ansible.windows.win\_command](win_command_module#ansible-collections-ansible-windows-win-command-module) module, but runs the command via a shell (defaults to PowerShell) on the target host.
* For non-Windows targets, use the [ansible.builtin.shell](../builtin/shell_module#ansible-collections-ansible-builtin-shell-module) module instead.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **chdir**  path  |  | Set the specified path as the current working directory before executing a command |
| **creates**  path  |  | A path or path filter pattern; when the referenced path exists on the target host, the task will be skipped. |
| **executable**  path  |  | Change the shell used to execute the command (eg, `cmd`). The target shell must accept a `/c` parameter followed by the raw command line to be executed. |
| **free\_form**  string / required  |  | The [ansible.windows.win\_shell](win_shell_module) module takes a free form command to run. There is no parameter actually named 'free form'. See the examples! |
| **no\_profile**  boolean  | **Choices:*** **no** ←
* yes
 | Do not load the user profile before running a command. This is only valid when using PowerShell as the executable. |
| **output\_encoding\_override**  string  |  | This option overrides the encoding of stdout/stderr output. You can use this option when you need to run a command which ignore the console's codepage. You should only need to use this option in very rare circumstances. This value can be any valid encoding `Name` based on the output of `[System.Text.Encoding]::GetEncodings(`). See <https://docs.microsoft.com/dotnet/api/system.text.encoding.getencodings>. |
| **removes**  path  |  | A path or path filter pattern; when the referenced path **does not** exist on the target host, the task will be skipped. |
| **stdin**  string  |  | Set the stdin of the command directly to the specified value. |

   
 Notes
-----

  Note

 * If you want to run an executable securely and predictably, it may be better to use the [ansible.windows.win\_command](win_command_module#ansible-collections-ansible-windows-win-command-module) module instead. Best practices when writing playbooks will follow the trend of using [ansible.windows.win\_command](win_command_module#ansible-collections-ansible-windows-win-command-module) unless `win_shell` is explicitly required. When running ad-hoc commands, use your best judgement.
* WinRM will not return from a command execution until all child processes created have exited. Thus, it is not possible to use [ansible.windows.win\_shell](#ansible-collections-ansible-windows-win-shell-module) to spawn long-running child or background processes. Consider creating a Windows service for managing background processes. - Consider using [ansible.windows.win\_powershell](win_powershell_module#ansible-collections-ansible-windows-win-powershell-module) if you want to capture the output from the PowerShell script as structured objects.

  See Also
--------

  See also

  [community.windows.psexec](../../community/windows/psexec_module#ansible-collections-community-windows-psexec-module)

The official documentation on the **community.windows.psexec** module.

  [ansible.builtin.raw](../builtin/raw_module#ansible-collections-ansible-builtin-raw-module)

The official documentation on the **ansible.builtin.raw** module.

  [ansible.builtin.script](../builtin/script_module#ansible-collections-ansible-builtin-script-module)

The official documentation on the **ansible.builtin.script** module.

  [ansible.builtin.shell](../builtin/shell_module#ansible-collections-ansible-builtin-shell-module)

The official documentation on the **ansible.builtin.shell** module.

  [ansible.windows.win\_command](win_command_module#ansible-collections-ansible-windows-win-command-module)

The official documentation on the **ansible.windows.win\_command** module.

  [ansible.windows.win\_powershell](win_powershell_module#ansible-collections-ansible-windows-win-powershell-module)

The official documentation on the **ansible.windows.win\_powershell** module.

  [community.windows.win\_psexec](../../community/windows/win_psexec_module#ansible-collections-community-windows-win-psexec-module)

The official documentation on the **community.windows.win\_psexec** module.

    Examples
--------

 
```
- name: Execute a command in the remote shell, stdout goes to the specified file on the remote
  ansible.windows.win_shell: C:\somescript.ps1 >> C:\somelog.txt

- name: Change the working directory to somedir/ before executing the command
  ansible.windows.win_shell: C:\somescript.ps1 >> C:\somelog.txt
  args:
    chdir: C:\somedir

- name: Run a command with an idempotent check on what it creates, will only run when somedir/somelog.txt does not exist
  ansible.windows.win_shell: C:\somescript.ps1 >> C:\somelog.txt
  args:
    chdir: C:\somedir
    creates: C:\somelog.txt

- name: Run a command under a non-Powershell interpreter (cmd in this case)
  ansible.windows.win_shell: echo %HOMEDIR%
  args:
    executable: cmd
  register: homedir_out

- name: Run multi-lined shell commands
  ansible.windows.win_shell: |
    $value = Test-Path -Path C:\temp
    if ($value) {
        Remove-Item -Path C:\temp -Force
    }
    New-Item -Path C:\temp -ItemType Directory

- name: Retrieve the input based on stdin
  ansible.windows.win_shell: '$string = [Console]::In.ReadToEnd(); Write-Output $string.Trim()'
  args:
    stdin: Input message

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **cmd**  string  | always | The command executed by the task.  **Sample:** rabbitmqctl join\_cluster rabbit@main |
| **delta**  string  | always | The command execution delta time.  **Sample:** 0:00:00.325771 |
| **end**  string  | always | The command execution end time.  **Sample:** 2016-02-25 09:18:26.755339 |
| **msg**  boolean  | always | Changed.  **Sample:** True |
| **rc**  integer  | always | The command return code (0 means success).  |
| **start**  string  | always | The command execution start time.  **Sample:** 2016-02-25 09:18:26.429568 |
| **stderr**  string  | always | The command standard error.  **Sample:** ls: cannot access foo: No such file or directory |
| **stdout**  string  | always | The command standard output.  **Sample:** Clustering node rabbit@slave1 with rabbit@main ... |
| **stdout\_lines**  list / elements=string  | always | The command standard output split in lines.  **Sample:** ["u'Clustering node rabbit@slave1 with rabbit@main ...'"] |

   
  
 ### Authors

 * Matt Davis (@nitzmahone)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_shell_module.html>

ansible.windows.win\_tempfile – Creates temporary files and directories
=======================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_tempfile`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Creates temporary files and directories.
* For non-Windows targets, please use the [ansible.builtin.tempfile](../builtin/tempfile_module#ansible-collections-ansible-builtin-tempfile-module) module instead.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **path**  path  | **Default:**"%TEMP%" | Location where temporary file or directory should be created. If path is not specified default system temporary directory (%TEMP%) will be used. 
aliases: dest |
| **prefix**  string  | **Default:**"ansible." | Prefix of file/directory name created by module. |
| **state**  string  | **Choices:*** directory
* **file** ←
 | Whether to create file or directory. |
| **suffix**  string  | **Default:**"" | Suffix of file/directory name created by module. |

   
 See Also
--------

  See also

  [ansible.builtin.tempfile](../builtin/tempfile_module#ansible-collections-ansible-builtin-tempfile-module)

The official documentation on the **ansible.builtin.tempfile** module.

    Examples
--------

 
```
- name: Create temporary build directory
  ansible.windows.win_tempfile:
    state: directory
    suffix: build

- name: Create temporary file
  ansible.windows.win_tempfile:
    state: file
    suffix: temp

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **path**  string  | success | The absolute path to the created file or directory.  **Sample:** C:\Users\Administrator\AppData\Local\Temp\ansible.bMlvdk |

   
  
 ### Authors

 * Dag Wieers (@dagwieers)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_tempfile_module.html>

ansible.windows.win\_template – Template a file out to a remote server
======================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_template`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Templates are processed by the [Jinja2 templating language](http://jinja.pocoo.org/docs/).
* Documentation on the template formatting can be found in the [Template Designer Documentation](http://jinja.pocoo.org/docs/templates/).
* Additional variables listed below can be used in templates.
* `ansible_managed` (configurable via the `defaults` section of `ansible.cfg`) contains a string which can be used to describe the template name, host, modification time of the template file and the owner uid.
* `template_host` contains the node name of the template’s machine.
* `template_uid` is the numeric user id of the owner.
* `template_path` is the path of the template.
* `template_fullpath` is the absolute path of the template.
* `template_destpath` is the path of the template on the remote system (added in 2.8).
* `template_run_date` is the date that the template was rendered.

  Note

 This module has a corresponding [action plugin](../../../plugins/action#action-plugins).

  Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **backup**  boolean  | **Choices:*** **no** ←
* yes
 | Determine whether a backup should be created. When set to `yes`, create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. |
| **block\_end\_string**  string  | **Default:**"%}" | The string marking the end of a block. |
| **block\_start\_string**  string  | **Default:**"{%" | The string marking the beginning of a block. |
| **dest**  path / required  |  | Location to render the template to on the remote machine. |
| **force**  boolean  | **Choices:*** no
* **yes** ←
 | Determine when the file is being transferred if the destination already exists. When set to `yes`, replace the remote file when contents are different than the source. When set to `no`, the file will only be transferred if the destination does not exist. |
| **lstrip\_blocks**  boolean  | **Choices:*** **no** ←
* yes
 | Determine when leading spaces and tabs should be stripped. When set to `yes` leading spaces and tabs are stripped from the start of a line to a block. This functionality requires Jinja 2.7 or newer. |
| **newline\_sequence**  string  | **Choices:*** \n
* \r
* **\r\n** ←
 | Specify the newline sequence to use for templating files. |
| **output\_encoding**  string  | **Default:**"utf-8" | Overrides the encoding used to write the template file defined by `dest`. It defaults to `utf-8`, but any encoding supported by python can be used. The source template file must always be encoded using `utf-8`, for homogeneity. |
| **src**  path / required  |  | Path of a Jinja2 formatted template on the Ansible controller. This can be a relative or an absolute path. The file must be encoded with `utf-8` but *output\_encoding* can be used to control the encoding of the output template. |
| **trim\_blocks**  boolean  | **Choices:*** no
* **yes** ←
 | Determine when newlines should be removed from blocks. When set to `yes` the first newline after a block is removed (block, not variable tag!). |
| **variable\_end\_string**  string  | **Default:**"}}" | The string marking the end of a print statement. |
| **variable\_start\_string**  string  | **Default:**"{{" | The string marking the beginning of a print statement. |

   
 Notes
-----

  Note

 * Including a string that uses a date in the template will result in the template being marked ‘changed’ each time.
* Also, you can override jinja2 settings by adding a special header to template file. i.e. `#jinja2:variable_start_string:'[%', variable_end_string:'%]', trim_blocks: False` which changes the variable interpolation markers to `[% var %]` instead of `{{ var }}`. This is the best way to prevent evaluation of things that look like, but should not be Jinja2.
* Using raw/endraw in Jinja2 will not work as you expect because templates in Ansible are recursively evaluated.
* To find Byte Order Marks in files, use `Format-Hex <file> -Count 16` on Windows, and use `od -a -t x1 -N 16 <file>` on Linux.
* Beware fetching files from windows machines when creating templates because certain tools, such as Powershell ISE, and regedit’s export facility add a Byte Order Mark as the first character of the file, which can cause tracebacks.
* You can use the [ansible.windows.win\_copy](win_copy_module#ansible-collections-ansible-windows-win-copy-module) module with the `content:` option if you prefer the template inline, as part of the playbook.
* For Linux you can use [ansible.builtin.template](../builtin/template_module#ansible-collections-ansible-builtin-template-module) which uses ‘\n’ as `newline_sequence` by default.

  See Also
--------

  See also

  [ansible.windows.win\_copy](win_copy_module#ansible-collections-ansible-windows-win-copy-module)

The official documentation on the **ansible.windows.win\_copy** module.

  [ansible.builtin.copy](../builtin/copy_module#ansible-collections-ansible-builtin-copy-module)

The official documentation on the **ansible.builtin.copy** module.

  [ansible.builtin.template](../builtin/template_module#ansible-collections-ansible-builtin-template-module)

The official documentation on the **ansible.builtin.template** module.

    Examples
--------

 
```
- name: Create a file from a Jinja2 template
  ansible.windows.win_template:
    src: /mytemplates/file.conf.j2
    dest: C:\Temp\file.conf

- name: Create a Unix-style file from a Jinja2 template
  ansible.windows.win_template:
    src: unix/config.conf.j2
    dest: C:\share\unix\config.conf
    newline_sequence: '\n'
    backup: yes

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **backup\_file**  string  | if backup=yes | Name of the backup file that was created.  **Sample:** C:\Path\To\File.txt.11540.20150212-220915.bak |

   
  
 ### Authors

 * Jon Hawkesworth (@jhawkesworth)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_template_module.html>

ansible.windows.win\_user – Manages local Windows user accounts
===============================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_user`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Manages local Windows user accounts.
* For non-Windows targets, use the [ansible.builtin.user](../builtin/user_module#ansible-collections-ansible-builtin-user-module) module instead.

 Parameters
----------

 

| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account\_disabled**  boolean  | **Choices:*** no
* yes
 | 
`yes` will disable the user account. 
`no` will clear the disabled flag. |
| **account\_locked**  boolean  | **Choices:*** no
* yes
 | Only `no` can be set and it will unlock the user account if locked. |
| **description**  string  |  | Description of the user. |
| **fullname**  string  |  | Full name of the user. |
| **groups**  list / elements=string  |  | Adds or removes the user from this comma-separated list of groups, depending on the value of *groups\_action*. When *groups\_action* is `replace` and *groups* is set to the empty string ('groups='), the user is removed from all groups. Since `ansible.windows v1.5.0` it is possible to specify a group using it's security identifier. |
| **groups\_action**  string  | **Choices:*** add
* **replace** ←
* remove
 | If `add`, the user is added to each group in *groups* where not already a member. If `replace`, the user is added as a member of each group in *groups* and removed from any other groups. If `remove`, the user is removed from each group in *groups*. |
| **home\_directory**  string   added in 1.0.0 of ansible.windows  |  | The designated home directory of the user. |
| **login\_script**  string   added in 1.0.0 of ansible.windows  |  | The login script of the user. |
| **name**  string / required  |  | Name of the user to create, remove or modify. |
| **password**  string  |  | Optionally set the user's password to this (plain text) value. |
| **password\_expired**  boolean  | **Choices:*** no
* yes
 | 
`yes` will require the user to change their password at next login. 
`no` will clear the expired password flag. |
| **password\_never\_expires**  boolean  | **Choices:*** no
* yes
 | 
`yes` will set the password to never expire. 
`no` will allow the password to expire. |
| **profile**  string   added in 1.0.0 of ansible.windows  |  | The profile path of the user. |
| **state**  string  | **Choices:*** absent
* **present** ←
* query
 | When `absent`, removes the user account if it exists. When `present`, creates or updates the user account. When `query`, retrieves the user account details without making any changes. |
| **update\_password**  string  | **Choices:*** **always** ←
* on\_create
 | 
`always` will update passwords if they differ. 
`on_create` will only set the password for newly created users. |
| **user\_cannot\_change\_password**  boolean  | **Choices:*** no
* yes
 | 
`yes` will prevent the user from changing their password. 
`no` will allow the user to change their password. |

   
 Notes
-----

  Note

 * The return values are based on the user object after the module options have been set. When running in check mode the values will still reflect the existing user settings and not what they would have been changed to.

  See Also
--------

  See also

  [ansible.builtin.user](../builtin/user_module#ansible-collections-ansible-builtin-user-module)

The official documentation on the **ansible.builtin.user** module.

  [ansible.windows.win\_domain\_membership](win_domain_membership_module#ansible-collections-ansible-windows-win-domain-membership-module)

The official documentation on the **ansible.windows.win\_domain\_membership** module.

  [community.windows.win\_domain\_user](../../community/windows/win_domain_user_module#ansible-collections-community-windows-win-domain-user-module)

The official documentation on the **community.windows.win\_domain\_user** module.

  [ansible.windows.win\_group](win_group_module#ansible-collections-ansible-windows-win-group-module)

The official documentation on the **ansible.windows.win\_group** module.

  [ansible.windows.win\_group\_membership](win_group_membership_module#ansible-collections-ansible-windows-win-group-membership-module)

The official documentation on the **ansible.windows.win\_group\_membership** module.

  [community.windows.win\_user\_profile](../../community/windows/win_user_profile_module#ansible-collections-community-windows-win-user-profile-module)

The official documentation on the **community.windows.win\_user\_profile** module.

    Examples
--------

 
```
- name: Ensure user bob is present
  ansible.windows.win_user:
    name: bob
    password: B0bP4ssw0rd
    state: present
    groups:
      - Users

- name: Ensure user bob is absent
  ansible.windows.win_user:
    name: bob
    state: absent

```
 Return Values
-------------

 Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:

 

| Key | Returned | Description |
| --- | --- | --- |
| **account\_disabled**  boolean  | user exists | Whether the user is disabled.  |
| **account\_locked**  boolean  | user exists | Whether the user is locked.  |
| **description**  string  | user exists | The description set for the user.  **Sample:** Username for test |
| **fullname**  string  | user exists | The full name set for the user.  **Sample:** Test Username |
| **groups**  list / elements=string  | user exists | A list of groups and their ADSI path the user is a member of.  **Sample:** [{'name': 'Administrators', 'path': 'WinNT://WORKGROUP/USER-PC/Administrators'}] |
| **name**  string  | always | The name of the user  **Sample:** username |
| **password\_expired**  boolean  | user exists | Whether the password is expired.  |
| **password\_never\_expires**  boolean  | user exists | Whether the password is set to never expire.  **Sample:** True |
| **path**  string  | user exists | The ADSI path for the user.  **Sample:** WinNT://WORKGROUP/USER-PC/username |
| **sid**  string  | user exists | The SID for the user.  **Sample:** S-1-5-21-3322259488-2828151810-3939402796-1001 |
| **user\_cannot\_change\_password**  boolean  | user exists | Whether the user can change their own password.  |

   
  
 ### Authors

 * Paul Durivage (@angstwad)
* Chris Church (@cchurch)



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_user_module.html>

arista.eos.eos – Use eos cliconf to run command on Arista EOS platform
======================================================================

  Note

 This plugin is part of the [arista.eos collection](https://galaxy.ansible.com/arista/eos) (version 2.2.0).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install arista.eos`.

 To use it in a playbook, specify: `arista.eos.eos`.

   New in version 1.0.0: of arista.eos

  * [Synopsis](#synopsis)
* [Parameters](#parameters)

 Synopsis
--------

 * This eos plugin provides low level abstraction apis for sending and receiving CLI commands from Arista EOS network devices.

 Parameters
----------

 

| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **config\_commands**  list / elements=string   added in 2.0.0 of arista.eos  | **Default:**[] |  var: ansible\_eos\_config\_commands  | Specifies a list of commands that can make configuration changes to the target device. When `ansible\_network\_single\_user\_mode` is enabled, if a command sent to the device is present in this list, the existing cache is invalidated. |
| **eos\_use\_sessions**  boolean  | **Choices:*** no
* **yes** ←
 |  env:ANSIBLE\_EOS\_USE\_SESSIONS   var: ansible\_eos\_use\_sessions  | Specifies if sessions should be used on remote host or not |

   
 ### Authors

 * Ansible Networking Team



 © 2012–2018 Michael DeHaan  
© 2018–2021 Red Hat, Inc.  
Licensed under the GNU General Public License version 3.  

<https://docs.ansible.com/ansible/latest/collections/arista/eos/eos_cliconf.html>

ansible.windows.win\_updates – Download and install Windows updates
===================================================================

  Note

 This plugin is part of the [ansible.windows collection](https://galaxy.ansible.com/ansible/windows) (version 1.7.3).

 You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.

 To install it, use: `ansible-galaxy collection install ansible.windows`.

 To use it in a playbook, specify: `ansible.windows.win_updates`.

  * [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)

 Synopsis
--------

 * Searches, downloads, and installs Windows updates synchronously by automatin
[cell cut: 48,028,865 characters, first 4,193,889 kept]