code
stringlengths
2.5k
150k
kind
stringclasses
1 value
ansible hpe.nimble.hpe_nimble_disk – Manage the HPE Nimble Storage disk hpe.nimble.hpe\_nimble\_disk – Manage the HPE Nimble Storage disk ================================================================= 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_disk`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage disks 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 | | --- | --- | --- | | **disk\_op** string / required | **Choices:*** add * remove | The intended operation to be performed on the specified disk. | | **force** boolean | **Choices:*** no * yes | Forcibly add a disk. | | **host** string / required | | HPE Nimble Storage IP address. | | **password** string / required | | HPE Nimble Storage password. | | **shelf\_location** string / required | | Position of the shelf the disk belongs to. | | **slot** integer / required | | Disk slot number. | | **state** string / required | **Choices:*** present | The disk operation. | | **username** string / required | | HPE Nimble Storage user name. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` - name: Update Disk hpe.nimble.hpe_nimble_disk: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" slot: "{{ slot | mandatory }}" shelf_location: "{{ shelf_location | mandatory }}" disk_op: "{{ disk_op | mandatory }}" force: "{{ force }}" state: present ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#543a3d39363831793037277927203b26353331793521203b3935203d3b3a79313a33727767636f727761666f7277606c6f3c2431727760626f373b39)> ansible hpe.nimble.hpe_nimble_performance_policy – Manage the HPE Nimble Storage performance policies hpe.nimble.hpe\_nimble\_performance\_policy – Manage the HPE Nimble Storage performance policies ================================================================================================ 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_performance_policy`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the performance policies 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 | | --- | --- | --- | | **app\_category** string | | Specifies the application category of the associated volume. | | **block\_size** integer | | Block Size in bytes to be used by the volumes created with this specific performance policy. Supported block sizes are 4096 bytes (4 KB), 8192 bytes (8 KB), 16384 bytes(16 KB), and 32768 bytes (32 KB). Block size of a performance policy cannot be changed once the performance policy is created. | | **cache** boolean | **Choices:*** no * yes | Flag denoting if data in the associated volume should be cached. | | **cache\_policy** string | **Choices:*** disabled * normal * aggressive * no\_write * aggressive\_read\_no\_write | Specifies how data of associated volume should be cached. Normal policy caches data but skips in certain conditions such as sequential I/O. Aggressive policy will accelerate caching of all data belonging to this volume, regardless of sequentiality. | | **change\_name** string | | Change name of the existing performance policy. | | **compress** boolean | **Choices:*** no * yes | Flag denoting if data in the associated volume should be compressed. | | **dedupe** boolean | **Choices:*** no * yes | Specifies if dedupe is enabled for volumes created with this performance policy. | | **description** string | | Description of a performance policy. | | **host** string / required | | HPE Nimble Storage IP address. | | **name** string / required | | Name of the performance policy. | | **password** string / required | | HPE Nimble Storage password. | | **space\_policy** string | **Choices:*** invalid * offline * non\_writable * read\_only * login\_only | Specifies the state of the volume upon space constraint violation such as volume limit violation or volumes above their volume reserve, if the pool free space is exhausted. Supports two policies, 'offline' and 'non\_writable'. | | **state** string / required | **Choices:*** present * absent * create | The performance policy operation. | | **username** string / required | | HPE Nimble Storage user name. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` # if state is create , then create a performance policy if not present. Fails if already present. # if state is present, then create a performance policy if not present. Succeed if it already exists. - name: Create performance policy if not present hpe.nimble.hpe_nimble_performance_policy: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" state: "{{ state | default('present') }}" name: "{{ name }}" description: "{{ description }}" block_size: "{{ block_size }}" compress: "{{ compress }}" - name: Delete performance policy hpe.nimble.hpe_nimble_performance_policy: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: absent ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#127c7b7f707e773f7671613f61667d607375773f7367667d7f73667b7d7c3f777c75343121252934312720293431262a297a62773431262429717d7f)> ansible hpe.nimble.hpe_nimble_volume – Manage the HPE Nimble Storage volumes hpe.nimble.hpe\_nimble\_volume – Manage the HPE Nimble Storage volumes ====================================================================== 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`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the volumes 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 | | --- | --- | --- | | **agent\_type** string | **Choices:*** none * smis * vvol * openstack * openstackv2 | External management agent type. | | **app\_uuid** string | | Application identifier of volume. | | **block\_size** integer | | Size in bytes of blocks in the volume. | | **cache\_pinned** boolean | **Choices:*** no * yes | If set to true, all the contents of this volume are kept in flash cache. | | **caching** boolean | **Choices:*** no * yes | Indicate caching the volume is enabled. | | **change\_name** string | | Change name of the existing source volume. | | **clone** boolean | **Choices:*** no * yes | Whether this volume is a clone. Use this attribute in combination with name and snapshot to create a clone by setting clone = true. | | **dedupe** boolean | **Choices:*** no * yes | Indicate whether dedupe is enabled. | | **description** string | | Text description of volume. | | **destination** string | | Name of the destination pool where the volume is moving to. | | **encryption\_cipher** string | **Choices:*** none * aes\_256\_xts | The encryption cipher of the volume. | | **folder** string | | Name of the folder holding this volume. | | **force** boolean | **Choices:*** no * yes | Forcibly offline, reduce size or change read-only status a volume. | | **force\_vvol** boolean | **Choices:*** **no** ← * yes | Forcibly move a virtual volume. | | **host** string / required | | HPE Nimble Storage IP address. | | **iscsi\_target\_scope** string | **Choices:*** volume * group | This indicates whether volume is exported under iSCSI Group Target or iSCSI volume target. This attribute is only meaningful to iSCSI system. | | **limit** integer | | Limit on the volume's mapped usage, expressed as a percentage of the volume's size. | | **limit\_iops** integer | | IOPS limit for this volume. | | **limit\_mbps** integer | | Throughput limit for this volume in MB/s. | | **metadata** dictionary | | User defined key-value pairs that augment an volume's 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. | | **move** boolean | **Choices:*** no * yes | Move a volume to different pool. | | **multi\_initiator** boolean | **Choices:*** no * yes | For iSCSI volume target, this flag indicates whether the volume and its snapshots can be accessed from multiple initiators at the same time. | | **name** string / required | | Name of the source volume. | | **online** boolean | **Choices:*** no * yes | Online state of volume, available for host initiators to establish connections. | | **owned\_by\_group** string | | Name of group that currently owns the volume. | | **parent** string | | Name of parent volume. | | **password** string / required | | HPE Nimble Storage password. | | **perf\_policy** string | | Name of the performance policy. After creating a volume, performance policy for the volume can only be changed to another performance policy with same block size. | | **pool** string | | Name associated with the pool in the storage pool table. | | **read\_only** boolean | **Choices:*** no * yes | Volume is read-only. | | **size** integer | | Volume size in megabytes. Size is required for creating a volume but not for cloning an existing volume. | | **snapshot** string | | Base snapshot name. This attribute is required together with name and clone when cloning a volume with the create operation. | | **state** string / required | **Choices:*** present * absent * create * restore | The volume operations. | | **thinly\_provisioned** boolean | **Choices:*** no * yes | Set volume's provisioning level to thin. | | **username** string / required | | HPE Nimble Storage user name. | | **volcoll** string | | Name of volume collection of which this volume is a member. Use this attribute in update operation to associate or dissociate volumes with or from volume collections. When associating, set this attribute to the name of the volume collection. When dissociating, set this attribute to empty string. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` # If state is "create", then create a volume if not present. Fails if already present. # if state is present, then create a volume if not present. Succeeds if it already exists. - name: Create volume if not present hpe.nimble.hpe_nimble_volume: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" state: "{{ state | default('present') }}" size: "{{ size }}" limit_iops: "{{ limit_iops }}" limit_mbps: 5000 force: false metadata: "{{ metadata }}" # metadata = {'mykey1': 'myval1', 'mykey2': 'myval2'} description: "{{ description }}" name: "{{ name }}" - name: Changing volume "{{ name }}" to offline state hpe.nimble.hpe_nimble_volume: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" online: False state: present name: "{{ name }}" - name: Changing volume "{{ name }}" to online state hpe.nimble.hpe_nimble_volume: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" online: True state: present name: "{{ name }}" # Create a clone from the given snapshot name. # If snapshot name is not provided then a snapshot is created on the source volume. # Clone task only run if "parent" is specified. Snapshot is optional. - name: Create or Refresh a clone hpe.nimble.hpe_nimble_volume: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" # name here is the name of cloned volume parent: "{{ parent | mandatory }}" snapshot: "{{ snapshot | default(None)}}" state: "{{ state | default('present') }}" when: - parent is defined - name: Destroy volume (must be offline) hpe.nimble.hpe_nimble_volume: name: "{{ name }}" state: absent # If no snapshot is given, then restore volume to last snapshot. Fails if no snapshots exist. # If snapshot is provided, then restore volume from specified snapshot. - name: Restore volume "{{ name }}" hpe.nimble.hpe_nimble_volume: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" snapshot: "{{ snapshot | default(None)}}" state: restore - name: Delete volume "{{ name }}" (must be offline) hpe.nimble.hpe_nimble_volume: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: absent - name: Move volume to pool hpe.nimble.hpe_nimble_volume: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" move: true name: "{{ name }}" state: present destination: "{{ destination | mandatory }}" ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#8be5e2e6e9e7eea6efe8f8a6f8ffe4f9eaeceea6eafeffe4e6eaffe2e4e5a6eee5ecada8b8bcb0ada8beb9b0ada8bfb3b0e3fbeeada8bfbdb0e8e4e6)> ansible hpe.nimble.hpe_nimble_user_policy – Manage the HPE Nimble Storage user policies hpe.nimble.hpe\_nimble\_user\_policy – Manage the HPE Nimble Storage user policies ================================================================================== 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_user_policy`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the user policies 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 | | --- | --- | --- | | **allowed\_attempts** integer | | Number of authentication attempts allowed before the user account is locked. Allowed range is [1, 10] inclusive. '0' indicates no limit. | | **digit** integer | | Number of numerical characters required in user passwords. Allowed range is [0, 255] inclusive. | | **host** string / required | | HPE Nimble Storage IP address. | | **lower** integer | | Number of lowercase characters required in user passwords. Allowed range is [0, 255] inclusive. | | **max\_sessions** integer | | Maximum number of sessions allowed for a group. Allowed range is [10, 1000] inclusive. | | **min\_length** integer | | Minimum length for user passwords. Allowed range is [8, 255] inclusive. | | **no\_reuse** integer | | Number of times that a password must change before you can reuse a previous password. Allowed range is [1,20] inclusive. | | **password** string / required | | HPE Nimble Storage password. | | **previous\_diff** integer | | Number of characters that must be different from the previous password. Allowed range is [1, 255] inclusive. | | **special** integer | | Number of special characters required in user passwords. Allowed range is [0, 255] inclusive. | | **state** string / required | **Choices:*** present | The user policy operation. | | **upper** integer | | Number of uppercase characters required in user passwords. Allowed range is [0, 255] inclusive. | | **username** string / required | | HPE Nimble Storage user name. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` - name: Update user policy hpe.nimble.hpe_nimble_user_policy: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" upper: "{{ upper }}" allowed_attempts: 2 min_length: 10 state: "present" ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#5b35323639373e763f382876282f34293a3c3e763a2e2f34363a2f323435763e353c7d78686c607d786e69607d786f6360332b3e7d786f6d60383436)> ansible hpe.nimble.hpe_nimble_group – Manage the HPE Nimble Storage group hpe.nimble.hpe\_nimble\_group – Manage the HPE Nimble Storage group =================================================================== 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_group`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage an HPE Nimble Storage group on an Nimble Storage array. 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 | | --- | --- | --- | | **alarms** boolean | **Choices:*** no * yes | Whether alarm feature is enabled. | | **alert\_from\_email\_addrs** string | | From email address to use while sending emails. Case insensitive email address. | | **alert\_min\_level** string | **Choices:*** info * notice * warning * critical | Minimum level of alert to be notified. | | **alert\_to\_email\_addrs** string | | Comma-separated list of email addresses to receive emails. Comma separated email list. | | **allow\_analytics\_gui** boolean | **Choices:*** no * yes | Specify whether to allow HPE Nimble Storage to use Google Analytics in the GUI. HPE Nimble Storage uses Google Analytics to gather data related to GUI usage. The data gathered is used to evaluate and improve the product. | | **allow\_support\_tunnel** boolean | **Choices:*** no * yes | Whether to allow support tunnel. | | **auto\_switchover** boolean | **Choices:*** no * yes | Whether automatic switchover of Group management services feature is enabled. | | **autoclean\_unmanaged\_snapshots** boolean | **Choices:*** no * yes | Whether autoclean unmanaged snapshots feature is enabled. | | **autoclean\_unmanaged\_snapshots\_ttl\_unit** integer | | Unit for unmanaged snapshot time to live. | | **autosupport** boolean | **Choices:*** no * yes | Whether to send autosupport. | | **cc\_mode** boolean | **Choices:*** no * yes | Enable or disable Common Criteria mode. | | **change\_name** string | | Change name of the existing group. | | **check\_migrate** boolean | **Choices:*** no * yes | Check if the group Management Service can be migrated to the group Management Service backup array. | | **date** integer | | Unix epoch time local to the group. Seconds since last epoch. Example- 3400. | | **default\_iscsi\_target\_scope** string | **Choices:*** volume * group | Newly created volumes are exported under iSCSI Group Target or iSCSI Volume Target. | | **default\_volume\_limit** integer | | Default limit for a volume space usage as a percentage of volume size. Volume will be taken offline/made non-writable on exceeding its limit. Percentage as integer from 0 to 100. | | **dns\_servers** list / elements=dictionary | | IP addresses for this group's dns servers. | | **domain\_name** string | | Domain name for this group. String of alphanumeric characters, valid range is from 2 to 255; Each label must be between 1 and 63 characters long; - and . are allowed after the first and before the last character. | | **fc\_enabled** boolean | **Choices:*** no * yes | Whether FC is enabled on this group. | | **force** boolean | **Choices:*** **no** ← * yes | Can be used with halt or merge flag. Halt remaining arrays when one or more is unreachable. Ignore warnings and forcibly merge specified group with this group. | | **group\_snapshot\_ttl** integer | | Snapshot Time-to-live(TTL) configured at group level for automatic deletion of unmanaged snapshots. Value 0 indicates unlimited TTL. | | **group\_target\_enabled** boolean | **Choices:*** no * yes | Is group\_target enabled on this group. | | **group\_target\_name** string | | Iscsi target name for this group. String of up to 255 alphanumeric, hyphenated, colon, or period-separated characters; but cannot begin with hyphen, colon or period. This type is used for the group target name. | | **halt** boolean | **Choices:*** no * yes | Halt all arrays in the group. | | **host** string / required | | HPE Nimble Storage IP address. | | **iscsi\_enabled** boolean | **Choices:*** no * yes | Whether iSCSI is enabled on this group. | | **isns\_enabled** boolean | **Choices:*** no * yes | Whether iSNS is enabled. | | **isns\_port** integer | | Port number for iSNS Server. Positive integer value up to 65535 representing TCP/IP port. | | **isns\_server** string | | Hostname or IP Address of iSNS Server. | | **level** string | **Choices:*** info * notice * warning * critical | Level of the test alert. | | **login\_banner\_after\_auth** boolean | **Choices:*** no * yes | Should the banner be displayed before the user credentials are prompted or after prompting the user credentials. | | **login\_banner\_message** string | | The message for the login banner that is displayed during user login activity. String upto 2048 characters. | | **login\_banner\_reset** string | | This will reset the banner to the version of the installed NOS. When login\_banner\_after\_auth is specified, login\_banner\_reset can not be set to true. | | **merge** boolean | **Choices:*** no * yes | Perform group merge with the specified group. | | **migrate** boolean | **Choices:*** no * yes | Migrate the group Management Service to the current group Management Service backup array. | | **name** string / required | | Name of the group. | | **ntp\_server** string | | Either IP address or hostname of the NTP server for this group. Plain string. | | **password** string / required | | HPE Nimble Storage password. | | **proxy\_password** string | | Password to authenticate with HTTP Proxy Server. | | **proxy\_port** integer | | Proxy Port of HTTP Proxy Server. Integer value between 0-65535 representing TCP/IP port. | | **proxy\_server** string | | Hostname or IP Address of HTTP Proxy Server. Setting this attribute to an empty string will unset all proxy settings. | | **proxy\_username** string | | Username to authenticate with HTTP Proxy Server. HTTP proxy server username, string up to 255 characters, special characters ([, ], `, ;, ampersand, tab, space, newline) are not allowed. | | **reboot** boolean | **Choices:*** no * yes | Reboot all arrays in the group. | | **repl\_throttle\_list** list / elements=dictionary | | All the replication bandwidth limits on the system. All the throttles for the partner. | | **send\_alert\_to\_support** boolean | **Choices:*** no * yes | Whether to send alert to Support. | | **skip\_secondary\_mgmt\_ip** boolean | **Choices:*** no * yes | Skip check for secondary management IP address. | | **smtp\_auth\_enabled** boolean | **Choices:*** no * yes | Whether SMTP Server requires authentication. | | **smtp\_auth\_password** string | | Password to authenticate with SMTP Server. | | **smtp\_auth\_username** string | | Username to authenticate with SMTP Server. | | **smtp\_encrypt\_type** string | **Choices:*** none * starttls * ssl | Level of encryption for SMTP. | | **smtp\_port** integer | | Port number of SMTP Server. | | **snmp\_community** string | | Community string to be used with SNMP. | | **snmp\_get\_enabled** boolean | **Choices:*** no * yes | Whether to accept SNMP get commands. | | **snmp\_get\_port** integer | | Port number to which SNMP get requests should be sent. | | **snmp\_sys\_contact** string | | Name of the SNMP administrator. Plain string. | | **snmp\_sys\_location** string | | Location of the group. Plain string. | | **snmp\_trap\_enabled** boolean | **Choices:*** no * yes | Whether to enable SNMP traps. | | **snmp\_trap\_host** string | | Hostname or IP Address to send SNMP traps. | | **snmp\_trap\_port** integer | | Port number of SNMP trap host. | | **src\_group\_ip** string | | IP address of the source group. | | **src\_group\_name** string | | Name of the source group. | | **src\_passphrase** string | | Source group encryption passphrase. Encryption passphrase. String with size from 8 to 64 printable characters. | | **src\_password** string | | Password of the source group. | | **src\_username** string | | Username of the source group. | | **state** string / required | **Choices:*** present * absent | The group operation. | | **syslogd\_enabled** boolean | **Choices:*** no * yes | Is syslogd enabled on this system. | | **syslogd\_port** integer | | Port number for syslogd server. | | **syslogd\_server** string | | Hostname of the syslogd server. | | **tdz\_enabled** boolean | **Choices:*** no * yes | Is Target Driven Zoning (TDZ) enabled on this group. | | **tdz\_prefix** string | | Target Driven Zoning (TDZ) prefix for peer zones created by TDZ. | | **test\_alert** boolean | **Choices:*** no * yes | Generate a test alert. | | **timezone** string | | Timezone in which this group is located. Plain string. | | **tlsv1\_enabled** boolean | **Choices:*** no * yes | Enable or disable TLSv1.0 and TLSv1.1. | | **user\_inactivity\_timeout** integer | | The amount of time in seconds that the user session is inactive before timing out. User inactivity timeout in second, valid range is from 1 to 43200. | | **username** string / required | | HPE Nimble Storage user name. | | **validate\_merge** boolean | **Choices:*** no * yes | Perform group merge validation. | | **vss\_validation\_timeout** integer | | The amount of time in seconds to validate Microsoft VSS application synchronization before timing out. VSS validation timeout in second, valid range is from 1 to 3600. | | **vvol\_enabled** boolean | **Choices:*** no * yes | Are vVol enabled on this group. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` - name: Update group hpe.nimble.hpe_nimble_group: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" send_alert_to_support: "{{ send_alert_to_support }}" alert_to_email_addrs: "{{ alert_to_email_addrs }}" state: "present" - name: Reboot group hpe.nimble.hpe_nimble_group: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: "present" reboot: true - name: Halt group hpe.nimble.hpe_nimble_group: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: "present" halt: true - name: Validate merge group hpe.nimble.hpe_nimble_group: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" src_group_ip: "{{ src_group_ip }}" src_password: "{{ src_password }}" skip_secondary_mgmt_ip: "{{ skip_secondary_mgmt_ip }}" src_passphrase: "{{ src_passphrase }}" state: "present" validate_merge: true - name: Merge group hpe.nimble.hpe_nimble_group: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" src_group_ip: "{{ src_group_ip }}" src_password: "{{ src_password }}" skip_secondary_mgmt_ip: "{{ skip_secondary_mgmt_ip }}" src_passphrase: "{{ src_passphrase }}" state: "present" merge: true - name: Test alert group hpe.nimble.hpe_nimble_group: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" level: "{{ level }}" state: "present" test_alert: true - name: Migrate group hpe.nimble.hpe_nimble_group: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: "present" migrate: true - name: Check migrate group hpe.nimble.hpe_nimble_group: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: "present" check_migrate: true ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e98780848b858cc48d8a9ac49a9d869b888e8cc4889c9d8684889d808687c48c878ecfcadaded2cfcadcdbd2cfcaddd1d281998ccfcadddfd28a8684)>
programming_docs
ansible hpe.nimble.hpe_nimble_access_control_record – Manage the HPE Nimble Storage access control records hpe.nimble.hpe\_nimble\_access\_control\_record – Manage the HPE Nimble Storage access control records ====================================================================================================== 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_access_control_record`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the access control records 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 | | --- | --- | --- | | **apply\_to** string | **Choices:*** volume * snapshot * both | The type of object to which this access control record applies. | | **chap\_user** string | | Name for the CHAP user. | | **host** string / required | | HPE Nimble Storage IP address. | | **initiator\_group** string / required | | The initiator group name. | | **lun** integer | | If this access control record applies to a regular volume, this attribute is the volume's LUN (Logical Unit Number). If the access protocol is iSCSI, the LUN will be 0. However, if the access protocol is Fibre Channel, the LUN will be in the range from 0 to 2047. | | **password** string / required | | HPE Nimble Storage password. | | **state** string / required | **Choices:*** present * absent * create | The access control record operation. | | **username** string / required | | HPE Nimble Storage user name. | | **volume** string / required | | The name of the volume that this access control record applies to. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` # If state is "create", create access control record for given volume, fails if it exist. # if state is present, create access control record if not already present. - name: Create access control record for volume hpe.nimble.hpe_nimble_access_control_record: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" volume: "{{ volume }}" initiator_group: "{{ initiator_group }}" state: "{{ state | default('present') }}" # Delete the access control record for a given volume name - name: Delete access control record for volume hpe.nimble.hpe_nimble_access_control_record: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" volume: "{{ volume }}" initiator_group: "{{ initiator_group }}" state: "absent" # fail if volume does not exist ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#4f2126222d232a622b2c3c623c3b203d2e282a622e3a3b20222e3b262021622a2128696c7c7874696c7a7d74696c7b7774273f2a696c7b79742c2022)> ansible hpe.nimble.hpe_nimble_shelf – Manage the HPE Nimble Storage shelves hpe.nimble.hpe\_nimble\_shelf – Manage the HPE Nimble Storage shelves ===================================================================== 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_shelf`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the shelves 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 | | --- | --- | --- | | **accept\_dedupe\_impact** boolean | **Choices:*** no * yes | Accept the reduction or elimination of deduplication capability on the system as a result of activating a shelf that does not meet the necessary deduplication requirements. | | **accept\_foreign** boolean | **Choices:*** no * yes | Accept the removal of data on the shelf disks and activate foreign shelf. | | **activated** boolean / required | **Choices:*** no * yes | Activated state for shelf or disk set means it is available to store date on. An activated shelf may not be deactivated. | | **driveset** integer | | Driveset to activate. | | **force** boolean | **Choices:*** no * yes | Forcibly activate shelf. | | **host** string / required | | HPE Nimble Storage IP address. | | **last\_request** boolean | **Choices:*** no * yes | Indicates this is the last request in a series of shelf add requests. | | **password** string / required | | HPE Nimble Storage password. | | **shelf\_serial** string / required | | Serial number of shelf. | | **state** string / required | **Choices:*** present | The shelf operation. | | **username** string / required | | HPE Nimble Storage user name. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` - name: Update shelf hpe.nimble.hpe_nimble_shelf: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" shelf_serial: "{{ shelf_serial | mandatory }}" accept_foreign: "{{ accept_foreign }}" force: "{{ force }}" activated: "{{ activated }}" state: present ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#91fff8fcf3fdf4bcf5f2e2bce2e5fee3f0f6f4bcf0e4e5fefcf0e5f8feffbcf4fff6b7b2a2a6aab7b2a4a3aab7b2a5a9aaf9e1f4b7b2a5a7aaf2fefc)> ansible hpe.nimble.hpe_nimble_protection_schedule – Manage the HPE Nimble Storage protection schedules hpe.nimble.hpe\_nimble\_protection\_schedule – Manage the HPE Nimble Storage protection schedules ================================================================================================= 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_protection_schedule`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the protection schedules 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 | | --- | --- | --- | | **at\_time** integer | **Default:**0 | Time of day when snapshot should be taken. In case repeat frequency specifies more than one snapshot in a day then the until\_time option specifies until what time of day to take snapshots. | | **change\_name** string | | Change the name of existing protection schedule. | | **days** string | | Specifies which days snapshots should be taken. Comma separated list of days of the week or 'all'. | | **description** string | | Description of the schedule. | | **disable\_appsync** boolean | **Choices:*** no * yes | Disables application synchronized snapshots and creates crash consistent snapshots instead. | | **downstream\_partner** string | | Specifies the partner name if snapshots created by this schedule should be replicated. | | **host** string / required | | HPE Nimble Storage IP address. | | **name** string / required | | Name of the protection schedule to create. | | **num\_retain** integer | | Number of snapshots to retain. If replication is enabled on this schedule the array will always retain the latest replicated snapshot, which may exceed the specified retention value. This is necessary to ensure efficient replication performance. | | **num\_retain\_replica** integer | **Default:**0 | Number of snapshots to retain on the replica. | | **password** string / required | | HPE Nimble Storage password. | | **period** integer | | Repeat interval for snapshots with respect to the period\_unit. For example, a value of 2 with the 'period\_unit' of 'hours' results in one snapshot every 2 hours. | | **period\_unit** string | **Choices:*** minutes * hours * days * weeks | Time unit over which to take the number of snapshots specified in 'period'. For example, a value of 'days' with a 'period' of '1' results in one snapshot every day. | | **prot\_template\_name** string | | Name of the protection template in which this protection schedule is attached to. | | **repl\_alert\_thres** integer | | Replication alert threshold in seconds. If the replication of a snapshot takes more than this amount of time to complete an alert will be generated. Enter 0 to disable this alert. | | **replicate\_every** integer | | Specifies which snapshots should be replicated. If snapshots are replicated and this option is not specified, every snapshot is replicated. | | **schedule\_type** string | **Choices:*** regular * external\_trigger | Normal schedules have internal timers which drive snapshot creation. An externally driven schedule has no internal timers. All snapshot activity is driven by an external trigger. In other words, these schedules are used only for externally driven manual snapshots. | | **skip\_db\_consistency\_check** boolean | **Choices:*** no * yes | Skip consistency check for database files on snapshots created by this schedule. This option only applies to snapshot schedules of a protection template with application synchronization set to VSS, application ID set to MS Exchange 2010 or later w/DAG, this schedule's snap\_verify option set to yes, and its disable\_appsync option set to false. Skipping consistency checks is only recommended if each database in a DAG has multiple copies. | | **snap\_verify** boolean | **Choices:*** no * yes | Run verification tool on snapshot created by this schedule. This option can only be used with snapshot schedules of a protection template that has application synchronization. The tool used to verify snapshot depends on the type of application. For example, if application synchronization is VSS and the application ID is Exchange, eseutil tool is run on the snapshots. If verification fails, the logs are not truncated. | | **state** string / required | **Choices:*** present * absent * create | The protection schedule operations | | **until\_time** integer | | Time of day to stop taking snapshots. Applicable only when repeat frequency specifies more than one snapshot in a day. | | **use\_downstream\_for\_DR** boolean | **Choices:*** no * yes | Break synchronous replication for the specified volume collection and present downstream volumes to host(s). Downstream volumes in the volume collection will be set to online and presented to the host(s) using new serial and LUN numbers. No changes will be made to the upstream volumes, their serial and LUN numbers, and their online state. The existing ACLs on the upstream volumes will be copied to the downstream volumes. Use this in conjunction with an empty downstream\_partner\_id. This unconfigures synchronous replication when the partner is removed from the last replicating schedule in the specified volume collection and presents the downstream volumes to host(s). Host(s) will need to be configured to access the new volumes with the newly assigned serial and LUN numbers. Use this option to expose downstream volumes in a synchronously replicated volume collection to host(s) only when the upstream partner is confirmed to be down and there is no communication between partners. Do not execute this operation if a previous Group Management Service takeover has been performed on a different array. Do not perform a subsequent Group Management Service takeover on a different array as it will lead to irreconcilable conflicts. This limitation is cleared once the Group management service backup array has successfully synchronized after reconnection. | | **username** string / required | | HPE Nimble Storage user name. | | **volcoll\_name** string | | Name of the volume collection in which this protection schedule is attached to. | | **volcoll\_or\_prottmpl\_type** string / required | **Choices:*** protection\_template * volume\_collection | Type of the protection policy this schedule is attached to. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` # if state is create , then create a protection schedule if not present. Fails if already present. # if state is present, then create a protection schedule if not present. Succeed if it already exists. - name: Create protection schedule if not present hpe.nimble.hpe_nimble_protection_schedule: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" description: "{{ description | default(None)}}" state: "{{ state | default('present') }}" volcoll_or_prottmpl_type: "{{ volcoll_or_prottmpl_type }}" prot_template_name: "{{ prot_template_name }}" num_retain: "{{ num_retain }}" - name: Delete protection schedule hpe.nimble.hpe_nimble_protection_schedule: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" volcoll_or_prottmpl_type: "{{ volcoll_or_prottmpl_type }}" volcoll_name: "{{ volcoll_name }}" state: absent ``` ### Authors * Alok Ranjan (@ranjanal) ansible hpe.nimble.hpe_nimble_info – Collect information from HPE Nimble Storage array hpe.nimble.hpe\_nimble\_info – Collect information from HPE Nimble Storage array ================================================================================ 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_info`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Collect information from a HPE Nimble Storage array. By default, the module will collect basic information including array, groups config, protection templates, protection schedules, snapshots, snapshot collections, volume collections and volume counts. Additional information can be collected based on the configured set of arguments. 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 | | --- | --- | --- | | **gather\_subset** list / elements=raw | **Default:**"minimum" | When supplied, this argument will define the information to be collected. Possible values for this include "all" "minimum" "config" "access\_control\_records", "alarms", "application\_servers", "application\_categories", "arrays", "chap\_users", "controllers", "disks", "fibre\_channel\_interfaces", "fibre\_channel\_configs", "fibre\_channel\_initiator\_aliases", "fibre\_channel\_ports", "folders", "groups", "initiator\_groups", "initiators", "master\_key", "network\_configs", "performance\_policies", "pools", "protection\_schedules", "protection\_templates", "protocol\_endpoints", "replication\_partners", "shelves", "snapshots", "snapshot\_collections", "software\_versions", "user\_groups", "user\_policies", "users", "volumes", "volume\_collections". Each subset except "all", "minimum" and "config" supports four types of subset options. Subset "all" supports limit and detail as subset options. Subset "config" and "minimum" does not support any subset options. See the example section for usage of the following subset options. fields - A string representing which attributes to display for a given subset. limit - An integer value which represents how many latest items to show for a given subset. detail - A bool flag when set to true fetches everything for a given subset. Default is "True". query - A key-value pair to query. | | **host** string / required | | HPE Nimble Storage IP address. | | **password** string / required | | HPE Nimble Storage password. | | **username** string / required | | HPE Nimble Storage user name. | Notes ----- Note * This module supports `check_mode`. Examples -------- ``` - name: Collect default set of information hpe.nimble.hpe_nimble_info: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" gather_subset: - minimum: register: array_info - name: Show default information ansible.builtin.debug: msg: "{{ array_info['nimble_info']['default'] }}" - name: Collect config hpe.nimble.hpe_nimble_info: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" gather_subset: - config: register: array_info - name: Show config information ansible.builtin.debug: msg: "{{ array_info['nimble_info']['config'] }}" - name: Collect all hpe.nimble.hpe_nimble_info: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" gather_subset: - all: limit: 1 register: array_info - name: Show all information ansible.builtin.debug: msg: "{{ array_info['nimble_info'] }}" - name: Collect volume, snapshot and volume collection. Below query will show just one snapshot detail with attributes 'name and id' for a volume called 'vol1' hpe.nimble.hpe_nimble_info: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" gather_subset: - volumes: fields: "name,id" limit: 2 - volume_collections: limit: 1 detail: false - snapshots: fields: "name,id" query: vol_name: "vol1" limit: 1 detail: True register: array_info - name: Show information ansible.builtin.debug: msg: "{{ array_info['nimble_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 | | --- | --- | --- | | **nimble\_info** complex | always | Returns the information collected from the HPE Nimble Storage array **Sample:** {'config': {'arrays': [{'all\_flash': False, 'extended\_model': 'vmware-4G-5T-160F', 'full\_name': 'ansibler1-va', 'role': 'leader', 'serial': 'ansibler1-va'}], 'groups': [{'alarms\_enabled': True, 'auto\_switchover\_enabled': True, 'auto\_switchover\_messages': [], 'autosupport\_enabled': True, 'default\_iscsi\_target\_scope': 'group', 'dns\_servers': [{'ip\_addr': '10.235.0.185'}, {'ip\_addr': '10.1.255.254'}], 'domain\_name': 'vlab.nimblestorage.com', 'encryption\_config': {'cipher': 'aes\_256\_xts', 'encryption\_active': True, 'encryption\_key\_manager': 'local', 'master\_key\_set': True, 'mode': 'available', 'scope': 'group'}, 'failover\_mode': 'Manual', 'fc\_enabled': False, 'iscsi\_enabled': True, 'isns\_enabled': True, 'leader\_array\_name': 'ansibler1-va', 'member\_list': ['ansibler1-va'], 'name': 'group-ansibler1-va', 'ntp\_server': 'time.nimblestorage.com', 'send\_alert\_to\_support': True, 'smtp\_auth\_enabled': False, 'smtp\_auth\_username': '', 'smtp\_port': 25, 'smtp\_server': '', 'snmp\_community': 'public', 'snmp\_trap\_enabled': False, 'snmp\_trap\_host': '', 'snmp\_trap\_port': 162, 'syslogd\_enabled': False, 'syslogd\_server': '', 'vvol\_enabled': True}], 'network\_configs': [{'active\_since': 1592210265, 'array\_list': [{'ctrlr\_a\_support\_ip': '10.18.1.1', 'ctrlr\_b\_support\_ip': '10.18.2.2', 'member\_gid': 1, 'name': 'ansibler1-va', 'nic\_list': [{'data\_ip': '172.16.41.139', 'name': 'eth3', 'subnet\_label': 'data1', 'tagged': False}, {'data\_ip': '172.16.234.76', 'name': 'eth4', 'subnet\_label': 'data2', 'tagged': False}, {'data\_ip': '', 'name': 'eth2', 'subnet\_label': 'mgmt-data', 'tagged': False}, {'data\_ip': '', 'name': 'eth1', 'subnet\_label': 'mgmt-data', 'tagged': False}]}], 'creation\_time': 1586411318, 'group\_leader\_array': 'ansibler1-va', 'id': '177321e77f009f2013000000000000000000000001', 'iscsi\_automatic\_connection\_method': True, 'iscsi\_connection\_rebalancing': True, 'last\_active': 1592210256, 'last\_modified': 1586411356, 'mgmt\_ip': '10.18.171.96', 'name': 'active', 'role': 'active', 'route\_list': [{'gateway': '10.18.160.1', 'tgt\_netmask': '0.0.0.0', 'tgt\_network': '0.0.0.0'}], 'secondary\_mgmt\_ip': '', 'subnet\_list': [{'allow\_group': True, 'allow\_iscsi': True, 'discovery\_ip': '172.16.41.140', 'failover': True, 'failover\_enable\_time': 0, 'label': 'data1', 'mtu': 1500, 'netmask': '255.255.224.0', 'network': '172.16.32.0', 'netzone\_type': 'single', 'type': 'data', 'vlan\_id': 0}, {'allow\_group': True, 'allow\_iscsi': True, 'discovery\_ip': '172.16.234.101', 'failover': True, 'failover\_enable\_time': 0, 'label': 'data2', 'mtu': 1500, 'netmask': '255.255.224.0', 'network': '172.16.224.0', 'netzone\_type': 'single', 'type': 'data', 'vlan\_id': 0}, {'allow\_group': False, 'allow\_iscsi': False, 'discovery\_ip': '', 'failover': True, 'failover\_enable\_time': 0, 'label': 'mgmt-data', 'mtu': 1500, 'netmask': '255.255.224.0', 'network': '10.18.160.0', 'netzone\_type': 'none', 'type': 'mgmt', 'vlan\_id': 0}]}, {'active\_since': 0, 'array\_list': [{'ctrlr\_a\_support\_ip': '10.18.1.1', 'ctrlr\_b\_support\_ip': '10.18.2.2', 'member\_gid': 1, 'name': 'ansibler1-va', 'nic\_list': [{'data\_ip': '', 'name': 'eth2', 'subnet\_label': 'mgmt-data', 'tagged': False}, {'data\_ip': '', 'name': 'eth1', 'subnet\_label': 'mgmt-data', 'tagged': False}, {'data\_ip': '172.16.41.139', 'name': 'eth3', 'subnet\_label': 'data1', 'tagged': False}, {'data\_ip': '172.16.234.76', 'name': 'eth4', 'subnet\_label': 'data2', 'tagged': False}]}], 'creation\_time': 1586411356, 'group\_leader\_array': 'ansibler1-va', 'id': '177321e77f009f2013000000000000000000000002', 'iscsi\_automatic\_connection\_method': True, 'iscsi\_connection\_rebalancing': True, 'last\_active': 1592210265, 'last\_modified': 1586411318, 'mgmt\_ip': '10.18.171.96', 'name': 'backup', 'role': 'backup', 'route\_list': [{'gateway': '10.18.160.1', 'tgt\_netmask': '0.0.0.0', 'tgt\_network': '0.0.0.0'}], 'secondary\_mgmt\_ip': '', 'subnet\_list': [{'allow\_group': False, 'allow\_iscsi': False, 'discovery\_ip': '', 'failover': True, 'failover\_enable\_time': 0, 'label': 'mgmt-data', 'mtu': 1500, 'netmask': '255.255.224.0', 'network': '10.18.160.0', 'netzone\_type': 'none', 'type': 'mgmt', 'vlan\_id': 0}, {'allow\_group': True, 'allow\_iscsi': True, 'discovery\_ip': '172.16.41.140', 'failover': True, 'failover\_enable\_time': 0, 'label': 'data1', 'mtu': 1500, 'netmask': '255.255.224.0', 'network': '172.16.32.0', 'netzone\_type': 'single', 'type': 'data', 'vlan\_id': 0}, {'allow\_group': True, 'allow\_iscsi': True, 'discovery\_ip': '172.16.234.101', 'failover': True, 'failover\_enable\_time': 0, 'label': 'data2', 'mtu': 1500, 'netmask': '255.255.224.0', 'network': '172.16.224.0', 'netzone\_type': 'single', 'type': 'data', 'vlan\_id': 0}]}], 'pools': [{'array\_count': 1, 'dedupe\_all\_volumes': False, 'dedupe\_capable': False, 'is\_default': True, 'name': 'default', 'vol\_list': [{'id': '0675a5e21cc205c609000000000000000000000001', 'name': 'vol1', 'vol\_id': '0675a5e21cc205c609000000000000000000000001', 'vol\_name': 'vol1'}, {'id': '067321e77f009f2013000000000000000000000271', 'name': 'volumetc-vol1-0-24-07-2020-71470d6d-cd6e-11ea-9165-00505696c568', 'vol\_id': '067321e77f009f2013000000000000000000000271', 'vol\_name': 'volumetc-vol1-0-24-07-2020-71470d6d-cd6e-11ea-9165-00505696c568'}, {'id': '067321e77f009f201300000000000000000000024d', 'name': 'ansible-vol1', 'vol\_id': '067321e77f009f201300000000000000000000024d', 'vol\_name': 'ansible-vol1'}]}]}, 'default': {'arrays': [{'all\_flash': False, 'extended\_model': 'vmware-4G-5T-160F', 'full\_name': 'ansibler1-va'}], 'disks': 16, 'folders': 0, 'groups': [{'auto\_switchover\_messages': [], 'default\_iscsi\_target\_scope': 'group', 'encryption\_config': {'cipher': 'aes\_256\_xts', 'encryption\_active': True, 'encryption\_key\_manager': 'local', 'master\_key\_set': True, 'mode': 'available', 'scope': 'group'}, 'fc\_enabled': False, 'iscsi\_enabled': True, 'leader\_array\_name': 'ansibler1-va', 'name': 'group-ansibler1-va', 'num\_snaps': 49}], 'initiator\_groups': 1, 'protection\_schedules': 6, 'protection\_templates': 3, 'protocol\_endpoints': 0, 'snapshot\_collections': 49, 'snapshots': 49, 'software versions': '5.2.2.0-730069-opt', 'users': 2, 'volume\_collections': 1, 'volumes': 3}, 'snapshots': [{'access\_control\_records': None, 'agent\_type': 'none', 'app\_uuid': '', 'creation\_time': 1586429663, 'description': 'Replicated by protection policy volcoll2 schedule Schedule-new', 'expiry\_after': 1, 'expiry\_time': 0, 'id': '0475a5e21cc205c609000000000000000200000004', 'is\_manually\_managed': True, 'is\_replica': True, 'is\_unmanaged': False, 'last\_modified': 1586429956, 'metadata': None, 'name': 'adfsasfasfasf', 'new\_data\_compressed\_bytes': 0, 'new\_data\_uncompressed\_bytes': 0, 'new\_data\_valid': True, 'offline\_reason': 'user', 'online': False, 'origin\_name': '', 'pool\_name': 'default', 'replication\_status': None, 'schedule\_id': '0c7321e77f009f2013000000000000000000000008', 'schedule\_name': 'Schedule-new', 'serial\_number': '022e0240e677ef2f6c9ce9006cc7be73', 'size': 1073741824, 'snap\_collection\_id': '0575a5e21cc205c609000000000000000000000004', 'snap\_collection\_name': 'adfsasfasfasf', 'target\_name': 'iqn.2007-11.com.nimblestorage:group-ansibler1-va-g7321e77f009f2013', 'vol\_id': '0675a5e21cc205c609000000000000000000000001', 'vol\_name': 'vol1', 'vpd\_ieee0': '022e0240e677ef2f', 'vpd\_ieee1': '6c9ce9006cc7be73', 'vpd\_t10': 'Nimble 022e0240e677ef2f6c9ce9006cc7be73', 'writable': False}], 'volume\_collections': [{'volcoll2': {'id': '077321e77f009f2013000000000000000000000005', 'name': 'volcoll2'}}], 'volumes': [{'10.18.180.239-ansible-vol1': {'id': '067321e77f009f2013000000000000000000000230', 'name': '10.18.180.239-ansible-vol1'}}, {'changed-volname': {'id': '067321e77f009f201300000000000000000000022f', 'name': 'changed-volname'}}]} | ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#cba5a2a6a9a7aee6afa8b8e6b8bfa4b9aaacaee6aabebfa4a6aabfa2a4a5e6aea5acede8f8fcf0ede8fef9f0ede8fff3f0a3bbaeede8fffdf0a8a4a6)>
programming_docs
ansible hpe.nimble.hpe_nimble_encryption – Manage the HPE Nimble Storage encryption hpe.nimble.hpe\_nimble\_encryption – Manage the HPE Nimble Storage encryption ============================================================================= 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_encryption`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the encryption on an 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 | | --- | --- | --- | | **active** boolean | **Choices:*** no * yes | Whether the master key is active or not. | | **age** integer | | Minimum age (in hours) of inactive encryption keys to be purged. '0' indicates to purge the keys immediately. | | **encryption\_config** dictionary | | How encryption is configured for this group. Group encryption settings. | | **group\_encrypt** boolean | **Choices:*** no * yes | Flag for setting group encryption. | | **host** string / required | | HPE Nimble Storage IP address. | | **name** string / required | | Name of the master key. The only allowed value is "default". | | **new\_passphrase** string | | When changing the passphrase, this attribute specifies the new value of the passphrase. String with size from 8 to 64 printable characters. | | **passphrase** string | | Passphrase used to protect the master key, required during creation, enabling/disabling the key and change the passphrase to a new value. String with size from 8 to 64 printable characters. | | **password** string / required | | HPE Nimble Storage password. | | **purge\_inactive** boolean | **Choices:*** no * yes | Purges encryption keys that have been inactive for the age or longer. If you do not specify an age, the keys will be purged immediately. | | **state** string / required | **Choices:*** create * present * absent | The encryption operation. | | **username** string / required | | HPE Nimble Storage user name. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` # if state is create, then create master key, fails if it exist or cannot create # if state is present, then create master key if not present ,else success - name: Create master key hpe.nimble.hpe_nimble_encryption: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "default" passphrase: "{{ passphrase }}" active: "{{ active | default('false') }}" state: "{{ state | default('present') }}" - name: Delete master key hpe.nimble.hpe_nimble_encryption: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "default" state: "absent" - name: Purge inactive master key hpe.nimble.hpe_nimble_encryption: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "default" age: "{{ age | mandatory }}" state: "present" purge_inactive: true - name: Group encryption hpe.nimble.hpe_nimble_encryption: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" encryption_config: "{{ encryption_config | mandatory }}" state: "present" group_encrypt: true ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#2f4146424d434a024b4c5c025c5b405d4e484a024e5a5b40424e5b464041024a4148090c1c1814090c1a1d14090c1b1714475f4a090c1b19144c4042)> ansible hpe.nimble.hpe_nimble_chap_user – Manage the HPE Nimble Storage CHAP user hpe.nimble.hpe\_nimble\_chap\_user – Manage the HPE Nimble Storage CHAP user ============================================================================ 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_chap_user`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the CHAP user 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 | | --- | --- | --- | | **change\_name** string | | Change the name of the existing CHAP user. | | **description** string | | Text description of CHAP user. | | **host** string / required | | HPE Nimble Storage IP address. | | **initiator\_iqns** list / elements=dictionary | | List of iSCSI initiators. To be configured with this CHAP user for iSCSI Group Target CHAP authentication. This attribute cannot be modified at the same time with other attributes. If any specified initiator is already associated with another CHAP user, it will be replaced by this CHAP user for future CHAP authentication. | | **name** string / required | | The CHAP user name. | | **password** string / required | | HPE Nimble Storage password. | | **state** string / required | **Choices:*** create * present * absent | The CHAP user operation. | | **user\_password** string | | CHAP secret. The CHAP secret should be between 12-16 characters and cannot contain spaces or most punctuation. string of 12 to 16 printable ASCII characters excluding ampersand and ^[];` | | **username** string / required | | HPE Nimble Storage user name. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` # if state is create, then create chap user, fails if it exist or cannot create # if state is present, then create chap user if not present, else success - name: Create Chap User hpe.nimble.hpe_nimble_chap_user: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" description: "{{ description }}" user_password: "{{ user_password | mandatory }}" state: "{{ state | default('present') }}" - name: Delete Chap User hpe.nimble.hpe_nimble_chap_user: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: "absent" ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#ee8087838c828bc38a8d9dc39d9a819c8f898bc38f9b9a81838f9a878180c38b8089c8cdddd9d5c8cddbdcd5c8cddad6d5869e8bc8cddad8d58d8183)> ansible hpe.nimble.hpe_nimble_snapshot – Manage the HPE Nimble Storage snapshots hpe.nimble.hpe\_nimble\_snapshot – Manage the HPE Nimble Storage snapshots ========================================================================== 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_snapshot`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the snapshots 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 | | --- | --- | --- | | **agent\_type** string | **Choices:*** none * smis * vvol * openstack * openstackv2 | External management agent type. | | **app\_uuid** string | | Application identifier of snapshot. | | **change\_name** string | | Change name of the existing snapshot. | | **description** string | | Text description of snapshot. | | **expiry\_after** integer | | Number of seconds after which this snapshot is considered expired by snapshot TTL. A value of 0 indicates that snapshot never expires. | | **force** boolean | **Choices:*** no * yes | Forcibly delete the specified snapshot even if it is the last replicated collection. Doing so could lead to full re-seeding at the next replication. | | **host** string / required | | HPE Nimble Storage IP address. | | **metadata** dictionary | | Key-value pairs that augment a snapshot's attributes. List of key-value pairs. Keys must be unique and non-empty. | | **name** string / required | | Name of the snapshot. | | **online** boolean | **Choices:*** no * yes | Online state for a snapshot means it could be mounted for data restore. | | **password** string / required | | HPE Nimble Storage password. | | **state** string / required | **Choices:*** present * absent * create | The snapshot state. | | **username** string / required | | HPE Nimble Storage user name. | | **volume** string / required | | Parent volume name. | | **writable** boolean | **Choices:*** no * yes | Allow snapshot to be writable. Mandatory and must be set to 'true' for VSS application synchronized snapshots. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` # if state is create , then create a snapshot if not present. Fails if already present. # if state is present, then create a snapshot if not present. Succeeds if it already exists. - name: Create snapshot if not present hpe.nimble.hpe_nimble_snapshot: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" state: "{{ state | default('present') }}" volume: "{{ volume }}" name: "{{ name }}" online: "{{ online | default(true) }}" writable: "{{ writable | default(false) }}" - name: Delete snapshot (must be offline) hpe.nimble.hpe_nimble_snapshot: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" volume: "{{ volume }}" name: "{{ name }}" state: absent ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#a3cdcacec1cfc68ec7c0d08ed0d7ccd1c2c4c68ec2d6d7cccec2d7cacccd8ec6cdc4858090949885809691988580979b98cbd3c68580979598c0ccce)> ansible hpe.nimble.hpe_nimble_partner – Manage the HPE Nimble Storage Replication Partner hpe.nimble.hpe\_nimble\_partner – Manage the HPE Nimble Storage Replication Partner =================================================================================== 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_partner`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the replication partner 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 | | --- | --- | --- | | **control\_port** integer | | Port number of partner control interface. Value -1 for an invalid port or a positive integer value up to 65535 representing the TCP/IP port. | | **data\_port** integer | | Port number of partner data interface. Value -1 for an invalid port or a positive integer value up to 65535 representing the TCP/IP port. | | **description** string | | Description of replication partner. | | **downstream\_hostname** string / required | | IP address or hostname of partner interface. This must be the partner's Group Management IP address. String of up to 64 alphanumeric characters, - and . and ':' are allowed after first character. | | **folder** string | | The Folder ID within the pool where volumes replicated from this partner will be created. This is not supported for pool partners. | | **host** string / required | | HPE Nimble Storage IP address. | | **match\_folder** boolean | **Choices:*** no * yes | Indicates whether to match the upstream volume's folder on the downstream. | | **name** string | | Name of replication partner. String of up to 64 alphanumeric characters, - and . and ':' are allowed after first character. | | **password** string / required | | HPE Nimble Storage password. | | **pause** boolean | **Choices:*** no * yes | Pause replication for the specified partner. | | **pool** string | | The pool name where volumes replicated from this partner will be created. Replica volumes created as clones ignore this parameter and are always created in the same pool as their parent volume. | | **repl\_data\_hostname** string | | IP address or hostname of partner data interface. String of up to 64 alphanumeric characters, - and . and ':' are allowed after first character. | | **resume** boolean | **Choices:*** no * yes | Resume replication for the specified partner. | | **secret** string | | Replication partner shared secret, used for mutual authentication of the partners. | | **state** string / required | **Choices:*** create * present * absent | The replication partner operation. | | **subnet\_label** string | | Indicates whether to match the upstream volume's folder on the downstream. | | **subnet\_type** string | **Choices:*** invalid * unconfigured * unconfigured * mgmt * data * mgmt\_data | Type of the subnet used to replicate to this partner. | | **test** boolean | **Choices:*** no * yes | Test connectivity to the specified partner. | | **throttles** list / elements=dictionary | | Throttles used while replicating from/to this partner. All the throttles for the partner. | | **username** string / required | | HPE Nimble Storage user name. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` # if state is create, then create partner, fails if it exist or cannot create # if state is present, then create partner if not present ,else success - name: Create Partner hpe.nimble.hpe_nimble_partner: host: "{{ host }}" # upstream host username: "{{ username }}" password: "{{ password }}" name: "{{ name | mandatory }}" description: "{{ description }}" downstream_hostname: "{{ downstream_hostname | mandatory }}" secret: "{{ secret | mandatory }}" subnet_label: "{{ subnet_label | mandatory }}" state: "{{ state | default('present') }}" - name: Delete Partner hpe.nimble.hpe_nimble_partner: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" downstream_hostname: "{{ downstream_hostname | mandatory }}" state: "absent" - name: Test Partner hpe.nimble.hpe_nimble_partner: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" downstream_hostname: "{{ downstream_hostname | mandatory }}" state: "present" test: true - name: Pause Partner hpe.nimble.hpe_nimble_partner: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" downstream_hostname: "{{ downstream_hostname | mandatory }}" state: "present" pause: true - name: Resume Partner hpe.nimble.hpe_nimble_partner: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" downstream_hostname: "{{ downstream_hostname | mandatory }}" state: "present" resume: true ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#3f5156525d535a125b5c4c124c4b504d5e585a125e4a4b50525e4b565051125a5158191c0c0804191c0a0d04191c0b0704574f5a191c0b09045c5052)> ansible hpe.nimble.hpe_nimble_network – Manage the HPE Nimble Storage network configuration hpe.nimble.hpe\_nimble\_network – Manage the HPE Nimble Storage network configuration ===================================================================================== 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_network`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the storage network configuration on the 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 | | --- | --- | --- | | **activate** boolean | **Choices:*** no * yes | Activate a network configuration. | | **array** list / elements=dictionary | | List of array network configs. | | **change\_name** string | | Change name of the existing network config. | | **host** string / required | | HPE Nimble Storage IP address. | | **ignore\_validation\_mask** integer | | Indicates whether to ignore the validation. | | **iscsi\_automatic\_connection\_method** boolean | **Choices:*** no * yes | Whether automatic connection method is enabled. Enabling this means means redirecting connections from the specified iSCSI discovery IP address to the best data IP address based on connection counts. | | **iscsi\_connection\_rebalancing** boolean | **Choices:*** no * yes | Whether rebalancing is enabled. Enabling this means rebalancing iSCSI connections by periodically breaking existing connections that are out-of-balance, allowing the host to reconnect to a more appropriate data IP address. | | **mgmt\_ip** string | | Management IP address for the Group. Four numbers in the range (0,255) separated by periods. | | **name** string / required | **Choices:*** active * backup * draft | Name of the network configuration. Use the name 'draft' when creating a draft configuration. | | **password** string / required | | HPE Nimble Storage password. | | **route** list / elements=dictionary | | List of static routes. | | **secondary\_mgmt\_ip** string | | Secondary management IP address for the Group. Four numbers in the range [0,255] separated by periods. | | **state** string / required | **Choices:*** create * present * absent | The network config operation. | | **subnet** list / elements=dictionary | | List of subnet configs. | | **username** string / required | | HPE Nimble Storage user name. | | **validate** boolean | **Choices:*** no * yes | Validate a network configuration. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` # if state is create, then create network config, fails if it exist or cannot create # if state is present, then create network config if not present ,else success - name: Create network config hpe.nimble.hpe_nimble_network: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" route: "{{ route }}" subnet: "{{ subnet }}" array: "{{ array }}" iscsi_automatic_connection_method: true iscsi_connection_rebalancing: False mgmt_ip: "{{ mgmt_ip }}" state: "{{ state | default('present') }}" - name: Delete network config hpe.nimble.hpe_nimble_network: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: "absent" - name: Validate network config hpe.nimble.hpe_nimble_network: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: "present" ignore_validation_mask: 1 validate: true - name: Activate Network config hpe.nimble.hpe_nimble_network: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: "present" ignore_validation_mask: 1 activate: true ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#1e7077737c727b337a7d6d336d6a716c7f797b337f6b6a71737f6a777170337b7079383d2d2925383d2b2c25383d2a2625766e7b383d2a28257d7173)>
programming_docs
ansible hpe.nimble.hpe_nimble_array – Manage the HPE Nimble Storage array hpe.nimble.hpe\_nimble\_array – Manage the HPE Nimble Storage array =================================================================== 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_array`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the array 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 | | --- | --- | --- | | **allow\_lower\_limits** boolean | **Choices:*** no * yes | A True setting will allow you to add an array with lower limits to a pool with higher limits. | | **change\_name** string | | Change the name of the existing array. | | **create\_pool** boolean | **Choices:*** no * yes | Whether to create an associated pool during the array creation. | | **ctrlr\_a\_support\_ip** string | | Controller A Support IP Address. Four numbers in the range (0,255) separated by periods. | | **ctrlr\_b\_support\_ip** string | | Controller B Support IP Address. Four numbers in the range (0,255) separated by periods. | | **failover** boolean | **Choices:*** no * yes | Perform a failover on the specified array. | | **force** boolean | **Choices:*** no * yes | Forcibly delete the specified array. | | **halt** boolean | **Choices:*** no * yes | Halt the specified array. Restarting the array will require physically powering it back on. | | **host** string / required | | HPE Nimble Storage IP address. | | **name** string / required | | The user-provided name of the array. It is also the array's hostname. | | **nic\_list** list / elements=dictionary | | List NICs information. Used when creating an array. | | **password** string / required | | HPE Nimble Storage password. | | **pool\_description** string | | Text description of the pool to be created during array creation. | | **pool\_name** string | | Name of pool to which this is a member. | | **reboot** boolean | **Choices:*** no * yes | Reboot the specified array. | | **secondary\_mgmt\_ip** string | | Secondary management IP address for the group. | | **serial** string | | Serial number of the array. | | **state** string / required | **Choices:*** create * present * absent | The array operation | | **username** string / required | | HPE Nimble Storage user name. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` # if state is create , then create a array if not present. Fails if already present. # if state is present, then create a array if not present. Succeed if it already exists. - name: Create array if not present hpe.nimble.hpe_nimble_array: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" state: "{{ state | default('present') }}" name: "{{ name }}" ctrlr_b_support_ip: "{{ ctrlr_b_support_ip | mandatory}}" ctrlr_a_support_ip: "{{ ctrlr_a_support_ip | mandatory}}" serial: "{{ serial | mandatory}}" nic_list: "{{ nic_list | mandatory}}" pool_name: "{{ pool_name | mandatory}}" - name: Delete array hpe.nimble.hpe_nimble_array: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" vol_name: "{{ansible_default_ipv4['address']}}-{{ vol_name }}" name: "{{ name }}" state: absent - name: Failover array hpe.nimble.hpe_nimble_array: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" failover: true state: present - name: Halt array hpe.nimble.hpe_nimble_array: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: present halt: true - name: Reboot array hpe.nimble.hpe_nimble_array: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: present reboot: true ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#99f7f0f4fbf5fcb4fdfaeab4eaedf6ebf8fefcb4f8ecedf6f4f8edf0f6f7b4fcf7febfbaaaaea2bfbaacaba2bfbaada1a2f1e9fcbfbaadafa2faf6f4)> ansible hpe.nimble.hpe_nimble_fc – Manage the HPE Nimble Storage Fibre Channel hpe.nimble.hpe\_nimble\_fc – Manage the HPE Nimble Storage Fibre Channel ======================================================================== 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_fc`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage storage Fibre Channel 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 | | --- | --- | --- | | **array\_name\_or\_serial** string / required | | Name or serial number of array where the interface is hosted. | | **controller** string | | Name (A or B) of the controller where the interface is hosted. | | **host** string / required | | HPE Nimble Storage IP address. | | **hw\_upgrade** boolean | **Choices:*** no * yes | Update fibre channel configuration after hardware changes. Possible values:- 'true' 'false'. | | **name** string | | Name of fibre channel interface | | **online** boolean | **Choices:*** no * yes | Identify whether the fibre channel interface is online. Possible values:- 'true' 'false'. | | **password** string / required | | HPE Nimble Storage password. | | **precheck** boolean | **Choices:*** no * yes | Check if the interfaces are offline before regenerating the WWNN. Possible values:- 'true' 'false'. | | **regenerate** boolean | **Choices:*** no * yes | Regenerate fibre channel configuration. Possible values:- 'true' 'false'. | | **state** string / required | **Choices:*** present | The fibre channel operation. | | **username** string / required | | HPE Nimble Storage user name. | | **wwnn\_base\_str** string | | Base WWNN. Six bytes expressed in hex separated by colons. Example:- 'af:32:f1'. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` - name: Update fibre channel interface hpe.nimble.hpe_nimble_fc: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" array_name_or_serial: "{{ array_name_or_serial | mandatory }}" name: "{{ name | mandatory }}" controller: "{{ controller | mandatory }}" online: "{{ online | mandatory }}" state: "{{ 'present' }}" - name: Regenerate fibre channel config hpe.nimble.hpe_nimble_fc: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" array_name_or_serial: "{{ array_name_or_serial | mandatory }}" # provide the group_leader_array name wwnn_base_str: "{{ wwnn_base_str | mandatory }}" regenerate: true precheck: true state: "{{ 'present' }}" - name: Hardware upgrade for fibre channel hpe.nimble.hpe_nimble_fc: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" array_name_or_serial: "{{ array_name_or_serial | mandatory }}" hw_upgrade: true state: "{{ 'present' }}" ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#0a64636768666f276e697927797e65786b6d6f276b7f7e65676b7e636564276f646d2c29393d312c293f38312c293e3231627a6f2c293e3c31696567)> ansible hpe.nimble.hpe_nimble_user – Manage the HPE Nimble Storage users hpe.nimble.hpe\_nimble\_user – Manage the HPE Nimble Storage users ================================================================== 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_user`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the users 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 | | --- | --- | --- | | **auth\_password** string | | Authorization password for changing password. | | **change\_name** string | | Change name of the existing user. | | **description** string | | Description of the user. | | **disabled** boolean | **Choices:*** no * yes | User is currently disabled. | | **email\_addr** string | | Email address of the user. | | **full\_name** string | | Fully qualified name of the user. | | **host** string / required | | HPE Nimble Storage IP address. | | **inactivity\_timeout** integer | **Default:**0 | The amount of time that the user session is inactive before timing out. A value of 0 indicates that the timeout is taken from the group setting. | | **name** string / required | | Name of the user. | | **password** string / required | | HPE Nimble Storage password. | | **role** string | **Choices:*** administrator * poweruser * operator * guest | Role of the user. Default is 'guest'. | | **state** string / required | **Choices:*** create * present * absent | The user operation. | | **unlock** boolean | **Choices:*** no * yes | Unlock the user. | | **user\_password** string | | User's login password. | | **username** string / required | | HPE Nimble Storage user name. | Notes ----- Note * This module does not support `check_mode`. Examples -------- ``` # if state is create, then create user, fails if it exist or cannot create # if state is present, then create user if not present, else success - name: Create user hpe.nimble.hpe_nimble_user: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" description: "{{ description }}" state: "{{ state | default('present') }}" - name: Delete user hpe.nimble.hpe_nimble_user: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: "absent" - name: Unlock user hpe.nimble.hpe_nimble_user: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: "present" unlock: true ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#ef8186828d838ac28b8c9cc29c9b809d8e888ac28e9a9b80828e9b868081c28a8188c9ccdcd8d4c9ccdaddd4c9ccdbd7d4879f8ac9ccdbd9d48c8082)> ansible hpe.nimble.hpe_nimble_protection_template – Manage the HPE Nimble Storage protection templates hpe.nimble.hpe\_nimble\_protection\_template – Manage the HPE Nimble Storage protection templates ================================================================================================= 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_protection_template`. New in version 1.0.0: of hpe.nimble * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the protection templates 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 | | --- | --- | --- | | **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\_name** 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 protection template. | | **description** string | | Text description of protection template. | | **host** string / required | | HPE Nimble Storage IP address. | | **name** string / required | | Name of the protection template. | | **password** string / required | | HPE Nimble Storage password. | | **state** string / required | **Choices:*** present * absent * create | The protection template operations. | | **username** string / required | | HPE Nimble Storage user name. | | **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 protection template if not present. Fails if already present. # if state is present, then create a protection template if not present. Succeed if it already exists. - name: Create protection template if not present hpe.nimble.hpe_nimble_protection_template: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" description: "{{ description | default(None)}}" state: "{{ state | default('present') }}" - name: Delete protection template hpe.nimble.hpe_nimble_protection_template: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" name: "{{ name }}" state: absent ``` ### Authors * HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#325c5b5f505e571f5651411f41465d405355571f5347465d5f53465b5d5c1f575c55141101050914110700091411060a095a42571411060409515d5f)> ansible Collections in the Cisco Namespace 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) ansible cisco.intersight.intersight_server_profile – Server Profile configuration for Cisco Intersight cisco.intersight.intersight\_server\_profile – Server Profile configuration for Cisco Intersight ================================================================================================ Note This plugin is part of the [cisco.intersight collection](https://galaxy.ansible.com/cisco/intersight) (version 1.0.17). 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.intersight`. To use it in a playbook, specify: `cisco.intersight.intersight_server_profile`. New in version 2.10: of cisco.intersight * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Server Profile configuration for Cisco Intersight. * Used to configure Server Profiles with assigned servers and server policies. * For more information see [Cisco Intersight](https://intersight.com/apidocs). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key\_id** string / required | | Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT\_API\_KEY\_ID environment variable is used. | | **api\_private\_key** string / required | | Filename (absolute path) or string of PEM formatted private key data to be used for Intersight API authentication. If a string is used, Ansible vault should be used to encrypt string data. Ex. ansible-vault encrypt\_string --vault-id tme@/Users/dsoper/Documents/vault\_password\_file '-----BEGIN EC PRIVATE KEY----- <your private key data> -----END EC PRIVATE KEY-----' If not set, the value of the INTERSIGHT\_API\_PRIVATE\_KEY environment variable is used. | | **api\_uri** string | **Default:**"https://intersight.com/api/v1" | URI used to access the Intersight API. If not set, the value of the INTERSIGHT\_API\_URI environment variable is used. | | **assigned\_server** string | | Managed Obect ID (MOID) of assigned server. Option can be omitted if user wishes to assign server later. | | **boot\_order\_policy** string | | Name of Boot Order Policy to associate with this profile. | | **description** string | | The user-defined description of the Server Profile. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(\_). aliases: descr | | **imc\_access\_policy** string | | Name of IMC Access Policy to associate with this profile. | | **lan\_connectivity\_policy** string | | Name of LAN Connectivity Policy to associate with this profile. | | **local\_user\_policy** string | | Name of Local User Policy to associate with this profile. | | **name** string / required | | The name assigned to the Server Profile. The name must be between 1 and 62 alphanumeric characters, allowing special characters :-\_. | | **ntp\_policy** string | | Name of NTP Policy to associate with this profile. | | **organization** string | **Default:**"default" | The name of the Organization this resource is assigned to. Profiles and Policies that are created within a Custom Organization are applicable only to devices in the same Organization. | | **state** string | **Choices:*** **present** ← * absent | If `present`, will verify the resource is present and will create if needed. If `absent`, will verify the resource is absent and will delete if needed. | | **storage\_policy** string | | Name of Storage Policy to associate with this profile. | | **tags** string | | List of tags in Key:<user-defined key> Value:<user-defined value> format. | | **target\_platform** string | **Choices:*** **Standalone** ← * FIAttached | The platform for which the server profile is applicable. Can either be a server that is operating in Standalone mode or which is attached to a Fabric Interconnect (FIAttached) managed by Intersight. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Boolean control for verifying the api\_uri TLS certificate | | **virtual\_media\_policy** string | | Name of Virtual Media Policy to associate with this profile. | Examples -------- ``` - name: Configure Server Profile cisco.intersight.intersight_server_profile: api_private_key: "{{ api_private_key }}" api_key_id: "{{ api_key_id }}" name: SP-Server1 target_platform: FIAttached tags: - Key: Site Value: SJC02 description: Profile for Server1 assigned_server: 5e3b517d6176752d319a9999 boot_order_policy: COS-Boot imc_access_policy: sjc02-d23-access lan_connectivity_policy: sjc02-d23-lan local_user_policy: guest-admin ntp_policy: lab-ntp storage_policy: storage virtual_media_policy: COS-VM - name: Delete Server Profile cisco.intersight.intersight_server_profile: api_private_key: "{{ api_private_key }}" api_key_id: "{{ api_key_id }}" name: SP-Server1 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 | | --- | --- | --- | | **api\_repsonse** dictionary | always | The API response output returned by the specified resource. **Sample:** {'api\_response': {'AssignedServer': {'Moid': '5e3b517d6176752d319a0881', 'ObjectType': 'compute.Blade'}, 'Name': 'SP-IMM-6454-D23-1-1', 'ObjectType': 'server.Profile', 'Tags': [{'Key': 'Site', 'Value': 'SJC02'}], 'TargetPlatform': 'FIAttached', 'Type': 'instance'}} | ### Authors * David Soper (@dsoper2) * Sid Nath (@SidNath21) * Tse Kai β€œKevin” Chan (@BrightScale) * Soma Tummala (@SOMATUMMALA21)
programming_docs
ansible Cisco.Intersight 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. ansible cisco.intersight.intersight_target_claim – Target claim configuraiton for Cisco Intersight cisco.intersight.intersight\_target\_claim – Target claim configuraiton for Cisco Intersight ============================================================================================ Note This plugin is part of the [cisco.intersight collection](https://galaxy.ansible.com/cisco/intersight) (version 1.0.17). 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.intersight`. To use it in a playbook, specify: `cisco.intersight.intersight_target_claim`. New in version 2.8: of cisco.intersight * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Target claim configuraiton for Cisco Intersight * Used to claim or unclaim a Target from Cisco Intersight * For more information see [Cisco Intersight](https://intersight.com/apidocs). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key\_id** string / required | | Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT\_API\_KEY\_ID environment variable is used. | | **api\_private\_key** string / required | | Filename (absolute path) or string of PEM formatted private key data to be used for Intersight API authentication. If a string is used, Ansible vault should be used to encrypt string data. Ex. ansible-vault encrypt\_string --vault-id tme@/Users/dsoper/Documents/vault\_password\_file '-----BEGIN EC PRIVATE KEY----- <your private key data> -----END EC PRIVATE KEY-----' If not set, the value of the INTERSIGHT\_API\_PRIVATE\_KEY environment variable is used. | | **api\_uri** string | **Default:**"https://intersight.com/api/v1" | URI used to access the Intersight API. If not set, the value of the INTERSIGHT\_API\_URI environment variable is used. | | **claim\_code** string | | Claim code required for registering a new Target Required if *state=present* | | **device\_id** dictionary / required | | Device id (serial number) of target Targets containing multiple Target ids (e.g. IMM) can be formatted as <target1\_id>&<target2\_id> | | **state** string | **Choices:*** **present** ← * absent | If `present`, will verify the resource is present and will create if needed. If `absent`, will verify the resource is absent and will delete if needed. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Boolean control for verifying the api\_uri TLS certificate | Examples -------- ``` - name: Claim new Target cisco.intersight.intersight_target_claim: device_id: "{{ device_id }}" claim_code: "{{ claim_code }}" state: present - name: Delete a Target (unclaim) cisco.intersight.intersight_target_claim: device_id: "{{ device_id }}" 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 | | --- | --- | --- | | **api\_repsonse** dictionary | always | The API response output returned by the specified resource. **Sample:** {'api\_response': {'Account': {'ClassId': 'mo.MoRef', 'Moid': '8675309', 'ObjectType': 'iam.Account', 'link': 'https://www.intersight.com/api/v1/iam/Accounts/8675309'}, 'AccountMoid': '8675309', 'Ancestors': None, 'ClassId': 'asset.DeviceClaim', 'CreateTime': '2021-05-10T17:32:13.522665238Z', 'Device': {'ClassId': 'mo.MoRef', 'Moid': '9035768', 'ObjectType': 'asset.DeviceRegistration', 'link': 'https://www.intersight.com/api/v1/asset/DeviceRegistrations/9035768'}, 'DisplayNames': {'short': ['FDO241604EM&FDO24161700']}, 'DomainGroupMoid': '5b4e48a96a636d6d346cd1c5', 'ModTime': '2021-05-10T17:32:13.522665238Z', 'Moid': '8675309', 'ObjectType': 'asset.DeviceClaim', 'Owners': ['90357688675309'], 'PermissionResources': None, 'SecurityToken': 'A95486674376E', 'SerialNumber': 'FDO86753091&FDO86753092', 'SharedScope': '', 'Tags': [], 'trace\_id': 'NB3e883980a98adace8f7b9c2409cced1a'}} | ### Authors * Brandon Beck (@techBeck03) * CiscoUcs (@CiscoUcs) ansible cisco.intersight.intersight_rest_api – REST API configuration for Cisco Intersight cisco.intersight.intersight\_rest\_api – REST API configuration for Cisco Intersight ==================================================================================== Note This plugin is part of the [cisco.intersight collection](https://galaxy.ansible.com/cisco/intersight) (version 1.0.17). 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.intersight`. To use it in a playbook, specify: `cisco.intersight.intersight_rest_api`. New in version 2.8: of cisco.intersight * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Direct REST API configuration for Cisco Intersight. * All REST API resources and properties must be specified. * For more information see [Cisco Intersight](https://intersight.com/apidocs). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_body** dictionary | | The paylod for API requests used to modify resources. | | **api\_key\_id** string / required | | Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT\_API\_KEY\_ID environment variable is used. | | **api\_private\_key** string / required | | Filename (absolute path) or string of PEM formatted private key data to be used for Intersight API authentication. If a string is used, Ansible vault should be used to encrypt string data. Ex. ansible-vault encrypt\_string --vault-id tme@/Users/dsoper/Documents/vault\_password\_file '-----BEGIN EC PRIVATE KEY----- <your private key data> -----END EC PRIVATE KEY-----' If not set, the value of the INTERSIGHT\_API\_PRIVATE\_KEY environment variable is used. | | **api\_uri** string | **Default:**"https://intersight.com/api/v1" | URI used to access the Intersight API. If not set, the value of the INTERSIGHT\_API\_URI environment variable is used. | | **query\_params** dictionary | | Query parameters for the Intersight API query languange. | | **resource\_path** string / required | | Resource URI being configured related to api\_uri. | | **return\_list** boolean | **Choices:*** **no** ← * yes | If `yes`, will return a list of API results in the api\_response. By default only the 1st element of the API Results list is returned. Can only be used with GET operations. | | **state** string | **Choices:*** **present** ← * absent | If `present`, will verify the resource is present and will create if needed. If `absent`, will verify the resource is absent and will delete if needed. | | **update\_method** string | **Choices:*** **patch** ← * post | The HTTP method used for update operations. Some Intersight resources require POST operations for modifications. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Boolean control for verifying the api\_uri TLS certificate | Examples -------- ``` - name: Configure Boot Policy intersight_rest_api: api_private_key: "{{ api_private_key }}" api_key_id: "{{ api_key_id }}" api_key_uri: "{{ api_key_uri }}" validate_certs: "{{ validate_certs }}" resource_path: /boot/PrecisionPolicies query_params: $filter: "Name eq 'vmedia-localdisk'" api_body: { "Name": "vmedia-localdisk", "ConfiguredBootMode": "Legacy", "BootDevices": [ { "ObjectType": "boot.VirtualMedia", "Enabled": true, "Name": "remote-vmedia", "Subtype": "cimc-mapped-dvd" }, { "ObjectType": "boot.LocalDisk", "Enabled": true, "Name": "localdisk", "Slot": "MRAID", "Bootloader": null } ], } state: present - name: Delete Boot Policy intersight_rest_api: api_private_key: "{{ api_private_key }}" api_key_id: "{{ api_key_id }}" api_key_uri: "{{ api_key_uri }}" validate_certs: "{{ validate_certs }}" resource_path: /boot/PrecisionPolicies query_params: $filter: "Name eq 'vmedia-localdisk'" 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 | | --- | --- | --- | | **api\_repsonse** dictionary | always | The API response output returned by the specified resource. **Sample:** {'api\_response': {'BootDevices': [{'Enabled': True, 'Name': 'remote-vmedia', 'ObjectType': 'boot.VirtualMedia', 'Subtype': 'cimc-mapped-dvd'}, {'Bootloader': None, 'Enabled': True, 'Name': 'boot-lun', 'ObjectType': 'boot.LocalDisk', 'Slot': 'MRAID'}], 'ConfiguredBootMode': 'Legacy', 'Name': 'vmedia-localdisk', 'ObjectType': 'boot.PrecisionPolicy'}} | ### Authors * David Soper (@dsoper2) * CiscoUcs (@CiscoUcs) ansible cisco.intersight.intersight_imc_access_policy – IMC Access Policy configuration for Cisco Intersight cisco.intersight.intersight\_imc\_access\_policy – IMC Access Policy configuration for Cisco Intersight ======================================================================================================= Note This plugin is part of the [cisco.intersight collection](https://galaxy.ansible.com/cisco/intersight) (version 1.0.17). 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.intersight`. To use it in a playbook, specify: `cisco.intersight.intersight_imc_access_policy`. New in version 2.10: of cisco.intersight * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * IMC Access Policy configuration for Cisco Intersight. * Used to configure IP addresses and VLAN used for external connectivity to Cisco IMC. * For more information see [Cisco Intersight](https://intersight.com/apidocs). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key\_id** string / required | | Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT\_API\_KEY\_ID environment variable is used. | | **api\_private\_key** string / required | | Filename (absolute path) or string of PEM formatted private key data to be used for Intersight API authentication. If a string is used, Ansible vault should be used to encrypt string data. Ex. ansible-vault encrypt\_string --vault-id tme@/Users/dsoper/Documents/vault\_password\_file '-----BEGIN EC PRIVATE KEY----- <your private key data> -----END EC PRIVATE KEY-----' If not set, the value of the INTERSIGHT\_API\_PRIVATE\_KEY environment variable is used. | | **api\_uri** string | **Default:**"https://intersight.com/api/v1" | URI used to access the Intersight API. If not set, the value of the INTERSIGHT\_API\_URI environment variable is used. | | **descrption** string | | The user-defined description of the IMC access policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(\_). aliases: descr | | **ip\_pool** string / required | | IP Pool used to assign IP address and other required network settings. | | **name** string / required | | The name assigned to the IMC Access Policy. The name must be between 1 and 62 alphanumeric characters, allowing special characters :-\_. | | **organization** string | **Default:**"default" | The name of the Organization this resource is assigned to. Profiles and Policies that are created within a Custom Organization are applicable only to devices in the same Organization. | | **state** string | **Choices:*** **present** ← * absent | If `present`, will verify the resource is present and will create if needed. If `absent`, will verify the resource is absent and will delete if needed. | | **tags** string | | List of tags in Key:<user-defined key> Value:<user-defined value> format. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Boolean control for verifying the api\_uri TLS certificate | | **vlan\_id** integer / required | | VLAN to be used for server access over Inband network. | Examples -------- ``` - name: Configure IMC Access policy intersight_imc_access_policy: api_private_key: "{{ api_private_key }}" api_key_id: "{{ api_key_id }}" name: sjc02-d23-access description: IMC access for SJC02 rack D23 tags: - Site: D23 vlan_id: 131 ip_pool: sjc02-d23-ext-mgmt - name: Delete IMC Access policy intersight_imc_access_policy: api_private_key: "{{ api_private_key }}" api_key_id: "{{ api_key_id }}" name: sjc02-d23-access 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 | | --- | --- | --- | | **api\_repsonse** dictionary | always | The API response output returned by the specified resource. **Sample:** {'api\_response': {'Name': 'sjc02-d23-access', 'ObjectType': 'access.Policy', 'Profiles': [{'Moid': '5e4ec7ae77696e2d30840cfc', 'ObjectType': 'server.Profile'}, {'Moid': '5e84d78777696e2d302ec195', 'ObjectType': 'server.Profile'}], 'Tags': [{'Key': 'Site', 'Value': 'SJC02'}]}} | ### Authors * David Soper (@dsoper2) ansible cisco.intersight.intersight_info – Gather information about Intersight cisco.intersight.intersight\_info – Gather information about Intersight ======================================================================= Note This plugin is part of the [cisco.intersight collection](https://galaxy.ansible.com/cisco/intersight) (version 1.0.17). 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.intersight`. To use it in a playbook, specify: `cisco.intersight.intersight_info`. New in version 2.8: of cisco.intersight * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Gathers information about servers in [Cisco Intersight](https://intersight.com). * This module was called `intersight_facts` before Ansible 2.9. The usage did not change. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key\_id** string / required | | Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT\_API\_KEY\_ID environment variable is used. | | **api\_private\_key** string / required | | Filename (absolute path) or string of PEM formatted private key data to be used for Intersight API authentication. If a string is used, Ansible vault should be used to encrypt string data. Ex. ansible-vault encrypt\_string --vault-id tme@/Users/dsoper/Documents/vault\_password\_file '-----BEGIN EC PRIVATE KEY----- <your private key data> -----END EC PRIVATE KEY-----' If not set, the value of the INTERSIGHT\_API\_PRIVATE\_KEY environment variable is used. | | **api\_uri** string | **Default:**"https://intersight.com/api/v1" | URI used to access the Intersight API. If not set, the value of the INTERSIGHT\_API\_URI environment variable is used. | | **server\_names** list / elements=string / required | | Server names to retrieve information from. An empty list will return all servers. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Boolean control for verifying the api\_uri TLS certificate | Examples -------- ``` - name: Get info for all servers intersight_info: api_private_key: ~/Downloads/SecretKey.txt api_key_id: 64612d300d0982/64612d300d0b00/64612d300d3650 server_names: - debug: msg: "server name {{ item.Name }}, moid {{ item.Moid }}" loop: "{{ intersight_servers }}" when: intersight_servers is defined - name: Get info for servers by name intersight_info: api_private_key: ~/Downloads/SecretKey.txt api_key_id: 64612d300d0982/64612d300d0b00/64612d300d3650 server_names: - SJC18-L14-UCS1-1 - debug: msg: "server moid {{ intersight_servers[0].Moid }}" when: intersight_servers[0] is defined ``` 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 | | --- | --- | --- | | **intersight\_servers** complex | always | A list of Intersight Servers. See [Cisco Intersight](https://intersight.com/apidocs) for details. | | | **Moid** string | always | The unique identifier of this Managed Object instance. **Sample:** 5978bea36ad4b000018d63dc | | | **Name** string | always | The name of the server. **Sample:** SJC18-L14-UCS1-1 | ### Authors * David Soper (@dsoper2) * CiscoUcs (@CiscoUcs)
programming_docs
ansible cisco.intersight.intersight_ntp_policy – NTP policy configuration for Cisco Intersight cisco.intersight.intersight\_ntp\_policy – NTP policy configuration for Cisco Intersight ======================================================================================== Note This plugin is part of the [cisco.intersight collection](https://galaxy.ansible.com/cisco/intersight) (version 1.0.17). 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.intersight`. To use it in a playbook, specify: `cisco.intersight.intersight_ntp_policy`. New in version 2.10: of cisco.intersight * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * NTP policy configuration for Cisco Intersight. * Used to configure NTP servers and timezone settings on Cisco Intersight managed devices. * For more information see [Cisco Intersight](https://intersight.com/apidocs). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key\_id** string / required | | Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT\_API\_KEY\_ID environment variable is used. | | **api\_private\_key** string / required | | Filename (absolute path) or string of PEM formatted private key data to be used for Intersight API authentication. If a string is used, Ansible vault should be used to encrypt string data. Ex. ansible-vault encrypt\_string --vault-id tme@/Users/dsoper/Documents/vault\_password\_file '-----BEGIN EC PRIVATE KEY----- <your private key data> -----END EC PRIVATE KEY-----' If not set, the value of the INTERSIGHT\_API\_PRIVATE\_KEY environment variable is used. | | **api\_uri** string | **Default:**"https://intersight.com/api/v1" | URI used to access the Intersight API. If not set, the value of the INTERSIGHT\_API\_URI environment variable is used. | | **description** string | | The user-defined description of the NTP policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(\_). aliases: descr | | **enable** boolean | **Choices:*** no * **yes** ← | Enable or disable NTP. | | **name** string / required | | The name assigned to the NTP policy. The name must be between 1 and 62 alphanumeric characters, allowing special characters :-\_. | | **ntp\_servers** list / elements=string | | List of NTP servers configured on the endpoint. | | **organization** string | **Default:**"default" | The name of the Organization this resource is assigned to. Profiles and Policies that are created within a Custom Organization are applicable only to devices in the same Organization. | | **state** string | **Choices:*** **present** ← * absent | If `present`, will verify the resource is present and will create if needed. If `absent`, will verify the resource is absent and will delete if needed. | | **tags** list / elements=string | | List of tags in Key:<user-defined key> Value:<user-defined value> format. | | **timezone** string | | Timezone of services on the endpoint. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Boolean control for verifying the api\_uri TLS certificate | Examples -------- ``` - name: Configure NTP Policy cisco.intersight.intersight_ntp_policy: api_private_key: "{{ api_private_key }}" api_key_id: "{{ api_key_id }}" organization: DevNet name: lab-ntp description: NTP policy for lab use tags: - Key: Site Value: RCDN ntp_servers: - ntp.esl.cisco.com timezone: America/Chicago - name: Delete NTP Policy cisco.intersight.intersight_ntp_policy: api_private_key: "{{ api_private_key }}" api_key_id: "{{ api_key_id }}" organization: DevNet name: lab-ntp 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 | | --- | --- | --- | | **api\_repsonse** dictionary | always | The API response output returned by the specified resource. **Sample:** {'api\_response': {'Name': 'lab-ntp', 'ObjectType': 'ntp.Policy', 'Tags': [{'Key': 'Site', 'Value': 'RCDN'}]}} | ### Authors * David Soper (@dsoper2) ansible cisco.intersight.intersight_boot_order_policy cisco.intersight.intersight\_boot\_order\_policy ================================================ The documentation for the module plugin, cisco.intersight.intersight\_boot\_order\_policy, was malformed. The errors were: * ``` 1 validation error for ModuleDocSchema doc -> options -> boot_devices -> suboptions -> ip_type -> chocies extra fields not permitted (type=value_error.extra) ``` File a bug with the [cisco.intersight collection](https://galaxy.ansible.com/cisco/intersight) in order to have it corrected. ansible cisco.intersight.intersight_virtual_media_policy – Virtual Media policy configuration for Cisco Intersight cisco.intersight.intersight\_virtual\_media\_policy – Virtual Media policy configuration for Cisco Intersight ============================================================================================================= Note This plugin is part of the [cisco.intersight collection](https://galaxy.ansible.com/cisco/intersight) (version 1.0.17). 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.intersight`. To use it in a playbook, specify: `cisco.intersight.intersight_virtual_media_policy`. New in version 2.10: of cisco.intersight * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Virtual Media policy configuration for Cisco Intersight. * Used to configure Virtual Media image mappings on Cisco Intersight managed devices. * For more information see [Cisco Intersight](https://intersight.com/apidocs). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key\_id** string / required | | Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT\_API\_KEY\_ID environment variable is used. | | **api\_private\_key** string / required | | Filename (absolute path) or string of PEM formatted private key data to be used for Intersight API authentication. If a string is used, Ansible vault should be used to encrypt string data. Ex. ansible-vault encrypt\_string --vault-id tme@/Users/dsoper/Documents/vault\_password\_file '-----BEGIN EC PRIVATE KEY----- <your private key data> -----END EC PRIVATE KEY-----' If not set, the value of the INTERSIGHT\_API\_PRIVATE\_KEY environment variable is used. | | **api\_uri** string | **Default:**"https://intersight.com/api/v1" | URI used to access the Intersight API. If not set, the value of the INTERSIGHT\_API\_URI environment variable is used. | | **cdd\_virtual\_media** string | | CDD Virtual Media image mapping options. | | | **enable** boolean | **Choices:*** no * **yes** ← | Enable or disable CDD image mapping. | | | **mount\_type** string / required | **Choices:*** nfs * cifs * http * https | Type (protocol) of network share used by the remote\_hostname. Ensure that the remote\_hostname's communication port for the mount type that you choose is accessible from the managed endpoint. For CIFS as your mount type, ensure port 445 (which is its communication port) on the remote\_hostname is accessible. For HTTP, ensure port 80 is accessible. For HTTPS, ensure port 443 is accessible. For NFS, ensure port 2049 is accessible. | | | **password** string | | The password for the selected username, if required. | | | **remote\_file** string / required | | Filename of the remote image. Ex. custom\_image.iso | | | **remote\_hostname** string / required | | Hostname or IP address of the server hosting the virtual media image. | | | **remote\_path** string / required | | Filepath (not including the filename) of the remote image. Ex. mnt/SHARE/ISOS | | | **username** string | | The username for the specified Mount Type, if required. | | | **volume** string / required | | A user defined name of the image mounted for mapping. | | **descrption** string | | The user-defined description of the NTP policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(\_). aliases: descr | | **enable** boolean | **Choices:*** no * **yes** ← | Enable or disable virtual media. | | **encryption** boolean | **Choices:*** **no** ← * yes | If enabled, allows encryption of all Virtual Media communications | | **hdd\_virtual\_media** string | | HDD Virtual Media image mapping options. | | | **authentication\_protocol** string | | Authentication Protocol for CIFS Mount Type | | | **enable** boolean | **Choices:*** **no** ← * yes | Enable or disable HDD image mapping. | | | **mount\_options** string | | Mount options for the Virtual Media mapping. For NFS, supported options are ro, rw, nolock, noexec, soft, port=VALUE, timeo=VALUE, retry=VALUE For CIFS, supported options are soft, nounix, noserverino, guest | | | **mount\_type** string / required | **Choices:*** nfs * cifs * http * https | Type (protocol) of network share used by the remote\_hostname. Ensure that the remote\_hostname's communication port for the mount type that you choose is accessible from the managed endpoint. For CIFS as your mount type, ensure port 445 (which is its communication port) on the remote\_hostname is accessible. For HTTP, ensure port 80 is accessible. For HTTPS, ensure port 443 is accessible. For NFS, ensure port 2049 is accessible. | | | **password** string | | The password for the selected username, if required. | | | **remote\_file** string / required | | Filename of the remote image. Ex. custom\_image.iso | | | **remote\_hostname** string / required | | Hostname or IP address of the server hosting the virtual media image. | | | **remote\_path** string / required | | Filepath (not including the filename) of the remote image. Ex. mnt/SHARE/ISOS | | | **username** string | | The username for the specified Mount Type, if required. | | | **volume** string / required | | A user defined name of the image mounted for mapping. | | **low\_power\_usb** boolean | **Choices:*** no * **yes** ← | If enabled, the virtual drives appear on the boot selection menu after mapping the image and rebooting the host. | | **name** string / required | | The name assigned to the NTP policy. The name must be between 1 and 62 alphanumeric characters, allowing special characters :-\_. | | **organization** string | **Default:**"default" | The name of the Organization this resource is assigned to. Profiles and Policies that are created within a Custom Organization are applicable only to devices in the same Organization. | | **state** string | **Choices:*** **present** ← * absent | If `present`, will verify the resource is present and will create if needed. If `absent`, will verify the resource is absent and will delete if needed. | | **tags** list / elements=string | | List of tags in Key:<user-defined key> Value:<user-defined value> format. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Boolean control for verifying the api\_uri TLS certificate | Examples -------- ``` - name: Configure Virtual Media Policy cisco.intersight.intersight_virtual_media_policy: api_private_key: "{{ api_private_key }}" api_key_id: "{{ api_key_id }}" organization: DevNet name: lab-vmedia description: Virutal Media policy for lab use tags: - Key: Site Value: RCDN cdd_virtual_media: mount_type: nfs volume: nfs-cdd remote_hostname: 172.28.224.77 remote_path: mnt/SHARE/ISOS/CENTOS remote_file: CentOS7.iso hdd_virtual_media: mount_type: nfs volume: nfs-hdd remote_hostname: 172.28.224.77 remote_path: mnt/SHARE/ISOS/CENTOS remote_file: CentOS7.iso - name: Delete Virtual Media Policy cisco.intersight.intersight_virtual_media_policy: api_private_key: "{{ api_private_key }}" api_key_id: "{{ api_key_id }}" organization: DevNet name: lab-vmedia 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 | | --- | --- | --- | | **api\_repsonse** dictionary | always | The API response output returned by the specified resource. **Sample:** {'api\_response': {'Name': 'lab-ntp', 'ObjectType': 'ntp.Policy', 'Tags': [{'Key': 'Site', 'Value': 'RCDN'}]}} | ### Authors * David Soper (@dsoper2) * Sid Nath (@SidNath21) ansible cisco.mso.mso_schema_site_anp_epg_domain – Manage site-local EPG domains in schema template cisco.mso.mso\_schema\_site\_anp\_epg\_domain – Manage site-local EPG domains in schema template ================================================================================================ Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_anp_epg_domain`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local EPG domains in schema template on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **allow\_micro\_segmentation** boolean | **Choices:*** no * yes | Specifies microsegmentation is enabled or not. This attribute can only be used with vmmDomain domain association. | | **anp** string / required | | The name of the ANP. | | **deployment\_immediacy** string | **Choices:*** immediate * lazy | The deployment immediacy of the domain. `immediate` means **Deploy immediate**. `lazy` means **deploy on demand**. | | **domain\_association\_type** string | **Choices:*** vmmDomain * l3ExtDomain * l2ExtDomain * physicalDomain * fibreChannelDomain | The type of domain to associate. | | **domain\_profile** string | | The domain profile name. | | **enhanced\_lagpolicy\_dn** string | | Distinguished name of EPG lagpolicy. This attribute can only be used with vmmDomain domain association. | | **enhanced\_lagpolicy\_name** string | | EPG enhanced lagpolicy name. This attribute can only be used with vmmDomain domain association. | | **epg** string / required | | The name of the EPG. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **micro\_seg\_vlan** integer | | Virtual LAN for microsegmentation. This attribute can only be used with vmmDomain domain association. | | **micro\_seg\_vlan\_type** string | | Virtual LAN type for microsegmentation. This attribute can only be used with vmmDomain domain association. vlan is currently the only accepted value. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **port\_encap\_vlan** integer | | Virtual LAN type for port encap. This attribute can only be used with vmmDomain domain association. | | **port\_encap\_vlan\_type** string | | Virtual LAN type for port encap. This attribute can only be used with vmmDomain domain association. vlan is currently the only accepted value. | | **resolution\_immediacy** string | **Choices:*** immediate * lazy * pre-provision | Determines when the policies should be resolved and available. Defaults to `lazy` when unset during creation. | | **schema** string / required | | The name of the schema. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **switch\_type** string | | Which switch type to use with this domain association. This attribute can only be used with vmmDomain domain association. | | **switching\_mode** string | | Which switching mode to use with this domain association. This attribute can only be used with vmmDomain domain association. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **vlan\_encap\_mode** string | **Choices:*** static * dynamic | Which VLAN enacap mode to use. This attribute can only be used with vmmDomain domain association. | Notes ----- Note * The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index. This can cause silent corruption on concurrent access when changing/removing on object as the wrong object may be referenced. This module is affected by this deficiency. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site\_anp\_epg](mso_schema_site_anp_epg_module#ansible-collections-cisco-mso-mso-schema-site-anp-epg-module) The official documentation on the **cisco.mso.mso\_schema\_site\_anp\_epg** module. [cisco.mso.mso\_schema\_template\_anp\_epg](mso_schema_template_anp_epg_module#ansible-collections-cisco-mso-mso-schema-template-anp-epg-module) The official documentation on the **cisco.mso.mso\_schema\_template\_anp\_epg** module. Examples -------- ``` - name: Add a new domain to a site EPG cisco.mso.mso_schema_site_anp_epg_domain: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 domain_association_type: vmmDomain domain_profile: 'VMware-VMM' deployment_immediacy: lazy resolution_immediacy: pre-provision state: present delegate_to: localhost - name: Remove a domain from a site EPG cisco.mso.mso_schema_site_anp_epg_domain: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 domain_association_type: vmmDomain domain_profile: 'VMware-VMM' deployment_immediacy: lazy resolution_immediacy: pre-provision state: absent delegate_to: localhost - name: Query a domain associated with a specific site EPG cisco.mso.mso_schema_site_anp_epg_domain: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 domain_association_type: vmmDomain domain_profile: 'VMware-VMM' state: query delegate_to: localhost register: query_result - name: Query all domains associated with a site EPG cisco.mso.mso_schema_site_anp_epg_domain: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 state: query delegate_to: localhost register: query_result ``` ### Authors * Nirav Katarmal (@nkatarmal-crest)
programming_docs
ansible cisco.mso.mso_schema – Manage schemas cisco.mso.mso\_schema – Manage schemas ====================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage schemas on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string | | The name of the schema. aliases: name | | **state** string | **Choices:*** absent * **query** ← | Use `absent` for removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Due to restrictions of the MSO REST API this module cannot create empty schemas (i.e. schemas without templates). Use the [cisco.mso.mso\_schema\_template](mso_schema_template_module#ansible-collections-cisco-mso-mso-schema-template-module) to automatically create schemas with templates. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site](mso_schema_site_module#ansible-collections-cisco-mso-mso-schema-site-module) The official documentation on the **cisco.mso.mso\_schema\_site** module. [cisco.mso.mso\_schema\_template](mso_schema_template_module#ansible-collections-cisco-mso-mso-schema-template-module) The official documentation on the **cisco.mso.mso\_schema\_template** module. Examples -------- ``` - name: Remove schemas cisco.mso.mso_schema: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 state: absent delegate_to: localhost - name: Query a schema cisco.mso.mso_schema: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 state: query delegate_to: localhost register: query_result - name: Query all schemas cisco.mso.mso_schema: host: mso_host username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_clone – Clone schemas cisco.mso.mso\_schema\_clone – Clone schemas ============================================ Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_clone`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Clone schemas on Cisco ACI Multi-Site. * Clones only template objects and not site objects. * This module can only be used on versions of MSO that are 3.3 or greater. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **destination\_schema** string | | The name of the destination\_schema. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **source\_schema** string | | The name of the source\_schema. | | **state** string | **Choices:*** **clone** ← | Use `clone` for adding. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema](mso_schema_module#ansible-collections-cisco-mso-mso-schema-module) The official documentation on the **cisco.mso.mso\_schema** module. Examples -------- ``` - name: Clone schema cisco.mso.mso_schema_clone: host: mso_host username: admin password: SomeSecretPassword source_schema: Source_Schema destination_schema: Destination_Schema state: clone delegate_to: localhost ``` ### Authors * Anvitha Jain (@anvitha-jain) ansible cisco.mso.mso_schema_site_anp_epg_staticleaf – Manage site-local EPG static leafs in schema template cisco.mso.mso\_schema\_site\_anp\_epg\_staticleaf – Manage site-local EPG static leafs in schema template ========================================================================================================= Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_anp_epg_staticleaf`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local EPG static leafs in schema template on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **anp** string / required | | The name of the ANP. | | **epg** string / required | | The name of the EPG. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **leaf** string | | The path of the static leaf. aliases: name | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **pod** string | | The pod of the static leaf. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **vlan** integer | | The VLAN id of the static leaf. | Notes ----- Note * The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index. This can cause silent corruption on concurrent access when changing/removing on object as the wrong object may be referenced. This module is affected by this deficiency. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site\_anp\_epg](mso_schema_site_anp_epg_module#ansible-collections-cisco-mso-mso-schema-site-anp-epg-module) The official documentation on the **cisco.mso.mso\_schema\_site\_anp\_epg** module. [cisco.mso.mso\_schema\_template\_anp\_epg](mso_schema_template_anp_epg_module#ansible-collections-cisco-mso-mso-schema-template-anp-epg-module) The official documentation on the **cisco.mso.mso\_schema\_template\_anp\_epg** module. Examples -------- ``` - name: Add a new static leaf to a site EPG cisco.mso.mso_schema_site_anp_epg_staticleaf: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 leaf: Leaf1 vlan: 123 state: present delegate_to: localhost - name: Remove a static leaf from a site EPG cisco.mso.mso_schema_site_anp_epg_staticleaf: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 leaf: Leaf1 state: absent delegate_to: localhost - name: Query a specific site EPG static leaf cisco.mso.mso_schema_site_anp_epg_staticleaf: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 leaf: Leaf1 state: query delegate_to: localhost register: query_result - name: Query all site EPG static leafs cisco.mso.mso_schema_site_anp_epg_staticleaf: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_site_vrf_region_cidr_subnet – Manage site-local VRF regions in schema template cisco.mso.mso\_schema\_site\_vrf\_region\_cidr\_subnet – Manage site-local VRF regions in schema template ========================================================================================================= Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_vrf_region_cidr_subnet`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local VRF regions in schema template on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cidr** string / required | | The IP range of for the region CIDR. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **region** string / required | | The name of the region. | | **schema** string / required | | The name of the schema. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **subnet** string | | The IP subnet of this region CIDR. aliases: ip | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **vgw** boolean | **Choices:*** no * yes | Whether this subnet is used for the Azure Gateway in Azure. Whether this subnet is used for the Transit Gateway Attachment in AWS. aliases: hub\_network | | **vrf** string / required | | The name of the VRF. | | **zone** string | | The name of the zone for the region CIDR subnet. This argument is required for AWS sites. aliases: name | Notes ----- Note * The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index. This can cause silent corruption on concurrent access when changing/removing on object as the wrong object may be referenced. This module is affected by this deficiency. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site\_vrf\_region\_cidr](mso_schema_site_vrf_region_cidr_module#ansible-collections-cisco-mso-mso-schema-site-vrf-region-cidr-module) The official documentation on the **cisco.mso.mso\_schema\_site\_vrf\_region\_cidr** module. [cisco.mso.mso\_schema\_template\_vrf](mso_schema_template_vrf_module#ansible-collections-cisco-mso-mso-schema-template-vrf-module) The official documentation on the **cisco.mso.mso\_schema\_template\_vrf** module. Examples -------- ``` - name: Add a new site VRF region CIDR subnet cisco.mso.mso_schema_site_vrf_region_cidr_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 region: us-west-1 cidr: 14.14.14.1/24 subnet: 14.14.14.2/24 zone: us-west-1a state: present delegate_to: localhost - name: Remove a site VRF region CIDR subnet cisco.mso.mso_schema_site_vrf_region_cidr_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 region: us-west-1 cidr: 14.14.14.1/24 subnet: 14.14.14.2/24 state: absent delegate_to: localhost - name: Query a specific site VRF region CIDR subnet cisco.mso.mso_schema_site_vrf_region_cidr_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 region: us-west-1 cidr: 14.14.14.1/24 subnet: 14.14.14.2/24 state: query delegate_to: localhost register: query_result - name: Query all site VRF region CIDR subnet cisco.mso.mso_schema_site_vrf_region_cidr_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 region: us-west-1 cidr: 14.14.14.1/24 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) * Lionel Hercot (@lhercot)
programming_docs
ansible cisco.mso.mso_schema_template_migrate – Migrate Bridge Domains (BDs) and EPGs between templates cisco.mso.mso\_schema\_template\_migrate – Migrate Bridge Domains (BDs) and EPGs between templates ================================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_migrate`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Migrate BDs and EPGs between templates of same and different schemas. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **bds** list / elements=string | | The name of the BDs to migrate. | | **epgs** list / elements=dictionary | | The name of the EPGs and the ANP it is in to migrate. | | | **anp** string / required | | The name of the anp to migrate. | | | **epg** string / required | | The name of the EPG to migrate. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **state** string | **Default:**"present" | Use `present` for adding. | | **target\_schema** string / required | | The name of the target\_schema. | | **target\_template** string / required | | The name of the target\_template. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Migration of objects between templates of same schema mso_schema_template_migrate: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 target_schema: Schema 1 target_template: Template 2 bds: - BD epgs: - epg: EPG1 anp: ANP state: present delegate_to: localhost - name: Migration of objects between templates of different schema mso_schema_template_migrate: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 target_schema: Schema 2 target_template: Template 2 bds: - BD epgs: - epg: EPG1 anp: ANP state: present delegate_to: localhost - name: Migration of BD object between templates of same schema mso_schema_template_migrate: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 target_schema: Schema 1 target_template: Template 2 bds: - BD - BD1 state: present delegate_to: localhost - name: Migration of BD object between templates of different schema mso_schema_template_migrate: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 target_schema: Schema 2 target_template: Template 2 bds: - BD - BD1 state: present delegate_to: localhost - name: Migration of EPG objects between templates of same schema mso_schema_template_migrate: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 target_schema: Schema 2 target_template: Template 2 epgs: - epg: EPG1 anp: ANP - epg: EPG2 anp: ANP2 state: present delegate_to: localhost - name: Migration of EPG objects between templates of different schema mso_schema_template_migrate: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 target_schema: Schema 2 target_template: Template 2 epgs: - epg: EPG1 anp: ANP - epg: EPG2 anp: ANP2 state: present delegate_to: localhost ``` ### Authors * Anvitha Jain (@anvitha-jain) ansible cisco.mso.mso_schema_template_anp_epg_subnet – Manage EPG subnets in schema templates cisco.mso.mso\_schema\_template\_anp\_epg\_subnet – Manage EPG subnets in schema templates ========================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_anp_epg_subnet`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage EPG subnets in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **anp** string / required | | The name of the ANP. | | **description** string | | The description of this subnet. | | **epg** string / required | | The name of the EPG to manage. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **no\_default\_gateway** boolean | **Choices:*** **no** ← * yes | Whether this subnet has a default gateway. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **scope** string | **Choices:*** **private** ← * public | The scope of the subnet. | | **shared** boolean | **Choices:*** **no** ← * yes | Whether this subnet is shared between VRFs. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **subnet** string / required | | The IP range in CIDR notation. aliases: ip | | **template** string / required | | The name of the template to change. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Due to restrictions of the MSO REST API concurrent modifications to EPG subnets can be dangerous and corrupt data. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new subnet to an EPG cisco.mso.mso_schema_template_anp_epg_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 subnet: 10.0.0.0/24 state: present delegate_to: localhost - name: Remove a subnet from an EPG cisco.mso.mso_schema_template_anp_epg_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 subnet: 10.0.0.0/24 state: absent delegate_to: localhost - name: Query a specific EPG subnet cisco.mso.mso_schema_template_anp_epg_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 subnet: 10.0.0.0/24 state: query delegate_to: localhost register: query_result - name: Query all EPGs subnets cisco.mso.mso_schema_template_anp_epg_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_dhcp_relay_policy – Manage DHCP Relay policies. cisco.mso.mso\_dhcp\_relay\_policy – Manage DHCP Relay policies. ================================================================ Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_dhcp_relay_policy`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage DHCP Relay policies on Cisco Multi-Site Orchestrator. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **description** string | | Description of the DHCP Relay Policy | | **dhcp\_relay\_policy** string | | Name of the DHCP Relay Policy aliases: name | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | Tenant where the DHCP Relay Policy is located. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new DHCP Relay Policy cisco.mso.mso_dhcp_relay_policy: host: mso_host username: admin password: SomeSecretPassword dhcp_relay_policy: my_test_dhcp_policy description: "My Test DHCP Policy" tenant: ansible_test state: present delegate_to: localhost - name: Remove DHCP Relay Policy cisco.mso.mso_dhcp_relay_policy: host: mso_host username: admin password: SomeSecretPassword dhcp_relay_policy: my_test_dhcp_policy state: absent delegate_to: localhost - name: Query a DHCP Relay Policy cisco.mso.mso_dhcp_relay_policy: host: mso_host username: admin password: SomeSecretPassword dhcp_relay_policy: my_test_dhcp_policy state: query delegate_to: localhost - name: Query all DHCP Relay Policies cisco.mso.mso_dhcp_relay_policy: host: mso_host username: admin password: SomeSecretPassword state: query delegate_to: localhost ``` ### Authors * Jorge Gomez (@jorgegome2307) ansible cisco.mso.mso_role – Manage roles cisco.mso.mso\_role – Manage roles ================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_role`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage roles on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **description** string | | The description of the role. | | **display\_name** string | | The name of the role to be displayed in the web UI. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **read\_permissions** list / elements=string | **Choices:*** backup-db * manage-audit-records * manage-labels * manage-roles * manage-schemas * manage-sites * manage-tenants * manage-tenant-schemas * manage-users * platform-logs * view-all-audit-records * view-labels * view-roles * view-schemas * view-sites * view-tenants * view-tenant-schemas * view-users | A list of read permissions tied to this role. | | **role** string | | The name of the role. aliases: name | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **write\_permissions** list / elements=string | **Choices:*** backup-db * manage-audit-records * manage-labels * manage-roles * manage-schemas * manage-sites * manage-tenants * manage-tenant-schemas * manage-users * platform-logs * view-all-audit-records * view-labels * view-roles * view-schemas * view-sites * view-tenants * view-tenant-schemas * view-users | A list of write permissions tied to this role. aliases: permissions | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new role cisco.mso.mso_role: host: mso_host username: admin password: SomeSecretPassword role: readOnly display_name: Read Only description: Read-only access for troubleshooting read_permissions: - view-roles - view-schemas - view-sites - view-tenants - view-tenant-schemas - view-users write_permissions: - manage-roles - manage-schemas - manage-sites - manage-tenants - manage-tenant-schemas - manage-users state: present delegate_to: localhost - name: Remove a role cisco.mso.mso_role: host: mso_host username: admin password: SomeSecretPassword role: readOnly state: absent delegate_to: localhost - name: Query a role cisco.mso.mso_role: host: mso_host username: admin password: SomeSecretPassword role: readOnly state: query delegate_to: localhost register: query_result - name: Query all roles cisco.mso.mso_role: host: mso_host username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers)
programming_docs
ansible Cisco.Mso 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. ansible cisco.mso.mso_schema_template_filter_entry – Manage filter entries in schema templates cisco.mso.mso\_schema\_template\_filter\_entry – Manage filter entries in schema templates ========================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_filter_entry`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage filter entries in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **arp\_flag** string | **Choices:*** reply * request * unspecified | The ARP flag to use for this filter entry. | | **description** string | | The description of this filer entry. aliases: entry\_description | | **destination\_from** string | | The destination port range from. | | **destination\_to** string | | The destination port range to. | | **display\_name** string | | The name as displayed on the MSO web interface. aliases: entry\_display\_name | | **entry** string | | The filter entry name to manage. aliases: name | | **ethertype** string | **Choices:*** arp * fcoe * ip * ipv4 * ipv6 * mac-security * mpls-unicast * trill * unspecified | The ethernet type to use for this filter entry. | | **filter** string / required | | The name of the filter to manage. There should be no space in the filter name. APIC will throw an error if a space is provided in the filter name. See the `filter_display_name` attribute if you want the display name of the filter to contain a space. | | **filter\_display\_name** string | | The name as displayed on the MSO web interface. | | **fragments\_only** boolean | **Choices:*** no * yes | Whether this filter entry only matches fragments. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **ip\_protocol** string | **Choices:*** eigrp * egp * icmp * icmpv6 * igmp * igp * l2tp * ospfigp * pim * tcp * udp * unspecified | The IP protocol to use for this filter entry. | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **source\_from** string | | The source port range from. | | **source\_to** string | | The source port range to. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **stateful** boolean | **Choices:*** no * yes | Whether this filter entry is stateful. | | **tcp\_session\_rules** list / elements=string | **Choices:*** acknowledgement * established * finish * synchronize * reset * unspecified | A list of TCP session rules. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Due to restrictions of the MSO REST API this module creates filters when needed, and removes them when the last entry has been removed. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_template\_contract\_filter](mso_schema_template_contract_filter_module#ansible-collections-cisco-mso-mso-schema-template-contract-filter-module) The official documentation on the **cisco.mso.mso\_schema\_template\_contract\_filter** module. Examples -------- ``` - name: Add a new filter entry cisco.mso.mso_schema_template_filter_entry: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 filter: Filter 1 state: present delegate_to: localhost - name: Remove a filter entry cisco.mso.mso_schema_template_filter_entry: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 filter: Filter 1 state: absent delegate_to: localhost - name: Query a specific filter entry cisco.mso.mso_schema_template_filter_entry: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 filter: Filter 1 state: query delegate_to: localhost register: query_result - name: Query all filter entries cisco.mso.mso_schema_template_filter_entry: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso – MSO Ansible HTTPAPI Plugin. cisco.mso.mso – MSO Ansible HTTPAPI Plugin. =========================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso`. New in version 1.2.0: of cisco.mso Synopsis -------- * This MSO plugin provides the HTTPAPI transport methods needed to initiate a connection to MSO, send API requests and process the response. ### Authors * Lionel Hercot (lhercot) ansible cisco.mso.mso_schema_site_anp_epg_subnet – Manage site-local EPG subnets in schema template cisco.mso.mso\_schema\_site\_anp\_epg\_subnet – Manage site-local EPG subnets in schema template ================================================================================================ Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_anp_epg_subnet`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local EPG subnets in schema template on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **anp** string / required | | The name of the ANP. | | **description** string | | The description of this subnet. | | **epg** string / required | | The name of the EPG. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **no\_default\_gateway** boolean | **Choices:*** **no** ← * yes | Whether this subnet has a default gateway. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **scope** string | **Choices:*** **private** ← * public | The scope of the subnet. | | **shared** boolean | **Choices:*** **no** ← * yes | Whether this subnet is shared between VRFs. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **subnet** string / required | | The IP range in CIDR notation. aliases: ip | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index. This can cause silent corruption on concurrent access when changing/removing on object as the wrong object may be referenced. This module is affected by this deficiency. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site\_anp\_epg](mso_schema_site_anp_epg_module#ansible-collections-cisco-mso-mso-schema-site-anp-epg-module) The official documentation on the **cisco.mso.mso\_schema\_site\_anp\_epg** module. [cisco.mso.mso\_schema\_template\_anp\_epg\_subnet](mso_schema_template_anp_epg_subnet_module#ansible-collections-cisco-mso-mso-schema-template-anp-epg-subnet-module) The official documentation on the **cisco.mso.mso\_schema\_template\_anp\_epg\_subnet** module. Examples -------- ``` - name: Add a new subnet to a site EPG cisco.mso.mso_schema_site_anp_epg_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 subnet: 10.0.0.0/24 state: present delegate_to: localhost - name: Remove a subnet from a site EPG cisco.mso.mso_schema_site_anp_epg_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 subnet: 10.0.0.0/24 state: absent delegate_to: localhost - name: Query a specific site EPG subnet cisco.mso.mso_schema_site_anp_epg_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 subnet: 10.0.0.0/24 state: query delegate_to: localhost register: query_result - name: Query all site EPG subnets cisco.mso.mso_schema_site_anp_epg_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers)
programming_docs
ansible cisco.mso.mso_schema_site_external_epg – Manage External EPG in schema of sites cisco.mso.mso\_schema\_site\_external\_epg – Manage External EPG in schema of sites =================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_external_epg`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage External EPG in schema of sites on Cisco ACI Multi-Site. * This module can only be used on versions of MSO that are 3.3 or greater. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **external\_epg** string | | The name of the External EPG to be managed. aliases: name | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **l3out** string | | The L3Out associated with the external epg. | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template to change. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_template\_external\_epg](mso_schema_template_external_epg_module#ansible-collections-cisco-mso-mso-schema-template-external-epg-module) The official documentation on the **cisco.mso.mso\_schema\_template\_external\_epg** module. Examples -------- ### Authors * Anvitha Jain (@anvitha-jain) ansible cisco.mso.mso_version – Get version of MSO cisco.mso.mso\_version – Get version of MSO =========================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_version`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Retrieve the code version of Cisco Multi-Site Orchestrator. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **state** string | **Choices:*** **query** ← | Use `query` for retrieving the version object. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Get MSO version cisco.mso.mso_version: host: mso_host username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` ### Authors * Lionel Hercot (@lhercot) ansible cisco.mso.mso_schema_site_vrf_region – Manage site-local VRF regions in schema template cisco.mso.mso\_schema\_site\_vrf\_region – Manage site-local VRF regions in schema template =========================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_vrf_region`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local VRF regions in schema template on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **region** string | | The name of the region to manage. aliases: name | | **schema** string / required | | The name of the schema. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **vpn\_gateway\_router** boolean | **Choices:*** no * yes | Whether VPN Gateway Router is enabled or not. | | **vrf** string / required | | The name of the VRF. | Notes ----- Note * Due to restrictions of the MSO REST API, this module cannot create empty region (i.e. regions without cidrs) Use the [cisco.mso.mso\_schema\_site\_vrf\_region\_cidr](mso_schema_site_vrf_region_cidr_module#ansible-collections-cisco-mso-mso-schema-site-vrf-region-cidr-module) to automatically create regions with cidrs. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site\_vrf](mso_schema_site_vrf_module#ansible-collections-cisco-mso-mso-schema-site-vrf-module) The official documentation on the **cisco.mso.mso\_schema\_site\_vrf** module. [cisco.mso.mso\_schema\_template\_vrf](mso_schema_template_vrf_module#ansible-collections-cisco-mso-mso-schema-template-vrf-module) The official documentation on the **cisco.mso.mso\_schema\_template\_vrf** module. Examples -------- ``` - name: Remove VPN Gateway Router at site VRF Region cisco.mso.mso_schema_site_vrf_region: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 region: us-west-1 vpn_gateway_router: false state: present delegate_to: localhost - name: Remove a site VRF region cisco.mso.mso_schema_site_vrf_region: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 region: us-west-1 state: absent delegate_to: localhost - name: Query a specific site VRF region cisco.mso.mso_schema_site_vrf_region: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 region: us-west-1 state: query delegate_to: localhost register: query_result - name: Query all site VRF regions cisco.mso.mso_schema_site_vrf_region: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_template_external_epg_selector – Manage External EPG selector in schema templates cisco.mso.mso\_schema\_template\_external\_epg\_selector – Manage External EPG selector in schema templates =========================================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_external_epg_selector`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage External EPG selector in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **expressions** list / elements=dictionary | | Expressions associated to this selector. | | | **operator** string / required | **Choices:*** equals | The operator associated with the expression which in this case is always equals. | | | **type** string / required | **Choices:*** ip\_address | The name of the expression which in this case is always IP address. | | | **value** string / required | | The value of the IP Address / Subnet associated with the expression. | | **external\_epg** string / required | | The name of the External EPG to be managed. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **selector** string | | The name of the selector. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template to change. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_template\_external\_epg](mso_schema_template_external_epg_module#ansible-collections-cisco-mso-mso-schema-template-external-epg-module) The official documentation on the **cisco.mso.mso\_schema\_template\_external\_epg** module. Examples -------- ``` - name: Add a selector to an External EPG cisco.mso.mso_schema_template_external_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 external_epg: extEPG 1 selector: selector_1 expressions: - type: ip_address operator: equals value: 10.0.0.0 state: present delegate_to: localhost - name: Remove a Selector cisco.mso.mso_schema_template_external_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 external_epg: extEPG 1 selector: selector_1 state: absent delegate_to: localhost - name: Query a specific Selector cisco.mso.mso_schema_template_external_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 external_epg: extEPG 1 selector: selector_1 state: query delegate_to: localhost register: query_result - name: Query all Selectors cisco.mso.mso_schema_template_external_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 external_epg: extEPG 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Shreyas Srish (@shrsr) * Cindy Zhao (@cizhao)
programming_docs
ansible cisco.mso.mso_schema_template_contract_filter – Manage contract filters in schema templates cisco.mso.mso\_schema\_template\_contract\_filter – Manage contract filters in schema templates =============================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_contract_filter`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage contract filters in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **contract** string / required | | The name of the contract to manage. | | **contract\_display\_name** string | | The name as displayed on the MSO web interface. This defaults to the contract name when unset on creation. | | **contract\_filter\_type** string | **Choices:*** **both-way** ← * one-way | The type of filters defined in this contract. This defaults to `both-way` when unset on creation. | | **contract\_scope** string | **Choices:*** application-profile * global * tenant * vrf | The scope of the contract. This defaults to `vrf` when unset on creation. | | **filter** string | | The filter to associate with this contract. aliases: name | | **filter\_directives** list / elements=string | **Choices:*** log * none * policy\_compression | A list of filter directives. | | **filter\_schema** string | | The schema name in which the filter is located. | | **filter\_template** string | | The template name in which the filter is located. | | **filter\_type** string | **Choices:*** **both-way** ← * consumer-to-provider * provider-to-consumer | The type of filter to manage. aliases: type | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Due to restrictions of the MSO REST API this module creates contracts when needed, and removes them when the last filter has been removed. * Due to restrictions of the MSO REST API concurrent modifications to contract filters can be dangerous and corrupt data. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_template\_filter\_entry](mso_schema_template_filter_entry_module#ansible-collections-cisco-mso-mso-schema-template-filter-entry-module) The official documentation on the **cisco.mso.mso\_schema\_template\_filter\_entry** module. Examples -------- ``` - name: Add a new contract filter cisco.mso.mso_schema_template_contract_filter: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 contract: Contract 1 contract_scope: global filter: Filter 1 state: present delegate_to: localhost - name: Remove a contract filter cisco.mso.mso_schema_template_contract_filter: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 contract: Contract 1 filter: Filter 1 state: absent delegate_to: localhost - name: Query a specific contract filter cisco.mso.mso_schema_template_contract_filter: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 contract: Contract 1 filter: Filter 1 state: query delegate_to: localhost register: query_result - name: Query all contract filters cisco.mso.mso_schema_template_contract_filter: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 contract: Contract 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_template_deploy – Deploy schema templates to sites cisco.mso.mso\_schema\_template\_deploy – Deploy schema templates to sites ========================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_deploy`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Deploy schema templates to sites. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **site** string | | The name of the site **to undeploy**. | | **state** string | **Choices:*** **deploy** ← * status * undeploy | Use `deploy` to deploy schema template. Use `status` to get deployment status. Use `undeploy` to deploy schema template from a site. | | **template** string / required | | The name of the template. aliases: name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site](mso_schema_site_module#ansible-collections-cisco-mso-mso-schema-site-module) The official documentation on the **cisco.mso.mso\_schema\_site** module. [cisco.mso.mso\_schema\_template](mso_schema_template_module#ansible-collections-cisco-mso-mso-schema-template-module) The official documentation on the **cisco.mso.mso\_schema\_template** module. Examples -------- ``` - name: Deploy a schema template cisco.mso.mso_schema_template_deploy: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 state: deploy delegate_to: localhost - name: Undeploy a schema template cisco.mso.mso_schema_template_deploy: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 site: Site 1 state: undeploy delegate_to: localhost - name: Get deployment status cisco.mso.mso_schema: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 state: status delegate_to: localhost register: status_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_tenant – Manage tenants cisco.mso.mso\_tenant – Manage tenants ====================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_tenant`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage tenants on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **description** string | | The description for this tenant. | | **display\_name** string | | The name of the tenant to be displayed in the web UI. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **sites** list / elements=string | | A list of associated sites for this tenant. Using this property will replace any existing associated sites. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | The name of the tenant. aliases: name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **users** list / elements=string | | A list of associated users for this tenant. Using this property will replace any existing associated users. Admin user is always added to the associated user list irrespective of this parameter being used. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new tenant cisco.mso.mso_tenant: host: mso_host username: admin password: SomeSecretPassword tenant: north_europe display_name: North European Datacenter description: This tenant manages the NEDC environment. state: present delegate_to: localhost - name: Remove a tenant cisco.mso.mso_tenant: host: mso_host username: admin password: SomeSecretPassword tenant: north_europe state: absent delegate_to: localhost - name: Query a tenant cisco.mso.mso_tenant: host: mso_host username: admin password: SomeSecretPassword tenant: north_europe state: query delegate_to: localhost register: query_result - name: Query all tenants cisco.mso.mso_tenant: host: mso_host username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_template_clone – Clone templates cisco.mso.mso\_schema\_template\_clone – Clone templates ======================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_clone`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Clone templates on Cisco ACI Multi-Site. * Clones only template objects and not site objects. * This module can only be used on versions of MSO that are 3.3 or greater. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **destination\_schema** string | | The name of the destination\_schema. | | **destination\_template\_display\_name** string | | The display name of the destination template. | | **destination\_template\_name** string | | The name of the destination template. | | **destination\_tenant** string | | The name of the destination\_schema. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **source\_schema** string | | The name of the source\_schema. | | **source\_template\_name** string | | The name of the source template. | | **state** string | **Choices:*** **clone** ← | Use `clone` for adding. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema](mso_schema_module#ansible-collections-cisco-mso-mso-schema-module) The official documentation on the **cisco.mso.mso\_schema** module. [cisco.mso.mso\_schema\_clone](mso_schema_clone_module#ansible-collections-cisco-mso-mso-schema-clone-module) The official documentation on the **cisco.mso.mso\_schema\_clone** module. Examples -------- ``` - name: Clone template in the same schema cisco.mso.mso_schema_template_clone: host: mso_host username: admin password: SomeSecretPassword source_schema: Schema1 destination_schema: Schema1 destination_tenant: ansible_test source_template_name: Template1 destination_template_name: Template1_clone destination_template_display_name: Template1_clone state: clone delegate_to: localhost - name: Clone template to different schema cisco.mso.mso_schema_template_clone: host: mso_host username: admin password: SomeSecretPassword source_schema: Schema1 destination_schema: Schema2 destination_tenant: ansible_test source_template_name: Template2 destination_template_name: Cloned_template_1 destination_template_display_name: Cloned_template_1 state: clone delegate_to: localhost - name: Clone template in the same schema but different tenant attached cisco.mso.mso_schema_template_clone: host: mso_host username: admin password: SomeSecretPassword source_schema: Schema1 destination_schema: Schema1 destination_tenant: common source_template_name: Template1_clone destination_template_name: Template1_clone_2 state: clone delegate_to: localhost ``` ### Authors * Anvitha Jain (@anvitha-jain)
programming_docs
ansible cisco.mso.mso_dhcp_option_policy_option – Manage DHCP options in a DHCP Option policy. cisco.mso.mso\_dhcp\_option\_policy\_option – Manage DHCP options in a DHCP Option policy. ========================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_dhcp_option_policy_option`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage DHCP options in a DHCP Option policy on Cisco Multi-Site Orchestrator. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **data** string | | Data of the DHCP option in the DHCP Option Policy | | **dhcp\_option\_policy** string / required | | Name of the DHCP Option Policy aliases: name | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **id** integer | | Id of the option in the DHCP Option Policy | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **name** string | | Name of the option in the DHCP Option Policy aliases: option | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new option to a DHCP Option Policy cisco.mso.mso_dhcp_option_policy_option: host: mso_host username: admin password: SomeSecretPassword dhcp_option_policy: my_test_dhcp_policy name: ansible_test id: 1 data: Data stored in the option state: present delegate_to: localhost - name: Remove a option to a DHCP Option Policy cisco.mso.mso_dhcp_option_policy_option: host: mso_host username: admin password: SomeSecretPassword dhcp_option_policy: my_test_dhcp_policy name: ansible_test state: absent delegate_to: localhost - name: Query a option to a DHCP Option Policy cisco.mso.mso_dhcp_option_policy_option: host: mso_host username: admin password: SomeSecretPassword dhcp_option_policy: my_test_dhcp_policy name: ansible_test state: query delegate_to: localhost - name: Query all option of a DHCP Option Policy cisco.mso.mso_dhcp_option_policy_option: host: mso_host username: admin password: SomeSecretPassword dhcp_option_policy: my_test_dhcp_policy state: query delegate_to: localhost ``` ### Authors * Lionel Hercot (@lhercot) ansible cisco.mso.mso_schema_site_vrf_region_cidr – Manage site-local VRF region CIDRs in schema template cisco.mso.mso\_schema\_site\_vrf\_region\_cidr – Manage site-local VRF region CIDRs in schema template ====================================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_vrf_region_cidr`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local VRF region CIDRs in schema template on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cidr** string | | The name of the region CIDR to manage. aliases: ip | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **primary** boolean | **Choices:*** no * **yes** ← | Whether this is the primary CIDR. | | **region** string / required | | The name of the region. | | **schema** string / required | | The name of the schema. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **vrf** string / required | | The name of the VRF. | Notes ----- Note * The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index. This can cause silent corruption on concurrent access when changing/removing on object as the wrong object may be referenced. This module is affected by this deficiency. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site\_vrf\_region](mso_schema_site_vrf_region_module#ansible-collections-cisco-mso-mso-schema-site-vrf-region-module) The official documentation on the **cisco.mso.mso\_schema\_site\_vrf\_region** module. [cisco.mso.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) The official documentation on the **cisco.mso.mso\_schema\_site\_vrf\_region\_cidr\_subnet** module. [cisco.mso.mso\_schema\_template\_vrf](mso_schema_template_vrf_module#ansible-collections-cisco-mso-mso-schema-template-vrf-module) The official documentation on the **cisco.mso.mso\_schema\_template\_vrf** module. Examples -------- ``` - name: Add a new site VRF region CIDR cisco.mso.mso_schema_site_vrf_region_cidr: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 region: us-west-1 cidr: 14.14.14.1/24 state: present delegate_to: localhost - name: Remove a site VRF region CIDR cisco.mso.mso_schema_site_vrf_region_cidr: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 region: us-west-1 cidr: 14.14.14.1/24 state: absent delegate_to: localhost - name: Query a specific site VRF region CIDR cisco.mso.mso_schema_site_vrf_region_cidr: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 region: us-west-1 cidr: 14.14.14.1/24 state: query delegate_to: localhost register: query_result - name: Query all site VRF region CIDR cisco.mso.mso_schema_site_vrf_region_cidr: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 region: us-west-1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) * Lionel Hercot (@lhercot) ansible cisco.mso.mso_schema_template_anp – Manage Application Network Profiles (ANPs) in schema templates cisco.mso.mso\_schema\_template\_anp – Manage Application Network Profiles (ANPs) in schema templates ===================================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_anp`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage ANPs in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **anp** string | | The name of the ANP to manage. aliases: name | | **display\_name** string | | The name as displayed on the MSO web interface. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_template](mso_schema_template_module#ansible-collections-cisco-mso-mso-schema-template-module) The official documentation on the **cisco.mso.mso\_schema\_template** module. [cisco.mso.mso\_schema\_template\_anp\_epg](mso_schema_template_anp_epg_module#ansible-collections-cisco-mso-mso-schema-template-anp-epg-module) The official documentation on the **cisco.mso.mso\_schema\_template\_anp\_epg** module. Examples -------- ``` - name: Add a new ANP cisco.mso.mso_schema_template_anp: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 state: present delegate_to: localhost - name: Remove an ANP cisco.mso.mso_schema_template_anp: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 state: absent delegate_to: localhost - name: Query a specific ANPs cisco.mso.mso_schema_template_anp: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 state: query delegate_to: localhost register: query_result - name: Query all ANPs cisco.mso.mso_schema_template_anp: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_template_vrf – Manage VRFs in schema templates cisco.mso.mso\_schema\_template\_vrf – Manage VRFs in schema templates ====================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_vrf`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage VRFs in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **display\_name** string | | The name as displayed on the MSO web interface. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **layer3\_multicast** boolean | **Choices:*** no * yes | Whether to enable L3 multicast. | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **vrf** string | | The name of the VRF to manage. aliases: name | | **vzany** boolean | **Choices:*** no * yes | Whether to enable vzAny. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new VRF cisco.mso.mso_schema_template_vrf: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 vrf: VRF 1 state: present delegate_to: localhost - name: Remove an VRF cisco.mso.mso_schema_template_vrf: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 vrf: VRF1 state: absent delegate_to: localhost - name: Query a specific VRFs cisco.mso.mso_schema_template_vrf: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 vrf: VRF1 state: query delegate_to: localhost register: query_result - name: Query all VRFs cisco.mso.mso_schema_template_vrf: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers)
programming_docs
ansible cisco.mso.mso_schema_site_anp_epg_staticport – Manage site-local EPG static ports in schema template cisco.mso.mso\_schema\_site\_anp\_epg\_staticport – Manage site-local EPG static ports in schema template ========================================================================================================= Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_anp_epg_staticport`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local EPG static ports in schema template on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **anp** string / required | | The name of the ANP. | | **deployment\_immediacy** string | **Choices:*** immediate * **lazy** ← | The deployment immediacy of the static port. `immediate` means **Deploy immediate**. `lazy` means **deploy on demand**. | | **epg** string / required | | The name of the EPG. | | **fex** string | | The fex id of the static port. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **leaf** string | | The leaf of the static port. | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **mode** string | **Choices:*** native * regular * **untagged** ← | The mode of the static port. `native` means **Access (802.1p**). `regular` means **Trunk**. `untagged` means **Access (untagged**). | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **path** string | | The path of the static port. | | **pod** string | | The pod of the static port. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **primary\_micro\_segment\_vlan** integer | | Primary micro-seg VLAN of static port. | | **schema** string / required | | The name of the schema. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **type** string | **Choices:*** **port** ← * vpc * dpc | The path type of the static port vpc is used for a Virtual Port Channel dpc is used for a Direct Port Channel port is used for a single interface | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **vlan** integer | | The port encap VLAN id of the static port. | Notes ----- Note * The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index. This can cause silent corruption on concurrent access when changing/removing an object as the wrong object may be referenced. This module is affected by this deficiency. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site\_anp\_epg](mso_schema_site_anp_epg_module#ansible-collections-cisco-mso-mso-schema-site-anp-epg-module) The official documentation on the **cisco.mso.mso\_schema\_site\_anp\_epg** module. [cisco.mso.mso\_schema\_template\_anp\_epg](mso_schema_template_anp_epg_module#ansible-collections-cisco-mso-mso-schema-template-anp-epg-module) The official documentation on the **cisco.mso.mso\_schema\_template\_anp\_epg** module. Examples -------- ``` - name: Add a new static port to a site EPG cisco.mso.mso_schema_site_anp_epg_staticport: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 type: port pod: pod-1 leaf: 101 path: eth1/1 vlan: 126 deployment_immediacy: immediate state: present delegate_to: localhost - name: Add a new static fex port to a site EPG mso_schema_site_anp_epg_staticport: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 type: port pod: pod-1 leaf: 101 fex: 151 path: eth1/1 vlan: 126 deployment_immediacy: lazy state: present delegate_to: localhost - name: Add a new static VPC to a site EPG mso_schema_site_anp_epg_staticport: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 pod: pod-1 leaf: 101-102 path: ansible_polgrp vlan: 127 type: vpc mode: untagged deployment_immediacy: lazy state: present delegate_to: localhost - name: Remove a static port from a site EPG cisco.mso.mso_schema_site_anp_epg_staticport: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 type: port pod: pod-1 leaf: 101 path: eth1/1 state: absent delegate_to: localhost - name: Query a specific site EPG static port cisco.mso.mso_schema_site_anp_epg_staticport: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 type: port pod: pod-1 leaf: 101 path: eth1/1 state: query delegate_to: localhost register: query_result - name: Query all site EPG static ports cisco.mso.mso_schema_site_anp_epg_staticport: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_template_bd – Manage Bridge Domains (BDs) in schema templates cisco.mso.mso\_schema\_template\_bd – Manage Bridge Domains (BDs) in schema templates ===================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_bd`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage BDs in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **arp\_flooding** boolean | **Choices:*** no * yes | ARP Flooding | | **bd** string | | The name of the BD to manage. aliases: name | | **dhcp\_policies** list / elements=dictionary | | A list DHCP Policies to be assciated with the BD This option can only be used on versions of MSO that are 3.1.1h or greater. | | | **dhcp\_option\_policy** dictionary | | The DHCP Option Policy | | | | **name** string | | The name of the DHCP Option Policy | | | | **version** integer | | The version of the DHCP Option Policy | | | **name** string / required | | The name of the DHCP Relay Policy | | | **version** integer / required | | The version of DHCP Relay Policy | | **dhcp\_policy** dictionary | | The DHCP Policy | | | **dhcp\_option\_policy** dictionary | | The DHCP Option Policy | | | | **name** string | | The name of the DHCP Option Policy | | | | **version** integer | | The version of the DHCP Option Policy | | | **name** string / required | | The name of the DHCP Relay Policy | | | **version** integer / required | | The version of DHCP Relay Policy | | **display\_name** string | | The name as displayed on the MSO web interface. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **intersite\_bum\_traffic** boolean | **Choices:*** no * yes | Whether to allow intersite BUM traffic. | | **ipv6\_unknown\_multicast\_flooding** string | **Choices:*** flood * optimized\_flooding | IPv6 Unknown Multicast Flooding can either be Flood or Optimized Flooding | | **layer2\_stretch** boolean | **Choices:*** no * **yes** ← | Whether to enable L2 stretch. | | **layer2\_unknown\_unicast** string | **Choices:*** flood * proxy | Layer2 unknown unicast. | | **layer3\_multicast** boolean | **Choices:*** no * yes | Whether to enable L3 multicast. | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **multi\_destination\_flooding** string | **Choices:*** flood\_in\_bd * drop | Multi-Destination Flooding can either be Flood in BD or just Drop | | **optimize\_wan\_bandwidth** boolean | **Choices:*** no * yes | Whether to optimize WAN bandwidth. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **subnets** list / elements=dictionary | | The subnets associated to this BD. | | | **description** string | | The description of this subnet. | | | **no\_default\_gateway** boolean | **Choices:*** **no** ← * yes | Whether this subnet has a default gateway. | | | **primary** boolean | **Choices:*** **no** ← * yes | Treat as Primary Subnet. There can be only one primary subnet per address family under a BD. This option can only be used on versions of MSO that are 3.1.1h or greater. | | | **querier** boolean | **Choices:*** **no** ← * yes | Whether this subnet is an IGMP querier. | | | **scope** string | **Choices:*** **private** ← * public | The scope of the subnet. | | | **shared** boolean | **Choices:*** **no** ← * yes | Whether this subnet is shared between VRFs. | | | **subnet** string / required | | The IP range in CIDR notation. aliases: ip | | | **virtual** boolean | **Choices:*** **no** ← * yes | Treat as Virtual IP Address. | | **template** string / required | | The name of the template. Display Name of template for operations can only be used in some versions of mso. Use the name of template instead of Display Name to avoid discrepency. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **unicast\_routing** boolean | **Choices:*** **no** ← * yes | Unicast Routing This option can only be used on versions of MSO that are 3.1.1h or greater. | | **unknown\_multicast\_flooding** string | **Choices:*** flood * optimized\_flooding | Unknown Multicast Flooding can either be Flood or Optimized Flooding | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **virtual\_mac\_address** string | | Virtual MAC Address | | **vrf** dictionary | | The VRF associated to this BD. This is required only when creating a new BD. | | | **name** string / required | | The name of the VRF to associate with. | | | **schema** string | | The schema that defines the referenced VRF. If this parameter is unspecified, it defaults to the current schema. | | | **template** string | | The template that defines the referenced VRF. If this parameter is unspecified, it defaults to the current template. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new BD cisco.mso.mso_schema_template_bd: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 bd: BD 1 vrf: name: VRF1 state: present delegate_to: localhost - name: Add a new BD from another Schema mso_schema_template_bd: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 bd: BD 1 vrf: name: VRF1 schema: Schema Origin template: Template Origin state: present delegate_to: localhost - name: Add bd with options available on version 3.1 mso_schema_template_bd: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 bd: BD 1 intersite_bum_traffic: true optimize_wan_bandwidth: false layer2_stretch: true layer2_unknown_unicast: flood layer3_multicast: false unknown_multicast_flooding: flood multi_destination_flooding: drop ipv6_unknown_multicast_flooding: flood arp_flooding: false virtual_mac_address: 00:00:5E:00:01:3C subnets: - subnet: 10.0.0.128/24 - subnet: 10.0.1.254/24 description: 1234567890 - ip: 192.168.0.254/24 description: "My description for a subnet" scope: private shared: false no_default_gateway: true vrf: name: vrf1 schema: Test template: Template1 dhcp_policy: name: ansible_test version: 1 dhcp_option_policy: name: ansible_test_option version: 1 state: present - name: Add bd with options available on version 3.1.1h or greater mso_schema_template_bd: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 bd: BD 1 intersite_bum_traffic: true optimize_wan_bandwidth: false layer2_stretch: true layer2_unknown_unicast: flood layer3_multicast: false unknown_multicast_flooding: flood multi_destination_flooding: drop ipv6_unknown_multicast_flooding: flood arp_flooding: false virtual_mac_address: 00:00:5E:00:01:3C unicast_routing: true subnets: - subnet: 10.0.0.128/24 primary: true - subnet: 10.0.1.254/24 description: 1234567890 virtual: true - ip: 192.168.0.254/24 description: "My description for a subnet" scope: private shared: false no_default_gateway: true vrf: name: vrf1 schema: Schema1 template: Template1 dhcp_policies: - name: ansible_test version: 1 dhcp_option_policy: name: ansible_test_option version: 1 - name: ansible_test2 version: 1 dhcp_option_policy: name: ansible_test_option2 version: 1 - name: ansible_test3 version: 1 dhcp_option_policy: name: ansible_test_option version: 1 state: present delegate_to: localhost - name: Remove a BD cisco.mso.mso_schema_template_bd: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 bd: BD1 state: absent delegate_to: localhost - name: Query a specific BD cisco.mso.mso_schema_template_bd: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 bd: BD1 state: query delegate_to: localhost register: query_result - name: Query all BDs cisco.mso.mso_schema_template_bd: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) * Shreyas Srish (@shrsr)
programming_docs
ansible cisco.mso.mso_schema_site_anp_epg – Manage site-local Endpoint Groups (EPGs) in schema template cisco.mso.mso\_schema\_site\_anp\_epg – Manage site-local Endpoint Groups (EPGs) in schema template =================================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_anp_epg`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local EPGs in schema template on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **anp** string / required | | The name of the ANP. | | **epg** string | | The name of the EPG to manage. aliases: name | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site\_anp](mso_schema_site_anp_module#ansible-collections-cisco-mso-mso-schema-site-anp-module) The official documentation on the **cisco.mso.mso\_schema\_site\_anp** module. [cisco.mso.mso\_schema\_site\_anp\_epg\_subnet](mso_schema_site_anp_epg_subnet_module#ansible-collections-cisco-mso-mso-schema-site-anp-epg-subnet-module) The official documentation on the **cisco.mso.mso\_schema\_site\_anp\_epg\_subnet** module. [cisco.mso.mso\_schema\_template\_anp\_epg](mso_schema_template_anp_epg_module#ansible-collections-cisco-mso-mso-schema-template-anp-epg-module) The official documentation on the **cisco.mso.mso\_schema\_template\_anp\_epg** module. Examples -------- ``` - name: Add a new site EPG cisco.mso.mso_schema_site_anp_epg: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 state: present delegate_to: localhost - name: Remove a site EPG cisco.mso.mso_schema_site_anp_epg: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 state: absent delegate_to: localhost - name: Query a specific site EPGs cisco.mso.mso_schema_site_anp_epg: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 epg: EPG1 state: query delegate_to: localhost register: query_result - name: Query all site EPGs cisco.mso.mso_schema_site_anp_epg: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_template – Manage templates in schemas cisco.mso.mso\_schema\_template – Manage templates in schemas ============================================================= Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **display\_name** string | | The name as displayed on the MSO web interface. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string | | The name of the template. aliases: name | | **tenant** string / required | | The tenant used for this template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Due to restrictions of the MSO REST API this module creates schemas when needed, and removes them when the last template has been removed. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema](mso_schema_module#ansible-collections-cisco-mso-mso-schema-module) The official documentation on the **cisco.mso.mso\_schema** module. [cisco.mso.mso\_schema\_site](mso_schema_site_module#ansible-collections-cisco-mso-mso-schema-site-module) The official documentation on the **cisco.mso.mso\_schema\_site** module. Examples -------- ``` - name: Add a new template to a schema cisco.mso.mso_schema_template: host: mso_host username: admin password: SomeSecretPassword tenant: Tenant 1 schema: Schema 1 template: Template 1 state: present delegate_to: localhost - name: Remove a template from a schema cisco.mso.mso_schema_template: host: mso_host username: admin password: SomeSecretPassword tenant: Tenant 1 schema: Schema 1 template: Template 1 state: absent delegate_to: localhost - name: Query a template cisco.mso.mso_schema_template: host: mso_host username: admin password: SomeSecretPassword tenant: Tenant 1 schema: Schema 1 template: Template 1 state: query delegate_to: localhost register: query_result - name: Query all templates cisco.mso.mso_schema_template: host: mso_host username: admin password: SomeSecretPassword tenant: Tenant 1 schema: Schema 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_backup – Manages backups cisco.mso.mso\_backup – Manages backups ======================================= Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_backup`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage backups on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **backup** string | | The name given to the backup aliases: name | | **description** string | | Brief information about the backup. | | **destination** string | | Location where to download the backup to | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **location\_type** string | **Choices:*** **local** ← * remote | The type of location for the backup to be stored | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **remote\_location** string | | The remote location's name for the backup to be stored | | **remote\_path** string | | This path is relative to the remote location. A '/' is automatically added between the remote location folder and this path. This folder structure should already exist on the remote location. | | **state** string | **Choices:*** absent * **present** ← * query * upload * restore * download * move | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. Use `upload` for uploading backup. Use `restore` for restoring backup. Use `download` for downloading backup. Use `move` for moving backup from local to remote location. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Create a new local backup cisco.mso.mso_backup: host: mso_host username: admin password: SomeSecretPassword backup: Backup description: via Ansible location_type: local state: present delegate_to: localhost - name: Create a new remote backup cisco.mso.mso_backup: host: mso_host username: admin password: SomeSecretPassword backup: Backup description: via Ansible location_type: remote remote_location: ansible_test state: present delegate_to: localhost - name: Move backup to remote location cisco.mso.mso_backup: host: mso_host username: admin password: SomeSecretPassword backup: Backup0 remote_location: ansible_test remote_path: test state: move delegate_to: localhost - name: Download a backup cisco.mso.mso_backup: host: mso_host username: admin password: SomeSecretPassword backup: Backup destination: ./ state: download delegate_to: localhost - name: Upload a backup cisco.mso.mso_backup: host: mso_host username: admin password: SomeSecretPassword backup: ./Backup state: upload delegate_to: localhost - name: Restore a backup cisco.mso.mso_backup: host: mso_host username: admin password: SomeSecretPassword backup: Backup state: restore delegate_to: localhost - name: Remove a Backup cisco.mso.mso_backup: host: mso_host username: admin password: SomeSecretPassword backup: Backup state: absent delegate_to: localhost - name: Query a backup cisco.mso.mso_backup: host: mso_host username: admin password: SomeSecretPassword backup: Backup state: query delegate_to: localhost register: query_result - name: Query a backup with its complete name cisco.mso.mso_backup: host: mso_host username: admin password: SomeSecretPassword backup: Backup_20200721220043 state: query delegate_to: localhost register: query_result - name: Query all backups cisco.mso.mso_backup: host: mso_host username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` ### Authors * Shreyas Srish (@shrsr)
programming_docs
ansible cisco.mso.mso_tenant_site – Manage tenants with cloud sites. cisco.mso.mso\_tenant\_site – Manage tenants with cloud sites. ============================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_tenant_site`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage tenants with cloud sites on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **aws\_access\_key** string | | AWS account's access key id. This is required when aws\_trusted is set to false. | | **aws\_account\_org** boolean | **Choices:*** **no** ← * yes | AWS account for organization. | | **aws\_trusted** boolean | **Choices:*** no * yes | AWS account's access in trusted mode. Credentials are required, when set to false. | | **azure\_access\_type** string | **Choices:*** managed * unmanaged * **shared** ← | Managed mode for Azure. Unmanaged mode for Azure. Shared mode if the attribute is not specified. | | **azure\_active\_directory\_id** string | | Azure account's active directory id. This attribute is required when azure\_access\_type is in unmanaged mode. | | **azure\_active\_directory\_name** string | | Azure account's active directory name. Example being 'CiscoINSBUAd' as active directory name. This attribute is required when azure\_access\_type is in unmanaged mode. | | **azure\_application\_id** string | | Azure account's application id. This attribute is required when azure\_access\_type is either in managed mode or unmanaged mode. | | **azure\_credential\_name** string | | Azure account's credential name. This attribute is required when azure\_access\_type is in unmanaged mode. | | **azure\_subscription\_id** string | | Azure account's subscription id. This attribute is required when azure\_access\_type is either in managed mode or unmanaged mode. | | **cloud\_account** string | | Required for cloud site. Account id of AWS in the form '000000000000'. Account id of Azure in the form 'uni/tn-(tenant\_name)/act-[(subscription\_id)]-azure\_vendor-azure'. Example values inside account id of Azure '(tenant\_name)=tenant\_test and (subscription\_id)=10'. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **secret\_key** string | | secret key of AWS for untrusted account. Required when aws\_trusted is set to false. secret key of Azure account for unmanaged identity. Required in unmanaged mode of Azure account. | | **security\_domains** list / elements=string | **Default:**[] | List of security domains for cloud sites. | | **site** string | | The name of the site. This can either be cloud site or non-cloud site. aliases: name | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string / required | | The name of the tenant. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Associate a non-cloud site with a tenant cisco.mso.mso_tenant_site: host: mso_host username: admin password: SomeSecretPassword tenant: tenant_name site: site_name state: present delegate_to: localhost - name: Associate AWS site with a tenant, with aws_trusted set to true cisco.mso.mso_tenant_site: host: mso_host username: admin password: SomeSecretPassword tenant: tenant_name site: site_name cloud_account: '000000000000' aws_trusted: true state: present delegate_to: localhost - name: Associate AWS site with a tenant, with aws_trusted set to false cisco.mso.mso_tenant_site: host: mso_host username: admin password: SomeSecretPassword tenant: tenant_name site: AWS cloud_account: '000000000000' aws_trusted: false aws_access_key: '1' secret_key: '0' aws_account_org: false state: present delegate_to: localhost - name: Associate Azure site in managed mode mso.cisco.mso_tenant_site: host: mso_host username: admin password: SomeSecretPassword tenant: tenant_name site: site_name cloud_account: uni/tn-ansible_test/act-[9]-azure_vendor-azure azure_access_type: managed azure_subscription_id: '9' azure_application_id: '100' state: present delegate_to: localhost - name: Associate Azure site in unmanaged mode mso.cisco.mso_tenant_site: host: mso_host username: admin password: SomeSecretPassword tenant: tenant_name site: site_name cloud_account: uni/tn-ansible_test/act-[9]-azure_vendor-azure azure_access_type: unmanaged azure_subscription_id: '9' azure_application_id: '100' azure_credential_name: cApicApp secret_key: iins azure_active_directory_id: '32' azure_active_directory_name: CiscoINSBUAd state: present delegate_to: localhost - name: Dissociate a site cisco.mso.mso_tenant_site: host: mso_host username: admin password: SomeSecretPassword tenant: tenant_name site: site_name state: absent delegate_to: localhost - name: Query a site cisco.mso.mso_tenant_site: host: mso_host username: admin password: SomeSecretPassword tenant: tenant_name site: site_name state: query delegate_to: localhost - name: Query all sites of a tenant cisco.mso.mso_tenant_site: host: mso_host username: admin password: SomeSecretPassword tenant: tenant_name state: query delegate_to: localhost register: query_result ``` ### Authors * Shreyas Srish (@shrsr) ansible cisco.mso.mso_user – Manage users cisco.mso.mso\_user – Manage users ================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_user`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage users on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **account\_status** string | **Choices:*** active * inactive | The status of the user account. | | **domain** string | | The domain this user belongs to. When creating new users, this defaults to `Local`. | | **email** string | | The email address of the user. This parameter is required when creating new users. | | **first\_name** string | | The first name of the user. This parameter is required when creating new users. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **last\_name** string | | The last name of the user. This parameter is required when creating new users. | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **phone** string | | The phone number of the user. This parameter is required when creating new users. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **roles** list / elements=string | | The roles for this user and their access types (read or write). Access type defaults to `write`. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **user** string | | The name of the user. aliases: name | | **user\_password** string | | The password of the user. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * A default installation of ACI Multi-Site ships with admin password β€˜we1come!’ which requires a password change on first login. See the examples of how to change the β€˜admin’ password using Ansible. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Update initial admin password cisco.mso.mso_user: host: mso_host username: admin password: initialPassword validate_certs: false user: admin user_password: newPassword state: present delegate_to: localhost - name: Add a new user cisco.mso.mso_user: host: mso_host username: admin password: SomeSecretPassword validate_certs: false user: dag user_password: userPassword first_name: Dag last_name: Wieers email: [email protected] phone: +32 478 436 299 roles: - name: siteManager access_type: write - name: schemaManager access_type: read state: present delegate_to: localhost - name: Add a new user cisco.mso.mso_user: host: mso_host username: admin password: SomeSecretPassword validate_certs: false user: dag first_name: Dag last_name: Wieers email: [email protected] phone: +32 478 436 299 roles: - powerUser delegate_to: localhost - name: Remove a user cisco.mso.mso_user: host: mso_host username: admin password: SomeSecretPassword validate_certs: false user: dag state: absent delegate_to: localhost - name: Query a user cisco.mso.mso_user: host: mso_host username: admin password: SomeSecretPassword validate_certs: false user: dag state: query delegate_to: localhost register: query_result - name: Query all users cisco.mso.mso_user: host: mso_host username: admin password: SomeSecretPassword validate_certs: false state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_template_anp_epg_selector – Manage EPG selector in schema templates cisco.mso.mso\_schema\_template\_anp\_epg\_selector – Manage EPG selector in schema templates ============================================================================================= Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_anp_epg_selector`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage EPG selector in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **anp** string / required | | The name of the ANP. | | **epg** string / required | | The name of the EPG to manage. | | **expressions** list / elements=dictionary | | Expressions associated to this selector. | | | **operator** string / required | **Choices:*** not\_in * in * equals * not\_equals * has\_key * does\_not\_have\_key | The operator associated to the expression. | | | **type** string / required | | The name of the expression. aliases: tag | | | **value** string | | The value associated to the expression. If the operator is in or not\_in, the value should be a comma separated str. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **selector** string | | The name of the selector. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template to change. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_template\_anp\_epg](mso_schema_template_anp_epg_module#ansible-collections-cisco-mso-mso-schema-template-anp-epg-module) The official documentation on the **cisco.mso.mso\_schema\_template\_anp\_epg** module. Examples -------- ``` - name: Add a selector to an EPG cisco.mso.mso_schema_template_anp_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 selector: selector_1 expressions: - type: expression_1 operator: in value: test state: present delegate_to: localhost - name: Remove a Selector cisco.mso.mso_schema_template_anp_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 selector: selector_1 state: absent delegate_to: localhost - name: Query a specific Selector cisco.mso.mso_schema_template_anp_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 selector: selector_1 state: query delegate_to: localhost register: query_result - name: Query all Selectors cisco.mso.mso_schema_template_anp_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Cindy Zhao (@cizhao)
programming_docs
ansible cisco.mso.mso_schema_site_anp – Manage site-local Application Network Profiles (ANPs) in schema template cisco.mso.mso\_schema\_site\_anp – Manage site-local Application Network Profiles (ANPs) in schema template =========================================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_anp`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local ANPs in schema template on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **anp** string | | The name of the ANP to manage. aliases: name | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site](mso_schema_site_module#ansible-collections-cisco-mso-mso-schema-site-module) The official documentation on the **cisco.mso.mso\_schema\_site** module. [cisco.mso.mso\_schema\_site\_anp\_epg](mso_schema_site_anp_epg_module#ansible-collections-cisco-mso-mso-schema-site-anp-epg-module) The official documentation on the **cisco.mso.mso\_schema\_site\_anp\_epg** module. [cisco.mso.mso\_schema\_template\_anp](mso_schema_template_anp_module#ansible-collections-cisco-mso-mso-schema-template-anp-module) The official documentation on the **cisco.mso.mso\_schema\_template\_anp** module. Examples -------- ``` - name: Add a new site ANP cisco.mso.mso_schema_site_anp: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 state: present delegate_to: localhost - name: Remove a site ANP cisco.mso.mso_schema_site_anp: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 state: absent delegate_to: localhost - name: Query a specific site ANP cisco.mso.mso_schema_site_anp: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 anp: ANP1 state: query delegate_to: localhost register: query_result - name: Query all site ANPs cisco.mso.mso_schema_site_anp: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_site_vrf – Manage site-local VRFs in schema template cisco.mso.mso\_schema\_site\_vrf – Manage site-local VRFs in schema template ============================================================================ Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_vrf`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local VRFs in schema template on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **vrf** string | | The name of the VRF to manage. aliases: name | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site](mso_schema_site_module#ansible-collections-cisco-mso-mso-schema-site-module) The official documentation on the **cisco.mso.mso\_schema\_site** module. [cisco.mso.mso\_schema\_template\_vrf](mso_schema_template_vrf_module#ansible-collections-cisco-mso-mso-schema-template-vrf-module) The official documentation on the **cisco.mso.mso\_schema\_template\_vrf** module. Examples -------- ``` - name: Add a new site VRF cisco.mso.mso_schema_site_vrf: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 state: present delegate_to: localhost - name: Remove a site VRF cisco.mso.mso_schema_site_vrf: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 state: absent delegate_to: localhost - name: Query a specific site VRF cisco.mso.mso_schema_site_vrf: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 state: query delegate_to: localhost register: query_result - name: Query all site VRFs cisco.mso.mso_schema_site_vrf: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_template_vrf_contract – Manage vrf contracts in schema templates cisco.mso.mso\_schema\_template\_vrf\_contract – Manage vrf contracts in schema templates ========================================================================================= Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_vrf_contract`. New in version 0.0.8: of cisco.mso * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage vrf contracts in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **contract** dictionary | | A contract associated to this VRF. | | | **name** string / required | | The name of the Contract to associate with. | | | **schema** string | | The schema that defines the referenced contract. If this parameter is unspecified, it defaults to the current schema. | | | **template** string | | The template that defines the referenced contract. | | | **type** string / required | **Choices:*** consumer * provider | The type of contract. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template to change. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **vrf** string / required | | The name of the VRF. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_template\_vrf](mso_schema_template_vrf_module#ansible-collections-cisco-mso-mso-schema-template-vrf-module) The official documentation on the **cisco.mso.mso\_schema\_template\_vrf** module. Examples -------- ``` - name: Add a contract to a VRF cisco.mso.mso_schema_template_vrf_contract: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 vrf: VRF 1 contract: name: Contract 1 type: consumer state: present delegate_to: localhost - name: Remove a Contract cisco.mso.mso_schema_template_vrf_contract: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 vrf: VRF 1 contract: name: Contract 1 type: consumer state: absent delegate_to: localhost - name: Query a specific Contract cisco.mso.mso_schema_template_vrf_contract: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 vrf: VRF 1 contract: name: Contract 1 type: consumer state: query delegate_to: localhost register: query_result - name: Query all Contracts cisco.mso.mso_schema_template_vrf_contract: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 vrf: VRF 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Cindy Zhao (@cizhao) ansible cisco.mso.mso_schema_site_l3out – Manage site-local layer3 Out (L3Outs) in schema template cisco.mso.mso\_schema\_site\_l3out – Manage site-local layer3 Out (L3Outs) in schema template ============================================================================================= Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_l3out`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local L3Outs in schema template on Cisco ACI Multi-Site. * This module can only be used on versions of MSO that are 3.0 or greater. * NOTE - Usage of this module for version lesser than 3.0 might break the MSO. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **l3out** string | | The name of the l3out to manage. aliases: name | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **vrf** dictionary | | The VRF associated to this L3out. | | | **name** string / required | | The name of the VRF to associate with. | | | **schema** string | | The schema that defines the referenced VRF. If this parameter is unspecified, it defaults to the current schema. | | | **template** string | | The template that defines the referenced VRF. If this parameter is unspecified, it defaults to the current schema. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site](mso_schema_site_module#ansible-collections-cisco-mso-mso-schema-site-module) The official documentation on the **cisco.mso.mso\_schema\_site** module. [cisco.mso.mso\_schema\_template\_l3out](mso_schema_template_l3out_module#ansible-collections-cisco-mso-mso-schema-template-l3out-module) The official documentation on the **cisco.mso.mso\_schema\_template\_l3out** module. Examples -------- ``` - name: Add a new site L3Out cisco.mso.mso_schema_site_l3out: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 l3out: L3out1 vrf: name: vrfName template: TemplateName schema: schemaName state: present delegate_to: localhost - name: Remove a site L3Out cisco.mso.mso_schema_site_l3out: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 l3out: L3out1 state: absent delegate_to: localhost - name: Query a specific site L3Out cisco.mso.mso_schema_site_l3out: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 l3out: L3out1 state: query delegate_to: localhost register: query_result - name: Query all site l3outs cisco.mso.mso_schema_site_l3out: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 state: query delegate_to: localhost register: query_result ``` ### Authors * Anvitha Jain (@anvitha-jain)
programming_docs
ansible cisco.mso.mso_schema_template_bd_dhcp_policy – Manage BD DHCP Policy in schema templates cisco.mso.mso\_schema\_template\_bd\_dhcp\_policy – Manage BD DHCP Policy in schema templates ============================================================================================= Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_bd_dhcp_policy`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage BD DHCP policies in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **bd** string / required | | The name of the BD to manage. | | **dhcp\_option\_policy** dictionary | | The DHCP Option Policy. | | | **name** string / required | | The name of the DHCP Option Policy. | | | **version** integer / required | | The version of the DHCP Option Policy. | | **dhcp\_policy** string | | The DHCP Policy aliases: name | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template to change. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **version** integer | | The version of DHCP Relay Policy. | Notes ----- Note * This module can only be used on versions of MSO that are 3.1.1h or greater. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new DHCP policy to a BD cisco.mso.mso_schema_template_bd_dhcp_policy: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 bd: BD 1 name: ansible_test version: 1 dhcp_option_policy: name: ansible_test_option version: 1 state: present delegate_to: localhost - name: Remove a DHCP policy from a BD cisco.mso.mso_schema_template_bd_dhcp_policy: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 bd: BD 1 name: ansible_test version: 1 state: absent delegate_to: localhost - name: Query a specific BD DHCP Policy cisco.mso.mso_schema_template_bd_dhcp_policy: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 bd: BD 1 name: ansible_test state: query delegate_to: localhost register: query_result - name: Query all BD DHCP Policies cisco.mso.mso_schema_template_bd_dhcp_policy: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 bd: BD 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Shreyas Srish (@shrsr) ansible cisco.mso.mso_schema_site_bd_subnet – Manage site-local BD subnets in schema template cisco.mso.mso\_schema\_site\_bd\_subnet – Manage site-local BD subnets in schema template ========================================================================================= Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_bd_subnet`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local BD subnets in schema template on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **bd** string / required | | The name of the BD. aliases: name | | **description** string | | The description of this subnet. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **is\_virtual\_ip** boolean | **Choices:*** **no** ← * yes | Treat as Virtual IP Address | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **no\_default\_gateway** boolean | **Choices:*** **no** ← * yes | Whether this subnet has a default gateway. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **querier** boolean | **Choices:*** **no** ← * yes | Whether this subnet is an IGMP querier. | | **schema** string / required | | The name of the schema. | | **scope** string | **Choices:*** **private** ← * public | The scope of the subnet. | | **shared** boolean | **Choices:*** **no** ← * yes | Whether this subnet is shared between VRFs. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **subnet** string | | The IP range in CIDR notation. aliases: ip | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index. This can cause silent corruption on concurrent access when changing/removing on object as the wrong object may be referenced. This module is affected by this deficiency. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site\_bd](mso_schema_site_bd_module#ansible-collections-cisco-mso-mso-schema-site-bd-module) The official documentation on the **cisco.mso.mso\_schema\_site\_bd** module. [cisco.mso.mso\_schema\_template\_bd](mso_schema_template_bd_module#ansible-collections-cisco-mso-mso-schema-template-bd-module) The official documentation on the **cisco.mso.mso\_schema\_template\_bd** module. Examples -------- ``` - name: Add a new site BD subnet cisco.mso.mso_schema_site_bd_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 bd: BD1 subnet: 11.11.11.0/24 state: present delegate_to: localhost - name: Remove a site BD subnet cisco.mso.mso_schema_site_bd_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 bd: BD1 subnet: 11.11.11.0/24 state: absent delegate_to: localhost - name: Query a specific site BD subnet cisco.mso.mso_schema_site_bd_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 bd: BD1 subnet: 11.11.11.0/24 state: query delegate_to: localhost register: query_result - name: Query all site BD subnets cisco.mso.mso_schema_site_bd_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 bd: BD1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_rest – Direct access to the Cisco MSO REST API cisco.mso.mso\_rest – Direct access to the Cisco MSO REST API ============================================================= Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_rest`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Enables the management of the Cisco MSO fabric through direct access to the Cisco MSO REST API. * This module is not idempotent and does not report changes. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **content** raw | | Sets the payload of the API request directly. This may be convenient to template simple requests. For anything complex use the `template` lookup plugin (see examples). aliases: payload | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **method** string | **Choices:*** delete * **get** ← * post * put * patch | The HTTP method of the request. Using `delete` is typically used for deleting objects. Using `get` is typically used for querying objects. Using `post` is typically used for modifying objects. Using `put` is typically used for modifying existing objects. Using `patch` is typically also used for modifying existing objects. aliases: action | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **path** string / required | | URI being used to execute API calls. aliases: uri | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Most payloads are known not to be idempotent, so be careful when constructing payloads. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_tenant](mso_tenant_module#ansible-collections-cisco-mso-mso-tenant-module) The official documentation on the **cisco.mso.mso\_tenant** module. Examples -------- ``` - name: Add schema (JSON) cisco.mso.mso_rest: host: mso username: admin password: SomeSecretPassword path: /mso/api/v1/schemas method: post content: { "displayName": "{{ mso_schema | default('ansible_test') }}", "templates": [{ "name": "Template_1", "tenantId": "{{ add_tenant.jsondata.id }}", "displayName": "Template_1", "templateSubType": [], "templateType": "stretched-template", "anps": [], "contracts": [], "vrfs": [], "bds": [], "filters": [], "externalEpgs": [], "serviceGraphs": [], "intersiteL3outs": [] }], "sites": [], "_updateVersion": 0 } delegate_to: localhost - name: Query schema cisco.mso.mso_rest: host: mso username: admin password: SomeSecretPassword path: /mso/api/v1/schemas method: get delegate_to: localhost - name: Patch schema (YAML) cisco.mso.mso_rest: host: mso username: admin password: SomeSecretPassword path: "/mso/api/v1/schemas/{{ add_schema.jsondata.id }}" method: patch content: - op: add path: /templates/Template_1/anps/- value: name: AP2 displayName: AP2 epgs: [] _updateVersion: 0 delegate_to: localhost - name: Add a tenant from a templated payload file from templates cisco.mso.mso_rest: host: mso username: admin password: SomeSecretPassword method: post path: /api/v1/tenants content: "{{ lookup('template', 'mso/tenant.json.j2') }}" delegate_to: localhost ``` ### Authors * Anvitha Jain (@anvitha-jain)
programming_docs
ansible cisco.mso.mso_label – Manage labels cisco.mso.mso\_label – Manage labels ==================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_label`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage labels on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **label** string | | The name of the label. aliases: name | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **type** string | **Choices:*** **site** ← | The type of the label. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new label cisco.mso.mso_label: host: mso_host username: admin password: SomeSecretPassword label: Belgium type: site state: present delegate_to: localhost - name: Remove a label cisco.mso.mso_label: host: mso_host username: admin password: SomeSecretPassword label: Belgium state: absent delegate_to: localhost - name: Query a label cisco.mso.mso_label: host: mso_host username: admin password: SomeSecretPassword label: Belgium state: query delegate_to: localhost register: query_result - name: Query all labels cisco.mso.mso_label: host: mso_host username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_site_external_epg_selector – Manage External EPG selector in schema of cloud sites cisco.mso.mso\_schema\_site\_external\_epg\_selector – Manage External EPG selector in schema of cloud sites ============================================================================================================ Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_external_epg_selector`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage External EPG selector in schema of cloud sites on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **expressions** list / elements=dictionary | | Expressions associated to this selector. | | | **operator** string / required | **Choices:*** equals | The operator associated with the expression which in this case is always equals. | | | **type** string / required | **Choices:*** ip\_address | The name of the expression which in this case is always IP address. | | | **value** string / required | | The value of the IP Address / Subnet associated with the expression. | | **external\_epg** string / required | | The name of the External EPG to be managed. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **selector** string | | The name of the selector. | | **site** string / required | | The name of the cloud site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template to change. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_template\_external\_epg](mso_schema_template_external_epg_module#ansible-collections-cisco-mso-mso-schema-template-external-epg-module) The official documentation on the **cisco.mso.mso\_schema\_template\_external\_epg** module. Examples -------- ``` - name: Add a selector to an External EPG cisco.mso.mso_schema_site_external_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: ansible_test template: Template1 site: azure_ansible_test external_epg: ext1 selector: test expressions: - type: ip_address operator: equals value: 10.0.0.0 state: present delegate_to: localhost - name: Remove a Selector cisco.mso.mso_schema_site_external_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: ansible_test template: Template1 site: azure_ansible_test external_epg: ext1 selector: test state: absent delegate_to: localhost - name: Query a specific Selector cisco.mso.mso_schema_site_external_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: ansible_test template: Template1 site: azure_ansible_test external_epg: ext1 selector: selector_1 state: query delegate_to: localhost register: query_result - name: Query all Selectors cisco.mso.mso_schema_site_external_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: ansible_test template: Template1 site: azure_ansible_test external_epg: ext1 state: query delegate_to: localhost register: query_result ``` ### Authors * Shreyas Srish (@shrsr) ansible cisco.mso.mso_schema_template_external_epg_contract – Manage Extrnal EPG contracts in schema templates cisco.mso.mso\_schema\_template\_external\_epg\_contract – Manage Extrnal EPG contracts in schema templates =========================================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_external_epg_contract`. New in version 0.0.8: of cisco.mso * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage External EPG contracts in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **contract** dictionary | | A contract associated to this EPG. | | | **name** string / required | | The name of the Contract to associate with. | | | **schema** string | | The schema that defines the referenced BD. If this parameter is unspecified, it defaults to the current schema. | | | **template** string | | The template that defines the referenced BD. | | | **type** string / required | **Choices:*** consumer * provider | The type of contract. | | **external\_epg** string / required | | The name of the EPG to manage. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template to change. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_template\_external\_epg](mso_schema_template_external_epg_module#ansible-collections-cisco-mso-mso-schema-template-external-epg-module) The official documentation on the **cisco.mso.mso\_schema\_template\_external\_epg** module. [cisco.mso.mso\_schema\_template\_contract\_filter](mso_schema_template_contract_filter_module#ansible-collections-cisco-mso-mso-schema-template-contract-filter-module) The official documentation on the **cisco.mso.mso\_schema\_template\_contract\_filter** module. Examples -------- ``` - name: Add a contract to an EPG cisco.mso.mso_schema_template_external_epg_contract: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 epg: EPG 1 contract: name: Contract 1 type: consumer state: present delegate_to: localhost - name: Remove a Contract cisco.mso.mso_schema_template_external_epg_contract: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 epg: EPG 1 contract: name: Contract 1 state: absent delegate_to: localhost - name: Query a specific Contract cisco.mso.mso_schema_template_external_epg_contract: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 epg: EPG 1 contract: name: Contract 1 state: query delegate_to: localhost register: query_result - name: Query all Contracts cisco.mso.mso_schema_template_external_epg_contract: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Devarshi Shah (@devarshishah3) ansible cisco.mso.mso_schema_template_external_epg_subnet – Manage External EPG subnets in schema templates cisco.mso.mso\_schema\_template\_external\_epg\_subnet – Manage External EPG subnets in schema templates ======================================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_external_epg_subnet`. New in version 0.0.8: of cisco.mso * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage External EPG subnets in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **aggregate** list / elements=string | | The aggregate option for the subnet. | | **external\_epg** string / required | | The name of the External EPG to manage. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **scope** list / elements=string | | The scope of the subnet. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **subnet** string / required | | The IP range in CIDR notation. | | **template** string / required | | The name of the template to change. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Due to restrictions of the MSO REST API concurrent modifications to EPG subnets can be dangerous and corrupt data. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new subnet to an External EPG cisco.mso.mso_schema_template_external_epg_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 external_epg: EPG 1 subnet: 10.0.0.0/24 state: present delegate_to: localhost - name: Remove a subnet from an External EPG cisco.mso.mso_schema_template_external_epg_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 external_epg: EPG 1 subnet: 10.0.0.0/24 state: absent delegate_to: localhost - name: Query a specific External EPG subnet cisco.mso.mso_schema_template_external_epg_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 external_epg: EPG 1 subnet: 10.0.0.0/24 state: query delegate_to: localhost register: query_result - name: Query all External EPGs subnets cisco.mso.mso_schema_template_external_epg_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Devarshi Shah (@devarshishah3)
programming_docs
ansible cisco.mso.mso_dhcp_option_policy – Manage DHCP Option policies. cisco.mso.mso\_dhcp\_option\_policy – Manage DHCP Option policies. ================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_dhcp_option_policy`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage DHCP Option policies on Cisco Multi-Site Orchestrator. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **description** string | | Description of the DHCP Option Policy | | **dhcp\_option\_policy** string | | Name of the DHCP Option Policy aliases: name | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | Tenant where the DHCP Option Policy is located. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new DHCP Option Policy cisco.mso.mso_dhcp_option_policy: host: mso_host username: admin password: SomeSecretPassword dhcp_option_policy: my_test_dhcp_policy description: "My Test DHCP Policy" tenant: ansible_test state: present delegate_to: localhost - name: Remove DHCP Option Policy cisco.mso.mso_dhcp_option_policy: host: mso_host username: admin password: SomeSecretPassword dhcp_option_policy: my_test_dhcp_policy state: absent delegate_to: localhost - name: Query a DHCP Option Policy cisco.mso.mso_dhcp_option_policy: host: mso_host username: admin password: SomeSecretPassword dhcp_option_policy: my_test_dhcp_policy state: query delegate_to: localhost - name: Query all DHCP Option Policies cisco.mso.mso_dhcp_option_policy: host: mso_host username: admin password: SomeSecretPassword state: query delegate_to: localhost ``` ### Authors * Lionel Hercot (@lhercot) ansible cisco.mso.mso_schema_template_bd_subnet – Manage BD subnets in schema templates cisco.mso.mso\_schema\_template\_bd\_subnet – Manage BD subnets in schema templates =================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_bd_subnet`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage BD subnets in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **bd** string / required | | The name of the BD to manage. | | **description** string | | The description of this subnet. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **is\_virtual\_ip** boolean | **Choices:*** **no** ← * yes | Treat as Virtual IP Address | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **no\_default\_gateway** boolean | **Choices:*** **no** ← * yes | Whether this subnet has a default gateway. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **querier** boolean | **Choices:*** **no** ← * yes | Whether this subnet is an IGMP querier. | | **schema** string / required | | The name of the schema. | | **scope** string | **Choices:*** **private** ← * public | The scope of the subnet. | | **shared** boolean | **Choices:*** **no** ← * yes | Whether this subnet is shared between VRFs. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **subnet** string | | The IP range in CIDR notation. aliases: ip | | **template** string / required | | The name of the template to change. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Due to restrictions of the MSO REST API concurrent modifications to BD subnets can be dangerous and corrupt data. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new subnet to a BD cisco.mso.mso_schema_template_bd_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 bd: BD 1 subnet: 10.0.0.0/24 state: present delegate_to: localhost - name: Remove a subset from a BD cisco.mso.mso_schema_template_bd_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 bd: BD 1 subnet: 10.0.0.0/24 state: absent delegate_to: localhost - name: Query a specific BD subnet cisco.mso.mso_schema_template_bd_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 bd: BD 1 subnet: 10.0.0.0/24 state: query delegate_to: localhost register: query_result - name: Query all BD subnets cisco.mso.mso_schema_template_bd_subnet: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 bd: BD 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_site_vrf_region_hub_network – Manage site-local VRF region hub network in schema template cisco.mso.mso\_schema\_site\_vrf\_region\_hub\_network – Manage site-local VRF region hub network in schema template ==================================================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_vrf_region_hub_network`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local VRF region hub network in schema template on Cisco ACI Multi-Site. * The β€˜Hub Network’ feature was introduced in Multi-Site Orchestrator (MSO) version 3.0(1) for AWS and version 3.0(2) for Azure. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **hub\_network** dictionary | | The hub network to be managed. | | | **name** string / required | | The name of the hub network. The hub-default is the default created hub network. | | | **tenant** string / required | | The tenant name of the hub network. | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **region** string / required | | The name of the region. | | **schema** string / required | | The name of the schema. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **vrf** string / required | | The name of the VRF. | Notes ----- Note * The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index. This can cause silent corruption on concurrent access when changing/removing on object as the wrong object may be referenced. This module is affected by this deficiency. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site\_vrf\_region](mso_schema_site_vrf_region_module#ansible-collections-cisco-mso-mso-schema-site-vrf-region-module) The official documentation on the **cisco.mso.mso\_schema\_site\_vrf\_region** module. [cisco.mso.mso\_schema\_template\_vrf](mso_schema_template_vrf_module#ansible-collections-cisco-mso-mso-schema-template-vrf-module) The official documentation on the **cisco.mso.mso\_schema\_template\_vrf** module. Examples -------- ``` - name: Add a new site VRF region hub network cisco.mso.mso_schema_site_vrf_region_hub_network: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 region: us-west-1 hub_network: name: hub-default tenant: infra state: present delegate_to: localhost - name: Remove a site VRF region hub network cisco.mso.mso_schema_site_vrf_region_hub_network: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 state: absent delegate_to: localhost - name: Query site VRF region hub network cisco.mso.mso_schema_site_vrf_region_hub_network: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 vrf: VRF1 region: us-west-1 state: query delegate_to: localhost register: query_result ``` ### Authors * Cindy Zhao (@cizhao) ansible cisco.mso.mso_schema_template_external_epg – Manage external EPGs in schema templates cisco.mso.mso\_schema\_template\_external\_epg – Manage external EPGs in schema templates ========================================================================================= Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_external_epg`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage external EPGs in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **anp** dictionary | | The anp associated with the external epg. | | | **name** string / required | | The name of the anp to associate with. | | | **schema** string | | The schema that defines the referenced anp. If this parameter is unspecified, it defaults to the current schema. | | | **template** string | | The template that defines the referenced anp. If this parameter is unspecified, it defaults to the current template. | | **display\_name** string | | The name as displayed on the MSO web interface. | | **external\_epg** string | | The name of the external EPG to manage. aliases: name, externalepg | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **l3out** dictionary | | The L3Out associated with the external epg. | | | **name** string / required | | The name of the L3Out to associate with. | | | **schema** string | | The schema that defines the referenced L3Out. If this parameter is unspecified, it defaults to the current schema. | | | **template** string | | The template that defines the referenced L3Out. If this parameter is unspecified, it defaults to the current template. | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **preferred\_group** boolean | **Choices:*** no * yes | Preferred Group is enabled for this External EPG or not. | | **schema** string / required | | The name of the schema. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **type** string | **Choices:*** **on-premise** ← * cloud | The type of external epg. anp needs to be associated with external epg when the type is cloud. l3out can be associated with external epg when the type is on-premise. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **vrf** dictionary | | The VRF associated with the external epg. | | | **name** string / required | | The name of the VRF to associate with. | | | **schema** string | | The schema that defines the referenced VRF. If this parameter is unspecified, it defaults to the current schema. | | | **template** string | | The template that defines the referenced VRF. If this parameter is unspecified, it defaults to the current template. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new external EPG cisco.mso.mso_schema_template_external_epg: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 external_epg: External EPG 1 vrf: name: VRF schema: Schema 1 template: Template 1 state: present delegate_to: localhost - name: Add a new external EPG with external epg in cloud cisco.mso.mso_schema_template_external_epg: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 external_epg: External EPG 1 type: cloud vrf: name: VRF schema: Schema 1 template: Template 1 anp: name: ANP1 schema: Schema 1 template: Template 1 state: present delegate_to: localhost - name: Remove an external EPG cisco.mso.mso_schema_template_external_epg: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 external_epg: external EPG1 state: absent delegate_to: localhost - name: Query a specific external EPGs cisco.mso.mso_schema_template_external_epg: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 external_epg: external EPG1 state: query delegate_to: localhost register: query_result - name: Query all external EPGs cisco.mso.mso_schema_template_external_epg: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers)
programming_docs
ansible cisco.mso.mso_schema_template_deploy_status – Check query of objects before deployment to site cisco.mso.mso\_schema\_template\_deploy\_status – Check query of objects before deployment to site ================================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_deploy_status`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Check query of objects in a template of a schema Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string | | The name of the schema. aliases: name | | **site** string | | The name of the site. | | **state** string | **Choices:*** **query** ← | Use `query` for listing query of objects. | | **template** string | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Query status of objects in a template cisco.mso.mso_schema_template_deploy_status: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 state: query delegate_to: localhost register: query_result - name: Query status of objects using site cisco.mso.mso_schema_template_deploy_status: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 site: ansible_test state: query delegate_to: localhost register: query_result - name: Query status of objects in a template associated with a site cisco.mso.mso_schema_template_deploy_status: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 site: ansible_test state: query delegate_to: localhost register: query_result - name: Query status of objects in all templates cisco.mso.mso_schema_template_deploy_status: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Shreyas Srish (@shrsr) ansible cisco.mso.mso_schema_template_l3out – Manage l3outs in schema templates cisco.mso.mso\_schema\_template\_l3out – Manage l3outs in schema templates ========================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_l3out`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage l3outs in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **display\_name** string | | The name as displayed on the MSO web interface. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **l3out** string | | The name of the l3out to manage. aliases: name | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **vrf** dictionary | | The VRF associated to this L3out. | | | **name** string / required | | The name of the VRF to associate with. | | | **schema** string | | The schema that defines the referenced VRF. If this parameter is unspecified, it defaults to the current schema. | | | **template** string | | The template that defines the referenced VRF. If this parameter is unspecified, it defaults to the current schema. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new L3out cisco.mso.mso_schema_template_l3out: host: mso_host username: admin password: SomeSecretPassword validate_certs: false schema: Schema 1 template: Template 1 l3out: L3out 1 vrf: name: vrfName schema: vrfSchema template: vrfTemplate state: present delegate_to: localhost - name: Remove an L3out cisco.mso.mso_schema_template_l3out: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 l3out: L3out 1 state: absent delegate_to: localhost - name: Query a specific L3outs cisco.mso.mso_schema_template_l3out: host: mso_host username: admin password: SomeSecretPassword validate_certs: false schema: Schema 1 template: Template 1 l3out: L3out 1 state: query delegate_to: localhost register: query_result - name: Query all L3outs cisco.mso.mso_schema_template_l3out: host: mso_host username: admin password: SomeSecretPassword validate_certs: false schema: Schema 1 template: Template 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_site_bd – Manage site-local Bridge Domains (BDs) in schema template cisco.mso.mso\_schema\_site\_bd – Manage site-local Bridge Domains (BDs) in schema template =========================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_bd`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local BDs in schema template on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **bd** string | | The name of the BD to manage. aliases: name | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **host\_route** boolean | **Choices:*** no * yes | Whether host-based routing is enabled. | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **svi\_mac** string | | SVI MAC Address | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site](mso_schema_site_module#ansible-collections-cisco-mso-mso-schema-site-module) The official documentation on the **cisco.mso.mso\_schema\_site** module. [cisco.mso.mso\_schema\_site\_bd\_l3out](mso_schema_site_bd_l3out_module#ansible-collections-cisco-mso-mso-schema-site-bd-l3out-module) The official documentation on the **cisco.mso.mso\_schema\_site\_bd\_l3out** module. [cisco.mso.mso\_schema\_site\_bd\_subnet](mso_schema_site_bd_subnet_module#ansible-collections-cisco-mso-mso-schema-site-bd-subnet-module) The official documentation on the **cisco.mso.mso\_schema\_site\_bd\_subnet** module. [cisco.mso.mso\_schema\_template\_bd](mso_schema_template_bd_module#ansible-collections-cisco-mso-mso-schema-template-bd-module) The official documentation on the **cisco.mso.mso\_schema\_template\_bd** module. Examples -------- ``` - name: Add a new site BD cisco.mso.mso_schema_site_bd: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 bd: BD1 state: present delegate_to: localhost - name: Remove a site BD cisco.mso.mso_schema_site_bd: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 bd: BD1 state: absent delegate_to: localhost - name: Query a specific site BD cisco.mso.mso_schema_site_bd: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 bd: BD1 state: query delegate_to: localhost register: query_result - name: Query all site BDs cisco.mso.mso_schema_site_bd: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_site – Manage sites in schemas cisco.mso.mso\_schema\_site – Manage sites in schemas ===================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage sites on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **site** string | | The name of the site to manage. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string | | The name of the template. aliases: name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_template](mso_schema_template_module#ansible-collections-cisco-mso-mso-schema-template-module) The official documentation on the **cisco.mso.mso\_schema\_template** module. [cisco.mso.mso\_site](mso_site_module#ansible-collections-cisco-mso-mso-site-module) The official documentation on the **cisco.mso.mso\_site** module. Examples -------- ``` - name: Add a new site to a schema cisco.mso.mso_schema_site: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 site: Site1 template: Template 1 state: present delegate_to: localhost - name: Remove a site from a schema cisco.mso.mso_schema_site: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 site: Site1 template: Template 1 state: absent delegate_to: localhost - name: Query a schema site cisco.mso.mso_schema_site: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 site: Site1 template: Template 1 state: query delegate_to: localhost register: query_result - name: Query all schema sites cisco.mso.mso_schema_site: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) * Shreyas Srish (@shrsr)
programming_docs
ansible cisco.mso.mso_site – Manage sites cisco.mso.mso\_site – Manage sites ================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_site`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage sites on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **apic\_login\_domain** string | | The AAA login domain for the username for the APICs. The apic\_login\_domain attribute is not supported when using with ND platform. See the ND collection for complete site management. | | **apic\_password** string | | The password for the APICs. The apic\_password attribute is not supported when using with ND platform. See the ND collection for complete site management. | | **apic\_site\_id** string | | The site ID of the APICs. | | **apic\_username** string | **Default:**"admin" | The username for the APICs. The apic\_username attribute is not supported when using with ND platform. See the ND collection for complete site management. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **labels** list / elements=string | | The labels for this site. Labels that do not already exist will be automatically created. The labels attribute is not supported when using with ND platform. See the ND collection for complete site management. | | **location** dictionary | | Location of the site. The location attribute is not supported when using with ND platform. See the ND collection for complete site management. | | | **latitude** float | | The latitude of the location of the site. | | | **longitude** float | | The longitude of the location of the site. | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **site** string | | The name of the site. aliases: name | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **urls** list / elements=string | | A list of URLs to reference the APICs. The urls attribute is not supported when using with ND platform. See the ND collection for complete site management. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new site cisco.mso.mso_site: host: mso_host username: admin password: SomeSecretPassword site: north_europe description: North European Datacenter apic_username: mso_admin apic_password: AnotherSecretPassword apic_site_id: 12 urls: - 10.2.3.4 - 10.2.4.5 - 10.3.5.6 labels: - NEDC - Europe - Diegem location: latitude: 50.887318 longitude: 4.447084 state: present delegate_to: localhost - name: Remove a site cisco.mso.mso_site: host: mso_host username: admin password: SomeSecretPassword site: north_europe state: absent delegate_to: localhost - name: Query a site cisco.mso.mso_site: host: mso_host username: admin password: SomeSecretPassword site: north_europe state: query delegate_to: localhost register: query_result - name: Query all sites cisco.mso.mso_site: host: mso_host username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_dhcp_relay_policy_provider – Manage DHCP providers in a DHCP Relay policy. cisco.mso.mso\_dhcp\_relay\_policy\_provider – Manage DHCP providers in a DHCP Relay policy. ============================================================================================ Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_dhcp_relay_policy_provider`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage DHCP providers in a DHCP Relay policy on Cisco Multi-Site Orchestrator. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **application\_profile** string | | Application Profile where the DHCP provider is configured aliases: anp | | **dhcp\_relay\_policy** string / required | | Name of the DHCP Relay Policy aliases: name | | **endpoint\_group** string | | EPG where the DHCP provider is configured aliases: epg | | **external\_endpoint\_group** string | | External EPG where the DHCP provider is configured aliases: ext\_epg, external\_epg | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **ip** string | | IP address of the DHCP Server | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string | | Schema where the DHCP provider is configured | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string | | template where the DHCP provider is configured | | **tenant** string | | Tenant where the DHCP provider is located. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. Examples -------- ``` - name: Add a new provider to a DHCP Relay Policy cisco.mso.mso_dhcp_relay_policy_provider: host: mso_host username: admin password: SomeSecretPassword dhcp_relay_policy: my_test_dhcp_policy tenant: ansible_test schema: ansible_test template: Template 1 application_profile: ansible_test endpoint_group: ansible_test state: present delegate_to: localhost - name: Remove a provider to a DHCP Relay Policy cisco.mso.mso_dhcp_relay_policy_provider: host: mso_host username: admin password: SomeSecretPassword dhcp_relay_policy: my_test_dhcp_policy tenant: ansible_test schema: ansible_test template: Template 1 application_profile: ansible_test endpoint_group: ansible_test state: absent delegate_to: localhost - name: Query a provider to a DHCP Relay Policy cisco.mso.mso_dhcp_relay_policy_provider: host: mso_host username: admin password: SomeSecretPassword dhcp_relay_policy: my_test_dhcp_policy tenant: ansible_test schema: ansible_test template: Template 1 application_profile: ansible_test endpoint_group: ansible_test state: query delegate_to: localhost - name: Query all provider of a DHCP Relay Policy cisco.mso.mso_dhcp_relay_policy_provider: host: mso_host username: admin password: SomeSecretPassword dhcp_relay_policy: my_test_dhcp_policy state: query delegate_to: localhost ``` ### Authors * Jorge Gomez (@jorgegome2307) ansible cisco.mso.mso_schema_site_anp_epg_selector – Manage site-local EPG selector in schema templates cisco.mso.mso\_schema\_site\_anp\_epg\_selector – Manage site-local EPG selector in schema templates ==================================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_anp_epg_selector`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage EPG selector in schema template on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **anp** string / required | | The name of the ANP. | | **epg** string / required | | The name of the EPG to manage. | | **expressions** list / elements=dictionary | | Expressions associated to this selector. | | | **operator** string / required | **Choices:*** not\_in * in * equals * not\_equals * has\_key * does\_not\_have\_key | The operator associated to the expression. Operator has\_key or does\_not\_have\_key is only available for custom type / tag | | | **type** string / required | | The type of the expression. The type is custom or is one of region, zone and ip\_address The type can be zone only when the site is AWS. aliases: tag | | | **value** string | | The value associated to the expression. If the operator is in or not\_in, the value should be a comma separated string. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **selector** string | | The name of the selector. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site\_anp\_epg](mso_schema_site_anp_epg_module#ansible-collections-cisco-mso-mso-schema-site-anp-epg-module) The official documentation on the **cisco.mso.mso\_schema\_site\_anp\_epg** module. Examples -------- ``` - name: Add a selector to a site EPG cisco.mso.mso_schema_site_anp_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 site: Site 1 template: Template 1 anp: ANP 1 epg: EPG 1 selector: selector_1 expressions: - type: expression_1 operator: in value: test state: present delegate_to: localhost - name: Remove a Selector from a site EPG cisco.mso.mso_schema_site_anp_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 site: Site 1 template: Template 1 anp: ANP 1 epg: EPG 1 selector: selector_1 state: absent delegate_to: localhost - name: Query a specific Selector cisco.mso.mso_schema_site_anp_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 site: Site 1 template: Template 1 anp: ANP 1 epg: EPG 1 selector: selector_1 state: query delegate_to: localhost register: query_result - name: Query all Selectors cisco.mso.mso_schema_site_anp_epg_selector: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 site: Site 1 template: Template 1 anp: ANP 1 epg: EPG 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Cindy Zhao (@cizhao)
programming_docs
ansible cisco.mso.mso_schema_site_bd_l3out – Manage site-local BD l3out’s in schema template cisco.mso.mso\_schema\_site\_bd\_l3out – Manage site-local BD l3out’s in schema template ======================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_site_bd_l3out`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage site-local BDs l3out’s in schema template on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **bd** string / required | | The name of the BD. aliases: name | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **l3out** string | | The name of the l3out. | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **site** string / required | | The name of the site. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index. This can cause silent corruption on concurrent access when changing/removing on object as the wrong object may be referenced. This module is affected by this deficiency. * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_site\_bd](mso_schema_site_bd_module#ansible-collections-cisco-mso-mso-schema-site-bd-module) The official documentation on the **cisco.mso.mso\_schema\_site\_bd** module. [cisco.mso.mso\_schema\_template\_bd](mso_schema_template_bd_module#ansible-collections-cisco-mso-mso-schema-template-bd-module) The official documentation on the **cisco.mso.mso\_schema\_template\_bd** module. Examples -------- ``` - name: Add a new site BD l3out cisco.mso.mso_schema_site_bd_l3out: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 bd: BD1 l3out: L3out1 state: present delegate_to: localhost - name: Remove a site BD l3out cisco.mso.mso_schema_site_bd_l3out: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 bd: BD1 l3out: L3out1 state: absent delegate_to: localhost - name: Query a specific site BD l3out cisco.mso.mso_schema_site_bd_l3out: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 bd: BD1 l3out: L3out1 state: query delegate_to: localhost register: query_result - name: Query all site BD l3outs cisco.mso.mso_schema_site_bd_l3out: host: mso_host username: admin password: SomeSecretPassword schema: Schema1 site: Site1 template: Template1 bd: BD1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) * Anvitha Jain (@anvitha-jain) ansible cisco.mso.mso_schema_template_anp_epg_contract – Manage EPG contracts in schema templates cisco.mso.mso\_schema\_template\_anp\_epg\_contract – Manage EPG contracts in schema templates ============================================================================================== Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_anp_epg_contract`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage EPG contracts in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **anp** string / required | | The name of the ANP. | | **contract** dictionary | | A contract associated to this EPG. | | | **name** string / required | | The name of the Contract to associate with. | | | **schema** string | | The schema that defines the referenced BD. If this parameter is unspecified, it defaults to the current schema. | | | **template** string | | The template that defines the referenced BD. | | | **type** string / required | **Choices:*** consumer * provider | The type of contract. | | **epg** string / required | | The name of the EPG to manage. | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **schema** string / required | | The name of the schema. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **template** string / required | | The name of the template to change. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_template\_anp\_epg](mso_schema_template_anp_epg_module#ansible-collections-cisco-mso-mso-schema-template-anp-epg-module) The official documentation on the **cisco.mso.mso\_schema\_template\_anp\_epg** module. [cisco.mso.mso\_schema\_template\_contract\_filter](mso_schema_template_contract_filter_module#ansible-collections-cisco-mso-mso-schema-template-contract-filter-module) The official documentation on the **cisco.mso.mso\_schema\_template\_contract\_filter** module. Examples -------- ``` - name: Add a contract to an EPG cisco.mso.mso_schema_template_anp_epg_contract: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 contract: name: Contract 1 type: consumer state: present delegate_to: localhost - name: Remove a Contract cisco.mso.mso_schema_template_anp_epg_contract: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 contract: name: Contract 1 state: absent delegate_to: localhost - name: Query a specific Contract cisco.mso.mso_schema_template_anp_epg_contract: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 contract: name: Contract 1 state: query delegate_to: localhost register: query_result - name: Query all Contracts cisco.mso.mso_schema_template_anp_epg_contract: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers) ansible cisco.mso.mso_schema_template_anp_epg – Manage Endpoint Groups (EPGs) in schema templates cisco.mso.mso\_schema\_template\_anp\_epg – Manage Endpoint Groups (EPGs) in schema templates ============================================================================================= Note This plugin is part of the [cisco.mso collection](https://galaxy.ansible.com/cisco/mso) (version 1.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 cisco.mso`. To use it in a playbook, specify: `cisco.mso.mso_schema_template_anp_epg`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Manage EPGs in schema templates on Cisco ACI Multi-Site. Requirements ------------ The below requirements are needed on the host that executes this module. * Multi Site Orchestrator v2.1 or newer Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **anp** string / required | | The name of the ANP. | | **bd** dictionary | | The BD associated to this ANP. | | | **name** string / required | | The name of the BD to associate with. | | | **schema** string | | The schema that defines the referenced BD. If this parameter is unspecified, it defaults to the current schema. | | | **template** string | | The template that defines the referenced BD. | | **display\_name** string | | The name as displayed on the MSO web interface. | | **epg** string | | The name of the EPG to manage. aliases: name | | **host** string | | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable `MSO_HOST` will be used instead. aliases: hostname | | **intersite\_multicast\_source** boolean | **Choices:*** no * yes | Whether intersite multicast source is enabled. When not specified, this parameter defaults to `no`. | | **intra\_epg\_isolation** string | **Choices:*** enforced * unenforced | Whether intra EPG isolation is enforced. When not specified, this parameter defaults to `unenforced`. | | **login\_domain** string | | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable `MSO_LOGIN_DOMAIN` will be used instead. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this MSO module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `MSO_OUTPUT_LEVEL` will be used instead. | | **password** string | | The password to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for the REST connection. The default value depends on parameter `use\_ssl`. If the value is not specified in the task, the value of environment variable `MSO_PORT` will be used instead. | | **preferred\_group** boolean | **Choices:*** no * yes | Whether this EPG is added to preferred group or not. When not specified, this parameter defaults to `no`. | | **proxy\_arp** boolean | **Choices:*** no * yes | Whether proxy arp is enabled. When not specified, this parameter defaults to `no`. | | **schema** string / required | | The name of the schema. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **subnets** list / elements=dictionary | | The subnets associated to this ANP. | | | **description** string | | The description of this subnet. | | | **no\_default\_gateway** boolean | **Choices:*** **no** ← * yes | Whether this subnet has a default gateway. | | | **scope** string | **Choices:*** **private** ← * public | The scope of the subnet. | | | **shared** boolean | **Choices:*** **no** ← * yes | Whether this subnet is shared between VRFs. | | | **subnet** string / required | | The IP range in CIDR notation. aliases: ip | | **template** string / required | | The name of the template. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `MSO_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `MSO_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `MSO_USE_SSL` will be used instead. | | **useg\_epg** boolean | **Choices:*** no * yes | Whether this is a USEG EPG. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `MSO_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `MSO_VALIDATE_CERTS` will be used instead. | | **vrf** dictionary | | The VRF associated to this ANP. | | | **name** string / required | | The name of the VRF to associate with. | | | **schema** string | | The schema that defines the referenced VRF. If this parameter is unspecified, it defaults to the current schema. | | | **template** string | | The template that defines the referenced VRF. | Notes ----- Note * Please read the mso\_guide for more detailed information on how to manage your MSO infrastructure using Ansible. * This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. See Also -------- See also [cisco.mso.mso\_schema\_template\_anp](mso_schema_template_anp_module#ansible-collections-cisco-mso-mso-schema-template-anp-module) The official documentation on the **cisco.mso.mso\_schema\_template\_anp** module. [cisco.mso.mso\_schema\_template\_anp\_epg\_subnet](mso_schema_template_anp_epg_subnet_module#ansible-collections-cisco-mso-mso-schema-template-anp-epg-subnet-module) The official documentation on the **cisco.mso.mso\_schema\_template\_anp\_epg\_subnet** module. [cisco.mso.mso\_schema\_template\_bd](mso_schema_template_bd_module#ansible-collections-cisco-mso-mso-schema-template-bd-module) The official documentation on the **cisco.mso.mso\_schema\_template\_bd** module. [cisco.mso.mso\_schema\_template\_contract\_filter](mso_schema_template_contract_filter_module#ansible-collections-cisco-mso-mso-schema-template-contract-filter-module) The official documentation on the **cisco.mso.mso\_schema\_template\_contract\_filter** module. Examples -------- ``` - name: Add a new EPG cisco.mso.mso_schema_template_anp_epg: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 bd: name: bd1 vrf: name: vrf1 state: present delegate_to: localhost - name: Add a new EPG with preferred group. cisco.mso.mso_schema_template_anp_epg: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 state: present preferred_group: yes delegate_to: localhost - name: Remove an EPG cisco.mso.mso_schema_template_anp_epg: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 bd: name: bd1 vrf: name: vrf1 state: absent delegate_to: localhost - name: Query a specific EPG cisco.mso.mso_schema_template_anp_epg: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 bd: name: bd1 vrf: name: vrf1 state: query delegate_to: localhost register: query_result - name: Query all EPGs cisco.mso.mso_schema_template_anp_epg: host: mso_host username: admin password: SomeSecretPassword schema: Schema 1 template: Template 1 anp: ANP 1 epg: EPG 1 bd: name: bd1 vrf: name: vrf1 state: query delegate_to: localhost register: query_result ``` ### Authors * Dag Wieers (@dagwieers)
programming_docs
ansible cisco.iosxr.iosxr_ospf_interfaces – OSPF Interfaces Resource Module. cisco.iosxr.iosxr\_ospf\_interfaces – OSPF Interfaces Resource Module. ====================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_ospf_interfaces`. New in version 1.2.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module manages OSPF(v2/v3) configuration of interfaces on devices running Cisco IOS-XR. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A list of OSPF configuration for interfaces. | | | **address\_family** list / elements=dictionary | | OSPF settings on the interfaces in address-family context. | | | | **afi** string / required | **Choices:*** ipv4 * ipv6 | Address Family Identifier (AFI) for OSPF settings on the interfaces. | | | | **apply\_group\_option** dictionary | | Specify configuration from a group | | | | | **group\_name** string | | Specify the name of the group | | | | | **operation** string | **Choices:*** add * remove * append | Specify the group config operation | | | | **authentication** dictionary | | Enable authentication | | | | | **message\_digest** dictionary | | Use message-digest authentication | | | | | | **keychain** string | | Specify keychain name | | | | | **null\_auth** boolean | **Choices:*** no * yes | Use no authentication | | | | **authentication\_key** dictionary | | Specify authentication password (key) | | | | | **clear** string | | Specifies an UNENCRYPTED password (key) will follow | | | | | **encrypted** string | | Specifies an ENCRYPTED password (key) will follow | | | | | **password** string | | The OSPFv2 password (key) | | | | **bfd** dictionary | | Configure BFD parameters | | | | | **fast\_detect** dictionary | | Configure fast detection | | | | | | **set** boolean | **Choices:*** no * yes | Enable fast detection only | | | | | | **strict\_mode** boolean | **Choices:*** no * yes | Hold down neighbor session until BFD session is up | | | | | **minimum\_interval** integer | | Hello interval in milli-seconds | | | | | **multiplier** integer | | Detect multiplier | | | | **cost** integer | | Specify Interface cost | | | | **cost\_fallback** dictionary | | Specify Cost when cumulative bandwidth goes below the theshold | | | | | **cost** integer | | Specify cost w.r.t cummulative bandwidth | | | | | **threshold** integer | | Specify threshold bandwidth when cost-fallback is applied | | | | **database\_filter** dictionary | | Filter OSPF LSAs during synchronization and flooding | | | | | **all\_outgoing\_lsa** boolean | **Choices:*** no * yes | Filter all outgoing LSA | | | | **dead\_interval** integer | | Specify interval after which a neighbor is declared dead | | | | **demand\_circuit** boolean | **Choices:*** no * yes | Enable/Disable demand circuits | | | | **fast\_reroute** dictionary | | Specify IP Fast Reroute | | | | | **disabled** boolean | **Choices:*** no * yes | Disable IP fast reroute | | | | | **per\_link** dictionary | | Specify per-prefix computation | | | | | | **information\_type** string | **Choices:*** exclude * lfa\_candidate | Specify per-link LFA exclusion or FRR LFA candidate information | | | | | | **interface** dictionary | | Specify Per-link LFA exclusion information | | | | | | | **bundle\_ether** list / elements=dictionary | | Specify Aggregated Ethernet interface(s) | | | | | | | | **name** integer | | Specify the interface id | | | | | | | **bvi** list / elements=dictionary | | Specify Bridge-Group Virtual Interface | | | | | | | | **name** integer | | Specify the interface id | | | | | | | **fast\_ethernet** list / elements=dictionary | | Specify FastEthernet/IEEE 802.3 interface(s) | | | | | | | | **name** string | | Specify the interface id | | | | | | | **fiftygige** list / elements=dictionary | | Specify FiftyGigE/IEEE 802.3 interface(s) | | | | | | | | **name** string | | Specify the interface id | | | | | | | **fortygige** list / elements=dictionary | | Specify FortyGigE/IEEE 802.3 interface(s) | | | | | | | | **name** string | | Specify the interface id | | | | | | | **fourhundredgige** list / elements=dictionary | | Specify FourHundredGigE/IEEE 802.3 interface(s) | | | | | | | | **name** string | | Specify the interface id | | | | | | | **gigabitethernet** list / elements=dictionary | | Specify GigabitEthernet/IEEE 802.3 interface(s) | | | | | | | | **name** string | | Specify the interface id | | | | | | | **hundredgige** list / elements=dictionary | | Specify HundredGigE/IEEE 802.3 interface(s) | | | | | | | | **name** string | | Specify the interface id | | | | | | | **mgmteth** list / elements=dictionary | | Specify MgmtEth/IEEE 802.3 interface(s) | | | | | | | | **name** string | | Specify the interface id | | | | | | | **multilink** list / elements=dictionary | | Specify Multilink network interface(s) | | | | | | | | **name** string | | Specify the interface id | | | | | | | **nve** list / elements=dictionary | | Specify Network Virtualization Endpoint Interface(s) | | | | | | | | **name** integer | | Specify the interface id | | | | | | | **pos\_int** list / elements=dictionary | | Specify Aggregated pos interface(s) | | | | | | | | **name** integer | | Specify the interface id | | | | | | | **pw\_ether** list / elements=dictionary | | Specify PWHE Ethernet Interface | | | | | | | | **name** integer | | Specify the interface id | | | | | | | **pw\_iw** list / elements=dictionary | | Specify PWHE VC11 IP Interworking Interface | | | | | | | | **name** integer | | Specify the interface id | | | | | | | **serial** list / elements=dictionary | | Specify Serial network interface(s) | | | | | | | | **name** string | | Specify the interface id | | | | | | | **srp** list / elements=dictionary | | Specify SRP interface(s) | | | | | | | | **name** string | | Specify the interface id | | | | | | | **tengige** list / elements=dictionary | | Specify TenGigabitEthernet/IEEE 802.3 interface(s) | | | | | | | | **name** string | | Specify the interface id | | | | | | | **tunnel\_ip** list / elements=dictionary | | Specify GRE/IPinIP Tunnel Interface(s) | | | | | | | | **name** integer | | Specify the interface id | | | | | | | **tunnel\_ipsec** list / elements=dictionary | | Specify IPSec Tunnel interface(s) | | | | | | | | **name** integer | | Specify the interface id | | | | | | | **tunnel\_mpls** list / elements=dictionary | | MPLS Transport Protocol Tunnel interface | | | | | | | | **name** string | | Specify the interface id | | | | | | | **tunnel\_mte** list / elements=dictionary | | Specify MPLS Traffic Engineering P2MP Tunnel interface(s) | | | | | | | | **name** integer | | Specify the interface id | | | | | | | **twentyfivegige** list / elements=dictionary | | Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s) | | | | | | | | **name** string | | Specify the interface id | | | | | | | **twohundredgige** list / elements=dictionary | | Specify TwoHundredGigE/IEEE 802.3 interface(s) | | | | | | | | **name** string | | Specify the interface id | | | | | | **use\_candidate\_only** boolean | **Choices:*** no * yes | Enable/Disable backup selection from candidate-list only | | | | **flood\_reduction** boolean | **Choices:*** no * yes | Enable/Disable flood reduction | | | | **hello\_interval** integer | | Specify Time between HELLO packets | | | | **link\_down\_fast\_detect** boolean | **Choices:*** no * yes | Configure interface down parameters | | | | **message\_digest\_key** dictionary | | Message digest authentication password (key) | | | | | **id** integer / required | | Key ID | | | | | **md5** dictionary / required | | Use MD5 Algorithm | | | | | | **clear** boolean | **Choices:*** no * yes | Specifies an UNENCRYPTED password (key) will follow | | | | | | **encrypted** boolean | **Choices:*** no * yes | Specifies an ENCRYPTED password (key) will follow | | | | | | **password** string | | The OSPFv2 password (key) | | | | **mpls\_ldp\_sync** boolean | **Choices:*** no * yes | Enable/Disable MPLS LDP Sync | | | | **mtu\_ignore** boolean | **Choices:*** no * yes | Enable/Disable ignoring of MTU in DBD packets | | | | **neighbors** list / elements=dictionary | | Specify a neighbor routers | | | | | **cost** integer | | Specify OSPF cost for point-to-multipoint neighbor | | | | | **db\_filter\_all\_out** boolean | **Choices:*** no * yes | Specify Filter OSPF LSA during synchronization and flooding for point-to-multipoint neighbor | | | | | **neighbor\_id** string | | Specify Neighbor address (name) | | | | | **poll\_interval** integer | | Specify OSPF dead-router polling interval | | | | | **priority** integer | | Specify OSPF priority of non-broadcast neighbor | | | | **network** string | **Choices:*** broadcast * non-broadcast * point-to-multipoint * point-to-point | Specify Network type | | | | **packet\_size** integer | | Customize size of OSPF packets upto MTU | | | | **passive** boolean | **Choices:*** no * yes | Enable/Disable passive | | | | **prefix\_suppression** boolean | **Choices:*** no * yes | Suppress advertisement of the prefixes | | | | **priority** integer | | Specify Router priority | | | | **processes** list / elements=dictionary | | Interfaces configuration for an OSPF process. | | | | | **area** dictionary | | Specify the area-id | | | | | | **area\_id** string | | OSPF interfaces area ID as a decimal value. Please refer vendor documentation of Valid values. OSPF interfaces area ID in IP address format(e.g. A.B.C.D) | | | | | **process\_id** string / required | | OSPF process tag. | | | | **retransmit\_interval** integer | | Specify time between retransmitting lost link state advertisements | | | | **security\_ttl** dictionary | | Enable security | | | | | **hops** integer | | Maximum number of IP hops allowed <1-254> | | | | | **set** boolean | **Choices:*** no * yes | Enable ttl security | | | | **transmit\_delay** integer | | Specify estimated time needed to send link-state update packet | | | **name** string / required | | Name/Identifier of the interface. | | | **type** string / required | | Type of the interface. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOS-XR device by executing the command **show running-config router ospf'**. 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 * gathered * parsed * rendered | The state the configuration should be left in. | Notes ----- Note * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr) Examples -------- ``` # Using merged # Before state: # ------------- # # RP/0/RP0/CPU0:anton#show running-config router ospf # % No such configuration item(s) # - name: Merge provided OSPF interfaces configuration with the existing configuration cisco.iosxr.iosxr_ospf_interfaces: config: - name: GigabitEthernet0/0/0/0 type: gigabitethernet address_family: - afi: ipv4 processes: - process_id: "LAB3" area: area_id: 0.0.0.3 cost: 20 authentication: message_digest: keychain: cisco - afi: ipv6 processes: - process_id: "LAB3" area: area_id: 0.0.0.2 cost: 30 state: merged # # # ------------------------ # Module Execution Result # ------------------------ # # "before": [] # # "commands": [ # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 cost 20", # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest", # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest keychain cisco", # "router ospfv3 LAB3 area 0.0.0.2 interface GigabitEthernet 0/0/0/0 cost 30" # ] # # "after": [ # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "message_digest": { # "keychain": "cisco" # } # }, # "cost": 20, # "processes": [ # { # "area": { # "area_id": "0.0.0.3" # }, # "process_id": "LAB3" # } # ] # }, # { # "afi": "ipv6", # "cost": 30, # "processes": [ # { # "area": { # "area_id": "0.0.0.2" # }, # "process_id": "LAB3" # } # ] # } # ], # "name": "GigabitEthernet0/0/0/0", # "type": "gigabitethernet" # } # ] # # # ------------ # After state # ------------ # # RP/0/0/CPU0:an-iosxr-02#show running-config router ospf # Thu Oct 23 06:00:57.217 UTC # router ospf LAB # area 0.0.0.0 # ! # area 0.0.0.9 # ! # ! # router ospf LAB1 # area 0.0.0.1 # ! # area 0.0.0.3 # ! # ! # router ospf LAB3 # area 0.0.0.3 # interface GigabitEthernet0/0/0/0 # cost 20 # authentication message-digest keychain cisco # ! # ! # ! # router ospf ipv4 # ! # Using replaced # # ------------ # Before state # ------------ # # # RP/0/0/CPU0:an-iosxr-02#show running-config router ospf # Thu Oct 23 06:00:57.217 UTC # router ospf LAB # area 0.0.0.0 # ! # area 0.0.0.9 # ! # ! # router ospf LAB1 # area 0.0.0.1 # ! # area 0.0.0.3 # ! # ! # router ospf LAB3 # area 0.0.0.3 # interface GigabitEthernet0/0/0/0 # cost 20 # authentication message-digest keychain cisco # ! # ! # ! # router ospf ipv4 # ! - name: Replace OSPF interfaces configuration cisco.iosxr.iosxr_ospf_interfaces: config: - name: GigabitEthernet0/0/0/0 type: gigabitethernet address_family: - afi: ipv4 processes: - process_id: "LAB3" area: area_id: 0.0.0.3 cost: 30 authentication: message_digest: keychain: ciscoiosxr - afi: ipv6 processes: - process_id: "LAB3" area: area_id: 0.0.0.2 cost: 30 state: replaced # # # ------------------------ # Module Execution Result # ------------------------ # # "before": [ # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "message_digest": { # "keychain": "cisco" # } # }, # "cost": 20, # "processes": [ # { # "area": { # "area_id": "0.0.0.3" # }, # "process_id": "LAB3" # } # ] # }, # { # "afi": "ipv6", # "cost": 30, # "processes": [ # { # "area": { # "area_id": "0.0.0.2" # }, # "process_id": "LAB3" # } # ] # } # ], # "name": "GigabitEthernet0/0/0/0", # "type": "gigabitethernet" # } # ] # # "commands": [ # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 cost 30", # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest", # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest keychain ciscoiosxr" # ] # # "after": [ # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "message_digest": { # "keychain": "ciscoiosxr" # } # }, # "cost": 30, # "processes": [ # { # "area": { # "area_id": "0.0.0.3" # }, # "process_id": "LAB3" # } # ] # }, # { # "afi": "ipv6", # "cost": 30, # "processes": [ # { # "area": { # "area_id": "0.0.0.2" # }, # "process_id": "LAB3" # } # ] # } # ], # "name": "GigabitEthernet0/0/0/0", # "type": "gigabitethernet" # } # ] # # # ----------- # After state # ----------- # # RP/0/0/CPU0:an-iosxr-02#show running-config router ospf # Thu Oct 23 06:10:39.827 UTC # router ospf LAB # area 0.0.0.0 # ! # area 0.0.0.9 # ! # ! # router ospf LAB1 # area 0.0.0.1 # ! # area 0.0.0.3 # ! # ! # router ospf LAB3 # area 0.0.0.3 # interface GigabitEthernet0/0/0/0 # cost 30 # authentication message-digest keychain ciscoiosxr # ! # ! # ! # router ospf ipv4 # ! - name: Override existing OSPF interfaces configuration cisco.iosxr.iosxr_ospf_interfaces: config: - name: GigabitEthernet0/0/0/1 type: gigabitethernet address_family: - afi: ipv4 processes: - process_id: "LAB1" area: area_id: 0.0.0.3 cost: 10 authentication: message_digest: keychain: iosxr state: overridden # # # ------------------------ # Module Execution Result # ------------------------ # # "before": [ # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "message_digest": { # "keychain": "ciscoiosxr" # } # }, # "cost": 30, # "processes": [ # { # "area": { # "area_id": "0.0.0.3" # }, # "process_id": "LAB3" # } # ] # }, # { # "afi": "ipv6", # "cost": 30, # "processes": [ # { # "area": { # "area_id": "0.0.0.2" # }, # "process_id": "LAB3" # } # ] # } # ], # "name": "GigabitEthernet0/0/0/0", # "type": "gigabitethernet" # } # ] # # "commands": [ # "no router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0", # "no router ospfv3 LAB3 area 0.0.0.2 interface GigabitEthernet 0/0/0/0", # "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 cost 10", # "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 authentication message-digest", # "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 authentication message-digest keychain iosxr" # ] # # "after": [ # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "message_digest": { # "keychain": "iosxr" # } # }, # "cost": 10, # "processes": [ # { # "area": { # "area_id": "0.0.0.3" # }, # "process_id": "LAB1" # } # ] # } # ], # "name": "GigabitEthernet0/0/0/1", # "type": "gigabitethernet" # } # ] # # # ----------- # After state # ----------- # # RP/0/0/CPU0:an-iosxr-02#show running-config router ospf # Thu Oct 23 06:28:15.025 UTC # router ospf LAB # area 0.0.0.0 # ! # area 0.0.0.9 # ! # ! # router ospf LAB1 # area 0.0.0.1 # ! # area 0.0.0.3 # interface GigabitEthernet0/0/0/1 # cost 10 # authentication message-digest keychain iosxr # ! # ! # ! # router ospf LAB3 # area 0.0.0.3 # ! # ! # router ospf ipv4 # ! # Using deleted # # ------------ # Before state # ------------ # # # RP/0/0/CPU0:an-iosxr-02#show running-config router ospf # Thu Oct 23 06:28:15.025 UTC # router ospf LAB # area 0.0.0.0 # ! # area 0.0.0.9 # ! # ! # router ospf LAB1 # area 0.0.0.1 # ! # area 0.0.0.3 # interface GigabitEthernet0/0/0/1 # cost 10 # authentication message-digest keychain iosxr # ! # ! # ! # router ospf LAB3 # area 0.0.0.3 # ! # ! # router ospf ipv4 # ! - name: Deleted existing OSPF interfaces from the device cisco.iosxr.iosxr_ospf_interfaces: config: - name: GigabitEthernet0/0/0/1 type: gigabitethernet state: deleted # # # ------------------------ # Module Execution Result # ------------------------ # # "before": [ # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "message_digest": { # "keychain": "iosxr" # } # }, # "cost": 10, # "processes": [ # { # "area": { # "area_id": "0.0.0.3" # }, # "process_id": "LAB1" # } # ] # } # ], # "name": "GigabitEthernet0/0/0/1", # "type": "gigabitethernet" # } # ], # # "commands": [ # "no router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1" # ] # # "after": [] # # # ----------- # After state # ----------- # # RP/0/0/CPU0:an-iosxr-02#show running-config router ospf # Thu Oct 23 06:34:38.319 UTC # router ospf LAB # area 0.0.0.0 # ! # area 0.0.0.9 # ! # ! # router ospf LAB1 # area 0.0.0.1 # ! # area 0.0.0.3 # ! # ! # router ospf LAB3 # area 0.0.0.3 # ! # ! # router ospf ipv4 # ! # Using parsed # parsed.cfg # ------------ # router ospf LAB # area 0.0.0.0 # ! # area 0.0.0.9 # ! # ! # router ospf LAB1 # area 0.0.0.1 # ! # area 0.0.0.3 # ! # ! # router ospf LAB3 # area 0.0.0.3 # interface GigabitEthernet0/0/0/0 # cost 20 # authentication message-digest keychain cisco # ! # ! # ! # router ospf ipv4 # ! - name: Parsed the device configuration to get output commands cisco.iosxr.iosxr_ospf_interfaces: running_config: "{{ lookup('file', './parsed.cfg') }}" state: parsed # # # ------------------------- # Module Execution Result # ------------------------- # # # "parsed": [ # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "message_digest": { # "keychain": "cisco" # } # }, # "cost": 20, # "processes": [ # { # "area": { # "area_id": "0.0.0.3" # }, # "process_id": "LAB3" # } # ] # } # ], # "name": "GigabitEthernet0/0/0/0", # "type": "gigabitethernet" # } # ] # # Using rendered # # - name: Render the commands for provided configuration cisco.iosxr.iosxr_ospf_interfaces: config: - name: GigabitEthernet0/0/0/0 type: gigabitethernet address_family: - afi: ipv4 processes: - process_id: "LAB3" area: area_id: 0.0.0.3 cost: 20 authentication: message_digest: keychain: cisco - afi: ipv6 processes: - process_id: "LAB3" area: area_id: 0.0.0.2 cost: 30 state: rendered # # # ------------------------- # Module Execution Result # ------------------------- # # # "rendered": [ # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 cost 20", # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest", # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest keychain cisco", # "router ospfv3 LAB3 area 0.0.0.2 interface GigabitEthernet 0/0/0/0 cost 30" # ] # Using gathered # # Before state: # ------------- # # RP/0/0/CPU0:an-iosxr-02#show running-config router ospf # Thu Oct 23 06:50:38.743 UTC # router ospf LAB # area 0.0.0.0 # ! # area 0.0.0.9 # ! # ! # router ospf LAB1 # area 0.0.0.1 # ! # area 0.0.0.3 # ! # ! # router ospf LAB3 # area 0.0.0.3 # interface GigabitEthernet0/0/0/0 # cost 20 # authentication message-digest keychain cisco # ! # ! # ! # router ospf ipv4 # ! - name: Gather ospf_interfaces routes configuration cisco.iosxr.iosxr_ospf_interfaces: state: gathered # # # ------------------------- # Module Execution Result # ------------------------- # # "gathered": [ # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "message_digest": { # "keychain": "cisco" # } # }, # "cost": 20, # "processes": [ # { # "area": { # "area_id": "0.0.0.3" # }, # "process_id": "LAB3" # } # ] # }, # { # "afi": "ipv6", # "cost": 30, # "processes": [ # { # "area": { # "area_id": "0.0.0.2" # }, # "process_id": "LAB3" # } # ] # } # ], # "name": "GigabitEthernet0/0/0/0", # "type": "gigabitethernet" # } # ] # ``` ### Authors * Rohit Thakur (@rohitthakur2590)
programming_docs
ansible cisco.iosxr.iosxr_interface – (deprecated, removed after 2022-06-01) Manage Interface on Cisco IOS XR network devices cisco.iosxr.iosxr\_interface – (deprecated, removed after 2022-06-01) Manage Interface on Cisco IOS XR network devices ====================================================================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_interface`. New in version 1.0.0: of cisco.iosxr * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in major release after 2022-06-01 Why Newer and updated modules released with more functionality in Ansible 2.9 Alternative iosxr\_interfaces Synopsis -------- * This module provides declarative management of Interfaces on Cisco IOS XR 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. * ncclient >= 0.5.3 when using netconf * lxml >= 4.1.1 when using netconf Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **active** string | **Choices:*** **active** ← * preconfigure | Whether the interface is `active` or `preconfigured`. Preconfiguration allows you to configure modular services cards before they are inserted into the router. When the cards are inserted, they are instantly configured. Active cards are the ones already inserted. | | **aggregate** list / elements=dictionary | | List of interfaces definition | | | **active** string | **Choices:*** active * preconfigure | Whether the interface is `active` or `preconfigured`. Preconfiguration allows you to configure modular services cards before they are inserted into the router. When the cards are inserted, they are instantly configured. Active cards are the ones already inserted. | | | **delay** integer | | 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 being configured. | | | **duplex** string | **Choices:*** full * half | Configures the interface duplex mode. Default is auto-negotiation when not configured. | | | **enabled** boolean | **Choices:*** no * yes | Removes the shutdown configuration, which removes the forced administrative down on the interface, enabling it to move to an up or down state. | | | **mtu** string | | Sets the MTU value for the interface. Range is between 64 and 65535' | | | **name** string / required | | Name of the interface to configure in `type + path` format. e.g. `GigabitEthernet0/0/0/0` | | | **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 | **Choices:*** 10 * 100 * 1000 | Configure the speed for an interface. Default is auto-negotiation when not configured. | | | **state** string | **Choices:*** present * absent * up * down | State of the Interface configuration, `up` means present and operationally up and `down` means 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) | | **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 argument which are *state* with values `up`/`down`, *tx\_rate* and *rx\_rate*. | | **description** string | | Description of Interface being configured. | | **duplex** string | **Choices:*** full * half | Configures the interface duplex mode. Default is auto-negotiation when not configured. | | **enabled** boolean | **Choices:*** no * **yes** ← | Removes the shutdown configuration, which removes the forced administrative down on the interface, enabling it to move to an up or down state. | | **mtu** string | | Sets the MTU value for the interface. Range is between 64 and 65535' | | **name** string | | Name of the interface to configure in `type + path` format. e.g. `GigabitEthernet0/0/0/0` | | **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. | | | **transport** string | **Choices:*** **cli** ← * netconf | Specifies the type of connection based transport. | | | **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. | | **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 | **Choices:*** 10 * 100 * 1000 | Configure the speed for an interface. Default is auto-negotiation when not configured. | | **state** string | **Choices:*** **present** ← * absent * up * down | State of the Interface configuration, `up` means present and operationally up and `down` means 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 works with connection `network_cli` and `netconf`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). * Tested against IOS XRv 6.1.3. * Preconfiguration of physical interfaces is not supported with `netconf` transport. * 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: configure interface cisco.iosxr.iosxr_interface: name: GigabitEthernet0/0/0/2 description: test-interface speed: 100 duplex: half mtu: 512 - name: remove interface cisco.iosxr.iosxr_interface: name: GigabitEthernet0/0/0/2 state: absent - name: make interface up cisco.iosxr.iosxr_interface: name: GigabitEthernet0/0/0/2 enabled: true - name: make interface down cisco.iosxr.iosxr_interface: name: GigabitEthernet0/0/0/2 enabled: false - name: Create interface using aggregate cisco.iosxr.iosxr_interface: aggregate: - name: GigabitEthernet0/0/0/3 - name: GigabitEthernet0/0/0/2 speed: 100 duplex: full mtu: 512 state: present - name: Create interface using aggregate along with additional params in aggregate cisco.iosxr.iosxr_interface: aggregate: - {name: GigabitEthernet0/0/0/3, description: test-interface 3} - {name: GigabitEthernet0/0/0/2, description: test-interface 2} speed: 100 duplex: full mtu: 512 state: present - name: Delete interface using aggregate cisco.iosxr.iosxr_interface: aggregate: - name: GigabitEthernet0/0/0/3 - name: GigabitEthernet0/0/0/2 state: absent - name: Check intent arguments cisco.iosxr.iosxr_interface: name: GigabitEthernet0/0/0/5 state: up delay: 20 - name: Config + intent cisco.iosxr.iosxr_interface: name: GigabitEthernet0/0/0/5 enabled: false state: down delay: 20 ``` 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 (empty list when no commands to send) | The list of configuration mode commands sent to device with transport `cli` **Sample:** ['interface GigabitEthernet0/0/0/2', 'description test-interface', 'duplex half', 'mtu 512'] | | **xml** list / elements=string | always (empty list when no xml rpc to send) | NetConf rpc xml sent to device with transport `netconf` **Sample:** ['<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> <interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"> <interface-configuration xc:operation="merge"> <active>act</active> <interface-name>GigabitEthernet0/0/0/0</interface-name> <description>test-interface-0</description> <mtus><mtu> <owner>GigabitEthernet</owner> <mtu>512</mtu> </mtu></mtus> <ethernet xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-drivers-media-eth-cfg"> <speed>100</speed> <duplex>half</duplex> </ethernet> </interface-configuration> </interface-configurations></config>'] | 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) * Kedar Kekan (@kedarX) ansible cisco.iosxr.iosxr_lldp_global – LLDP resource module cisco.iosxr.iosxr\_lldp\_global – LLDP resource module ====================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_lldp_global`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages Global Link Layer Discovery Protocol (LLDP) settings on IOS-XR devices. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | The provided global LLDP configuration. | | | **holdtime** integer | | Specifies the holdtime (in sec) to be sent in packets. | | | **reinit** integer | | Specifies the delay (in sec) for LLDP initialization on any interface. | | | **subinterfaces** boolean | **Choices:*** no * yes | Enable or disable LLDP over sub-interfaces. | | | **timer** integer | | Specifies the rate at which LLDP packets are sent (in sec). | | | **tlv\_select** dictionary | | Specifies the LLDP TLVs to enable or disable. | | | | **management\_address** boolean | **Choices:*** no * yes | Enable or disable management address TLV. | | | | **port\_description** boolean | **Choices:*** no * yes | Enable or disable port description TLV. | | | | **system\_capabilities** boolean | **Choices:*** no * yes | Enable or disable system capabilities TLV. | | | | **system\_description** boolean | **Choices:*** no * yes | Enable or disable system description TLV. | | | | **system\_name** boolean | **Choices:*** no * yes | Enable or disable system name TLV. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOS-XR device by executing the command **show running-config lldp**. 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 * deleted * parsed * gathered * rendered | The state of the configuration after module completion. | Notes ----- Note * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). Examples -------- ``` # Using merged # # # ------------- # Before State # ------------- # # # RP/0/0/CPU0:an-iosxr#sh run lldp # Tue Aug 6 19:27:54.933 UTC # % No such configuration item(s) # # - name: Merge provided LLDP configuration with the existing configuration cisco.iosxr.iosxr_lldp_global: config: holdtime: 100 reinit: 2 timer: 3000 subinterfaces: true tlv_select: management_address: false system_description: false state: merged # # # ------------------------ # Module Execution Result # ------------------------ # # "before": {} # # "commands": [ # "lldp subinterfaces enable", # "lldp holdtime 100", # "lldp reinit 2", # "lldp tlv-select system-description disable", # "lldp tlv-select management-address disable", # "lldp timer 3000" # ] # # "after": { # "holdtime": 100, # "reinit": 2, # "subinterfaces": true, # "timer": 3000, # "tlv_select": { # "management_address": false, # "system_description": false # } # } # # # ------------ # After state # ------------ # # # RP/0/0/CPU0:an-iosxr#sh run lldp # Tue Aug 6 21:31:10.587 UTC # lldp # timer 3000 # reinit 2 # subinterfaces enable # holdtime 100 # tlv-select # management-address disable # system-description disable # ! # ! # # # Using replaced # # # ------------- # Before State # ------------- # # RP/0/0/CPU0:an-iosxr#sh run lldp # Tue Aug 6 21:31:10.587 UTC # lldp # timer 3000 # reinit 2 # subinterfaces enable # holdtime 100 # tlv-select # management-address disable # system-description disable # ! # ! # # - name: Replace existing LLDP device configuration with provided configuration cisco.iosxr.iosxr_lldp_global: config: holdtime: 100 tlv_select: port_description: false system_description: true management_description: true state: replaced # # # ------------------------ # Module Execution Result # ------------------------ # # "before": { # "holdtime": 100, # "reinit": 2, # "subinterfaces": true, # "timer": 3000, # "tlv_select": { # "management_address": false, # "system_description": false # } # } # # "commands": [ # "no lldp reinit 2", # "no lldp subinterfaces enable", # "no lldp timer 3000", # "no lldp tlv-select management-address disable", # "no lldp tlv-select system-description disable", # "lldp tlv-select port-description disable" # ] # # "after": { # "holdtime": 100, # "tlv_select": { # "port_description": false # } # } # # # ------------ # After state # ------------ # # RP/0/0/CPU0:an-iosxr#sh run lldp # Tue Aug 6 21:53:08.407 UTC # lldp # holdtime 100 # tlv-select # port-description disable # ! # ! # # # Using deleted # # ------------ # Before state # ------------ # # # RP/0/0/CPU0:an-iosxr#sh run lldp # Tue Aug 6 21:31:10.587 UTC # lldp # timer 3000 # reinit 2 # subinterfaces enable # holdtime 100 # tlv-select # management-address disable # system-description disable # ! # ! # # - name: Deleted existing LLDP configurations from the device cisco.iosxr.iosxr_lldp_global: state: deleted # # # ------------------------ # Module Execution Result # ------------------------ # # "before": { # "holdtime": 100, # "reinit": 2, # "subinterfaces": true, # "timer": 3000, # "tlv_select": { # "management_address": false, # "system_description": false # } # }, # # "commands": [ # "no lldp holdtime 100", # "no lldp reinit 2", # "no lldp subinterfaces enable", # "no lldp timer 3000", # "no lldp tlv-select management-address disable", # "no lldp tlv-select system-description disable" # ] # # "after": {} # # # ----------- # After state # ----------- # # RP/0/0/CPU0:an-iosxr#sh run lldp # Tue Aug 6 21:38:31.187 UTC # lldp # ! # # Using parsed: # parsed.cfg # lldp # timer 3000 # reinit 2 # subinterfaces enable # holdtime 100 # tlv-select # management-address disable # system-description disable # ! # ! - name: Convert lldp global config to argspec without connecting to the appliance cisco.iosxr.iosxr_lldp_global: running_config: "{{ lookup('file', './parsed.cfg') }}" state: parsed # ------------------------ # Module Execution Result # ------------------------ # parsed: # holdtime: 100 # reinit: 2 # timer: 3000 # subinterfaces: True # tlv_select: # management_address: False # system_description: False # using gathered: # Device config: # lldp # timer 3000 # reinit 2 # subinterfaces enable # holdtime 100 # tlv-select # management-address disable # system-description disable # ! # ! - name: Gather IOSXR lldp global configuration cisco.iosxr.iosxr_lldp_global: config: state: gathered # ------------------------ # Module Execution Result # ------------------------ # gathered: # holdtime: 100 # reinit: 2 # timer: 3000 # subinterfaces: True # tlv_select: # management_address: False # system_description: False # using rendered: - name: Render platform specific commands from task input using rendered state cisco.iosxr.iosxr_lldp_global: config: holdtime: 100 reinit: 2 timer: 3000 subinterfaces: true tlv_select: management_address: false system_description: false state: rendered # # # ------------------------ # Module Execution Result # ------------------------ # # "rendered": [ # "lldp subinterfaces enable", # "lldp holdtime 100", # "lldp reinit 2", # "lldp tlv-select system-description disable", # "lldp tlv-select management-address disable", # "lldp timer 3000" # ] ``` 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:** ['lldp subinterfaces enable', 'lldp holdtime 100', 'no lldp tlv-select management-address disable'] | ### Authors * Nilashish Chakraborty (@NilashishC)
programming_docs
ansible Cisco.Iosxr 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. ansible cisco.iosxr.iosxr_lag_interfaces – LAG interfaces resource module cisco.iosxr.iosxr\_lag\_interfaces – LAG interfaces resource module =================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_lag_interfaces`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages the attributes of LAG/Ether-Bundle interfaces on IOS-XR devices. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A provided Link Aggregation Group (LAG) configuration. | | | **links** dictionary | | This dict contains configurable options related to LAG/Ether-Bundle links. | | | | **max\_active** integer | | Specifies the limit on the number of links that can be active in the LAG/Ether-Bundle. Refer to vendor documentation for valid values. | | | | **min\_active** integer | | Specifies the minimum number of active links needed to bring up the LAG/Ether-Bundle. Refer to vendor documentation for valid values. | | | **load\_balancing\_hash** string | **Choices:*** dst-ip * src-ip | Specifies the hash function used for traffic forwarded over the LAG/Ether-Bundle. Option 'dst-ip' uses the destination IP as the hash function. Option 'src-ip' uses the source IP as the hash function. | | | **members** list / elements=dictionary | | List of member interfaces for the LAG/Ether-Bundle. | | | | **member** string | | Name of the member interface. | | | | **mode** string | **Choices:*** on * active * passive * inherit | Specifies the mode of the operation for the member interface. Mode 'active' runs LACP in active mode. Mode 'on' does not run LACP over the port. Mode 'passive' runs LACP in passive mode over the port. Mode 'inherit' runs LACP as configured in the bundle. | | | **mode** string | **Choices:*** on * active * passive | LAG mode. Mode 'active' runs LACP in active mode over the port. Mode 'on' does not run LACP over the port. Mode 'passive' runs LACP in passive mode over the port. | | | **name** string / required | | Name/Identifier of the LAG/Ether-Bundle to configure. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOS-XR device by executing the command **show running-config int**. 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 * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). Examples -------- ``` # Using merged # # # ------------ # Before state # ------------ # # RP/0/0/CPU0:iosxr01#show run int # Sun Jul 7 19:42:59.416 UTC # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description "GigabitEthernet - 1" # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # ! # # - name: Merge provided configuration with device configuration cisco.iosxr.iosxr_lag_interfaces: config: - name: Bundle-Ether10 members: - member: GigabitEthernet0/0/0/1 mode: inherit - member: GigabitEthernet0/0/0/3 mode: inherit mode: active links: max_active: 5 min_active: 2 load_balancing_hash: src-ip - name: Bundle-Ether12 members: - member: GigabitEthernet0/0/0/2 mode: passive - member: GigabitEthernet0/0/0/4 mode: passive load_balancing_hash: dst-ip state: merged # # # ----------- # After state # ----------- # # RP/0/0/CPU0:iosxr01#show run int # Sun Jul 7 20:51:17.685 UTC # interface Bundle-Ether10 # lacp mode active # bundle load-balancing hash src-ip # bundle maximum-active links 5 # bundle minimum-active links 2 # ! # interface Bundle-Ether12 # bundle load-balancing hash dst-ip # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # bundle id 12 mode passive # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # bundle id 12 mode passive # ! # # Using replaced # # # ------------- # Before state # ------------- # # # RP/0/0/CPU0:iosxr01#sho run int # Sun Jul 7 20:58:06.527 UTC # interface Bundle-Ether10 # lacp mode active # bundle load-balancing hash src-ip # bundle maximum-active links 5 # bundle minimum-active links 2 # ! # interface Bundle-Ether12 # bundle load-balancing hash dst-ip # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # bundle id 12 mode passive # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # bundle id 12 mode passive # ! # # - name: Replace device configuration of listed Bundles with provided configurations cisco.iosxr.iosxr_lag_interfaces: config: - name: Bundle-Ether12 members: - name: GigabitEthernet0/0/0/2 mode: passive - name: Bundle-Ether11 members: - name: GigabitEthernet0/0/0/4 load_balancing_hash: src-ip state: replaced # # # ----------- # After state # ----------- # # # RP/0/0/CPU0:iosxr01#sh run int # Sun Jul 7 21:22:27.397 UTC # interface Bundle-Ether10 # lacp mode active # bundle load-balancing hash src-ip # bundle maximum-active links 5 # bundle minimum-active links 2 # ! # interface Bundle-Ether11 # bundle load-balancing hash src-ip # ! # interface Bundle-Ether12 # lacp mode passive # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # bundle id 12 mode on # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # bundle id 11 mode on # ! # # # Using overridden # # # ------------ # Before state # ------------ # # # RP/0/0/CPU0:iosxr01#sh run int # Sun Jul 7 21:22:27.397 UTC # interface Bundle-Ether10 # lacp mode active # bundle load-balancing hash src-ip # bundle maximum-active links 5 # bundle minimum-active links 2 # ! # interface Bundle-Ether11 # bundle load-balancing hash src-ip # ! # interface Bundle-Ether12 # lacp mode passive # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # bundle id 12 mode on # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # bundle id 11 mode on # ! # # - name: Overrides all device configuration with provided configuration cisco.iosxr.iosxr_lag_interfaces: config: - name: Bundle-Ether10 members: - member: GigabitEthernet0/0/0/1 mode: inherit - member: GigabitEthernet0/0/0/2 mode: inherit mode: active load_balancing_hash: dst-ip state: overridden # # # ------------ # After state # ------------ # # # RP/0/0/CPU0:iosxr01#sh run int # Sun Jul 7 21:43:04.802 UTC # interface Bundle-Ether10 # lacp mode active # bundle load-balancing hash dst-ip # ! # interface Bundle-Ether11 # ! # interface Bundle-Ether12 # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # ! # # # Using deleted # # # ------------ # Before state # ------------ # # RP/0/0/CPU0:iosxr01#sh run int # Sun Jul 7 21:22:27.397 UTC # interface Bundle-Ether10 # lacp mode active # bundle load-balancing hash src-ip # bundle maximum-active links 5 # bundle minimum-active links 2 # ! # interface Bundle-Ether11 # bundle load-balancing hash src-ip # ! # interface Bundle-Ether12 # lacp mode passive # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # bundle id 12 mode on # !n # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # bundle id 11 mode on # ! # # - name: Delete attributes of given bundles and removes member interfaces from them (Note - This won't delete the bundles themselves) cisco.iosxr.iosxr_lag_interfaces: config: - name: Bundle-Ether10 - name: Bundle-Ether11 - name: Bundle-Ether12 state: deleted # # # ------------ # After state # ------------ # # RP/0/0/CPU0:iosxr01#sh run int # Sun Jul 7 21:49:50.004 UTC # interface Bundle-Ether10 # ! # interface Bundle-Ether11 # ! # interface Bundle-Ether12 # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # ! # # # Using deleted (without config) # # # ------------ # Before state # ------------ # # RP/0/0/CPU0:an-iosxr#sh run int # Sun Aug 18 19:49:51.908 UTC # interface Bundle-Ether10 # lacp mode active # bundle load-balancing hash src-ip # bundle maximum-active links 10 # bundle minimum-active links 2 # ! # interface Bundle-Ether11 # bundle load-balancing hash dst-ip # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/0 # shutdown # ! # interface GigabitEthernet0/0/0/1 # bundle id 10 mode inherit # shutdown # ! # interface GigabitEthernet0/0/0/2 # bundle id 10 mode passive # shutdown # ! # interface GigabitEthernet0/0/0/3 # bundle id 11 mode passive # shutdown # ! # interface GigabitEthernet0/0/0/4 # bundle id 11 mode passive # shutdown # ! # - name: Delete attributes of all bundles and removes member interfaces from them (Note - This won't delete the bundles themselves) cisco.iosxr.iosxr_lag_interfaces: state: deleted # # # ------------ # After state # ------------ # # # RP/0/0/CPU0:an-iosxr#sh run int # Sun Aug 18 19:54:22.389 UTC # interface Bundle-Ether10 # ! # interface Bundle-Ether11 # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 10.8.38.69 255.255.255.0 # ! # interface GigabitEthernet0/0/0/0 # shutdown # ! # interface GigabitEthernet0/0/0/1 # shutdown # ! # interface GigabitEthernet0/0/0/2 # shutdown # ! # interface GigabitEthernet0/0/0/3 # shutdown # ! # interface GigabitEthernet0/0/0/4 # shutdown # ! # Using parsed: # parsed.cfg # interface Bundle-Ether10 # lacp mode active # bundle load-balancing hash src-ip # bundle maximum-active links 5 # bundle minimum-active links 2 # ! # interface Bundle-Ether12 # bundle load-balancing hash dst-ip # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # bundle id 12 mode passive # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # bundle id 12 mode passive # ! # - name: Convert lag interfaces config to argspec without connecting to the appliance cisco.iosxr.iosxr_lag_interfaces: running_config: "{{ lookup('file', './parsed.cfg') }}" state: parsed # -------------- # Output # -------------- # parsed: # - name: Bundle-Ether10 # members: # - member: GigabitEthernet0/0/0/1 # mode: inherit # - member: GigabitEthernet0/0/0/3 # mode: inherit # mode: active # links: # max_active: 5 # min_active: 2 # load_balancing_hash: src-ip # - name: Bundle-Ether12 # members: # - member: GigabitEthernet0/0/0/2 # mode: passive # - member: GigabitEthernet0/0/0/4 # mode: passive # load_balancing_hash: dst-ip # using gathered # Device Config: # ------------- # interface Bundle-Ether10 # lacp mode active # bundle load-balancing hash src-ip # bundle maximum-active links 5 # bundle minimum-active links 2 # ! # interface Bundle-Ether12 # bundle load-balancing hash dst-ip # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # bundle id 12 mode passive # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # bundle id 10 mode inherit # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # bundle id 12 mode passive # ! # - name: Gather IOSXR lag interfaces configuration cisco.iosxr.iosxr_lag_interfaces: config: state: gathered # -------------- # Output # -------------- # gathered: # - name: Bundle-Ether10 # members: # - member: GigabitEthernet0/0/0/1 # mode: inherit # - member: GigabitEthernet0/0/0/3 # mode: inherit # mode: active # links: # max_active: 5 # min_active: 2 # load_balancing_hash: src-ip # - name: Bundle-Ether12 # members: # - member: GigabitEthernet0/0/0/2 # mode: passive # - member: GigabitEthernet0/0/0/4 # mode: passive # load_balancing_hash: dst-ip # Using rendered: - name: Render platform specific commands from task input using rendered state cisco.iosxr.iosxr_lag_interfaces: config: - name: Bundle-Ether10 members: - member: GigabitEthernet0/0/0/1 mode: inherit - member: GigabitEthernet0/0/0/3 mode: inherit mode: active links: max_active: 5 min_active: 2 load_balancing_hash: src-ip - name: Bundle-Ether12 members: - member: GigabitEthernet0/0/0/2 mode: passive - member: GigabitEthernet0/0/0/4 mode: passive load_balancing_hash: dst-ip state: rendered # Output: # rendered: # [ # - "interface Bundle-Ether10" # - " lacp mode active" # - " bundle load-balancing hash src-ip" # - " bundle maximum-active links 5" # - " bundle minimum-active links 2" # - "interface Bundle-Ether12" # - " bundle load-balancing hash dst-ip" # - "interface Loopback888" # - " description test for ansible" # - " shutdown" # - "interface MgmtEth0/0/CPU0/0" # - " ipv4 address 192.0.2.11 255.255.255.0" # - "interface GigabitEthernet0/0/0/1" # - " description 'GigabitEthernet - 1"" # - " bundle id 10 mode inherit" # - "interface GigabitEthernet0/0/0/2" # - " description "GigabitEthernet - 2"" # - " bundle id 12 mode passive" # - "interface GigabitEthernet0/0/0/3" # - " description "GigabitEthernet - 3"" # - " bundle id 10 mode inherit" # - "interface GigabitEthernet0/0/0/4" # - " description "GigabitEthernet - 4"" # - " bundle id 12 mode passive" # ] # # ``` 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 Bundle-Ether10', 'bundle minimum-active links 2', 'bundle load-balancing hash src-ip'] | ### Authors * Nilashish Chakraborty (@NilashishC)
programming_docs
ansible cisco.iosxr.iosxr_ospfv2 – OSPFv2 resource module cisco.iosxr.iosxr\_ospfv2 – OSPFv2 resource module ================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_ospfv2`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages global OSPFv2 configuration on devices running Cisco IOS-XR Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | A list of OSPFv2 process configuration | | | **processes** list / elements=dictionary | | A list of OSPFv2 instances configuration | | | | **address\_family\_unicast** boolean | **Choices:*** no * yes | Enable unicast topology for ipv4 address family | | | | **adjacency\_stagger** dictionary | | Stagger OSPFv2 adjacency bring up | | | | | **disable** boolean | **Choices:*** no * yes | Disable stagger OSPFv2 adjacency | | | | | **max\_adjacency** integer | | Maximum simultaneous neighbors to bring up | | | | | **min\_adjacency** integer | | Initial number of neighbors to bring up per area (default 2) | | | | **apply\_weight** dictionary | | Enable weights configured under interfaces for load sharing | | | | | **bandwidth** integer | | Reference bandwidth to use for calculation (Mbits/sec) | | | | | **default\_weight** integer | | Specify default weight value to use when it is not configured under interface | | | | **areas** list / elements=dictionary | | Configure OSPFv2 areas' properties | | | | | **area\_id** string / required | | Area ID as IP address or integer | | | | | **authentication** dictionary | | Enable authentication | | | | | | **keychain** string | | Specify keychain name | | | | | | **message\_digest** dictionary | | Use message-digest authentication | | | | | | | **keychain** string | | Specify keychain name | | | | | | **no\_auth** boolean | **Choices:*** no * yes | Use no authentication | | | | | **authentication\_key** dictionary | | Used to mention authentication password (key) | | | | | | **clear** string | | Specifies an UNENCRYPTED password (key) will follow | | | | | | **encrypted** string | | Specifies an ENCRYPTED password (key) will follow | | | | | | **password** string | | The OSPFv2 password (key) | | | | | **bfd** dictionary | | Configure BFD parameters | | | | | | **fast\_detect** dictionary | | Configure fast detection | | | | | | | **set** boolean | **Choices:*** no * yes | Enable fast detection only | | | | | | | **strict\_mode** boolean | **Choices:*** no * yes | Hold down neighbor session until BFD session is up | | | | | | **minimum\_interval** integer | | Hello interval in milli-seconds | | | | | | **multiplier** integer | | Detect multiplier | | | | | **cost** integer | | Interface cost | | | | | **dead\_interval** integer | | Interval after which a neighbor is declared dead | | | | | **default\_cost** integer | | Set the summary default-cost of a NSSA/stub area. Stub's advertised external route metric | | | | | **hello\_interval** integer | | Time between HELLO packets | | | | | **mpls** dictionary | | Configure MPLS routing protocol parameters | | | | | | **ldp** dictionary | | Configure LDP parameters | | | | | | | **auto\_config** boolean | **Choices:*** no * yes | Enable LDP IGP interface auto-configuration | | | | | | | **sync** boolean | **Choices:*** no * yes | Enable LDP IGP synchronization | | | | | | | **sync\_igp\_shortcuts** boolean | **Choices:*** no * yes | LDP sync for igp-shortcut tunnels | | | | | | **traffic\_eng** boolean | **Choices:*** no * yes | Configure an ospf area to run MPLS Traffic Engineering | | | | | **mtu\_ignore** string | **Choices:*** enable * disable | Enable/Disable ignoring of MTU in DBD packets | | | | | **nssa** dictionary | | NSSA settings for the area | | | | | | **default\_information\_originate** dictionary | | Originate default Type 7 LSA | | | | | | | **metric** integer | | OSPFv2 default metric | | | | | | | **metric\_type** integer | | Metric type for default routes | | | | | | **no\_redistribution** boolean | **Choices:*** no * yes | Do not send redistributed LSAs into NSSA area | | | | | | **no\_summary** boolean | **Choices:*** no * yes | Do not send summary LSAs into NSSA area | | | | | | **set** boolean | **Choices:*** no * yes | Configure area as NSSA | | | | | | **translate** dictionary | | Translate LSA | | | | | | | **type7** dictionary | | Translate from Type 7 to Type 5 | | | | | | | | **always** boolean | **Choices:*** no * yes | Always translate LSAs | | | | | **ranges** list / elements=dictionary | | Summarize routes matching address/mask (border routers only) | | | | | | **address** string / required | | IP in Prefix format (x.x.x.x/len) | | | | | | **advertise** boolean | **Choices:*** no * yes | Advertise this range (default) | | | | | | **not\_advertise** boolean | **Choices:*** no * yes | DoNotAdvertise this range | | | | | **route\_policy** list / elements=dictionary | | Specify the route-policy to filter type 3 LSAs (list can have one inbound and/or one outbound policy only) | | | | | | **direction** string | **Choices:*** in * out | Specify inbound or outbound | | | | | | **parameters** list / elements=string | | Specify parameter values for the policy | | | | | **stub** dictionary | | Settings for configuring the area as a stub | | | | | | **no\_summary** boolean | **Choices:*** no * yes | Do not send summary LSA into stub area | | | | | | **set** boolean | **Choices:*** no * yes | Configure the area as a stub | | | | | **transmit\_delay** integer | | Estimated time needed to send link-state update packet | | | | | **virtual\_link** list / elements=dictionary | | Define a virtual link | | | | | | **authentication** dictionary | | Enable authentication | | | | | | | **keychain** string | | Specify keychain name | | | | | | | **message\_digest** dictionary | | Use message-digest authentication | | | | | | | | **keychain** string | | Specify keychain name | | | | | | | **no\_auth** boolean | **Choices:*** no * yes | Use no authentication | | | | | | **authentication\_key** dictionary | | Used to mention authentication password (key) | | | | | | | **clear** string | | Specifies an UNENCRYPTED password (key) will follow | | | | | | | **encrypted** string | | Specifies an ENCRYPTED password (key) will follow | | | | | | | **password** string | | The OSPFv2 password (key) | | | | | | **dead\_interval** integer | | Interval after which a neighbor is declared dead | | | | | | **hello\_interval** integer | | Time between HELLO packets | | | | | | **id** string / required | | Router-ID of virtual link neighbor (A.B.C.D) | | | | | | **message\_digest\_key** dictionary | | Message digest authentication password (key) | | | | | | | **id** integer / required | | Key ID (1-255) | | | | | | | **md5** dictionary | | Use MD5 Algorithm | | | | | | | | **clear** boolean | **Choices:*** no * yes | Specifies an UNENCRYPTED password (key) will follow | | | | | | | | **encrypted** boolean | **Choices:*** no * yes | Specifies an ENCRYPTED password (key) will follow | | | | | | | | **password** string | | The OSPFv2 password (key) | | | | | | **retransmit\_interval** integer | | Delay between LSA retransmissions | | | | | | **transmit\_delay** integer | | Link state transmit delay | | | | **authentication** dictionary | | Enable authentication | | | | | **keychain** string | | Specify keychain name | | | | | **message\_digest** dictionary | | Use message-digest authentication | | | | | | **keychain** string | | Specify keychain name | | | | | | **set** boolean | **Choices:*** no * yes | Specify message-digest selection | | | | | **no\_auth** boolean | **Choices:*** no * yes | Use no authentication | | | | **authentication\_key** dictionary | | Used to mention authentication password (key) | | | | | **clear** boolean | **Choices:*** no * yes | Specifies an UNENCRYPTED password (key) will follow | | | | | **encrypted** boolean | **Choices:*** no * yes | Specifies an ENCRYPTED password (key) will follow | | | | | **password** string | | The OSPFv2 password (key) | | | | **auto\_cost** dictionary | | Calculate OSPFv2 interface cost according to bandwidth | | | | | **disable** boolean | **Choices:*** no * yes | Assign OSPFv2 cost based on interface type | | | | | **reference\_bandwidth** integer | | Specify reference bandwidth in megabits per sec | | | | **bfd** dictionary | | Configure BFD parameters | | | | | **fast\_detect** dictionary | | Configure fast detection | | | | | | **set** boolean | **Choices:*** no * yes | Enable fast detection only | | | | | | **strict\_mode** boolean | **Choices:*** no * yes | Hold down neighbor session until BFD session is up | | | | | **minimum\_interval** integer | | Hello interval in milli-seconds | | | | | **multiplier** integer | | Detect multiplier | | | | **capability** dictionary | | Enable specific OSPFv2 feature | | | | | **opaque** dictionary | | Configure opaque LSA | | | | | | **disable** boolean | **Choices:*** no * yes | Disable Opaque LSA capability | | | | | | **set** boolean | **Choices:*** no * yes | Enable opaque LSA | | | | | **type7** string | | NSSA capability | | | | **cost** integer | | Interface cost (1-65535) | | | | **database\_filter** string | **Choices:*** enable * disable | Filter OSPFv2 LSA during synchronization and flooding (all outgoing LSA). Enable/Disable filtering | | | | **dead\_interval** integer | | Interval after which a neighbor is declared dead | | | | **default\_information\_originate** dictionary | | Distribute default route | | | | | **always** boolean | **Choices:*** no * yes | Always advertise default route | | | | | **metric** integer | | OSPFv2 default metric | | | | | **metric\_type** integer | | OSPFv2 metric type for default routes | | | | | **route\_policy** string | | Apply route-policy to default-information origination | | | | | **set** boolean | **Choices:*** no * yes | Enable distribution of default route | | | | **default\_metric** integer | | Set metric of redistributed routes | | | | **demand\_circuit** string | **Choices:*** enable * disable | Enable/Disable OSPFv2 demand circuit | | | | **distance** dictionary | | Define an administrative distance | | | | | **admin\_distance** list / elements=dictionary | | Administrative distance | | | | | | **access\_list** string | | Access list name | | | | | | **source** string | | Source IP address | | | | | | **value** integer | | Distance value | | | | | | **wildcard** string | | IP wild card bits (A.B.C.D) | | | | | **ospf\_distance** dictionary | | OSPFv2 administrative distance | | | | | | **external** integer | | Distance for external routes | | | | | | **inter\_area** integer | | Distance for inter-area routes | | | | | | **intra\_area** integer | | Distance for intra-area routes | | | | **distribute\_bgp\_ls** dictionary | | Enable Distribution of LSAs to external services | | | | | **instance\_id** integer | | Set distribution process instance identifier | | | | | **throttle** integer | | Throttle time between successive LSA updates | | | | **distribute\_link\_state** dictionary | | Enable Distribution of LSAs to external services | | | | | **instance\_id** integer | | Set distribution process instance identifier | | | | | **throttle** integer | | Throttle time between successive LSA updates | | | | **distribute\_list** list / elements=dictionary | | Filter networks in routing updates (list can have one inbound and/or one outbound policy only) | | | | | **access\_list** string | | Inbound/outbound access-list | | | | | **direction** string | **Choices:*** in * out | Filter incoming/outgoing routing updates | | | | | **outgoing\_params** dictionary | | Specify additional parameters for outgoing updates only | | | | | | **id** string | | For BGP, specify AS number. 2-byte AS number (or) 4-byte AS number in asdot (X.Y) format (or) 4-byte AS number in asplain format For OSPF, specify OSPFv2 instance name | | | | | | **route\_type** string | **Choices:*** bgp * connected * dagr * ospf * static | Type of routes | | | | | **route\_policy** string | | Route Policy to filter OSPFv2 prefixes (for incoming updates only) | | | | **external\_out** string | **Choices:*** enable * disable | Enable/Disable advertisement of intra-area prefixes as external | | | | **flood\_reduction** string | **Choices:*** enable * disable | Enable/Disable OSPFv2 Flood Reduction | | | | **hello\_interval** integer | | Time between HELLO packets (<1-65535> seconds) | | | | **ignore\_lsa\_mospf** boolean | **Choices:*** no * yes | Do not complain upon receiving MOSPFv2 Type 6 LSA | | | | **link\_down\_fast\_detect** boolean | **Choices:*** no * yes | Enable fast or early detection of link-down events | | | | **log\_adjacency\_changes** dictionary | | Log adjacency state changes | | | | | **detail** boolean | **Choices:*** no * yes | Log all state changes | | | | | **disable** boolean | **Choices:*** no * yes | Disable log adjacency changes | | | | | **set** boolean | **Choices:*** no * yes | Set log adjacency | | | | **loopback\_stub\_network** string | **Choices:*** enable * disable | Advertise loopback as a stub network | | | | **max\_lsa** dictionary | | Feature to limit the number of non-self-originated LSAs | | | | | **ignore\_count** integer | | Set count on how many times adjacencies can be suppressed | | | | | **ignore\_time** integer | | Set number of minutes during which all adjacencies are suppressed | | | | | **reset\_time** integer | | Set number of minutes after which ignore-count is reset to zero | | | | | **threshold** integer | | Threshold value (%) at which to generate a warning message | | | | | **warning\_only** boolean | **Choices:*** no * yes | Log a warning message when limit is exceeded | | | | **max\_metric** dictionary | | Set maximum metric | | | | | **router\_lsa** dictionary | | Maximum metric in self-originated router-LSAs | | | | | | **external\_lsa** dictionary | | External LSA configuration | | | | | | | **max\_metric\_value** integer | | Set max metric value for external LSAs | | | | | | | **set** boolean | **Choices:*** no * yes | Set external-lsa attribute | | | | | | **include\_stub** boolean | **Choices:*** no * yes | Advertise Max metric for Stub links as well | | | | | | **on\_startup** dictionary | | Effective only at startup | | | | | | | **set** boolean | **Choices:*** no * yes | Set on-startup attribute | | | | | | | **wait\_for\_bgp\_asn** integer | | ASN of BGP to wait for | | | | | | | **wait\_period** integer | | Wait period in seconds after startup | | | | | | **set** boolean | **Choices:*** no * yes | Set router-lsa attribute | | | | | | **summary\_lsa** dictionary | | Summary LSAs configuration | | | | | | | **max\_metric\_value** integer | | Max metric value for summary LSAs | | | | | | | **set** boolean | **Choices:*** no * yes | Set summary-lsa attribute | | | | **message\_digest\_key** dictionary | | Message digest authentication password (key) | | | | | **id** integer / required | | Key ID | | | | | **md5** dictionary / required | | Use MD5 Algorithm | | | | | | **clear** boolean | **Choices:*** no * yes | Specifies an UNENCRYPTED password (key) will follow | | | | | | **encrypted** boolean | **Choices:*** no * yes | Specifies an ENCRYPTED password (key) will follow | | | | | | **password** string | | The OSPFv2 password (key) | | | | **microloop\_avoidance** dictionary | | Avoid microloops | | | | | **protected** boolean | **Choices:*** no * yes | Avoid microloops for protected prefixes only) | | | | | **rib\_update\_delay** integer | | Delay to introduce between SPF and RIB updates | | | | | **segment\_routing** boolean | **Choices:*** no * yes | Enable segment routing microloop avoidance | | | | **monitor\_convergence** dictionary | | Enables OSPFv2 route convergence monitoring | | | | | **prefix\_list** string | | Enables Individual Prefix Monitoring | | | | | **track\_external\_routes** boolean | **Choices:*** no * yes | Enables Tracking External(Type-5/7) Prefix monitoring | | | | | **track\_ip\_frr** boolean | **Choices:*** no * yes | Enables Tracking IP-Frr Convergence | | | | | **track\_summary\_routes** boolean | **Choices:*** no * yes | Enables Tracking Summary(Inter-Area) Prefix monitoring | | | | **mpls** dictionary | | Configure MPLS routing protocol parameters | | | | | **ldp** dictionary | | Configure LDP parameters | | | | | | **auto\_config** boolean | **Choices:*** no * yes | Enable LDP IGP interface auto-configuration | | | | | | **sync** boolean | **Choices:*** no * yes | Enable LDP IGP synchronization | | | | | | **sync\_igp\_shortcuts** boolean | **Choices:*** no * yes | LDP sync for igp-shortcut tunnels | | | | | **traffic\_eng** dictionary | | Routing protocol commands for MPLS Traffic Engineering | | | | | | **autoroute\_exclude** dictionary | | Exclude IP address destinations from using TE tunnels | | | | | | | **parameters** list / elements=string | | Specify parameter values for the policy | | | | | | | **route\_policy** string | | Policy name | | | | | | **igp\_intact** boolean | **Choices:*** no * yes | Retain one or more IPv4 nexthops with tunnel nexthops | | | | | | **ldp\_sync\_update** boolean | **Choices:*** no * yes | Enable LDP sync induced metric propagation | | | | | | **multicast\_intact** boolean | **Choices:*** no * yes | Publish multicast-intact paths to RIB | | | | | | **router\_id** string | | Traffic Engineering stable IP address for system | | | | **mtu\_ignore** string | **Choices:*** enable * disable | Enable/Disable ignoring of MTU in DBD packets | | | | **network** dictionary | | Network type | | | | | **broadcast** boolean | **Choices:*** no * yes | Specify OSPFv2 broadcast multi-access network | | | | | **non\_broadcast** boolean | **Choices:*** no * yes | Specify OSPFv2 NBMA network | | | | | **point\_to\_multipoint** boolean | **Choices:*** no * yes | Specify OSPFv2 point-to-multipoint network | | | | | **point\_to\_point** boolean | **Choices:*** no * yes | Specify OSPFv2 point-to-point network | | | | **nsf** dictionary | | Non-stop forwarding | | | | | **cisco** dictionary | | Cisco Non-stop forwarding | | | | | | **enforce\_global** boolean | **Choices:*** no * yes | Cancel NSF restart when non-NSF-aware neighbors detected for the whole OSPFv2 process | | | | | | **set** boolean | **Choices:*** no * yes | Enable Cisco NSF | | | | | **flush\_delay\_time** integer | | Maximum time allowed for external route learning | | | | | **ietf** dictionary | | IETF graceful restart | | | | | | **helper\_disable** boolean | **Choices:*** no * yes | Disable router's helper support level | | | | | | **set** boolean | **Choices:*** no * yes | Only enable ietf option | | | | | **interval** integer | | Minimum interval between NSF restarts (<90-3600> seconds) | | | | | **lifetime** integer | | Maximum route lifetime following restart (<90-1800> seconds) | | | | **nsr** boolean | **Choices:*** no * yes | Enable NSR for all VRFs in this process. 'False' option to disable NSR for all VRFs in this process | | | | **packet\_size** integer | | Size of OSPFv2 packets to use. min=576 max=MTU bytes | | | | **passive** string | **Choices:*** enable * disable | Enable/Disable passive | | | | **prefix\_suppression** dictionary | | Suppress advertisement of the prefixes | | | | | **secondary\_address** boolean | **Choices:*** no * yes | Enable/Disable secondary address suppression | | | | | **set** boolean | **Choices:*** no * yes | Set the suppression option | | | | **priority** integer | | Router priority | | | | **process\_id** string / required | | The OSPFv2 Process ID | | | | **protocol\_shutdown** dictionary | | Protocol specific configuration | | | | | **host\_mode** boolean | **Choices:*** no * yes | Only traffic destined for this box allowed(cisco-support) | | | | | **limit** dictionary | | High watermark for incoming priority events | | | | | | **high** integer | | Hello events are dropped when incoming event queue exceeds this value | | | | | | **low** integer | | DBD/LS Update/Req packets are dropped when incoming event queue exceeds this value | | | | | | **medium** integer | | LSA ACKs are dropped when incoming event queue exceeds this value | | | | | **on\_reload** boolean | **Choices:*** no * yes | Shutdown post reload only | | | | | **set** boolean | **Choices:*** no * yes | Shutdown the OSPFv2 Protocol | | | | **redistribute** dictionary | | Redistribute information from another routing Protocol | | | | | **id** string | | OnePK application name for application routes (or) AS number for bgp and eigrp (or) instance name for isis and ospf | | | | | **level** integer | **Choices:*** 1 * 2 * 12 | ISIS levels | | | | | **lsa\_type\_summary** boolean | **Choices:*** no * yes | LSA type 3 for redistributed routes | | | | | **match** string | | Redistribution of routes. For OSPFv2 - external/internal/nssa-external 1/2. For EIGRP - external/internal | | | | | **metric** integer | | Metric for redistributed routes | | | | | **metric\_type** integer | **Choices:*** 1 * 2 | OSPFv2 exterior metric type for redistributed routes | | | | | **nssa\_only** boolean | **Choices:*** no * yes | Redistribute to NSSA areas only | | | | | **preserve\_med** boolean | **Choices:*** no * yes | Preserve med of BGP routes | | | | | **route\_policy** dictionary | | Apply route-policy to redistribution | | | | | | **name** string | | Name of the policy | | | | | | **parameters** list / elements=string | | Specify parameter values for the policy | | | | | **route\_type** string | **Choices:*** application * bgp * connected * dagr * eigrp * isis * mobile * ospf * rip * static * subscriber | Route type to redistribute | | | | | **tag** integer | | Set tag for routes redistributed into OSPFv2 | | | | **retransmit\_interval** integer | | Delay between LSA retransmissions | | | | **router\_id** string | | OSPFv2 router-id in IPv4 address format (A.B.C.D) | | | | **security\_ttl** dictionary | | Enable security | | | | | **hops** integer | | Maximum number of IP hops allowed <1-254> | | | | | **set** boolean | **Choices:*** no * yes | Enable ttl security | | | | **summary\_in** string | **Choices:*** enable * disable | Enable/Disable advertisement of external prefixes as inter-area | | | | **summary\_prefix** list / elements=dictionary | | Configure IP address summaries | | | | | **not\_advertise** boolean | **Choices:*** no * yes | Suppress routes that match the specified prefix/mask pair | | | | | **prefix** string / required | | IP summary address/mask (A.B.C.D/prefix) | | | | | **tag** integer | | Set tag | | | | **timers** dictionary | | Configure timer related constants | | | | | **graceful\_shutdown** dictionary | | Timers for graceful shutdown(cisco-support) | | | | | | **initial\_delay** integer | | Delay before starting graceful shutdown | | | | | | **retain\_routes** integer | | Time to keep routes active after graceful shutdown | | | | | **lsa** dictionary | | OSPFv2 global LSA timers | | | | | | **group\_pacing** integer | | OSPFv2 LSA group pacing timer. Interval between group of LSA being refreshed or maxaged | | | | | | **min\_arrival** integer | | OSPFv2 MinLSArrival timer. The minimum interval in millisec between accepting the same LSA | | | | | | **refresh** integer | | OSPFv2 LSA refresh interval. How often self-originated LSAs should be refreshed, in seconds | | | | | **pacing\_flood** integer | | OSPFv2 flood pacing timer. Interval in msec to pace flooding on all interfaces | | | | | **throttle** dictionary | | OSPFv2 throttle timers | | | | | | **fast\_reroute** integer | | Fast-reroute throttle timer. Delay between end of SPF and start of the fast-reroute computation in milliseconds | | | | | | **lsa\_all** dictionary | | LSA throttle timers for all types of OSPFv2 LSAs | | | | | | | **initial\_delay** integer | | Delay to generate first occurance of LSA in milliseconds | | | | | | | **max\_delay** integer | | Maximum delay between originating the same LSA in milliseconds | | | | | | | **min\_delay** integer | | Minimum delay between originating the same LSA in milliseconds | | | | | | **spf** dictionary | | OSPFv2 SPF throttle timers | | | | | | | **change\_delay** integer | | Delay between receiving a change to SPF calculation in milliseconds | | | | | | | **max\_wait** integer | | Maximum wait time in milliseconds for SPF calculations | | | | | | | **second\_delay** integer | | Delay between first and second SPF calculation in milliseconds | | | | **transmit\_delay** integer | | Estimated time needed to send link-state update packet | | | | **weight** integer | | Interface weight | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOS-XR device by executing the command **show running-config router ospf**. 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 * deleted * parsed * gathered * rendered * overridden | The state the configuration should be left in. | Notes ----- Note * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr) Examples -------- ``` # Using merged # Before state: # ------------- # # RP/0/RP0/CPU0:anton#show running-config router ospf # Thu Jun 11 15:54:44.569 UTC # % No such configuration item(s) # - name: Merge provided OSPFv2 configuration with the existing configuration cisco.iosxr.iosxr_ospfv2: config: processes: - process_id: '27' areas: - area_id: '10' hello_interval: 2 authentication: keychain: ansi11393 - process_id: '26' adjacency_stagger: max_adjacency: 20 min_adjacency: 10 - process_id: '10' authentication: keychain: ansible_test1102 areas: - area_id: '11' default_cost: 5 cost: 11 - area_id: 22 default_cost: 6 - process_id: '30' areas: - area_id: 11 default_cost: 5 - area_id: 22 default_cost: 6 cost: 2 default_metric: 10 transmit_delay: 2 hello_interval: 1 dead_interval: 2 retransmit_interval: 2 weight: 2 packet_size: 577 priority: 1 router_id: 2.2.2.2 demand_circuit: enable passive: disable summary_in: enable flood_reduction: disable mtu_ignore: enable external_out: disable state: merged # # # ------------------------ # Module Execution Result # ------------------------ # # "before": {} # # "commands": [ # "router ospf 30", # "cost 2", # "weight 2", # "passive disable", # "priority 1", # "flood-reduction disable", # "default-metric 10", # "router-id 2.2.2.2", # "demand-circuit enable", # "packet-size 577", # "transmit-delay 2", # "summary-in enable", # "external-out disable", # "dead-interval 2", # "hello-interval 1", # "retransmit-interval 2", # "mtu-ignore enable", # "area 11 default-cost 5", # "area 22 default-cost 6", # "router ospf 26", # "adjacency stagger 10 20", # "authentication message-digest keychain ansible1101pass", # "router ospf 27", # "area 10 authentication keychain ansi11393", # "area 10 hello-interval 2", # "router ospf 10", # "authentication keychain ansible_test1102", # "area 11 default-cost 5", # "area 11 cost 11", # "area 22 default-cost 6" # ] # # "after": { # "processes": [ # { # "areas": [ # { # "area_id": "11", # "cost": 11, # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "authentication": { # "keychain": "ansible_test1102" # }, # "process_id": "10" # }, # { # "adjacency_stagger": { # "max_adjacency": 20, # "min_adjacency": 10 # }, # "authentication": { # "message_digest": { # "keychain": "ansible1101pass" # } # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "authentication": { # "keychain": "ansi11393" # }, # "hello_interval": 2 # } # ], # "process_id": "27" # }, # { # "areas": [ # { # "area_id": "11", # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "cost": 2, # "dead_interval": 2, # "default_metric": 10, # "demand_circuit": "enable", # "external_out": "disable", # "flood_reduction": "disable", # "hello_interval": 1, # "mtu_ignore": "enable", # "packet_size": 577, # "passive": "disable", # "priority": 1, # "process_id": "30", # "retransmit_interval": 2, # "router_id": "2.2.2.2", # "summary_in": "enable", # "transmit_delay": 2, # "weight": 2 # } # ] # } # # # ------------ # After state # ------------ # # RP/0/RP0/CPU0:anton#show running-config router ospf # Thu Jun 11 16:06:44.406 UTC # router ospf 10 # authentication keychain ansible_test1102 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospf 26 # authentication message-digest keychain ansible1101pass # adjacency stagger 10 20 # ! # router ospf 27 # area 10 # authentication keychain ansi11393 # hello-interval 2 # ! # ! # router ospf 30 # router-id 2.2.2.2 # summary-in enable # external-out disable # cost 2 # packet-size 577 # weight 2 # passive disable # priority 1 # mtu-ignore enable # flood-reduction disable # dead-interval 2 # retransmit-interval 2 # demand-circuit enable # hello-interval 1 # transmit-delay 2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # # Using replaced # # ------------ # Before state # ------------ # # # RP/0/RP0/CPU0:anton#show running-config router ospf # Thu Jun 11 16:06:44.406 UTC # router ospf 10 # authentication keychain ansible_test1102 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospf 26 # authentication message-digest keychain ansible1101pass # adjacency stagger 10 20 # ! # router ospf 27 # area 10 # authentication keychain ansi11393 # hello-interval 2 # ! # ! # router ospf 30 # router-id 2.2.2.2 # summary-in enable # external-out disable # cost 2 # packet-size 577 # weight 2 # passive disable # priority 1 # mtu-ignore enable # flood-reduction disable # dead-interval 2 # retransmit-interval 2 # demand-circuit enable # hello-interval 1 # transmit-delay 2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # - name: Replace OSPFv2 routes configurations from the device cisco.iosxr.iosxr_ospfv2: config: processes: - process_id: 27 areas: - area_id: 10 hello_interval: 2 - area_id: 20 cost: 2 default_cost: 2 authentication: keychain: ansi11393 - process_id: 26 adjacency_stagger: min_adjacency: 10 max_adjacency: 20 state: replaced # # # ------------------------ # Module Execution Result # ------------------------ # # "before": { # "processes": [ # { # "areas": [ # { # "area_id": "11", # "cost": 11, # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "authentication": { # "keychain": "ansible_test1102" # }, # "process_id": "10" # }, # { # "adjacency_stagger": { # "max_adjacency": 20, # "min_adjacency": 10 # }, # "authentication": { # "message_digest": { # "keychain": "ansible1101pass" # } # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "authentication": { # "keychain": "ansi11393" # }, # "hello_interval": 2 # } # ], # "process_id": "27" # }, # { # "areas": [ # { # "area_id": "11", # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "cost": 2, # "dead_interval": 2, # "default_metric": 10, # "demand_circuit": "enable", # "external_out": "disable", # "flood_reduction": "disable", # "hello_interval": 1, # "mtu_ignore": "enable", # "packet_size": 577, # "passive": "disable", # "priority": 1, # "process_id": "30", # "retransmit_interval": 2, # "router_id": "2.2.2.2", # "summary_in": "enable", # "transmit_delay": 2, # "weight": 2 # } # ] # } # # "commands": [ # "router ospf 27", # "no area 10 authentication keychain ansi11393", # "area 20 authentication keychain ansi11393", # "area 20 default-cost 2", # "area 20 cost 2" # ] # # "after": { # "processes": [ # { # "areas": [ # { # "area_id": "11", # "cost": 11, # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "authentication": { # "keychain": "ansible_test1102" # }, # "process_id": "10" # }, # { # "adjacency_stagger": { # "max_adjacency": 20, # "min_adjacency": 10 # }, # "authentication": { # "message_digest": { # "keychain": "ansible1101pass" # } # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "hello_interval": 2 # }, # { # "area_id": "20", # "authentication": { # "keychain": "ansi11393" # }, # "cost": 2, # "default_cost": 2 # } # ], # "process_id": "27" # }, # { # "areas": [ # { # "area_id": "11", # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "cost": 2, # "dead_interval": 2, # "default_metric": 10, # "demand_circuit": "enable", # "external_out": "disable", # "flood_reduction": "disable", # "hello_interval": 1, # "mtu_ignore": "enable", # "packet_size": 577, # "passive": "disable", # "priority": 1, # "process_id": "30", # "retransmit_interval": 2, # "router_id": "2.2.2.2", # "summary_in": "enable", # "transmit_delay": 2, # "weight": 2 # } # ] # } # # # ----------- # After state # ----------- # # RP/0/RP0/CPU0:anton(config)#do show running-config router ospf # Thu Jun 11 16:40:31.038 UTC # router ospf 10 # authentication keychain ansible_test1102 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospf 26 # authentication message-digest keychain ansible1101pass # adjacency stagger 10 20 # ! # router ospf 27 # area 10 # hello-interval 2 # ! # area 20 # cost 2 # authentication keychain ansi11393 # default-cost 2 # ! # ! # router ospf 30 # router-id 2.2.2.2 # summary-in enable # external-out disable # cost 2 # packet-size 577 # weight 2 # passive disable # priority 1 # mtu-ignore enable # flood-reduction disable # dead-interval 2 # retransmit-interval 2 # demand-circuit enable # hello-interval 1 # transmit-delay 2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # # Using overridden # # ------------ # Before state # ------------ # # # RP/0/RP0/CPU0:anton#show running-config router ospf # Thu Jun 11 16:06:44.406 UTC # router ospf 10 # authentication keychain ansible_test1102 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospf 26 # authentication message-digest keychain ansible1101pass # adjacency stagger 10 20 # ! # router ospf 27 # area 10 # authentication keychain ansi11393 # hello-interval 2 # ! # ! # router ospf 30 # router-id 2.2.2.2 # summary-in enable # external-out disable # cost 2 # packet-size 577 # weight 2 # passive disable # priority 1 # mtu-ignore enable # flood-reduction disable # dead-interval 2 # retransmit-interval 2 # demand-circuit enable # hello-interval 1 # transmit-delay 2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # - name: Override existing OSPFv2 configurations from the device cisco.iosxr.iosxr_ospfv2: config: processes: - process_id: 27 areas: - area_id: 10 hello_interval: 2 authentication: keychain: ansi11393 - area_id: 20 cost: 2 default_cost: 2 authentication: keychain: ansi11393 - process_id: 26 adjacency_stagger: min_adjacency: 10 max_adjacency: 20 state: overridden # # # ------------------------ # Module Execution Result # ------------------------ # # "before": { # "processes": [ # { # "areas": [ # { # "area_id": "11", # "cost": 11, # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "authentication": { # "keychain": "ansible_test1102" # }, # "process_id": "10" # }, # { # "adjacency_stagger": { # "max_adjacency": 20, # "min_adjacency": 10 # }, # "authentication": { # "message_digest": { # "keychain": "ansible1101pass" # } # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "authentication": { # "keychain": "ansi11393" # }, # "hello_interval": 2 # } # ], # "process_id": "27" # }, # { # "areas": [ # { # "area_id": "11", # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "cost": 2, # "dead_interval": 2, # "default_metric": 10, # "demand_circuit": "enable", # "external_out": "disable", # "flood_reduction": "disable", # "hello_interval": 1, # "mtu_ignore": "enable", # "packet_size": 577, # "passive": "disable", # "priority": 1, # "process_id": "30", # "retransmit_interval": 2, # "router_id": "2.2.2.2", # "summary_in": "enable", # "transmit_delay": 2, # "weight": 2 # } # ] # } # # "commands": [ # "router ospf 10", # "no authentication keychain ansible_test1102", # "no area 11 default-cost 5", # "no area 11 cost 11", # "no area 22 default-cost 6", # "router ospf 30", # "no cost 2", # "no weight 2", # "no passive disable", # "no priority 1", # "no flood-reduction disable", # "no default-metric 10", # "no router-id 2.2.2.2", # "no demand-circuit enable", # "no packet-size 577", # "no transmit-delay 2", # "no summary-in enable", # "no external-out disable", # "no dead-interval 2", # "no hello-interval 1", # "no retransmit-interval 2", # "no mtu-ignore enable", # "no area 11 default-cost 5", # "no area 22 default-cost 6", # "router ospf 27", # "area 20 authentication keychain ansi11393", # "area 20 default-cost 2", # "area 20 cost 2" # ] # # "after": { # "processes": [ # { # "process_id": "10" # }, # { # "adjacency_stagger": { # "max_adjacency": 20, # "min_adjacency": 10 # }, # "authentication": { # "message_digest": { # "keychain": "ansible1101pass" # } # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "authentication": { # "keychain": "ansi11393" # }, # "hello_interval": 2 # }, # { # "area_id": "20", # "authentication": { # "keychain": "ansi11393" # }, # "cost": 2, # "default_cost": 2 # } # ], # "process_id": "27" # }, # { # "process_id": "30" # } # ] # } # # # ----------- # After state # ----------- # # RP/0/RP0/CPU0:anton#show running-config router ospf # Thu Jun 11 16:50:36.332 UTC # router ospf 10 # ! # router ospf 26 # authentication message-digest keychain ansible1101pass # adjacency stagger 10 20 # ! # router ospf 27 # area 10 # authentication keychain ansi11393 # hello-interval 2 # ! # area 20 # cost 2 # authentication keychain ansi11393 # default-cost 2 # ! # ! # router ospf 30 # ! # # Using deleted # # ------------ # Before state # ------------ # # # RP/0/RP0/CPU0:anton#show running-config router ospf # Thu Jun 11 16:06:44.406 UTC # router ospf 10 # authentication keychain ansible_test1102 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospf 26 # authentication message-digest keychain ansible1101pass # adjacency stagger 10 20 # ! # router ospf 27 # area 10 # authentication keychain ansi11393 # hello-interval 2 # ! # ! # router ospf 30 # router-id 2.2.2.2 # summary-in enable # external-out disable # cost 2 # packet-size 577 # weight 2 # passive disable # priority 1 # mtu-ignore enable # flood-reduction disable # dead-interval 2 # retransmit-interval 2 # demand-circuit enable # hello-interval 1 # transmit-delay 2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # - name: Deleted existing OSPFv2 configurations from the device cisco.iosxr.iosxr_ospfv2: config: processes: - process_id: '10' - process_id: '26' - process_id: '27' - process_id: '30' state: deleted # # # ------------------------ # Module Execution Result # ------------------------ # # "before": { # "processes": [ # { # "areas": [ # { # "area_id": "11", # "cost": 11, # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "authentication": { # "keychain": "ansible_test1102" # }, # "process_id": "10" # }, # { # "adjacency_stagger": { # "max_adjacency": 20, # "min_adjacency": 10 # }, # "authentication": { # "message_digest": { # "keychain": "ansible1101pass" # } # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "authentication": { # "keychain": "ansi11393" # }, # "hello_interval": 2 # } # ], # "process_id": "27" # }, # { # "areas": [ # { # "area_id": "11", # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "cost": 2, # "dead_interval": 2, # "default_metric": 10, # "demand_circuit": "enable", # "external_out": "disable", # "flood_reduction": "disable", # "hello_interval": 1, # "mtu_ignore": "enable", # "packet_size": 577, # "passive": "disable", # "priority": 1, # "process_id": "30", # "retransmit_interval": 2, # "router_id": "2.2.2.2", # "summary_in": "enable", # "transmit_delay": 2, # "weight": 2 # } # ] # }, # # "commands": [ # "router ospf 10", # "no authentication keychain ansible_test1102", # "no area 11 default-cost 5", # "no area 11 cost 11", # "no area 22 default-cost 6", # "router ospf 26", # "no adjacency stagger 10 20", # "no authentication message-digest keychain ansible1101pass", # "router ospf 27", # "no area 10 authentication keychain ansi11393", # "no area 10 hello-interval 2", # "router ospf 30", # "no cost 2", # "no weight 2", # "no passive disable", # "no priority 1", # "no flood-reduction disable", # "no default-metric 10", # "no router-id 2.2.2.2", # "no demand-circuit enable", # "no packet-size 577", # "no transmit-delay 2", # "no summary-in enable", # "no external-out disable", # "no dead-interval 2", # "no hello-interval 1", # "no retransmit-interval 2", # "no mtu-ignore enable", # "no area 11 default-cost 5", # "no area 22 default-cost 6" # ] # # "after": { # "processes": [ # { # "process_id": "10" # }, # { # "process_id": "26" # }, # { # "process_id": "27" # }, # { # "process_id": "30" # } # ] # } # # # ----------- # After state # ----------- # # RP/0/RP0/CPU0:anton(config)#show running-config router ospf # Thu Jun 11 17:07:34.218 UTC # router ospf 10 # ! # router ospf 26 # ! # router ospf 27 # ! # router ospf 30 # ! # Using parsed # parsed.cfg # ------------ # Thu Jun 11 17:28:51.918 UTC # router ospf 10 # authentication keychain ansible_test1102 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospf 26 # authentication message-digest keychain ansible1101pass # adjacency stagger 10 20 # ! # router ospf 27 # area 10 # authentication keychain ansi11393 # hello-interval 2 # ! # ! # router ospf 30 # router-id 2.2.2.2 # summary-in enable # external-out disable # cost 2 # packet-size 577 # weight 2 # passive disable # priority 1 # mtu-ignore enable # flood-reduction disable # dead-interval 2 # retransmit-interval 2 # demand-circuit enable # hello-interval 1 # transmit-delay 2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! - name: Parsed the device configuration to get output commands cisco.iosxr.iosxr_ospfv2: running_config: "{{ lookup('file', './parsed.cfg') }}" state: parsed # # # ------------------------- # Module Execution Result # ------------------------- # # # "parsed": { # "processes": [ # { # "areas": [ # { # "area_id": "11", # "cost": 11, # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "authentication": { # "keychain": "ansible_test1102" # }, # "process_id": "10" # }, # { # "adjacency_stagger": { # "max_adjacency": 20, # "min_adjacency": 10 # }, # "authentication": { # "message_digest": { # "keychain": "ansible1101pass" # } # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "authentication": { # "keychain": "ansi11393" # }, # "hello_interval": 2 # } # ], # "process_id": "27" # }, # { # "areas": [ # { # "area_id": "11", # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "cost": 2, # "dead_interval": 2, # "default_metric": 10, # "demand_circuit": "enable", # "external_out": "disable", # "flood_reduction": "disable", # "hello_interval": 1, # "mtu_ignore": "enable", # "packet_size": 577, # "passive": "disable", # "priority": 1, # "process_id": "30", # "retransmit_interval": 2, # "router_id": "2.2.2.2", # "summary_in": "enable", # "transmit_delay": 2, # "weight": 2 # } # ] # } # Using rendered # # - name: Render the commands for provided configuration cisco.iosxr.iosxr_ospfv2: config: processes: - process_id: 27 areas: - area_id: 10 hello_interval: 2 authentication: keychain: ansi11393 - process_id: 26 adjacency_stagger: min_adjacency: 10 max_adjacency: 20 - process_id: 10 authentication: keychain: ansible_test1102 areas: - area_id: 11 default_cost: 5 cost: 11 - area_id: 22 default_cost: 6 - process_id: 30 areas: - area_id: 11 default_cost: 5 - area_id: 22 default_cost: 6 cost: 2 default_metric: 10 transmit_delay: 2 hello_interval: 1 dead_interval: 2 retransmit_interval: 2 weight: 2 packet_size: 577 priority: 1 router_id: 2.2.2.2 demand_circuit: enable passive: disable summary_in: enable flood_reduction: disable mtu_ignore: enable external_out: disable state: rendered # # # ------------------------- # Module Execution Result # ------------------------- # # # "rendered": [ # "router ospf 27", # "area 10 authentication keychain ansi11393", # "area 10 hello-interval 2", # "router ospf 26", # "adjacency stagger 10 20", # "authentication message-digest keychain ansible1101pass", # "router ospf 10", # "authentication keychain ansible_test1102", # "area 11 default-cost 5", # "area 11 cost 11", # "area 22 default-cost 6", # "router ospf 30", # "cost 2", # "weight 2", # "passive disable", # "priority 1", # "flood-reduction disable", # "default-metric 10", # "router-id 2.2.2.2", # "demand-circuit enable", # "packet-size 577", # "transmit-delay 2", # "summary-in enable", # "external-out disable", # "dead-interval 2", # "hello-interval 1", # "retransmit-interval 2", # "mtu-ignore enable", # "area 11 default-cost 5", # "area 22 default-cost 6" # ] # Using gathered # # Before state: # ------------- # # RP/0/RP0/CPU0:anton#show running-config router ospf # Thu Jun 11 16:06:44.406 UTC # router ospf 10 # authentication keychain ansible_test1102 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospf 26 # authentication message-digest keychain ansible1101pass # adjacency stagger 10 20 # ! # router ospf 27 # area 10 # authentication keychain ansi11393 # hello-interval 2 # ! # ! # router ospf 30 # router-id 2.2.2.2 # summary-in enable # external-out disable # cost 2 # packet-size 577 # weight 2 # passive disable # priority 1 # mtu-ignore enable # flood-reduction disable # dead-interval 2 # retransmit-interval 2 # demand-circuit enable # hello-interval 1 # transmit-delay 2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # - name: Gather ospfv2 routes configuration cisco.iosxr.iosxr_ospfv2: state: gathered # # # ------------------------- # Module Execution Result # ------------------------- # # "gathered": { # "processes": [ # { # "areas": [ # { # "area_id": "11", # "cost": 11, # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "authentication": { # "keychain": "ansible_test1102" # }, # "process_id": "10" # }, # { # "adjacency_stagger": { # "max_adjacency": 20, # "min_adjacency": 10 # }, # "authentication": { # "message_digest": { # "keychain": "ansible1101pass" # } # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "authentication": { # "keychain": "ansi11393" # }, # "hello_interval": 2 # } # ], # "process_id": "27" # }, # { # "areas": [ # { # "area_id": "11", # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "cost": 2, # "dead_interval": 2, # "default_metric": 10, # "demand_circuit": "enable", # "external_out": "disable", # "flood_reduction": "disable", # "hello_interval": 1, # "mtu_ignore": "enable", # "packet_size": 577, # "passive": "disable", # "priority": 1, # "process_id": "30", # "retransmit_interval": 2, # "router_id": "2.2.2.2", # "summary_in": "enable", # "transmit_delay": 2, # "weight": 2 # } # ] # } # # After state: # ------------- # # RP/0/RP0/CPU0:anton#show running-config router ospf # Thu Jun 11 16:06:44.406 UTC # router ospf 10 # authentication keychain ansible_test1102 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospf 26 # authentication message-digest keychain ansible1101pass # adjacency stagger 10 20 # ! # router ospf 27 # area 10 # authentication keychain ansi11393 # hello-interval 2 # ! # ! # router ospf 30 # router-id 2.2.2.2 # summary-in enable # external-out disable # cost 2 # packet-size 577 # weight 2 # passive disable # priority 1 # mtu-ignore enable # flood-reduction disable # dead-interval 2 # retransmit-interval 2 # demand-circuit enable # hello-interval 1 # transmit-delay 2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # # ``` 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 resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. | | **before** dictionary | always | The configuration prior to the model 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:** ['router ospf 30', "authentication message-digest keychain 'ansible1101pass'"] | ### Authors * Rohit Thakur (@rohitthakur2590)
programming_docs
ansible cisco.iosxr.iosxr_static_routes – Static routes resource module cisco.iosxr.iosxr\_static\_routes – Static routes resource module ================================================================= Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_static_routes`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages static routes on devices running Cisco IOS-XR. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A dictionary of static route options. | | | **address\_families** list / elements=dictionary | | A dictionary specifying the address family to which the static route(s) belong. | | | | **afi** string / required | **Choices:*** ipv4 * ipv6 | Specifies the top level address family indicator. | | | | **routes** list / elements=dictionary | | A dictionary that specifies the static route configurations. | | | | | **dest** string / required | | An IPv4 or IPv6 address in CIDR notation that specifies the destination network for the static route. | | | | | **next\_hops** list / elements=dictionary | | Next hops to the specified destination. | | | | | | **admin\_distance** integer | | The administrative distance for this static route. Refer to vendor documentation for valid values. | | | | | | **description** string | | Specifies the description for this static route. | | | | | | **dest\_vrf** string | | The destination VRF. | | | | | | **forward\_router\_address** string | | The IP address of the next hop that can be used to reach the destination network. | | | | | | **interface** string | | The interface to use to reach the destination. | | | | | | **metric** integer | | Specifes the metric for this static route. Refer to vendor documentation for valid values. | | | | | | **tag** integer | | Specifies a numeric tag for this static route. Refer to vendor documentation for valid values. | | | | | | **track** string | | Specifies the object to be tracked. This enables object tracking for static routes. | | | | | | **tunnel\_id** integer | | Specifies a tunnel id for the route. Refer to vendor documentation for valid values. | | | | | | **vrflabel** integer | | Specifies the VRF label for this static route. Refer to vendor documentation for valid values. | | | | **safi** string / required | **Choices:*** unicast * multicast | Specifies the subsequent address family indicator. | | | **vrf** string | | The VRF to which the static route(s) belong. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOS-XR device by executing the command **show running-config router static**. 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 * gathered * rendered * parsed | The state the configuration should be left in. | Examples -------- ``` # Using merged # Before state # ------------- # RP/0/RP0/CPU0:ios#show running-config router static # Sat Feb 22 07:46:30.089 UTC # % No such configuration item(s) # - name: Merge the provided configuration with the existing running configuration cisco.iosxr.iosxr_static_routes: config: - address_families: - afi: ipv4 safi: unicast routes: - dest: 192.0.2.16/28 next_hops: - forward_router_address: 192.0.2.10 interface: FastEthernet0/0/0/1 description: LAB metric: 120 tag: 10 - interface: FastEthernet0/0/0/5 track: ip_sla_1 - dest: 192.0.2.32/28 next_hops: - forward_router_address: 192.0.2.11 admin_distance: 100 - afi: ipv6 safi: unicast routes: - dest: 2001:db8:1000::/36 next_hops: - interface: FastEthernet0/0/0/7 description: DC - interface: FastEthernet0/0/0/8 forward_router_address: 2001:db8:2000:2::1 - vrf: DEV_SITE address_families: - afi: ipv4 safi: unicast routes: - dest: 192.0.2.48/28 next_hops: - forward_router_address: 192.0.2.12 description: DEV dest_vrf: test_1 - dest: 192.0.2.80/28 next_hops: - interface: FastEthernet0/0/0/2 forward_router_address: 192.0.2.14 dest_vrf: test_1 track: ip_sla_2 vrflabel: 124 state: merged # After state # ------------- # RP/0/RP0/CPU0:ios#show running-config router static # Sat Feb 22 07:49:11.754 UTC # router static # address-family ipv4 unicast # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120 # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1 # 192.0.2.32/28 192.0.2.11 100 # ! # address-family ipv6 unicast # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1 # ! # vrf DEV_SITE # address-family ipv4 unicast # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2 # ! # ! # ! # Using merged to update existing static routes # Before state # ------------- # RP/0/RP0/CPU0:ios#show running-config router static # Sat Feb 22 07:49:11.754 UTC # router static # address-family ipv4 unicast # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120 # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1 # 192.0.2.32/28 192.0.2.11 100 # ! # address-family ipv6 unicast # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1 # ! # vrf DEV_SITE # address-family ipv4 unicast # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2 # ! # ! # ! - name: Update existing static routes configuration using merged cisco.iosxr.iosxr_static_routes: config: - vrf: DEV_SITE address_families: - afi: ipv4 safi: unicast routes: - dest: 192.0.2.48/28 next_hops: - forward_router_address: 192.0.2.12 vrflabel: 2301 dest_vrf: test_1 - dest: 192.0.2.80/28 next_hops: - interface: FastEthernet0/0/0/2 forward_router_address: 192.0.2.14 dest_vrf: test_1 description: rt_test_1 state: merged # After state # ------------- # RP/0/RP0/CPU0:ios#show running-config router static # Sat Feb 22 07:49:11.754 UTC # router static # address-family ipv4 unicast # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120 # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1 # 192.0.2.32/28 192.0.2.11 100 # ! # address-family ipv6 unicast # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1 # ! # vrf DEV_SITE # address-family ipv4 unicast # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV vrflabel 2301 # 192.0.2.80/28 vrf test_1 192.0.2.14 FastEthernet0/0/0/2 description rt_test_1 track ip_sla_2 vrflabel 124 # ! # ! # ! # Using replaced to replace all next hop entries for a single destination network # Before state # -------------- # RP/0/RP0/CPU0:ios#sh running-config router static # Sat Feb 22 07:59:08.669 UTC # router static # address-family ipv4 unicast # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120 # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1 # 192.0.2.32/28 192.0.2.11 100 # ! # address-family ipv6 unicast # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1 # ! # vrf DEV_SITE # address-family ipv4 unicast # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV # 192.0.2.48/28 GigabitEthernet0/0/0/1 192.0.3.24 vrflabel 2302 # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2 # ! # ! # ! - name: Replace device configurations of static routes with provided configurations cisco.iosxr.iosxr_static_routes: config: - vrf: DEV_SITE address_families: - afi: ipv4 safi: unicast routes: - dest: 192.0.2.48/28 next_hops: - forward_router_address: 192.0.2.15 interface: FastEthernet0/0/0/3 description: DEV_NEW dest_vrf: dev_test_2 state: replaced # After state # ------------ # RP/0/RP0/CPU0:ios#sh running-config router static # Sat Feb 22 08:04:07.085 UTC # router static # address-family ipv4 unicast # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120 # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1 # 192.0.2.32/28 192.0.2.11 100 # ! # address-family ipv6 unicast # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1 # ! # vrf DEV_SITE # address-family ipv4 unicast # 192.0.2.48/28 vrf dev_test_2 FastEthernet0/0/0/3 192.0.2.15 description DEV_NEW # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2 # ! # ! # ! # Using overridden to override all static route entries on the device # Before state # ------------- # RP/0/RP0/CPU0:ios#sh running-config router static # Sat Feb 22 07:59:08.669 UTC # router static # address-family ipv4 unicast # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120 # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1 # 192.0.2.32/28 192.0.2.11 100 # ! # address-family ipv6 unicast # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1 # ! # vrf DEV_SITE # address-family ipv4 unicast # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV # 192.0.2.48/28 GigabitEthernet0/0/0/1 192.0.3.24 vrflabel 2302 # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2 # ! # ! # ! - name: Overridde all static routes configuration with provided configuration cisco.iosxr.iosxr_static_routes: config: - vrf: DEV_NEW address_families: - afi: ipv4 safi: unicast routes: - dest: 192.0.2.48/28 next_hops: - forward_router_address: 192.0.2.15 interface: FastEthernet0/0/0/3 description: DEV1 - afi: ipv6 safi: unicast routes: - dest: 2001:db8:3000::/36 next_hops: - interface: FastEthernet0/0/0/4 forward_router_address: 2001:db8:2000:2::2 description: PROD1 track: ip_sla_1 state: overridden # After state # ------------- # RP/0/RP0/CPU0:ios#sh running-config router static # Sat Feb 22 08:07:41.516 UTC # router static # vrf DEV_NEW # address-family ipv4 unicast # 192.0.2.48/28 FastEthernet0/0/0/3 192.0.2.15 description DEV1 # ! # address-family ipv6 unicast # 2001:db8:3000::/36 FastEthernet0/0/0/4 2001:db8:2000:2::2 description PROD1 track ip_sla_1 # ! # ! # ! # Using deleted to delete all destination network entries under a single AFI # Before state # ------------- # RP/0/RP0/CPU0:ios#sh running-config router static # Sat Feb 22 07:59:08.669 UTC # router static # address-family ipv4 unicast # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120 # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1 # 192.0.2.32/28 192.0.2.11 100 # ! # address-family ipv6 unicast # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1 # ! # vrf DEV_SITE # address-family ipv4 unicast # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV # 192.0.2.48/28 GigabitEthernet0/0/0/1 192.0.3.24 vrflabel 2302 # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2 # ! # ! # ! - name: Delete all destination network entries under a single AFI cisco.iosxr.iosxr_static_routes: config: - vrf: DEV_SITE address_families: - afi: ipv4 safi: unicast state: deleted # After state # ------------ # RP/0/RP0/CPU0:ios#sh running-config router static # Sat Feb 22 08:16:41.464 UTC # router static # address-family ipv4 unicast # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120 # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1 # 192.0.2.32/28 192.0.2.11 100 # ! # address-family ipv6 unicast # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1 # ! # vrf DEV_SITE # ! # ! # Using deleted to remove all static route entries from the device # Before state # ------------- # RP/0/RP0/CPU0:ios#sh running-config router static # Sat Feb 22 07:59:08.669 UTC # router static # address-family ipv4 unicast # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120 # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1 # 192.0.2.32/28 192.0.2.11 100 # ! # address-family ipv6 unicast # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1 # ! # vrf DEV_SITE # address-family ipv4 unicast # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV # 192.0.2.48/28 GigabitEthernet0/0/0/1 192.0.3.24 vrflabel 2302 # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2 # ! # ! # ! - name: Delete static routes configuration cisco.iosxr.iosxr_static_routes: state: deleted # After state # ------------ # RP/0/RP0/CPU0:ios#sh running-config router static # Sat Feb 22 08:50:43.038 UTC # % No such configuration item(s) # Using gathered to gather static route facts from the device - name: Gather static routes facts from the device using iosxr_static_routes module cisco.iosxr.iosxr_static_routes: state: gathered # Task output (redacted) # ----------------------- # "gathered": [ # { # "address_families": [ # { # "afi": "ipv4", # "routes": [ # { # "dest": "192.0.2.16/28", # "next_hops": [ # { # "description": "LAB", # "forward_router_address": "192.0.2.10", # "interface": "FastEthernet0/0/0/1", # "metric": 120, # "tag": 10 # }, # { # "interface": "FastEthernet0/0/0/5", # "track": "ip_sla_1" # } # ] # }, # { # "dest": "192.0.2.32/28", # "next_hops": [ # { # "admin_distance": 100, # "forward_router_address": "192.0.2.11" # } # ] # } # ], # "safi": "unicast" # }, # { # "afi": "ipv6", # "routes": [ # { # "dest": "2001:db8:1000::/36", # "next_hops": [ # { # "description": "DC", # "interface": "FastEthernet0/0/0/7" # }, # { # "forward_router_address": "2001:db8:2000:2::1", # "interface": "FastEthernet0/0/0/8" # } # ] # } # ], # "safi": "unicast" # } # ] # }, # { # "address_families": [ # { # "afi": "ipv4", # "routes": [ # { # "dest": "192.0.2.48/28", # "next_hops": [ # { # "description": "DEV", # "dest_vrf": "test_1", # "forward_router_address": "192.0.2.12" # }, # { # "forward_router_address": "192.0.3.24", # "interface": "GigabitEthernet0/0/0/1", # "vrflabel": 2302 # } # ] # }, # { # "dest": "192.0.2.80/28", # "next_hops": [ # { # "dest_vrf": "test_1", # "forward_router_address": "192.0.2.14", # "interface": "FastEthernet0/0/0/2", # "track": "ip_sla_2", # "vrflabel": 124 # } # ] # } # ], # "safi": "unicast" # } # ], # "vrf": "DEV_SITE" # } # ] # Using rendered - name: Render platform specific commands (without connecting to the device) cisco.iosxr.iosxr_static_routes: config: - vrf: DEV_SITE address_families: - afi: ipv4 safi: unicast routes: - dest: 192.0.2.48/28 next_hops: - forward_router_address: 192.0.2.12 description: DEV dest_vrf: test_1 - dest: 192.0.2.80/28 next_hops: - interface: FastEthernet0/0/0/2 forward_router_address: 192.0.2.14 dest_vrf: test_1 track: ip_sla_2 vrflabel: 124 # Task Output (redacted) # ----------------------- # "rendered": [ # "router static"s, # "vrf DEV_SITE", # "address-family ipv4 unicast", # "192.0.2.48/28 vrf test_1 192.0.2.12 description DEV", # "192.0.2.80/28 vrf test_1 192.0.2.14 FastEthernet0/0/0/2 track ip_sla_2 vrflabel 124" # Using parsed # parsed.cfg # ------------ # Fri Nov 29 21:10:41.896 UTC # router static # address-family ipv4 unicast # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120 # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1 # 192.0.2.32/28 192.0.2.11 100 # ! # address-family ipv6 unicast # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1 # ! # vrf DEV_SITE # address-family ipv4 unicast # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2 # ! # ! # ! - name: Use parsed state to convert externally supplied device specific static routes commands to structured format cisco.iosxr.iosxr_static_routes: running_config: "{{ lookup('file', '../../fixtures/parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # "parsed": [ # { # "address_families": [ # { # "afi": "ipv4", # "routes": [ # { # "dest": "192.0.2.16/28", # "next_hops": [ # { # "description": "LAB", # "forward_router_address": "192.0.2.10", # "interface": "FastEthernet0/0/0/1", # "metric": 120, # "tag": 10 # }, # { # "interface": "FastEthernet0/0/0/5", # "track": "ip_sla_1" # } # ] # }, # { # "dest": "192.0.2.32/28", # "next_hops": [ # { # "admin_distance": 100, # "forward_router_address": "192.0.2.11" # } # ] # } # ], # "safi": "unicast" # }, # { # "afi": "ipv6", # "routes": [ # { # "dest": "2001:db8:1000::/36", # "next_hops": [ # { # "description": "DC", # "interface": "FastEthernet0/0/0/7" # }, # { # "forward_router_address": "2001:db8:2000:2::1", # "interface": "FastEthernet0/0/0/8" # } # ] # } # ], # "safi": "unicast" # } # ] # }, # { # "address_families": [ # { # "afi": "ipv4", # "routes": [ # { # "dest": "192.0.2.48/28", # "next_hops": [ # { # "description": "DEV", # "dest_vrf": "test_1", # "forward_router_address": "192.0.2.12" # } # ] # }, # { # "dest": "192.0.2.80/28", # "next_hops": [ # { # "dest_vrf": "test_1", # "forward_router_address": "192.0.2.14", # "interface": "FastEthernet0/0/0/2", # "track": "ip_sla_2", # "vrflabel": 124 # } # ] # } # ], # "safi": "unicast" # } # ], # "vrf": "DEV_SITE" # } # ] # } ``` 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 resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. | | **before** list / elements=string | always | The configuration prior to the model 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:** ['router static', 'vrf dev\_site', 'address-family ipv4 unicast', '192.0.2.48/28 192.0.2.12 FastEthernet0/0/0/1 track ip\_sla\_10 description dev1', 'address-family ipv6 unicast', 'no 2001:db8:1000::/36', '2001:db8:3000::/36 2001:db8:2000:2::2 FastEthernet0/0/0/4 track ip\_sla\_11 description prod1'] | ### Authors * Nilashish Chakraborty (@NilashishC)
programming_docs
ansible cisco.iosxr.iosxr_lldp_interfaces – LLDP interfaces resource module cisco.iosxr.iosxr\_lldp\_interfaces – LLDP interfaces resource module ===================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_lldp_interfaces`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages Link Layer Discovery Protocol (LLDP) attributes of interfaces on IOS-XR 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 LLDP interfaces options. | | | **destination** dictionary | | Specifies LLDP destination configuration on the interface. | | | | **mac\_address** string | **Choices:*** ieee-nearest-bridge * ieee-nearest-non-tmpr-bridge | Specifies the LLDP destination mac address on the interface. | | | **name** string | | Name/Identifier of the interface or Ether-Bundle. | | | **receive** boolean | **Choices:*** no * yes | Enable/disable LLDP RX on an interface. | | | **transmit** boolean | **Choices:*** no * yes | Enable/disable LLDP TX on an interface. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOS-XR device by executing the command **show running-config int**. 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 * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). Examples -------- ``` # Using merged # # # ------------ # Before state # ------------ # # # RP/0/RP0/CPU0:ios#sh run int # Mon Aug 12 12:40:23.104 UTC # interface TenGigE0/0/0/0 # ipv4 address 192.0.2.11 255.255.255.192 # ! # interface preconfigure GigabitEthernet0/0/0/1 # ! # interface preconfigure GigabitEthernet0/0/0/2 # ! # # - name: Merge provided configuration with running configuration cisco.iosxr.iosxr_lldp_interfaces: config: - name: GigabitEthernet0/0/0/1 destination: mac_address: ieee-nearest-non-tmpr-bridge transmit: false - name: GigabitEthernet0/0/0/2 destination: mac_address: ieee-nearest-bridge receive: false state: merged # # # ------------------------ # Module Execution Result # ------------------------ # # # "before": [ # { # "name": "TenGigE0/0/0/0" # }, # { # "name": "GigabitEthernet0/0/0/1" # }, # { # "name": "GigabitEthernet0/0/0/2" # } # ] # # "commands": [ # "interface GigabitEthernet0/0/0/2", # "lldp destination mac-address ieee-nearest-non-tmpr-bridge", # "lldp transmit disable", # "interface GigabitEthernet0/0/0/1", # "lldp receive disable", # "lldp destination mac-address ieee-nearest-bridge" # ] # # "after": [ # { # "name": "TenGigE0/0/0/0" # }, # { # "destination": { # "mac_address": "ieee-nearest-bridge" # }, # "name": "GigabitEthernet0/0/0/1", # "receive": false # }, # { # "destination": { # "mac_address": "ieee-nearest-non-tmpr-bridge" # }, # "name": "GigabitEthernet0/0/0/2", # "transmit": false # } # ] # # # ------------ # After state # ------------ # # # RP/0/RP0/CPU0:ios#sh run int # Mon Aug 12 12:49:51.517 UTC # interface TenGigE0/0/0/0 # ipv4 address 192.0.2.11 255.255.255.192 # ! # interface preconfigure GigabitEthernet0/0/0/1 # lldp # receive disable # destination mac-address # ieee-nearest-bridge # ! # ! # ! # interface preconfigure GigabitEthernet0/0/0/2 # lldp # transmit disable # destination mac-address # ieee-nearest-non-tmpr-bridge # ! # ! # ! # # # Using replaced # # # ------------- # Before state # ------------- # # # RP/0/RP0/CPU0:ios#sh run int # Mon Aug 12 12:49:51.517 UTC # interface TenGigE0/0/0/0 # ipv4 address 192.0.2.11 255.255.255.192 # ! # interface preconfigure GigabitEthernet0/0/0/1 # lldp # receive disable # destination mac-address # ieee-nearest-bridge # ! # ! # ! # interface preconfigure GigabitEthernet0/0/0/2 # lldp # transmit disable # destination mac-address # ieee-nearest-non-tmpr-bridge # ! # ! # ! # # - name: Replace existing LLDP configurations of specified interfaces with provided configuration cisco.iosxr.iosxr_lldp_interfaces: config: - name: GigabitEthernet0/0/0/1 destination: mac_address: ieee-nearest-non-tmpr-bridge state: replaced # # # ------------------------ # Module Execution Result # ------------------------ # # "before": [ # { # "name": "TenGigE0/0/0/0" # }, # { # "destination": { # "mac_address": "ieee-nearest-bridge" # }, # "name": "GigabitEthernet0/0/0/1", # "receive": false # }, # { # "destination": { # "mac_address": "ieee-nearest-non-tmpr-bridge" # }, # "name": "GigabitEthernet0/0/0/2", # "transmit": false # } # ] # # # "commands": [ # "interface GigabitEthernet0/0/0/1", # "no lldp receive disable", # "lldp destination mac-address ieee-nearest-non-tmpr-bridge" # ] # # # "after": [ # { # "name": "TenGigE0/0/0/0" # }, # { # "destination": { # "mac_address": "ieee-nearest-non-tmpr-bridge" # }, # "name": "GigabitEthernet0/0/0/1" # }, # { # "destination": { # "mac_address": "ieee-nearest-non-tmpr-bridge" # }, # "name": "GigabitEthernet0/0/0/2", # "transmit": false # } # ] # # # ------------ # After state # ------------ # # # RP/0/RP0/CPU0:ios#sh run int # Mon Aug 12 13:02:57.062 UTC # interface TenGigE0/0/0/0 # ipv4 address 192.0.2.11 255.255.255.192 # ! # interface preconfigure GigabitEthernet0/0/0/1 # lldp # destination mac-address # ieee-nearest-non-tmpr-bridge # ! # ! # ! # interface preconfigure GigabitEthernet0/0/0/2 # lldp # transmit disable # destination mac-address # ieee-nearest-non-tmpr-bridge # ! # ! # ! # # # Using overridden # # # ------------- # Before state # ------------- # # # RP/0/RP0/CPU0:ios#sh run int # Mon Aug 12 13:15:40.465 UTC # interface TenGigE0/0/0/0 # ipv4 address 192.0.2.11 255.255.255.192 # ! # interface preconfigure GigabitEthernet0/0/0/1 # lldp # receive disable # destination mac-address # ieee-nearest-bridge # ! # ! # ! # interface preconfigure GigabitEthernet0/0/0/2 # lldp # transmit disable # destination mac-address # ieee-nearest-non-tmpr-bridge # ! # ! # ! # # - name: Override the LLDP configurations of all the interfaces with provided configurations cisco.iosxr.iosxr_lldp_interfaces: config: - name: GigabitEthernet0/0/0/1 transmit: false state: overridden # # # ------------------------ # Module Execution Result # ------------------------ # # # "before": [ # { # "name": "TenGigE0/0/0/0" # }, # { # "destination": { # "mac_address": "ieee-nearest-bridge" # }, # "name": "GigabitEthernet0/0/0/1", # "receive": false # }, # { # "destination": { # "mac_address": "ieee-nearest-non-tmpr-bridge" # }, # "name": "GigabitEthernet0/0/0/2", # "transmit": false # } # ] # # "commands": [ # "interface GigabitEthernet0/0/0/2", # "no lldp destination mac-address ieee-nearest-non-tmpr-bridge", # "no lldp transmit disable", # "interface GigabitEthernet0/0/0/1", # "no lldp destination mac-address ieee-nearest-bridge", # "no lldp receive disable", # "lldp transmit disable" # ] # # # "after": [ # { # "name": "TenGigE0/0/0/0" # }, # { # "name": "GigabitEthernet0/0/0/1", # "transmit": false # }, # { # "name": "GigabitEthernet0/0/0/2" # } # ] # # # ------------ # After state # ------------ # # # RP/0/RP0/CPU0:ios#sh run int # Mon Aug 12 13:22:25.604 UTC # interface TenGigE0/0/0/0 # ipv4 address 192.0.2.11 255.255.255.192 # ! # interface preconfigure GigabitEthernet0/0/0/1 # lldp # transmit disable # ! # ! # interface preconfigure GigabitEthernet0/0/0/2 # ! # # # Using deleted # # # ------------- # Before state # ------------- # # # RP/0/RP0/CPU0:ios#sh run int # Mon Aug 12 13:26:21.498 UTC # interface TenGigE0/0/0/0 # ipv4 address 192.0.2.11 255.255.255.192 # ! # interface preconfigure GigabitEthernet0/0/0/1 # lldp # receive disable # destination mac-address # ieee-nearest-bridge # ! # ! # ! # interface preconfigure GigabitEthernet0/0/0/2 # lldp # transmit disable # destination mac-address # ieee-nearest-non-tmpr-bridge # ! # ! # ! # # - name: Delete LLDP configurations of all interfaces (Note - This won't delete the interfaces themselves) cisco.iosxr.iosxr_lldp_interfaces: state: deleted # # # # ------------------------ # Module Execution Result # ------------------------ # # # "before": [ # { # "name": "TenGigE0/0/0/0" # }, # { # "destination": { # "mac_address": "ieee-nearest-bridge" # }, # "name": "GigabitEthernet0/0/0/1", # "receive": false # }, # { # "destination": { # "mac_address": "ieee-nearest-non-tmpr-bridge" # }, # "name": "GigabitEthernet0/0/0/2", # "transmit": false # } # ] # # # "commands": [ # "interface GigabitEthernet0/0/0/1", # "no lldp destination mac-address ieee-nearest-bridge", # "no lldp receive disable", # "interface GigabitEthernet0/0/0/2", # "no lldp destination mac-address ieee-nearest-non-tmpr-bridge", # "no lldp transmit disable" # ] # # # "after": [ # { # "name": "TenGigE0/0/0/0" # }, # { # "name": "GigabitEthernet0/0/0/1" # }, # { # "name": "GigabitEthernet0/0/0/2" # } # ] # # # ------------ # After state # ------------ # # # RP/0/RP0/CPU0:ios#sh run int # Mon Aug 12 13:30:14.618 UTC # interface TenGigE0/0/0/0 # ipv4 address 192.0.2.11 255.255.255.192 # ! # interface preconfigure GigabitEthernet0/0/0/1 # ! # interface preconfigure GigabitEthernet0/0/0/2 # ! # # # Using parsed: # parsed.cfg # interface TenGigE0/0/0/0 # ipv4 address 192.0.2.11 255.255.255.192 # ! # interface preconfigure GigabitEthernet0/0/0/1 # lldp # receive disable # destination mac-address # ieee-nearest-bridge # ! # ! # ! # interface preconfigure GigabitEthernet0/0/0/2 # lldp # transmit disable # destination mac-address # ieee-nearest-non-tmpr-bridge - name: Convert lacp interfaces config to argspec without connecting to the appliance cisco.iosxr.iosxr_lldp_interfaces: running_config: "{{ lookup('file', './parsed.cfg') }}" state: parsed # ------------------------ # Module Execution Result # ------------------------ # parsed: [ # - name: GigabitEthernet0/0/0/1 # destination: # mac_address: ieee-nearest-non-tmpr-bridge # transmit: False # - name: GigabitEthernet0/0/0/2 # destination: # mac_address: ieee-nearest-bridge # receive: False # ] # Using gathered: # Device config: # RP/0/RP0/CPU0:ios#sh run int # Mon Aug 12 12:49:51.517 UTC # interface TenGigE0/0/0/0 # ipv4 address 192.0.2.11 255.255.255.192 # ! # interface preconfigure GigabitEthernet0/0/0/1 # lldp # receive disable # destination mac-address # ieee-nearest-bridge # ! # ! # ! # interface preconfigure GigabitEthernet0/0/0/2 # lldp # transmit disable # destination mac-address # ieee-nearest-non-tmpr-bridge - name: Gather IOSXR lldp interfaces configuration cisco.iosxr.iosxr_lldp_interfaces: config: state: gathered # ------------------------ # Module Execution Result # ------------------------ # gathered: # - name: GigabitEthernet0/0/0/1 # destination: # mac_address: ieee-nearest-non-tmpr-bridge # transmit: False # - name: GigabitEthernet0/0/0/2 # destination: # mac_address: ieee-nearest-bridge # receive: False # Using rendred: - name: Render platform specific commands from task input using rendered state cisco.iosxr.iosxr_lldp_interfaces: config: - name: GigabitEthernet0/0/0/1 destination: mac_address: ieee-nearest-non-tmpr-bridge transmit: false - name: GigabitEthernet0/0/0/2 destination: mac_address: ieee-nearest-bridge receive: false state: rendered # ------------------------ # Module Execution Result # ------------------------ # "rendered": [ # "interface GigabitEthernet0/0/0/2", # "lldp destination mac-address ieee-nearest-non-tmpr-bridge", # "lldp transmit disable", # "interface GigabitEthernet0/0/0/1", # "lldp receive disable", # "lldp destination mac-address ieee-nearest-bridge" # ] ``` 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 GigabitEthernet0/0/0/1', 'lldp destination mac-address ieee-nearest-non-tmpr-bridge', 'no lldp transmit disable'] | ### Authors * Nilashish Chakraborty (@nilashishc) ansible cisco.iosxr.iosxr_bgp_neighbor_address_family – Manages BGP neighbor address family resource module. cisco.iosxr.iosxr\_bgp\_neighbor\_address\_family – Manages BGP neighbor address family resource module. ======================================================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_bgp_neighbor_address_family`. New in version 2.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module configures and manages the attributes of BGP global on Cisco IOS-XR platforms. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | BGP neighbor address family configurations. | | | **as\_number** string | | Autonomous system number. | | | **neighbors** list / elements=dictionary | | A list of BGP neighbor address family configurations. | | | | **address\_family** list / elements=dictionary | | Enable address family and enter its config mode | | | | | **afi** string | **Choices:*** ipv4 * ipv6 | address family. | | | | | **aigp** dictionary | | AIGP attribute | | | | | | **disable** boolean | **Choices:*** no * yes | Ignore AIGP attribute. | | | | | | **send\_cost\_community\_disable** boolean | **Choices:*** no * yes | send AIGP attribute. | | | | | | **send\_med** dictionary | | send med options. | | | | | | | **disable** boolean | **Choices:*** no * yes | disable Send AIGP value in MED. | | | | | | | **set** boolean | **Choices:*** no * yes | set Send AIGP value in MED. | | | | | | **set** boolean | **Choices:*** no * yes | Set AIGP attribute. | | | | | **allowas\_in** dictionary | | Allow as-path with my AS present in it. | | | | | | **set** boolean | **Choices:*** no * yes | set allowas\_in | | | | | | **value** integer | | Number of occurences of AS number 1-10. | | | | | **as\_override** dictionary | | Override matching AS-number while sending update | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent as-override from being inherited from the parent. | | | | | | **set** boolean | **Choices:*** no * yes | set as\_override | | | | | **bestpath\_origin\_as\_allow\_invalid** boolean | **Choices:*** no * yes | Change default route selection criteria.Allow BGP origin-AS knobs. | | | | | **capability\_orf\_prefix** string | **Choices:*** both * send * none * receive | Advertise address prefix ORF capability to this neighbor. | | | | | **default\_originate** dictionary | | Originate default route to this neighbor. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent default-originate from being inherited from the parent. | | | | | | **route\_policy** string | | Route policy to specify criteria to originate default | | | | | | **set** boolean | **Choices:*** no * yes | set default route. | | | | | **long\_lived\_graceful\_restart** dictionary | | Enable long lived graceful restart support. | | | | | | **capable** boolean | **Choices:*** no * yes | Treat neighbor as LLGR capable. | | | | | | **stale\_time** dictionary | | Maximum time to wait before purging long-lived stale routes. | | | | | | | **accept** integer | | max accept time | | | | | | | **send** integer | | max send time | | | | | **maximum\_prefix** dictionary | | Maximum number of prefixes to accept from this peer. | | | | | | **discard\_extra\_paths** boolean | **Choices:*** no * yes | Discard extra paths when limit is exceeded. | | | | | | **max\_limit** integer | | maximum no. of prefix limit.<1-4294967295. | | | | | | **restart** integer | | Restart time interval. | | | | | | **threshold\_value** integer | | hreshold value (%) at which to generate a warning msg <1-100>. | | | | | | **warning\_only** boolean | **Choices:*** no * yes | Only give warning message when limit is exceeded. | | | | | **multipath** boolean | **Choices:*** no * yes | Paths from this neighbor is eligible for multipath. | | | | | **next\_hop\_self** dictionary | | Disable the next hop calculation for this neighbor. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent next\_hop\_self from being inherited from the parent. | | | | | | **set** boolean | **Choices:*** no * yes | set next hop self. | | | | | **next\_hop\_unchanged** dictionary | | Disable the next hop calculation for this neighbor. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent next\_hop\_unchanged from being inherited from the parent. | | | | | | **multipath** boolean | **Choices:*** no * yes | Do not overwrite nexthop before advertising multipaths. | | | | | | **set** boolean | **Choices:*** no * yes | set next hop unchanged. | | | | | **optimal\_route\_reflection\_group\_name** string | | Configure optimal-route-reflection group. | | | | | **orf\_route\_policy** string | | Specify ORF and inbound filtering criteria.' | | | | | **origin\_as** dictionary | | BGP origin-AS knobs. | | | | | | **validation** dictionary | | BGP origin-AS validation knobs. | | | | | | | **disable** boolean | **Choices:*** no * yes | Disable RPKI origin-AS validation. | | | | | **remove\_private\_AS** dictionary | | Remove private AS number from outbound updates. | | | | | | **entire\_aspath** boolean | **Choices:*** no * yes | remove only if all ASes in the path are private. | | | | | | **inbound** boolean | **Choices:*** no * yes | Remove private AS number from inbound updates. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent remove-private-AS from being inherited from the parent. | | | | | | **set** boolean | **Choices:*** no * yes | set remove private As. | | | | | **route\_policy** dictionary | | Apply route policy to neighbor. | | | | | | **inbound** string | | Apply route policy to inbound routes. | | | | | | **outbound** string | | Apply route policy to outbound routes. | | | | | **route\_reflector\_client** dictionary | | Configure a neighbor as Route Reflector client. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent route-reflector-client from being inherited from the parent. | | | | | | **set** boolean | **Choices:*** no * yes | set route-reflector-client. | | | | | **safi** string | **Choices:*** flowspec * mdt * multicast * mvpn * rt-filter * tunnel * unicast * labeled-unicast | Address Family modifier | | | | | **send\_community\_ebgp** dictionary | | Send community attribute to this external neighbor. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent send\_community\_ebgp from being inherited from the parent. | | | | | | **set** boolean | **Choices:*** no * yes | set send\_community\_ebgp. | | | | | **send\_community\_gshut\_ebgp** dictionary | | Allow the g-shut community to be sent to this external neighbor. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent send\_community\_gshut\_ebgp from being inherited from the parent. | | | | | | **set** boolean | **Choices:*** no * yes | set send\_community\_gshut\_ebgp. | | | | | **send\_extended\_community\_ebgp** dictionary | | Send extended community attribute to this external neighbor. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent send\_extended\_community\_ebgp from being inherited from the parent. | | | | | | **set** boolean | **Choices:*** no * yes | set send\_extended\_community\_ebgp. | | | | | **send\_multicast\_attributes** dictionary | | Send multicast attributes to this neighbor . | | | | | | **disable** boolean | **Choices:*** no * yes | Disable send multicast attributes. | | | | | | **set** boolean | **Choices:*** no * yes | set send\_multicast\_attributes. | | | | | **soft\_reconfiguration** dictionary | | Per neighbor soft reconfiguration. | | | | | | **inbound** dictionary | | inbound soft reconfiguration | | | | | | | **always** boolean | **Choices:*** no * yes | Allow inbound soft reconfiguration for this neighbor. Always use soft reconfig, even if route refresh is supported. | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent soft\_reconfiguration from being inherited from the parent. | | | | | | | **set** boolean | **Choices:*** no * yes | set inbound | | | | | **validation** dictionary | | Flowspec Validation for this neighbor. | | | | | | **disable** boolean | **Choices:*** no * yes | disable validation. | | | | | | **redirect** boolean | **Choices:*** no * yes | Flowspec Redirect nexthop Validation. | | | | | | **set** boolean | **Choices:*** no * yes | set validation. | | | | | **weight** integer | | Set default weight for routes from this neighbor. | | | | **neighbor\_address** string / required | | Neighbor router address. | | | **vrfs** list / elements=dictionary | | Configure BGP neighbor afin a VRF. | | | | **neighbors** list / elements=dictionary | | A list of BGP neighbor address family configurations. | | | | | **address\_family** list / elements=dictionary | | Enable address family and enter its config mode | | | | | | **afi** string | **Choices:*** ipv4 * ipv6 | address family. | | | | | | **aigp** dictionary | | AIGP attribute | | | | | | | **disable** boolean | **Choices:*** no * yes | Ignore AIGP attribute. | | | | | | | **send\_cost\_community\_disable** boolean | **Choices:*** no * yes | send AIGP attribute. | | | | | | | **send\_med** dictionary | | send med options. | | | | | | | | **disable** boolean | **Choices:*** no * yes | disable Send AIGP value in MED. | | | | | | | | **set** boolean | **Choices:*** no * yes | set Send AIGP value in MED. | | | | | | | **set** boolean | **Choices:*** no * yes | Set AIGP attribute. | | | | | | **allowas\_in** dictionary | | Allow as-path with my AS present in it. | | | | | | | **set** boolean | **Choices:*** no * yes | set allowas\_in | | | | | | | **value** integer | | Number of occurences of AS number 1-10. | | | | | | **as\_overrride** dictionary | | Override matching AS-number while sending update | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent as-override from being inherited from the parent. | | | | | | | **set** boolean | **Choices:*** no * yes | set as\_override | | | | | | **capability\_orf\_prefix** string | **Choices:*** both * send * none * receive | Advertise address prefix ORF capability to this neighbor. | | | | | | **default\_originate** dictionary | | Originate default route to this neighbor. | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent default-originate from being inherited from the parent. | | | | | | | **route\_policy** string | | Route policy to specify criteria to originate default | | | | | | | **set** boolean | **Choices:*** no * yes | set default route. | | | | | | **long\_lived\_graceful\_restart** dictionary | | Enable long lived graceful restart support. | | | | | | | **capable** boolean | **Choices:*** no * yes | Treat neighbor as LLGR capable. | | | | | | | **stale\_time** dictionary | | Maximum time to wait before purging long-lived stale routes. | | | | | | | | **accept** integer | | max accept time | | | | | | | | **send** integer | | max send time | | | | | | **maximum\_prefix** dictionary | | Maximum number of prefixes to accept from this peer. | | | | | | | **discard\_extra\_paths** boolean | **Choices:*** no * yes | Discard extra paths when limit is exceeded. | | | | | | | **max\_limit** integer | | maximum no. of prefix limit.<1-4294967295. | | | | | | | **restart** integer | | Restart time interval. | | | | | | | **threshold\_value** integer | | hreshold value (%) at which to generate a warning msg <1-100>. | | | | | | | **warning\_only** boolean | **Choices:*** no * yes | Only give warning message when limit is exceeded. | | | | | | **multipath** boolean | **Choices:*** no * yes | Paths from this neighbor is eligible for multipath. | | | | | | **next\_hop\_self** dictionary | | Disable the next hop calculation for this neighbor. | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent next\_hop\_self from being inherited from the parent. | | | | | | | **set** boolean | **Choices:*** no * yes | set next hop self. | | | | | | **next\_hop\_unchanged** dictionary | | Disable the next hop calculation for this neighbor. | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent next\_hop\_unchanged from being inherited from the parent. | | | | | | | **multipath** boolean | **Choices:*** no * yes | Do not overwrite nexthop before advertising multipaths. | | | | | | | **set** boolean | **Choices:*** no * yes | set next hop unchanged. | | | | | | **optimal\_route\_reflection\_group\_name** string | | Configure optimal-route-reflection group. | | | | | | **orf\_route\_policy** string | | Specify ORF and inbound filtering criteria.' | | | | | | **remove\_private\_AS** dictionary | | Remove private AS number from outbound updates. | | | | | | | **entire\_aspath** boolean | **Choices:*** no * yes | remove only if all ASes in the path are private. | | | | | | | **inbound** boolean | **Choices:*** no * yes | Remove private AS number from inbound updates. | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent remove-private-AS from being inherited from the parent. | | | | | | | **set** boolean | **Choices:*** no * yes | set remove private As. | | | | | | **route\_policy** dictionary | | Apply route policy to neighbor. | | | | | | | **inbound** string | | Apply route policy to inbound routes. | | | | | | | **outbound** string | | Apply route policy to outbound routes. | | | | | | **route\_reflector\_client** dictionary | | Configure a neighbor as Route Reflector client. | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent route-reflector-client from being inherited from the parent. | | | | | | | **set** boolean | **Choices:*** no * yes | set route-reflector-client. | | | | | | **safi** string | **Choices:*** flowspec * multicast * mvpn * unicast * labeled-unicast | Address Family modifier | | | | | | **send\_community\_ebgp** dictionary | | Send community attribute to this external neighbor. | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent send\_community\_ebgp from being inherited from the parent. | | | | | | | **set** boolean | **Choices:*** no * yes | set send\_community\_ebgp. | | | | | | **send\_community\_gshut\_ebgp** dictionary | | Allow the g-shut community to be sent to this external neighbor. | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent send\_community\_gshut\_ebgp from being inherited from the parent. | | | | | | | **set** boolean | **Choices:*** no * yes | set send\_community\_gshut\_ebgp. | | | | | | **send\_extended\_community\_ebgp** dictionary | | Send extended community attribute to this external neighbor. | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent send\_extended\_community\_ebgp from being inherited from the parent. | | | | | | | **set** boolean | **Choices:*** no * yes | set send\_extended\_community\_ebgp. | | | | | | **site\_of\_origin** string | | Site-of-Origin extended community associated with the neighbor. | | | | | | **soft\_reconfiguration** dictionary | | Per neighbor soft reconfiguration. | | | | | | | **inbound** dictionary | | inbound soft reconfiguration | | | | | | | | **always** boolean | **Choices:*** no * yes | Allow inbound soft reconfiguration for this neighbor. Always use soft reconfig, even if route refresh is supported. | | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent soft\_reconfiguration from being inherited from the parent. | | | | | | | | **set** boolean | **Choices:*** no * yes | set inbound | | | | | | **validation** dictionary | | Flowspec Validation for this neighbor. | | | | | | | **disable** boolean | **Choices:*** no * yes | disable validation. | | | | | | | **redirect** boolean | **Choices:*** no * yes | Flowspec Redirect nexthop Validation. | | | | | | | **set** boolean | **Choices:*** no * yes | set validation. | | | | | | **weight** integer | | Set default weight for routes from this neighbor. | | | | | **neighbor\_address** string / required | | Neighbor router address. | | | | **vrf** string | | VRF name. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the Iosxr device by executing the command **show running-config router bgp**. 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:*** deleted * **merged** ← * overridden * replaced * gathered * rendered * parsed | The state the configuration should be left in. | Notes ----- Note * This module works with connection `network_cli`. Examples -------- ``` # Using merged # Before state: # ------------- # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.2.1 # address-family ipv4 unicast # address-family vpnv4 unicast # neighbor 192.0.2.2 # remote-as 65537 # neighbor 192.0.2.3 # remote-as 65538 # vrf vrf1 # rd auto # neighbor 192.0.2.4 # remote-as 65539 # vrf vrf2 # rd auto # neighbor 192.0.2.5 # remote-as 65540 - name: Merge the provided configuration with the existing running configuration cisco.iosxr.iosxr_bgp_neighbor_address_family: state: merged config: as_number: 65536 neighbors: - neighbor_address: 192.0.2.2 address_family: - afi: "ipv4" safi: "unicast" multipath: true default_originate: set: true weight: 5 - neighbor_address: 192.0.2.3 address_family: - afi: "ipv4" safi: "unicast" multipath: true default_originate: set: true weight: 4 vrfs: - vrf: vrf1 neighbors: - neighbor_address: 192.0.2.4 address_family: - afi: "ipv4" safi: "unicast" multipath: true default_originate: set: true capability_orf_prefix: both - vrf: vrf2 neighbors: - neighbor_address: 192.0.2.5 address_family: - afi: "ipv4" safi: "unicast" multipath: true default_originate: set: true capability_orf_prefix: both # Task output # ------------- # commands: # - router bgp 65536 # - neighbor 192.0.2.2 # - address-family ipv4 unicast # - default-originate # - multipath # - weight 5 # - neighbor 192.0.2.3 # - address-family ipv4 unicast # - default-originate # - multipath # - weight 4 # - vrf vrf1 # - neighbor 192.0.2.4 # - address-family ipv4 unicast # - capability orf prefix both # - default-originate # - multipath # - vrf vrf2 # - neighbor 192.0.2.5 # - address-family ipv4 unicast # - capability orf prefix both # - default-originate # - multipath # # # after: # as_number: 65536 # neighbors: # - neighbor_address: 192.0.2.2 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # weight: 5 # - neighbor_address: 192.0.2.3 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # weight: 4 # vrfs: # - vrf: vrf1 # neighbors: # - neighbor_address: 192.0.2.4 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # capability_orf_prefix: both # - vrf: vrf2 # neighbors: # - neighbor_address: 192.0.2.5 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # capability_orf_prefix: both # # # After state: # ------------- # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.1.1 # address-family ipv4 unicast # address-family vpnv4 unicast # neighbor 192.0.2.2 # remote-as 65537 # address-family ipv4 unicast # multipath # weight 5 # default-originate # neighbor 1.1.1.2 # remote-as 65538 # address-family ipv4 unicast # multipath # weight 5 # default-originate # vrf vrf1 # rd auto # neighbor 192.0.2.4 # remote-as 65539 # address-family ipv4 unicast # multipath # capability orf prefix both # default-originate # vrf vrf2 # rd auto # neighbor 192.0.2.5 # remote-as 65540 # address-family ipv4 unicast # multipath # capability orf prefix both # default-originate # # # Using delete # Before state: # ------------- # # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.1.1 # address-family ipv4 unicast # address-family vpnv4 unicast # neighbor 192.0.2.2 # remote-as 65537 # address-family ipv4 unicast # multipath # weight 5 # default-originate # neighbor 192.0.2.3 # remote-as 65538 # address-family ipv4 unicast # multipath # weight 5 # default-originate # vrf vrf1 # rd auto # neighbor 192.0.2.4 # remote-as 65539 # address-family ipv4 unicast # multipath # capability orf prefix both # default-originate # vrf vrf2 # rd auto # neighbor 192.0.2.5 # remote-as 65540 # address-family ipv4 unicast # multipath # capability orf prefix both # default-originate - name: Delete the provided configuration cisco.iosxr.iosxr_bgp_neighbor_address_family: state: deleted config: as_number: 65536 neighbors: - neighbor_address: 192.0.2.2 address_family: - afi: "ipv4" safi: "unicast" multipath: true default_originate: set: true weight: 5 # Task output # ------------- # # commands: # - router bgp 65536 # - neighbor 192.0.2.2 # - no address-family ipv4 unicast # # # after: # as_number: 65536 # neighbors: # - neighbor_address: 192.0.2.3 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # weight: 4 # vrfs: # - vrf: vrf1 # neighbors: # - neighbor_address: 192.0.2.4 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # capability_orf_prefix: both # - neighbor_address: 192.0.2.5 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # capability_orf_prefix: both # # # Using Replaced # Before state: # ------------- # # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.1.1 # address-family ipv4 unicast # address-family vpnv4 unicast # neighbor 192.0.2.2 # remote-as 65537 # address-family ipv4 unicast # multipath # weight 5 # default-originate # neighbor 192.0.2.3 # remote-as 65538 # address-family ipv4 unicast # multipath # weight 5 # default-originate # vrf vrf1 # rd auto # neighbor 192.0.2.4 # remote-as 65539 # address-family ipv4 unicast # multipath # capability orf prefix both # default-originate # vrf vrf2 # rd auto # neighbor 192.0.2.5 # remote-as 65540 # address-family ipv4 unicast # multipath # capability orf prefix both # default-originate - name: Replace the provided configuration with the existing running configuration cisco.iosxr.iosxr_bgp_neighbor_address_family: state: replaced config: as_number: 65536 neighbors: - neighbor_address: 192.0.2.2 address_family: - afi: "ipv4" safi: "unicast" default_originate: set: true weight: 4 # Task output # ------------- # commands: # - router bgp 65536 # - neighbor 192.0.2.2 # - address-family ipv4 unicast # - no multipath # - weight 4 # # after: # as_number: 65536 # neighbors: # - neighbor_address: 192.0.2.2 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # weight: 4 # - neighbor_address: 192.0.2.3 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # weight: 5 # vrfs: # - vrf: vrf1 # neighbors: # - neighbor_address: 192.0.2.4 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # capability_orf_prefix: both # - neighbor_address: 192.0.2.5 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # capability_orf_prefix: both # # After state: # ------------- # Nexus9000v# show running-config router bgp # router bgp 65536 # bgp router-id 192.0.1.1 # address-family ipv4 unicast # address-family vpnv4 unicast # neighbor 192.0.2.2 # remote-as 65537 # address-family ipv4 unicast # multipath # weight 4 # default-originate # neighbor 192.0.2.3 # remote-as 65538 # address-family ipv4 unicast # multipath # weight 5 # default-originate # vrf vrf1 # rd auto # neighbor 192.0.2.4 # remote-as 65539 # address-family ipv4 unicast # multipath # capability orf prefix both # default-originate # vrf vrf2 # rd auto # neighbor 192.0.2.5 # remote-as 65540 # address-family ipv4 unicast # multipath # capability orf prefix both # default-originate # # # Using overridden # Before state: # ------------- # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.1.1 # address-family ipv4 unicast # address-family vpnv4 unicast # neighbor 192.0.2.2 # remote-as 65537 # address-family ipv4 unicast # multipath # weight 5 # default-originate # neighbor 192.0.2.3 # remote-as 65538 # address-family ipv4 unicast # multipath # weight 5 # default-originate # vrf vrf1 # rd auto # neighbor 192.0.2.4 # remote-as 65539 # address-family ipv4 unicast # multipath # capability orf prefix both # default-originate # vrf vrf2 # rd auto # neighbor 192.0.2.5 # remote-as 65540 # address-family ipv4 unicast # multipath # capability orf prefix both # default-originate - name: override the provided configuration cisco.iosxr.iosxr_bgp_neighbor_address_family: state: overridden config: as_number: 65536 neighbors: - neighbor_address: 192.0.2.2 address_family: - afi: "ipv4" safi: "unicast" multipath: true default_originate: set: true weight: 5 # Task output # ------------- # # commands: # - router bgp 65536 # - neighbor 192.0.2.3 # - no address-family ipv4 unicast # - vrf vrf1 # - neighbor 192.0.2.4 # - no address-family ipv4 unicast # - vrf vrf1 # - neighbor 192.0.2.5 # - no address-family ipv4 unicast # # # # after: # as_number: 65536 # neighbors: # - neighbor_address: 192.0.2.2 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # weight: 5 # # After state: # ------------- # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.1.1 # address-family ipv4 unicast # address-family vpnv4 unicast # neighbor 192.0.2.2 # remote-as 65537 # address-family ipv4 unicast # multipath # weight 5 # default-originate # # # # Using rendered # Before state: # ------------- # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.2.1 # address-family ipv4 unicast # address-family vpnv4 unicast # neighbor 192.0.2.2 # remote-as 65537 # neighbor 192.0.2.3 # remote-as 65538 # vrf vrf1 # rd auto # neighbor 192.0.2.4 # remote-as 65539 # vrf vrf2 # rd auto # neighbor 192.0.2.5 # remote-as 65540 - name: Render platform specific configuration lines with state rendered (without connecting to the device) cisco.iosxr.iosxr_bgp_neighbor_address_family: state: rendered config: as_number: 65536 neighbors: - neighbor_address: 192.0.2.2 address_family: - afi: "ipv4" safi: "unicast" multipath: true default_originate: set: true weight: 5 - neighbor_address: 192.0.2.3 address_family: - afi: "ipv4" safi: "unicast" multipath: true default_originate: set: true weight: 4 vrfs: - vrf: vrf1 neighbors: - neighbor_address: 192.0.2.4 address_family: - afi: "ipv4" safi: "unicast" multipath: true default_originate: set: true capability_orf_prefix: both - vrf: vrf2 neighbors: - neighbor_address: 192.0.2.5 address_family: - afi: "ipv4" safi: "unicast" multipath: true default_originate: set: true capability_orf_prefix: both # Task output # ------------- # commands: # - router bgp 65536 # - neighbor 192.0.2.2 # - address-family ipv4 unicast # - default-originate # - multipath # - weight 5 # - neighbor 192.0.2.3 # - address-family ipv4 unicast # - default-originate # - multipath # - weight 4 # - vrf vrf1 # - neighbor 192.0.2.4 # - address-family ipv4 unicast # - capability orf prefix both # - default-originate # - multipath # - vrf vrf2 # - neighbor 192.0.2.5 # - address-family ipv4 unicast # - capability orf prefix both # - default-originate # - multipath # # Using parsed # #parsed.cfg #------------ # router bgp 65536 # bgp router-id 192.0.1.1 # address-family ipv4 unicast # address-family vpnv4 unicast # neighbor 192.0.2.2 # remote-as 65537 # address-family ipv4 unicast # multipath # weight 5 # default-originate # neighbor 1.1.1.2 # remote-as 65538 # address-family ipv4 unicast # multipath # weight 5 # default-originate # vrf vrf1 # rd auto # neighbor 192.0.2.4 # remote-as 65539 # address-family ipv4 unicast # multipath # capability orf prefix both # default-originate # vrf vrf2 # rd auto # neighbor 192.0.2.5 # remote-as 65540 # address-family ipv4 unicast # multipath # capability orf prefix both # default-originate - name: Parse externally provided BGP neighbor AF config cisco.iosxr.iosxr_bgp_neighbor_address_family: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # as_number: 65536 # neighbors: # - neighbor_address: 192.0.2.2 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # weight: 5 # - neighbor_address: 192.0.2.3 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # weight: 4 # vrfs: # - vrf: vrf1 # neighbors: # - neighbor_address: 192.0.2.4 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # capability_orf_prefix: both # - vrf: vrf2 # neighbors: # - neighbor_address: 192.0.2.5 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # capability_orf_prefix: both # # #Using Gathered #----------------- # Before state state: # ------------- # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.1.1 # address-family ipv4 unicast # address-family vpnv4 unicast # neighbor 192.0.2.2 # remote-as 65537 # address-family ipv4 unicast # multipath # weight 5 # default-originate # neighbor 1.1.1.2 # remote-as 65538 # address-family ipv4 unicast # multipath # weight 5 # default-originate # vrf vrf1 # rd auto # neighbor 192.0.2.4 # remote-as 65539 # address-family ipv4 unicast # multipath # capability orf prefix both # default-originate # vrf vrf2 # rd auto # neighbor 192.0.2.5 # remote-as 65540 # address-family ipv4 unicast # multipath # capability orf prefix both # default-originate # # # - name: Gathered the provided configuration with the existing running configuration cisco.iosxr.iosxr_bgp_neighbor_address_family: config: state: gathered # Task output # ----------------------- # gathered: # as_number: 65536 # neighbors: # - neighbor_address: 192.0.2.2 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # weight: 5 # - neighbor_address: 192.0.2.3 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # weight: 4 # vrfs: # - vrf: vrf1 # neighbors: # - neighbor_address: 192.0.2.4 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # capability_orf_prefix: both # - vrf: vrf2 # neighbors: # - neighbor_address: 192.0.2.5 # address_family: # - afi: "ipv4" # safi: "unicast" # multipath: true # default_originate: # set: true # capability_orf_prefix: both # ``` ### Authors * Ashwini Mhatre (@amhatre)
programming_docs
ansible cisco.iosxr.iosxr_banner – Manage multiline banners on Cisco IOS XR devices cisco.iosxr.iosxr\_banner – Manage multiline banners on Cisco IOS XR devices ============================================================================ Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_banner`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module will configure both exec and motd banners on remote device running Cisco IOS XR. It allows playbooks to add or remove banner text from the running configuration. 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. * ncclient >= 0.5.3 when using netconf * lxml >= 4.1.1 when using netconf Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **banner** string / required | **Choices:*** login * motd | Specifies the type of banner to configure on remote device. | | **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. | | | **transport** string | **Choices:*** **cli** ← * netconf | Specifies the type of connection based transport. | | | **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. | | **state** string | **Choices:*** **present** ← * absent | Existential state of the configuration on the device. | | **text** string | | Banner text to be configured. Accepts multi line string, without empty lines. When using a multi line string, the first and last characters must be the start and end delimiters for the banner Requires *state=present*. | Notes ----- Note * This module works with connection `network_cli` and `netconf`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). * 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: configure the login banner cisco.iosxr.iosxr_banner: banner: login text: | @this is my login banner that contains a multiline string@ state: present - name: remove the motd banner cisco.iosxr.iosxr_banner: banner: motd state: absent - name: Configure banner from file cisco.iosxr.iosxr_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 (empty list when no commands to send) | The list of configuration mode commands sent to device with transport `cli` **Sample:** ['banner login', '@this is my login banner', 'that contains a multiline', 'string@'] | | **xml** list / elements=string | always (empty list when no xml rpc to send) | NetConf rpc xml sent to device with transport `netconf` **Sample:** ['<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> <banners xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-cfg"> <banner xc:operation="merge"> <banner-name>motd</banner-name> <banner-text>Ansible banner example</banner-text> </banner> </banners> </config>'] | ### Authors * Trishna Guha (@trishnaguha) * Kedar Kekan (@kedarX) ansible cisco.iosxr.iosxr_bgp – Configure global BGP protocol settings on Cisco IOS-XR cisco.iosxr.iosxr\_bgp – Configure global BGP protocol settings on Cisco IOS-XR =============================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_bgp`. New in version 1.0.0: of cisco.iosxr * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in major release after 2023-01-29 Why Updated module released with more functionality. Alternative iosxr\_bgp\_global Synopsis -------- * This module provides configuration management of global BGP parameters on devices running Cisco IOS-XR Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | Specifies the BGP related configuration. | | | **address\_family** list / elements=dictionary | | Specifies BGP address family related configurations. | | | | **afi** string / required | **Choices:*** ipv4 * ipv6 | Type of address family to configure. | | | | **networks** list / elements=dictionary | | Specify networks to announce via BGP. For operation replace, this option is mutually exclusive with root level networks option. | | | | | **masklen** integer / required | | Subnet mask length for the network to announce(e.g, 8, 16, 24, etc.). | | | | | **network** string / required | | Network ID to announce via BGP. aliases: prefix | | | | | **route\_map** string | | Route map to modify the attributes. | | | | **redistribute** list / elements=dictionary | | Specifies the redistribute information from another routing protocol. | | | | | **id** string | | Identifier for the routing protocol for configuring redistribute information. Valid for protocols 'ospf', 'eigrp', 'isis' and 'ospfv3'. | | | | | **metric** integer | | Specifies the metric for redistributed routes. | | | | | **protocol** string / required | **Choices:*** ospf * ospfv3 * eigrp * isis * static * connected * lisp * mobile * rip * subscriber | Specifies the protocol for configuring redistribute information. | | | | | **route\_map** string | | Specifies the route map reference. | | | | **safi** string | **Choices:*** flowspec * **unicast** ← * multicast * labeled-unicast | Specifies the type of cast for the address family. | | | **bgp\_as** integer / required | | Specifies the BGP Autonomous System (AS) number to configure on the device. | | | **log\_neighbor\_changes** boolean | **Choices:*** no * yes | Enable/disable logging neighbor up/down and reset reason. | | | **neighbors** list / elements=dictionary | | Specifies BGP neighbor related configurations. | | | | **advertisement\_interval** integer | | Specifies the minimum interval (in seconds) between sending BGP routing updates. The range is from 0 to 600. | | | | **description** string | | Neighbor specific description. | | | | **ebgp\_multihop** integer | | Specifies the maximum hop count for EBGP neighbors not on directly connected networks. The range is from 0 to 255. | | | | **enabled** boolean | **Choices:*** no * yes | Administratively shutdown or enable a neighbor. | | | | **neighbor** string / required | | Neighbor router address. | | | | **password** string | | Password to authenticate the BGP peer connection. | | | | **remote\_as** integer / required | | Remote AS of the BGP neighbor to configure. | | | | **tcp\_mss** integer | | Specifies the TCP initial maximum segment size to use. The range is from 68 to 10000. | | | | **timers** dictionary | | Specifies BGP neighbor timer related configurations. | | | | | **holdtime** integer | | Interval after not receiving a keepalive message that the software declares a peer dead. The range is from 3 to 65535. | | | | | **keepalive** integer | | Frequency with which the Cisco IOS-XR software sends keepalive messages to its peer. The range is from 0 to 65535. | | | | | **min\_neighbor\_holdtime** integer | | Interval specifying the minimum acceptable hold-time from a BGP neighbor. The minimum acceptable hold-time must be less than, or equal to, the interval specified in the holdtime argument. The range is from 3 to 65535. | | | | **update\_source** string | | Source of the routing updates. | | | **router\_id** string | | Configures the BGP routing process router-id value. | | **operation** string | **Choices:*** **merge** ← * replace * override * delete | Specifies the operation to be performed on the BGP process configured on the device. In case of merge, the input configuration will be merged with the existing BGP configuration on the device. In case of replace, if there is a diff between the existing configuration and the input configuration, the existing configuration will be replaced by the input configuration for every option that has the diff. In case of override, all the existing BGP configuration will be removed from the device and replaced with the input configuration. In case of delete the existing BGP configuration will be removed from the device. | Notes ----- Note * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). Examples -------- ``` - name: configure global bgp as 65000 cisco.iosxr.iosxr_bgp: bgp_as: 65000 router_id: 1.1.1.1 neighbors: - neighbor: 182.168.10.1 remote_as: 500 description: PEER_1 - neighbor: 192.168.20.1 remote_as: 500 update_source: GigabitEthernet 0/0/0/0 address_family: - name: ipv4 cast: unicast networks: - network: 192.168.2.0/23 - network: 10.0.0.0/8 redistribute: - protocol: ospf id: 400 metric: 110 - name: remove bgp as 65000 from config ios_bgp: bgp_as: 65000 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:** ['router bgp 65000', 'bgp router-id 1.1.1.1', 'neighbor 182.168.10.1 remote-as 500', 'neighbor 182.168.10.1 description PEER\_1', 'neighbor 192.168.20.1 remote-as 500', 'neighbor 192.168.20.1 update-source GigabitEthernet0/0/0/0', 'address-family ipv4 unicast', 'redistribute ospf 400 metric 110', 'network 192.168.2.0/23', 'network 10.0.0.0/8', 'exit'] | Status ------ * This module will be removed in a major release after 2023-01-29. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Nilashish Chakraborty (@NilashishC) ansible cisco.iosxr.iosxr_command – Run commands on remote devices running Cisco IOS XR cisco.iosxr.iosxr\_command – Run commands on remote devices running Cisco IOS XR ================================================================================ Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_command`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Sends arbitrary commands to an IOS XR 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(iosxr\_config) to configure iosxr 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 iosxr 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 [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. | | | **transport** string | **Choices:*** **cli** ← * netconf | Specifies the type of connection based transport. | | | **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 * Make sure the user has been authorized to execute commands terminal length 0, terminal width 512 and terminal exec prompt no-timestamp. * This module works with `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). * This module does not support `netconf` connection. * 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.iosxr.iosxr_command: commands: show version - name: run show version and check to see if output contains iosxr cisco.iosxr.iosxr_command: commands: show version wait_for: result[0] contains IOS-XR - name: run multiple commands on remote nodes cisco.iosxr.iosxr_command: commands: - show version - show interfaces - {command: example command that prompts, prompt: expected prompt, answer: yes} - name: run multiple commands and evaluate the output cisco.iosxr.iosxr_command: commands: - show version - show interfaces wait_for: - result[0] contains IOS-XR - result[1] contains Loopback0 ``` 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 * Ricardo Carrillo Cruz (@rcarrillocruz)
programming_docs
ansible cisco.iosxr.iosxr_bgp_global – Manages BGP global resource module. cisco.iosxr.iosxr\_bgp\_global – Manages BGP global resource module. ==================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_bgp_global`. New in version 2.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module configures and manages the attributes of BGP global on Cisco IOS-XR platforms. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | A list of configurations for BGP global. | | | **as\_number** string | | Autonomous system number of the router. | | | **bfd** dictionary | | Configure BFD parameters. | | | | **minimum\_interval** integer | | Specifies the BFD session's minimum-interval value for the neighbor. | | | | **multiplier** integer | | Specifies the BFD session's multiplier value for the neighbor. | | | **bgp** dictionary | | BGP parameters. | | | | **as\_path\_loopcheck** boolean | **Choices:*** no * yes | Enable AS-path loop checking for iBGP peers. | | | | **auto\_policy\_soft\_reset** dictionary | | Enable automatic soft peer reset on policy reconfiguration. | | | | | **disable** boolean | **Choices:*** no * yes | Disable an automatic soft reset of Border Gateway Protocol (BGP) peers. | | | | **bestpath** dictionary | | Select the bestpath selection algorithim for BGP routes. | | | | | **aigp** dictionary | | AIGP attribute | | | | | | **ignore** boolean | **Choices:*** no * yes | Ignore AIGP attribute. | | | | | **as\_path** dictionary | | Select the bestpath selection based on as-path. | | | | | | **ignore** boolean | **Choices:*** no * yes | ignore | | | | | | **multipath\_relax** boolean | **Choices:*** no * yes | multipath-relax | | | | | **compare\_routerid** boolean | **Choices:*** no * yes | Compare router-id for identical EBGP paths. | | | | | **cost\_community** dictionary | | Cost community. | | | | | | **ignore** boolean | **Choices:*** no * yes | ignore cost\_community | | | | | **med** dictionary | | MED attribute | | | | | | **always** boolean | **Choices:*** no * yes | Allow comparing MED from different neighbors. | | | | | | **confed** boolean | **Choices:*** no * yes | Compare MED among confederation paths. | | | | | | **missing\_as\_worst** boolean | **Choices:*** no * yes | Treat missing MED as the least preferred one. | | | | | **origin\_as** dictionary | | BGP origin-AS knobs. | | | | | | **allow** dictionary | | BGP origin-AS knobs. | | | | | | | **invalid** boolean | **Choices:*** no * yes | BGP bestpath selection will allow 'invalid' origin-AS | | | | | | **use** dictionary | | BGP origin-AS knobs. | | | | | | | **validity** boolean | **Choices:*** no * yes | BGP bestpath selection will use origin-AS validity | | | | **cluster\_id** string | | Cluster ID of this router acting as a route reflector. | | | | **confederation** dictionary | | confederation. | | | | | **identifier** integer | | Set routing domain confederation AS. | | | | | **peers** list / elements=integer | | Enter peer ASs in BGP confederation mode. | | | | **default** dictionary | | Configure default value. | | | | | **local\_preference** integer | | local preferance. Please refer vendor documentation for valid values | | | | **enforce\_first\_as** dictionary | | Enforce the first AS for EBGP routes | | | | | **disable** boolean | **Choices:*** no * yes | disable enforce 1st as | | | | **fast\_external\_fallover** dictionary | | Immediately reset session if a link to a directly connected external peer goes down. | | | | | **disable** boolean | **Choices:*** no * yes | disable fast external fallover. | | | | **graceful\_restart** dictionary | | Enable graceful restart support. | | | | | **graceful\_reset** boolean | **Choices:*** no * yes | Reset gracefully if configuration change forces a peer reset. | | | | | **purge\_time** integer | | Time before stale routes are purged in seconds <1-6000>. | | | | | **restart\_time** integer | | Restart time advertised to neighbors in seconds <1-4095>. | | | | | **set** boolean | **Choices:*** no * yes | Enable graceful-restart. | | | | | **stalepath\_time** integer | | Maximum time to wait for restart of GR capable peers in seconds <1-4095>. | | | | **install** dictionary | | Install diversion path to RIB/CEF. | | | | | **diversion** boolean | **Choices:*** no * yes | Install diversion path to RIB/CEF. | | | | **log** dictionary | | Log bgp info | | | | | **log\_message** dictionary | | Log neighbor inbound/outbound message. | | | | | | **disable** boolean | **Choices:*** no * yes | disable inbound outbound messages. | | | | | **neighbor** dictionary | | Log neighbor state info. | | | | | | **changes** dictionary | | Log neighbor up/down and reset reason. | | | | | | | **detail** boolean | **Choices:*** no * yes | detail | | | | | | | **disable** boolean | **Choices:*** no * yes | disable | | | | **maximum** dictionary | | Maximum number of neighbors that can be configured | | | | | **neighbor** integer | | Maximum number of neighbors <1-15000>. | | | | **multipath** dictionary | | Change multipath selection criteria | | | | | **as\_path** dictionary | | AS path | | | | | | **ignore** dictionary | | Ignore as-path related check for multipath selection. | | | | | | | **onwards** boolean | **Choices:*** no * yes | Ignore everything onwards as-path for multipath selection. | | | | **origin\_as** dictionary | | BGP origin-AS knobs. | | | | | **validation** dictionary | | BGP origin-AS validation knobs. | | | | | | **disable** boolean | **Choices:*** no * yes | Disable RPKI origin-AS validation. | | | | | | **signal** dictionary | | Signal origin-AS validity towards peers. | | | | | | | **ibgp** boolean | **Choices:*** no * yes | Signal origin-AS validity towards iBGP peers | | | | | | **time** dictionary | | Time to wait between an RPKI update and a BGP table walk. | | | | | | | **time\_in\_second** integer | | Prefix validation time (in seconds). | | | | | | | **time\_off** boolean | **Choices:*** no * yes | No automatic prefix validation after an RPKI update. | | | | **redistribute\_internal** boolean | **Choices:*** no * yes | Redistribute internal BGP routes. | | | | **router\_id** string | | Configure Router-id. Example- A.B.C.D IPv4 address. | | | | **scan\_time** integer | | Configure background scanner interval for generic scanner Example- <5-3600>. | | | | **unsafe\_ebgp\_policy** boolean | **Choices:*** no * yes | Make eBGP neighbors with no policy pass all routes(cisco-support). | | | | **update\_delay** integer | | Set the max initial delay for sending updates Example-<0-3600> in secs. | | | **default\_information** dictionary | | Control distribution of default information. | | | | **originate** boolean | **Choices:*** no * yes | Distribute a default route | | | **default\_metric** integer | | Default metric. Example-<1-4294967295>. | | | **graceful\_maintenance** dictionary | | This allows the router to be brought in or out of service gracefully. | | | | **activate** string | **Choices:*** all-neighbors * retain-routes * all-neighbors retain-routes * | All neighbors with graceful-maintenance config | | | **ibgp** dictionary | | Set options for iBGP peers. | | | | **policy** dictionary | | Set options for route-policy. | | | | | **out** dictionary | | Set options for outbound policy. | | | | | | **enforce\_modifications** boolean | **Choices:*** no * yes | Allow policy to modify all attributes. | | | **mpls** dictionary | | Enable mpls parameters. | | | | **activate** dictionary | | Enter mpls interfaces in BGP mpls activate mode. | | | | | **interface** string | | Name of interface to enable mpls. | | | **mvpn** boolean | **Choices:*** no * yes | Connect to PIM/PIM6. | | | **neighbors** list / elements=dictionary | | Specify a neighbor router. | | | | **advertisement\_interval** integer | | Minimum interval between sending BGP routing updates.Example-<0-600>. | | | | **bfd** dictionary | | Configure BFD parameters. | | | | | **fast\_detect** dictionary | | Enable Fast detection | | | | | | **disable** boolean | **Choices:*** no * yes | Prevent bfd settings from being inherited from the parent. | | | | | | **strict\_mode** boolean | **Choices:*** no * yes | Hold down neighbor session until BFD session is up | | | | | **minimum\_interval** integer | | Specifies the BFD session's minimum-interval value for the neighbor. | | | | | **multiplier** integer | | Specifies the BFD session's multiplier value for the neighbor. | | | | **bmp\_activate** dictionary | | Enable BMP logging for this neighbor. | | | | | **server** integer | | Enable BMP connection to particular server.Example-<1-8>. | | | | **capability** dictionary | | Advertise capability to the peer. | | | | | **additional\_paths** dictionary | | BGP additional-paths commands. | | | | | | **receive** dictionary | | Additional paths receive capability | | | | | | | **disable** boolean | **Choices:*** no * yes | set receive capability | | | | | | | **set** boolean | **Choices:*** no * yes | set receive capability | | | | | | **send** dictionary | | Additional paths Send capability | | | | | | | **disable** boolean | **Choices:*** no * yes | set send capability | | | | | | | **set** boolean | **Choices:*** no * yes | set send capability | | | | | **suppress** dictionary | | Suppress advertising capability to the peer. | | | | | | **all** dictionary | | all capability | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Do not inherit this configuration from parent group. | | | | | | | **set** boolean | **Choices:*** no * yes | set all. | | | | | | **four\_byte\_AS** dictionary | | 4-byte-as capability | | | | | | | **set** boolean | **Choices:*** no * yes | set 4\_byte\_as. | | | | **cluster\_id** string | | Cluster ID of this router acting as a route reflector. | | | | **description** string | | Neighbor specific description. | | | | **dmz\_link\_bandwidth** dictionary | | Propagate the DMZ link bandwidth. | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Do not inherit this configuration from parent group. | | | | | **set** boolean | **Choices:*** no * yes | set dmz-link-bandwidth. | | | | **dscp** string | | Set IP DSCP (DiffServ CodePoint).Please refer vendor document for valid entries. | | | | **ebgp\_multihop** dictionary | | Allow EBGP neighbors not on directly connected networks. | | | | | **mpls** boolean | **Choices:*** no * yes | Disable BGP MPLS forwarding. | | | | | **value** integer | | maximum hop count.Example-<1-255>. | | | | **ebgp\_recv\_extcommunity\_dmz** dictionary | | Receive extcommunity dmz link bandwidth from ebgp neighbor. | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent ebgp-recv-community-dmz from being inherited from parent | | | | | **set** boolean | **Choices:*** no * yes | set ebgp-recv-community-dmz. | | | | **ebgp\_send\_extcommunity\_dmz** dictionary | | Send extcommunity dmz link bandwidth from ebgp neighbor. | | | | | **cumulatie** boolean | **Choices:*** no * yes | Send cumulative community dmz link bandwidth of all multipaths to ebgp neighbor. | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent ebgp-send-community-dmz from being inherited from parent | | | | | **set** boolean | **Choices:*** no * yes | set ebgp-send-community-dmz. | | | | **egress\_engineering** dictionary | | Enable egress peer engineering for this neighbor. | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent egress-engineering from being inherited from parent | | | | | **set** boolean | **Choices:*** no * yes | set egress-engineering. | | | | **enforce\_first\_as** dictionary | | Enforce the first AS for EBGP routes | | | | | **disable** boolean | **Choices:*** no * yes | disable enforce 1st as | | | | **graceful\_maintenance** dictionary | | Attributes for Graceful Maintenance. This will cause neighbors to de-prefer routes from this router and choose alternates. This allows the router to be brought in or out of service gracefully. | | | | | **activate** dictionary | | Routes will be announced with the graceful maintenance attributes while activated either here or under router bgp configuration. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent activate from being inherited from the parent. | | | | | | **set** boolean | **Choices:*** no * yes | activate. | | | | | **as\_prepends** dictionary | | Number of times to prepend the local AS number to the AS path of routes. Default=0 | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent as prepends from being inherited from the parent. | | | | | | **value** integer | | Range of values for as prepends.Example-<0-6> . | | | | | **local\_preference** dictionary | | local preference with which to advertise routes to ibgp neigbors. Default=No Touch | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent local preference from being inherited from the parent. | | | | | | **value** integer | | Range of values for Local Preference.Example-<0-4294967295> . | | | | | **set** boolean | **Choices:*** no * yes | set graceful maintenance. | | | | **graceful\_restart** dictionary | | Enable graceful restart support for this neighbor. | | | | | **restart\_time** integer | | Restart time advertised to neighbors in seconds <1-4095>. | | | | | **stalepath\_time** integer | | Maximum time to wait for restart of GR capable peers in seconds <1-4095>. | | | | **ignore\_connected\_check** dictionary | | Bypass the directly connected nexthop check for single-hop eBGP peering | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent ignore-connected-check from being inherited from the parent | | | | | **set** boolean | **Choices:*** no * yes | set ignore-connected-check. | | | | **keychain** dictionary | | Set keychain based authentication. | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent keychain from being inherited from parent. | | | | | **name** string | | Name of the key chain - maximum 32 characters. | | | | **local** dictionary | | Configure local parameter | | | | | **address** dictionary | | IPv4 address | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent local address from being inherited from parent. | | | | | | **ipv4\_address** string | | IPv4 address <A.B.C.D>. | | | | **local\_as** dictionary | | Specify local AS number. | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent local AS from being inherited from parent. | | | | | **value** integer | | 2 byte, 4 byte As number | | | | **log** dictionary | | Logging update messages per neighbor. | | | | | **log\_message** dictionary | | Logging update/notification messages per neighbor. | | | | | | **in** dictionary | | Inbound log messages | | | | | | | **disable** boolean | **Choices:*** no * yes | Disable inbound message logging. | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevents the msg log from being inherited from the parent. | | | | | | | **value** integer | | Range for message log buffer size <1-100>. | | | | | | **out** dictionary | | Outbound log messages | | | | | | | **disable** boolean | **Choices:*** no * yes | Disable inbound message logging. | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevents the msg log from being inherited from the parent. | | | | | | | **value** integer | | Range for message log buffer size <1-100>. | | | | **neighbor** string / required | | Neighbor router address. | | | | **origin\_as** dictionary | | BGP origin-AS knobs. | | | | | **validation** dictionary | | BGP origin-AS validation knobs. | | | | | | **disable** boolean | **Choices:*** no * yes | Disable RPKI origin-AS validation. | | | | **receive\_buffer\_size** integer | | Set socket and BGP receive buffer size.Example <512-131072>. | | | | **remote\_as** integer | | Neighbor Autonomous System. | | | | **send\_buffer\_size** integer | | Set socket and BGP send buffer size.Example <4096-131072>. | | | | **session\_open\_mode** string | **Choices:*** active-only * both * passive-only | Establish BGP session using this TCP open mode. | | | | **shutdown** dictionary | | Administratively shut down this neighbor. | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent shutdown from being inherited from parent | | | | | **set** boolean | **Choices:*** no * yes | shutdown. | | | | **tcp** dictionary | | TCP session configuration commands. | | | | | **mss** dictionary | | Maximum Segment Size. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent mss from being inherited from parent | | | | | | **value** integer | | TCP initial maximum segment size. | | | | **timers** dictionary | | BGP per neighbor timers. | | | | | **holdtime** integer | | hold time <3-65535> or 0 Disable hold time. | | | | | **keepalive\_time** integer | | keepalive interval <0-65535>. | | | | **ttl\_security** dictionary | | Enable EBGP TTL security. | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent ttl-security from being inherited from parent | | | | | **set** boolean | **Choices:*** no * yes | set ttl-security | | | | **update** dictionary | | BGP Update configuration. | | | | | **in** dictionary | | Inbound update message handling. | | | | | | **filtering** dictionary | | Inbound update message filtering | | | | | | | **attribute\_filter** dictionary | | Attribute-filter configuration. | | | | | | | | **group** string | | Name of group. | | | | | | | **logging** dictionary | | Update filtering syslog message. | | | | | | | | **disable** boolean | **Choices:*** no * yes | Disable update filtering syslog message. | | | | | | | **update\_message** dictionary | | Filtered update messages. | | | | | | | | **buffers** integer | | Number of buffers to store filtered update messages. | | | | **update\_source** string | | Source of routing updates.Refer vendor document for valid values. | | | **nsr** dictionary | | Enable non-stop-routing support for all neighbors. | | | | **disable** boolean | **Choices:*** no * yes | disable nsr | | | | **set** boolean | **Choices:*** no * yes | set nsr | | | **rpki** dictionary | | Configure RPKI. | | | | **route** dictionary | | Configure an RPKI route.A.B.C.D/length or X:X::X/length Network/Minimum prefix length | | | | | **max** integer | | Maximum prefix length. Example- <1-128> . | | | | | **origin** integer | | Origin Autonomous System number (in asplain format) Example-<1-4294967295>. | | | | | **value** string | | A.B.C.D/length or X:X::X/length Network/Minimum prefix length. | | | | **servers** list / elements=dictionary | | Configure RPKI cache-servers. | | | | | **name** string | | address of rpki server. | | | | | **purge\_time** integer | | Time to wait after a cache goes down to clean up stale routes | | | | | **refresh\_time** dictionary | | Time between sending serial-queries for the RPKI cache-server | | | | | | **time\_off** boolean | **Choices:*** no * yes | Do not send serial-queries periodically | | | | | | **value** integer | | Purge time (in seconds) <30-360> | | | | | **response\_time** dictionary | | Time to wait for a response from the RPKI cache-server | | | | | | **time\_off** boolean | **Choices:*** no * yes | Wait indefinitely for a response | | | | | | **value** integer | | Purge time (in seconds) <15-3600> | | | | | **shutdown** boolean | **Choices:*** no * yes | Shutdown the RPKI cache-server | | | | | **transport** dictionary | | Specify a transport method for the RPKI cache-server | | | | | | **ssh** dictionary | | Connect to the RPKI cache-server using SSH | | | | | | | **port** integer | | Specify a port number for the RPKI cache-server transport | | | | | | **tcp** dictionary | | Connect to the RPKI cache-server using TCP (unencrypted) | | | | | | | **port** integer | | Specify a port number for the RPKI cache-server transport | | | **socket** dictionary | | set socket parameters. | | | | **receive\_buffer\_size** integer | | socket receive buffer size.Example-<512-131072>. | | | | **send\_buffer\_size** integer | | socket send buffer size.Example- <4096-131072>. | | | **timers** dictionary | | BGP per neighbor timers. | | | | **holdtime** integer | | hold time <3-65535> or 0 Disable hold time. | | | | **keepalive\_time** integer | | keepalive interval <0-65535>. | | | **update** dictionary | | BGP Update configuration. | | | | **in** dictionary | | Inbound update message handling | | | | | **error\_handling** dictionary | | Inbound update message error handling. | | | | | | **basic** dictionary | | Inbound update message basic error handling | | | | | | | **ebgp** dictionary | | Inbound update message basic error handling for EBGP neighbors | | | | | | | | **disable** boolean | **Choices:*** no * yes | disable | | | | | | | **ibgp** dictionary | | Inbound update message basic error handling for ibgp neighbors | | | | | | | | **disable** boolean | **Choices:*** no * yes | disable | | | | | | **extended** dictionary | | Inbound update message extended error handling | | | | | | | **ebgp** boolean | **Choices:*** no * yes | Inbound update message extended error handling for EBGP neighbors | | | | | | | **ibgp** boolean | **Choices:*** no * yes | Inbound update message extended error handling for ibgp neighbors | | | | **limit** integer | | Upper bound on transient memory usage for update generation.Example-<16-2048>. | | | | **out** dictionary | | BGP Update generation configuration. | | | | | **logging** boolean | **Choices:*** no * yes | Enable logging of update generation events. | | | **vrfs** list / elements=dictionary | | Specify a vrf name. | | | | **bfd** dictionary | | Configure BFD parameters. | | | | | **minimum\_interval** integer | | Specifies the BFD session's minimum-interval value for the neighbor. | | | | | **multiplier** integer | | Specifies the BFD session's multiplier value for the neighbor. | | | | **bgp** dictionary | | BGP commands. | | | | | **auto\_policy\_soft\_reset** dictionary | | Enable automatic soft peer reset on policy reconfiguration. | | | | | | **disable** boolean | **Choices:*** no * yes | Disable an automatic soft reset of Border Gateway Protocol (BGP) peers. | | | | | **bestpath** dictionary | | Select the bestpath selection algorithim for BGP routes. | | | | | | **aigp** dictionary | | AIGP attribute | | | | | | | **ignore** boolean | **Choices:*** no * yes | Ignore AIGP attribute. | | | | | | **as\_path** dictionary | | Select the bestpath selection based on as-path. | | | | | | | **ignore** boolean | **Choices:*** no * yes | ignore | | | | | | | **multipath\_relax** boolean | **Choices:*** no * yes | multipath-relax | | | | | | **compare\_routerid** boolean | **Choices:*** no * yes | Compare router-id for identical EBGP paths. | | | | | | **cost\_community** dictionary | | Cost community. | | | | | | | **ignore** boolean | **Choices:*** no * yes | ignore cost\_community | | | | | | **med** dictionary | | MED attribute | | | | | | | **always** boolean | **Choices:*** no * yes | Allow comparing MED from different neighbors. | | | | | | | **confed** boolean | **Choices:*** no * yes | Compare MED among confederation paths. | | | | | | | **missing\_as\_worst** boolean | **Choices:*** no * yes | Treat missing MED as the least preferred one. | | | | | | **origin\_as** dictionary | | BGP origin-AS knobs. | | | | | | | **allow** dictionary | | BGP origin-AS knobs. | | | | | | | | **invalid** boolean | **Choices:*** no * yes | BGP bestpath selection will allow 'invalid' origin-AS | | | | | | | **use** dictionary | | BGP origin-AS knobs. | | | | | | | | **validity** boolean | **Choices:*** no * yes | BGP bestpath selection will use origin-AS validity | | | | | **default** dictionary | | Configure default value. | | | | | | **local\_preference** integer | | local preferance. Please refer vendor documentation for valid values | | | | | **enforce\_first\_as** dictionary | | Enforce the first AS for EBGP routes | | | | | | **disable** boolean | **Choices:*** no * yes | disable enforce 1st as | | | | | **fast\_external\_fallover** dictionary | | Immediately reset session if a link to a directly connected external peer goes down. | | | | | | **disable** boolean | **Choices:*** no * yes | disable fast external fallover. | | | | | **log** dictionary | | Log bgp info | | | | | | **log\_message** dictionary | | Log neighbor inbound/outbound message. | | | | | | | **disable** boolean | **Choices:*** no * yes | disable inbound outbound messages. | | | | | | **neighbor** dictionary | | Log neighbor state info. | | | | | | | **changes** dictionary | | Log neighbor up/down and reset reason. | | | | | | | | **detail** boolean | **Choices:*** no * yes | detail | | | | | | | | **disable** boolean | **Choices:*** no * yes | disable | | | | | **multipath** dictionary | | Change multipath selection criteria | | | | | | **as\_path** dictionary | | AS path | | | | | | | **ignore** dictionary | | Ignore as-path related check for multipath selection. | | | | | | | | **onwards** boolean | **Choices:*** no * yes | Ignore everything onwards as-path for multipath selection. | | | | | **redistribute\_internal** boolean | **Choices:*** no * yes | Redistribute internal BGP routes. | | | | | **router\_id** string | | Configure Router-id. Example- A.B.C.D IPv4 address. | | | | | **unsafe\_ebgp\_policy** boolean | **Choices:*** no * yes | Make eBGP neighbors with no policy pass all routes(cisco-support). | | | | **default\_information** dictionary | | Control distribution of default information. | | | | | **originate** boolean | **Choices:*** no * yes | Distribute a default route | | | | **default\_metric** integer | | Default metric. Example-<1-4294967295>. | | | | **mpls** dictionary | | Enable mpls parameters. | | | | | **activate** dictionary | | Enter mpls interfaces in BGP mpls activate mode. | | | | | | **interface** string | | Name of interface to enable mpls. | | | | **neighbors** list / elements=dictionary | | Specify a neighbor router. | | | | | **advertisement\_interval** integer | | Minimum interval between sending BGP routing updates.Example-<0-600>. | | | | | **bfd** dictionary | | Configure BFD parameters. | | | | | | **fast\_detect** dictionary | | Enable Fast detection | | | | | | | **disable** boolean | **Choices:*** no * yes | Prevent bfd settings from being inherited from the parent. | | | | | | | **strict\_mode** boolean | **Choices:*** no * yes | Hold down neighbor session until BFD session is up | | | | | | **minimum\_interval** integer | | Specifies the BFD session's minimum-interval value for the neighbor. | | | | | | **multiplier** integer | | Specifies the BFD session's multiplier value for the neighbor. | | | | | **bmp\_activate** dictionary | | Enable BMP logging for this neighbor. | | | | | | **server** integer | | Enable BMP connection to particular server.Example-<1-8>. | | | | | **capability** dictionary | | Advertise capability to the peer. | | | | | | **additional\_paths** dictionary | | BGP additional-paths commands. | | | | | | | **receive** dictionary | | Additional paths receive capability | | | | | | | | **disable** boolean | **Choices:*** no * yes | set receive capability | | | | | | | | **set** boolean | **Choices:*** no * yes | set receive capability | | | | | | | **send** dictionary | | Additional paths Send capability | | | | | | | | **disable** boolean | **Choices:*** no * yes | set send capability | | | | | | | | **set** boolean | **Choices:*** no * yes | set send capability | | | | | | **suppress** dictionary | | Suppress advertising capability to the peer. | | | | | | | **all** dictionary | | all capability | | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Do not inherit this configuration from parent group. | | | | | | | | **set** boolean | **Choices:*** no * yes | set all. | | | | | | | **four\_byte\_AS** dictionary | | 4-byte-as capability | | | | | | | | **set** boolean | **Choices:*** no * yes | set 4\_byte\_as. | | | | | **cluster\_id** string | | Cluster ID of this router acting as a route reflector. | | | | | **description** string | | Neighbor specific description. | | | | | **dmz\_link\_bandwidth** dictionary | | Propagate the DMZ link bandwidth. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Do not inherit this configuration from parent group. | | | | | | **set** boolean | **Choices:*** no * yes | set dmz-link-bandwidth. | | | | | **dscp** string | | Set IP DSCP (DiffServ CodePoint).Please refer vendor document for valid entries. | | | | | **ebgp\_multihop** dictionary | | Allow EBGP neighbors not on directly connected networks. | | | | | | **mpls** boolean | **Choices:*** no * yes | Disable BGP MPLS forwarding. | | | | | | **value** integer | | maximum hop count.Example-<1-255>. | | | | | **ebgp\_recv\_extcommunity\_dmz** dictionary | | Receive extcommunity dmz link bandwidth from ebgp neighbor. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent ebgp-recv-community-dmz from being inherited from parent | | | | | | **set** boolean | **Choices:*** no * yes | set ebgp-recv-community-dmz. | | | | | **ebgp\_send\_extcommunity\_dmz** dictionary | | Send extcommunity dmz link bandwidth from ebgp neighbor. | | | | | | **cumulatie** boolean | **Choices:*** no * yes | Send cumulative community dmz link bandwidth of all multipaths to ebgp neighbor. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent ebgp-send-community-dmz from being inherited from parent | | | | | | **set** boolean | **Choices:*** no * yes | set ebgp-send-community-dmz. | | | | | **egress\_engineering** dictionary | | Enable egress peer engineering for this neighbor. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent egress-engineering from being inherited from parent | | | | | | **set** boolean | **Choices:*** no * yes | set egress-engineering. | | | | | **enforce\_first\_as** dictionary | | Enforce the first AS for EBGP routes | | | | | | **disable** boolean | **Choices:*** no * yes | disable enforce 1st as | | | | | **graceful\_maintenance** dictionary | | Attributes for Graceful Maintenance. This will cause neighbors to de-prefer routes from this router and choose alternates. This allows the router to be brought in or out of service gracefully. | | | | | | **activate** dictionary | | Routes will be announced with the graceful maintenance attributes while activated either here or under router bgp configuration. | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent activate from being inherited from the parent. | | | | | | | **set** boolean | **Choices:*** no * yes | activate. | | | | | | **as\_prepends** dictionary | | Number of times to prepend the local AS number to the AS path of routes. Default=0 | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent as prepends from being inherited from the parent. | | | | | | | **value** integer | | Range of values for as prepends.Example-<0-6> . | | | | | | **local\_preference** dictionary | | local preference with which to advertise routes to ibgp neigbors. Default=No Touch | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent local preference from being inherited from the parent. | | | | | | | **value** integer | | Range of values for Local Preference.Example-<0-4294967295> . | | | | | | **set** boolean | **Choices:*** no * yes | set graceful maintenance. | | | | | **graceful\_restart** dictionary | | Enable graceful restart support for this neighbor. | | | | | | **restart\_time** integer | | Restart time advertised to neighbors in seconds <1-4095>. | | | | | | **stalepath\_time** integer | | Maximum time to wait for restart of GR capable peers in seconds <1-4095>. | | | | | **ignore\_connected\_check** dictionary | | Bypass the directly connected nexthop check for single-hop eBGP peering | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent ignore-connected-check from being inherited from the parent | | | | | | **set** boolean | **Choices:*** no * yes | set ignore-connected-check. | | | | | **keychain** dictionary | | Set keychain based authentication. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent keychain from being inherited from parent. | | | | | | **name** string | | Name of the key chain - maximum 32 characters. | | | | | **local** dictionary | | Configure local parameter | | | | | | **address** dictionary | | IPv4 address | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent local address from being inherited from parent. | | | | | | | **ipv4\_address** string | | IPv4 address <A.B.C.D>. | | | | | **local\_as** dictionary | | Specify local AS number. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent local AS from being inherited from parent. | | | | | | **value** integer | | 2 byte, 4 byte As number | | | | | **log** dictionary | | Logging update messages per neighbor. | | | | | | **log\_message** dictionary | | Logging update/notification messages per neighbor. | | | | | | | **in** dictionary | | Inbound log messages | | | | | | | | **disable** boolean | **Choices:*** no * yes | Disable inbound message logging. | | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevents the msg log from being inherited from the parent. | | | | | | | | **value** integer | | Range for message log buffer size <1-100>. | | | | | | | **out** dictionary | | Outbound log messages | | | | | | | | **disable** boolean | **Choices:*** no * yes | Disable inbound message logging. | | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevents the msg log from being inherited from the parent. | | | | | | | | **value** integer | | Range for message log buffer size <1-100>. | | | | | **neighbor** string / required | | Neighbor router address. | | | | | **origin\_as** dictionary | | BGP origin-AS knobs. | | | | | | **validation** dictionary | | BGP origin-AS validation knobs. | | | | | | | **disable** boolean | **Choices:*** no * yes | Disable RPKI origin-AS validation. | | | | | **receive\_buffer\_size** integer | | Set socket and BGP receive buffer size.Example <512-131072>. | | | | | **remote\_as** integer | | Neighbor Autonomous System. | | | | | **send\_buffer\_size** integer | | Set socket and BGP send buffer size.Example <4096-131072>. | | | | | **session\_open\_mode** string | **Choices:*** active-only * both * passive-only | Establish BGP session using this TCP open mode. | | | | | **shutdown** dictionary | | Administratively shut down this neighbor. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent shutdown from being inherited from parent | | | | | | **set** boolean | **Choices:*** no * yes | shutdown. | | | | | **tcp** dictionary | | TCP session configuration commands. | | | | | | **mss** dictionary | | Maximum Segment Size. | | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent mss from being inherited from parent | | | | | | | **value** integer | | TCP initial maximum segment size. | | | | | **timers** dictionary | | BGP per neighbor timers. | | | | | | **holdtime** integer | | hold time <3-65535> or 0 Disable hold time. | | | | | | **keepalive\_time** integer | | keepalive interval <0-65535>. | | | | | **ttl\_security** dictionary | | Enable EBGP TTL security. | | | | | | **inheritance\_disable** boolean | **Choices:*** no * yes | Prevent ttl-security from being inherited from parent | | | | | | **set** boolean | **Choices:*** no * yes | set ttl-security | | | | | **update** dictionary | | BGP Update configuration. | | | | | | **in** dictionary | | Inbound update message handling. | | | | | | | **filtering** dictionary | | Inbound update message filtering | | | | | | | | **attribute\_filter** dictionary | | Attribute-filter configuration. | | | | | | | | | **group** string | | Name of group. | | | | | | | | **logging** dictionary | | Update filtering syslog message. | | | | | | | | | **disable** boolean | **Choices:*** no * yes | Disable update filtering syslog message. | | | | | | | | **update\_message** dictionary | | Filtered update messages. | | | | | | | | | **buffers** integer | | Number of buffers to store filtered update messages. | | | | | **update\_source** string | | Source of routing updates.Refer vendor document for valid values. | | | | **rd** dictionary | | route distinguisher. | | | | | **auto** boolean | **Choices:*** no * yes | Automatic route distinguisher. | | | | **socket** dictionary | | set socket parameters. | | | | | **receive\_buffer\_size** integer | | socket receive buffer size.Example-<512-131072>. | | | | | **send\_buffer\_size** integer | | socket send buffer size.Example- <4096-131072>. | | | | **timers** dictionary | | BGP per neighbor timers. | | | | | **holdtime** integer | | hold time <3-65535> or 0 Disable hold time. | | | | | **keepalive\_time** integer | | keepalive interval <0-65535>. | | | | **vrf** string | | VRF name. | | **running\_config** string | | The state the configuration should be left in. - State *purged* removes all the BGP configurations from the target device. Use caution with this state. - State *deleted* only removes BGP attributes that this modules manages and does not negate the BGP process completely. Thereby, preserving address-family related configurations under BGP context. - Running states *deleted* and *replaced* will result in an error if there are address-family configuration lines present under a neighbor, or a vrf context that is to be removed. Please use the [cisco.iosxr.iosxr\_bgp\_address\_family](iosxr_bgp_address_family_module) or [cisco.iosxr.iosxr\_bgp\_neighbor\_address\_family](iosxr_bgp_neighbor_address_family_module) modules for prior cleanup. - Refer to examples for more details. | | **state** string | **Choices:*** deleted * **merged** ← * replaced * gathered * rendered * parsed * purged | The state the configuration should be left in. | Notes ----- Note * This module works with connection `network_cli`. Examples -------- ``` ##### Using Merged ########################################## ----------------------------------------------------------------- # configuration on device Before merge state: #RP/0/0/CPU0:10#show running-config router bgp #Thu Feb 4 09:38:36.245 UTC #% No such configuration item(s) #RP/0/0/CPU0:10# # --------------Merge state--------------- # - name: Merge the following configuration # cisco.iosxr.iosxr_bgp_global: # config: # as_number: 65536 # default_metric: 5 # socket: # receive_buffer_size: 514 # send_buffer_size: 4098 # bgp: # confederation: # identifier: 4 # bestpath: # med: # confed: True # cluster_id: 5 # router_id: 192.0.2.10 # neighbors: # - neighbor: 192.0.2.13 # remote_as: 65538 # bfd: # fast_detect: # strict_mode: True # multiplier: 6 # minimum_interval: 20 # vrfs: # - vrf: vrf1 # default_metric: 5 # ---------------------------------------- # # commands: # - "router bgp 65536", # - "bgp cluster-id 5", # - "bgp router-id 192.0.2.10", # - "bgp bestpath med confed", # - "bgp confederation identifier 4", # - "default-metric 5", # - "socket receive-buffer-size 514", # - "socket send-buffer-size 4098", # - "neighbor 192.0.2.13", # - "bfd fast-detect strict-mode", # - "bfd minimum-interval 20", # - "bfd multiplier 6", # - "remote-as 65538", # - "vrf vrf1", # - "default-metric 5" # Configuration on device After Merge state: # -------------------------------------------- # RP/0/0/CPU0:10#show running-config router bgp # Thu Feb 4 09:44:32.480 UTC # router bgp 65536 # bgp confederation identifier 4 # bgp router-id 192.0.2.10 # bgp cluster-id 5 # default-metric 5 # socket send-buffer-size 4098 # bgp bestpath med confed # socket receive-buffer-size 514 # neighbor 192.0.2.13 # remote-as 65538 # bfd fast-detect strict-mode # bfd multiplier 6 # bfd minimum-interval 20 # ! # vrf vrf1 # default-metric 5 # ! # ! ##### Using replaced ########################################### # configuration on device before replaced # -------------------------------------------- # # RP/0/0/CPU0:10#show running-config router bgp # Thu Feb 4 09:44:32.480 UTC # router bgp 65536 # bgp confederation identifier 4 # bgp router-id 192.0.2.10 # bgp cluster-id 5 # default-metric 5 # socket send-buffer-size 4098 # bgp bestpath med confed # socket receive-buffer-size 514 # neighbor 192.0.2.13 # remote-as 65538 # bfd fast-detect strict-mode # bfd multiplier 6 # bfd minimum-interval 20 # ! # vrf vrf1 # default-metric 5 # ! # ! # --------------Replace state--------------- # - name: Replace the following configuration # cisco.iosxr.iosxr_bgp_global: # state: replaced # config: # as_number: 65536 # default_metric: 4 # socket: # receive_buffer_size: 514 # send_buffer_size: 4098 # bgp: # confederation: # identifier: 4 # bestpath: # med: # confed: True # cluster_id: 5 # router_id: 192.0.2.10 # neighbors: # - neighbor: 192.0.2.14 # remote_as: 65538 # bfd: # fast_detect: # strict_mode: True # multiplier: 6 # minimum_interval: 20 # vrfs: # - vrf: vrf1 # default_metric: 5 # ------------------------------------------- # commands: # - "router bgp 65536", # - "default-metric 4", # - "neighbor 192.0.2.14", # - "bfd fast-detect strict-mode", # - "bfd minimum-interval 20", # - "bfd multiplier 6", # - "remote-as 65538", # - "no neighbor 192.0.2.13" # configuration on device After Replaced state: # ---------------------------------------------- # RP/0/0/CPU0:10#show running-config router bgp # Thu Feb 4 09:54:11.161 UTC # router bgp 65536 # bgp confederation identifier 4 # bgp router-id 192.0.2.10 # bgp cluster-id 5 # default-metric 4 # socket send-buffer-size 4098 # bgp bestpath med confed # socket receive-buffer-size 514 # neighbor 192.0.2.14 # remote-as 65538 # bfd fast-detect strict-mode # bfd multiplier 6 # bfd minimum-interval 20 # ! # vrf vrf1 # default-metric 5 # ! # ! ##### Using deleted ############################################ # configuration on device Before deleted state # --------------------------------------------- # # RP/0/0/CPU0:10#show running-config router bgp # Thu Feb 4 09:54:11.161 UTC # router bgp 65536 # bgp confederation identifier 4 # bgp router-id 192.0.2.10 # bgp cluster-id 5 # default-metric 4 # socket send-buffer-size 4098 # bgp bestpath med confed # socket receive-buffer-size 514 # neighbor 192.0.2.14 # remote-as 65538 # bfd fast-detect strict-mode # bfd multiplier 6 # bfd minimum-interval 20 # ! # vrf vrf1 # default-metric 5 # ! # ! # # -------------------------------------------------------- # - name: Delete BGP configurations handled by this module # cisco.iosxr.iosxr_bgp_global: # state: deleted # config: # as_number: 65536 # # commands: # "router bgp 65536", # "no bgp cluster-id 5", # "no bgp router-id 192.0.2.10", # "no bgp bestpath med confed", # "no bgp confederation identifier 4", # "no default-metric 4", # "no socket receive-buffer-size 514", # "no socket send-buffer-size 4098", # "no neighbor 192.0.2.14", # "no vrf vrf1" # # configuration on device after delete # ------------------------------------------- # # RP/0/0/CPU0:10#show running-config router bgp # Thu Feb 4 10:01:08.232 UTC # router bgp 65536 # ! # ################# Using Purged ######################################## # configuration on device Before Purged state # -------------------------------------------- # # RP/0/0/CPU0:10#show running-config router bgp # Thu Feb 4 09:54:11.161 UTC # router bgp 65536 # bgp confederation identifier 4 # bgp router-id 192.0.2.10 # bgp cluster-id 5 # default-metric 4 # socket send-buffer-size 4098 # bgp bestpath med confed # socket receive-buffer-size 514 # address-family ipv4 unicast # neighbor 192.0.2.14 # remote-as 65538 # bfd fast-detect strict-mode # bfd multiplier 6 # bfd minimum-interval 20 # address-family ipv4 unicast # ! # vrf vrf1 # default-metric 5 # ! # ! # # - name: Purge all BGP configurations from the device # cisco.iosxr.iosxr_bgp_global: # state: purged # # commands: # - no router bgp 65563 # # configuration on device After purged state: # --------------------------------------------- # # #RP/0/0/CPU0:10#show running-config router bgp # #Thu Feb 4 09:38:36.245 UTC # #% No such configuration item(s) # #RP/0/0/CPU0:10# # # # ################# Using Rendred ####################################################### # # - name: Render platform specific configuration lines (without connecting to the device) # cisco.iosxr.iosxr_bgp_global: # state: rendered # config: # as_number: 1 # default_metric: 4 # vrfs: # - vrf: vrf3 # bfd: # minimum_interval: 20 # multiplier: 10 # bgp: # fast_external_fallover: # disable: True # router_id: 1.2.3.4 # auto_policy_soft_reset: # disable: True # #rd: # # auto: True # # #value: 1 # timers: # keepalive_time: 20 # holdtime: 30 # - vrf: vrf2 # bgp: # enforce_first_as: # disable: True # default_metric: 4 # neighbors: # - neighbor: 1.1.1.3 # remote_as: 2 # graceful_maintenance: # set: True # activate: # #set: True # inheritance_disable: True # local_preference: # value: 1 # #inheritance_disable: True # as_prepends: # value: 2 # rendered output # ------------------------------------ # "router bgp 1", # "default-metric 4", # "vrf vrf3", # "bfd multiplier 10", # "bfd minimum-interval 20", # "bgp auto-policy-soft-reset disable", # "bgp fast-external-fallover disable", # "bgp router-id 1.2.3.4", # "timers bgp 20 30", # "vrf vrf2", # "neighbor 1.1.1.3", # "remote-as 2", # "graceful-maintenance", # "graceful-maintenance activate inheritance-disable", # "graceful-maintenance local-preference 1", # "graceful-maintenance as-prepends 2", # "bgp enforce-first-as disable", # "default-metric 4" # # ############## Using parsed ##################### # parsed.cfg # ------------ # router bgp 65536 # bgp confederation identifier 4 # bgp router-id 192.0.2.10 # bgp cluster-id 5 # default-metric 4 # socket send-buffer-size 4098 # bgp bestpath med confed # socket receive-buffer-size 514 # neighbor 192.0.2.11 # remote-as 65537 # cluster-id 3 # ! # neighbor 192.0.2.14 # remote-as 65538 # bfd fast-detect strict-mode # bfd multiplier 6 # bfd minimum-interval 20 # ! # ! # ------------------------------------ # # - name: Parse externally provided BGP config # cisco.iosxr.iosxr_bgp_global: # running_config: "{{ lookup('file', 'parsed.cfg') }}" # state: parsed # # #Task output using parsed # as_number: "65536" # default_metric: 4 # socket: # receive_buffer_size: 514 # send_buffer_size: 4098 # bgp: # confederation: # identifier: 4 # bestpath: # med: # confed: true # cluster_id: "5" # router_id: "192.0.2.10" # neighbors: # - neighbor: 192.0.2.11 # remote_as: 65537 # cluster_id: "3" # - neighbor: "192.0.2.14" # remote_as: 65538 # bfd: # fast_detect: # strict_mode: true # multiplier: 6 # minimum_interval: 20 ``` ### Authors * Ashwini Mhatre (@amhatre)
programming_docs
ansible cisco.iosxr.iosxr_lacp_interfaces – LACP interfaces resource module cisco.iosxr.iosxr\_lacp\_interfaces – LACP interfaces resource module ===================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_lacp_interfaces`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages Link Aggregation Control Protocol (LACP) attributes of interfaces on IOS-XR 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 LACP interfaces options. | | | **churn\_logging** string | **Choices:*** actor * partner * both | Specifies the parameter for logging of LACP churn events. Valid only for ether-bundles. Mode 'actor' logs actor churn events only. Mode 'partner' logs partner churn events only. Mode 'both' logs actor and partner churn events only. | | | **collector\_max\_delay** integer | | Specifies the collector max delay to be signaled to the LACP partner. Valid only for ether-bundles. Refer to vendor documentation for valid values. | | | **name** string | | Name/Identifier of the interface or Ether-Bundle. | | | **period** integer | | Specifies the rate at which packets are sent or received. For ether-bundles, this specifies the period to be used by its member links. Refer to vendor documentation for valid values. | | | **switchover\_suppress\_flaps** integer | | Specifies the time for which to suppress flaps during a LACP switchover. Valid only for ether-bundles. Refer to vendor documentation for valid values. | | | **system** dictionary | | This dict object contains configurable options related to LACP system parameters for ether-bundles. | | | | **mac** string | | Specifies the system ID to use in LACP negotiations for the bundle, encoded as a MAC address. | | | | **priority** integer | | Specifies the system priority to use in LACP negotiations for the bundle. Refer to vendor documentation for valid values. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOS-XR device by executing the command **show running-config int**. 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 * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). Examples -------- ``` # Using merged # # # ------------ # Before state # ------------ # # # # RP/0/0/CPU0:an-iosxr#sh running-config interface # Sun Jul 21 18:01:35.079 UTC # interface Bundle-Ether10 # ! # interface Bundle-Ether11 # ! # interface Bundle-Ether12 # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1' # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # ! # # - name: Merge provided configuration with device configuration cisco.iosxr.iosxr_lacp_interfaces: config: - name: Bundle-Ether10 churn_logging: actor collector_max_delay: 100 switchover_suppress_flaps: 500 - name: Bundle-Ether11 system: mac: 00c2.4c00.bd15 - name: GigabitEthernet0/0/0/1 period: 200 state: merged # # # ----------- # After state # ----------- # # # RP/0/0/CPU0:an-iosxr#sh run int # Sun Jul 21 18:24:52.413 UTC # interface Bundle-Ether10 # lacp churn logging actor # lacp switchover suppress-flaps 500 # lacp collector-max-delay 100 # ! # interface Bundle-Ether11 # lacp system mac 00c2.4c00.bd15 # ! # interface Bundle-Ether12 # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # lacp period 200 # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # ! # # Using replaced # # # ------------ # Before state # ------------ # # # RP/0/0/CPU0:an-iosxr#sh run int # Sun Jul 21 18:24:52.413 UTC # interface Bundle-Ether10 # lacp churn logging actor # lacp switchover suppress-flaps 500 # lacp collector-max-delay 100 # ! # interface Bundle-Ether11 # lacp system mac 00c2.4c00.bd15 # ! # interface Bundle-Ether12 # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # lacp period 200 # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # ! # - name: Replace LACP configuration of listed interfaces with provided configuration cisco.iosxr.iosxr_lacp_interfaces: config: - name: Bundle-Ether10 churn_logging: partner - name: GigabitEthernet0/0/0/2 period: 300 state: replaced # # # ----------- # After state # ----------- # # # RP/0/0/CPU0:an-iosxr#sh run int # Sun Jul 21 18:50:21.929 UTC # interface Bundle-Ether10 # lacp churn logging partner # ! # interface Bundle-Ether11 # lacp system mac 00c2.4c00.bd15 # ! # interface Bundle-Ether12 # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # lacp period 200 # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # lacp period 300 # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # ! # # # Using overridden # # # ------------ # Before state # ------------ # # # RP/0/0/CPU0:an-iosxr#sh run int # Sun Jul 21 18:24:52.413 UTC # interface Bundle-Ether10 # lacp churn logging actor # lacp switchover suppress-flaps 500 # lacp collector-max-delay 100 # ! # interface Bundle-Ether11 # lacp system mac 00c2.4c00.bd15 # ! # interface Bundle-Ether12 # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # lacp period 200 # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # lacp period 200 # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # ! # # - name: Override all interface LACP configuration with provided configuration cisco.iosxr.iosxr_lacp_interfaces: config: - name: Bundle-Ether12 churn_logging: both collector_max_delay: 100 switchover_suppress_flaps: 500 - name: GigabitEthernet0/0/0/1 period: 300 state: overridden # # # ----------- # After state # ----------- # # # RP/0/0/CPU0:an-iosxr(config-if)#do sh run int # Sun Jul 21 19:32:36.115 UTC # interface Bundle-Ether10 # ! # interface Bundle-Ether11 # ! # interface Bundle-Ether12 # lacp churn logging both # lacp switchover suppress-flaps 500 # lacp collector-max-delay 100 # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # lacp period 300 # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # ! # # Using deleted # # # ------------ # Before state # ------------ # # # RP/0/0/CPU0:an-iosxr#sh run int # Sun Jul 21 18:24:52.413 UTC # interface Bundle-Ether10 # lacp churn logging actor # lacp switchover suppress-flaps 500 # lacp collector-max-delay 100 # ! # interface Bundle-Ether11 # lacp non-revertive # ! # interface Bundle-Ether12 # ! # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # description 'GigabitEthernet - 1" # lacp period 200 # ! # interface GigabitEthernet0/0/0/2 # description "GigabitEthernet - 2" # lacp period 300 # ! # interface GigabitEthernet0/0/0/3 # description "GigabitEthernet - 3" # ! # interface GigabitEthernet0/0/0/4 # description "GigabitEthernet - 4" # ! # - name: Deleted LACP configurations of provided interfaces (Note - This won't delete the interface itself) cisco.iosxr.iosxr_lacp_interfaces: config: - name: Bundle-Ether10 - name: Bundle-Ether11 - name: GigabitEthernet0/0/0/1 - name: GigabitEthernet0/0/0/2 state: deleted # # # ----------- # After state # ----------- # # # Using parsed: # parsed.cfg # interface Bundle-Ether10 # lacp churn logging actor # lacp switchover suppress-flaps 500 # lacp collector-max-delay 100 # ! # interface Bundle-Ether11 # lacp system mac 00c2.4c00.bd15 # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # lacp period 200 # ! # - name: Convert lacp interfaces config to argspec without connecting to the appliance cisco.iosxr.iosxr_lacp_interfaces: running_config: "{{ lookup('file', './parsed.cfg') }}" state: parsed # -------------- # Output: # -------------- # parsed: # - name: Bundle-Ether10 # churn_logging: actor # collector_max_delay: 100 # switchover_suppress_flaps: 500 # # - name: Bundle-Ether11 # system: # mac: 00c2.4c00.bd15 # # - name: GigabitEthernet0/0/0/1 # period: 200 # # # Using gathered: # Native config: # interface Bundle-Ether10 # lacp churn logging actor # lacp switchover suppress-flaps 500 # lacp collector-max-delay 100 # ! # interface Bundle-Ether11 # lacp system mac 00c2.4c00.bd15 # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 192.0.2.11 255.255.255.0 # ! # interface GigabitEthernet0/0/0/1 # lacp period 200 # ! # - name: Gather IOSXR lacp interfaces configuration cisco.iosxr.iosxr_lacp_interfaces: config: state: gathered # ---------- # Output # --------- # gathered: # - name: Bundle-Ether10 # churn_logging: actor # collector_max_delay: 100 # switchover_suppress_flaps: 500 # # - name: Bundle-Ether11 # system: # mac: 00c2.4c00.bd15 # # - name: GigabitEthernet0/0/0/1 # period: 200 # Using rendered: - name: Render platform specific commands from task input using rendered state cisco.iosxr.iosxr_lacp_interfaces: config: - name: Bundle-Ether10 churn_logging: actor collector_max_delay: 100 switchover_suppress_flaps: 500 - name: Bundle-Ether11 system: mac: 00c2.4c00.bd15 - name: GigabitEthernet0/0/0/1 period: 200 state: rendered # ------------- # Output # ------------- # rendered: [ # - "interface Bundle-Ether10" # - " lacp churn logging actor" # - " lacp switchover suppress-flaps 500" # - " lacp collector-max-delay 100" # - "interface Bundle-Ether11" # - " lacp system mac 00c2.4c00.bd15" # - "interface MgmtEth0/0/CPU0/0" # - " ipv4 address 192.0.2.11 255.255.255.0" # - "interface GigabitEthernet0/0/0/1" # - " lacp period 200" # ``` 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 Bundle-Ether10', 'lacp churn logging partner', 'lacp period 150'] | ### Authors * Nilashish Chakraborty (@nilashishc) ansible cisco.iosxr.iosxr_prefix_lists – Prefix-Lists resource module. cisco.iosxr.iosxr\_prefix\_lists – Prefix-Lists resource module. ================================================================ Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_prefix_lists`. New in version 2.3.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module manages prefix-lists configuration on devices running Cisco IOSXR. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A list of prefix-lists configuration. | | | **afi** string | **Choices:*** ipv4 * ipv6 | The Address Family Identifier (AFI) for the prefix-lists. | | | **prefix\_lists** list / elements=dictionary | | List of prefix-list configurations. | | | | **entries** list / elements=dictionary | | List of configurations for the specified prefix-list | | | | | **action** string | **Choices:*** permit * deny * remark | Prefix-List permit or deny. | | | | | **description** string | | Description of the prefix list. only applicable for action "remark". | | | | | **prefix** string | | IP or IPv6 prefix in A.B.C.D/LEN or A:B::C:D/LEN format. only applicable for action "permit" and "deny" | | | | | **sequence** integer | | Sequence Number. | | | | **name** string | | Name of the prefix-list. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the Iosxr device by executing the command **show running-config prefix-list**. 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 the configuration should be left in. Refer to examples for more details. With state *replaced*, for the listed prefix-lists, sequences that are in running-config but not in the task are negated. With state *overridden*, all prefix-lists that are in running-config but not in the task are negated. Please refer to examples for more details. | Notes ----- Note * Tested against IOSXR 7.0.2. * This module works with connection `network_cli`. Examples -------- ``` # Using merged # Before state #RP/0/0/CPU0:10#show running-config #Thu Feb 4 09:38:36.245 UTC #% No such configuration item(s) #RP/0/0/CPU0:10# # # - name: Merge the provided configuration with the existing running configuration # cisco.iosxr.iosxr_prefix_lists: &id001 # state: merged # config: # - afi: ipv6 # prefix_lists: # - name: pl_1 # entries: # - prefix: 2001:db8:1234::/48 # action: deny # sequence: 1 # - name: pl_2 # entries: # - sequence: 2 # action: remark # description: TEST_PL_2_REMARK # - afi: ipv4 # prefix_lists: # - name: pl1 # entries: # - sequence: 3 # action: remark # description: TEST_PL1_2_REMARK # - sequence: 4 # action: permit # prefix: 10.0.0.0/24 # - name: pl2 # entries: # - sequence: 5 # action: remark # description: TEST_PL2_REMARK # # After state: # #RP/0/0/CPU0:10#show running-config # ipv6 prefix-list pl_1 # 1 deny 2001:db8:1234::/48 # ! # ipv6 prefix-list pl_2 # 2 remark TEST_PL_2_REMARK # ! # ipv4 prefix-list pl1 # 3 remark TEST_PL1_2_REMARK # 4 permit 10.0.0.0/24 # ! # ipv4 prefix-list pl2 # 5 remark TEST_PL2_REMARK # ! #Module execution # # "after": [ # { # "afi": "ipv6", # "prefix_lists": [ # { # "entries": [ # { # "action": "deny", # "prefix": "2001:db8:1234::/48", # "sequence": 1 # } # ], # "name": "pl_1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL_2_REMARK", # "sequence": 2 # } # ], # "name": "pl_2" # } # ] # }, # { # "afi": "ipv4", # "prefix_lists": [ # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL1_2_REMARK", # "sequence": 3 # }, # { # "action": "permit", # "prefix": "10.0.0.0/24", # "sequence": 4 # } # ], # "name": "pl1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL2_REMARK", # "sequence": 5 # } # ], # "name": "pl2" # } # ] # } # ], # "before": [], # "changed": true, # "commands": [ # "ipv6 prefix-list pl_1 1 deny 2001:db8:1234::/48", # "ipv6 prefix-list pl_2 2 remark TEST_PL_2_REMARK", # "ipv4 prefix-list pl1 3 remark TEST_PL1_2_REMARK", # "ipv4 prefix-list pl1 4 permit 10.0.0.0/24", # "ipv4 prefix-list pl2 5 remark TEST_PL2_REMARK" # ] #----------------------------------------------------------------------- # Using replaced: # -------------- # Before state #RP/0/0/CPU0:10#show running-config # # ipv6 prefix-list pl_1 # 1 deny 2001:db8:1234::/48 # ! # ipv6 prefix-list pl_2 # 2 remark TEST_PL_2_REMARK # ! # ipv4 prefix-list pl1 # 3 remark TEST_PL1_2_REMARK # 4 permit 10.0.0.0/24 # ! # ipv4 prefix-list pl2 # 5 remark TEST_PL2_REMARK # ! # # # - name: Replace device configurations of listed prefix lists with provided configurations # register: result # cisco.iosxr.iosxr_prefix_lists: &id001 # config: # - afi: ipv4 # prefix_lists: # - name: pl1 # entries: # - sequence: 3 # action: permit # prefix: 10.0.0.0/24 # - afi: ipv6 # prefix_lists: # - name: pl_1 # entries: # - prefix: 2001:db8:1234::/48 # action: permit # sequence: 1 # - name: pl_2 # entries: # - sequence: 2 # action: remark # description: TEST_PL1_2 # state: replaced # After state: #RP/0/0/CPU0:10#show running-config # # ipv6 prefix-list pl_1 # 1 deny 2001:db8:1234::/48 # ! # ipv6 prefix-list pl_2 # 2 remark TEST_PL1_2 # ! # ipv4 prefix-list pl1 # 3 permit 10.0.0.0/24 # ! # ipv4 prefix-list pl2 # 5 remark TEST_PL2_REMARK # # Module Execution: # # "after": [ # { # "afi": "ipv6", # "prefix_lists": [ # { # "entries": [ # { # "action": "deny", # "prefix": "2001:db8:1234::/48", # "sequence": 1 # } # ], # "name": "pl_1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL1_2", # "sequence": 2 # } # ], # "name": "pl_2" # } # ] # }, # { # "afi": "ipv4", # "prefix_lists": [ # { # "entries": [ # { # "action": "permit", # "prefix": "10.0.0.0/24", # "sequence": 3 # } # ], # "name": "pl1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL2_REMARK", # "sequence": 5 # } # ], # "name": "pl2" # } # ] # } # ], # "before": [ # { # "afi": "ipv6", # "prefix_lists": [ # { # "entries": [ # { # "action": "deny", # "prefix": "2001:db8:1234::/48", # "sequence": 1 # } # ], # "name": "pl_1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL_2_REMARK", # "sequence": 2 # } # ], # "name": "pl_2" # } # ] # }, # { # "afi": "ipv4", # "prefix_lists": [ # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL1_2_REMARK", # "sequence": 3 # }, # { # "action": "permit", # "prefix": "10.0.0.0/24", # "sequence": 4 # } # ], # "name": "pl1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL2_REMARK", # "sequence": 5 # } # ], # "name": "pl2" # } # ] # } # ], # "changed": true, # "commands": [ # "no ipv4 prefix-list pl1 3 remark TEST_PL1_2_REMARK", # "no ipv4 prefix-list pl1 4 permit 10.0.0.0/24", # "ipv4 prefix-list pl1 3 permit 10.0.0.0/24", # "ipv6 prefix-list pl_2 2 remark TEST_PL1_2" # ], # "invocation": { # "module_args": { # "config": [ # { # "afi": "ipv4", # "prefix_lists": [ # { # "entries": [ # { # "action": "permit", # "description": null, # "prefix": "10.0.0.0/24", # "sequence": 3 # } # ], # "name": "pl1" # } # ] # }, # { # "afi": "ipv6", # "prefix_lists": [ # { # "entries": [ # { # "action": "permit", # "description": null, # "prefix": "2001:db8:1234::/48", # "sequence": 1 # } # ], # "name": "pl_1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL1_2", # "prefix": null, # "sequence": 2 # } # ], # "name": "pl_2" # } # ] # } # ], # "running_config": null, # "state": "replaced" # } # } # } #------------------------------------------------------------------ # Using deleted: # ------------- # Before state: #RP/0/0/CPU0:10#show running-config # # ipv6 prefix-list pl_1 # 1 deny 2001:db8:1234::/48 # ! # ipv6 prefix-list pl_2 # 2 remark TEST_PL_2_REMARK # ! # ipv4 prefix-list pl1 # 3 remark TEST_PL1_2_REMARK # 4 permit 10.0.0.0/24 # ! # ipv4 prefix-list pl2 # 5 remark TEST_PL2_REMARK # - name: Delete all prefix-lists from the device # cisco.iosxr.iosxr_prefix_lists: # state: deleted # After state: #RP/0/0/CPU0:10#show running-config # # # Module Execution: # # "after": [], # "before": [ # { # "afi": "ipv6", # "prefix_lists": [ # { # "entries": [ # { # "action": "deny", # "prefix": "2001:db8:1234::/48", # "sequence": 1 # } # ], # "name": "pl_1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL1_2", # "sequence": 2 # } # ], # "name": "pl_2" # } # ] # }, # { # "afi": "ipv4", # "prefix_lists": [ # { # "entries": [ # { # "action": "permit", # "prefix": "10.0.0.0/24", # "sequence": 3 # } # ], # "name": "pl1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL2_REMARK", # "sequence": 5 # } # ], # "name": "pl2" # } # ] # } # ], # "changed": true, # "commands": [ # "no ipv6 prefix-list pl_1", # "no ipv6 prefix-list pl_2", # "no ipv4 prefix-list pl1", # "no ipv4 prefix-list pl2" # ], # "invocation": { # "module_args": { # "config": null, # "running_config": null, # "state": "deleted" # } # } # } #--------------------------------------------------------------------------------- # # using gathered: # -------------- # Before state: #RP/0/0/CPU0:10#show running-config # # ipv6 prefix-list pl_1 # 1 deny 2001:db8:1234::/48 # ! # ipv6 prefix-list pl_2 # 2 remark TEST_PL_2_REMARK # ! # ipv4 prefix-list pl1 # 3 remark TEST_PL1_2_REMARK # 4 permit 10.0.0.0/24 # ! # ipv4 prefix-list pl2 # 5 remark TEST_PL2_REMARK # # - name: Gather ACL interfaces facts using gathered state # cisco.iosxr.iosxr_prefix_lists: # state: gathered # # Module Execution: # # "gathered": [ # { # "afi": "ipv6", # "prefix_lists": [ # { # "entries": [ # { # "action": "deny", # "prefix": "2001:db8:1234::/48", # "sequence": 1 # } # ], # "name": "pl_1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL_2_REMARK", # "sequence": 2 # } # ], # "name": "pl_2" # } # ] # }, # { # "afi": "ipv4", # "prefix_lists": [ # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL1_2_REMARK", # "sequence": 3 # }, # { # "action": "permit", # "prefix": "10.0.0.0/24", # "sequence": 4 # } # ], # "name": "pl1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL2_REMARK", # "sequence": 5 # } # ], # "name": "pl2" # } # ] # } # ], # "changed": false, #-------------------------------------------------------------------------- # Using parsed: # -------------- # # parsed.cfg #------------------------------ # ipv6 prefix-list pl_1 # 1 deny 2001:db8:1234::/48 # ! # ipv6 prefix-list pl_2 # 2 remark TEST_PL_2_REMARK # ! # ipv4 prefix-list pl1 # 3 remark TEST_PL1_2_REMARK # 4 permit 10.0.0.0/24 # ! # ipv4 prefix-list pl2 # 5 remark TEST_PL2_REMARK # # # - name: Parse externally provided Prefix_lists config to agnostic model # cisco.iosxr.iosxr_prefix_lists: # running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}" # state: parsed # # Module execution: #"parsed": [ # { # "afi": "ipv6", # "prefix_lists": [ # { # "entries": [ # { # "action": "deny", # "prefix": "2001:db8:1234::/48", # "sequence": 1 # } # ], # "name": "pl_1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL_2_REMARK", # "sequence": 2 # } # ], # "name": "pl_2" # } # ] # }, # { # "afi": "ipv4", # "prefix_lists": [ # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL1_2_REMARK", # "sequence": 3 # }, # { # "action": "permit", # "prefix": "10.0.0.0/24", # "sequence": 4 # } # ], # "name": "pl1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL2_REMARK", # "sequence": 5 # } # ], # "name": "pl2" # } # ] # } # ] # #---------------------------------------------------------------------------- # Using rendered: # -------------- # # - name: Render platform specific commands from task input using rendered state # register: result # cisco.iosxr.iosxr_prefix_lists: # config: # - afi: ipv6 # prefix_lists: # - name: pl_1 # entries: # - prefix: 2001:db8:1234::/48 # action: deny # sequence: 1 # - name: pl_2 # entries: # - sequence: 2 # action: remark # description: TEST_PL_2_REMARK # - afi: ipv4 # prefix_lists: # - name: pl1 # entries: # - sequence: 3 # action: remark # description: TEST_PL1_2_REMARK # - sequence: 4 # action: permit # prefix: 10.0.0.0/24 # - name: pl2 # entries: # - sequence: 5 # action: remark # description: TEST_PL2_REMARK # # state: rendered # After state: # Module Execution: # "rendered": [ # "ipv6 prefix-list pl_1 1 deny 2001:db8:1234::/48", # "ipv6 prefix-list pl_2 2 remark TEST_PL_2_REMARK", # "ipv4 prefix-list pl1 3 remark TEST_PL1_2_REMARK", # "ipv4 prefix-list pl1 4 permit 10.0.0.0/24", # "ipv4 prefix-list pl2 5 remark TEST_PL2_REMARK" # ] # #--------------------------------------------------------------------------------- # Using overridden: # -------------- # Before state: #RP/0/0/CPU0:10#show running-config # # ipv6 prefix-list pl_1 # 1 deny 2001:db8:1234::/48 # ! # ipv6 prefix-list pl_2 # 2 remark TEST_PL_2_REMARK # ! # ipv4 prefix-list pl1 # 3 remark TEST_PL1_2_REMARK # 4 permit 10.0.0.0/24 # ! # ipv4 prefix-list pl2 # 5 remark TEST_PL2_REMARK # # - name: Overridde all Prefix_lists configuration with provided configuration # cisco.iosxr.iosxr_prefix_lists: &id001 # config: # - afi: ipv4 # prefix_lists: # - name: pl3 # entries: # - sequence: 3 # action: remark # description: TEST_PL1_3_REMARK # - sequence: 4 # action: permit # prefix: 10.0.0.0/24 # state: overridden # # After state: #RP/0/0/CPU0:10#show running-config # #ipv4 prefix-list pl3 # 3 remark TEST_PL1_3_REMARK # 4 permit 10.0.0.0/24 #! # # Module Execution: # "after": [ # { # "afi": "ipv4", # "prefix_lists": [ # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL1_3_REMARK", # "sequence": 3 # }, # { # "action": "permit", # "prefix": "10.0.0.0/24", # "sequence": 4 # } # ], # "name": "pl3" # } # ] # } # ], # "before": [ # { # "afi": "ipv6", # "prefix_lists": [ # { # "entries": [ # { # "action": "deny", # "prefix": "2001:db8:1234::/48", # "sequence": 1 # } # ], # "name": "pl_1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL_2_REMARK", # "sequence": 2 # } # ], # "name": "pl_2" # } # ] # }, # { # "afi": "ipv4", # "prefix_lists": [ # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL1_2_REMARK", # "sequence": 3 # }, # { # "action": "permit", # "prefix": "10.0.0.0/24", # "sequence": 4 # } # ], # "name": "pl1" # }, # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL2_REMARK", # "sequence": 5 # } # ], # "name": "pl2" # } # ] # } # ], # "changed": true, # "commands": [ # "no ipv6 prefix-list pl_1", # "no ipv6 prefix-list pl_2", # "no ipv4 prefix-list pl1", # "no ipv4 prefix-list pl2", # "ipv4 prefix-list pl3 3 remark TEST_PL1_3_REMARK", # "ipv4 prefix-list pl3 4 permit 10.0.0.0/24" # ], # "invocation": { # "module_args": { # "config": [ # { # "afi": "ipv4", # "prefix_lists": [ # { # "entries": [ # { # "action": "remark", # "description": "TEST_PL1_3_REMARK", # "prefix": null, # "sequence": 3 # }, # { # "action": "permit", # "description": null, # "prefix": "10.0.0.0/24", # "sequence": 4 # } # ], # "name": "pl3" # } # ] # } # ], # "running_config": null, # "state": "overridden" # } # } # } # ``` ### Authors * Ashwini Mhatre (@amhatre)
programming_docs
ansible cisco.iosxr.iosxr_ntp_global – Manages ntp resource module cisco.iosxr.iosxr\_ntp\_global – Manages ntp resource module ============================================================ Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_ntp_global`. New in version 2.5.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module configures and manages the attributes of ntp on Cisco IOSXR platforms. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | A dictionary of ntp options | | | **access\_group** dictionary | | Control NTP access | | | | **ipv4** dictionary | | Configure IPv4 access | | | | | **peer** string | | Provide full access | | | | | **query\_only** string | | Allow only control queries. | | | | | **serve** string | | Provide server and query access. | | | | | **serve\_only** string | | Provide only server access. | | | | **ipv6** dictionary | | Configure IPv6 access | | | | | **peer** string | | Provide full access | | | | | **query\_only** string | | Allow only control queries. | | | | | **serve** string | | Provide server and query access. | | | | | **serve\_only** string | | Provide only server access. | | | | **vrfs** list / elements=dictionary | | Specify non-default VRF. | | | | | **ipv4** dictionary | | Configure IPv4 access | | | | | | **peer** string | | Provide full access | | | | | | **query\_only** string | | Allow only control queries. | | | | | | **serve** string | | Provide server and query access. | | | | | | **serve\_only** string | | Provide only server access. | | | | | **ipv6** dictionary | | Configure IPv6 access | | | | | | **peer** string | | Provide full access | | | | | | **query\_only** string | | Allow only control queries. | | | | | | **serve** string | | Provide server and query access. | | | | | | **serve\_only** string | | Provide only server access. | | | | | **name** string | | Specify non-default VRF. | | | **authenticate** boolean | **Choices:*** no * yes | Authenticate time sources | | | **authentication\_keys** list / elements=dictionary | | Authentication key for trusted time sources | | | | **encryption** boolean | **Choices:*** no * yes | Type of key encrypted or clear-text. | | | | **id** integer | | <1-65535> Key number | | | | **key** string | | Authentication key. | | | **broadcastdelay** integer | | Estimated round-trip delay in microseconds. | | | **drift** dictionary | | Drift(cisco-support) | | | | **aging\_time** integer | | Aging time in hours. | | | | **file** string | | File for drift values. | | | **interfaces** list / elements=dictionary | | Configure NTP on an interface. | | | | **broadcast\_client** boolean | **Choices:*** no * yes | Listen to NTP broadcasts | | | | **broadcast\_destination** string | | Configure broadcast destination address. | | | | **broadcast\_key** integer | | Broadcast key number. | | | | **broadcast\_version** integer | | <2-4> NTP version number. | | | | **multicast\_client** string | | Configure multicast client | | | | **multicast\_destination** string | | Configure multicast destination | | | | **multicast\_key** integer | | Configure multicast authentication key. | | | | **multicast\_ttl** integer | | Configure TTL to use. | | | | **multicast\_version** integer | | <2-4> NTP version number. | | | | **name** string | | Name of the interface. | | | | **vrf** string | | Name of the vrf. | | | **ipv4** dictionary | | Mark the dscp/precedence bit for ipv4 packets. | | | | **dscp** string | | Set IP DSCP (DiffServ CodePoint).Please refer vendor document for valid entries. | | | | **precedence** string | **Choices:*** critical * flash * flash-override * immediate * internet * network * priority * routine | Set precedence Please refer vendor document for valid entries. | | | **ipv6** dictionary | | Mark the dscp/precedence bit for ipv4 packets. | | | | **dscp** string | | Set IP DSCP (DiffServ CodePoint).Please refer vendor document for valid entries. | | | | **precedence** string | **Choices:*** critical * flash * flash-override * immediate * internet * network * priority * routine | Set precedence Please refer vendor document for valid entries. | | | **log\_internal\_sync** boolean | **Choices:*** no * yes | Logs internal synchronization changes. | | | **master** dictionary | | Act as NTP master clock | | | | **stratum** integer | | Use NTP as clock source with stratum number <1-15> | | | **max\_associations** integer | | <0-4294967295> Number of associations. | | | **passive** boolean | **Choices:*** no * yes | Enable the passive associations. | | | **peers** list / elements=dictionary | | Configure NTP peer. | | | | **burst** boolean | **Choices:*** no * yes | Use burst mode. | | | | **iburst** boolean | **Choices:*** no * yes | Use initial burst mode. | | | | **key\_id** integer | | SConfigure peer authentication key | | | | **maxpoll** integer | | configure Maximum poll interval. | | | | **minpoll** integer | | configure Minimum poll interval. | | | | **peer** string / required | | Hostname or A.B.C.D or A:B:C:D:E:F:G:H. | | | | **prefer** boolean | **Choices:*** no * yes | Prefer this peer when possible | | | | **source** string | | Interface for source address. | | | | **version** integer | | NTP version. | | | | **vrf** string | | vrf name. | | | **servers** list / elements=dictionary | | Configure NTP server. | | | | **burst** boolean | **Choices:*** no * yes | Use burst mode. | | | | **iburst** boolean | **Choices:*** no * yes | Use initial burst mode. | | | | **key\_id** integer | | SConfigure peer authentication key | | | | **maxpoll** integer | | configure Maximum poll interval. | | | | **minpoll** integer | | configure Minimum poll interval. | | | | **prefer** boolean | **Choices:*** no * yes | Prefer this peer when possible | | | | **server** string / required | | Hostname or A.B.C.D or A:B:C:D:E:F:G:H. | | | | **source** string | | Interface for source address. | | | | **version** integer | | NTP version. | | | | **vrf** string | | vrf name. | | | **source\_interface** string | | Configure default interface. | | | **source\_vrfs** list / elements=dictionary | | Configure default interface. | | | | **name** string | | Name of source interface. | | | | **vrf** string | | vrf name. | | | **trusted\_keys** list / elements=dictionary | | list of Key numbers for trusted time sources. | | | | **key\_id** integer | | Key numbers for trusted time sources. | | | **update\_calendar** boolean | **Choices:*** no * yes | Periodically update calendar with NTP time. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOSXR device by executing the command **show running-config ntp**. 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:*** deleted * **merged** ← * overridden * replaced * gathered * rendered * parsed | The state the configuration should be left in. | Notes ----- Note * Tested against IOSXR 7.0.2. * This module works with connection `network_cli`. Examples -------- ``` # Using state: merged # Before state: # ------------- # RP/0/0/CPU0:10#show running-config ntp # --------------------- EMPTY ----------------- # Merged play: # ------------ - name: Merge the provided configuration with the existing running configuration cisco.iosxr.iosxr_ntp_global: config: access_group: ipv4: peer: PeerAcl1 query_only: QueryOnlyAcl1 serve: ServeAcl1 serve_only: ServeOnlyAcl1 vrfs: - ipv4: peer: PeerAcl3 serve: ServeAcl2 name: siteA authenticate: true broadcastdelay: 1 drift: aging_time: 0 file: apphost interfaces: - name: GigabitEthernet0/0/0/0 multicast_client: 224.0.0.8 multicast_destination: 224.0.0.8 broadcast_client: true ipv4: dscp: af11 ipv6: precedence: routine log_internal_sync: true master: 1 max_associations: 10 passive: true peers: - iburst: true peer: 192.0.2.1 vrf: siteC servers: - burst: true server: 192.0.2.2 vrf: siteD source: GigabitEthernet0/0/0/0 source_vrfs: - name: GigabitEthernet0/0/0/0 vrf: siteE trusted_keys: - key_id: 1 update_calendar: true # Commands Fired: # ------------ # "commands": [ # "ntp peer vrf siteC 192.0.2.1 iburst ", # "ntp server vrf siteD 192.0.2.2 burst ", # "ntp trusted-key 1", # "ntp interface GigabitEthernet0/0/0/0 broadcast client", # "ntp interface GigabitEthernet0/0/0/0 multicast destination 224.0.0.8", # "ntp interface GigabitEthernet0/0/0/0 multicast client 224.0.0.8", # "ntp vrf siteE source GigabitEthernet0/0/0/0", # "ntp access-group vrf siteA ipv4 serve ServeAcl2", # "ntp access-group vrf siteA ipv4 peer PeerAcl3", # "ntp access-group ipv4 peer PeerAcl1", # "ntp access-group ipv4 serve ServeAcl1", # "ntp access-group ipv4 serve-only ServeOnlyAcl1", # "ntp access-group ipv4 query-only QueryOnlyAcl1", # "ntp authenticate", # "ntp log-internal-sync", # "ntp broadcastdelay 1", # "ntp drift aging time 0", # "ntp drift file apphost", # "ntp ipv4 dscp af11", # "ntp ipv6 precedence routine", # "ntp max-associations 10", # "ntp master 1", # "ntp passive", # "ntp update-calendar", # "ntp source GigabitEthernet0/0/0/0" # ], # After state: # ------------ # RP/0/0/CPU0:10#show running-config ntp # ntp # max-associations 10 # interface GigabitEthernet0/0/0/0 # broadcast client # multicast client 224.0.0.8 # multicast destination 224.0.0.8 # ! # authenticate # trusted-key 1 # ipv4 dscp af11 # ipv6 precedence routine # peer vrf siteC 192.0.2.1 iburst # server vrf siteD 192.0.2.2 burst # drift file apphost # drift aging time 0 # master 1 # access-group vrf siteA ipv4 peer PeerAcl3 # access-group vrf siteA ipv4 serve ServeAcl2 # access-group ipv4 peer PeerAcl1 # access-group ipv4 serve ServeAcl1 # access-group ipv4 serve-only ServeOnlyAcl1 # access-group ipv4 query-only QueryOnlyAcl1 # source vrf siteE GigabitEthernet0/0/0/0 # source GigabitEthernet0/0/0/0 # passive # broadcastdelay 1 # update-calendar # log-internal-sync # ! # Using state: deleted # Before state: # ------------- # RP/0/0/CPU0:10#show running-config ntp # ntp # max-associations 10 # interface GigabitEthernet0/0/0/0 # broadcast client # multicast client 224.0.0.8 # multicast destination 224.0.0.8 # ! # authenticate # trusted-key 1 # ipv4 dscp af11 # ipv6 precedence routine # peer vrf siteC 192.0.2.1 iburst # server vrf siteD 192.0.2.2 burst # drift file apphost # drift aging time 0 # master 1 # access-group vrf siteA ipv4 peer PeerAcl3 # access-group vrf siteA ipv4 serve ServeAcl2 # access-group ipv4 peer PeerAcl1 # access-group ipv4 serve ServeAcl1 # access-group ipv4 serve-only ServeOnlyAcl1 # access-group ipv4 query-only QueryOnlyAcl1 # source vrf siteE GigabitEthernet0/0/0/0 # source GigabitEthernet0/0/0/0 # passive # broadcastdelay 1 # update-calendar # log-internal-sync # ! # Deleted play: # ------------- - name: Remove all existing configuration cisco.iosxr.iosxr_ntp_global: state: deleted # Commands Fired: # --------------- # "commands": [ # "no ntp peer vrf siteC 192.0.2.1 iburst ", # "no ntp server vrf siteD 192.0.2.2 burst ", # "no ntp trusted-key 1", # "no ntp interface GigabitEthernet0/0/0/0", # "no ntp vrf siteE source GigabitEthernet0/0/0/0", # "no ntp access-group vrf siteA ipv4 serve ServeAcl2", # "no ntp access-group vrf siteA ipv4 peer PeerAcl3", # "no ntp access-group ipv4 peer PeerAcl1", # "no ntp access-group ipv4 serve ServeAcl1", # "no ntp access-group ipv4 serve-only ServeOnlyAcl1", # "no ntp access-group ipv4 query-only QueryOnlyAcl1", # "no ntp authenticate", # "no ntp log-internal-sync", # "no ntp broadcastdelay 1", # "no ntp drift aging time 0", # "no ntp drift file apphost", # "no ntp ipv4 dscp af11", # "no ntp ipv6 precedence routine", # "no ntp max-associations 10", # "no ntp master 1", # "no ntp passive", # "no ntp update-calendar", # "no ntp source GigabitEthernet0/0/0/0" # ], # After state: # ------------ # RP/0/0/CPU0:10#show running-config ntp # --------------------- EMPTY ----------------- # Using state: overridden # Before state: # ------------- # RP/0/0/CPU0:10#show running-config ntp # ntp # max-associations 10 # interface GigabitEthernet0/0/0/0 # broadcast client # multicast client 224.0.0.8 # multicast destination 224.0.0.8 # ! # authenticate # trusted-key 1 # ipv4 dscp af11 # ipv6 precedence routine # peer vrf siteC 192.0.2.1 iburst # server vrf siteD 192.0.2.2 burst # drift file apphost # drift aging time 0 # master 1 # access-group vrf siteA ipv4 peer PeerAcl3 # access-group vrf siteA ipv4 serve ServeAcl2 # access-group ipv4 peer PeerAcl1 # access-group ipv4 serve ServeAcl1 # access-group ipv4 serve-only ServeOnlyAcl1 # access-group ipv4 query-only QueryOnlyAcl1 # source vrf siteE GigabitEthernet0/0/0/0 # source GigabitEthernet0/0/0/0 # passive # broadcastdelay 1 # update-calendar # log-internal-sync # ! # Overridden play: # ---------------- - name: Override BGP configuration with provided configuration cisco.iosxr.iosxr_ntp_global: state: overridden config: access_group: ipv4: peer: PeerAcl1 query_only: QueryOnlyAcl1 serve: ServeAcl4 serve_only: ServeOnlyAcl1 vrfs: - ipv4: peer: PeerAcl3 serve: ServeAcl2 name: siteA authenticate: true broadcastdelay: 1 drift: aging_time: 0 file: apphost interfaces: - name: GigabitEthernet0/0/0/1 multicast_client: 224.0.0.8 multicast_destination: 224.0.0.8 broadcast_client: true ipv4: dscp: af12 ipv6: precedence: routine log_internal_sync: true master: 1 max_associations: 10 passive: true peers: - iburst: true peer: 192.0.2.3 vrf: siteC servers: - burst: true server: 192.0.2.2 vrf: siteD source: GigabitEthernet0/0/0/1 source_vrfs: - name: GigabitEthernet0/0/0/0 vrf: siteE trusted_keys: - key_id: 1 update_calendar: true # Commands Fired: # --------------- # "commands": [ # "no ntp peer vrf siteC 192.0.2.1 iburst ", # "no ntp interface GigabitEthernet0/0/0/0", # "ntp peer vrf siteC 192.0.2.3 iburst ", # "ntp interface GigabitEthernet0/0/0/1 broadcast client", # "ntp interface GigabitEthernet0/0/0/1 multicast destination 224.0.0.8", # "ntp interface GigabitEthernet0/0/0/1 multicast client 224.0.0.8", # "ntp access-group ipv4 serve ServeAcl4", # "ntp ipv4 dscp af12", # "ntp source GigabitEthernet0/0/0/1" # ], # After state: # ------------ # RP/0/RP0/CPU0:ios#show running-config ntp # Mon Sep 13 10:38:22.690 UTC # ntp # max-associations 10 # interface GigabitEthernet0/0/0/1 # broadcast client # multicast client 224.0.0.8 # multicast destination 224.0.0.8 # ! # authentication-key 1 md5 encrypted testkey # authenticate # trusted-key 1 # ipv4 dscp af12 # ipv6 precedence routine # peer vrf siteC 192.0.2.3 iburst # server vrf siteD 192.0.2.2 burst # drift file apphost # drift aging time 0 # master 1 # access-group vrf siteA ipv4 peer PeerAcl3 # access-group vrf siteA ipv4 serve ServeAcl2 # access-group ipv4 peer PeerAcl1 # access-group ipv4 serve ServeAcl4 # access-group ipv4 serve-only ServeOnlyAcl1 # access-group ipv4 query-only QueryOnlyAcl1 # source vrf siteE GigabitEthernet0/0/0/0 # source GigabitEthernet0/0/0/1 # passive # broadcastdelay 1 # update-calendar # log-internal-sync # ! # # Using state: replaced # Before state: # ------------- # RP/0/0/CPU0:10#show running-config ntp # ntp # max-associations 10 # interface GigabitEthernet0/0/0/0 # broadcast client # multicast client 224.0.0.8 # multicast destination 224.0.0.8 # ! # authenticate # trusted-key 1 # ipv4 dscp af11 # ipv6 precedence routine # peer vrf siteC 192.0.2.1 iburst # server vrf siteD 192.0.2.2 burst # drift file apphost # drift aging time 0 # master 1 # access-group vrf siteA ipv4 peer PeerAcl3 # access-group vrf siteA ipv4 serve ServeAcl2 # access-group ipv4 peer PeerAcl1 # access-group ipv4 serve ServeAcl1 # access-group ipv4 serve-only ServeOnlyAcl1 # access-group ipv4 query-only QueryOnlyAcl1 # source vrf siteE GigabitEthernet0/0/0/0 # source GigabitEthernet0/0/0/0 # passive # broadcastdelay 1 # update-calendar # log-internal-sync # ! # Replaced play: # ---------------- - name: Replaced BGP configuration with provided configuration cisco.iosxr.iosxr_ntp_global: state: replaced config: access_group: ipv4: peer: PeerAcl1 query_only: QueryOnlyAcl1 serve: ServeAcl4 serve_only: ServeOnlyAcl1 vrfs: - ipv4: peer: PeerAcl3 serve: ServeAcl2 name: siteA authenticate: true broadcastdelay: 1 drift: aging_time: 0 file: apphost interfaces: - name: GigabitEthernet0/0/0/1 multicast_client: 224.0.0.8 multicast_destination: 224.0.0.8 broadcast_client: true ipv4: dscp: af12 ipv6: precedence: routine log_internal_sync: true master: 1 max_associations: 10 passive: true peers: - iburst: true peer: 192.0.2.3 vrf: siteC servers: - burst: true server: 192.0.2.2 vrf: siteD source: GigabitEthernet0/0/0/1 source_vrfs: - name: GigabitEthernet0/0/0/0 vrf: siteE trusted_keys: - key_id: 1 update_calendar: true # Commands Fired: # --------------- # "commands": [ # "no ntp peer vrf siteC 192.0.2.1 iburst ", # "no ntp interface GigabitEthernet0/0/0/0", # "ntp peer vrf siteC 192.0.2.3 iburst ", # "ntp interface GigabitEthernet0/0/0/1 broadcast client", # "ntp interface GigabitEthernet0/0/0/1 multicast destination 224.0.0.8", # "ntp interface GigabitEthernet0/0/0/1 multicast client 224.0.0.8", # "ntp access-group ipv4 serve ServeAcl4", # "ntp ipv4 dscp af12", # "ntp source GigabitEthernet0/0/0/1" # ], # After state: # ------------ # RP/0/RP0/CPU0:ios#show running-config ntp # Mon Sep 13 10:38:22.690 UTC # ntp # max-associations 10 # interface GigabitEthernet0/0/0/1 # broadcast client # multicast client 224.0.0.8 # multicast destination 224.0.0.8 # ! # authentication-key 1 md5 encrypted testkey # authenticate # trusted-key 1 # ipv4 dscp af12 # ipv6 precedence routine # peer vrf siteC 192.0.2.3 iburst # server vrf siteD 192.0.2.2 burst # drift file apphost # drift aging time 0 # master 1 # access-group vrf siteA ipv4 peer PeerAcl3 # access-group vrf siteA ipv4 serve ServeAcl2 # access-group ipv4 peer PeerAcl1 # access-group ipv4 serve ServeAcl4 # access-group ipv4 serve-only ServeOnlyAcl1 # access-group ipv4 query-only QueryOnlyAcl1 # source vrf siteE GigabitEthernet0/0/0/0 # source GigabitEthernet0/0/0/1 # passive # broadcastdelay 1 # update-calendar # log-internal-sync # ! # Using state: gathered # Before state: # ------------- # RP/0/0/CPU0:10#show running-config ntp # ntp # max-associations 10 # interface GigabitEthernet0/0/0/0 # broadcast client # multicast client 224.0.0.8 # multicast destination 224.0.0.8 # ! # authenticate # trusted-key 1 # ipv4 dscp af11 # ipv6 precedence routine # peer vrf siteC 192.0.2.1 iburst # server vrf siteD 192.0.2.2 burst # drift file apphost # drift aging time 0 # master 1 # access-group vrf siteA ipv4 peer PeerAcl3 # access-group vrf siteA ipv4 serve ServeAcl2 # access-group ipv4 peer PeerAcl1 # access-group ipv4 serve ServeAcl1 # access-group ipv4 serve-only ServeOnlyAcl1 # access-group ipv4 query-only QueryOnlyAcl1 # source vrf siteE GigabitEthernet0/0/0/0 # source GigabitEthernet0/0/0/0 # passive # broadcastdelay 1 # update-calendar # log-internal-sync # ! # Gathered play: # -------------- - name: Gather listed ntp config cisco.iosxr.iosxr_ntp_global: state: gathered # Module Execution Result: # ------------------------ # "gathered":{ # "access_group": { # "ipv4": { # "peer": "PeerAcl1", # "query_only": "QueryOnlyAcl1", # "serve": "ServeAcl1", # "serve_only": "ServeOnlyAcl1" # }, # "vrfs": [ # { # "ipv4": { # "peer": "PeerAcl3", # "serve": "ServeAcl2" # }, # "name": "siteA" # } # ] # }, # "authenticate": true, # "broadcastdelay": 1, # "drift": { # "aging_time": 0, # "file": "apphost" # }, # "interfaces": [ # { # "broadcast_client": true, # "multicast_client": "224.0.0.8", # "multicast_destination": "224.0.0.8", # "name": "GigabitEthernet0/0/0/0" # } # ], # "ipv4": { # "dscp": "af11" # }, # "ipv6": { # "precedence": "routine" # }, # "log_internal_sync": true, # "master": 1, # "max_associations": 10, # "passive": true, # "peers": [ # { # "iburst": true, # "peer": "192.0.2.1", # "vrf": "siteC" # } # ], # "servers": [ # { # "burst": true, # "server": "192.0.2.2", # "vrf": "siteD" # } # ], # "source": "GigabitEthernet0/0/0/0", # "source_vrfs": [ # { # "name": "GigabitEthernet0/0/0/0", # "vrf": "siteE" # } # ], # "trusted_keys": [ # { # "key_id": 1 # } # ], # "update_calendar": true # } # Using state: rendered # Rendered play: # -------------- - name: Render platform specific configuration lines with state rendered (without connecting to the device) cisco.iosxr.iosxr_ntp_global: state: rendered config: access_group: ipv4: peer: PeerAcl1 query_only: QueryOnlyAcl1 serve: ServeAcl1 serve_only: ServeOnlyAcl1 vrfs: - ipv4: peer: PeerAcl3 serve: ServeAcl2 name: siteA authenticate: true broadcastdelay: 1 drift: aging_time: 0 file: apphost interfaces: - name: GigabitEthernet0/0/0/0 multicast_client: 224.0.0.8 multicast_destination: 224.0.0.8 broadcast_client: true ipv4: dscp: af11 ipv6: precedence: routine log_internal_sync: true master: 1 max_associations: 10 passive: true peers: - iburst: true peer: 192.0.2.1 vrf: siteC servers: - burst: true server: 192.0.2.2 vrf: siteD source: GigabitEthernet0/0/0/0 source_vrfs: - name: GigabitEthernet0/0/0/0 vrf: siteE trusted_keys: - key_id: 1 update_calendar: true register: result # Module Execution Result: # ------------------------ # "rendered": [ # "ntp peer vrf siteC 192.0.2.1 iburst ", # "ntp server vrf siteD 192.0.2.2 burst ", # "ntp trusted-key 1", # "ntp interface GigabitEthernet0/0/0/0 broadcast client", # "ntp interface GigabitEthernet0/0/0/0 multicast destination 224.0.0.8", # "ntp interface GigabitEthernet0/0/0/0 multicast client 224.0.0.8", # "ntp vrf siteE source GigabitEthernet0/0/0/0", # "ntp access-group vrf siteA ipv4 serve ServeAcl2", # "ntp access-group vrf siteA ipv4 peer PeerAcl3", # "ntp access-group ipv4 peer PeerAcl1", # "ntp access-group ipv4 serve ServeAcl1", # "ntp access-group ipv4 serve-only ServeOnlyAcl1", # "ntp access-group ipv4 query-only QueryOnlyAcl1", # "ntp authenticate", # "ntp log-internal-sync", # "ntp broadcastdelay 1", # "ntp drift aging time 0", # "ntp drift file apphost", # "ntp ipv4 dscp af11", # "ntp ipv6 precedence routine", # "ntp max-associations 10", # "ntp master 1", # "ntp passive", # "ntp update-calendar", # "ntp source GigabitEthernet0/0/0/0" # ], # Using state: parsed # File: parsed.cfg # ---------------- # ntp # max-associations 10 # interface GigabitEthernet0/0/0/0 # broadcast client # multicast client 224.0.0.8 # multicast destination 224.0.0.8 # ! # authenticate # trusted-key 1 # ipv4 dscp af11 # ipv6 precedence routine # peer vrf siteC 192.0.2.1 iburst # server vrf siteD 192.0.2.2 burst # drift file apphost # drift aging time 0 # master 1 # access-group vrf siteA ipv4 peer PeerAcl3 # access-group vrf siteA ipv4 serve ServeAcl2 # access-group ipv4 peer PeerAcl1 # access-group ipv4 serve ServeAcl1 # access-group ipv4 serve-only ServeOnlyAcl1 # access-group ipv4 query-only QueryOnlyAcl1 # source vrf siteE GigabitEthernet0/0/0/0 # source GigabitEthernet0/0/0/0 # passive # broadcastdelay 1 # update-calendar # log-internal-sync # ! # Parsed play: # ------------ - name: Parse the provided configuration with the existing running configuration cisco.iosxr.iosxr_ntp_global: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Module Execution Result: # ------------------------ # "parsed":{ # "access_group": { # "ipv4": { # "peer": "PeerAcl1", # "query_only": "QueryOnlyAcl1", # "serve": "ServeAcl1", # "serve_only": "ServeOnlyAcl1" # }, # "vrfs": [ # { # "ipv4": { # "peer": "PeerAcl3", # "serve": "ServeAcl2" # }, # "name": "siteA" # } # ] # }, # "authenticate": true, # "broadcastdelay": 1, # "drift": { # "aging_time": 0, # "file": "apphost" # }, # "interfaces": [ # { # "broadcast_client": true, # "multicast_client": "224.0.0.8", # "multicast_destination": "224.0.0.8", # "name": "GigabitEthernet0/0/0/0" # } # ], # "ipv4": { # "dscp": "af11" # }, # "ipv6": { # "precedence": "routine" # }, # "log_internal_sync": true, # "master": 1, # "max_associations": 10, # "passive": true, # "peers": [ # { # "iburst": true, # "peer": "192.0.2.1", # "vrf": "siteC" # } # ], # "servers": [ # { # "burst": true, # "server": "192.0.2.2", # "vrf": "siteD" # } # ], # "source": "GigabitEthernet0/0/0/0", # "source_vrfs": [ # { # "name": "GigabitEthernet0/0/0/0", # "vrf": "siteE" # } # ], # "trusted_keys": [ # { # "key_id": 1 # } # ], # "update_calendar": 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 | | --- | --- | --- | | **after** dictionary | when changed | The resulting configuration after module execution. **Sample:** This output will always be in the same format as the module argspec. | | **before** dictionary | when *state* is `merged`, `replaced`, `overridden`, `deleted` or `purged` | The configuration prior to the module execution. **Sample:** This output will always be in the same format as the module argspec. | | **commands** list / elements=string | when *state* is `merged`, `replaced`, `overridden`, `deleted` or `purged` | The set of commands pushed to the remote device. **Sample:** ['sample command 1', 'sample command 2', 'sample command 3'] | | **gathered** list / elements=string | when *state* is `gathered` | Facts about the network resource gathered from the remote device as structured data. **Sample:** This output will always be in the same format as the module argspec. | | **parsed** list / elements=string | when *state* is `parsed` | The device native config provided in *running\_config* option parsed into structured data as per module argspec. **Sample:** This output will always be in the same format as the module argspec. | | **rendered** list / elements=string | when *state* is `rendered` | The provided configuration in the task rendered in device-native format (offline). **Sample:** ['sample command 1', 'sample command 2', 'sample command 3'] | ### Authors * Ashwini Mhatre (@amhatre)
programming_docs
ansible cisco.iosxr.iosxr – Use iosxr cliconf to run command on Cisco IOS XR platform cisco.iosxr.iosxr – Use iosxr cliconf to run command on Cisco IOS XR platform ============================================================================= Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * This iosxr plugin provides low level abstraction apis for sending and receiving CLI commands from Cisco IOS XR network devices. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **config\_commands** list / elements=string added in 2.0.0 of cisco.iosxr | **Default:**[] | var: ansible\_iosxr\_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. | ### Authors * Ansible Networking Team ansible cisco.iosxr.iosxr_logging – Configuration management of system logging services on network devices cisco.iosxr.iosxr\_logging – Configuration management of system logging services on network devices =================================================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_logging`. New in version 1.0.0: of cisco.iosxr * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in major release after 2023-08-01 Why Updated module released with more functionality. Alternative iosxr\_logging\_global Synopsis -------- * This module provides declarative management configuration of system logging (syslog) on Cisco IOS XR 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. * ncclient >= 0.5.3 when using netconf * lxml >= 4.1.1 when using netconf Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **aggregate** list / elements=dictionary | | List of syslog logging configuration definitions. | | | **dest** string | **Choices:*** host * console * monitor * buffered * file | Destination for system logging (syslog) messages. | | | **facility** string | | To configure the type of syslog facility in which system logging (syslog) messages are sent to syslog servers Optional config for `dest` = `host` | | | **hostnameprefix** string | | To append a hostname prefix to system logging (syslog) messages logged to syslog servers. Optional config for `dest` = `host` | | | **level** string | **Choices:*** emergencies * alerts * critical * errors * warning * notifications * informational * debugging | Specifies the severity level for the logging. aliases: severity | | | **name** string | | When `dest` = *file* name indicates file-name When `dest` = *host* name indicates the host-name or ip-address of syslog server. | | | **path** string | | Set file path. | | | **size** integer | | Size of buffer when `dest` = `buffered`. The acceptable value is in the range *307200 to 125000000 bytes*. Default 307200 Size of file when `dest` = `file`. The acceptable value is in the range *1 to 2097152*KB. Default 2 GB | | | **state** string | **Choices:*** present * absent | Existential state of the logging configuration on the node. | | | **vrf** string | | vrf name when syslog server is configured, `dest` = `host` | | **dest** string | **Choices:*** host * console * monitor * buffered * file | Destination for system logging (syslog) messages. | | **facility** string | **Default:**"local7" | To configure the type of syslog facility in which system logging (syslog) messages are sent to syslog servers Optional config for `dest` = `host` | | **hostnameprefix** string | | To append a hostname prefix to system logging (syslog) messages logged to syslog servers. Optional config for `dest` = `host` | | **level** string | **Choices:*** emergencies * alerts * critical * errors * warning * notifications * informational * **debugging** ← | Specifies the severity level for the logging. aliases: severity | | **name** string | | When `dest` = *file* name indicates file-name When `dest` = *host* name indicates the host-name or ip-address of syslog server. | | **path** string | | Set file path. | | **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. | | | **transport** string | **Choices:*** **cli** ← * netconf | Specifies the type of connection based transport. | | | **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. | | **size** integer | | Size of buffer when `dest` = `buffered`. The acceptable value is in the range *307200 to 125000000 bytes*. Default 307200 Size of file when `dest` = `file`. The acceptable value is in the range *1 to 2097152*KB. Default 2 GB | | **state** string | **Choices:*** **present** ← * absent | Existential state of the logging configuration on the node. | | **vrf** string | **Default:**"default" | vrf name when syslog server is configured, `dest` = `host` | Notes ----- Note * This module works with connection `network_cli` and `netconf`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). * 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: configure logging for syslog server host cisco.iosxr.iosxr_logging: dest: host name: 10.10.10.1 level: critical state: present - name: add hostnameprefix configuration cisco.iosxr.iosxr_logging: hostnameprefix: host1 state: absent - name: add facility configuration cisco.iosxr.iosxr_logging: facility: local1 state: present - name: configure console logging level cisco.iosxr.iosxr_logging: dest: console level: debugging state: present - name: configure monitor logging level cisco.iosxr.iosxr_logging: dest: monitor level: errors state: present - name: configure syslog to a file cisco.iosxr.iosxr_logging: dest: file name: file_name size: 2048 level: errors state: present - name: configure buffered logging with size cisco.iosxr.iosxr_logging: dest: buffered size: 5100000 - name: Configure logging using aggregate cisco.iosxr.iosxr_logging: aggregate: - {dest: console, level: warning} - {dest: buffered, size: 4800000} - {dest: file, name: file3, size: 2048} - {dest: host, name: host3, level: critical} - name: Delete logging using aggregate cisco.iosxr.iosxr_logging: aggregate: - {dest: console, level: warning} - {dest: buffered, size: 4800000} - {dest: file, name: file3, size: 2048} - {dest: host, name: host3, level: critical} 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 (empty list when no commands to send) | The list of configuration mode commands to send to the device **Sample:** ['logging 10.10.10.1 vrf default severity debugging', 'logging facility local7', 'logging hostnameprefix host1', 'logging console critical', 'logging buffered 2097153', 'logging buffered warnings', 'logging monitor errors', 'logging file log\_file maxfilesize 1024 severity info'] | | **xml** list / elements=string | always (empty list when no xml rpc to send) | NetConf rpc xml sent to device with transport `netconf` **Sample:** ['<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> <syslog xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-cfg"> <files> <file xc:operation="delete"> <file-name>file1</file-name> <file-log-attributes> <max-file-size>2097152</max-file-size> <severity>2</severity> </file-log-attributes> </file> </files> </syslog> </config>'] | Status ------ * This module will be removed in a major release after 2023-08-01. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Trishna Guha (@trishnaguha) * Kedar Kekan (@kedarX) ansible cisco.iosxr.iosxr_lacp – LACP resource module cisco.iosxr.iosxr\_lacp – LACP resource module ============================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_lacp`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages Global Link Aggregation Control Protocol (LACP) on IOS-XR devices. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | The provided configurations. | | | **system** dictionary | | This option sets the default system parameters for LACP bundles. | | | | **mac** dictionary | | The system MAC related configuration for LACP. | | | | | **address** string | | The system ID to use in LACP negotiations. | | | | **priority** integer | | The system priority to use in LACP negotiations. Lower value is higher priority. Refer to vendor documentation for valid values. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOS-XR device by executing the command **show running-config lacp**. 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 * deleted * parsed * rendered * gathered | The state of the configuration after module completion. | Notes ----- Note * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). Examples -------- ``` # Using merged # # # ------------ # Before state # ------------ # # # RP/0/0/CPU0:iosxr01#show running-config lacp # Tue Jul 16 17:46:08.147 UTC # % No such configuration item(s) # # - name: Merge provided configuration with device configuration cisco.iosxr.iosxr_lacp: config: system: priority: 10 mac: address: 00c1.4c00.bd15 state: merged # # # ----------------------- # Module Execution Result # ----------------------- # # "before": {} # # # "commands": [ # "lacp system priority 10", # "lacp system mac 00c1.4c00.bd15" # ] # # # "after": { # "system": { # "mac": { # "address": "00c1.4c00.bd15" # }, # "priority": 10 # } # } # # ----------- # After state # ----------- # # # RP/0/0/CPU0:iosxr01#sh run lacp # Tue Jul 16 17:51:29.365 UTC # lacp system mac 00c1.4c00.bd15 # lacp system priority 10 # # # Using replaced # # # ------------- # Before state # ------------- # # # RP/0/0/CPU0:iosxr01#sh run lacp # Tue Jul 16 17:53:59.904 UTC # lacp system mac 00c1.4c00.bd15 # lacp system priority 10 # - name: Replace device global lacp configuration with the given configuration cisco.iosxr.iosxr_lacp: config: system: priority: 11 state: replaced # # # ----------------------- # Module Execution Result # ----------------------- # "before": { # "system": { # "mac": { # "address": "00c1.4c00.bd15" # }, # "priority": 10 # } # } # # # "commands": [ # "no lacp system mac", # "lacp system priority 11" # ] # # # "after": { # "system": { # "priority": 11 # } # } # # ----------- # After state # ----------- # # # RP/0/0/CPU0:iosxr01#sh run lacp # Tue Jul 16 18:02:40.379 UTC # lacp system priority 11 # # # Using deleted # # # ------------ # Before state # ------------ # # # RP/0/0/CPU0:iosxr01#sh run lacp # Tue Jul 16 18:37:09.727 UTC # lacp system mac 00c1.4c00.bd15 # lacp system priority 11 # # - name: Delete global LACP configurations from the device cisco.iosxr.iosxr_lacp: state: deleted # # # ----------------------- # Module Execution Result # ----------------------- # "before": { # "system": { # "mac": { # "address": "00c1.4c00.bd15" # }, # "priority": 11 # } # } # # # "commands": [ # "no lacp system mac", # "no lacp system priority" # ] # # # "after": {} # # ------------ # After state # ------------ # # # RP/0/0/CPU0:iosxr01#sh run lacp # Tue Jul 16 18:39:44.116 UTC # % No such configuration item(s) # # # Using parsed # parsed.cfg # ------------ # # lacp system mac 00c1.4c00.bd15 # lacp system priority 11 # - name: Convert LACP config to argspec without connecting to the appliance # cisco.iosxr.iosxr_lacp: # running_config: "{{ lookup('file', './parsed.cfg') }}" # state: parsed # Task Output (redacted) # ----------------------- # "parsed": { # "system": { # "mac": { # "address": "00c1.4c00.bd15" # }, # "priority": 11 # } # } # Using rendered - name: Render platform specific commands from task input using rendered state cisco.iosxr.iosxr_lacp: config: system: priority: 11 mac: address: 00c1.4c00.bd15 state: rendered # Task Output (redacted) # ----------------------- # "rendered": [ # "lacp system priority 11", # "lacp system mac 00c1.4c00.bd15" # ] # Using gathered # Before state: # ------------ # # RP/0/0/CPU0:an-iosxr-02#show running-config lacp # lacp system mac 00c1.4c00.bd15 # lacp system priority 11 - name: Gather IOSXR LACP configuration cisco.iosxr.iosxr_lacp: config: state: gathered # Task Output (redacted) # ----------------------- # # "gathered": { # "system": { # "mac": { # "address": "00c1.4c00.bd15" # }, # "priority": 11 # } # } # After state: # ------------ # # RP/0/0/CPU0:an-iosxr-02#show running-config lacp # lacp system mac 00c1.4c00.bd15 # lacp system priority ``` 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:** ['lacp system priority 10', 'lacp system mac 00c1.4c00.bd15'] | ### Authors * Nilashish Chakraborty (@nilashishc) * Rohit Thakur (@rohitthakur2590) ansible cisco.iosxr.iosxr_interfaces – Interfaces resource module cisco.iosxr.iosxr\_interfaces – Interfaces resource module ========================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_interfaces`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages the interface attributes on Cisco IOS-XR network 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 interface options | | | **description** string | | Interface description. | | | **duplex** string | **Choices:*** full * half | Configures the interface duplex mode. Default is auto-negotiation when not configured. | | | **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. | | | **mtu** integer | | Sets the MTU value for the interface. Applicable for Ethernet interfaces only. Refer to vendor documentation for valid values. | | | **name** string / required | | Full name of the interface to configure in `type + path` format. e.g. `GigabitEthernet0/0/0/0` | | | **speed** integer | | Configure the speed for an interface. Default is auto-negotiation when not configured. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOS-XR device by executing the command **show running-config 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** ← * parsed * deleted * replaced * rendered * gathered * overridden | The state of the configuration after module completion | Notes ----- Note * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). Examples -------- ``` # Using merged # Before state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # shutdown # ! # interface GigabitEthernet0/0/0/2 # vrf custB # ipv4 address 178.18.169.23 255.255.255.0 # dot1q native vlan 30 # ! # interface GigabitEthernet0/0/0/3 # description Replaced by Ansible Team # mtu 2000 # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # dot1q native vlan 1021 # ! - name: Configure Ethernet interfaces cisco.iosxr.iosxr_interfaces: config: - name: GigabitEthernet0/0/0/2 description: Configured by Ansible enabled: true - name: GigabitEthernet0/0/0/3 description: Configured by Ansible Network enabled: false duplex: full state: merged # After state: # ------------ # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # shutdown # ! # interface GigabitEthernet0/0/0/2 # description Configured and Merged by Ansible Network # vrf custB # ipv4 address 178.18.169.23 255.255.255.0 # dot1q native vlan 30 # ! # interface GigabitEthernet0/0/0/3 # description Configured and Merged by Ansible Network # mtu 2600 # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex full # shutdown # dot1q native vlan 1021 # ! # Using replaced # Before state: # ------------ # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # description Configured by Ansible # shutdown # ! # interface GigabitEthernet0/0/0/2 # description Test # vrf custB # ipv4 address 178.18.169.23 255.255.255.0 # dot1q native vlan 30 # ! # interface GigabitEthernet0/0/0/3 # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # dot1q native vlan 1021 # ! - name: Configure following interfaces and replace their existing config cisco.iosxr.iosxr_interfaces: config: - name: GigabitEthernet0/0/0/2 description: Configured by Ansible enabled: true mtu: 2000 - name: GigabitEthernet0/0/0/3 description: Configured by Ansible Network enabled: false duplex: auto state: replaced # After state: # ------------ # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # description Configured by Ansible # shutdown # ! # interface GigabitEthernet0/0/0/2 # description Configured and Replaced by Ansible # mtu 2000 # vrf custB # ipv4 address 178.18.169.23 255.255.255.0 # dot1q native vlan 30 # ! # interface GigabitEthernet0/0/0/3 # description Configured and Replaced by Ansible Network # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex half # shutdown # dot1q native vlan 1021 # ! # Using overridden # Before state: # ------------ # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # shutdown # ! # interface GigabitEthernet0/0/0/2 # description Configured by Ansible # vrf custB # ipv4 address 178.18.169.23 255.255.255.0 # dot1q native vlan 30 # ! # interface GigabitEthernet0/0/0/3 # description Configured by Ansible # mtu 2600 # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex full # shutdown # dot1q native vlan 1021 # ! - name: Override interfaces cisco.iosxr.iosxr_interfaces: config: - name: GigabitEthernet0/0/0/2 description: Configured by Ansible enabled: true duplex: auto - name: GigabitEthernet0/0/0/3 description: Configured by Ansible Network enabled: false speed: 1000 state: overridden # After state: # ------------ # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # shutdown # ! # interface GigabitEthernet0/0/0/2 # description Configured and Overridden by Ansible Network # vrf custB # ipv4 address 178.18.169.23 255.255.255.0 # speed 1000 # dot1q native vlan 30 # ! # interface GigabitEthernet0/0/0/3 # description Configured and Overridden by Ansible Network # mtu 2000 # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex full # shutdown # dot1q native vlan 1021 # ! # Using deleted # Before state: # ------------ # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # shutdown # ! # interface GigabitEthernet0/0/0/2 # description Configured and Overridden by Ansible Network # vrf custB # ipv4 address 178.18.169.23 255.255.255.0 # speed 1000 # dot1q native vlan 30 # ! # interface GigabitEthernet0/0/0/3 # description Configured and Overridden by Ansible Network # mtu 2000 # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex full # shutdown # dot1q native vlan 1021 # ! - name: Delete IOSXR interfaces as in given arguments cisco.iosxr.iosxr_interfaces: config: - name: GigabitEthernet0/0/0/2 - name: GigabitEthernet0/0/0/3 state: deleted # After state: # ------------ # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # shutdown # ! # interface GigabitEthernet0/0/0/2 # vrf custB # ipv4 address 178.18.169.23 255.255.255.0 # dot1q native vlan 30 # ! # interface GigabitEthernet0/0/0/3 # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # dot1q native vlan 1021 # ! # Using parsed # parsed.cfg # ------------ # # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 10.8.38.70 255.255.255.0 # ! # interface GigabitEthernet0/0/0/0 # description Configured and Merged by Ansible-Network # mtu 110 # ipv4 address 172.31.1.1 255.255.255.0 # duplex half # ! # interface GigabitEthernet0/0/0/3 # shutdown # ! # interface GigabitEthernet0/0/0/4 # shutdown # ! # - name: Convert ACL interfaces config to argspec without connecting to the appliance # cisco.iosxr.iosxr_interfaces: # running_config: "{{ lookup('file', './parsed.cfg') }}" # state: parsed # Task Output (redacted) # ----------------------- # "parsed": [ # { # "name": "MgmtEth0/RP0/CPU0/0" # }, # { # "access_groups": [ # { # "acls": [ # { # "direction": "in", # "name": "acl_1" # }, # { # "direction": "out", # "name": "acl_2" # } # ], # "afi": "ipv4" # }, # { # "acls": [ # { # "direction": "in", # "name": "acl6_1" # }, # { # "direction": "out", # "name": "acl6_2" # } # ], # "afi": "ipv6" # } # ], # "name": "GigabitEthernet0/0/0/0" # }, # { # "access_groups": [ # { # "acls": [ # { # "direction": "out", # "name": "acl_1" # } # ], # "afi": "ipv4" # } # ], # "name": "GigabitEthernet0/0/0/1" # } # ] # } # Using rendered - name: Render platform specific commands from task input using rendered state cisco.iosxr.iosxr_interfaces: config: - name: GigabitEthernet0/0/0/0 description: Configured and Merged by Ansible-Network mtu: 110 enabled: true duplex: half - name: GigabitEthernet0/0/0/1 description: Configured and Merged by Ansible-Network mtu: 2800 enabled: false speed: 100 duplex: full state: rendered # Task Output (redacted) # ----------------------- # "rendered": [ # "interface GigabitEthernet0/0/0/0", # "description Configured and Merged by Ansible-Network", # "mtu 110", # "duplex half", # "no shutdown", # "interface GigabitEthernet0/0/0/1", # "description Configured and Merged by Ansible-Network", # "mtu 2800", # "speed 100", # "duplex full", # "shutdown" # ] # Using gathered # Before state: # ------------ # # RP/0/0/CPU0:an-iosxr-02#show running-config interface # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 10.8.38.70 255.255.255.0 # ! # interface GigabitEthernet0/0/0/0 # description Configured and Merged by Ansible-Network # mtu 110 # ipv4 address 172.31.1.1 255.255.255.0 # duplex half # ! # interface GigabitEthernet0/0/0/3 # shutdown # ! # interface GigabitEthernet0/0/0/4 # shutdown # ! - name: Gather IOSXR interfaces as in given arguments cisco.iosxr.iosxr_interfaces: config: state: gathered # Task Output (redacted) # ----------------------- # # "gathered": [ # { # "description": "test for ansible", # "enabled": false, # "name": "Loopback888" # }, # { # "description": "Configured and Merged by Ansible-Network", # "duplex": "half", # "enabled": true, # "mtu": 110, # "name": "GigabitEthernet0/0/0/0" # }, # { # "enabled": false, # "name": "GigabitEthernet0/0/0/3" # }, # { # "enabled": false, # "name": "GigabitEthernet0/0/0/4" # } # ] # After state: # ------------ # # RP/0/0/CPU0:an-iosxr-02#show running-config interface # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 10.8.38.70 255.255.255.0 # ! # interface GigabitEthernet0/0/0/0 # description Configured and Merged by Ansible-Network # mtu 110 # ipv4 address 172.31.1.1 255.255.255.0 # duplex half # ! # interface GigabitEthernet0/0/0/3 # shutdown # ! # interface GigabitEthernet0/0/0/4 # shutdown # ! ``` 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 GigabitEthernet0/0/0/2', 'description: Configured by Ansible', 'shutdown'] | ### Authors * Sumit Jaiswal (@justjais) * Rohit Thakur (@rohitthakur2590)
programming_docs
ansible cisco.iosxr.iosxr_l3_interfaces – L3 interfaces resource module cisco.iosxr.iosxr\_l3\_interfaces – L3 interfaces resource module ================================================================= Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_l3_interfaces`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module provides declarative management of Layer-3 interface on Cisco IOS-XR 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 | | IPv4 address to be set for the Layer-3 interface mentioned in *name* option. The address format is <ipv4 address>/<mask>, the mask is number in range 0-32 eg. 192.168.0.1/24 | | | | **address** string | | Configures the IPv4 address for Interface. | | | | **secondary** boolean | **Choices:*** no * yes | Configures the IP address as a secondary address. | | | **ipv6** list / elements=dictionary | | IPv6 address to be set for the Layer-3 interface mentioned in *name* option. The address format is <ipv6 address>/<mask>, the mask is number in range 0-128 eg. fd5d:12c9:2201:1::1/64 | | | | **address** string | | Configures the IPv6 address for Interface. | | | **name** string / required | | Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOS-XR device by executing the command **show running-config 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 * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). Examples -------- ``` # Using merged # Before state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # shutdown # ! # interface GigabitEthernet0/0/0/2 # shutdown # ! # interface GigabitEthernet0/0/0/3 # ipv4 address 192.168.0.2 255.255.255.0 # shutdown # ! # interface GigabitEthernet0/0/0/3.700 # ! # interface GigabitEthernet0/0/0/4 # ipv6 address fd5d:12c9:2201:1::1/64 # shutdown # ! - name: Merge provided configuration with device configuration cisco.iosxr.iosxr_l3_interfaces: config: - name: GigabitEthernet0/0/0/2 ipv4: - address: 192.168.0.1/24 - name: GigabitEthernet0/0/0/3 ipv4: - address: 192.168.2.1/24 secondary: true state: merged # After state: # ------------ # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # shutdown # ! # interface GigabitEthernet0/0/0/2 # ipv4 address 192.168.0.1 255.255.255.0 # shutdown # ! # interface GigabitEthernet0/0/0/3 # ipv4 address 192.168.1.0 255.255.255.0 # ipv4 address 192.168.2.1 255.255.255.0 secondary # shutdown # ! # interface GigabitEthernet0/0/0/3.700 # ! # interface GigabitEthernet0/0/0/4 # ipv6 address fd5d:12c9:2201:1::1/64 # shutdown # ! # Using overridden # Before state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # shutdown # ! # interface GigabitEthernet0/0/0/2 # ipv4 address 192.168.0.1 255.255.255.0 # shutdown # ! # interface GigabitEthernet0/0/0/3 # ipv4 address 192.168.1.0 255.255.255.0 # shutdown # ! # interface GigabitEthernet0/0/0/3.700 # ! # interface GigabitEthernet0/0/0/4 # ipv6 address fd5d:12c9:2201:1::1/64 # shutdown # ! - name: Override device configuration of all interfaces with provided configuration cisco.iosxr.iosxr_l3_interfaces: config: - name: GigabitEthernet0/0/0/3 ipv4: - address: 192.168.0.1/24 - name: GigabitEthernet0/0/0/3.700 ipv4: - address: 192.168.0.2/24 - address: 192.168.2.1/24 secondary: true state: overridden # After state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # shutdown # ! # interface GigabitEthernet0/0/0/2 # shutdown # ! # interface GigabitEthernet0/0/0/3 # ipv4 address 192.168.0.1 255.255.255.0 # shutdown # ! # interface GigabitEthernet0/0/0/3.700 # ipv4 address 192.168.0.2 255.255.255.0 # ipv4 address 192.168.2.1 255.255.255.0 secondary # ! # interface GigabitEthernet0/0/0/4 # shutdown # ! # Using replaced # Before state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # shutdown # ! # interface GigabitEthernet0/0/0/2 # shutdown # ! # interface GigabitEthernet0/0/0/3 # ipv4 address 192.168.0.2 255.255.255.0 # shutdown # ! # interface GigabitEthernet0/0/0/3.700 # ipv4 address 192.168.0.1 255.255.255.0 # ! # interface GigabitEthernet0/0/0/4 # ipv6 address fd5d:12c9:2201:1::1/64 # shutdown # ! - name: Replaces device configuration of listed interfaces with provided configuration cisco.iosxr.iosxr_l3_interfaces: config: - name: GigabitEthernet0/0/0/3 ipv6: - address: fd5d:12c9:2201:1::1/64 - name: GigabitEthernet0/0/0/4 ipv4: - address: 192.168.0.2/24 state: replaced # After state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # shutdown # ! # interface GigabitEthernet0/0/0/2 # shutdown # ! # interface GigabitEthernet0/0/0/3 # ipv6 address fd5d:12c9:2201:1::1/64 # shutdown # ! # interface GigabitEthernet0/0/0/3.700 # ipv4 address 192.168.0.1 255.255.255.0 # ! # interface GigabitEthernet0/0/0/4 # ipv4 address 192.168.0.2 255.255.255.0 # shutdown # ! # Using deleted # Before state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # ipv4 address 192.168.2.1 255.255.255.0 # shutdown # ! # interface GigabitEthernet0/0/0/2 # ipv4 address 192.168.3.1 255.255.255.0 # shutdown # ! # interface GigabitEthernet0/0/0/3 # ipv4 address 192.168.0.2 255.255.255.0 # shutdown # ! # interface GigabitEthernet0/0/0/3.700 # ipv4 address 192.168.0.1 255.255.255.0 # ! # interface GigabitEthernet0/0/0/4 # ipv6 address fd5d:12c9:2201:1::1/64 # shutdown # ! - name: "Delete L3 attributes of given interfaces (Note: This won't delete the interface itself)" cisco.iosxr.iosxr_l3_interfaces: config: - name: GigabitEthernet0/0/0/3 - name: GigabitEthernet0/0/0/4 - name: GigabitEthernet0/0/0/3.700 state: deleted # After state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # ipv4 address 192.168.2.1 255.255.255.0 # shutdown # ! # interface GigabitEthernet0/0/0/2 # ipv4 address 192.168.3.1 255.255.255.0 # shutdown # ! # interface GigabitEthernet0/0/0/3 # shutdown # ! # interface GigabitEthernet0/0/0/3.700 # ! # interface GigabitEthernet0/0/0/4 # shutdown # ! # Using Deleted without any config passed # "(NOTE: This will delete all of configured resource module attributes from each configured interface)" # Before state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # ipv4 address 192.168.2.1 255.255.255.0 # shutdown # ! # interface GigabitEthernet0/0/0/2 # ipv4 address 192.168.3.1 255.255.255.0 # shutdown # ! # interface GigabitEthernet0/0/0/3 # ipv4 address 192.168.0.2 255.255.255.0 # shutdown # ! # interface GigabitEthernet0/0/0/3.700 # ipv4 address 192.168.0.1 255.255.255.0 # ! # interface GigabitEthernet0/0/0/4 # ipv6 address fd5d:12c9:2201:1::1/64 # shutdown # ! - name: "Delete L3 attributes of all interfaces (Note: This won't delete the interface itself)" cisco.iosxr.iosxr_l3_interfaces: state: deleted # After state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/1 # shutdown # ! # interface GigabitEthernet0/0/0/2 # shutdown # ! # interface GigabitEthernet0/0/0/3 # shutdown # ! # interface GigabitEthernet0/0/0/3.700 # ! # interface GigabitEthernet0/0/0/4 # shutdown # ! # Using parsed # parsed.cfg # ------------ # # nterface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 10.8.38.70 255.255.255.0 # ! # interface GigabitEthernet0/0/0/0 # description Configured and Merged by Ansible-Network # mtu 66 # ipv4 address 192.0.2.1 255.255.255.0 # ipv4 address 192.0.2.2 255.255.255.0 secondary # ipv6 address 2001:db8:0:3::/64 # duplex half # ! # interface GigabitEthernet0/0/0/1 # description Configured and Merged by Ansible-Network # mtu 66 # speed 100 # duplex full # dot1q native vlan 10 # l2transport # l2protocol cdp forward # l2protocol pvst tunnel # propagate remote-status # ! # ! # interface GigabitEthernet0/0/0/3 # ipv4 address 192.0.22.1 255.255.255.0 # ipv4 address 192.0.23.1 255.255.255.0 # ! # - name: Convert L3 interfaces config to argspec without connecting to the appliance # cisco.iosxr.iosxr_l3_interfaces: # running_config: "{{ lookup('file', './parsed.cfg') }}" # state: parsed # Task Output (redacted) # ----------------------- # "parsed": [ # { # "ipv4": [ # { # "address": "192.0.2.1 255.255.255.0" # }, # { # "address": "192.0.2.2 255.255.255.0", # "secondary": true # } # ], # "ipv6": [ # { # "address": "2001:db8:0:3::/64" # } # ], # "name": "GigabitEthernet0/0/0/0" # }, # { # "name": "GigabitEthernet0/0/0/1" # }, # { # "ipv4": [ # { # "address": "192.0.22.1 255.255.255.0" # }, # { # "address": "192.0.23.1 255.255.255.0" # } # ], # "name": "GigabitEthernet0/0/0/3" # } # ] # Using rendered - name: Render platform specific commands from task input using rendered state cisco.iosxr.iosxr_l3_interfaces: config: - name: GigabitEthernet0/0/0/0 ipv4: - address: 198.51.100.1/24 - name: GigabitEthernet0/0/0/1 ipv6: - address: 2001:db8:0:3::/64 ipv4: - address: 192.0.2.1/24 - address: 192.0.2.2/24 secondary: true state: rendered # Task Output (redacted) # ----------------------- # "rendered": [ # "interface GigabitEthernet0/0/0/0", # "ipv4 address 198.51.100.1 255.255.255.0", # "interface GigabitEthernet0/0/0/1", # "ipv4 address 192.0.2.2 255.255.255.0 secondary", # "ipv4 address 192.0.2.1 255.255.255.0", # "ipv6 address 2001:db8:0:3::/64" # ] # Using gathered # Before state: # ------------ # # RP/0/0/CPU0:an-iosxr-02#show running-config interface # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 10.8.38.70 255.255.255.0 # ! # interface GigabitEthernet0/0/0/0 # description Configured and Merged by Ansible-Network # mtu 66 # ipv4 address 192.0.2.1 255.255.255.0 # ipv4 address 192.0.2.2 255.255.255.0 secondary # ipv6 address 2001:db8:0:3::/64 # duplex half # ! # interface GigabitEthernet0/0/0/1 # description Configured and Merged by Ansible-Network # mtu 66 # speed 100 # duplex full # dot1q native vlan 10 # l2transport # l2protocol cdp forward # l2protocol pvst tunnel # propagate remote-status # ! # ! # interface GigabitEthernet0/0/0/3 # shutdown # ! # interface GigabitEthernet0/0/0/4 # shutdown # dot1q native vlan 40 # ! - name: Gather IOSXR l3 interfaces as in given arguments cisco.iosxr.iosxr_l3_interfaces: config: state: gathered # Task Output (redacted) # ----------------------- # # "gathered": [ # { # "name": "Loopback888" # }, # { # "ipv4": [ # { # "address": "192.0.2.1 255.255.255.0" # }, # { # "address": "192.0.2.2 255.255.255.0", # "secondary": true # } # ], # "ipv6": [ # { # "address": "2001:db8:0:3::/64" # } # ], # "name": "GigabitEthernet0/0/0/0" # }, # { # "name": "GigabitEthernet0/0/0/1" # }, # { # "name": "GigabitEthernet0/0/0/3" # }, # { # "name": "GigabitEthernet0/0/0/4" # } # ] # After state: # ------------ # # RP/0/0/CPU0:an-iosxr-02#show running-config interface # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 10.8.38.70 255.255.255.0 # ! # interface GigabitEthernet0/0/0/0 # description Configured and Merged by Ansible-Network # mtu 66 # ipv4 address 192.0.2.1 255.255.255.0 # ipv4 address 192.0.2.2 255.255.255.0 secondary # ipv6 address 2001:db8:0:3::/64 # duplex half # ! # interface GigabitEthernet0/0/0/1 # description Configured and Merged by Ansible-Network # mtu 66 # speed 100 # duplex full # dot1q native vlan 10 # l2transport # l2protocol cdp forward # l2protocol pvst tunnel # propagate remote-status # ! # ! # interface GigabitEthernet0/0/0/3 # shutdown # ! # interface GigabitEthernet0/0/0/4 # shutdown # dot1q native vlan 40 # ! ``` 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 GigabitEthernet0/0/0/1', 'ipv4 address 192.168.0.1 255.255.255.0'] | ### Authors * Sumit Jaiswal (@justjais) * Rohit Thakur (@rohitthakur2590) ansible cisco.iosxr.iosxr_system – Manage the system attributes on Cisco IOS XR devices cisco.iosxr.iosxr\_system – Manage the system attributes on Cisco IOS XR devices ================================================================================ Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_system`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module provides declarative management of node system attributes on Cisco IOS XR 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). Requirements ------------ The below requirements are needed on the host that executes this module. * ncclient >= 0.5.3 when using netconf * lxml >= 4.1.1 when using netconf 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** list / elements=string | | Provides the list of domain suffixes to append to the hostname for the purpose of doing name resolution. This argument accepts a 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\_enabled** boolean | **Choices:*** no * **yes** ← | Provides administrative control for enabling or disabling DNS lookups. When this argument is set to True, lookups are performed and when it is set to False, lookups are not performed. | | **lookup\_source** string | | The `lookup_source` argument 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** list / elements=string | | The `name_serves` argument accepts a list of DNS name servers by way of either FQDN or IP address to use to perform name resolution lookups. This argument accepts wither a list of DNS servers See examples. | | **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. | | | **transport** string | **Choices:*** **cli** ← * netconf | Specifies the type of connection based transport. | | | **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. | | **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 | | **vrf** string | **Default:**"default" | VRF name for domain services | Notes ----- Note * This module works with connection `network_cli` and `netconf`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). * name-servers *state=absent* operation with `netconf` transport is a success, but with rpc-error. This is due to XR platform issue. Recommended to use *ignore\_errors* option with the task as a workaround. * 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: configure hostname and domain-name (default vrf=default) cisco.iosxr.iosxr_system: hostname: iosxr01 domain_name: test.example.com domain_search: - ansible.com - redhat.com - cisco.com - name: remove configuration cisco.iosxr.iosxr_system: hostname: iosxr01 domain_name: test.example.com domain_search: - ansible.com - redhat.com - cisco.com state: absent - name: configure hostname and domain-name with vrf cisco.iosxr.iosxr_system: hostname: iosxr01 vrf: nondefault domain_name: test.example.com domain_search: - ansible.com - redhat.com - cisco.com - name: configure DNS lookup sources cisco.iosxr.iosxr_system: lookup_source: MgmtEth0/0/CPU0/0 lookup_enabled: true - name: configure name servers cisco.iosxr.iosxr_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 | The list of configuration mode commands to send to the device **Sample:** ['hostname iosxr01', 'ip domain-name test.example.com'] | | **xml** list / elements=string | always (empty list when no xml rpc to send) | NetConf rpc xml sent to device with transport `netconf` **Sample:** ['<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> <ip-domain xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-cfg"> <vrfs> <vrf> <vrf-name>default</vrf-name> <lists> <list xc:operation="merge"> <order>0</order> <list-name>redhat.com</list-name> </list> </lists> </vrf> </vrfs> </ip-domain> </config>'] | ### Authors * Peter Sprygada (@privateip) * Kedar Kekan (@kedarX)
programming_docs
ansible cisco.iosxr.iosxr – Use iosxr netconf plugin to run netconf commands on Cisco IOSXR platform cisco.iosxr.iosxr – Use iosxr netconf plugin to run netconf commands on Cisco IOSXR platform ============================================================================================ Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * This iosxr plugin provides low level abstraction apis for sending and receiving netconf commands from Cisco iosxr network devices. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **ncclient\_device\_handler** string | **Default:**"iosxr" | | Specifies the ncclient device handler name for Cisco iosxr network os. To identify the ncclient device handler name refer ncclient library documentation. | ### Authors * Ansible Networking Team ansible cisco.iosxr.iosxr_l2_interfaces – L2 interfaces resource module cisco.iosxr.iosxr\_l2\_interfaces – L2 interfaces resource module ================================================================= Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_l2_interfaces`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages the Layer-2 interface attributes on Cisco IOS-XR 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-2 interface options | | | **encapsulation** dictionary | | Specify which packets will be matched by this sub-interface. | | | | **dot1q** integer | | IEEE 802.1Q VLAN-tagged packets. | | | | **second\_dot1q** integer | | IEEE 802.1Q VLAN-tagged packets. | | | **l2protocol** list / elements=dictionary | | Configures Layer 2 protocol tunneling and protocol data unit (PDU) filtering on an interface. | | | | **cdp** string | **Choices:*** drop * forward * tunnel | Cisco Discovery Protocol (CDP) tunneling and data unit parameters. | | | | **cpsv** string | **Choices:*** drop * reverse-tunnel * tunnel | CDP, PVST+, STP, and VTP protocols. | | | | **pvst** string | **Choices:*** drop * forward * tunnel | Configures the per-VLAN Spanning Tree Protocol (PVST) tunneling and data unit parameters. | | | | **stp** string | **Choices:*** drop * forward * tunnel | Spanning Tree Protocol (STP) tunneling and data unit parameters. | | | | **vtp** string | **Choices:*** drop * forward * tunnel | VLAN Trunk Protocol (VTP) tunneling and data unit parameters. | | | **l2transport** boolean | **Choices:*** no * yes | Switchport mode access command to configure the interface as a layer 2 access | | | **name** string / required | | Full name of the interface/sub-interface excluding any logical unit number, e.g. GigabitEthernet0/0/0/1 or GigabitEthernet0/0/0/1.100. | | | **native\_vlan** integer | | Configure a native VLAN ID for the trunk | | | **propagate** boolean | **Choices:*** no * yes | Propagate Layer 2 transport events. Note that it will work only when the *l2tranport* option is set to TRUE | | | **q\_vlan** list / elements=integer | | 802.1Q VLAN configuration. Note that it can accept either 2 VLAN IDs when configuring Q-in-Q VLAN, or it will accept 1 VLAN ID and 'any' as input list when configuring Q-in-any vlan as input. Note, that this option is valid only with respect to Sub-Interface and is not valid when configuring for Interface. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOS-XR device by executing the command **show running-config 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 * rendered * gathered * parsed | The state of the configuration after module completion | Notes ----- Note * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). Examples -------- ``` # Using merged # # Before state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/3 # description Ansible Network # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex half # shutdown # ! # interface GigabitEthernet0/0/0/4 # description Test description # ! - name: Merge provided configuration with device configuration cisco.iosxr.iosxr_l2_interfaces: config: - name: GigabitEthernet0/0/0/3 native_vlan: 20 - name: GigabitEthernet0/0/0/4 native_vlan: 40 l2transport: true l2protocol: - stp: tunnel - name: GigabitEthernet0/0/0/3.900 l2transport: true q_vlan: - 20 - 40 state: merged # After state: # ------------ # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/3 # description Ansible Network # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex half # shutdown # dot1q native vlan 20 # ! # interface GigabitEthernet0/0/0/4 # description Test description # dot1q native vlan 10 # l2transport # l2protocol stp tunnel # ! # ! # interface GigabitEthernet0/0/0/3.900 l2transport # dot1q vlan 20 40 # ! # Using replaced # # Before state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/3 # description Ansible Network # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex half # shutdown # dot1q native vlan 20 # ! # interface GigabitEthernet0/0/0/4 # description Test description # dot1q native vlan 10 # l2transport # l2protocol stp tunnel # ! # ! # interface GigabitEthernet0/0/0/3.900 l2transport # dot1q vlan 20 40 # ! - name: Replaces device configuration of listed interfaces with provided configuration cisco.iosxr.iosxr_l2_interfaces: config: - name: GigabitEthernet0/0/0/4 native_vlan: 40 l2transport: true l2protocol: - stp: forward - name: GigabitEthernet0/0/0/3.900 q_vlan: - 20 - any state: replaced # After state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/3 # description Ansible Network # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex half # shutdown # dot1q native vlan 20 # ! # interface GigabitEthernet0/0/0/4 # description Test description # dot1q native vlan 40 # l2transport # l2protocol stp forward # ! # ! # interface GigabitEthernet0/0/0/3.900 l2transport # dot1q vlan 20 any # ! # Using overridden # # Before state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/3 # description Ansible Network # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex half # shutdown # dot1q native vlan 20 # ! # interface GigabitEthernet0/0/0/4 # description Test description # dot1q native vlan 10 # l2transport # l2protocol stp tunnel # ! # ! # interface GigabitEthernet0/0/0/3.900 l2transport # dot1q vlan 20 40 # ! - name: Override device configuration of all interfaces with provided configuration cisco.iosxr.iosxr_l2_interfaces: config: - name: GigabitEthernet0/0/0/4 native_vlan: 40 l2transport: true l2protocol: - stp: forward - name: GigabitEthernet0/0/0/3.900 q_vlan: - 20 - any state: overridden # After state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/3 # description Ansible Network # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex half # shutdown # ! # interface GigabitEthernet0/0/0/4 # description Test description # dot1q native vlan 40 # l2transport # l2protocol stp forward # ! # ! # interface GigabitEthernet0/0/0/3.900 # dot1q vlan 20 any # ! # Using deleted # # Before state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/3 # description Ansible Network # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex half # shutdown # dot1q native vlan 20 # ! # interface GigabitEthernet0/0/0/4 # description Test description # dot1q native vlan 10 # l2transport # l2protocol stp tunnel # ! # ! # - name: "Delete L2 attributes of given interfaces (Note: This won't delete the interface itself)" cisco.iosxr.iosxr_l2_interfaces: config: - name: GigabitEthernet0/0/0/4 state: deleted # After state: # ------------ # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/3 # description Ansible Network # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex half # shutdown # dot1q native vlan 20 # ! # interface GigabitEthernet0/0/0/4 # description Test description # ! # Using Deleted without any config passed # "(NOTE: This will delete all of configured resource module attributes from each configured interface)" # # Before state: # ------------- # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/3 # description Ansible Network # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex half # shutdown # dot1q native vlan 20 # ! # interface GigabitEthernet0/0/0/4 # description Test description # dot1q native vlan 10 # l2transport # l2protocol stp tunnel # ! # ! - name: "Delete L2 attributes of all interfaces (Note: This won't delete the interface itself)" cisco.iosxr.iosxr_l2_interfaces: state: deleted # After state: # ------------ # # viosxr#show running-config interface # interface GigabitEthernet0/0/0/3 # description Ansible Network # vrf custB # ipv4 address 10.10.0.2 255.255.255.0 # duplex half # shutdown # ! # interface GigabitEthernet0/0/0/4 # description Test description # ! # Using parsed # parsed.cfg # ------------ # # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 10.8.38.70 255.255.255.0 # ! # interface GigabitEthernet0/0/0/0 # description Configured and Merged by Ansible-Network # mtu 110 # ipv4 address 172.31.1.1 255.255.255.0 # duplex half # ! # interface GigabitEthernet0/0/0/1 # dot1q native vlan 10 # l2transport # l2protocol cdp forward # l2protocol pvst tunnel # propagate remote-status # ! # ! # interface GigabitEthernet0/0/0/3 # shutdown # ! # interface GigabitEthernet0/0/0/3.900 # encapsulation dot1q 20 second-dot1q 40 # ! # interface GigabitEthernet0/0/0/4 # shutdown # dot1q native vlan 40 # ! - name: Convert L2 interfaces config to argspec without connecting to the appliance cisco.iosxr.iosxr_l2_interfaces: running_config: "{{ lookup('file', './parsed.cfg') }}" state: parsed # Task Output (redacted) # ----------------------- # "parsed": [ # { # "name": "GigabitEthernet0/0/0/0" # }, # { # "l2protocol": [ # { # "cdp": "forward" # }, # { # "pvst": "tunnel" # } # ], # "l2transport": true, # "name": "GigabitEthernet0/0/0/1", # "native_vlan": 10, # "propagate": true # }, # { # "name": "GigabitEthernet0/0/0/3" # }, # { # "name": "GigabitEthernet0/0/0/3.900", # "q_vlan": [ # 20, # 40 # ] # }, # { # "name": "GigabitEthernet0/0/0/4", # "native_vlan": 40 # } # ] # Using rendered - name: Render platform specific commands from task input using rendered state cisco.iosxr.iosxr_l2_interfaces: config: - name: GigabitEthernet0/0/0/1 native_vlan: 10 l2transport: true l2protocol: - pvst: tunnel - cdp: forward propagate: true - name: GigabitEthernet0/0/0/3.900 q_vlan: - 20 - 40 - name: GigabitEthernet0/0/0/4 native_vlan: 40 state: rendered # Task Output (redacted) # ----------------------- # "rendered": [ # "interface GigabitEthernet0/0/0/1", # "dot1q native vlan 10", # "l2transport l2protocol pvst tunnel", # "l2transport l2protocol cdp forward", # "l2transport propagate remote-status", # "interface GigabitEthernet0/0/0/3.900", # "dot1q vlan 20 40", # "interface GigabitEthernet0/0/0/4", # "dot1q native vlan 40" # ] # Using gathered # Before state: # ------------ # # RP/0/0/CPU0:an-iosxr-02#show running-config interface # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 10.8.38.70 255.255.255.0 # ! # interface GigabitEthernet0/0/0/0 # description Configured and Merged by Ansible-Network # mtu 110 # ipv4 address 172.31.1.1 255.255.255.0 # duplex half # ! # interface GigabitEthernet0/0/0/1 # dot1q native vlan 10 # l2transport # l2protocol cdp forward # l2protocol pvst tunnel # propagate remote-status # ! # ! # interface GigabitEthernet0/0/0/3 # shutdown # ! # interface GigabitEthernet0/0/0/3.900 # encapsulation dot1q 20 second-dot1q 40 # ! # interface GigabitEthernet0/0/0/4 # shutdown # dot1q native vlan 40 # ! - name: Gather IOSXR l2 interfaces as in given arguments cisco.iosxr.iosxr_l2_interfaces: config: state: gathered # Task Output (redacted) # ----------------------- # # "gathered": [ # { # "name": "GigabitEthernet0/0/0/0" # }, # { # "l2protocol": [ # { # "cdp": "forward" # }, # { # "pvst": "tunnel" # } # ], # "l2transport": true, # "name": "GigabitEthernet0/0/0/1", # "native_vlan": 10, # "propagate": true # }, # { # "name": "GigabitEthernet0/0/0/3" # }, # { # "name": "GigabitEthernet0/0/0/3.900", # "q_vlan": [ # 20, # 40 # ] # }, # { # "name": "GigabitEthernet0/0/0/4", # "native_vlan": 40 # } # ] # After state: # ------------ # # RP/0/0/CPU0:an-iosxr-02#show running-config interface # interface Loopback888 # description test for ansible # shutdown # ! # interface MgmtEth0/0/CPU0/0 # ipv4 address 10.8.38.70 255.255.255.0 # ! # interface GigabitEthernet0/0/0/0 # description Configured and Merged by Ansible-Network # mtu 110 # ipv4 address 172.31.1.1 255.255.255.0 # duplex half # ! # interface GigabitEthernet0/0/0/1 # dot1q native vlan 10 # l2transport # l2protocol cdp forward # l2protocol pvst tunnel # propagate remote-status # ! # ! # interface GigabitEthernet0/0/0/3 # shutdown # ! # interface GigabitEthernet0/0/0/3.900 # encapsulation dot1q 20 second-dot1q 40 # ! # interface GigabitEthernet0/0/0/4 # shutdown # dot1q native vlan 40 # ! ``` 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 GigabitEthernet0/0/0/2', 'l2transport l2protocol pvst tunnel'] | ### Authors * Sumit Jaiswal (@justjais) * Rohit Thakur (@rohitthakur2590) ansible cisco.iosxr.iosxr_bgp_address_family – Manages BGP Address Family resource module. cisco.iosxr.iosxr\_bgp\_address\_family – Manages BGP Address Family resource module. ===================================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_bgp_address_family`. New in version 2.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module configures and manages the attributes of BGP address family on Cisco IOS-XR platforms. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | A list of configurations for BGP address family. | | | **address\_family** list / elements=dictionary | | Enable address family and enter its config mode | | | | **additional\_paths** string | **Choices:*** send * receive | BGP additional-paths commands | | | | **advertise\_best\_external** boolean | **Choices:*** no * yes | Advertise best-external path. | | | | **afi** string | **Choices:*** ipv4 * ipv6 * l2vpn * link-state * vpnv4 * vpnv6 | address family. | | | | **aggregate\_address** list / elements=dictionary | | Configure BGP aggregate entries. | | | | | **as\_confed\_set** boolean | **Choices:*** no * yes | Generate AS confed set path information. | | | | | **as\_set** boolean | **Choices:*** no * yes | Generate AS set path information. | | | | | **route\_policy** string | | Policy to condition advertisement, suppression, and attributes. | | | | | **summary\_only** boolean | **Choices:*** no * yes | Filter more specific routes from updates. | | | | | **value** string | | IPv4 Aggregate address and mask or masklength. | | | | **allocate\_label** dictionary | | Allocate labels. | | | | | **all** boolean | **Choices:*** no * yes | Allocate labels for all prefixes. | | | | | **route\_policy** string | | Use a route policy to select prefixes for label allocation. | | | | **allow\_vpn\_default\_originate** boolean | **Choices:*** no * yes | Allow sending default originate route to VPN neighbor. | | | | **as\_path\_loopcheck\_out\_disable** boolean | **Choices:*** no * yes | Configure AS Path loop checking for outbound updates. | | | | **bgp** dictionary | | BGP Commands. | | | | | **attribute\_download** boolean | **Choices:*** no * yes | Configure attribute download for this address-family. | | | | | **bestpath** dictionary | | Change default route selection criteria. | | | | | | **origin\_as** dictionary | | BGP origin-AS knobs. | | | | | | | **allow** dictionary | | BGP origin-AS knobs. | | | | | | | | **invalid** boolean | **Choices:*** no * yes | BGP bestpath selection will allow 'invalid' origin-AS | | | | | | | **use** dictionary | | BGP origin-AS knobs. | | | | | | | | **validity** boolean | **Choices:*** no * yes | BGP bestpath selection will use origin-AS validity | | | | | **client\_to\_client** dictionary | | Configure client to client route reflection. | | | | | | **reflection** dictionary | | disable client to client reflection of cluster id. | | | | | | | **cluster\_id\_disable** dictionary | | ID of Cluster for which reflection is to be disabled. | | | | | | | | **cluster\_id** string | | ID of Cluster for which reflection is to be disabled. | | | | | | | | **disable** boolean | **Choices:*** no * yes | disable cluster id. | | | | | | | **disable** boolean | **Choices:*** no * yes | disable reflection. | | | | | **dampening** dictionary | | Enable route-flap dampening | | | | | | **route\_policy** string | | Route policy to specify criteria for dampening. | | | | | | **set** boolean | **Choices:*** no * yes | Enable dampening. | | | | | | **value** integer | | Half-life time for the penalty | | | | | **import\_delay** dictionary | | Specify delay for batching import processing. | | | | | | **delay\_ms\_parts** integer | | milliseconds part <0-999>. | | | | | | **delay\_second\_parts** integer | | Delay, seconds part <0-10>. | | | | | **label\_delay** dictionary | | Specify delay for batching label processing | | | | | | **delay\_ms\_parts** integer | | milliseconds part <0-999>. | | | | | | **delay\_second\_parts** integer | | Delay, seconds part <0-10>. | | | | | **origin\_as** dictionary | | BGP origin-AS knobs. | | | | | | **validation** dictionary | | BGP origin-AS validation knobs. | | | | | | | **disable** boolean | **Choices:*** no * yes | Disable RPKI origin-AS validation. | | | | | | | **signal** dictionary | | Signal origin-AS validity towards peers. | | | | | | | | **ibgp** boolean | **Choices:*** no * yes | Signal origin-AS validity towards iBGP peers | | | | | **scan\_time** integer | | Configure background scanner interval for this address-family Example- <5-3600>. | | | | **default\_martian\_check\_disable** boolean | **Choices:*** no * yes | Martian check default | | | | **distance** dictionary | | Define an administrative distance. | | | | | **local\_routes** integer | | Distance for local routes <1-255>. | | | | | **routes\_external\_to\_as** integer | | Distance for routes external to the AS <1-255>. | | | | | **routes\_internal\_to\_as** integer | | Distance for routes internal to the AS <1-255>. | | | | **dynamic\_med** integer | | Dynamic MED Interval. | | | | **global\_table\_multicast** boolean | **Choices:*** no * yes | Enable global table multicast. | | | | **inter\_as\_install** boolean | **Choices:*** no * yes | Install remote mvpn routes in default vrf.This is applicable for mvpn afi. | | | | **label\_mode** dictionary | | label configuration. | | | | | **per\_ce** boolean | **Choices:*** no * yes | Set per CE label mode | | | | | **per\_prefix** boolean | **Choices:*** no * yes | Set per perfix label mode. | | | | | **per\_vrf** boolean | **Choices:*** no * yes | Set per VRF label mode. | | | | | **route\_policy** string | | Use a route policy to select prefixes for label allocation mode. | | | | **maximum\_paths** dictionary | | Forward packets over multiple paths. | | | | | **ebgp** dictionary | | ebgp-multipath. | | | | | | **max\_path\_value** integer | | <2-64> Number of paths (limit includes backup path). | | | | | | **order\_igp\_metric** boolean | **Choices:*** no * yes | Order candidate multipaths for selection as per configured number(cisco-support). | | | | | | **selective\_order\_igp\_metric** boolean | **Choices:*** no * yes | Allow multipaths only from marked neighbors | | | | | **eibgp** dictionary | | eiBGP-multipath. | | | | | | **max\_path\_value** integer | | <2-64> Number of paths (limit includes backup path). | | | | | | **order\_igp\_metric** boolean | **Choices:*** no * yes | Order candidate multipaths for selection as per configured number(cisco-support). | | | | | | **selective\_order\_igp\_metric** boolean | **Choices:*** no * yes | Allow multipaths only from marked neighbors | | | | | **ibgp** dictionary | | iBGP-multipath. | | | | | | **max\_path\_value** integer | | <2-64> Number of paths (limit includes backup path). | | | | | | **order\_igp\_metric** boolean | **Choices:*** no * yes | Order candidate multipaths for selection as per configured number(cisco-support). | | | | | | **selective\_order\_igp\_metric** boolean | **Choices:*** no * yes | Allow multipaths only from marked neighbors | | | | | | **unequal\_cost** dictionary | | Allow multipaths to have different BGP nexthop IGP metrics. | | | | | | | **order\_igp\_metric** boolean | **Choices:*** no * yes | Order candidate multipaths for selection as per configured number(cisco-support). | | | | | | | **selective\_order\_igp\_metric** boolean | **Choices:*** no * yes | Allow multipaths only from marked neighbors | | | | | | | **set** boolean | **Choices:*** no * yes | set unequal\_cost. | | | | **mvpn\_single\_forwarder\_selection\_all** boolean | **Choices:*** no * yes | Enable single forwarder selection for all | | | | **mvpn\_single\_forwarder\_selection\_highest\_ip\_address** boolean | **Choices:*** no * yes | Enable single forwarder selection for PE with highest ip address. | | | | **networks** list / elements=dictionary | | Specify a network to announce via BGP. | | | | | **backdoor\_route\_policy** string | | Specify a BGP backdoor route. | | | | | **network** string | | Specify a network to announce via BGP. | | | | | **route\_policy** string | | Route-policy to modify the attributes. | | | | **nexthop** dictionary | | Nexthop | | | | | **resolution\_prefix\_length\_minimum** integer | **Choices:*** 0 * 32 | Set minimum prefix-length for nexthop resolution. | | | | | **route\_policy** string | | Policy to filter out nexthop notification. | | | | | **trigger\_delay\_critical** integer | | For critical notification | | | | | **trigger\_delay\_non\_critical** integer | | For non critical notification. | | | | **optimal\_route\_reflection** dictionary | | Configure optimal-route-reflection group. | | | | | **group\_name** string | | ORR group name - maximum 32 characters. | | | | | **primary\_address** string | | IPv4 primary address. | | | | | **secondary\_address** string | | IPv4 secondary address | | | | **permanent\_network\_route\_policy** string | | Name of the policy. | | | | **redistribute** list / elements=dictionary | | Redistribute information from another routing protocol. | | | | | **external** boolean | **Choices:*** no * yes | Redistribute EIGRP external routes.applicable for eigrp. | | | | | **external\_ospf** integer | **Choices:*** 1 * 2 | Redistribute OSPF external routes.applicable for ospf. | | | | | **id** string | | Identifier for the routing protocol for configuring redistribute information. Example-application name, eigrp/is-is instance name, ospf tag Valid for protocols 'ospf', 'eigrp', 'isis' and 'application'. | | | | | **internal** boolean | **Choices:*** no * yes | Redistribute EIGRP internal routes.applicable for eigrp. | | | | | **level** string | **Choices:*** 1 * 2 * 1-inter-area | Redistribute routes from the specified ISIS levels. Redistribute ISIS level 1 routes Redistribute ISIS level 1 inter-area routes Redistribute ISIS level 2 ISIS routes | | | | | **metric** integer | | Specifies the metric for redistributed routes. | | | | | **nssa\_external** boolean | **Choices:*** no * yes | Redistribute OSPF NSSA external routes.applicable for ospf. | | | | | **protocol** string / required | **Choices:*** ospf * application * eigrp * isis * static * connected * lisp * mobile * rip * subscriber | Specifies the protocol for configuring redistribute information. | | | | | **route\_policy** string | | Specifies the route policy reference. | | | | **retain\_local\_label** integer | | Label retention time in minutes <3-60>. | | | | **route\_target\_download** boolean | **Choices:*** no * yes | Route target RIB installation. | | | | **safi** string | **Choices:*** flowspec * mdt * multicast * mvpn * rt-filter * tunnel * unicast * evpn * mspw * vpls-vpws * link-state | Address Family modifier | | | | **segmented\_multicast** boolean | **Choices:*** no * yes | Enable segmented multicast.This is applicable for mvpn afi. | | | | **table\_policy** string | | Configure policy for installation of routes to RIB. | | | | **update** dictionary | | BGP Update generation configuration. | | | | | **limit** dictionary | | Update limit. | | | | | | **address\_family** integer | | Update limit for sub-groups. | | | | | | **sub\_group** dictionary | | Update limit for address-family. | | | | | | | **ebgp** integer | | Update limit for eBGP sub-groups<1-512. | | | | | | | **ibgp** integer | | Update limit for iBGP sub-groups<1-512. | | | | | **wait\_install** boolean | **Choices:*** no * yes | Wait for route install. | | | | **vrf** string | | VRF name. | | | | **vrf\_all\_conf** dictionary | | configuration is for all vrfs and its applicable for afi vpn6 and modifier unicast. | | | | | **label\_mode** dictionary | | Label-related configuration. | | | | | | **per\_ce** boolean | **Choices:*** no * yes | Set per CE label mode | | | | | | **per\_vrf** boolean | **Choices:*** no * yes | Set per VRF label mode. | | | | | | **route\_policy** string | | Use a route policy to select prefixes for label allocation mode. | | | | | **source\_rt\_import\_policy** boolean | **Choices:*** no * yes | Source import route-targets from import-policy. | | | | | **table\_policy** string | | Configure policy for installation of routes to RIB. | | | | **weight** dictionary | | Define or modify weight. | | | | | **reset\_on\_import** boolean | **Choices:*** no * yes | set reset\_on\_import. | | | | | **reset\_on\_import\_disable** boolean | **Choices:*** no * yes | disable reset\_on\_import. | | | **as\_number** string | | Autonomous system number. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the Iosxr device by executing the command **show running-config router bgp**. 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:*** deleted * **merged** ← * overridden * replaced * gathered * rendered * parsed | The state the configuration should be left in. | Notes ----- Note * This module works with connection `network_cli`. Examples -------- ``` # Using merged # Before state: # ------------- # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.2.1 # address-family vpnv4 unicast # vrf vrf1 # rd auto - name: Merge the provided configuration with the existing running configuration cisco.iosxr.iosxr_bgp_address_family: state: merged config: as_number: "65536" address_family: - afi: "ipv4" safi: "unicast" vrf: vrf1 dynamic_med: 9 redistribute: - protocol: connected metric: 10 - afi: "ipv4" safi: "unicast" dynamic_med: 10 redistribute: - protocol: application id: test1 metric: 10 bgp: scan_time: 20 attribute_download: true advertise_best_external: true allocate_label: all: true # Task output # ------------- # commands: # - router bgp 65536 # - address-family ipv4 unicast # - advertise best-external # - allocate-label all # - bgp attribute-download # - bgp scan-time 20 # - dynamic-med interval 10 # - redistribute application test1 metric 10 # - vrf vrf1 # - address-family ipv4 unicast # - dynamic-med interval 9 # - redistribute connected metric 10 # # # after: # as_number: "65536" # address_family: # - afi: "ipv4" # safi: "unicast" # vrf: vrf1 # dynamic_med: 9 # redistribute: # - protocol: connected # metric: 10 # - afi: "ipv4" # safi: "unicast" # dynamic_med: 10 # redistribute: # - protocol: application # id: "test1" # metric: 10 # bgp: # scan_time: 20 # attribute_download: true # advertise_best_external: true # allocate_label: # all: true # # After state: # ------------- # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.1.1 # address-family ipv4 unicast # advertise best-external # allocate-label all # bgp attribute-download # bgp scan-time 20 # address-family vpnv4 unicast # vrf vrf1 # rd auto # address-family ipv4 unicast # dynamic-med interval 9 # redistribute connected metric 10 # # Using replaced # Before state: # ------------- # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.1.1 # address-family ipv4 unicast # advertise best-external # allocate-label all # bgp attribute-download # bgp scan-time 20 # address-family vpnv4 unicast # vrf vrf1 # rd auto # address-family ipv4 unicast # dynamic-med interval 9 # redistribute connected metric 10 # # - name: Replace the provided configuration with the existing running configuration cisco.iosxr.iosxr_bgp_address_family: state: replaced config: as_number: "65536" address_family: - afi: "ipv4" safi: "unicast" vrf: vrf1 dynamic_med: 10 # Task output # ------------- # commands: # - router bgp 65536 # - vrf vrf1 # - address-family ipv4 unicast # - dynamic-med interval 10 # - no redistribute connected metric 10 # # after: # as_number: "65536" # address_family: # - afi: "ipv4" # safi: "unicast" # vrf: vrf1 # dynamic_med: 10 # - afi: "ipv4" # safi: "unicast" # dynamic_med: 10 # redistribute: # - protocol: application # id: "test1" # metric: 10 # bgp: # scan_time: 20 # attribute_download: true # advertise_best_external: true # allocate_label: # all: true # After state: # ------------- # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.1.1 # address-family ipv4 unicast # advertise best-external # allocate-label all # bgp attribute-download # bgp scan-time 20 # address-family vpnv4 unicast # vrf vrf1 # rd auto # address-family ipv4 unicast # dynamic-med interval 10 # # # Using overridden # Before state: # ------------- # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.1.1 # address-family ipv4 unicast # advertise best-external # allocate-label all # bgp attribute-download # bgp scan-time 20 # address-family vpnv4 unicast # vrf vrf1 # rd auto # address-family ipv4 unicast # dynamic-med interval 9 # redistribute connected metric 10 # # - name: Override the provided configuration with the existing running configuration cisco.iosxr.iosxr_bgp_address_family: state: overridden config: as_number: "65536" address_family: - afi: "ipv4" safi: "unicast" vrf: vrf1 dynamic_med: 10 # Task output # ------------- # commands: # - router bgp 65536 # - no address-family ipv4 unicast # - vrf vrf1 # - address-family ipv4 unicast # - dynamic-med interval 10 # - no redistribute connected metric 10 # # # after: # as_number: "65536" # address_family: # - afi: "ipv4" # safi: "unicast" # vrf: vrf1 # dynamic_med: 10 # # After state: # ------------- # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.1.1 # address-family vpnv4 unicast # vrf vrf1 # rd auto # address-family ipv4 unicast # dynamic-med interval 10 # # # Using deleted # Before state: # ------------- # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.1.1 # address-family ipv4 unicast # advertise best-external # allocate-label all # bgp attribute-download # bgp scan-time 20 # address-family vpnv4 unicast # vrf vrf1 # rd auto # address-family ipv4 unicast # dynamic-med interval 9 # redistribute connected metric 10 # # - name: Delete the provided configuration cisco.iosxr.iosxr_bgp_address_family: state: deleted config: # Task output # ------------- # commands: # - router bgp 65536 # - no address-family ipv4 unicast # - vrf vrf1 # - no address-family ipv4 unicast # # # after: # as_number: "65536" # # # After state: # ------------- # RP/0/0/CPU0:iosxr-02#show running-config router bgp # Sat Feb 20 03:49:43.618 UTC # router bgp 65536 # bgp router-id 192.0.1.1 # address-family vpnv4 unicast # vrf vrf1 # rd auto # # Using rendered # ------------- # - name: rendered state example cisco.iosxr.iosxr_bgp_address_family: state: rendered config: as_number: "65536" address_family: - afi: "ipv4" safi: "unicast" vrf: vrf1 dynamic_med: 9 redistribute: - protocol: connected metric: 10 - afi: "ipv4" safi: "unicast" dynamic_med: 10 redistribute: - protocol: application id: test1 metric: 10 bgp: scan_time: 20 attribute_download: true advertise_best_external: true allocate_label: all: true # Task output # ------------- # commands: # - router bgp 65536 # - address-family ipv4 unicast # - advertise best-external # - allocate-label all # - bgp attribute-download # - bgp scan-time 20 # - dynamic-med interval 10 # - redistribute application test1 metric 10 # - vrf vrf1 # - address-family ipv4 unicast # - dynamic-med interval 9 # - redistribute connected metric 10 # # Using gathered # ------------- - name: Merge the provided configuration with the existing running configuration cisco.iosxr.iosxr_bgp_address_family: state: gathered config: as_number: "65536" address_family: - afi: "ipv4" safi: "unicast" vrf: vrf1 dynamic_med: 9 redistribute: - protocol: connected metric: 10 - afi: "ipv4" safi: "unicast" dynamic_med: 10 redistribute: - protocol: application id: test1 metric: 10 bgp: scan_time: 20 attribute_download: true advertise_best_external: true allocate_label: all: true # gathered: # as_number: "65536" # address_family: # - afi: "ipv4" # safi: "unicast" # vrf: vrf1 # dynamic_med: 9 # redistribute: # - protocol: connected # metric: 10 # - afi: "ipv4" # safi: "unicast" # dynamic_med: 10 # redistribute: # - protocol: application # id: "test1" # metric: 10 # bgp: # scan_time: 20 # attribute_download: true # advertise_best_external: true # allocate_label: # all: true # # Using parsed # #parsed.cfg #------------ # router bgp 65536 # bgp router-id 192.0.1.1 # address-family ipv4 unicast # advertise best-external # allocate-label all # bgp attribute-download # bgp scan-time 20 # address-family vpnv4 unicast # vrf vrf1 # rd auto # address-family ipv4 unicast # dynamic-med interval 9 # redistribute connected metric 10 # - name: Parse externally provided BGP neighbor AF config cisco.iosxr.iosxr_bgp_address_family: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # as_number: "65536" # address_family: # - afi: "ipv4" # safi: "unicast" # vrf: vrf1 # dynamic_med: 9 # redistribute: # - protocol: connected # metric: 10 # - afi: "ipv4" # safi: "unicast" # dynamic_med: 10 # redistribute: # - protocol: application # id: "test1" # metric: 10 # bgp: # scan_time: 20 # attribute_download: true # advertise_best_external: true # allocate_label: # all: true ``` ### Authors * Ashwini Mhatre (@amhatre)
programming_docs
ansible cisco.iosxr.iosxr_facts – Get facts about iosxr devices. cisco.iosxr.iosxr\_facts – Get facts about iosxr devices. ========================================================= Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_facts`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Collects facts from network devices running the iosxr 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, lacp 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', 'lacp', 'lacp\_interfaces', 'lldp\_global', 'lldp\_interfaces', 'interfaces', 'l2\_interfaces', 'l3\_interfaces', 'lag\_interfaces', 'acls', 'acl\_interfaces', 'static\_routes', '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, 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`. 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. | | | **transport** string | **Choices:*** **cli** ← * netconf | Specifies the type of connection based transport. | | | **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 * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). * 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 -------- ``` # Gather all facts - cisco.iosxr.iosxr_facts: gather_subset: all gather_network_resources: all # Collect only the config and default facts - cisco.iosxr.iosxr_facts: gather_subset: - config # Do not collect hardware facts - cisco.iosxr.iosxr_facts: gather_subset: - '!hardware' # Collect only the lacp facts - cisco.iosxr.iosxr_facts: gather_subset: - '!all' - '!min' gather_network_resources: - lacp # Do not collect lacp_interfaces facts - cisco.iosxr.iosxr_facts: gather_network_resources: - '!lacp_interfaces' # Collect lacp and minimal default facts - cisco.iosxr.iosxr_facts: gather_subset: min gather_network_resources: lacp # Collect only the interfaces facts - cisco.iosxr.iosxr_facts: gather_subset: - '!all' - '!min' gather_network_resources: - interfaces - l2_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\_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 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\_version** string | always | The operating system version running on the remote device | ### Authors * Ricardo Carrillo Cruz (@rcarrillocruz) * Nilashish Chakraborty (@Nilashishc) ansible cisco.iosxr.iosxr_netconf – Configures NetConf sub-system service on Cisco IOS-XR devices cisco.iosxr.iosxr\_netconf – Configures NetConf sub-system service on Cisco IOS-XR devices ========================================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_netconf`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module provides an abstraction that enables and configures the netconf system service running on Cisco IOS-XR Software. This module can be used to easily enable the Netconf API. Netconf provides a programmatic interface for working with configuration and state resources as defined in RFC 6242. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **netconf\_port** integer | **Default:**830 | This argument specifies the port the netconf service should listen on for SSH connections. The default port as defined in RFC 6242 is 830. aliases: listens\_on | | **netconf\_vrf** string | **Default:**"default" | netconf vrf name aliases: vrf | | **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. | | | **transport** string | **Choices:*** **cli** ← * netconf | Specifies the type of connection based transport. | | | **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. | | **state** string | **Choices:*** **present** ← * absent | Specifies the state of the `iosxr_netconf` resource on the remote device. If the *state* argument is set to *present* the netconf service will be configured. If the *state* argument is set to *absent* the netconf service will be removed from the configuration. | Notes ----- Note * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). * 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: enable netconf service on port 830 cisco.iosxr.iosxr_netconf: listens_on: 830 state: present - name: disable netconf service cisco.iosxr.iosxr_netconf: 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** string | when changed is True | Returns the command sent to the remote device **Sample:** ssh server netconf port 830 | ### Authors * Kedar Kekan (@kedarX) ansible cisco.iosxr.iosxr_logging_global – Manages logging attributes of Cisco IOSXR network devices cisco.iosxr.iosxr\_logging\_global – Manages logging attributes of Cisco IOSXR network devices ============================================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_logging_global`. New in version 2.4.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages the logging attributes of Cisco IOSXR network devices Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | A dictionary of logging options. | | | **archive** dictionary | | logging to a persistent device(disk/harddisk) | | | | **archive\_length** integer | | The maximum no of weeks of log to maintain. | | | | **archive\_size** integer | | The total size of the archive. | | | | **device** string | | Configure the archive device | | | | **file\_size** integer | | The maximum file size for a single log file.. | | | | **frequency** string | **Choices:*** daily * weekly | The collection interval for logs. | | | | **severity** string | **Choices:*** alerts * critical * debugging * emergencies * errors * informational * notifications * warnings | Logging severity level | | | | **threshold** integer | | Threshold percent <1-99>. | | | **buffered** dictionary | | Set buffered logging parameters | | | | **discriminator** list / elements=dictionary | | Establish MD-Buffer association | | | | | **match\_params** string | **Choices:*** match1 * match2 * match3 * nomatch1 * nomatch2 * nomatch3 | Set match/no-match discriminator. | | | | | **name** string | | discriminator name. | | | | **severity** string | **Choices:*** alerts * critical * debugging * emergencies * errors * informational * notifications * warnings | Logging severity level | | | | **size** integer | | Logging buffer size | | | **console** dictionary | | Set console logging parameters | | | | **discriminator** list / elements=dictionary | | Establish MD-Buffer association | | | | | **match\_params** string | **Choices:*** match1 * match2 * match3 * nomatch1 * nomatch2 * nomatch3 | Set match/no-match discriminator. | | | | | **name** string | | discriminator name. | | | | **severity** string | **Choices:*** alerts * critical * debugging * emergencies * errors * informational * notifications * warning | Logging severity level | | | | **state** string | **Choices:*** enabled * disabled | Enable or disable logging. | | | **correlator** dictionary | | Configure properties of the event correlator | | | | **buffer\_size** integer | | Configure size of the correlator buffer. | | | | **rule\_sets** list / elements=dictionary | | Configure a specified correlation ruleset. | | | | | **name** string | | Name of the ruleset | | | | | **rulename** list / elements=string | | Name of the rule | | | | **rules** list / elements=dictionary | | Configure a specified correlation rule. | | | | | **context\_correlation** boolean | **Choices:*** no * yes | Specify enable correlation on context. | | | | | **reissue\_nonbistate** boolean | **Choices:*** no * yes | Specify reissue of non-bistate alarms on parent clear.This option is allowed for the rules whose type is stateful. | | | | | **reparent** boolean | **Choices:*** no * yes | Specify reparent of alarm on parent clear.This option is allowed for the rules whose type is stateful. | | | | | **rule\_name** string | | name of rule. | | | | | **rule\_type** string | **Choices:*** stateful * nonstateful | type of rule - stateful or nonstateful. | | | | | **timeout** integer | | Specify timeout. | | | | | **timeout\_rootcause** integer | | Specify timeout for root-cause. | | | **events** dictionary | | Configure event monitoring parameters. | | | | **buffer\_size** integer | | Set size of the local event buffer. | | | | **display\_location** boolean | **Choices:*** no * yes | Include alarm source location in message text. | | | | **filter\_match** list / elements=string | | Configure filter. | | | | **severity** string | **Choices:*** alerts * critical * debugging * emergencies * errors * informational * notifications * warnings | Logging severity level | | | | **threshold** integer | | Capacity alarm threshold. | | | **facility** string | **Choices:*** auth * cron * daemon * kern * local0 * local1 * local2 * local3 * local4 * local5 * local6 * local7 * lpr * mail * news * sys10 * sys11 * sys12 * sys13 * sys14 * sys9 * syslog * user * uucp | Facility parameter for syslog messages | | | **files** list / elements=dictionary | | Set file logging. | | | | **maxfilesize** integer | | Set max file size. | | | | **name** string | | name of file. | | | | **path** string | | Set file path. | | | | **severity** string | **Choices:*** alerts * critical * debugging * emergencies * errors * info * notifications * warning | Logging severity level | | | **format** boolean | **Choices:*** no * yes | Enable to send the syslog message rfc5424 format . | | | **history** dictionary | | Configure syslog history table | | | | **severity** string | **Choices:*** alerts * critical * debugging * emergencies * errors * informational * notifications * warnings | Logging severity level | | | | **size** integer | | Logging buffer size | | | | **state** string | **Choices:*** enabled * disabled | Enable or disable logging. | | | **hostnameprefix** string | | Hostname prefix to add on msgs to servers. | | | **hosts** list / elements=dictionary | | Set syslog server IP address and parameters | | | | **host** string | | IPv4/Ipv6 address or hostname of the syslog server | | | | **port** string | **Default:**"default" | Set <0-65535> non-default Port. | | | | **severity** string | **Choices:*** alerts * critical * debugging * emergencies * error * info * notifications * warning | Logging severity level | | | | **vrf** string | **Default:**"default" | Set VRF option | | | **ipv4** dictionary | | Mark the dscp/precedence bit for ipv4 packets. | | | | **dscp** string | | Set IP DSCP (DiffServ CodePoint).Please refer vendor document for valid entries. | | | | **precedence** string | | Set precedence Please refer vendor document for valid entries. | | | **ipv6** dictionary | | Mark the dscp/precedence bit for ipv4 packets. | | | | **dscp** string | | Set IP DSCP (DiffServ CodePoint).Please refer vendor document for valid entries. | | | | **precedence** string | | Set precedence Please refer vendor document for valid entries. | | | **localfilesize** integer | | Set size of the local log file | | | **monitor** dictionary | | Set terminal line (monitor) logging parameters | | | | **discriminator** list / elements=dictionary | | Establish MD-Buffer association | | | | | **match\_params** string | **Choices:*** match1 * match2 * match3 * nomatch1 * nomatch2 * nomatch3 | Set match/no-match discriminator. | | | | | **name** string | | discriminator name. | | | | **severity** string | **Choices:*** alerts * critical * debugging * emergencies * errors * informational * notifications * warning | Logging severity level | | | | **state** string | **Choices:*** enabled * disabled | Enable or disable logging. | | | **source\_interfaces** list / elements=dictionary | | Specify interface for source address in logging transactions | | | | **interface** string | | Interface name with number | | | | **vrf** string | | VPN Routing/Forwarding instance name | | | **suppress** dictionary | | Suppress logging behaviour. | | | | **apply\_rule** string | | Apply suppression rule. | | | | **duplicates** boolean | **Choices:*** no * yes | Suppress consecutive duplicate messages. | | | **tls\_servers** list / elements=dictionary | | Secure server over tls. | | | | **name** string | | Name for the tls peer configuration. | | | | **severity** string | **Choices:*** alerts * critical * debugging * emergencies * errors * informational * notifications * warnings | Logging severity level | | | | **tls\_hostname** string | | Name of the logging host. | | | | **trustpoint** string | | Name of the trustpoint configured. | | | | **vrf** string | | name of vrf. | | | **trap** dictionary | | Set syslog server logging level | | | | **severity** string | **Choices:*** alerts * critical * debugging * emergencies * errors * informational * notifications * warning | Logging severity level | | | | **state** string | **Choices:*** enabled * disabled | Enable or disable logging. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOS device by executing the command **show running-config | include logging**. 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 * gathered * parsed * rendered | The state the configuration should be left in | Notes ----- Note * Tested against IOSXR 7.0.2. * This module works with connection `network_cli`. Examples -------- ``` # Using merged #----------------- # Before state #RP/0/0/CPU0:10#show running-config logging #Thu Feb 4 09:38:36.245 UTC #% No such configuration item(s) #RP/0/0/CPU0:10# # # # - name: Merge the provided configuration with the existing running configuration # cisco.iosxr.iosxr_logging_global: # config: # buffered: # size: 2097152 # severity: warnings # correlator: # buffer_size: 1024 # events: # display_location: True # files: # - maxfilesize: '1024' # name: test # path: test # severity: info # hostnameprefix: test # hosts: # - host: 1.1.1.1 # port: default # severity: critical # vrf: default # ipv4: # dscp: af11 # localfilesize: 1024 # monitor: # severity: errors # source_interfaces: # - interface: GigabitEthernet0/0/0/0 # vrf: test # tls_servers: # - name: test # tls_hostname: test2 # trustpoint: test2 # vrf: test # trap: # severity: informational # state: merged # # # After state: #------------------------------------------- #RP/0/0/CPU0:10#show running-config logging # Tue Jul 20 18:09:18.491 UTC # logging tls-server test # vrf test # trustpoint test2 # tls-hostname test2 # ! # logging file test path test maxfilesize 1024 severity info # logging ipv4 dscp af11 # logging trap informational # logging events display-location # logging monitor errors # logging buffered 2097152 # logging buffered warnings # logging 1.1.1.1 vrf default severity critical port default # logging correlator buffer-size 1024 # logging localfilesize 1024 # logging source-interface GigabitEthernet0/0/0/0 vrf test # logging hostnameprefix test #------------------------------------------------ #Module execution # # "after": { # "buffered": { # "severity": "errors" # }, # "correlator": { # "buffer_size": 1024 # }, # "files": [ # { # "maxfilesize": "1024", # "name": "test", # "path": "test1", # "severity": "info" # } # ], # "hostnameprefix": "test1", # "hosts": [ # { # "host": "1.1.1.3", # "port": "default", # "severity": "critical", # "vrf": "default" # } # ], # "ipv6": { # "dscp": "af11" # }, # "localfilesize": 1024, # "source_interfaces": [ # { # "interface": "GigabitEthernet0/0/0/0", # "vrf": "test1" # } # ], # "tls_servers": [ # { # "name": "test", # "tls_hostname": "test2", # "trustpoint": "test", # "vrf": "test" # } # ] # }, # "before": {}, # "changed": true, # "commands": [ # "logging buffered errors", # "logging correlator buffer-size 1024", # "logging hostnameprefix test1", # "logging ipv6 dscp af11", # "logging localfilesize 1024", # "logging trap disable", # "logging monitor disable", # "logging history disable", # "logging console disable", # "logging 1.1.1.3 vrf default severity critical port default", # "logging file test path test1 maxfilesize 1024 severity info", # "logging source-interface GigabitEthernet0/0/0/0 vrf test1", # "logging tls-server test tls-hostname test2", # "logging tls-server test trustpoint test", # "logging tls-server test vrf test" # ], # "invocation": { # "module_args": { # "config": { # "archive": null, # "buffered": { # "discriminator": null, # "severity": "errors", # "size": null # }, # "console": { # "discriminator": null, # "severity": null, # "state": "disabled" # }, # "correlator": { # "buffer_size": 1024, # "rule_set": null, # "rules": null # }, # "events": null, # "facility": null, # "files": [ # { # "maxfilesize": "1024", # "name": "test", # "path": "test1", # "severity": "info" # } # ], # "format": null, # "history": { # "severity": null, # "size": null, # "state": "disabled" # }, # "hostnameprefix": "test1", # "hosts": [ # { # "host": "1.1.1.3", # "port": "default", # "severity": "critical", # "vrf": "default" # } # ], # "ipv4": null, # "ipv6": { # "dscp": "af11", # "precedence": null # }, # "localfilesize": 1024, # "monitor": { # "discriminator": null, # "severity": null, # "state": "disabled" # }, # "source_interfaces": [ # { # "interface": "GigabitEthernet0/0/0/0", # "vrf": "test1" # } # ], # "suppress": null, # "tls_servers": [ # { # "name": "test", # "severity": null, # "tls_hostname": "test2", # "trustpoint": "test", # "vrf": "test" # } # ], # "trap": { # "severity": null, # "state": "disabled" # } # }, # "running_config": null, # "state": "merged" # } # } # } # # Using replaced: # ----------------------------------------------------------- # #Before state #RP/0/0/CPU0:10#show running-config logging # Tue Jul 20 18:09:18.491 UTC # logging tls-server test # vrf test # trustpoint test2 # tls-hostname test2 # ! # logging file test path test maxfilesize 1024 severity info # logging ipv4 dscp af11 # logging trap informational # logging events display-location # logging monitor errors # logging buffered 2097152 # logging buffered warnings # logging 1.1.1.1 vrf default severity critical port default # logging correlator buffer-size 1024 # logging localfilesize 1024 # logging source-interface GigabitEthernet0/0/0/0 vrf test # logging hostnameprefix test #----------------------------------------------------------- # # - name: Replace BGP configuration with provided configuration # cisco.iosxr.iosxr_logging_global: # state: replaced # config: # buffered: # severity: errors # correlator: # buffer_size: 1024 # files: # - maxfilesize: '1024' # name: test # path: test1 # severity: info # hostnameprefix: test1 # hosts: # - host: 1.1.1.3 # port: default # severity: critical # vrf: default # ipv6: # dscp: af11 # localfilesize: 1024 # monitor: # severity: errors # tls_servers: # - name: test # tls_hostname: test2 # trustpoint: test # vrf: test # trap: # severity: critical # # After state: #RP/0/0/CPU0:10#show running-config logging # Tue Jul 20 18:31:51.709 UTC # logging tls-server test # vrf test # trustpoint test # tls-hostname test2 # ! # logging file test path test1 maxfilesize 1024 severity info # logging ipv6 dscp af11 # logging trap critical # logging monitor errors # logging buffered errors # logging 1.1.1.3 vrf default severity critical port default # logging correlator buffer-size 1024 # logging localfilesize 1024 # logging hostnameprefix test1 #----------------------------------------------------------------- # # Module Execution: # "after": { # "buffered": { # "severity": "errors" # }, # "correlator": { # "buffer_size": 1024 # }, # "files": [ # { # "maxfilesize": "1024", # "name": "test", # "path": "test1", # "severity": "info" # } # ], # "hostnameprefix": "test1", # "hosts": [ # { # "host": "1.1.1.3", # "port": "default", # "severity": "critical", # "vrf": "default" # } # ], # "ipv6": { # "dscp": "af11" # }, # "localfilesize": 1024, # "monitor": { # "severity": "errors" # }, # "tls_servers": [ # { # "name": "test", # "tls_hostname": "test2", # "trustpoint": "test", # "vrf": "test" # } # ], # "trap": { # "severity": "critical" # } # }, # "before": { # "buffered": { # "severity": "warnings", # "size": 2097152 # }, # "correlator": { # "buffer_size": 1024 # }, # "events": { # "display_location": true # }, # "files": [ # { # "maxfilesize": "1024", # "name": "test", # "path": "test", # "severity": "info" # } # ], # "hostnameprefix": "test", # "hosts": [ # { # "host": "1.1.1.1", # "port": "default", # "severity": "critical", # "vrf": "default" # } # ], # "ipv4": { # "dscp": "af11" # }, # "localfilesize": 1024, # "monitor": { # "severity": "errors" # }, # "source_interfaces": [ # { # "interface": "GigabitEthernet0/0/0/0", # "vrf": "test" # } # ], # "tls_servers": [ # { # "name": "test", # "tls_hostname": "test2", # "trustpoint": "test2", # "vrf": "test" # } # ], # "trap": { # "severity": "informational" # } # }, # "changed": true, # "commands": [ # "no logging buffered 2097152", # "no logging events display-location", # "no logging ipv4 dscp af11", # "no logging 1.1.1.1 vrf default severity critical port default", # "no logging source-interface GigabitEthernet0/0/0/0 vrf test", # "logging buffered errors", # "logging hostnameprefix test1", # "logging ipv6 dscp af11", # "logging trap critical", # "logging 1.1.1.3 vrf default severity critical port default", # "logging file test path test1 maxfilesize 1024 severity info", # "logging tls-server test trustpoint test" # ], # # # # Using deleted: # ----------------------------------------------------------- # Before state: #RP/0/0/CPU0:10#show running-config logging # Tue Jul 20 18:09:18.491 UTC # logging tls-server test # vrf test # trustpoint test2 # tls-hostname test2 # ! # logging file test path test maxfilesize 1024 severity info # logging ipv4 dscp af11 # logging trap informational # logging events display-location # logging monitor errors # logging buffered 2097152 # logging buffered warnings # logging 1.1.1.1 vrf default severity critical port default # logging correlator buffer-size 1024 # logging localfilesize 1024 # logging source-interface GigabitEthernet0/0/0/0 vrf test # logging hostnameprefix test # #----------------------------------------------------------- # - name: Delete given logging_global configuration # cisco.iosxr.iosxr_logging_global: # state: deleted # # After state: #RP/0/0/CPU0:10#show running-config # #------------------------------------------------------------- # Module Execution: # # "after": {}, # "before": { # "buffered": { # "severity": "warnings", # "size": 2097152 # }, # "correlator": { # "buffer_size": 1024 # }, # "events": { # "display_location": true # }, # "files": [ # { # "maxfilesize": "1024", # "name": "test", # "path": "test", # "severity": "info" # } # ], # "hostnameprefix": "test", # "hosts": [ # { # "host": "1.1.1.1", # "port": "default", # "severity": "critical", # "vrf": "default" # } # ], # "ipv4": { # "dscp": "af11" # }, # "localfilesize": 1024, # "monitor": { # "severity": "errors" # }, # "source_interfaces": [ # { # "interface": "GigabitEthernet0/0/0/0", # "vrf": "test" # } # ], # "tls_servers": [ # { # "name": "test", # "tls_hostname": "test2", # "trustpoint": "test2", # "vrf": "test" # } # ], # "trap": { # "severity": "informational" # } # }, # "changed": true, # "commands": [ # "no logging buffered 2097152", # "no logging buffered warnings", # "no logging correlator buffer-size 1024", # "no logging events display-location", # "no logging hostnameprefix test", # "no logging ipv4 dscp af11", # "no logging localfilesize 1024", # "no logging monitor errors", # "no logging trap informational", # "no logging 1.1.1.1 vrf default severity critical port default", # "no logging file test path test maxfilesize 1024 severity info", # "no logging source-interface GigabitEthernet0/0/0/0 vrf test", # "no logging tls-server test" # ], # "invocation": { # "module_args": { # "config": null, # "running_config": null, # "state": "deleted" # } # } # # # # using gathered: # ------------------------------------------------------------ # Before state: #RP/0/0/CPU0:10#show running-config logging # Tue Jul 20 18:09:18.491 UTC # logging tls-server test # vrf test # trustpoint test2 # tls-hostname test2 # ! # logging file test path test maxfilesize 1024 severity info # logging ipv4 dscp af11 # logging trap informational # logging events display-location # logging monitor errors # logging buffered 2097152 # logging buffered warnings # logging 1.1.1.1 vrf default severity critical port default # logging correlator buffer-size 1024 # logging localfilesize 1024 # logging source-interface GigabitEthernet0/0/0/0 vrf test # logging hostnameprefix test # # # - name: Gather iosxr_logging_global facts using gathered state # cisco.iosxr.iosxr_logging_global: # state: gathered # #------------------------------------------------------------- # Module Execution: # # "changed": false, # "gathered": { # "buffered": { # "severity": "warnings", # "size": 2097152 # }, # "correlator": { # "buffer_size": 1024 # }, # "events": { # "display_location": true # }, # "files": [ # { # "maxfilesize": "1024", # "name": "test", # "path": "test", # "severity": "info" # } # ], # "hostnameprefix": "test", # "hosts": [ # { # "host": "1.1.1.1", # "port": "default", # "severity": "critical", # "vrf": "default" # } # ], # "ipv4": { # "dscp": "af11" # }, # "localfilesize": 1024, # "monitor": { # "severity": "errors" # }, # "source_interfaces": [ # { # "interface": "GigabitEthernet0/0/0/0", # "vrf": "test" # } # ], # "tls_servers": [ # { # "name": "test", # "tls_hostname": "test2", # "trustpoint": "test2", # "vrf": "test" # } # ], # "trap": { # "severity": "informational" # } # }, # "invocation": { # "module_args": { # "config": null, # "running_config": null, # "state": "gathered" # } # } # # # Using parsed: #--------------------------------------------------------------- # # parsed.cfg # # logging tls-server test # vrf test # trustpoint test2 # tls-hostname test2 # ! # logging file test path test maxfilesize 1024 severity info # logging ipv4 dscp af11 # logging trap informational # logging events display-location # logging monitor errors # logging buffered 2097152 # logging buffered warnings # logging 1.1.1.1 vrf default severity critical port default # logging correlator buffer-size 1024 # logging localfilesize 1024 # logging source-interface GigabitEthernet0/0/0/0 vrf test # logging hostnameprefix test # # # - name: Parse externally provided Prefix_lists config to agnostic model # cisco.iosxr.iosxr_prefix_lists: # running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}" # state: parsed #---------------------------------------------------------------- # Module execution: # "changed": false, # "parsed": { # "buffered": { # "severity": "warnings", # "size": 2097152 # }, # "correlator": { # "buffer_size": 1024 # }, # "events": { # "display_location": true # }, # "files": [ # { # "maxfilesize": "1024", # "name": "test", # "path": "test", # "severity": "info" # } # ], # "hostnameprefix": "test", # "hosts": [ # { # "host": "1.1.1.1", # "port": "default", # "severity": "critical", # "vrf": "default" # } # ], # "ipv4": { # "dscp": "af11" # }, # "localfilesize": 1024, # "monitor": { # "severity": "errors" # }, # "source_interfaces": [ # { # "interface": "GigabitEthernet0/0/0/0", # "vrf": "test" # } # ], # "tls_servers": [ # { # "name": "test", # "tls_hostname": "test2", # "trustpoint": "test2", # "vrf": "test" # } # ], # "trap": { # "severity": "informational" # } # } # # # Using rendered: # ---------------------------------------------------------------------------- # - name: Render platform specific configuration lines with state rendered (without connecting to the device) # cisco.iosxr.iosxr_logging_global: # state: rendered # config: # buffered: # size: 2097152 # severity: warnings # correlator: # buffer_size: 1024 # events: # display_location: True # files: # - maxfilesize: '1024' # name: test # path: test # severity: info # hostnameprefix: test # hosts: # - host: 1.1.1.1 # port: default # severity: critical # vrf: default # ipv4: # dscp: af11 # localfilesize: 1024 # monitor: # severity: errors # source_interfaces: # - interface: GigabitEthernet0/0/0/0 # vrf: test # tls_servers: # - name: test # tls_hostname: test2 # trustpoint: test2 # vrf: test # trap: # severity: informational #---------------------------------------------------------------- # Module Execution: # "rendered": [ # "logging buffered errors", # "logging correlator buffer-size 1024", # "logging hostnameprefix test1", # "logging ipv6 dscp af11", # "logging localfilesize 1024", # "logging trap disable", # "logging monitor disable", # "logging history disable", # "logging console disable", # "logging 1.1.1.3 vrf default severity critical port default", # "logging file test path test1 maxfilesize 1024 severity info", # "logging source-interface GigabitEthernet0/0/0/0 vrf test1", # "logging tls-server test tls-hostname test2", # "logging tls-server test trustpoint test", # "logging tls-server test vrf test" # ] # # Using overridden: # --------------------------------------------------------------------------------- # Before state: #RP/0/0/CPU0:10#show running-config logging # Tue Jul 20 18:09:18.491 UTC # logging tls-server test # vrf test # trustpoint test2 # tls-hostname test2 # ! # logging file test path test maxfilesize 1024 severity info # logging ipv4 dscp af11 # logging trap informational # logging events display-location # logging monitor errors # logging buffered 2097152 # logging buffered warnings # logging 1.1.1.1 vrf default severity critical port default # logging correlator buffer-size 1024 # logging localfilesize 1024 # logging source-interface GigabitEthernet0/0/0/0 vrf test # logging hostnameprefix test # #----------------------------------------------------------- # # - name: Overridde BGP configuration with provided configuration # cisco.iosxr.iosxr_logging_global: &id002 # state: overridden # config: # buffered: # severity: errors # correlator: # buffer_size: 1024 # files: # - maxfilesize: '1024' # name: test # path: test1 # severity: info # hostnameprefix: test1 # hosts: # - host: 1.1.1.3 # port: default # severity: critical # vrf: default # ipv6: # dscp: af11 # localfilesize: 1024 # monitor: # severity: errors # tls_servers: # - name: test # tls_hostname: test2 # trustpoint: test # vrf: test # trap: # severity: critical # # After state: #RP/0/0/CPU0:10#show running-config logging # Tue Jul 20 18:31:51.709 UTC # logging tls-server test # vrf test # trustpoint test # tls-hostname test2 # ! # logging file test path test1 maxfilesize 1024 severity info # logging ipv6 dscp af11 # logging trap critical # logging monitor errors # logging buffered errors # logging 1.1.1.3 vrf default severity critical port default # logging correlator buffer-size 1024 # logging localfilesize 1024 # logging hostnameprefix test1 #----------------------------------------------------------------- # # Module Execution: # "after": { # "buffered": { # "severity": "errors" # }, # "correlator": { # "buffer_size": 1024 # }, # "files": [ # { # "maxfilesize": "1024", # "name": "test", # "path": "test1", # "severity": "info" # } # ], # "hostnameprefix": "test1", # "hosts": [ # { # "host": "1.1.1.3", # "port": "default", # "severity": "critical", # "vrf": "default" # } # ], # "ipv6": { # "dscp": "af11" # }, # "localfilesize": 1024, # "monitor": { # "severity": "errors" # }, # "tls_servers": [ # { # "name": "test", # "tls_hostname": "test2", # "trustpoint": "test", # "vrf": "test" # } # ], # "trap": { # "severity": "critical" # } # }, # "before": { # "buffered": { # "severity": "warnings", # "size": 2097152 # }, # "correlator": { # "buffer_size": 1024 # }, # "events": { # "display_location": true # }, # "files": [ # { # "maxfilesize": "1024", # "name": "test", # "path": "test", # "severity": "info" # } # ], # "hostnameprefix": "test", # "hosts": [ # { # "host": "1.1.1.1", # "port": "default", # "severity": "critical", # "vrf": "default" # } # ], # "ipv4": { # "dscp": "af11" # }, # "localfilesize": 1024, # "monitor": { # "severity": "errors" # }, # "source_interfaces": [ # { # "interface": "GigabitEthernet0/0/0/0", # "vrf": "test" # } # ], # "tls_servers": [ # { # "name": "test", # "tls_hostname": "test2", # "trustpoint": "test2", # "vrf": "test" # } # ], # "trap": { # "severity": "informational" # } # }, # "changed": true, # "commands": [ # "no logging buffered 2097152", # "no logging events display-location", # "no logging ipv4 dscp af11", # "no logging 1.1.1.1 vrf default severity critical port default", # "no logging source-interface GigabitEthernet0/0/0/0 vrf test", # "logging buffered errors", # "logging hostnameprefix test1", # "logging ipv6 dscp af11", # "logging trap critical", # "logging 1.1.1.3 vrf default severity critical port default", # "logging file test path test1 maxfilesize 1024 severity info", # "logging tls-server test trustpoint 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 | | --- | --- | --- | | **after** dictionary | when changed | The resulting configuration after module execution. **Sample:** This output will always be in the same format as the module argspec. | | **before** dictionary | when state is *merged*, *replaced*, *overridden*, *deleted* or *purged* | The configuration prior to the module execution. **Sample:** This output will always be in the same format as the module argspec. | | **commands** list / elements=string | when state is *merged*, *replaced*, *overridden*, *deleted* or *purged* | The set of commands pushed to the remote device. **Sample:** ['logging file test path test1 maxfilesize 1024 severity info', 'logging ipv6 dscp af11', 'logging trap critical', 'logging monitor errors', 'logging buffered errors', 'logging 1.1.1.3 vrf default severity critical port default'] | | **gathered** list / elements=string | when state is *gathered* | Facts about the network resource gathered from the remote device as structured data. **Sample:** This output will always be in the same format as the module argspec. | | **parsed** list / elements=string | when state is *parsed* | The device native config provided in *running\_config* option parsed into structured data as per module argspec. **Sample:** This output will always be in the same format as the module argspec. | | **rendered** list / elements=string | when state is *rendered* | The provided configuration in the task rendered in device-native format (offline). **Sample:** ['logging buffered errors', 'logging correlator buffer-size 1024', 'logging hostnameprefix test1', 'logging ipv6 dscp af11', 'logging localfilesize 1024', 'logging trap disable', 'logging monitor disable', 'logging history disable', 'logging console disable'] | ### Authors * Ashwini Mhatre (@amhatre)
programming_docs
ansible cisco.iosxr.iosxr_acl_interfaces – ACL interfaces resource module cisco.iosxr.iosxr\_acl\_interfaces – ACL interfaces resource module =================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_acl_interfaces`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages adding and removing Access Control Lists (ACLs) from interfaces on devices running IOS-XR software. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A dictionary of ACL options for interfaces. | | | **access\_groups** list / elements=dictionary | | Specifies ACLs attached to the interfaces. | | | | **acls** list / elements=dictionary | | Specifies the ACLs for the provided AFI. | | | | | **direction** string / required | **Choices:*** in * out | Specifies the direction of packets that the ACL will be applied on. | | | | | **name** string / required | | Specifies the name of the IPv4/IPv6 ACL for the interface. | | | | **afi** string / required | **Choices:*** ipv4 * ipv6 | Specifies the AFI for the ACL(s) to be configured on this interface. | | | **name** string / required | | Name/Identifier for the interface | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOS-XR device by executing the command **show running-config 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 * gathered * parsed * rendered | The state the configuration should be left in. | Examples -------- ``` # Using merged # Before state: # ------------- # # RP/0/RP0/CPU0:ios#sh running-config interface # Wed Jan 15 12:22:32.911 UTC # interface MgmtEth0/RP0/CPU0/0 # ipv4 address dhcp # ! # interface GigabitEthernet0/0/0/0 # shutdown # ! # interface GigabitEthernet0/0/0/1 # shutdown # ! - name: Merge the provided configuration with the existing running configuration cisco.iosxr.iosxr_acl_interfaces: config: - name: GigabitEthernet0/0/0/0 access_groups: - afi: ipv4 acls: - name: acl_1 direction: in - name: acl_2 direction: out - afi: ipv6 acls: - name: acl6_1 direction: in - name: acl6_2 direction: out - name: GigabitEthernet0/0/0/1 access_groups: - afi: ipv4 acls: - name: acl_1 direction: out state: merged # After state: # ------------- # # RP/0/RP0/CPU0:ios#sh running-config interface # Wed Jan 15 12:27:49.378 UTC # interface MgmtEth0/RP0/CPU0/0 # ipv4 address dhcp # ! # interface GigabitEthernet0/0/0/0 # shutdown # ipv4 access-group acl_1 ingress # ipv4 access-group acl_2 egress # ipv6 access-group acl6_1 ingress # ipv6 access-group acl6_2 egress # ! # interface GigabitEthernet0/0/0/1 # shutdown # ipv4 access-group acl_1 egress # ! # Using merged to update interface ACL configuration # Before state: # ------------- # # RP/0/RP0/CPU0:ios#sh running-config interface # Wed Jan 15 12:27:49.378 UTC # interface MgmtEth0/RP0/CPU0/0 # ipv4 address dhcp # ! # interface GigabitEthernet0/0/0/0 # shutdown # ipv4 access-group acl_1 ingress # ipv4 access-group acl_2 egress # ipv6 access-group acl6_1 ingress # ipv6 access-group acl6_2 egress # ! # interface GigabitEthernet0/0/0/1 # shutdown # ipv4 access-group acl_1 egress # ! # - name: Update acl_interfaces configuration using merged cisco.iosxr.iosxr_acl_interfaces: config: - name: GigabitEthernet0/0/0/1 access_groups: - afi: ipv4 acls: - name: acl_2 direction: out - name: acl_1 direction: in state: merged # After state: # ------------- # # RP/0/RP0/CPU0:ios#sh running-config interface # Wed Jan 15 12:27:49.378 UTC # interface MgmtEth0/RP0/CPU0/0 # ipv4 address dhcp # ! # interface GigabitEthernet0/0/0/0 # shutdown # ipv4 access-group acl_1 ingress # ipv4 access-group acl_2 egress # ipv6 access-group acl6_1 ingress # ipv6 access-group acl6_2 egress # ! # interface GigabitEthernet0/0/0/1 # shutdown # ipv4 access-group acl_1 ingress # ipv4 access-group acl_2 egress # ! # # Using replaced # Before state: # ------------- # # RP/0/RP0/CPU0:ios#sh running-config interface # Wed Jan 15 12:34:56.689 UTC # interface MgmtEth0/RP0/CPU0/0 # ipv4 address dhcp # ! # interface GigabitEthernet0/0/0/0 # shutdown # ipv4 access-group acl_1 ingress # ipv4 access-group acl_2 egress # ipv6 access-group acl6_1 ingress # ipv6 access-group acl6_2 egress # ! # interface GigabitEthernet0/0/0/1 # shutdown # ipv4 access-group acl_1 egress # ! - name: Replace device configurations of listed interface with provided configurations cisco.iosxr.iosxr_acl_interfaces: config: - name: GigabitEthernet0/0/0/0 access_groups: - afi: ipv6 acls: - name: acl6_3 direction: in state: replaced # After state: # ------------- # # RP/0/RP0/CPU0:ios#sh running-config interface # Wed Jan 15 12:34:56.689 UTC # interface MgmtEth0/RP0/CPU0/0 # ipv4 address dhcp # ! # interface GigabitEthernet0/0/0/0 # shutdown # ipv6 access-group acl6_3 ingress # ! # interface GigabitEthernet0/0/0/1 # shutdown # ipv4 access-group acl_1 egress # ! # # Using overridden # Before state: # ------------- # # RP/0/RP0/CPU0:ios#sh running-config interface # Wed Jan 15 12:34:56.689 UTC # interface MgmtEth0/RP0/CPU0/0 # ipv4 address dhcp # ! # interface GigabitEthernet0/0/0/0 # shutdown # ipv4 access-group acl_1 ingress # ipv4 access-group acl_2 egress # ipv6 access-group acl6_1 ingress # ipv6 access-group acl6_2 egress # ! # interface GigabitEthernet0/0/0/1 # shutdown # ipv4 access-group acl_1 egress # ! # - name: Overridde all interface ACL configuration with provided configuration cisco.iosxr.iosxr_acl_interfaces: config: - name: GigabitEthernet0/0/0/1 access_groups: - afi: ipv4 acls: - name: acl_2 direction: in - afi: ipv6 acls: - name: acl6_3 direction: out state: overridden # After state: # ------------- # # RP/0/RP0/CPU0:ios#sh running-config interface # Wed Jan 15 12:34:56.689 UTC # interface MgmtEth0/RP0/CPU0/0 # ipv4 address dhcp # ! # interface GigabitEthernet0/0/0/0 # shutdown # ! # interface GigabitEthernet0/0/0/1 # shutdown # ipv4 access-group acl_2 ingress # ipv6 access-group acl6_3 egress # ! # # Using 'deleted' to delete all ACL attributes of a single interface # Before state: # ------------- # # RP/0/RP0/CPU0:ios#sh running-config interface # Wed Jan 15 12:34:56.689 UTC # interface MgmtEth0/RP0/CPU0/0 # ipv4 address dhcp # ! # interface GigabitEthernet0/0/0/0 # shutdown # ipv4 access-group acl_1 ingress # ipv4 access-group acl_2 egress # ipv6 access-group acl6_1 ingress # ipv6 access-group acl6_2 egress # ! # interface GigabitEthernet0/0/0/1 # shutdown # ipv4 access-group acl_1 egress # ! # - name: Delete all ACL attributes of GigabitEthernet0/0/0/1 cisco.iosxr.iosxr_acl_interfaces: config: - name: GigabitEthernet0/0/0/1 state: deleted # After state: # ------------- # # RP/0/RP0/CPU0:ios#sh running-config interface # Wed Jan 15 12:34:56.689 UTC # interface MgmtEth0/RP0/CPU0/0 # ipv4 address dhcp # ! # interface GigabitEthernet0/0/0/0 # shutdown # ipv4 access-group acl_1 ingress # ipv4 access-group acl_2 egress # ipv6 access-group acl6_1 ingress # ipv6 access-group acl6_2 egress # ! # interface GigabitEthernet0/0/0/1 # shutdown # ! # # Using 'deleted' to remove all ACLs attached to all the interfaces in the device # Before state: # ------------- # # RP/0/RP0/CPU0:ios#sh running-config interface # Wed Jan 15 12:34:56.689 UTC # interface MgmtEth0/RP0/CPU0/0 # ipv4 address dhcp # ! # interface GigabitEthernet0/0/0/0 # shutdown # ipv4 access-group acl_1 ingress # ipv4 access-group acl_2 egress # ipv6 access-group acl6_1 ingress # ipv6 access-group acl6_2 egress # ! # interface GigabitEthernet0/0/0/1 # shutdown # ipv4 access-group acl_1 egress # ! # - name: Delete all ACL interfaces configuration from the device cisco.iosxr.iosxr_acl_interfaces: state: deleted # After state: # ------------- # # RP/0/RP0/CPU0:ios#sh running-config interface # Wed Jan 15 12:34:56.689 UTC # interface MgmtEth0/RP0/CPU0/0 # ipv4 address dhcp # ! # interface GigabitEthernet0/0/0/0 # shutdown # ! # interface GigabitEthernet0/0/0/1 # shutdown # ! # # Using parsed # parsed.cfg # ------------ # # interface MgmtEth0/RP0/CPU0/0 # ipv4 address dhcp # ! # interface GigabitEthernet0/0/0/0 # shutdown # ipv4 access-group acl_1 ingress # ipv4 access-group acl_2 egress # ipv6 access-group acl6_1 ingress # ipv6 access-group acl6_2 egress # ! # interface GigabitEthernet0/0/0/1 # shutdown # ipv4 access-group acl_1 egress # ! # - name: Convert ACL interfaces config to argspec without connecting to the appliance # cisco.iosxr.iosxr_acl_interfaces: # running_config: "{{ lookup('file', './parsed.cfg') }}" # state: parsed # Task Output (redacted) # ----------------------- # "parsed": [ # { # "name": "MgmtEth0/RP0/CPU0/0" # }, # { # "access_groups": [ # { # "acls": [ # { # "direction": "in", # "name": "acl_1" # }, # { # "direction": "out", # "name": "acl_2" # } # ], # "afi": "ipv4" # }, # { # "acls": [ # { # "direction": "in", # "name": "acl6_1" # }, # { # "direction": "out", # "name": "acl6_2" # } # ], # "afi": "ipv6" # } # ], # "name": "GigabitEthernet0/0/0/0" # }, # { # "access_groups": [ # { # "acls": [ # { # "direction": "out", # "name": "acl_1" # } # ], # "afi": "ipv4" # } # ], # "name": "GigabitEthernet0/0/0/1" # } # ] # } # Using gathered - name: Gather ACL interfaces facts using gathered state cisco.iosxr.iosxr_acl_interfaces: state: gathered # Task Output (redacted) # ----------------------- # # "gathered": [ # { # "name": "MgmtEth0/RP0/CPU0/0" # }, # { # "access_groups": [ # { # "acls": [ # { # "direction": "in", # "name": "acl_1" # }, # { # "direction": "out", # "name": "acl_2" # } # ], # "afi": "ipv4" # } # "name": "GigabitEthernet0/0/0/0" # }, # { # "access_groups": [ # { # "acls": [ # { # "direction": "in", # "name": "acl6_1" # } # ], # "afi": "ipv6" # } # "name": "GigabitEthernet0/0/0/1" # } # ] # Using rendered - name: Render platform specific commands from task input using rendered state cisco.iosxr.iosxr_acl_interfaces: config: - name: GigabitEthernet0/0/0/0 access_groups: - afi: ipv4 acls: - name: acl_1 direction: in - name: acl_2 direction: out state: rendered # Task Output (redacted) # ----------------------- # "rendered": [ # "interface GigabitEthernet0/0/0/0", # "ipv4 access-group acl_1 ingress", # "ipv4 access-group acl_2 egress" # ] ``` 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 resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. | | **before** list / elements=string | always | The configuration prior to the model 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 GigabitEthernet0/0/0/1', 'ipv4 access-group acl\_1 ingress', 'ipv4 access-group acl\_2 egress', 'ipv6 access-group acl6\_1 ingress', 'interface GigabitEthernet0/0/0/2', 'no ipv4 access-group acl\_3 ingress', 'ipv4 access-group acl\_4 egress'] | ### Authors * Nilashish Chakraborty (@NilashishC) ansible cisco.iosxr.iosxr_acls – ACLs resource module cisco.iosxr.iosxr\_acls – ACLs resource module ============================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_acls`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages Access Control Lists (ACLs) on devices running IOS-XR. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A list of dictionaries specifying ACL configurations. | | | **acls** list / elements=dictionary | | A list of Access Control Lists (ACLs). | | | | **aces** list / elements=dictionary | | List of Access Control Entries (ACEs) for this Access Control List (ACL). | | | | | **authen** boolean | **Choices:*** no * yes | Match if authentication header is present. | | | | | **capture** boolean | **Choices:*** no * yes | Capture matched packet. | | | | | **destination** dictionary | | Specifies the packet destination. | | | | | | **address** string | | The destination IP address to match. | | | | | | **any** boolean | **Choices:*** no * yes | Match any destination address. | | | | | | **host** string | | The host IP address to match. | | | | | | **port\_protocol** dictionary | | Specify the source port or protocol. | | | | | | | **eq** string | | Match only packets on a given port number. | | | | | | | **gt** string | | Match only packets with a greater port number. | | | | | | | **lt** string | | Match only packets with a lower port number. | | | | | | | **neq** string | | Match only packets not on a given port number. | | | | | | | **range** dictionary | | Match only packets in the range of port numbers | | | | | | | | **end** string | | Specify the end of the port range | | | | | | | | **start** string | | Specify the start of the port range | | | | | | **prefix** string | | Destination network prefix. | | | | | | **wildcard\_bits** string | | The Wildcard bits to apply to destination address. | | | | | **destopts** boolean | **Choices:*** no * yes | Match if destination opts header is present. | | | | | **dscp** dictionary | | Match packets with given DSCP value. | | | | | | **eq** string | | Match only packets on a given dscp value | | | | | | **gt** string | | Match only packets with a greater dscp value | | | | | | **lt** string | | Match only packets with a lower dscp value | | | | | | **neq** string | | Match only packets not on a given dscp value | | | | | | **range** dictionary | | Match only packets in the range of dscp values | | | | | | | **end** string | | End of the dscp range | | | | | | | **start** string | | Start of the dscp range | | | | | **fragments** boolean | **Choices:*** no * yes | Check non-intial fragments. | | | | | **grant** string | **Choices:*** permit * deny | Forward or drop packets matching the Access Control Entry (ACE). | | | | | **hop\_by\_hop** boolean | **Choices:*** no * yes | Match if hop-by-hop opts header is present. | | | | | **icmp\_off** boolean | **Choices:*** no * yes | Enable/disable the ICMP message for this entry. | | | | | **line** string | | An ACE excluding the sequence number. This key is mutually exclusive with all the other attributes except 'sequence'. When used with other attributes, the value of this key will get precedence and the other keys will be ignored. This should only be used when an attribute doesn't exist in the argspec but is valid for the device. For fact gathering, any ACE that is not fully parsed, will show up as a value of this attribute, excluding the sequence number, which will be populated as value of the sequence key. aliases: ace | | | | | **log** boolean | **Choices:*** no * yes | Enable/disable log matches against this entry. | | | | | **log\_input** boolean | **Choices:*** no * yes | Enable/disable log matches against this entry, including input interface. | | | | | **packet\_length** dictionary | | Match packets given packet length. | | | | | | **eq** integer | | Match only packets on a given packet length | | | | | | **gt** integer | | Match only packets with a greater packet length | | | | | | **lt** integer | | Match only packets with a lower packet length | | | | | | **neq** integer | | Match only packets not on a given packet length | | | | | | **range** dictionary | | Match only packets in the range of packet lengths | | | | | | | **end** integer | | End of the packet length range | | | | | | | **start** integer | | Start of the packet length range | | | | | **precedence** string | | Match packets with given precedence value | | | | | **protocol** string | | Specify the protocol to match. Refer to vendor documentation for valid values. | | | | | **protocol\_options** dictionary | | Additional suboptions for the protocol. | | | | | | **icmp** dictionary | | Internet Control Message Protocol settings. | | | | | | | **administratively\_prohibited** boolean | **Choices:*** no * yes | Administratively prohibited | | | | | | | **alternate\_address** boolean | **Choices:*** no * yes | Alternate address | | | | | | | **conversion\_error** boolean | **Choices:*** no * yes | Datagram conversion | | | | | | | **dod\_host\_prohibited** boolean | **Choices:*** no * yes | Host prohibited | | | | | | | **dod\_net\_prohibited** boolean | **Choices:*** no * yes | Net prohibited | | | | | | | **echo** boolean | **Choices:*** no * yes | Echo (ping) | | | | | | | **echo\_reply** boolean | **Choices:*** no * yes | Echo reply | | | | | | | **general\_parameter\_problem** boolean | **Choices:*** no * yes | Parameter problem | | | | | | | **host\_isolated** boolean | **Choices:*** no * yes | Host isolated | | | | | | | **host\_precedence\_unreachable** boolean | **Choices:*** no * yes | Host unreachable for precedence | | | | | | | **host\_redirect** boolean | **Choices:*** no * yes | Host redirect | | | | | | | **host\_tos\_redirect** boolean | **Choices:*** no * yes | Host redirect for TOS | | | | | | | **host\_tos\_unreachable** boolean | **Choices:*** no * yes | Host unreachable for TOS | | | | | | | **host\_unknown** boolean | **Choices:*** no * yes | Host unknown | | | | | | | **host\_unreachable** boolean | **Choices:*** no * yes | Host unreachable | | | | | | | **information\_reply** boolean | **Choices:*** no * yes | Information replies | | | | | | | **information\_request** boolean | **Choices:*** no * yes | Information requests | | | | | | | **mask\_reply** boolean | **Choices:*** no * yes | Mask replies | | | | | | | **mask\_request** boolean | **Choices:*** no * yes | Mask requests | | | | | | | **mobile\_redirect** boolean | **Choices:*** no * yes | Mobile host redirect | | | | | | | **net\_redirect** boolean | **Choices:*** no * yes | Network redirect | | | | | | | **net\_tos\_redirect** boolean | **Choices:*** no * yes | Net redirect for TOS | | | | | | | **net\_tos\_unreachable** boolean | **Choices:*** no * yes | Network unreachable for TOS | | | | | | | **net\_unreachable** boolean | **Choices:*** no * yes | Net unreachable | | | | | | | **network\_unknown** boolean | **Choices:*** no * yes | Network unknown | | | | | | | **no\_room\_for\_option** boolean | **Choices:*** no * yes | Parameter required but no room | | | | | | | **option\_missing** boolean | **Choices:*** no * yes | Parameter required but not present | | | | | | | **packet\_too\_big** boolean | **Choices:*** no * yes | Fragmentation needed and DF set | | | | | | | **parameter\_problem** boolean | **Choices:*** no * yes | All parameter problems | | | | | | | **port\_unreachable** boolean | **Choices:*** no * yes | Port unreachable | | | | | | | **precedence\_unreachable** boolean | **Choices:*** no * yes | Precedence cutoff | | | | | | | **protocol\_unreachable** boolean | **Choices:*** no * yes | Protocol unreachable | | | | | | | **reassembly\_timeout** boolean | **Choices:*** no * yes | Reassembly timeout | | | | | | | **redirect** boolean | **Choices:*** no * yes | All redirects | | | | | | | **router\_advertisement** boolean | **Choices:*** no * yes | Router discovery advertisements | | | | | | | **router\_solicitation** boolean | **Choices:*** no * yes | Router discovery solicitations | | | | | | | **source\_quench** boolean | **Choices:*** no * yes | Source quenches | | | | | | | **source\_route\_failed** boolean | **Choices:*** no * yes | Source route failed | | | | | | | **time\_exceeded** boolean | **Choices:*** no * yes | All time exceededs | | | | | | | **timestamp\_reply** boolean | **Choices:*** no * yes | Timestamp replies | | | | | | | **timestamp\_request** boolean | **Choices:*** no * yes | Timestamp requests | | | | | | | **traceroute** boolean | **Choices:*** no * yes | Traceroute | | | | | | | **ttl\_exceeded** boolean | **Choices:*** no * yes | TTL exceeded | | | | | | | **unreachable** boolean | **Choices:*** no * yes | All unreachables | | | | | | **icmpv6** dictionary | | Internet Control Message Protocol settings for IPv6. | | | | | | | **address\_unreachable** boolean | **Choices:*** no * yes | Address Unreachable | | | | | | | **administratively\_prohibited** boolean | **Choices:*** no * yes | Administratively Prohibited | | | | | | | **beyond\_scope\_of\_source\_address** boolean | **Choices:*** no * yes | Administratively Prohibited | | | | | | | **destination\_unreachable** boolean | **Choices:*** no * yes | Destination Unreachable | | | | | | | **echo** boolean | **Choices:*** no * yes | Echo | | | | | | | **echo\_reply** boolean | **Choices:*** no * yes | Echo Reply | | | | | | | **erroneous\_header\_field** boolean | **Choices:*** no * yes | Erroneous Header Field | | | | | | | **group\_membership\_query** boolean | **Choices:*** no * yes | Group Membership Query | | | | | | | **group\_membership\_report** boolean | **Choices:*** no * yes | Group Membership Report | | | | | | | **group\_membership\_termination** boolean | **Choices:*** no * yes | Group Membership Termination | | | | | | | **host\_unreachable** boolean | **Choices:*** no * yes | Host Unreachable | | | | | | | **nd\_na** boolean | **Choices:*** no * yes | Neighbor Discovery - Neighbor Advertisement | | | | | | | **nd\_ns** boolean | **Choices:*** no * yes | Neighbor Discovery - Neighbor Solicitation | | | | | | | **neighbor\_redirect** boolean | **Choices:*** no * yes | Neighbor Redirect | | | | | | | **no\_route\_to\_destination** boolean | **Choices:*** no * yes | No Route To Destination | | | | | | | **node\_information\_request\_is\_refused** boolean | **Choices:*** no * yes | Node Information Request Is Refused | | | | | | | **node\_information\_successful\_reply** boolean | **Choices:*** no * yes | Node Information Successful Reply | | | | | | | **packet\_too\_big** boolean | **Choices:*** no * yes | Packet Too Big | | | | | | | **parameter\_problem** boolean | **Choices:*** no * yes | Parameter Problem | | | | | | | **port\_unreachable** boolean | **Choices:*** no * yes | Port Unreachable | | | | | | | **query\_subject\_is\_domainname** boolean | **Choices:*** no * yes | Query Subject Is Domain name | | | | | | | **query\_subject\_is\_IPv4address** boolean | **Choices:*** no * yes | Query Subject Is IPv4 address | | | | | | | **query\_subject\_is\_IPv6address** boolean | **Choices:*** no * yes | Query Subject Is IPv6 address | | | | | | | **reassembly\_timeout** boolean | **Choices:*** no * yes | Reassembly Timeout | | | | | | | **redirect** boolean | **Choices:*** no * yes | Redirect | | | | | | | **router\_advertisement** boolean | **Choices:*** no * yes | Router Advertisement | | | | | | | **router\_renumbering** boolean | **Choices:*** no * yes | Router Renumbering | | | | | | | **router\_solicitation** boolean | **Choices:*** no * yes | Router Solicitation | | | | | | | **rr\_command** boolean | **Choices:*** no * yes | RR Command | | | | | | | **rr\_result** boolean | **Choices:*** no * yes | RR Result | | | | | | | **rr\_seqnum\_reset** boolean | **Choices:*** no * yes | RR Seqnum Reset | | | | | | | **time\_exceeded** boolean | **Choices:*** no * yes | Time Exceeded | | | | | | | **ttl\_exceeded** boolean | **Choices:*** no * yes | TTL Exceeded | | | | | | | **unknown\_query\_type** boolean | **Choices:*** no * yes | Unknown Query Type | | | | | | | **unreachable** boolean | **Choices:*** no * yes | Unreachable | | | | | | | **unrecognized\_next\_header** boolean | **Choices:*** no * yes | Unrecognized Next Header | | | | | | | **unrecognized\_option** boolean | **Choices:*** no * yes | Unrecognized Option | | | | | | | **whoareyou\_reply** boolean | **Choices:*** no * yes | Whoareyou Reply | | | | | | | **whoareyou\_request** boolean | **Choices:*** no * yes | Whoareyou Request | | | | | | **igmp** dictionary | | Internet Group Management Protocol (IGMP) settings. | | | | | | | **dvmrp** boolean | **Choices:*** no * yes | Match Distance Vector Multicast Routing Protocol | | | | | | | **host\_query** boolean | **Choices:*** no * yes | Match Host Query | | | | | | | **host\_report** boolean | **Choices:*** no * yes | Match Host Report | | | | | | | **mtrace** boolean | **Choices:*** no * yes | Match mtrace | | | | | | | **mtrace\_response** boolean | **Choices:*** no * yes | Match mtrace response | | | | | | | **pim** boolean | **Choices:*** no * yes | Match Protocol Independent Multicast | | | | | | | **trace** boolean | **Choices:*** no * yes | Multicast trace | | | | | | **tcp** dictionary | | Match TCP packet flags | | | | | | | **ack** boolean | **Choices:*** no * yes | Match on the ACK bit | | | | | | | **established** boolean | **Choices:*** no * yes | Match established connections | | | | | | | **fin** boolean | **Choices:*** no * yes | Match on the FIN bit | | | | | | | **psh** boolean | **Choices:*** no * yes | Match on the PSH bit | | | | | | | **rst** boolean | **Choices:*** no * yes | Match on the RST bit | | | | | | | **syn** boolean | **Choices:*** no * yes | Match on the SYN bit | | | | | | | **urg** boolean | **Choices:*** no * yes | Match on the URG bit | | | | | **remark** string | | Comments or a description for the access list. | | | | | **routing** boolean | **Choices:*** no * yes | Match if routing header is present. | | | | | **sequence** integer | | Sequence number for the Access Control Entry (ACE). | | | | | **source** dictionary | | Specifies the packet source. | | | | | | **address** string | | The source IP address to match. | | | | | | **any** boolean | **Choices:*** no * yes | Match any source address. | | | | | | **host** string | | The host IP address to match. | | | | | | **port\_protocol** dictionary | | Specify the source port or protocol. | | | | | | | **eq** string | | Match only packets on a given port number. | | | | | | | **gt** string | | Match only packets with a greater port number. | | | | | | | **lt** string | | Match only packets with a lower port number. | | | | | | | **neq** string | | Match only packets not on a given port number. | | | | | | | **range** dictionary | | Match only packets in the range of port numbers | | | | | | | | **end** string | | Specify the end of the port range | | | | | | | | **start** string | | Specify the start of the port range | | | | | | **prefix** string | | Source network prefix. | | | | | | **wildcard\_bits** string | | The Wildcard bits to apply to source address. | | | | | **ttl** dictionary | | Match against specified TTL value. | | | | | | **eq** integer | | Match only packets with exact TTL value. | | | | | | **gt** integer | | Match only packets with a greater TTL value. | | | | | | **lt** integer | | Match only packets with a lower TTL value. | | | | | | **neq** integer | | Match only packets that won't have the given TTL value. | | | | | | **range** dictionary | | Match only packets in the range of given TTL values. | | | | | | | **end** integer | | End of the TTL range. | | | | | | | **start** integer | | Start of the TTL range. | | | | **name** string | | The name of the Access Control List (ACL). | | | **afi** string / required | **Choices:*** ipv4 * ipv6 | The Address Family Indicator (AFI) for the Access Control Lists (ACL). | | **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 comparison. This value of this option should be the output received from device by executing command **show running-config router static**. | | **state** string | **Choices:*** **merged** ← * replaced * overridden * deleted * gathered * rendered * parsed | The state the configuration should be left in. | Examples -------- ``` # Using merged to add new ACLs # Before state: # ------------- # RP/0/RP0/CPU0:ios#sh access-lists afi-all # Thu Feb 20 05:07:45.767 UTC # RP/0/RP0/CPU0:ios# - name: Merge the provided configuration with the existing running configuration cisco.iosxr.iosxr_acls: config: - afi: ipv6 acls: - name: acl6_1 aces: - sequence: 10 grant: deny protocol: tcp source: prefix: 2001:db8:1234::/48 port_protocol: range: start: ftp end: telnet destination: any: true protocol_options: tcp: syn: true ttl: range: start: 180 end: 250 routing: true authen: true log: true - sequence: 20 grant: permit protocol: icmpv6 source: any: true destination: any: true protocol_options: icmpv6: router_advertisement: true precedence: network destopts: true - afi: ipv4 acls: - name: acl_1 aces: - sequence: 16 remark: TEST_ACL_1_REMARK - sequence: 21 grant: permit protocol: tcp source: host: 192.0.2.10 port_protocol: range: start: pop3 end: 121 destination: address: 198.51.100.0 wildcard_bits: 0.0.0.15 protocol_options: tcp: rst: true - sequence: 23 grant: deny protocol: icmp source: any: true destination: prefix: 198.51.100.0/28 protocol_options: icmp: reassembly_timeout: true dscp: lt: af12 - name: acl_2 aces: - sequence: 10 remark: TEST_ACL_2_REMARK state: merged # After state: # ------------- # RP/0/RP0/CPU0:ios#sh access-lists afi-all # Thu Feb 20 05:22:57.021 UTC # ipv4 access-list acl_1 # 16 remark TEST_ACL_1_REMARK # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12 # ipv4 access-list acl_2 # 10 remark TEST_ACL_2_REMARK # ipv6 access-list acl6_1 # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log # 20 permit icmpv6 any any router-advertisement precedence network destopts # Using merged to update existing ACLs # Before state: # ------------- # RP/0/RP0/CPU0:ios#sh access-lists afi-all # Thu Feb 20 05:22:57.021 UTC # ipv4 access-list acl_1 # 16 remark TEST_ACL_1_REMARK # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12 # ipv4 access-list acl_2 # 10 remark TEST_ACL_2_REMARK # ipv6 access-list acl6_1 # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log # 20 permit icmpv6 any any router-advertisement precedence network destopts - name: Update existing ACEs cisco.iosxr.iosxr_acls: config: - afi: ipv4 acls: - name: acl_1 aces: - sequence: 21 source: prefix: 198.51.100.32/28 port_protocol: range: start: pop3 end: 121 protocol_options: tcp: syn: true - sequence: 23 protocol_options: icmp: router_advertisement: true dscp: eq: af23 # After state: # ------------- # RP/0/RP0/CPU0:ios#sh access-lists afi-all # Thu Feb 20 05:47:18.711 UTC # ipv4 access-list acl_1 # 16 remark TEST_ACL_1_REMARK # 21 permit tcp 198.51.100.32 0.0.0.15 range pop3 121 198.51.100.0 0.0.0.15 syn # 23 deny icmp any 198.51.100.0 0.0.0.15 router-advertisement dscp eq af23 # ipv4 access-list acl_2 # 10 remark TEST_ACL_2_REMARK # ipv6 access-list acl6_1 # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log # 20 permit icmpv6 any any router-advertisement precedence network destopts # Using replaced to replace a whole ACL # Before state: # ------------- # RP/0/RP0/CPU0:ios#sh access-lists afi-all # Thu Feb 20 05:22:57.021 UTC # ipv4 access-list acl_1 # 16 remark TEST_ACL_1_REMARK # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12 # ipv4 access-list acl_2 # 10 remark TEST_ACL_2_REMARK # ipv6 access-list acl6_1 # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log # 20 permit icmpv6 any any router-advertisement precedence network destopts - name: Replace device configurations of listed ACL with provided configurations cisco.iosxr.iosxr_acls: config: - afi: ipv4 acls: - name: acl_2 aces: - sequence: 11 grant: permit protocol: igmp source: host: 198.51.100.130 destination: any: true ttl: eq: 100 - sequence: 12 grant: deny source: any: true destination: any: true protocol: icmp state: replaced # After state: # ------------- # RP/0/RP0/CPU0:ios#sh access-lists afi-all # Thu Feb 20 06:19:51.496 UTC # ipv4 access-list acl_1 # 16 remark TEST_ACL_1_REMARK # 21 permit tcp 198.51.100.32 0.0.0.15 range pop3 121 198.51.100.0 0.0.0.15 syn # 23 deny icmp any 198.51.100.0 0.0.0.15 router-advertisement dscp eq af23 # ipv4 access-list acl_2 # 11 permit igmp host 198.51.100.130 any ttl eq 100 # 12 deny icmp any any # ipv6 access-list acl6_1 # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log # 20 permit icmpv6 any any router-advertisement precedence network destopts # Using overridden to override all ACLs in the device # Before state: # ------------- # RP/0/RP0/CPU0:ios#sh access-lists afi-all # Thu Feb 20 05:22:57.021 UTC # ipv4 access-list acl_1 # 16 remark TEST_ACL_1_REMARK # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12 # ipv4 access-list acl_2 # 10 remark TEST_ACL_2_REMARK # ipv6 access-list acl6_1 # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log # 20 permit icmpv6 any any router-advertisement precedence network destopts - name: Overridde all ACLs configuration with provided configuration cisco.iosxr.iosxr_acls: config: - afi: ipv4 acls: - name: acl_1 aces: - sequence: 10 grant: permit source: any: true destination: any: true protocol: tcp - name: acl_2 aces: - sequence: 20 grant: permit source: any: true destination: any: true protocol: igmp state: overridden # After state: # ------------- # RP/0/RP0/CPU0:ios#sh access-lists afi-all # Thu Feb 20 06:31:22.178 UTC # ipv4 access-list acl_1 # 10 permit tcp any any # ipv4 access-list acl_2 # 20 permit igmp any any # Using deleted to delete an entire ACL # Before state: # ------------- # RP/0/RP0/CPU0:ios#sh access-lists afi-all # Thu Feb 20 05:22:57.021 UTC # ipv4 access-list acl_1 # 16 remark TEST_ACL_1_REMARK # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12 # ipv4 access-list acl_2 # 10 remark TEST_ACL_2_REMARK # ipv6 access-list acl6_1 # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log # 20 permit icmpv6 any any router-advertisement precedence network destopts - name: Delete a single ACL cisco.iosxr.iosxr_acls: config: - afi: ipv6 acls: - name: acl6_1 state: deleted # After state: # ------------- # RP/0/RP0/CPU0:ios#sh access-lists afi-all # Thu Feb 20 05:22:57.021 UTC # ipv4 access-list acl_1 # 16 remark TEST_ACL_1_REMARK # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12 # ipv4 access-list acl_2 # 10 remark TEST_ACL_2_REMARK # Using deleted to delete all ACLs under one AFI # Before state: # ------------- # RP/0/RP0/CPU0:ios#sh access-lists afi-all # Thu Feb 20 05:22:57.021 UTC # ipv4 access-list acl_1 # 16 remark TEST_ACL_1_REMARK # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12 # ipv4 access-list acl_2 # 10 remark TEST_ACL_2_REMARK # ipv6 access-list acl6_1 # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log # 20 permit icmpv6 any any router-advertisement precedence network destopts - name: Delete all ACLs under one AFI cisco.iosxr.iosxr_acls: config: - afi: ipv4 state: deleted # After state: # ------------- # RP/0/RP0/CPU0:ios#sh access-lists afi-all # Thu Feb 20 05:22:57.021 UTC # ipv6 access-list acl6_1 # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log # 20 permit icmpv6 any any router-advertisement precedence network destopts # Using deleted to delete all ACLs from the device # Before state: # ------------- # RP/0/RP0/CPU0:ios#sh access-lists afi-all # Thu Feb 20 05:22:57.021 UTC # ipv4 access-list acl_1 # 16 remark TEST_ACL_1_REMARK # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12 # ipv4 access-list acl_2 # 10 remark TEST_ACL_2_REMARK # ipv6 access-list acl6_1 # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log # 20 permit icmpv6 any any router-advertisement precedence network destopts - name: Delete all ACLs from the device cisco.iosxr.iosxr_acls: state: deleted # After state: # ------------- # RP/0/RP0/CPU0:ios#sh access-lists afi-all # Thu Feb 20 05:07:45.767 UTC # RP/0/RP0/CPU0:ios# # Using gathered to gather ACL facts from the device - name: Gather ACL interfaces facts using gathered state cisco.iosxr.iosxr_acls: state: gathered # Task Output (redacted) # ----------------------- # # "gathered": [ # { # "acls": [ # { # "aces": [ # { # "remark": "TEST_ACL_1_REMARK", # "sequence": 16 # }, # { # "destination": { # "address": "198.51.100.0", # "wildcard_bits": "0.0.0.15" # }, # "grant": "permit", # "protocol": "tcp", # "protocol_options": { # "tcp": { # "rst": true # } # }, # "sequence": 21, # "source": { # "host": "192.0.2.10", # "port_protocol": { # "range": { # "end": "121", # "start": "pop3" # } # } # } # }, # { # "destination": { # "address": "198.51.100.0", # "wildcard_bits": "0.0.0.15" # }, # "dscp": { # "lt": "af12" # }, # "grant": "deny", # "protocol": "icmp", # "protocol_options": { # "icmp": { # "reassembly_timeout": true # } # }, # "sequence": 23, # "source": { # "any": true # } # } # ], # "name": "acl_1" # }, # { # "aces": [ # { # "remark": "TEST_ACL_2_REMARK", # "sequence": 10 # } # ], # "name": "acl_2" # } # ], # "afi": "ipv4" # }, # { # "acls": [ # { # "aces": [ # { # "authen": true, # "destination": { # "any": true # }, # "grant": "deny", # "log": true, # "protocol": "tcp", # "protocol_options": { # "tcp": { # "syn": true # } # }, # "routing": true, # "sequence": 10, # "source": { # "port_protocol": { # "range": { # "end": "telnet", # "start": "ftp" # } # }, # "prefix": "2001:db8:1234::/48" # }, # "ttl": { # "range": { # "end": 250, # "start": 180 # } # } # }, # { # "destination": { # "any": true # }, # "destopts": true, # "grant": "permit", # "precedence": "network", # "protocol": "icmpv6", # "protocol_options": { # "icmpv6": { # "router_advertisement": true # } # }, # "sequence": 20, # "source": { # "any": true # } # } # ], # "name": "acl6_1" # } # ], # "afi": "ipv6" # } # ] # Using rendered - name: Render platform specific commands (without connecting to the device) cisco.iosxr.iosxr_acls: config: - afi: ipv4 acls: - name: acl_2 aces: - sequence: 11 grant: permit protocol: igmp source: host: 198.51.100.130 destination: any: true ttl: eq: 100 - sequence: 12 grant: deny source: any: true destination: any: true protocol: icmp state: rendered # Task Output (redacted) # ----------------------- # "rendered": [ # "ipv4 access-list acl_2", # "11 permit igmp host 198.51.100.130 any ttl eq 100", # "12 deny icmp any any" # Using parsed # parsed.cfg # ------------ # # ipv4 access-list acl_1 # 10 remark TEST_ACL_2_REMARK # ipv4 access-list acl_2 # 11 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 authen routing log # 21 permit icmpv6 any any router-advertisement precedence network packet-length eq 576 destopts # ipv6 access-list acl6_1 # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log # 20 permit icmpv6 any any router-advertisement precedence network packet-length eq 576 destopts - name: Parse externally provided ACL config to agnostic model cisco.iosxr.iosxr_acls: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task Output (redacted) # ----------------------- # "parsed": [ # { # "acls": [ # { # "aces": [ # { # "remark": "TEST_ACL_2_REMARK", # "sequence": 10 # } # ], # "name": "acl_1" # }, # { # "aces": [ # { # "authen": true, # "destination": { # "any": true # }, # "grant": "deny", # "log": true, # "protocol": "tcp", # "protocol_options": { # "tcp": { # "syn": true # } # }, # "routing": true, # "sequence": 11, # "source": { # "port_protocol": { # "range": { # "end": "telnet", # "start": "ftp" # } # }, # "prefix": "2001:db8:1234::/48" # }, # "ttl": { # "range": { # "end": 250, # "start": 180 # } # } # }, # { # "destination": { # "any": true # }, # "destopts": true, # "grant": "permit", # "packet_length": { # "eq": 576 # }, # "precedence": "network", # "protocol": "icmpv6", # "protocol_options": { # "icmpv6": { # "router_advertisement": true # } # }, # "sequence": 21, # "source": { # "any": true # } # } # ], # "name": "acl_2" # } # ], # "afi": "ipv4" # }, # { # "acls": [ # { # "aces": [ # { # "authen": true, # "destination": { # "any": true # }, # "grant": "deny", # "log": true, # "protocol": "tcp", # "protocol_options": { # "tcp": { # "syn": true # } # }, # "routing": true, # "sequence": 10, # "source": { # "port_protocol": { # "range": { # "end": "telnet", # "start": "ftp" # } # }, # "prefix": "2001:db8:1234::/48" # }, # "ttl": { # "range": { # "end": 250, # "start": 180 # } # } # }, # { # "destination": { # "any": true # }, # "destopts": true, # "grant": "permit", # "packet_length": { # "eq": 576 # }, # "precedence": "network", # "protocol": "icmpv6", # "protocol_options": { # "icmpv6": { # "router_advertisement": true # } # }, # "sequence": 20, # "source": { # "any": true # } # } # ], # "name": "acl6_1" # } # ], # "afi": "ipv6" # } # ] ``` 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 resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. | | **before** list / elements=string | always | The configuration prior to the model 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:** ['ipv6 access-list acl6\_1', '10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 authen routing log', '20 permit icmpv6 any any router-advertisement precedence network destopts', 'ipv4 access-list acl\_1', '16 remark TEST\_ACL\_1\_REMARK', '21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst', '23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12'] | ### Authors * Nilashish Chakraborty (@NilashishC)
programming_docs
ansible cisco.iosxr.iosxr_user – Manage the aggregate of local users on Cisco IOS XR device cisco.iosxr.iosxr\_user – Manage the aggregate of local users on Cisco IOS XR device ==================================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_user`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) 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). Requirements ------------ The below requirements are needed on the host that executes this module. * ncclient >= 0.5.3 when using netconf * lxml >= 4.1.1 when using netconf * base64 when using *public\_key\_contents* or *public\_key* * paramiko when using *public\_key\_contents* or *public\_key* Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **admin** boolean | **Choices:*** **no** ← * yes | Enters into administration configuration mode for making config changes to the device. Applicable only when using network\_cli transport | | **aggregate** list / elements=dictionary | | The set of username objects to be configured on the remote Cisco IOS XR 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. aliases: users, collection | | | **admin** boolean | **Choices:*** no * yes | Enters into administration configuration mode for making config changes to the device. Applicable only when using network\_cli transport | | | **configured\_password** string | | The password to be configured on the Cisco IOS XR device. The password needs to be provided in clear text. Password is encrypted on the device when used with *cli* and by Ansible when used with *netconf* using the same MD5 hash technique with salt size of 3. Please note that this option is not same as `provider password`. | | | **group** string | | Configures the group for the username in the device running configuration. The argument accepts a string value defining the group name. This argument does not check if the group has been configured on the device. aliases: role | | | **groups** list / elements=string | | Configures the groups for the username in the device running configuration. The argument accepts a list of group names. This argument does not check if the group has been configured on the device. It is similar to the aggregate command for usernames, but lets you configure multiple groups for the user(s). | | | **name** string / required | | The username to be configured on the Cisco IOS XR 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`. | | | **public\_key** string | | Configures the contents of the public keyfile to upload to the IOS-XR node. This enables users to login using the accompanying private key. IOS-XR only accepts base64 decoded files, so this will be decoded and uploaded to the node. Do note that this requires an OpenSSL public key file, PuTTy generated files will not work! Mutually exclusive with public\_key\_contents. If used with multiple users in aggregates, then the same key file is used for all users. | | | **public\_key\_contents** string | | Configures the contents of the public keyfile to upload to the IOS-XR node. This enables users to login using the accompanying private key. IOS-XR only accepts base64 decoded files, so this will be decoded and uploaded to the node. Do note that this requires an OpenSSL public key file, PuTTy generated files will not work! Mutually exclusive with public\_key.If used with multiple users in aggregates, then the same key file is used for all users. | | | **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. | | **configured\_password** string | | The password to be configured on the Cisco IOS XR device. The password needs to be provided in clear text. Password is encrypted on the device when used with *cli* and by Ansible when used with *netconf* using the same MD5 hash technique with salt size of 3. Please note that this option is not same as `provider password`. | | **group** string | | Configures the group for the username in the device running configuration. The argument accepts a string value defining the group name. This argument does not check if the group has been configured on the device. aliases: role | | **groups** list / elements=string | | Configures the groups for the username in the device running configuration. The argument accepts a list of group names. This argument does not check if the group has been configured on the device. It is similar to the aggregate command for usernames, but lets you configure multiple groups for the user(s). | | **name** string | | The username to be configured on the Cisco IOS XR 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`. | | **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. | | | **transport** string | **Choices:*** **cli** ← * netconf | Specifies the type of connection based transport. | | | **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. | | **public\_key** string | | Configures the contents of the public keyfile to upload to the IOS-XR node. This enables users to login using the accompanying private key. IOS-XR only accepts base64 decoded files, so this will be decoded and uploaded to the node. Do note that this requires an OpenSSL public key file, PuTTy generated files will not work! Mutually exclusive with public\_key\_contents. If used with multiple users in aggregates, then the same key file is used for all users. | | **public\_key\_contents** string | | Configures the contents of the public keyfile to upload to the IOS-XR node. This enables users to login using the accompanying private key. IOS-XR only accepts base64 decoded files, so this will be decoded and uploaded to the node. Do note that this requires an OpenSSL public key file, PuTTy generated files will not work! Mutually exclusive with public\_key.If used with multiple users in aggregates, then the same key file is used for all users. | | **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 and the current defined set of users. | | **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 works with connection `network_cli` and `netconf`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). * 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: create a new user cisco.iosxr.iosxr_user: name: ansible configured_password: mypassword state: present - name: create a new user in admin configuration mode cisco.iosxr.iosxr_user: name: ansible configured_password: mypassword admin: true state: present - name: remove all users except admin cisco.iosxr.iosxr_user: purge: true - name: set multiple users to group sys-admin cisco.iosxr.iosxr_user: aggregate: - name: netop - name: netend group: sysadmin state: present - name: set multiple users to multiple groups cisco.iosxr.iosxr_user: aggregate: - name: netop - name: netend groups: - sysadmin - root-system state: present - name: Change Password for User netop cisco.iosxr.iosxr_user: name: netop configured_password: '{{ new_password }}' update_password: always state: present - name: Add private key authentication for user netop cisco.iosxr.iosxr_user: name: netop state: present public_key_contents: "{{ lookup('file', '/home/netop/.ssh/id_rsa.pub' }}" ``` 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 group sysadmin', 'username admin secret admin'] | | **xml** list / elements=string | always (empty list when no xml rpc to send) | NetConf rpc xml sent to device with transport `netconf` **Sample:** ['<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> <aaa xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-lib-cfg"> <usernames xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-cfg"> <username xc:operation="merge"> <name>test7</name> <usergroup-under-usernames> <usergroup-under-username> <name>sysadmin</name> </usergroup-under-username> </usergroup-under-usernames> <secret>$1$ZsXC$zZ50wqhDC543ZWQkkAHLW0</secret> </username> </usernames> </aaa> </config>'] | ### Authors * Trishna Guha (@trishnaguha) * Sebastiaan van Doesselaar (@sebasdoes) * Kedar Kekan (@kedarX) ansible cisco.iosxr.iosxr_config – Manage Cisco IOS XR configuration sections cisco.iosxr.iosxr\_config – Manage Cisco IOS XR configuration sections ====================================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_config`. New in version 1.0.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Cisco IOS XR configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with IOS XR configuration sections in a deterministic way. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **admin** boolean | **Choices:*** **no** ← * yes | Enters into administration configuration mode for making config changes to the device. | | **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. | | **comment** string | **Default:**"configured by iosxr\_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 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. The configuration lines for this option should be similar to how it will appear if present in the running-configuration of the device to ensure idempotency and correct diff. | | **exclusive** boolean | **Choices:*** **no** ← * yes | Enters into exclusive configuration mode that locks out all users from committing configuration changes until the exclusive session ends. | | **force** boolean | **Choices:*** **no** ← * yes | The force argument instructs the module to not consider the current devices running-config. When set to true, this will cause the module to push the contents of *src* into the device without first checking if already configured. Note this argument should be considered deprecated. To achieve the equivalent, set the `match=none` which is idempotent. This argument will be removed in a future release. | | **label** string | | Allows a commit label to be specified to be included when the configuration is committed. A valid label must begin with an alphabet and not exceed 30 characters, only alphabets, digits, hyphens and underscores are allowed. If the configuration is not changed or committed, this argument is ignored. | | **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`. 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. | | | **transport** string | **Choices:*** **cli** ← * netconf | Specifies the type of connection based transport. | | | **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. | | **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. | | **src** path | | Specifies the source path to the file that contains the configuration or configuration template to load. 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. This argument is mutually exclusive with *lines*, *parents*. The configuration lines in the source file should be similar to how it will appear if present in the running-configuration of the device to ensure idempotency and correct diff. | Notes ----- Note * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr). * This module does not support `netconf` connection * Abbreviated commands are NOT idempotent, see L(Network FAQ,../network/user\_guide/faq.html * Avoid service disrupting changes (viz. Management IP) from config replace. * Do not use `end` in the replace config file. * 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) * For more information on using Ansible to manage Cisco devices see the [Cisco integration page](https://www.ansible.com/integrations/networks/cisco). Examples -------- ``` - name: configure top level configuration cisco.iosxr.iosxr_config: lines: hostname {{ inventory_hostname }} - name: configure interface settings cisco.iosxr.iosxr_config: lines: - description test interface - ip address 172.31.1.1 255.255.255.0 parents: interface GigabitEthernet0/0/0/0 - name: load a config from disk and replace the current config cisco.iosxr.iosxr_config: src: config.cfg replace: config backup: yes - name: for idempotency, use full-form commands cisco.iosxr.iosxr_config: lines: # - shut - shutdown # parents: int g0/0/0/1 parents: interface GigabitEthernet0/0/0/1 - name: configurable backup path cisco.iosxr.iosxr_config: src: config.cfg 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/iosxr01\_config.2016-07-16@22:28:34 | | **commands** list / elements=string | If there are commands to run against the host | The set of commands that will be pushed to the remote device **Sample:** ['hostname foo', 'router ospf 1', 'router-id 1.1.1.1'] | | **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:** iosxr01\_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/iosxr01\_config | | **time** string | when backup is yes | The time extracted from the backup file name **Sample:** 22:28:34 | ### Authors * Ricardo Carrillo Cruz (@rcarrillocruz)
programming_docs
ansible cisco.iosxr.iosxr_ospfv3 – ospfv3 resource module cisco.iosxr.iosxr\_ospfv3 – ospfv3 resource module ================================================== Note This plugin is part of the [cisco.iosxr collection](https://galaxy.ansible.com/cisco/iosxr) (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.iosxr`. To use it in a playbook, specify: `cisco.iosxr.iosxr_ospfv3`. New in version 1.1.0: of cisco.iosxr * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module manages global ospfv3 configuration on devices running Cisco IOS-XR Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | A list of ospfv3 process configuration | | | **processes** list / elements=dictionary | | A list of ospfv3 instances configuration | | | | **address\_family\_unicast** boolean | **Choices:*** no * yes | Enable unicast topology for ipv4 address family | | | | **areas** list / elements=dictionary | | Configure ospfv3 areas' properties | | | | | **area\_id** string / required | | Area ID as IP address or integer | | | | | **authentication** dictionary | | Enable authentication | | | | | | **disable** boolean | **Choices:*** **no** ← * yes | Do not authenticate OSPFv3 packets | | | | | | **ipsec** dictionary | | Specify IPSec AH authentication attributes | | | | | | | **algorithim\_type** string | **Choices:*** md5 * sha1 | Specify the type of algorithim | | | | | | | **clear\_key** string | | Specify key in cleartext form | | | | | | | **key** string | | Specify key | | | | | | | **password\_key** string | | Specify key in encrypted form | | | | | | | **spi** integer | | Specify the Security Parameter Index value | | | | | **bfd** dictionary | | Configure BFD parameters | | | | | | **fast\_detect** dictionary | | Configure fast detection | | | | | | | **set** boolean | **Choices:*** no * yes | Enable fast detection only | | | | | | | **strict\_mode** boolean | **Choices:*** no * yes | Hold down neighbor session until BFD session is up | | | | | | **minimum\_interval** integer | | Hello interval in milli-seconds | | | | | | **multiplier** integer | | Detect multiplier | | | | | **cost** integer | | Interface cost | | | | | **database\_filter** dictionary | | Filter LSAs during synchronization and flooding | | | | | | **all\_outgoing\_lsa** boolean | **Choices:*** no * yes | Filter all outgoing LSA | | | | | **dead\_interval** integer | | Interval after which a neighbor is declared dead | | | | | **default\_cost** integer | | Set the summary default-cost of a NSSA/stub area. Stub's advertised external route metric | | | | | **demand\_circuit** boolean | **Choices:*** no * yes | Enable/Disable ospfv3 demand circuit | | | | | **distrinbute\_rib\_prefix\_list\_name** string | | Filter LSAs during synchronization and flooding | | | | | **encryption** dictionary | | Encrypt and authenticate OSPFv3 packets | | | | | | **disable** boolean | **Choices:*** **no** ← * yes | Do not encrypt OSPFv3 packets | | | | | | **ipsec** dictionary | | Specify IPSec ESP encryption and authentication | | | | | | | **esp** dictionary | | Specify encryption parameters | | | | | | | | **aes** dictionary | | This specify the aes algorithim | | | | | | | | | **algorithim\_type** string | **Choices:*** 192 * 256 | Specify the bit encryption for aes algorithim | | | | | | | | | **clear\_key** string | | Specify AES key in cleartext form | | | | | | | | | **key** string | | Cleartext AES key | | | | | | | | | **password\_key** string | | Specify AES key in encrypted form | | | | | | | | **des** dictionary | | This specify the des algorithim | | | | | | | | | **clear\_key** string | | Specify AES key in cleartext form | | | | | | | | | **key** string | | Cleartext AES key | | | | | | | | | **password\_key** string | | Specify AES key in encrypted form | | | | | | | | **null\_encryption** dictionary | | Specify null encryption attributes | | | | | | | | | **authentication** dictionary | | Specify authentication parameters | | | | | | | | | | **algorithim\_type** string | **Choices:*** md5 * sha1 | Specify the type of algorithim | | | | | | | | | | **clear\_key** string | | Specify key in cleartext form | | | | | | | | | | **key** string | | Specify key | | | | | | | | | | **password\_key** string | | Specify key in encrypted form | | | | | | | | **triple\_des** dictionary | | This specify the triple DES algorithim | | | | | | | | | **clear\_key** string | | Specify 3DES key in cleartext form | | | | | | | | | **key** string | | Cleartext 3DES key | | | | | | | | | **password\_key** string | | Specify 3DES key in encrypted form | | | | | | | **spi** integer | | Specify the Security Parameter Index value | | | | | **fast\_reroute** dictionary | | Specify IP Fast Reroute | | | | | | **disabled** boolean | **Choices:*** no * yes | Disable IP fast reroute | | | | | | **per\_link** dictionary | | Specify per-prefix computation | | | | | | | **information\_type** string | **Choices:*** exclude * lfa\_candidate | Specify per-link LFA exclusion or FRR LFA candidate information | | | | | | | **interface** dictionary | | Specify Per-link LFA exclusion information | | | | | | | | **bundle\_ether** list / elements=integer | | Specify Aggregated Ethernet interface(s) | | | | | | | | **bvi** list / elements=integer | | Specify Bridge-Group Virtual Interface | | | | | | | | **fast\_ethernet** list / elements=string | | Specify FastEthernet/IEEE 802.3 interface(s) | | | | | | | | **fiftygige** list / elements=string | | Specify FiftyGigE/IEEE 802.3 interface(s) | | | | | | | | **fortygige** list / elements=string | | Specify FortyGigE/IEEE 802.3 interface(s) | | | | | | | | **fourhundredgige** list / elements=string | | Specify FourHundredGigE/IEEE 802.3 interface(s) | | | | | | | | **gigabitethernet** list / elements=string | | Specify GigabitEthernet/IEEE 802.3 interface(s) | | | | | | | | **hundredgige** list / elements=string | | Specify HundredGigE/IEEE 802.3 interface(s) | | | | | | | | **mgmteth** list / elements=string | | Specify MgmtEth/IEEE 802.3 interface(s) | | | | | | | | **multilink** list / elements=string | | Specify Multilink network interface(s) | | | | | | | | **nve** list / elements=integer | | Specify Network Virtualization Endpoint Interface(s) | | | | | | | | **pos\_int** list / elements=integer | | Specify Aggregated pos interface(s) | | | | | | | | **pw\_ether** list / elements=integer | | Specify PWHE Ethernet Interface | | | | | | | | **pw\_iw** list / elements=integer | | Specify PWHE VC11 IP Interworking Interface | | | | | | | | **serial** list / elements=string | | Specify Serial network interface(s) | | | | | | | | **srp** list / elements=string | | Specify SRP interface(s) | | | | | | | | **tengige** list / elements=string | | Specify TenGigabitEthernet/IEEE 802.3 interface(s) | | | | | | | | **tunnel\_ip** list / elements=integer | | Specify GRE/IPinIP Tunnel Interface(s) | | | | | | | | **tunnel\_ipsec** list / elements=integer | | Specify IPSec Tunnel interface(s) | | | | | | | | **tunnel\_mpls** integer | | MPLS Transport Protocol Tunnel interface | | | | | | | | **tunnel\_mte** list / elements=integer | | Specify MPLS Traffic Engineering P2MP Tunnel interface(s) | | | | | | | | **twentyfivegige** list / elements=string | | Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s) | | | | | | | | **twohundredgige** list / elements=string | | Specify TwoHundredGigE/IEEE 802.3 interface(s) | | | | | | | **use\_candidate\_only** boolean | **Choices:*** no * yes | Enable/Disable backup selection from candidate-list only | | | | | | **per\_prefix** dictionary | | Specify per-prefix computation | | | | | | | **information\_type** string | **Choices:*** exclude * lfa\_candidate | Specify per\_prefix LFA exclusion or FRR LFA candidate information | | | | | | | **interface** dictionary | | Specify Per-link LFA exclusion information | | | | | | | | **bundle\_ether** list / elements=integer | | Specify Aggregated Ethernet interface(s) | | | | | | | | **bvi** list / elements=integer | | Specify Bridge-Group Virtual Interface | | | | | | | | **fast\_ethernet** list / elements=string | | Specify FastEthernet/IEEE 802.3 interface(s) | | | | | | | | **fiftygige** list / elements=string | | Specify FiftyGigE/IEEE 802.3 interface(s) | | | | | | | | **fortygige** list / elements=string | | Specify FortyGigE/IEEE 802.3 interface(s) | | | | | | | | **fourhundredgige** list / elements=string | | Specify FourHundredGigE/IEEE 802.3 interface(s) | | | | | | | | **gigabitethernet** list / elements=string | | Specify GigabitEthernet/IEEE 802.3 interface(s) | | | | | | | | **hundredgige** list / elements=string | | Specify HundredGigE/IEEE 802.3 interface(s) | | | | | | | | **mgmteth** list / elements=string | | Specify MgmtEth/IEEE 802.3 interface(s) | | | | | | | | **multilink** list / elements=string | | Specify Multilink network interface(s) | | | | | | | | **nve** list / elements=integer | | Specify Network Virtualization Endpoint Interface(s) | | | | | | | | **pos\_int** list / elements=integer | | Specify Aggregated pos interface(s) | | | | | | | | **pw\_ether** list / elements=integer | | Specify PWHE Ethernet Interface | | | | | | | | **pw\_iw** list / elements=integer | | Specify PWHE VC11 IP Interworking Interface | | | | | | | | **serial** list / elements=string | | Specify Serial network interface(s) | | | | | | | | **srp** list / elements=string | | Specify SRP interface(s) | | | | | | | | **tengige** list / elements=string | | Specify TenGigabitEthernet/IEEE 802.3 interface(s) | | | | | | | | **tunnel\_ip** list / elements=integer | | Specify GRE/IPinIP Tunnel Interface(s) | | | | | | | | **tunnel\_ipsec** list / elements=integer | | Specify IPSec Tunnel interface(s) | | | | | | | | **tunnel\_mpls** integer | | MPLS Transport Protocol Tunnel interface | | | | | | | | **tunnel\_mte** list / elements=integer | | Specify MPLS Traffic Engineering P2MP Tunnel interface(s) | | | | | | | | **twentyfivegige** list / elements=string | | Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s) | | | | | | | | **twohundredgige** list / elements=string | | Specify TwoHundredGigE/IEEE 802.3 interface(s) | | | | | | | **use\_candidate\_only** boolean | **Choices:*** no * yes | Enable/Disable backup selection from candidate-list only | | | | | **flood\_reduction** boolean | **Choices:*** no * yes | Enable/Disable flood reduction | | | | | **hello\_interval** integer | | Specify Time between HELLO packets | | | | | **instance\_id** integer | | Specify instance ID | | | | | **mpls\_ldp\_sync** boolean | **Choices:*** no * yes | Enable/Disable MPLS LDP Sync | | | | | **mtu\_ignore** boolean | **Choices:*** no * yes | Enable/Disable ignoring of MTU in DBD packets | | | | | **network** string | **Choices:*** broadcast * non-broadcast * point-to-multipoint * point-to-point | Specify Network type | | | | | **nssa** dictionary | | NSSA settings for the area | | | | | | **default\_information\_originate** dictionary | | Originate default Type 7 LSA | | | | | | | **metric** integer | | ospfv3 default metric | | | | | | | **metric\_type** integer | | Metric type for default routes | | | | | | | **set** boolean | **Choices:*** no * yes | Set nssa to default information originate | | | | | | **no\_redistribution** boolean | **Choices:*** no * yes | Do not send redistributed LSAs into NSSA area | | | | | | **no\_summary** boolean | **Choices:*** no * yes | Do not send summary LSAs into NSSA area | | | | | | **set** boolean | **Choices:*** no * yes | Configure area as NSSA | | | | | | **translate** dictionary | | Translate LSA | | | | | | | **type7** dictionary | | Translate from Type 7 to Type 5 | | | | | | | | **always** boolean / required | **Choices:*** no * yes | Always translate LSAs | | | | | **packet\_size** integer | | Specify limit size of OSPFv3 packets | | | | | **passive** boolean | **Choices:*** no * yes | Enable/Disable routing updates on an interface | | | | | **prefix\_suppression** boolean | **Choices:*** no * yes | Hide all transit addresses on this interface | | | | | **priority** integer | | Specify Router priority | | | | | **ranges** list / elements=dictionary | | Summarize routes matching address/mask (border routers only) | | | | | | **address** string / required | | IP in Prefix format (X:X::X/length) | | | | | | **advertise** boolean | **Choices:*** no * yes | Advertise this range (default) | | | | | | **cost** integer | | Specify user specified metric for this range | | | | | | **not\_advertise** boolean | **Choices:*** no * yes | DoNotAdvertise this range | | | | | **retransmit\_interval** integer | | Specify Delay between LSA retransmissions | | | | | **stub** dictionary | | Settings for configuring the area as a stub | | | | | | **no\_summary** boolean | **Choices:*** no * yes | Do not send summary LSA into stub area | | | | | | **set** boolean | **Choices:*** no * yes | Configure the area as a stub | | | | | **transmit\_delay** integer | | Specify estimated time needed to send link-state update packet | | | | | **virtual\_link** list / elements=dictionary | | Define a virtual link | | | | | | **authentication** dictionary | | Enable authentication | | | | | | | **disable** boolean | **Choices:*** **no** ← * yes | Do not authenticate OSPFv3 packets | | | | | | | **ipsec** dictionary | | Specify IPSec AH authentication attributes | | | | | | | | **algorithim\_type** string | **Choices:*** md5 * sha1 | Specify the type of algorithim | | | | | | | | **clear\_key** string | | Specify key in cleartext form | | | | | | | | **key** string | | Specify key | | | | | | | | **password\_key** string | | Specify key in encrypted form | | | | | | | | **spi** integer | | Specify the Security Parameter Index value | | | | | | **dead\_interval** integer | | Interval after which a neighbor is declared dead | | | | | | **encryption** dictionary | | Encrypt and authenticate OSPFv3 packets | | | | | | | **disable** boolean | **Choices:*** **no** ← * yes | Do not encrypt OSPFv3 packets | | | | | | | **ipsec** dictionary | | Specify IPSec ESP encryption and authentication | | | | | | | | **esp** dictionary | | Specify encryption parameters | | | | | | | | | **aes** dictionary | | This specify the aes algorithim | | | | | | | | | | **algorithim\_type** string | **Choices:*** 192 * 256 | Specify the bit encryption for aes algorithim | | | | | | | | | | **clear\_key** string | | Specify AES key in cleartext form | | | | | | | | | | **key** string | | Cleartext AES key | | | | | | | | | | **password\_key** string | | Specify AES key in encrypted form | | | | | | | | | **des** dictionary | | This specify the des algorithim | | | | | | | | | | **clear\_key** string | | Specify AES key in cleartext form | | | | | | | | | | **key** string | | Cleartext AES key | | | | | | | | | | **password\_key** string | | Specify AES key in encrypted form | | | | | | | | | **null\_encryption** dictionary | | Specify null encryption attributes | | | | | | | | | | **authentication** dictionary | | Specify authentication parameters | | | | | | | | | | | **algorithim\_type** string | **Choices:*** md5 * sha1 | Specify the type of algorithim | | | | | | | | | | | **clear\_key** string | | Specify key in cleartext form | | | | | | | | | | | **key** string | | Specify key | | | | | | | | | | | **password\_key** string | | Specify key in encrypted form | | | | | | | | | **triple\_des** dictionary | | This specify the triple DES algorithim | | | | | | | | | | **clear\_key** string | | Specify 3DES key in cleartext form | | | | | | | | | | **key** string | | Cleartext 3DES key | | | | | | | | | | **password\_key** string | | Specify 3DES key in encrypted form | | | | | | | | **spi** integer | | Specify the Security Parameter Index value | | | | | | **hello\_interval** integer | | Time between HELLO packets | | | | | | **id** string / required | | Router-ID of virtual link neighbor (A.B.C.D) | | | | | | **retransmit\_interval** integer | | Delay between LSA retransmissions | | | | | | **transmit\_delay** integer | | Link state transmit delay | | | | **authentication** dictionary | | Enable authentication | | | | | **disable** boolean | **Choices:*** **no** ← * yes | Do not authenticate OSPFv3 packets | | | | | **ipsec** dictionary | | Specify IPSec AH authentication attributes | | | | | | **algorithim\_type** string | **Choices:*** md5 * sha1 | Specify the type of algorithim | | | | | | **clear\_key** string | | Specify key in cleartext form | | | | | | **key** string | | Specify key | | | | | | **password\_key** string | | Specify key in encrypted form | | | | | | **spi** integer | | Specify the Security Parameter Index value | | | | **auto\_cost** dictionary | | Calculate ospfv3 interface cost according to bandwidth | | | | | **disable** boolean | **Choices:*** no * yes | Assign ospfv3 cost based on interface type | | | | | **reference\_bandwidth** integer | | Specify reference bandwidth in megabits per sec | | | | **bfd** dictionary | | Configure BFD parameters | | | | | **fast\_detect** dictionary | | Configure fast detection | | | | | | **set** boolean | **Choices:*** no * yes | Enable fast detection only | | | | | | **strict\_mode** boolean | **Choices:*** no * yes | Hold down neighbor session until BFD session is up | | | | | **minimum\_interval** integer | | Hello interval in milli-seconds | | | | | **multiplier** integer | | Detect multiplier | | | | **capability** dictionary | | Enable specific OSPFv3 feature | | | | | **type7** dictionary | | Specify type7 nssa capability | | | | | | **prefer** boolean | **Choices:*** no * yes | Prefer type7 externals over type5 | | | | | | **translate** boolean | **Choices:*** no * yes | Translate type7 to type5 | | | | **cost** integer | | Specify Interface cost | | | | **database\_filter** dictionary | | Filter LSAs during synchronization and flooding | | | | | **all\_outgoing\_lsa** boolean | **Choices:*** no * yes | Filter all outgoing LSA | | | | **dead\_interval** integer | | Interval after which a neighbor is declared dead | | | | **default\_information\_originate** dictionary | | Control distribution of default information | | | | | **always** boolean | **Choices:*** no * yes | Always advertise default route | | | | | **metric** integer | | ospfv3 default metric | | | | | **metric\_type** integer | | ospfv3 metric type for default routes | | | | | **route\_policy** string | | Apply route-policy to default-information origination | | | | | **set** boolean | **Choices:*** no * yes | Enable distribution of default route | | | | | **tag** integer | | Set tag for default route | | | | **default\_metric** integer | | Set metric of redistributed routes | | | | **demand\_circuit** boolean | **Choices:*** no * yes | Enable/Disable ospfv3 demand circuit | | | | **distance** dictionary | | Define an administrative distance | | | | | **admin\_distance** integer | | Administrative distance | | | | | **ospfv3\_distance** dictionary | | ospfv3 administrative distance | | | | | | **external** integer | | Distance for external routes | | | | | | **inter\_area** integer | | Distance for inter-area routes | | | | | | **intra\_area** integer | | Distance for intra-area routes | | | | **distribute\_list** dictionary | | Filter prefixes to/from RIB | | | | | **prefix\_list** list / elements=string | | Filter prefixes based on an IPv6 prefix-list | | | | | | **in** boolean | **Choices:*** no * yes | Filter prefixes installed to RIB | | | | | | **name** string | | Specify Prefix-list name | | | | | | **out** boolean | **Choices:*** no * yes | Filter prefixes redistributed from RIB | | | | **encryption** dictionary | | Encrypt and authenticate OSPFv3 packets | | | | | **disable** boolean | **Choices:*** **no** ← * yes | Do not encrypt OSPFv3 packets | | | | | **ipsec** dictionary | | Specify IPSec ESP encryption and authentication | | | | | | **esp** dictionary | | Specify encryption parameters | | | | | | | **aes** dictionary | | This specify the aes algorithim | | | | | | | | **algorithim\_type** string | **Choices:*** 192 * 256 | Specify the bit encryption for aes algorithim | | | | | | | | **clear\_key** string | | Specify AES key in cleartext form | | | | | | | | **key** string | | Cleartext AES key | | | | | | | | **password\_key** string | | Specify AES key in encrypted form | | | | | | | **des** dictionary | | This specify the des algorithim | | | | | | | | **clear\_key** string | | Specify AES key in cleartext form | | | | | | | | **key** string | | Cleartext AES key | | | | | | | | **password\_key** string | | Specify AES key in encrypted form | | | | | | | **null\_encryption** dictionary | | Specify null encryption attributes | | | | | | | | **authentication** dictionary | | Specify authentication parameters | | | | | | | | | **algorithim\_type** string | **Choices:*** md5 * sha1 | Specify the type of algorithim | | | | | | | | | **clear\_key** string | | Specify key in cleartext form | | | | | | | | | **key** string | | Specify key | | | | | | | | | **password\_key** string | | Specify key in encrypted form | | | | | | | **triple\_des** dictionary | | This specify the triple DES algorithim | | | | | | | | **clear\_key** string | | Specify 3DES key in cleartext form | | | | | | | | **key** string | | Cleartext 3DES key | | | | | | | | **password\_key** string | | Specify 3DES key in encrypted form | | | | | | **spi** integer | | Specify the Security Parameter Index value | | | | **fast\_reroute** dictionary | | Specify IP Fast Reroute | | | | | **disabled** boolean | **Choices:*** no * yes | Disable IP fast reroute | | | | | **per\_link** dictionary | | Specify per-prefix computation | | | | | | **information\_type** string | **Choices:*** exclude * lfa\_candidate | Specify per-link LFA exclusion or FRR LFA candidate information | | | | | | **interface** dictionary | | Specify Per-link LFA exclusion information | | | | | | | **bundle\_ether** list / elements=integer | | Specify Aggregated Ethernet interface(s) | | | | | | | **bvi** list / elements=integer | | Specify Bridge-Group Virtual Interface | | | | | | | **fast\_ethernet** list / elements=string | | Specify FastEthernet/IEEE 802.3 interface(s) | | | | | | | **fiftygige** list / elements=string | | Specify FiftyGigE/IEEE 802.3 interface(s) | | | | | | | **fortygige** list / elements=string | | Specify FortyGigE/IEEE 802.3 interface(s) | | | | | | | **fourhundredgige** list / elements=string | | Specify FourHundredGigE/IEEE 802.3 interface(s) | | | | | | | **gigabitethernet** list / elements=string | | Specify GigabitEthernet/IEEE 802.3 interface(s) | | | | | | | **hundredgige** list / elements=string | | Specify HundredGigE/IEEE 802.3 interface(s) | | | | | | | **mgmteth** list / elements=string | | Specify MgmtEth/IEEE 802.3 interface(s) | | | | | | | **multilink** list / elements=string | | Specify Multilink network interface(s) | | | | | | | **nve** list / elements=integer | | Specify Network Virtualization Endpoint Interface(s) | | | | | | | **pos\_int** list / elements=integer | | Specify Aggregated pos interface(s) | | | | | | | **pw\_ether** list / elements=integer | | Specify PWHE Ethernet Interface | | | | | | | **pw\_iw** list / elements=integer | | Specify PWHE VC11 IP Interworking Interface | | | | | | | **serial** list / elements=string | | Specify Serial network interface(s) | | | | | | | **srp** list / elements=string | | Specify SRP interface(s) | | | | | | | **tengige** list / elements=string | | Specify TenGigabitEthernet/IEEE 802.3 interface(s) | | | | | | | **tunnel\_ip** list / elements=integer | | Specify GRE/IPinIP Tunnel Interface(s) | | | | | | | **tunnel\_ipsec** list / elements=integer | | Specify IPSec Tunnel interface(s) | | | | | | | **tunnel\_mpls** integer | | MPLS Transport Protocol Tunnel interface | | | | | | | **tunnel\_mte** list / elements=integer | | Specify MPLS Traffic Engineering P2MP Tunnel interface(s) | | | | | | | **twentyfivegige** list / elements=string | | Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s) | | | | | | | **twohundredgige** list / elements=string | | Specify TwoHundredGigE/IEEE 802.3 interface(s) | | | | | | **use\_candidate\_only** boolean | **Choices:*** no * yes | Enable/Disable backup selection from candidate-list only | | | | | **per\_prefix** dictionary | | Specify per-prefix computation | | | | | | **information\_type** string | **Choices:*** exclude * lfa\_candidate | Specify per\_prefix LFA exclusion or FRR LFA candidate information | | | | | | **interface** dictionary | | Specify Per-link LFA exclusion information | | | | | | | **bundle\_ether** list / elements=integer | | Specify Aggregated Ethernet interface(s) | | | | | | | **bvi** list / elements=integer | | Specify Bridge-Group Virtual Interface | | | | | | | **fast\_ethernet** list / elements=string | | Specify FastEthernet/IEEE 802.3 interface(s) | | | | | | | **fiftygige** list / elements=string | | Specify FiftyGigE/IEEE 802.3 interface(s) | | | | | | | **fortygige** list / elements=string | | Specify FortyGigE/IEEE 802.3 interface(s) | | | | | | | **fourhundredgige** list / elements=string | | Specify FourHundredGigE/IEEE 802.3 interface(s) | | | | | | | **gigabitethernet** list / elements=string | | Specify GigabitEthernet/IEEE 802.3 interface(s) | | | | | | | **hundredgige** list / elements=string | | Specify HundredGigE/IEEE 802.3 interface(s) | | | | | | | **mgmteth** list / elements=string | | Specify MgmtEth/IEEE 802.3 interface(s) | | | | | | | **multilink** list / elements=string | | Specify Multilink network interface(s) | | | | | | | **nve** list / elements=integer | | Specify Network Virtualization Endpoint Interface(s) | | | | | | | **post\_int** list / elements=integer | | Specify Aggregated pos interface(s) | | | | | | | **pw\_ether** list / elements=integer | | Specify PWHE Ethernet Interface | | | | | | | **pw\_iw** list / elements=integer | | Specify PWHE VC11 IP Interworking Interface | | | | | | | **serial** list / elements=string | | Specify Serial network interface(s) | | | | | | | **srp** list / elements=string | | Specify SRP interface(s) | | | | | | | **tengige** list / elements=string | | Specify TenGigabitEthernet/IEEE 802.3 interface(s) | | | | | | | **tunnel\_ip** list / elements=integer | | Specify GRE/IPinIP Tunnel Interface(s) | | | | | | | **tunnel\_ipsec** list / elements=integer | | Specify IPSec Tunnel interface(s) | | | | | | | **tunnel\_mpls** integer | | MPLS Transport Protocol Tunnel interface | | | | | | | **tunnel\_mte** list / elements=integer | | Specify MPLS Traffic Engineering P2MP Tunnel interface(s) | | | | | | | **twentyfivegige** list / elements=string | | Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s) | | | | | | | **twohundredgige** list / elements=string | | Specify TwoHundredGigE/IEEE 802.3 interface(s) | | | | | | **use\_candidate\_only** boolean | **Choices:*** no * yes | Enable/Disable backup selection from candidate-list only | | | | **flood\_reduction** boolean | **Choices:*** no * yes | Enable/Disable flood reduction | | | | **graceful\_restart** dictionary | | Enable Graceful-Restart | | | | | **helper\_disable** boolean | **Choices:*** no * yes | Disable router's helper support level | | | | | **max\_interval** integer | | Maximum route lifetime following restart | | | | | **min\_interval** integer | | Minimum interval between Graceful Restarts | | | | | **set** boolean | **Choices:*** no * yes | Set graceful restart | | | | **hello\_interval** integer | | Specify Time between HELLO packets | | | | **ignore\_mospf\_type6\_lsa** boolean | **Choices:*** no * yes | Ignore MOSPF Type 6 LSA | | | | **instance\_id** integer | | Specify instance ID | | | | **log\_adjacency\_changes** dictionary | | Log adjacency state changes | | | | | **detail** boolean | **Choices:*** no * yes | Log all state changes | | | | | **disable** boolean | **Choices:*** no * yes | Disable log adjacency changes | | | | | **set** boolean | **Choices:*** no * yes | Set log adjacency | | | | **maximum** dictionary | | Set OSPFv3 limits | | | | | **interfaces** integer | | Specify limit for number of interfaces | | | | | **paths** integer | | Specify limit for number of paths | | | | | **redistributed\_prefixes** integer | | Specify limit for number of redistributed prefixes | | | | **mpls\_ldp\_sync** boolean | **Choices:*** no * yes | Enable/Disable MPLS LDP Sync | | | | **mtu\_ignore** boolean | **Choices:*** no * yes | Enable/Disable ignoring of MTU in DBD packets | | | | **network** string | **Choices:*** broadcast * non-broadcast * point-to-multipoint * point-to-point | Specify Network type | | | | **nsr** boolean | **Choices:*** no * yes | Enable/Disable NSR for all VRFs in this process | | | | **packet\_size** integer | | Specify limit size of OSPFv3 packets | | | | **passive** boolean | **Choices:*** no * yes | Enable/Disable routing updates on an interface | | | | **prefix\_suppression** boolean | **Choices:*** no * yes | Hide all transit addresses on this interface | | | | **priority** integer | | Specify Router priority | | | | **process\_id** string / required | | The OSPFv3 Process ID | | | | **protocol\_shutdown** boolean | **Choices:*** no * yes | Gracefully shutdown the OSPFv3 protocol | | | | **redistribute** dictionary | | Redistribute information from another routing Protocol | | | | | **application** list / elements=dictionary | | Specify application routes | | | | | | **id** string / required | | OnePK Application name | | | | | | **metric** integer | | Specify metric for redistributed routes | | | | | | **metric\_type** integer | | Specify OSPFv3 exterior metric type for redistributed routes | | | | | | **route\_policy** string | | Apply route policy to redistribution | | | | | | **set** boolean | **Choices:*** no * yes | Set application route | | | | | | **tag** integer | | Set tag for routes redistributed into OSPFv3 | | | | | **bgp** list / elements=dictionary | | Specify bgp routes | | | | | | **id** integer / required | | BGP process name | | | | | | **metric** integer | | Specify metric for redistributed routes | | | | | | **metric\_type** integer | | Specify OSPFv3 exterior metric type for redistributed routes | | | | | | **preserved\_med** string | | Specify preserve med of BGP routes | | | | | | **route\_policy** string | | Apply route policy to redistribution | | | | | | **set** boolean | **Choices:*** no * yes | Set bgp route number | | | | | | **tag** integer | | Set tag for routes redistributed into OSPFv3 | | | | | **connected** dictionary | | Specify connected routes | | | | | | **metric** integer | | Specify metric for redistributed routes | | | | | | **metric\_type** integer | | Specify OSPFv3 exterior metric type for redistributed routes | | | | | | **route\_policy** string | | Apply route policy to redistribution | | | | | | **set** boolean | **Choices:*** no * yes | Set connected route | | | | | | **tag** integer | | Set tag for routes redistributed into OSPFv3 | | | | | **eigrp** list / elements=dictionary | | Specify eigrp routes | | | | | | **id** integer / required | | EIGRP process name | | | | | | **match** string | **Choices:*** external * internal | Redistribution of EIGRP routes | | | | | | **metric** integer | | Specify metric for redistributed routes | | | | | | **metric\_type** integer | | Specify OSPFv3 exterior metric type for redistributed routes | | | | | | **route\_policy** string | | Apply route policy to redistribution | | | | | | **set** boolean | **Choices:*** no * yes | Set bgp route number | | | | | | **tag** integer | | Set tag for routes redistributed into OSPFv3 | | | | | **isis** list / elements=dictionary | | Specify IS-IS routes | | | | | | **id** string / required | | IS-IS name | | | | | | **level** string | **Choices:*** level-1 * level-1-2 * level-2 | Specify IS-IS level routes | | | | | | **metric** integer | | Specify metric for redistributed routes | | | | | | **metric\_type** integer | | Specify OSPFv3 exterior metric type for redistributed routes | | | | | | **route\_policy** string | | Apply route policy to redistribution | | | | | | **set** boolean | **Choices:*** no * yes | Set IS-IS route number | | | | | | **tag** integer | | Set tag for routes redistributed into OSPFv3 | | | | | **mobile** dictionary | | Specify mobile routes | | | | | | **metric** integer | | Specify metric for redistributed routes | | | | | | **metric\_type** integer | | Specify OSPFv3 exterior metric type for redistributed routes | | | | | | **route\_policy** string | | Apply route policy to redistribution | | | | | | **set** boolean | **Choices:*** no * yes | Set mobile route number | | | | | | **tag** integer | | Set tag for routes redistributed into OSPFv3 | | | | | **ospfv3** list / elements=dictionary | | Specify ospfv3 routes | | | | | | **id** string / required | | OSPFv3 process name | | | | | | **match** dictionary | | Redistribution of OSPFv3 routes | | | | | | | **external** integer | **Choices:*** 1 * 2 | Redistribute OSPFv3 external routes | | | | | | | **internal** boolean | **Choices:*** no * yes | Redistribute OSPFv3 internal routes | | | | | | | **nssa\_external** integer | **Choices:*** 1 * 2 | Redistribute NSSA OSPFv3 external routes | | | | | | **metric** integer | | Specify metric for redistributed routes | | | | | | **metric\_type** integer | | Specify OSPFv3 exterior metric type for redistributed routes | | | | | | **route\_policy** string | | Apply route policy to redistribution | | | | | | **set** boolean | **Choices:*** no * yes | Set ospfv3 route number | | | | | | **tag** integer | | Set tag for routes redistributed into OSPFv3 | | | | | **static** dictionary | | Specify static routes | | | | | | **metric** integer | | Specify metric for redistributed routes | | | | | | **metric\_type** integer | | Specify OSPFv3 exterior metric type for redistributed routes | | | | | | **route\_policy** string | | Apply route policy to redistribution | | | | | | **set** boolean | **Choices:*** no * yes | Set static route | | | | | | **tag** integer | | Set tag for routes redistributed into OSPFv3 | | | | | **subscriber** dictionary | | Specify subscriber routes | | | | | | **metric** integer | | Specify metric for redistributed routes | | | | | | **metric\_type** integer | | Specify OSPFv3 exterior metric type for redistributed routes | | | | | | **route\_policy** string | | Apply route policy to redistribution | | | | | | **set** boolean | **Choices:*** no * yes | Set static route | | | | | | **tag** integer | | Set tag for routes redistributed into OSPFv3 | | | | **retransmit\_interval** integer | | Delay between LSA retransmissions | | | | **router\_id** string | | ospfv3 router-id in IPv4 address format (A.B.C.D) | | | | **spf\_prefix\_priority** dictionary | | Specify SPF configuration | | | | | **disable** boolean | **Choices:*** no * yes | Disable SPF prefix priority | | | | | **route\_policy** list / elements=dictionary | | Specify the route-policy to prioritize route install | | | | | | **name** string | | Specify name of the policy | | | | | | **value** string | | Specify parameter values for the policy () | | | | **stub\_router** dictionary | | Enter stub router configuration submode | | | | | **router\_lsa** dictionary | | Modify self originated router LSAs | | | | | | **advertise\_with** string | **Choices:*** max-metric * r-bit * v6-bit | Advertise LSAs with specified type | | | | | | **always** boolean | **Choices:*** no * yes | Force ospfv3 stub router mode unconditionally | | | | | | **external\_lsa** dictionary | | Override External LSA metric in stub router mode | | | | | | | **metric** integer | | Metric to use while in stub router mode | | | | | | | **set** boolean | **Choices:*** no * yes | Set external lsa | | | | | | **include\_stub** boolean | **Choices:*** no * yes | Set maximum metric for stub links in stub router mode | | | | | | **on\_proc\_migration** integer | | Enter stub router mode on ospfv3 process migration | | | | | | **on\_proc\_restart** integer | | Enter stub router mode on ospfv3 process restart | | | | | | **on\_startup** dictionary | | Enter stub router mode on startup | | | | | | | **time** integer | | Time in seconds to stay in stub router mode | | | | | | | **wait\_for\_bgp** boolean | **Choices:*** no * yes | Exit stub router mode when BGP converges | | | | | | **on\_switchover** integer | | Enter stub router mode on RP switchover | | | | | | **summary\_lsa** dictionary | | Override Summary LSA metric in stub router mode | | | | | | | **metric** integer | | Metric to use while in stub router mode | | | | | | | **set** boolean | **Choices:*** no * yes | Enable summary LSA | | | | **summary\_prefix** list / elements=dictionary | | Configure IP address summaries | | | | | **not\_advertise** boolean | **Choices:*** no * yes | Suppress routes that match the specified prefix/mask pair | | | | | **prefix** string / required | | IP summary address/mask (A.B.C.D/prefix) | | | | | **tag** integer | | Set tag | | | | **timers** dictionary | | Adjust routing timers | | | | | **lsa\_arrival** integer | | Specify LSA arrival timers | | | | | **pacing** dictionary | | Specify pacing timers | | | | | | **flood** integer | | Flood pacing timer | | | | | | **lsa\_group** integer | | LSA group pacing timer | | | | | | **retransmission** integer | | LSA group pacing timer | | | | | **throttle** dictionary | | Adjust throttle timers | | | | | | **lsa** dictionary | | Specify LSA throttle timers | | | | | | | **all\_lsa\_initial** integer | | Delay to generate first occurrence of LSA in milliseconds | | | | | | | **all\_lsa\_minimum** integer | | Minimum delay between originating the same LSA in milliseconds | | | | | | **spf** dictionary | | Specify SPF throttle timers | | | | | | | **spf\_initial** integer | | Delay to generate first occurrence of SPF in ms | | | | | | | **spf\_minimum** integer | | Minimum delay between originating the same SPF in ms | | | | **trace** dictionary | | Specify OSPF tracing options | | | | | **size** string | | Delete existing buffer and create one with N entries | | | | | **value** integer | | Specify trace entry | | | | **transmit\_delay** integer | | Estimated time needed to send link-state update packet | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the IOS-XR device by executing the command **show running-config router ospfv3**. 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 * gathered * rendered * parsed | The state the configuration should be left in | Notes ----- Note * This module works with connection `network_cli`. See [the IOS-XR Platform Options](../network/user_guide/platform_iosxr) Examples -------- ``` # Using merged # Before state: # ------------- # # RP/0/RP0/CPU0:anton#show running-config router ospfv3 # Thu Jun 11 15:54:44.569 UTC # % No such configuration item(s) # - name: Merge provided OSPFv3 configuration with the existing configuration cisco.iosxr.iosxr_ospfv3: config: processes: - process_id: 27 areas: - area_id: 10 hello_interval: 2 - process_id: 26 authentication: disable: true - process_id: 10 areas: - area_id: 11 default_cost: 5 cost: 11 - area_id: 22 default_cost: 6 - process_id: 30 areas: - area_id: 11 default_cost: 5 - area_id: 22 default_cost: 6 cost: 2 default_metric: 10 transmit_delay: 2 hello_interval: 1 dead_interval: 2 retransmit_interval: 2 packet_size: 577 priority: 1 router_id: '2.2.2.2' demand_circuit: true mtu_ignore: true state: merged # # # ------------------------ # Module Execution Result # ------------------------ # # "before": {} # # "commands": [ # "router ospfv3 10", # "area 11 default-cost 5", # "area 11 cost 11", # "area 22 default-cost 6", # "router ospfv3 26", # "authentication disable", # "router ospfv3 27", # "area 10 hello-interval 2", # "router ospfv3 30", # "cost 2", # "priority 1", # "default-metric 10", # "router-id 2.2.2.2", # "demand-circuit", # "packet-size 577", # "transmit-delay 2", # "dead-interval 2", # "hello-interval 1", # "retransmit-interval 2", # "mtu-ignore", # "area 11 default-cost 5", # "area 22 default-cost 6" # ] # # "after": { # "processes": [ # { # "areas": [ # { # "area_id": "11", # "cost": 11, # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "process_id": "10" # }, # { # "authentication": { # "disable": true # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "hello_interval": 2 # } # ], # "process_id": "27" # }, # { # "areas": [ # { # "area_id": "11", # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "cost": 2, # "dead_interval": 2, # "default_metric": 10, # "demand_circuit": true, # "hello_interval": 1, # "mtu_ignore": true, # "packet_size": 577, # "priority": 1, # "process_id": "30", # "retransmit_interval": 2, # "router_id": "2.2.2.2", # "transmit_delay": 2 # } # ] # } # # # ------------ # After state # ------------ # # RP/0/RP0/CPU0:anton#show running-config router ospfv3 # router ospfv3 10 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospfv3 26 # authentication disable # ! # router ospfv3 27 # area 10 # hello-interval 2 # ! # area 20 # ! # area 30 # ! # ! # router ospfv3 30 # cost 2 # priority 1 # mtu-ignore # packet-size 577 # dead-interval 2 # retransmit-interval 2 # demand-circuit # hello-interval 1 # transmit-delay 2 # router-id 2.2.2.2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # router ospfv3 10 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospfv3 26 # authentication disable # ! # router ospfv3 27 # area 10 # hello-interval 2 # ! # area 20 # ! # area 30 # ! # ! # router ospfv3 30 # cost 2 # priority 1 # mtu-ignore # packet-size 577 # dead-interval 2 # retransmit-interval 2 # demand-circuit # hello-interval 1 # transmit-delay 2 # router-id 2.2.2.2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # Using replaced # # ------------ # Before state # ------------ # # # RP/0/RP0/CPU0:anton#show running-config router ospf # router ospfv3 10 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospfv3 26 # authentication disable # ! # router ospfv3 27 # area 10 # hello-interval 2 # ! # area 20 # ! # area 30 # ! # ! # router ospfv3 30 # cost 2 # priority 1 # mtu-ignore # packet-size 577 # dead-interval 2 # retransmit-interval 2 # demand-circuit # hello-interval 1 # transmit-delay 2 # router-id 2.2.2.2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # router ospfv3 10 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospfv3 26 # authentication disable # ! # router ospfv3 27 # area 10 # hello-interval 2 # ! # area 20 # ! # area 30 # ! # ! # router ospfv3 30 # cost 2 # priority 1 # mtu-ignore # packet-size 577 # dead-interval 2 # retransmit-interval 2 # demand-circuit # hello-interval 1 # transmit-delay 2 # router-id 2.2.2.2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! - name: Replace OSPFv3 routes configurations from the device cisco.iosxr.iosxr_ospfv3: config: processes: - process_id: 27 areas: - area_id: 10 hello_interval: 2 - area_id: 20 cost: 2 default_cost: 2 - process_id: 26 authentication: disable: true state: replaced # # # ------------------------ # Module Execution Result # ------------------------ # # "before": { # "processes": [ # { # "areas": [ # { # "area_id": "11", # "cost": 11, # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "process_id": "10" # }, # { # "authentication": { # "disable": true # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "hello_interval": 2 # } # ], # "process_id": "27" # }, # { # "areas": [ # { # "area_id": "11", # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "cost": 2, # "dead_interval": 2, # "default_metric": 10, # "demand_circuit": true, # "hello_interval": 1, # "mtu_ignore": true, # "packet_size": 577, # "priority": 1, # "process_id": "30", # "retransmit_interval": 2, # "router_id": "2.2.2.2", # "transmit_delay": 2 # } # ] # } # # "commands": [ # "router ospfv3 27", # "area 20 default-cost 2", # "area 20 cost 2" # ] # # "after": { # "processes": [ # { # "areas": [ # { # "area_id": "11", # "cost": 11, # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "process_id": "10" # }, # { # "authentication": { # "disable": true # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "hello_interval": 2 # }, # { # "area_id": "20", # "cost": 2, # "default_cost": 2 # } # ], # "process_id": "27" # }, # { # "areas": [ # { # "area_id": "11", # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "cost": 2, # "dead_interval": 2, # "default_metric": 10, # "demand_circuit": true, # "hello_interval": 1, # "mtu_ignore": true, # "packet_size": 577, # "priority": 1, # "process_id": "30", # "retransmit_interval": 2, # "router_id": "2.2.2.2", # "transmit_delay": 2 # } # ] # } # # # ----------- # After state # ----------- # # RP/0/RP0/CPU0:anton(config)#do show running-config router ospfv3 # router ospfv3 10 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospfv3 26 # authentication disable # ! # router ospfv3 27 # area 10 # hello-interval 2 # ! # area 20 # cost 2 # default-cost 2 # ! # area 30 # ! # ! # router ospfv3 30 # cost 2 # priority 1 # mtu-ignore # packet-size 577 # dead-interval 2 # retransmit-interval 2 # demand-circuit # hello-interval 1 # transmit-delay 2 # router-id 2.2.2.2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! - name: Override existing OSPFv3 configurations from the device cisco.iosxr.iosxr_ospfv3: config: processes: - process_id: 27 areas: - area_id: 10 hello_interval: 2 authentication: disable: true - area_id: 20 cost: 2 default_cost: 2 authentication: disable: true - process_id: 26 areas: - area_id: 10 hello_interval: 2 authentication: disable: true state: overridden # # # ------------------------ # Module Execution Result # ------------------------ # # "before": { # "processes": [ # { # "areas": [ # { # "area_id": "11", # "cost": 11, # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "process_id": "10" # }, # { # "authentication": { # "disable": true # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "hello_interval": 2 # }, # { # "area_id": "20", # "cost": 2, # "default_cost": 2 # } # ], # "process_id": "27" # }, # { # "areas": [ # { # "area_id": "11", # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "cost": 2, # "dead_interval": 2, # "default_metric": 10, # "demand_circuit": true, # "hello_interval": 1, # "mtu_ignore": true, # "packet_size": 577, # "priority": 1, # "process_id": "30", # "retransmit_interval": 2, # "router_id": "2.2.2.2", # "transmit_delay": 2 # } # ] # } # # "commands": [ # "router ospfv3 10", # "no area 11 default-cost 5", # "no area 11 cost 11", # "no area 22 default-cost 6", # "router ospfv3 30", # "no cost 2", # "no priority 1", # "no default-metric 10", # "no router-id 2.2.2.2", # "no demand-circuit", # "no packet-size 577", # "no transmit-delay 2", # "no dead-interval 2", # "no hello-interval 1", # "no retransmit-interval 2", # "no mtu-ignore", # "no area 11 default-cost 5", # "no area 22 default-cost 6", # "router ospfv3 26", # "area 10 hello-interval 4" # ] # # "after": { # "processes": [ # { # "process_id": "10" # }, # { # "areas": [ # { # "area_id": "10", # "hello_interval": 4 # } # ], # "authentication": { # "disable": true # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "hello_interval": 2 # }, # { # "area_id": "20", # "cost": 2, # "default_cost": 2 # } # ], # "process_id": "27" # }, # { # "process_id": "30" # } # ] # } # # # ----------- # After state # ----------- # # RP/0/RP0/CPU0:anton#show running-config router ospfv3 # router ospfv3 10 # area 11 # ! # area 22 # ! # ! # router ospfv3 26 # authentication disable # area 10 # hello-interval 4 # ! # ! # router ospfv3 27 # area 10 # hello-interval 2 # ! # area 20 # cost 2 # default-cost 2 # ! # area 30 # ! # ! # router ospfv3 30 # area 11 # ! # area 22 # ! # ! # Using deleted # # ------------ # Before state # ------------ # # # RP/0/RP0/CPU0:anton#show running-config router ospfv3 # router ospfv3 10 # area 11 # ! # area 22 # ! # ! # router ospfv3 26 # authentication disable # area 10 # hello-interval 4 # ! # ! # router ospfv3 27 # area 10 # hello-interval 2 # ! # area 20 # cost 2 # default-cost 2 # ! # area 30 # ! # ! # router ospfv3 30 # area 11 # ! # area 22 # ! # ! - name: Deleted existing OSPFv3 configurations from the device cisco.iosxr.iosxr_ospfv3: config: processes: - process_id: '10' - process_id: '26' - process_id: '27' - process_id: '30' state: deleted # # # ------------------------ # Module Execution Result # ------------------------ # # "before": { # "processes": [ # { # "process_id": "10" # }, # { # "areas": [ # { # "area_id": "10", # "hello_interval": 4 # } # ], # "authentication": { # "disable": true # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "hello_interval": 2 # }, # { # "area_id": "20", # "cost": 2, # "default_cost": 2 # } # ], # "process_id": "27" # }, # { # "process_id": "30" # } # ] # }, # # "commands": [ # "router ospfv3 26", # "no authentication disable", # "no area 10 hello-interval 4", # "router ospfv3 27", # "no area 10 hello-interval 2", # "no area 20 default-cost 2", # "no area 20 cost 2" # ] # # "after": { # "processes": [ # { # "process_id": "10" # }, # { # "process_id": "26" # }, # { # "process_id": "27" # }, # { # "process_id": "30" # } # ] # } # # # ----------- # After state # ----------- # # RP/0/RP0/CPU0:anton(config)#show running-config router ospfv3 # router ospfv3 10 # ! # router ospfv3 26 # ! # router ospfv3 27 # ! # router ospfv3 30 # ! # Using parsed # parsed.cfg # ------------ # router ospfv3 10 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospfv3 26 # authentication disable # ! # router ospfv3 27 # area 10 # hello-interval 2 # ! # ! # router ospfv3 30 # router-id 2.2.2.2 # cost 2 # packet-size 577 # priority 1 # mtu-ignore # dead-interval 2 # retransmit-interval 2 # demand-circuit # hello-interval 1 # transmit-delay 2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! - name: Parsed the device configuration to get output commands cisco.iosxr.iosxr_ospfv3: running_config: "{{ lookup('file', './parsed.cfg') }}" state: parsed # # # ------------------------- # Module Execution Result # ------------------------- # # # "parsed": { # "processes": [ # { # "areas": [ # { # "area_id": "11", # "cost": 11, # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "process_id": "10" # }, # { # "authentication": { # "disable": true # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "hello_interval": 2 # } # ], # "process_id": "27" # }, # { # "areas": [ # { # "area_id": "11", # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "cost": 2, # "dead_interval": 2, # "default_metric": 10, # "demand_circuit": true, # "hello_interval": 1, # "mtu_ignore": true, # "packet_size": 577, # "priority": 1, # "process_id": "30", # "retransmit_interval": 2, # "router_id": "2.2.2.2", # "transmit_delay": 2 # } # ] # } # # Using rendered # # - name: Render the commands for provided configuration cisco.iosxr.iosxr_ospfv3: config: processes: - process_id: 27 areas: - area_id: 10 hello_interval: 2 - process_id: 26 authentication: disable: true - process_id: 10 areas: - area_id: 11 default_cost: 5 cost: 11 - area_id: 22 default_cost: 6 - process_id: 30 areas: - area_id: 11 default_cost: 5 - area_id: 22 default_cost: 6 cost: 2 default_metric: 10 transmit_delay: 2 hello_interval: 1 dead_interval: 2 retransmit_interval: 2 packet_size: 577 priority: 1 router_id: '2.2.2.2' demand_circuit: true mtu_ignore: true state: rendered # # # ------------------------- # Module Execution Result # ------------------------- # # # "rendered": [ # "router ospfv3 27", # "area 10 hello-interval 2", # "router ospfv3 26", # "authentication disable", # "router ospfv3 10", # "area 11 default-cost 5", # "area 11 cost 11", # "area 22 default-cost 6", # "router ospfv3 30", # "cost 2", # "priority 1", # "default-metric 10", # "router-id 2.2.2.2", # "demand-circuit", # "packet-size 577", # "transmit-delay 2", # "dead-interval 2", # "hello-interval 1", # "retransmit-interval 2", # "mtu-ignore", # "area 11 default-cost 5", # "area 22 default-cost 6" # ] # Using gathered # # Before state: # ------------- # # RP/0/RP0/CPU0:anton#show running-config router ospf # router ospfv3 10 # area 11 # cost 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! # router ospfv3 26 # authentication disable # area 10 # ! # ! # router ospfv3 27 # area 10 # hello-interval 2 # ! # area 20 # ! # area 30 # ! # ! # router ospfv3 30 # cost 2 # priority 1 # mtu-ignore # packet-size 577 # dead-interval 2 # retransmit-interval 2 # demand-circuit # hello-interval 1 # transmit-delay 2 # router-id 2.2.2.2 # default-metric 10 # area 11 # default-cost 5 # ! # area 22 # default-cost 6 # ! # ! - name: Gather ospfv3 routes configuration cisco.iosxr.iosxr_ospfv3: state: gathered # # # ------------------------- # Module Execution Result # ------------------------- # # "gathered": { # "processes": [ # { # "areas": [ # { # "area_id": "11", # "cost": 11, # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "process_id": "10" # }, # { # "authentication": { # "disable": true # }, # "process_id": "26" # }, # { # "areas": [ # { # "area_id": "10", # "hello_interval": 2 # } # ], # "process_id": "27" # }, # { # "areas": [ # { # "area_id": "11", # "default_cost": 5 # }, # { # "area_id": "22", # "default_cost": 6 # } # ], # "cost": 2, # "dead_interval": 2, # "default_metric": 10, # "demand_circuit": true, # "hello_interval": 1, # "mtu_ignore": true, # "packet_size": 577, # "priority": 1, # "process_id": "30", # "retransmit_interval": 2, # "router_id": "2.2.2.2", # "transmit_delay": 2 # } # ] # } # ``` ### Authors * Rohit Thakur (@rohitthakur2590)
programming_docs
ansible cisco.nxos.nxos_igmp_interface – Manages IGMP interface configuration. cisco.nxos.nxos\_igmp\_interface – Manages IGMP interface configuration. ======================================================================== 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_igmp_interface`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages IGMP interface configuration settings. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **group\_timeout** string | | Sets the group membership timeout for IGMPv2. Values can range from 3 to 65,535 seconds or keyword 'default'. The default is 260 seconds. | | **immediate\_leave** boolean | **Choices:*** no * yes | Enables the device to remove the group entry from the multicast routing table immediately upon receiving a leave message for the group. Use this command to minimize the leave latency of IGMPv2 group memberships on a given IGMP interface because the device does not send group-specific queries. The default is disabled. | | **interface** string / required | | The full interface name for IGMP configuration. e.g. *Ethernet1/2*. | | **last\_member\_qrt** string | | Sets the query interval waited after sending membership reports before the software deletes the group state. Values can range from 1 to 25 seconds or keyword 'default'. The default is 1 second. | | **last\_member\_query\_count** string | | Sets the number of times that the software sends an IGMP query in response to a host leave message. Values can range from 1 to 5 or keyword 'default'. The default is 2. | | **oif\_ps** raw | | Configure prefixes and sources for static outgoing interface (OIF). This is a list of dict where each dict has source and prefix defined or just prefix if source is not needed. The specified values will be configured on the device and if any previous prefix/sources exist, they will be removed. Keyword 'default' is also accepted which removes all existing prefix/sources. | | **oif\_routemap** string | | Configure a routemap for static outgoing interface (OIF) or keyword 'default'. | | **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. | | **querier\_timeout** string | | Sets the querier timeout that the software uses when deciding to take over as the querier. Values can range from 1 to 65535 seconds or keyword 'default'. The default is 255 seconds. | | **query\_interval** string | | Sets the frequency at which the software sends IGMP host query messages. Values can range from 1 to 18000 seconds or keyword 'default'. The default is 125 seconds. | | **query\_mrt** string | | Sets the response time advertised in IGMP queries. Values can range from 1 to 25 seconds or keyword 'default'. The default is 10 seconds. | | **report\_llg** boolean | **Choices:*** no * yes | Configures report-link-local-groups. Enables sending reports for groups in 224.0.0.0/24. Reports are always sent for nonlink local groups. By default, reports are not sent for link local groups. | | **restart** boolean | **Choices:*** **no** ← * yes | Restart IGMP. This is NOT idempotent as this is action only. | | **robustness** string | | Sets the robustness variable. Values can range from 1 to 7 or keyword 'default'. The default is 2. | | **startup\_query\_count** string | | Query count used when the IGMP process starts up. The range is from 1 to 10 or keyword 'default'. The default is 2. | | **startup\_query\_interval** string | | Query interval used when the IGMP process starts up. The range is from 1 to 18000 or keyword 'default'. The default is 31. | | **state** string | **Choices:*** **present** ← * absent * default | Manages desired state of the resource. | | **version** string | **Choices:*** 2 * 3 * default | IGMP version. It can be 2 or 3 or keyword 'default'. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * When `state=default`, supported params will be reset to a default state. These include `version`, `startup_query_interval`, `startup_query_count`, `robustness`, `querier_timeout`, `query_mrt`, `query_interval`, `last_member_qrt`, `last_member_query_count`, `group_timeout`, `report_llg`, and `immediate_leave`. * When `state=absent`, all configs for `oif_ps`, and `oif_routemap` will be removed. * PIM must be enabled to use this module. * This module is for Layer 3 interfaces. * Route-map check not performed (same as CLI) check when configuring route-map with β€˜static-oif’ * If restart is set to true with other params set, the restart will happen last, i.e. after the configuration takes place. However, β€˜restart’ itself is not idempotent as it is an action and not configuration. * 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 -------- ``` - cisco.nxos.nxos_igmp_interface: interface: ethernet1/32 startup_query_interval: 30 oif_ps: - {prefix: 238.2.2.6} - {source: 192.168.0.1, prefix: 238.2.2.5} 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 | | --- | --- | --- | | **changed** boolean | always | check to see if a change was made on the device **Sample:** True | | **end\_state** dictionary | always | k/v pairs of igmp interface configuration after module execution **Sample:** {'oif\_ps': [{'prefix': '238.2.2.6'}, {'prefix': '238.2.2.5', 'source': '192.168.0.1'}], 'startup\_query\_count': '30'} | | **existing** dictionary | always | k/v pairs of existing igmp\_interface configuration **Sample:** {'oif\_ps': [], 'startup\_query\_count': '2'} | | **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'oif\_ps': [{'prefix': '238.2.2.6'}, {'prefix': '238.2.2.5', 'source': '192.168.0.1'}], 'startup\_query\_count': '30'} | | **updates** list / elements=string | always | commands sent to the device **Sample:** ['interface Ethernet1/32', 'ip igmp startup-query-count 30', 'ip igmp static-oif 238.2.2.6', 'ip igmp static-oif 238.2.2.5 source 192.168.0.1'] | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_lacp_interfaces – LACP interfaces resource module cisco.nxos.nxos\_lacp\_interfaces – LACP interfaces resource module =================================================================== 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_lacp_interfaces`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages Link Aggregation Control Protocol (LACP) attributes of NX-OS Interfaces. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A dictionary of LACP interfaces options. | | | **convergence** dictionary | | This dict contains configurable options related to convergence. Applicable only for Port-channel. | | | | **graceful** boolean | **Choices:*** no * yes | port-channel lacp graceful convergence. Disable this only with lacp ports connected to Non-Nexus peer. Disabling this with Nexus peer can lead to port suspension. | | | | **vpc** boolean | **Choices:*** no * yes | Enable lacp convergence for vPC port channels. | | | **links** dictionary | | This dict contains configurable options related to max and min port-channel links. Applicable only for Port-channel. | | | | **max** integer | | Port-channel max bundle. | | | | **min** integer | | Port-channel min links. | | | **mode** string | **Choices:*** delay | LACP mode. Applicable only for Port-channel. | | | **name** string / required | | Name of the interface. | | | **port\_priority** integer | | LACP port priority for the interface. Range 1-65535. Applicable only for Ethernet. | | | **rate** string | **Choices:*** fast * normal | Rate at which PDUs are sent by LACP. Applicable only for Ethernet. At fast rate LACP is transmitted once every 1 second. At normal rate LACP is transmitted every 30 seconds after the link is bundled. | | | **suspend\_individual** boolean | **Choices:*** no * yes | port-channel lacp state. Disabling this will cause lacp to put the port to individual state and not suspend the port in case it does not get LACP BPDU from the peer ports in the port-channel. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS 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 * gathered * rendered * parsed | The state of the configuration after module completion. | Notes ----- Note * Tested against NXOS 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS Examples -------- ``` # Using merged # Before state: # ------------- # - name: Merge provided configuration with device configuration. cisco.nxos.nxos_lacp_interfaces: config: - name: Ethernet1/3 port_priority: 5 rate: fast state: merged # After state: # ------------ # # interface Ethernet1/3 # lacp port-priority 5 # lacp rate fast # Using replaced # Before state: # ------------- # # interface Ethernet1/3 # lacp port-priority 5 # interface port-channel11 # lacp mode delay - name: Replace device lacp interfaces configuration with the given configuration. cisco.nxos.nxos_lacp_interfaces: config: - name: port-channel11 links: min: 4 state: replaced # After state: # ------------ # # interface Ethernet1/3 # lacp port-priority 5 # interface port-channel11 # lacp min-links 4 # Using overridden # Before state: # ------------- # # interface Ethernet1/3 # lacp port-priority 5 # interface port-channel11 # lacp mode delay - name: Override device configuration of all LACP interfaces attributes of given interfaces on device with provided configuration. cisco.nxos.nxos_lacp_interfaces: config: - name: port-channel11 links: min: 4 state: overridden # After state: # ------------ # # interface port-channel11 # lacp min-links 4 # Using deleted # Before state: # ------------- # # interface Ethernet1/3 # lacp port-priority 5 # interface port-channel11 # lacp mode delay - name: Delete LACP interfaces configurations. cisco.nxos.nxos_lacp_interfaces: state: deleted # After state: # ------------ # # Using rendered - name: Use rendered state to convert task input to device specific commands cisco.nxos.nxos_lacp_interfaces: config: - name: Ethernet1/800 rate: fast - name: Ethernet1/801 rate: fast port_priority: 32 - name: port-channel10 links: max: 15 min: 2 convergence: graceful: true state: rendered # Task Output (redacted) # ----------------------- # rendered: # - "interface Ethernet1/800" # - "lacp rate fast" # - "interface Ethernet1/801" # - "lacp port-priority 32" # - "lacp rate fast" # - "interface port-channel10" # - "lacp min-links 2" # - "lacp max-bundle 15" # - "lacp graceful-convergence" # Using parsed # parsed.cfg # ------------ # interface port-channel10 # lacp min-links 10 # lacp max-bundle 15 # interface Ethernet1/800 # lacp port-priority 100 # lacp rate fast - name: Use parsed state to convert externally supplied config to structured format cisco.nxos.nxos_lacp_interfaces: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # - name: port-channel10 # links: # max: 15 # min: 10 # - name: Ethernet1/800 # port_priority: 100 # rate: fast # Using gathered # Existing device config state # ------------------------------- # interface Ethernet1/1 # lacp port-priority 5 # lacp rate fast # interface port-channel10 # lacp mode delay # interface port-channel11 # lacp max-bundle 10 # lacp min-links 5 - name: Gather lacp_interfaces facts from the device using nxos_lacp_interfaces cisco.nxos.nxos_lacp_interfaces: state: gathered # Task output (redacted) # ----------------------- # gathered: # - name: Ethernet1/1 # port_priority: 5 # rate: fast # - name: port-channel10 # mode: delay # - name: port-channel11 # links: # max: 10 # 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 | | --- | --- | --- | | **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 port-channel10', 'lacp min-links 5', 'lacp mode delay'] | ### Authors * Trishna Guha (@trishnaguha) ansible cisco.nxos.nxos_rollback – Set a checkpoint or rollback to a checkpoint. cisco.nxos.nxos\_rollback – Set a checkpoint or rollback to a checkpoint. ========================================================================= 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_rollback`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module offers the ability to set a configuration checkpoint file or rollback to a configuration checkpoint file on Cisco NXOS switches. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **checkpoint\_file** string | | Name of checkpoint file to create. Mutually exclusive with rollback\_to. | | **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. | | **rollback\_to** string | | Name of checkpoint file to rollback to. Mutually exclusive with checkpoint\_file. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * Sometimes `transport=nxapi` may cause a timeout error. * 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 -------- ``` - cisco.nxos.nxos_rollback: checkpoint_file: backup.cfg username: '{{ un }}' password: '{{ pwd }}' host: '{{ inventory_hostname }}' - cisco.nxos.nxos_rollback: rollback_to: backup.cfg username: '{{ un }}' password: '{{ pwd }}' host: '{{ inventory_hostname }}' ``` 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 | | --- | --- | --- | | **filename** string | success | The filename of the checkpoint/rollback file. **Sample:** backup.cfg | | **status** string | success | Which operation took place and whether it was successful. **Sample:** rollback executed | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele)
programming_docs
ansible cisco.nxos.nxos_static_routes – Static routes resource module cisco.nxos.nxos\_static\_routes – Static routes resource module =============================================================== 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_static_routes`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module configures and manages the attributes of static routes on Cisco NX-OS platforms. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A list of configurations for static routes | | | **address\_families** list / elements=dictionary | | A dictionary specifying the address family to which the static route(s) belong. | | | | **afi** string / required | **Choices:*** ipv4 * ipv6 | Specifies the top level address family indicator. | | | | **routes** list / elements=dictionary | | A dictionary that specifies the static route configurations | | | | | **dest** string / required | | Destination prefix of static route The address format is <ipv4/v6 address>/<mask> The mask is number in range 0-32 for IPv4 and in range 0-128 for IPv6 | | | | | **next\_hops** list / elements=dictionary | | Details of route to be taken | | | | | | **admin\_distance** integer | | Preference or administrative distance of route (range 1-255) | | | | | | **dest\_vrf** string | | VRF of the destination | | | | | | **forward\_router\_address** string | | IP address of the next hop router | | | | | | **interface** string | | Outgoing interface to take. For anything except 'Null0', then next hop IP address should also be configured. | | | | | | **route\_name** string | | Name of the static route | | | | | | **tag** integer | | Route tag value (numeric) | | | | | | **track** integer | | Track value (range 1 - 512). Track must already be configured on the device before adding the route. | | | **vrf** string | | The VRF to which the static route(s) belong | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the following commands in order **show running-config | include '^ip(v6**\* route') and **show running-config | section '^vrf context'**. 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:*** deleted * **merged** ← * overridden * replaced * gathered * rendered * parsed | The state the configuration should be left in | Notes ----- Note * Tested against NX-OS 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * When a route is configured for a non-existent VRF, the VRF is created and the route is added to it. * When deleting routes for a VRF, all routes inside the VRF are deleted, but the VRF is not deleted. Examples -------- ``` # Using deleted: # Before state: # ------------- # # ip route 192.0.2.32/28 192.0.2.12 name new_route # ip route 192.0.2.26/24 192.0.2.13 tag 12 - name: Delete all routes cisco.nxos.nxos_static_routes: state: deleted # After state: # ------------ # # Before state: # ------------ # # ip route 192.0.2.16/28 192.0.2.24 name new_route # ip route 192.0.2.80/28 192.0.2.26 tag 12 # vrf context trial_vrf # ip route 192.0.2.64/28 192.0.2.22 tag 4 # ip route 192.0.2.64/28 192.0.2.23 name merged_route 1 # ipv6 route 2200:10::/36 2048:ae12::1 vrf dest 5 - name: Delete routes based on VRF cisco.nxos.nxos_static_routes: config: - vrf: trial_vrf state: deleted # After state: # ----------- # ip route 192.0.2.16/28 192.0.2.24 name new_route # ip route 192.0.2.80/28 192.0.2.26 tag 12 # vrf context trial_vrf # Before state: # ------------ # # ip route 192.0.2.16/28 192.0.2.24 name new_route # ip route 192.0.2.80/28 192.0.2.26 tag 12 # vrf context trial_vrf # ip route 192.0.2.64/28 192.0.2.22 tag 4 # ip route 192.0.2.64/28 192.0.2.23 name merged_route 1 # ipv6 route 2200:10::/36 2048:ae12::1 vrf dest 5 - name: Delete routes based on AFI in a VRF cisco.nxos.nxos_static_routes: config: - vrf: trial_vrf address_families: - afi: ipv4 state: deleted # After state: # ----------- # ip route 192.0.2.16/28 192.0.2.24 name new_route # ip route 192.0.2.80/28 192.0.2.26 tag 12 # vrf context trial_vrf # ipv6 route 2200:10::/36 2048:ae12::1 vrf dest 5 # Before state: # ----------- # ip route 192.0.2.16/28 192.0.2.24 name new_route # vrf context trial_vrf # ipv6 route 2200:10::/36 2048:ae12::1 vrf dest 5 # Using merged # Before state: # ------------- # - name: Merge new static route configuration cisco.nxos.nxos_static_routes: config: - vrf: trial_vrf address_families: - afi: ipv4 routes: - dest: 192.0.2.64/24 next_hops: - forward_router_address: 192.0.2.22 tag: 4 admin_distance: 2 - address_families: - afi: ipv4 routes: - dest: 192.0.2.16/24 next_hops: - forward_router_address: 192.0.2.24 route_name: new_route - afi: ipv6 routes: - dest: 2001:db8::/64 next_hops: - interface: eth1/3 forward_router_address: 2001:db8::12 state: merged # After state: # ------------ # # ip route 192.0.2.16/24 192.0.2.24 name new_route # ipv6 route 2001:db8::/64 Ethernet1/3 2001:db8::12 # vrf context trial_vrf # ip route 192.0.2.0/24 192.0.2.22 tag 4 2 # Using overridden: # Before state: # ------------- # # ip route 192.0.2.16/28 192.0.2.24 name new_route # ip route 192.0.2.80/28 192.0.2.26 tag 12 # vrf context trial_vrf # ip route 192.0.2.64/28 192.0.2.22 tag 4 # ip route 192.0.2.64/28 192.0.2.23 name merged_route 1 - name: Overriden existing static route configuration with new configuration cisco.nxos.nxos_static_routes: config: - vrf: trial_vrf address_families: - afi: ipv4 routes: - dest: 192.0.2.16/28 next_hops: - forward_router_address: 192.0.2.23 route_name: overridden_route1 admin_distance: 3 - forward_router_address: 192.0.2.45 route_name: overridden_route2 dest_vrf: destinationVRF interface: Ethernet1/2 state: overridden # After state: # ------------ # # ip route 192.0.2.16/28 192.0.2.23 name replaced_route1 3 # ip route 192.0.2.16/28 Ethernet1/2 192.0.2.45 vrf destinationVRF name replaced_route2 # Using replaced: # Before state: # ------------ # ip route 192.0.2.16/28 192.0.2.24 name new_route # ip route 192.0.2.80/28 192.0.2.26 tag 12 # vrf context trial_vrf # ip route 192.0.2.64/28 192.0.2.22 tag 4 # ip route 192.0.2.64/28 192.0.2.23 name merged_route 1 - name: Replaced the existing static configuration of a prefix with new configuration cisco.nxos.nxos_static_routes: config: - address_families: - afi: ipv4 routes: - dest: 192.0.2.16/28 next_hops: - forward_router_address: 192.0.2.23 route_name: replaced_route1 admin_distance: 3 - forward_router_address: 192.0.2.45 route_name: replaced_route2 dest_vrf: destinationVRF interface: Ethernet1/2 state: replaced # After state: # ----------- # ip route 192.0.2.16/28 192.0.2.23 name replaced_route1 3 # ip route 192.0.2.16/28 Ethernet1/2 192.0.2.45 vrf destinationVRF name replaced_route2 # ip route 192.0.2.80/28 192.0.2.26 tag 12 # vrf context trial_vrf # ip route 192.0.2.64/28 192.0.2.22 tag 4 # ip route 192.0.2.64/28 192.0.2.23 name merged_route 1 # Using gathered: # Before state: # ------------- # ipv6 route 2001:db8:12::/32 2001:db8::12 # vrf context Test # ip route 192.0.2.48/28 192.0.2.13 # ip route 192.0.2.48/28 192.0.2.14 5 - name: Gather the exisitng condiguration cisco.nxos.nxos_static_routes: state: gathered # returns: # gathered: # - vrf: Test # address_families: # - afi: ipv4 # routes: # - dest: 192.0.2.48/28 # next_hops: # - forward_router_address: 192.0.2.13 # # - forward_router_address: 192.0.2.14 # admin_distance: 5 # # - address_families: # - afi: ipv6 # routes: # - dest: 2001:db8:12::/32 # next_hops: # - forward_router_address: 2001:db8::12 # Using rendered: - name: Render required configuration to be pushed to the device cisco.nxos.nxos_static_routes: config: - address_families: - afi: ipv4 routes: - dest: 192.0.2.48/28 next_hops: - forward_router_address: 192.0.2.13 - afi: ipv6 routes: - dest: 2001:db8::/64 next_hops: - interface: eth1/3 forward_router_address: 2001:db8::12 state: rendered # returns # rendered: # vrf context default # ip route 192.0.2.48/28 192.0.2.13 # ipv6 route 2001:db8::/64 Ethernet1/3 2001:db8::12 # Using parsed - name: Parse the config to structured data cisco.nxos.nxos_static_routes: running_config: | ipv6 route 2002:db8:12::/32 2002:db8:12::1 vrf context Test ip route 192.0.2.48/28 192.0.2.13 ip route 192.0.2.48/28 192.0.2.14 5 # returns: # parsed: # - vrf: Test # address_families: # - afi: ipv4 # routes: # - dest: 192.0.2.48/28 # next_hops: # - forward_router_address: 192.0.2.13 # # - forward_router_address: 192.0.2.14 # admin_distance: 5 # # - address_families: # - afi: ipv6 # routes: # - dest: 2002:db8:12::/32 # next_hops: # - forward_router_address: 2002:db8:12::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 module: | Key | Returned | Description | | --- | --- | --- | | **after** list / elements=string | when changed | The resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. | | **before** list / elements=string | always | The configuration prior to the model 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:** ['ip route 192.0.2.48/28 192.0.2.12 Ethernet1/2 name sample\_route', 'ipv6 route 2001:db8:3000::/36 2001:db8:200:2::2', 'vrf context test', 'ip route 192.0.2.48/28 192.0.2.121'] | ### Authors * Adharsh Srivats Rangarajan (@adharshsrivatsr) ansible cisco.nxos.nxos_logging_global – Logging resource module. cisco.nxos.nxos\_logging\_global – Logging resource module. =========================================================== 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_logging_global`. New in version 2.5.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages logging configuration on devices running Cisco NX-OS. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | A dictionary of logging configuration. | | | **console** dictionary | | Set console logging parameters. | | | | **severity** string | **Choices:*** emergency * alert * critical * error * warning * notification * informational * debugging | Set severity severity for console. | | | | **state** string | **Choices:*** enabled * disabled | Enable or disable monitor logging. | | | **event** dictionary | | Interface events. | | | | **link\_status** dictionary | | UPDOWN and CHANGE messages. | | | | | **default** boolean | **Choices:*** no * yes | Default logging configuration used by interfaces not explicitly configured. | | | | | **enable** boolean | **Choices:*** no * yes | To enable logging overriding port severity configuration. | | | | **trunk\_status** dictionary | | TRUNK status messages. | | | | | **default** boolean | **Choices:*** no * yes | Default logging configuration used by interfaces not explicitly configured. | | | | | **enable** boolean | **Choices:*** no * yes | To enable logging overriding port severity configuration. | | | **facilities** list / elements=dictionary | | Facility parameter for syslog messages. | | | | **facility** string | | Facility name. | | | | **severity** string | **Choices:*** emergency * alert * critical * error * warning * notification * informational * debugging | Set severity severity for console. | | | **history** dictionary | | Modifies severity severity or size for history table. | | | | **severity** string | **Choices:*** emergency * alert * critical * error * warning * notification * informational * debugging | Set severity severity for console. | | | | **size** integer | | Set history table size. | | | **hosts** list / elements=dictionary | | Enable forwarding to Remote Syslog Servers. | | | | **facility** string | | Facility to use when forwarding to server. | | | | **host** string | | Hostname/IPv4/IPv6 address of the Remote Syslog Server. | | | | **port** integer | | Destination Port when forwarding to remote server. | | | | **secure** dictionary | | Enable secure connection to remote server. | | | | | **trustpoint** dictionary | | Trustpoint configuration. | | | | | | **client\_identity** string | | Client Identity certificate for mutual authentication. Trustpoint to use for client certificate authentication. | | | | **severity** string | **Choices:*** emergency * alert * critical * error * warning * notification * informational * debugging | Set severity severity for console. | | | | **use\_vrf** string | | Display per-VRF information. | | | **ip** dictionary | | IP configuration. | | | | **access\_list** dictionary | | Access-List. | | | | | **cache** dictionary | | Set caching settings. | | | | | | **entries** integer | | Maximum number of log entries cached in software. | | | | | | **interval** integer | | Log-update interval (in sec). | | | | | | **threshold** integer | | Log-update threshold (number of hits) | | | | | **detailed** boolean | **Choices:*** no * yes | Detailed ACL information. | | | | | **include** dictionary | | Include additional fields in syslogs. | | | | | | **sgt** boolean | **Choices:*** no * yes | Include source group tag info in syslogs. | | | **logfile** dictionary | | Set file logging. | | | | **name** string | | Logfile name. | | | | **persistent\_threshold** integer | | Set persistent logging utilization alert threshold in percentage. | | | | **severity** string | **Choices:*** emergency * alert * critical * error * warning * notification * informational * debugging | Set severity severity for console. | | | | **size** integer | | Enter the logfile size in bytes. | | | | **state** string | **Choices:*** enabled * disabled | Enable or disable logfile. | | | **module** dictionary | | Set module(linecard) logging. | | | | **severity** string | **Choices:*** emergency * alert * critical * error * warning * notification * informational * debugging | Set severity severity for console. | | | | **state** string | **Choices:*** enabled * disabled | Enable or disable module logging. | | | **monitor** dictionary | | Set terminal line(monitor) logging severity. | | | | **severity** string | **Choices:*** emergency * alert * critical * error * warning * notification * informational * debugging | Set severity severity for console. | | | | **state** string | **Choices:*** enabled * disabled | Enable or disable monitor logging. | | | **origin\_id** dictionary | | Enable origin information for Remote Syslog Server. | | | | **hostname** boolean | **Choices:*** no * yes | Use hostname as origin-id of logging messages. This option is mutually exclusive with *ip* and *string*. | | | | **ip** string | | Use ip address as origin-id of logging messages. This option is mutually exclusive with *hostname* and *string*. | | | | **string** string | | Use text string as origin-id of logging messages. This option is mutually exclusive with *hostname* and *ip*. | | | **rate\_limit** string | **Choices:*** enabled * disabled | Enable or disable rate limit for log messages. | | | **rfc\_strict** boolean | **Choices:*** no * yes | Set RFC to which messages should compliant. Syslogs will be compliant to RFC 5424. | | | **source\_interface** string | | Enable Source-Interface for Remote Syslog Server. | | | **timestamp** string | **Choices:*** microseconds * milliseconds * seconds | Set logging timestamp granularity. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the command **show running-config | include logging**. 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 the configuration should be left in. The states *replaced* and *overridden* have identical behaviour for this module. Refer to examples for more details. | Notes ----- Note * Tested against NX-OS 9.3.6. * Limited Support for Cisco MDS * This module works with connection `network_cli` and `httpapi`. Examples -------- ``` # Using merged # Before state: # ------------- # nxos-9k-rdo# show running-config | include logging # nxos-9k-rdo# - name: Merge the provided configuration with the existing running configuration cisco.nxos.nxos_logging_global: config: console: severity: error monitor: severity: warning ip: access_list: cache: entries: 16384 interval: 200 threshold: 5000 facilities: - facility: auth severity: critical - facility: ospfv3 severity: alert - facility: ftp severity: informational hosts: - host: 203.0.113.100 severity: alert use_vrf: management - host: 203.0.113.101 severity: error facility: local6 use_vrf: default origin_id: hostname: True # Task output # ------------- # before: {} # # commands: # - "logging console 3" # - "logging monitor 4" # - "logging ip access-list cache entries 16384" # - "logging ip access-list cache interval 200" # - "logging ip access-list cache threshold 5000" # - "logging severity auth 2" # - "logging severity ospfv3 1" # - "logging severity ftp 6" # - "logging server 203.0.113.100 1 use-vrf management" # - "logging server 203.0.113.101 3 facility local6 use-vrf default" # - "logging origin-id hostname" # # after: # console: # severity: error # facilities: # - facility: auth # severity: critical # - facility: ftp # severity: informational # - facility: ospfv3 # severity: alert # ip: # access_list: # cache: # entries: 16384 # interval: 200 # threshold: 5000 # monitor: # severity: warning # origin_id: # hostname: true # hosts: # - severity: alert # host: 203.0.113.100 # use_vrf: management # - facility: local6 # severity: error # host: 203.0.113.101 # use_vrf: default # After state: # ------------ # nxos-9k-rdo# show running-config | include logging # logging console 3 # logging monitor 4 # logging ip access-list cache entries 16384 # logging ip access-list cache interval 200 # logging ip access-list cache threshold 5000 # logging severity auth 2 # logging severity ospfv3 1 # logging severity ftp 6 # logging origin-id hostname # logging server 203.0.113.100 1 use-vrf management # logging server 203.0.113.101 3 use-vrf default facility local6 # Using replaced # Before state: # ------------ # nxos-9k-rdo# show running-config | include logging # logging console 3 # logging monitor 4 # logging ip access-list cache entries 16384 # logging ip access-list cache interval 200 # logging ip access-list cache threshold 5000 # logging severity auth 2 # logging severity ospfv3 1 # logging severity ftp 6 # logging origin-id hostname # logging server 203.0.113.100 1 use-vrf management # logging server 203.0.113.101 3 use-vrf default facility local6 - name: Replace logging configurations with provided config cisco.nxos.nxos_logging_global: config: monitor: severity: warning ip: access_list: cache: entries: 4096 facilities: - facility: auth severity: critical - facility: ospfv3 severity: alert - facility: ftp severity: informational hosts: - host: 203.0.113.101 severity: error facility: local6 use_vrf: default - host: 198.51.100.101 severity: alert port: 6538 use_vrf: management origin_id: ip: 192.0.2.100 state: replaced # Task output # ------------- # before: # console: # severity: error # facilities: # - facility: auth # severity: critical # - facility: ftp # severity: informational # - facility: ospfv3 # severity: alert # ip: # access_list: # cache: # entries: 16384 # interval: 200 # threshold: 5000 # monitor: # severity: warning # origin_id: # hostname: true # hosts: # - severity: alert # host: 203.0.113.100 # use_vrf: management # - facility: local6 # severity: error # host: 203.0.113.101 # use_vrf: default # # commands: # - "logging console" # - "logging ip access-list cache entries 4096" # - "no logging ip access-list cache interval 200" # - "no logging ip access-list cache threshold 5000" # - "no logging origin-id hostname" # - "logging origin-id ip 192.0.2.100" # - "logging server 198.51.100.101 1 port 6538 use-vrf management" # - "no logging server 203.0.113.100 1 use-vrf management" # # after: # facilities: # - facility: auth # severity: critical # - facility: ftp # severity: informational # - facility: ospfv3 # severity: alert # ip: # access_list: # cache: # entries: 4096 # monitor: # severity: warning # origin_id: # ip: 192.0.2.100 # hosts: # - severity: alert # port: 6538 # host: 198.51.100.101 # use_vrf: management # - facility: local6 # severity: error # host: 203.0.113.101 # use_vrf: default # # After state: # ------------ # nxos-9k-rdo# show running-config | include logging # logging monitor 4 # logging ip access-list cache entries 4096 # logging severity auth 2 # logging severity ospfv3 1 # logging severity ftp 6 # logging origin-id ip 192.0.2.100 # logging server 203.0.113.101 3 use-vrf default facility local6 # logging server 198.51.100.101 1 port 6538 use-vrf management # Using deleted to delete all logging configurations # Before state: # ------------ # nxos-9k-rdo# show running-config | include logging # logging console 3 # logging monitor 4 # logging ip access-list cache entries 16384 # logging ip access-list cache interval 200 # logging ip access-list cache threshold 5000 # logging severity auth 2 # logging severity ospfv3 1 # logging severity ftp 6 # logging origin-id hostname # logging server 203.0.113.100 1 use-vrf management # logging server 203.0.113.101 3 use-vrf default facility local6 - name: Delete all logging configuration cisco.nxos.nxos_logging_global: state: deleted # Task output # ------------- # before: # console: # severity: error # facilities: # - facility: auth # severity: critical # - facility: ftp # severity: informational # - facility: ospfv3 # severity: alert # ip: # access_list: # cache: # entries: 16384 # interval: 200 # threshold: 5000 # monitor: # severity: warning # origin_id: # hostname: true # hosts: # - severity: alert # host: 203.0.113.100 # use_vrf: management # - facility: local6 # severity: error # host: 203.0.113.101 # use_vrf: default # # commands: # - "logging console" # - "logging monitor" # - "no logging ip access-list cache entries 16384" # - "no logging ip access-list cache interval 200" # - "no logging ip access-list cache threshold 5000" # - "no logging origin-id hostname" # - "no logging severity auth 2" # - "no logging severity ospfv3 1" # - "no logging severity ftp 6" # - "no logging server 203.0.113.100 1 use-vrf management" # - "no logging server 203.0.113.101 3 facility local6 use-vrf default" # # after: {} # Using rendered - name: Render platform specific configuration lines with state rendered (without connecting to the device) cisco.nxos.nxos_logging_global: config: console: severity: error monitor: severity: warning ip: access_list: cache: entries: 16384 interval: 200 threshold: 5000 facilities: - facility: auth severity: critical - facility: ospfv3 severity: alert - facility: ftp severity: informational hosts: - host: 203.0.113.100 severity: alert use_vrf: management - host: 203.0.113.101 severity: error facility: local6 use_vrf: default origin_id: hostname: True # Task Output (redacted) # ----------------------- # rendered: # - "logging console 3" # - "logging monitor 4" # - "logging ip access-list cache entries 16384" # - "logging ip access-list cache interval 200" # - "logging ip access-list cache threshold 5000" # - "logging severity auth 2" # - "logging severity ospfv3 1" # - "logging severity ftp 6" # - "logging server 203.0.113.100 1 use-vrf management" # - "logging server 203.0.113.101 3 facility local6 use-vrf default" # - "logging origin-id hostname" # Using parsed # parsed.cfg # ------------ # logging console 3 # logging monitor 4 # logging ip access-list cache entries 16384 # logging ip access-list cache interval 200 # logging ip access-list cache threshold 5000 # logging severity auth 2 # logging severity ospfv3 1 # logging severity ftp 6 # logging origin-id hostname # logging server 203.0.113.100 1 use-vrf management # logging server 203.0.113.101 3 use-vrf default facility local6 - name: Parse externally provided logging configuration cisco.nxos.nxos_logging_global: running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # console: # severity: error # facilities: # - facility: auth # severity: critical # - facility: ftp # severity: informational # - facility: ospfv3 # severity: alert # ip: # access_list: # cache: # entries: 16384 # interval: 200 # threshold: 5000 # monitor: # severity: warning # origin_id: # hostname: true # hosts: # - severity: alert # host: 203.0.113.100 # use_vrf: management # - facility: local6 # severity: error # host: 203.0.113.101 # use_vrf: 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 | | --- | --- | --- | | **after** dictionary | when changed | The resulting configuration after module execution. **Sample:** This output will always be in the same format as the module argspec. | | **before** dictionary | when state is *merged*, *replaced*, *overridden*, *deleted* or *purged* | The configuration prior to the module execution. **Sample:** This output will always be in the same format as the module argspec. | | **commands** list / elements=string | when state is *merged*, *replaced*, *overridden*, *deleted* or *purged* | The set of commands pushed to the remote device. **Sample:** ['logging console 3', 'logging monitor 4', 'logging ip access-list cache entries 16384', 'logging ip access-list cache interval 200', 'logging ip access-list cache threshold 5000'] | | **gathered** list / elements=string | when state is *gathered* | Facts about the network resource gathered from the remote device as structured data. **Sample:** This output will always be in the same format as the module argspec. | | **parsed** list / elements=string | when state is *parsed* | The device native config provided in *running\_config* option parsed into structured data as per module argspec. **Sample:** This output will always be in the same format as the module argspec. | | **rendered** list / elements=string | when state is *rendered* | The provided configuration in the task rendered in device-native format (offline). **Sample:** ['logging ip access-list cache entries 4096', 'no logging ip access-list cache interval 200', 'no logging ip access-list cache threshold 5000', 'no logging origin-id hostname', 'logging origin-id ip 192.0.2.100', 'logging server 198.51.100.101 1 port 6538 use-vrf management'] | ### Authors * Nilashish Chakraborty (@NilashishC)
programming_docs
ansible cisco.nxos.nxos_snmp_contact – Manages SNMP contact info. cisco.nxos.nxos\_snmp\_contact – Manages SNMP contact info. =========================================================== 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_snmp_contact`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages SNMP contact information. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **contact** string / required | | Contact information. | | **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. | | **state** string | **Choices:*** **present** ← * absent | Manage the state of the resource. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Limited Support for Cisco MDS * `state=absent` removes the contact configuration if it is configured. * 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 -------- ``` # ensure snmp contact is configured - cisco.nxos.nxos_snmp_contact: contact: Test 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 | commands sent to the device **Sample:** ['snmp-server contact New\_Test'] | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos – Use nxos netconf plugin to run netconf commands on Cisco NX-OS platform. cisco.nxos.nxos – Use nxos netconf plugin to run netconf commands on Cisco NX-OS platform. ========================================================================================== 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`. New in version 2.3.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * This nxos plugin provides low level abstraction apis for sending and receiving netconf commands from Cisco NX-OS network devices. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **ncclient\_device\_handler** string | **Default:**"nexus" | | Specifies the ncclient device handler name for Cisco NX-OS network os. To identify the ncclient device handler name refer ncclient library documentation. | ### Authors * Ansible Networking Team ansible cisco.nxos.nxos_bgp – (deprecated, removed after 2023-01-27) Manages BGP configuration. cisco.nxos.nxos\_bgp – (deprecated, removed after 2023-01-27) Manages BGP configuration. ======================================================================================== 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_bgp`. New in version 1.0.0: of cisco.nxos * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in major release after 2023-01-27 Why Updated module released with more functionality. Alternative nxos\_bgp\_global Synopsis -------- * Manages BGP configurations on NX-OS switches. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **asn** string / required | | BGP autonomous system number. Valid values are String, Integer in ASPLAIN or ASDOT notation. | | **bestpath\_always\_compare\_med** boolean | **Choices:*** no * yes | Enable/Disable MED comparison on paths from different autonomous systems. | | **bestpath\_aspath\_multipath\_relax** boolean | **Choices:*** no * yes | Enable/Disable load sharing across the providers with different (but equal-length) AS paths. | | **bestpath\_compare\_neighborid** boolean | **Choices:*** no * yes | Enable/Disable neighborid. Use this when more paths available than max path config. | | **bestpath\_compare\_routerid** boolean | **Choices:*** no * yes | Enable/Disable comparison of router IDs for identical eBGP paths. | | **bestpath\_cost\_community\_ignore** boolean | **Choices:*** no * yes | Enable/Disable Ignores the cost community for BGP best-path calculations. | | **bestpath\_med\_confed** boolean | **Choices:*** no * yes | Enable/Disable enforcement of bestpath to do a MED comparison only between paths originated within a confederation. | | **bestpath\_med\_missing\_as\_worst** boolean | **Choices:*** no * yes | Enable/Disable assigns the value of infinity to received routes that do not carry the MED attribute, making these routes the least desirable. | | **bestpath\_med\_non\_deterministic** boolean | **Choices:*** no * yes | Enable/Disable deterministic selection of the best MED pat from among the paths from the same autonomous system. | | **cluster\_id** string | | Route Reflector Cluster-ID. | | **confederation\_id** string | | Routing domain confederation AS. | | **confederation\_peers** list / elements=string | | AS confederation parameters. | | **disable\_policy\_batching** boolean | **Choices:*** no * yes | Enable/Disable the batching evaluation of prefix advertisement to all peers. | | **disable\_policy\_batching\_ipv4\_prefix\_list** string | | Enable/Disable the batching evaluation of prefix advertisements to all peers with prefix list. | | **disable\_policy\_batching\_ipv6\_prefix\_list** string | | Enable/Disable the batching evaluation of prefix advertisements to all peers with prefix list. | | **enforce\_first\_as** boolean | **Choices:*** no * yes | Enable/Disable enforces the neighbor autonomous system to be the first AS number listed in the AS path attribute for eBGP. On NX-OS, this property is only supported in the global BGP context. | | **event\_history\_cli** string | **Choices:*** size\_small * size\_medium * size\_large * size\_disable * default * true * false | Enable/Disable cli event history buffer. | | **event\_history\_detail** string | **Choices:*** size\_small * size\_medium * size\_large * size\_disable * default * true * false | Enable/Disable detail event history buffer. | | **event\_history\_events** string | **Choices:*** size\_small * size\_medium * size\_large * size\_disable * default * true * false | Enable/Disable event history buffer. | | **event\_history\_periodic** string | **Choices:*** size\_small * size\_medium * size\_large * size\_disable * default * true * false | Enable/Disable periodic event history buffer. | | **fast\_external\_fallover** boolean | **Choices:*** no * yes | Enable/Disable immediately reset the session if the link to a directly connected BGP peer goes down. Only supported in the global BGP context. | | **flush\_routes** boolean | **Choices:*** no * yes | Enable/Disable flush routes in RIB upon controlled restart. On NX-OS, this property is only supported in the global BGP context. | | **graceful\_restart** boolean | **Choices:*** no * yes | Enable/Disable graceful restart. | | **graceful\_restart\_helper** boolean | **Choices:*** no * yes | Enable/Disable graceful restart helper mode. | | **graceful\_restart\_timers\_restart** string | | Set maximum time for a restart sent to the BGP peer. | | **graceful\_restart\_timers\_stalepath\_time** string | | Set maximum time that BGP keeps the stale routes from the restarting BGP peer. | | **isolate** boolean | **Choices:*** no * yes | Enable/Disable isolate this router from BGP perspective. | | **local\_as** string | | Local AS number to be used within a VRF instance. | | **log\_neighbor\_changes** boolean | **Choices:*** no * yes | Enable/Disable message logging for neighbor up/down event. | | **maxas\_limit** string | | Specify Maximum number of AS numbers allowed in the AS-path attribute. Valid values are between 1 and 512. | | **neighbor\_down\_fib\_accelerate** boolean | **Choices:*** no * yes | Enable/Disable handle BGP neighbor down event, due to various reasons. | | **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. | | **reconnect\_interval** string | | The BGP reconnection interval for dropped sessions. Valid values are between 1 and 60. | | **router\_id** string | | Router Identifier (ID) of the BGP router VRF instance. | | **shutdown** boolean | **Choices:*** no * yes | Administratively shutdown the BGP protocol. | | **state** string | **Choices:*** **present** ← * absent | Determines whether the config should be present or not on the device. | | **suppress\_fib\_pending** boolean | **Choices:*** no * yes | Enable/Disable advertise only routes programmed in hardware to peers. | | **timer\_bestpath\_limit** string | | Specify timeout for the first best path after a restart, in seconds. | | **timer\_bgp\_hold** string | | Set BGP hold timer. | | **timer\_bgp\_keepalive** string | | Set BGP keepalive timer. | | **vrf** string | **Default:**"default" | Name of the VRF. The name 'default' is a valid VRF representing the global BGP. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * `state=absent` removes the whole BGP ASN configuration when `vrf=default` or the whole VRF instance within the BGP process when using a different VRF. * Default when supported restores params default value. * Configuring global params is only permitted if `vrf=default`. * 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: Configure a simple ASN cisco.nxos.nxos_bgp: asn: 65535 vrf: test router_id: 192.0.2.1 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 | commands sent to the device **Sample:** ['router bgp 65535', 'vrf test', 'router-id 192.0.2.1'] | Status ------ * This module will be removed in a major release after 2023-01-27. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_acl_interfaces – ACL interfaces resource module cisco.nxos.nxos\_acl\_interfaces – ACL interfaces resource module ================================================================= 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_acl_interfaces`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add and remove Access Control Lists on interfaces in NX-OS platform Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A list of interfaces to be configured with ACLs | | | **access\_groups** list / elements=dictionary | | List of address family indicators with ACLs to be configured on the interface | | | | **acls** list / elements=dictionary | | List of Access Control Lists for the interface | | | | | **direction** string / required | **Choices:*** in * out | Direction to be applied for the ACL | | | | | **name** string / required | | Name of the ACL to be added/removed | | | | | **port** boolean | **Choices:*** no * yes | Use ACL as port policy. | | | | **afi** string / required | **Choices:*** ipv4 * ipv6 | Address Family Indicator of the ACLs to be configured | | | **name** string / required | | Name of the interface | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS 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:*** deleted * gathered * **merged** ← * overridden * rendered * replaced * parsed | The state the configuration should be left in | Notes ----- Note * Tested against NX-OS 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS Examples -------- ``` # Using merged # Before state: # ------------ # - name: Merge ACL interfaces configuration cisco.nxos.nxos_acl_interfaces: config: - name: Ethernet1/2 access_groups: - afi: ipv6 acls: - name: ACL1v6 direction: in - name: Eth1/5 access_groups: - afi: ipv4 acls: - name: PortACL direction: in port: true - name: ACL1v4 direction: out - afi: ipv6 acls: - name: ACL1v6 direction: in state: merged # After state: # ------------ # interface Ethernet1/2 # ipv6 traffic-filter ACL1v6 in # interface Ethernet1/5 # ip port access-group PortACL in # ip access-group ACL1v4 out # ipv6 traffic-filter ACL1v6 in # Using replaced # Before state: # ------------ # interface Ethernet1/2 # ipv6 traffic-filter ACL1v6 in # interface Ethernet1/5 # ip port access-group PortACL in # ip access-group ACL1v4 out # ipv6 traffic-filter ACL1v6 in - name: Replace interface configuration with given configuration cisco.nxos.nxos_acl_interfaces: config: - name: Eth1/5 access_groups: - afi: ipv4 acls: - name: NewACLv4 direction: out - name: Ethernet1/3 access_groups: - afi: ipv6 acls: - name: NewACLv6 direction: in port: true state: replaced # After state: # ------------ # interface Ethernet1/2 # ipv6 traffic-filter ACL1v6 in # interface Ethernet1/3 # ipv6 port traffic-filter NewACLv6 in # interface Ethernet1/5 # ip access-group NewACLv4 out # Using overridden # Before state: # ------------ # interface Ethernet1/2 # ipv6 traffic-filter ACL1v6 in # interface Ethernet1/5 # ip port access-group PortACL in # ip access-group ACL1v4 out # ipv6 traffic-filter ACL1v6 in - name: Override interface configuration with given configuration cisco.nxos.nxos_acl_interfaces: config: - name: Ethernet1/3 access_groups: - afi: ipv4 acls: - name: ACL1v4 direction: out - name: PortACL port: true direction: in - afi: ipv6 acls: - name: NewACLv6 direction: in port: true state: overridden # After state: # ------------ # interface Ethernet1/3 # ip access-group ACL1v4 out # ip port access-group PortACL in # ipv6 port traffic-filter NewACLv6 in # Using deleted to remove ACL config from specified interfaces # Before state: # ------------- # interface Ethernet1/1 # ip access-group ACL2v4 in # interface Ethernet1/2 # ipv6 traffic-filter ACL1v6 in # interface Ethernet1/5 # ip port access-group PortACL in # ip access-group ACL1v4 out # ipv6 traffic-filter ACL1v6 in - name: Delete ACL configuration on interfaces cisco.nxos.nxos_acl_interfaces: config: - name: Ethernet1/5 - name: Ethernet1/2 state: deleted # After state: # ------------- # interface Ethernet1/1 # ip access-group ACL2v4 in # interface Ethernet1/2 # interface Ethernet1/5 # Using deleted to remove ACL config from all interfaces # Before state: # ------------- # interface Ethernet1/1 # ip access-group ACL2v4 in # interface Ethernet1/2 # ipv6 traffic-filter ACL1v6 in # interface Ethernet1/5 # ip port access-group PortACL in # ip access-group ACL1v4 out # ipv6 traffic-filter ACL1v6 in - name: Delete ACL configuration from all interfaces cisco.nxos.nxos_acl_interfaces: state: deleted # After state: # ------------- # interface Ethernet1/1 # interface Ethernet1/2 # interface Ethernet1/5 # Using parsed - name: Parse given configuration into structured format cisco.nxos.nxos_acl_interfaces: running_config: | interface Ethernet1/2 ipv6 traffic-filter ACL1v6 in interface Ethernet1/5 ipv6 traffic-filter ACL1v6 in ip access-group ACL1v4 out ip port access-group PortACL in state: parsed # returns # parsed: # - name: Ethernet1/2 # access_groups: # - afi: ipv6 # acls: # - name: ACL1v6 # direction: in # - name: Ethernet1/5 # access_groups: # - afi: ipv4 # acls: # - name: PortACL # direction: in # port: True # - name: ACL1v4 # direction: out # - afi: ipv6 # acls: # - name: ACL1v6 # direction: in # Using gathered: # Before state: # ------------ # interface Ethernet1/2 # ipv6 traffic-filter ACL1v6 in # interface Ethernet1/5 # ipv6 traffic-filter ACL1v6 in # ip access-group ACL1v4 out # ip port access-group PortACL in - name: Gather existing configuration from device cisco.nxos.nxos_acl_interfaces: config: state: gathered # returns # gathered: # - name: Ethernet1/2 # access_groups: # - afi: ipv6 # acls: # - name: ACL1v6 # direction: in # - name: Ethernet1/5 # access_groups: # - afi: ipv4 # acls: # - name: PortACL # direction: in # port: True # - name: ACL1v4 # direction: out # - afi: ipv6 # acls: # - name: ACL1v6 # direction: in # Using rendered - name: Render required configuration to be pushed to the device cisco.nxos.nxos_acl_interfaces: config: - name: Ethernet1/2 access_groups: - afi: ipv6 acls: - name: ACL1v6 direction: in - name: Ethernet1/5 access_groups: - afi: ipv4 acls: - name: PortACL direction: in port: true - name: ACL1v4 direction: out - afi: ipv6 acls: - name: ACL1v6 direction: in state: rendered # returns # rendered: # interface Ethernet1/2 # ipv6 traffic-filter ACL1v6 in # interface Ethernet1/5 # ipv6 traffic-filter ACL1v6 in # ip access-group ACL1v4 out # ip port access-group PortACL in ``` 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 resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. | | **before** dictionary | always | The configuration prior to the model 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 Ethernet1/2', 'ipv6 traffic-filter ACL1v6 out', 'ip port access-group PortACL in'] | ### Authors * Adharsh Srivats Rangarajan (@adharshsrivatsr)
programming_docs
ansible cisco.nxos.nxos_system – Manage the system attributes on Cisco NXOS devices cisco.nxos.nxos\_system – Manage the system attributes 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_system`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module provides declarative management of node system attributes on Cisco NXOS 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\_lookup** boolean | **Choices:*** no * yes | Enables or disables the DNS lookup feature in Cisco NXOS. This argument accepts boolean values. When enabled, the system will try to resolve hostnames using DNS and when disabled, hostnames will not be resolved. | | **domain\_name** list / elements=raw | | Configures the default domain name suffix to be used when referencing this node by its FQDN. This argument accepts either a list of domain names or a list of dicts that configure the domain name and VRF name or keyword 'default'. See examples. | | **domain\_search** list / elements=raw | | Configures a list of domain name suffixes to search when performing DNS name resolution. This argument accepts either a list of domain names or a list of dicts that configure the domain name and VRF name or keyword 'default'. See examples. | | **hostname** string | | Configure the device hostname parameter. This option takes an ASCII string value or keyword 'default' | | **name\_servers** list / elements=raw | | List of DNS name servers by IP address to use to perform name resolution lookups. This argument accepts either a list of DNS servers or a list of hashes that configure the name server and VRF name or keyword 'default'. See examples. | | **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. | | **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 | | **system\_mtu** string | | Specifies the mtu, must be an integer or keyword 'default'. | Notes ----- Note * Unsupported 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: configure hostname and domain-name cisco.nxos.nxos_system: hostname: nxos01 domain_name: test.example.com - name: remove configuration cisco.nxos.nxos_system: state: absent - name: configure name servers cisco.nxos.nxos_system: name_servers: - 8.8.8.8 - 8.8.4.4 - name: configure name servers with VRF support cisco.nxos.nxos_system: name_servers: - {server: 8.8.8.8, vrf: mgmt} - {server: 8.8.4.4, vrf: mgmt} ``` 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:** ['hostname nxos01', 'ip domain-name test.example.com'] | ### Authors * Peter Sprygada (@privateip) ansible cisco.nxos.nxos_aaa_server – Manages AAA server global configuration. cisco.nxos.nxos\_aaa\_server – Manages AAA server global configuration. ======================================================================= 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_aaa_server`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages AAA server global configuration Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **deadtime** string | | Duration for which a non-reachable AAA server is skipped, in minutes or keyword 'default. Range is 1-1440. Device default is 0. | | **directed\_request** string | **Choices:*** enabled * disabled * default | Enables direct authentication requests to AAA server or keyword 'default' Device default is disabled. | | **encrypt\_type** string | **Choices:*** 0 * 7 | The state of encryption applied to the entered global key. O clear text, 7 encrypted. Type-6 encryption is not supported. | | **global\_key** string | | Global AAA shared secret or keyword 'default'. | | **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. | | **server\_timeout** string | | Global AAA server timeout period, in seconds or keyword 'default. Range is 1-60. Device default is 5. | | **server\_type** string / required | **Choices:*** radius * tacacs | The server type is either radius or tacacs. | | **state** string | **Choices:*** **present** ← * default | Manage the state of the resource. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Limited Support for Cisco MDS * The server\_type parameter is always required. * If encrypt\_type is not supplied, the global AAA server key will be stored as encrypted (type 7). * Changes to the global AAA server key with encrypt\_type=0 are not idempotent. * state=default will set the supplied parameters to their default values. The parameters that you want to default must also be set to default. If global\_key=default, the global key will be removed. * 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 -------- ``` # Radius Server Basic settings - name: Radius Server Basic settings cisco.nxos.nxos_aaa_server: server_type: radius server_timeout: 9 deadtime: 20 directed_request: enabled # Tacacs Server Basic settings - name: Tacacs Server Basic settings cisco.nxos.nxos_aaa_server: server_type: tacacs server_timeout: 8 deadtime: 19 directed_request: disabled # Setting Global Key - name: AAA Server Global Key cisco.nxos.nxos_aaa_server: server_type: radius global_key: test_key ``` 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 | command sent to the device **Sample:** ['radius-server deadtime 22', 'radius-server timeout 11', 'radius-server directed-request'] | ### Authors * Jason Edelman (@jedelman8) ansible cisco.nxos.nxos_vlan – (deprecated, removed after 2022-06-01) Manages VLAN resources and attributes. cisco.nxos.nxos\_vlan – (deprecated, removed after 2022-06-01) Manages VLAN resources and attributes. ===================================================================================================== 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_vlan`. New in version 1.0.0: of cisco.nxos * [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 nxos\_vlans Synopsis -------- * Manages VLAN configurations on NX-OS switches. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **admin\_state** string | **Choices:*** **up** ← * down | Manage the VLAN administrative state of the VLAN equivalent to shut/no shut in VLAN config mode. | | **aggregate** list / elements=dictionary | | List of VLANs definitions. | | | **admin\_state** string | **Choices:*** up * down | Manage the VLAN administrative state of the VLAN equivalent to shut/no shut in VLAN config mode. | | | **associated\_interfaces** list / elements=string | | This is a intent option and checks the operational state of the for given vlan `name` for associated interfaces. If the value in the `associated_interfaces` does not match with the operational state of vlan interfaces on device it will result in failure. | | | **delay** integer | | 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 | | List of interfaces that should be associated to the VLAN or keyword 'default'. | | | **mapped\_vni** string | | The Virtual Network Identifier (VNI) ID that is mapped to the VLAN. Valid values are integer and keyword 'default'. Range 4096-16773119. | | | **mode** string | **Choices:*** ce * fabricpath | Set VLAN mode to classical ethernet or fabricpath. This is a valid option for Nexus 5000 and 7000 series. | | | **name** string | | Name of VLAN or keyword 'default'. | | | **state** string | **Choices:*** present * absent | Manage the state of the resource. | | | **vlan\_id** integer / required | | Single VLAN ID. | | | **vlan\_range** string | | Range of VLANs such as 2-10 or 2,5,10-15, etc. | | | **vlan\_state** string | **Choices:*** active * suspend | Manage the vlan operational state of the VLAN | | **associated\_interfaces** list / elements=string | | This is a intent option and checks the operational state of the for given vlan `name` for associated interfaces. If the value in the `associated_interfaces` does not match with the operational state of vlan 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 | | List of interfaces that should be associated to the VLAN or keyword 'default'. | | **mapped\_vni** string | | The Virtual Network Identifier (VNI) ID that is mapped to the VLAN. Valid values are integer and keyword 'default'. Range 4096-16773119. | | **mode** string | **Choices:*** **ce** ← * fabricpath | Set VLAN mode to classical ethernet or fabricpath. This is a valid option for Nexus 5000 and 7000 series. | | **name** string | | Name of VLAN or keyword 'default'. | | **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. | | **purge** boolean | **Choices:*** **no** ← * yes | Purge VLANs not defined in the *aggregate* parameter. This parameter can be used without aggregate as well. Removal of Vlan 1 is not allowed and will be ignored by purge. | | **state** string | **Choices:*** **present** ← * absent | Manage the state of the resource. | | **vlan\_id** integer | | Single VLAN ID. | | **vlan\_range** string | | Range of VLANs such as 2-10 or 2,5,10-15, etc. | | **vlan\_state** string | **Choices:*** **active** ← * suspend | Manage the vlan operational state of the VLAN | Notes ----- Note * 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: Ensure a range of VLANs are not present on the switch cisco.nxos.nxos_vlan: vlan_range: 2-10,20,50,55-60,100-150 state: absent - name: Ensure VLAN 50 exists with the name WEB and is in the shutdown state cisco.nxos.nxos_vlan: vlan_id: 50 admin_state: down name: WEB - name: Ensure VLAN is NOT on the device cisco.nxos.nxos_vlan: vlan_id: 50 state: absent - name: Add interfaces to VLAN and check intent (config + intent) cisco.nxos.nxos_vlan: vlan_id: 100 interfaces: - Ethernet2/1 - Ethernet2/5 associated_interfaces: - Ethernet2/1 - Ethernet2/5 - name: Check interfaces assigned to VLAN cisco.nxos.nxos_vlan: vlan_id: 100 associated_interfaces: - Ethernet2/1 - Ethernet2/5 - name: Create aggregate of vlans cisco.nxos.nxos_vlan: aggregate: - {vlan_id: 4000, mode: ce} - {vlan_id: 4001, name: vlan-4001} - name: purge vlans - removes all other vlans except the ones mentioned in aggregate) cisco.nxos.nxos_vlan: aggregate: - vlan_id: 1 - vlan_id: 4001 purge: 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 | | --- | --- | --- | | **commands** list / elements=string | always | Set of command strings to send to the remote device **Sample:** ['vlan 20', 'vlan 55', 'vn-segment 5000'] | Status ------ * This module will be removed in a major release after 2022-06-01. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Jason Edelman (@jedelman8)
programming_docs
ansible cisco.nxos.nxos_igmp_snooping – Manages IGMP snooping global configuration. cisco.nxos.nxos\_igmp\_snooping – Manages IGMP snooping global configuration. ============================================================================= 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_igmp_snooping`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages IGMP snooping global configuration. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **group\_timeout** string | | Group membership timeout value for all VLANs on the device. Accepted values are integer in range 1-10080, *never* and *default*. | | **link\_local\_grp\_supp** boolean | **Choices:*** no * yes | Global link-local groups suppression. | | **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. | | **report\_supp** boolean | **Choices:*** no * yes | Global IGMPv1/IGMPv2 Report Suppression. | | **snooping** boolean | **Choices:*** no * yes | Enables/disables IGMP snooping on the switch. | | **state** string | **Choices:*** **present** ← * default | Manage the state of the resource. | | **v3\_report\_supp** boolean | **Choices:*** no * yes | Global IGMPv3 Report Suppression and Proxy Reporting. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * When `state=default`, params will be reset to a default state. * `group_timeout` also accepts *never* as an input. * 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 -------- ``` # ensure igmp snooping params supported in this module are in there default state - cisco.nxos.nxos_igmp_snooping: state: default # ensure following igmp snooping params are in the desired state - cisco.nxos.nxos_igmp_snooping: group_timeout: never snooping: true link_local_grp_supp: false optimize_mcast_flood: false report_supp: true v3_report_supp: 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 | | --- | --- | --- | | **commands** list / elements=string | always | command sent to the device **Sample:** ['ip igmp snooping link-local-groups-suppression', 'ip igmp snooping group-timeout 50', 'no ip igmp snooping report-suppression', 'no ip igmp snooping v3-report-suppression', 'no ip igmp snooping'] | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible Cisco.Nxos 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.
programming_docs
ansible cisco.nxos.nxos_lldp_interfaces – LLDP interfaces resource module cisco.nxos.nxos\_lldp\_interfaces – LLDP interfaces resource module =================================================================== 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_lldp_interfaces`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages interfaces’ configuration for Link Layer Discovery Protocol (LLDP) on NX-OS platforms. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A list of link layer discovery configurations for interfaces. | | | **name** string / required | | Name of the interface | | | **receive** boolean | **Choices:*** no * yes | Used to enable or disable the reception of LLDP packets on that interface. By default, this is enabled after LLDP is enabled globally. | | | **tlv\_set** dictionary | | Used to configure TLV parameters on the interface | | | | **management\_address** string | | Used to mention the IPv4 or IPv6 management address for the interface | | | | **vlan** integer | | Used to mention the VLAN for the interface | | | **transmit** boolean | **Choices:*** no * yes | Used to enable or disable the transmission of LLDP packets on that interface. By default, this is enabled after LLDP is enabled globally. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS 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 * gathered * rendered * parsed | The state the configuration should be left in | Notes ----- Note * Tested against NXOS 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * The LLDP feature needs to be enabled before using this module Examples -------- ``` # Using merged # Before state: # ------------- # - name: Merge provided configuration with device configuration cisco.nxos.nxos_lldp_interfaces: config: - name: Ethernet1/4 receive: false transmit: true tlv_set: management_address: 192.168.122.64 vlan: 12 state: merged # After state: # ------------- # # interface Ethernet1/4 # no lldp receive # lldp tlv-set management-address 192.168.122.64 # lldp tlv-set vlan 12 # Using replaced # Before state: # ------------ # # interface Ethernet1/4 # no lldp receive # lldp tlv-set management-address 192.168.122.64 # interface Ethernet1/5 # no lldp transmit # lldp tlv-set vlan 10 - name: Replace LLDP configuration on interfaces with given configuration cisco.nxos.nxos_lldp_interfaces: config: - name: Ethernet1/4 transmit: no tlv_set: vlan: 2 state: replaced # After state: # ----------- # # interface Ethernet1/4 # no lldp transmit # lldp tlv_set vlan 2 # interface Ethernet1/5 # no lldp transmit # lldp tlv-set vlan 10 # Using overridden # Before state: # ------------ # # interface Ethernet1/4 # no lldp receive # lldp tlv-set management-address 192.168.122.64 # interface Ethernet1/5 # no lldp transmit # lldp tlv-set vlan 10 - name: Override LLDP configuration on all interfaces with given configuration cisco.nxos.nxos_lldp_interfaces: config: - name: Ethernet1/7 receive: no tlv_set: vlan: 12 state: overridden # After state: # ----------- # # interface Ethernet1/7 # no lldp receive # lldp tlv_set vlan 12 # Using deleted # Before state: # ------------ # # interface Ethernet1/4 # lldp tlv-set management vlan 24 # no lldp transmit # interface mgmt0 # no lldp receive - name: Delete LLDP interfaces configuration cisco.nxos.nxos_lldp_interfaces: state: deleted # After state: # ------------ # ``` 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 resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. | | **before** list / elements=string | always | The configuration prior to the model 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 Ethernet1/2', 'lldp receive', 'lldp tlv-set vlan 12'] | ### Authors * Adharsh Srivats Rangarajan (@adharshsrivatsr) ansible cisco.nxos.nxos_overlay_global – Configures anycast gateway MAC of the switch. cisco.nxos.nxos\_overlay\_global – Configures anycast gateway MAC of the switch. ================================================================================ 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_overlay_global`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Configures anycast gateway MAC of the switch. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **anycast\_gateway\_mac** string / required | | Anycast gateway mac of the switch. | | **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. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * Default restores params default value * Supported MAC address format are β€œE.E.E”, β€œEE-EE-EE-EE-EE-EE”, β€œEE:EE:EE:EE:EE:EE” and β€œEEEE.EEEE.EEEE” * 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 -------- ``` - cisco.nxos.nxos_overlay_global: anycast_gateway_mac: b.b.b ``` 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 | commands sent to the device **Sample:** ['fabric forwarding anycast-gateway-mac 000B.000B.000B'] | ### Authors * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_linkagg – (deprecated, removed after 2022-06-01) Manage link aggregation groups on Cisco NXOS devices. cisco.nxos.nxos\_linkagg – (deprecated, removed after 2022-06-01) Manage link aggregation groups 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_linkagg`. New in version 1.0.0: of cisco.nxos * [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 nxos\_lag\_interfaces Synopsis -------- * This module provides declarative management of link aggregation groups on Cisco NXOS devices. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **aggregate** list / elements=dictionary | | List of link aggregation definitions. | | | **force** boolean | **Choices:*** no * yes | When true it forces link aggregation group members to match what is declared in the members param. This can be used to remove members. | | | **group** string / required | | Channel-group number for the port-channel Link aggregation group. | | | **members** list / elements=string | | List of interfaces that will be managed in the link aggregation group. | | | **min\_links** integer | | Minimum number of ports required up before bringing up the link aggregation group. | | | **mode** string | **Choices:*** active * on * passive | Mode for the link aggregation group. | | | **state** string | **Choices:*** present * absent | State of the link aggregation group. | | **force** boolean | **Choices:*** **no** ← * yes | When true it forces link aggregation group members to match what is declared in the members param. This can be used to remove members. | | **group** string | | Channel-group number for the port-channel Link aggregation group. | | **members** list / elements=string | | List of interfaces that will be managed in the link aggregation group. | | **min\_links** integer | | Minimum number of ports required up before bringing up the link aggregation group. | | **mode** string | **Choices:*** active * **on** ← * passive | Mode for the link aggregation group. | | **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. | | **purge** boolean | **Choices:*** **no** ← * yes | Purge links not defined in the *aggregate* parameter. | | **state** string | **Choices:*** **present** ← * absent | State of the link aggregation group. | Notes ----- Note * Tested against NXOSv 7.0(3)I5(1). * Unsupported for Cisco MDS * `state=absent` removes the portchannel config and interface if it already exists. If members to be removed are not explicitly passed, all existing members (if any), are removed. * Members must be a list. * LACP needs to be enabled first if active/passive modes are used. * 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: create link aggregation group cisco.nxos.nxos_linkagg: group: 99 state: present - name: delete link aggregation group cisco.nxos.nxos_linkagg: group: 99 state: absent - name: set link aggregation group to members cisco.nxos.nxos_linkagg: group: 10 min_links: 3 mode: active members: - Ethernet1/2 - Ethernet1/4 - name: remove link aggregation group from Ethernet1/2 cisco.nxos.nxos_linkagg: group: 10 min_links: 3 mode: active members: - Ethernet1/4 - name: Create aggregate of linkagg definitions cisco.nxos.nxos_linkagg: aggregate: - {group: 3} - {group: 100, min_links: 3} - name: Remove aggregate of linkagg definitions cisco.nxos.nxos_linkagg: aggregate: - {group: 3} - {group: 100, min_links: 3} 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 port-channel 30', 'lacp min-links 5', 'interface Ethernet2/1', 'channel-group 30 mode active', 'no interface port-channel 30'] | 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)
programming_docs
ansible cisco.nxos.nxos_l2_interface – (deprecated, removed after 2022-06-01) Manage Layer-2 interface on Cisco NXOS devices. cisco.nxos.nxos\_l2\_interface – (deprecated, removed after 2022-06-01) Manage Layer-2 interface 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_l2_interface`. New in version 1.0.0: of cisco.nxos * [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 nxos\_l2\_interfaces Synopsis -------- * This module provides declarative management of Layer-2 interface on Cisco NXOS 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. If `mode=access`, used as the access VLAN ID. | | **aggregate** list / elements=dictionary | | List of Layer-2 interface definitions. | | | **access\_vlan** string | | Configure given VLAN in access port. If `mode=access`, used as the access VLAN ID. | | | **mode** string | **Choices:*** access * trunk | Mode in which interface needs to be configured. | | | **name** string | | Full name of the interface excluding any logical unit number, i.e. Ethernet1/1. aliases: interface | | | **native\_vlan** string | | Native VLAN to be configured in trunk port. If `mode=trunk`, used as the trunk native VLAN ID. | | | **state** string | **Choices:*** present * absent * unconfigured | Manage the state of the Layer-2 Interface configuration. | | | **trunk\_allowed\_vlans** string | | List of allowed VLANs in a given trunk port. If `mode=trunk`, these are the only VLANs that will be configured on the trunk, i.e. "2-10,15". | | | **trunk\_vlans** string | | List of VLANs to be configured in trunk port. If `mode=trunk`, used as the VLAN range to ADD or REMOVE from the trunk. aliases: trunk\_add\_vlans | | **mode** string | **Choices:*** access * trunk | Mode in which interface needs to be configured. | | **name** string | | Full name of the interface excluding any logical unit number, i.e. Ethernet1/1. aliases: interface | | **native\_vlan** string | | Native VLAN to be configured in trunk port. If `mode=trunk`, used as the trunk native VLAN ID. | | **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. | | **state** string | **Choices:*** **present** ← * absent * unconfigured | Manage the state of the Layer-2 Interface configuration. | | **trunk\_allowed\_vlans** string | | List of allowed VLANs in a given trunk port. If `mode=trunk`, these are the only VLANs that will be configured on the trunk, i.e. "2-10,15". | | **trunk\_vlans** string | | List of VLANs to be configured in trunk port. If `mode=trunk`, used as the VLAN range to ADD or REMOVE from the trunk. aliases: trunk\_add\_vlans | Notes ----- Note * Tested against NXOSv 7.0(3)I5(1). * Unsupported 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: Ensure Eth1/5 is in its default l2 interface state cisco.nxos.nxos_l2_interface: name: Ethernet1/5 state: unconfigured - name: Ensure Eth1/5 is configured for access vlan 20 cisco.nxos.nxos_l2_interface: name: Ethernet1/5 mode: access access_vlan: 20 - name: Ensure Eth1/5 only has vlans 5-10 as trunk vlans cisco.nxos.nxos_l2_interface: name: Ethernet1/5 mode: trunk native_vlan: 10 trunk_vlans: 5-10 - name: Ensure eth1/5 is a trunk port and ensure 2-50 are being tagged (doesn't mean others aren't also being tagged) cisco.nxos.nxos_l2_interface: name: Ethernet1/5 mode: trunk native_vlan: 10 trunk_vlans: 2-50 - name: Ensure these VLANs are not being tagged on the trunk cisco.nxos.nxos_l2_interface: name: Ethernet1/5 mode: trunk trunk_vlans: 51-4094 state: absent - name: Aggregate Configure interfaces for access_vlan with aggregate cisco.nxos.nxos_l2_interface: aggregate: - {name: Ethernet1/2, access_vlan: 6} - {name: Ethernet1/7, access_vlan: 15} mode: access ``` 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 eth1/5', 'switchport access vlan 20'] | 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) ansible cisco.nxos.nxos_facts – Gets facts about NX-OS switches cisco.nxos.nxos\_facts – Gets facts about NX-OS switches ======================================================== 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_facts`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Collects facts from Cisco Nexus devices running the NX-OS operating system. Fact collection is supported over both Cli and Nxapi transports. 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 `!` to specify that a specific subset should not be collected. Valid subsets are 'all', 'bfd\_interfaces', 'lag\_interfaces', 'telemetry', 'vlans', 'lacp', 'lacp\_interfaces', 'interfaces', 'l3\_interfaces', 'l2\_interfaces', 'lldp\_global', 'acls', 'acl\_interfaces', '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, hardware, config, legacy, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial `!` 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 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. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported 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: Gather all legacy facts cisco.nxos.nxos_facts: gather_subset: all - name: Gather only the config and default facts cisco.nxos.nxos_facts: gather_subset: - config - name: Do not gather hardware facts cisco.nxos.nxos_facts: gather_subset: - '!hardware' - name: Gather legacy and resource facts cisco.nxos.nxos_facts: gather_subset: all gather_network_resources: all - name: Gather only the interfaces resource facts and no legacy facts cisco.nxos.nxos_facts: gather_subset: - '!all' - '!min' gather_network_resources: - interfaces - name: Gather interfaces resource and minimal legacy facts cisco.nxos.nxos_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\_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\_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\_license\_hostid** string | always | The License host id of the 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 LLDP and CDP neighbors from the 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\_version** string | always | The operating system version running on the remote device | | **fan\_info** dictionary | when legacy is configured | A hash of facts about fans in the remote device | | **hostname** dictionary | when legacy is configured | The configured hostname of the remote device | | **interfaces\_list** dictionary | when legacy is configured | The list of interface names on the remote device | | **kickstart** string | when legacy is configured | The software version used to boot the system | | **module** dictionary | when legacy is configured | A hash of facts about the modules in a remote device | | **platform** string | when legacy is configured | The hardware platform reported by the remote device | | **power\_supply\_info** string | when legacy is configured | A hash of facts about the power supplies in the remote device | | **vlan\_list** list / elements=string | when legacy is configured | The list of VLAN IDs configured on the remote device | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele)
programming_docs
ansible cisco.nxos.nxos – Use NX-OS cliconf to run commands on Cisco NX-OS platform cisco.nxos.nxos – Use NX-OS cliconf to run commands on Cisco NX-OS platform =========================================================================== 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`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * This nxos plugin provides low level abstraction apis for sending and receiving CLI commands from Cisco NX-OS network devices. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **config\_commands** list / elements=string added in 2.0.0 of cisco.nxos | **Default:**[] | var: ansible\_nxos\_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. | ### Authors * Ansible Networking Team ansible cisco.nxos.nxos_hsrp – Manages HSRP configuration on NX-OS switches. cisco.nxos.nxos\_hsrp – Manages HSRP configuration on NX-OS switches. ===================================================================== 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_hsrp`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages HSRP configuration on NX-OS switches. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auth\_string** string | | Authentication string. If this needs to be hidden(for md5 type), the string should be 7 followed by the key string. Otherwise, it can be 0 followed by key string or just key string (for backward compatibility). For text type, this should be just be a key string. if this is 'default', authentication is removed. | | **auth\_type** string | **Choices:*** text * md5 | Authentication type. | | **group** string / required | | HSRP group number. | | **interface** string / required | | Full name of interface that is being managed for HSRP. | | **preempt** string | **Choices:*** enabled * disabled | Enable/Disable preempt. | | **priority** string | | HSRP priority or keyword 'default'. | | **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. | | **state** string | **Choices:*** **present** ← * absent | Specify desired state of the resource. | | **version** string | **Choices:*** 1 * 2 **Default:**1 | HSRP version. | | **vip** string | | HSRP virtual IP address or keyword 'default' | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * HSRP feature needs to be enabled first on the system. * SVIs must exist before using this module. * Interface must be a L3 port before using this module. * HSRP cannot be configured on loopback interfaces. * MD5 authentication is only possible with HSRPv2 while it is ignored if HSRPv1 is used instead, while it will not raise any error. Here we allow MD5 authentication only with HSRPv2 in order to enforce better practice. * 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: Ensure HSRP is configured with following params on a SVI cisco.nxos.nxos_hsrp: group: 10 vip: 10.1.1.1 priority: 150 interface: vlan10 preempt: enabled - name: Ensure HSRP is configured with following params on a SVI with clear text authentication cisco.nxos.nxos_hsrp: group: 10 vip: 10.1.1.1 priority: 150 interface: vlan10 preempt: enabled auth_type: text auth_string: CISCO - name: Ensure HSRP is configured with md5 authentication and clear authentication string cisco.nxos.nxos_hsrp: group: 10 vip: 10.1.1.1 priority: 150 interface: vlan10 preempt: enabled auth_type: md5 auth_string: 0 1234 - name: Ensure HSRP is configured with md5 authentication and hidden authentication string cisco.nxos.nxos_hsrp: group: 10 vip: 10.1.1.1 priority: 150 interface: vlan10 preempt: enabled auth_type: md5 auth_string: 7 1234 - name: Remove HSRP config for given interface, group, and VIP cisco.nxos.nxos_hsrp: group: 10 interface: vlan10 vip: 10.1.1.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 | commands sent to the device **Sample:** ['interface vlan10', 'hsrp version 2', 'hsrp 30', 'ip 10.30.1.1'] | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_vsan – Configuration of vsan for Cisco NXOS MDS Switches. cisco.nxos.nxos\_vsan – Configuration of vsan for Cisco NXOS MDS Switches. ========================================================================== 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_vsan`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Configuration of vsan for Cisco MDS NXOS. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **vsan** list / elements=dictionary | | List of vsan details to be added or removed | | | **id** integer / required | | Vsan id | | | **interface** list / elements=string | | List of vsan's interfaces to be added | | | **name** string | | Name of the vsan | | | **remove** boolean | **Choices:*** no * yes | Removes the vsan if True | | | **suspend** boolean | **Choices:*** no * yes | suspend the vsan if True | Notes ----- Note * Tested against Cisco MDS NX-OS 8.4(1) Examples -------- ``` - name: Test that vsan module works cisco.nxos.nxos_vsan: vsan: - id: 922 interface: - fc1/1 - fc1/2 - port-channel 1 name: vsan-SAN-A remove: false suspend: false - id: 923 interface: - fc1/11 - fc1/21 - port-channel 2 name: vsan-SAN-B remove: false suspend: true - id: 1923 name: vsan-SAN-Old remove: 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 | | --- | --- | --- | | **commands** list / elements=string | always | commands sent to the device **Sample:** ['terminal dont-ask', 'vsan database', 'vsan 922 interface fc1/40', 'vsan 922 interface port-channel 155', 'no terminal dont-ask'] | ### Authors * Suhas Bharadwaj (@srbharadwaj) ([[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#84f7f1e6ece5f6e5e0a2a7b7b3bfa2a7b1b6bfa2a7b0bcbfe7edf7e7eba2a7b0b2bfe7ebe9)) ansible cisco.nxos.nxos_pim – Manages configuration of a PIM instance. cisco.nxos.nxos\_pim – Manages configuration of a PIM instance. =============================================================== 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_pim`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages configuration of a Protocol Independent Multicast (PIM) instance. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **bfd** string | **Choices:*** enable * disable | Enables BFD on all PIM interfaces. Dependency: ''feature bfd'' | | **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. | | **ssm\_range** list / elements=string | | Configure group ranges for Source Specific Multicast (SSM). Valid values are multicast addresses or the keyword `none` or keyword `default`. `none` removes all SSM group ranges. `default` will set ssm\_range to the default multicast address. If you set multicast address, please ensure that it is not the same as the `default`, otherwise use the `default` option. | Notes ----- Note * Unsupported 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: Configure ssm_range, enable bfd cisco.nxos.nxos_pim: bfd: enable ssm_range: 224.0.0.0/8 - name: Set to default cisco.nxos.nxos_pim: ssm_range: default - name: Remove all ssm group ranges cisco.nxos.nxos_pim: ssm_range: none ``` 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 | commands sent to the device **Sample:** ['ip pim bfd', 'ip pim ssm range 224.0.0.0/8'] | ### Authors * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_smu – (deprecated, removed after 2022-10-01) Perform SMUs on Cisco NX-OS devices. cisco.nxos.nxos\_smu – (deprecated, removed after 2022-10-01) Perform SMUs on Cisco NX-OS 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_smu`. New in version 1.0.0: of cisco.nxos * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in major release after 2022-10-01 Why Updated modules released with more functionality. Alternative nxos\_rpm Synopsis -------- * Perform software maintenance upgrades (SMUs) on Cisco NX-OS devices. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **file\_system** string | **Default:**"bootflash:" | The remote file system of the device. If omitted, devices that support a file\_system parameter will use their default values. | | **pkg** string / required | | Name of the remote package. | | **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. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * The module can only activate and commit a package, not remove or deactivate it. * Use `transport=nxapi` to avoid connection timeout * 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 -------- ``` - cisco.nxos.nxos_smu: pkg: nxos.CSCuz65185-n9k_EOR-1.0.0-7.0.3.I2.2d.lib32_n9000.rpm ``` 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 | commands sent to the device **Sample:** ['install add bootflash:nxos.CSCuz65185-n9k\_EOR-1.0.0-7.0.3.I2.2d.lib32\_n9000.rpm', 'install activate bootflash:nxos.CSCuz65185-n9k\_EOR-1.0.0-7.0.3.I2.2d.lib32\_n9000.rpm force', 'install commit bootflash:nxos.CSCuz65185-n9k\_EOR-1.0.0-7.0.3.I2.2d.lib32\_n9000.rpm'] | Status ------ * This module will be removed in a major release after 2022-10-01. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Gabriele Gerbino (@GGabriele)
programming_docs
ansible cisco.nxos.nxos_devicealias – Configuration of device alias for Cisco NXOS MDS Switches. cisco.nxos.nxos\_devicealias – Configuration of device alias for Cisco NXOS MDS Switches. ========================================================================================= 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_devicealias`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Configuration of device alias for Cisco MDS NXOS. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **da** list / elements=dictionary | | List of device-alias to be added or removed | | | **name** string / required | | Name of the device-alias to be added or removed | | | **pwwn** string | | pwwn to which the name needs to be associated with | | | **remove** boolean | **Choices:*** **no** ← * yes | Removes the device-alias if set to True | | **distribute** boolean | **Choices:*** no * yes | Enable/Disable device-alias distribution | | **mode** string | **Choices:*** basic * enhanced | Mode of devices-alias, basic or enhanced | | **rename** list / elements=dictionary | | List of device-alias to be renamed | | | **new\_name** string / required | | New name of the device-alias | | | **old\_name** string / required | | Old name of the device-alias that needs to be renamed | Notes ----- Note * Tested against Cisco MDS NX-OS 8.4(1) Examples -------- ``` - name: Test that device alias module works cisco.nxos.nxos_devicealias: da: - name: test1_add pwwn: 56:2:22:11:22:88:11:67 - name: test2_add pwwn: 65:22:22:11:22:22:11:d - name: dev1 remove: true - name: dev2 remove: true distribute: true mode: enhanced rename: - new_name: bcd old_name: abc - new_name: bcd1 old_name: abc1 ``` 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 | commands sent to the device **Sample:** ['terminal dont-ask', 'device-alias database', 'device-alias name somename pwwn 10:00:00:00:89:a1:01:03', 'device-alias name somename1 pwwn 10:00:00:00:89:a1:02:03', 'device-alias commit', 'no terminal dont-ask'] | ### Authors * Suhas Bharadwaj (@srbharadwaj) ([[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#0a797f68626b786b6e2c29393d312c293f38312c293e323169637969652c293e3c31696567)) ansible cisco.nxos.nxos_file_copy – Copy a file to a remote NXOS device. cisco.nxos.nxos\_file\_copy – Copy a file to a remote NXOS device. ================================================================== 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_file_copy`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module supports two different workflows for copying a file to flash (or bootflash) on NXOS devices. Files can either be (1) pushed from the Ansible controller to the device or (2) pulled from a remote SCP file server to the device. File copies are initiated from the NXOS device to the remote SCP server. This module only supports the use of connection `network_cli` or `Cli` transport with connection `local`. 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. * paramiko (required when file\_pull is False) * SCPClient (required when file\_pull is False) * pexpect (required when file\_pull is True) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **connect\_ssh\_port** string | **Default:**22 | SSH server port used for file transfer. | | **file\_pull** boolean | **Choices:*** **no** ← * yes | When (False) file is copied from the Ansible controller to the NXOS device. When (True) file is copied from a remote SCP server to the NXOS device. In this mode, the file copy is initiated from the NXOS device. If the file is already present on the device it will be overwritten and therefore the operation is NOT idempotent. | | **file\_pull\_compact** boolean | **Choices:*** **no** ← * yes | When file\_pull is True, this is used to compact nxos image files. This option can only be used with nxos image files. When (file\_pull is False), this is not used. | | **file\_pull\_kstack** boolean | **Choices:*** **no** ← * yes | When file\_pull is True, this can be used to speed up file copies when the nxos running image supports the use-kstack option. When (file\_pull is False), this is not used. | | **file\_pull\_protocol** string | **Choices:*** **scp** ← * sftp * ftp * http * https * tftp | When file\_pull is True, this can be used to define the transfer protocol for copying file from remote to the NXOS device. When (file\_pull is False), this is not used. | | **file\_pull\_timeout** string | **Default:**300 | Use this parameter to set timeout in seconds, when transferring large files or when the network is slow. When (file\_pull is False), this is not used. | | **file\_system** string | **Default:**"bootflash:" | The remote file system on the nxos device. If omitted, devices that support a *file\_system* parameter will use their default values. | | **local\_file** string | | When (file\_pull is False) this is the path to the local file on the Ansible controller. The local directory must exist. When (file\_pull is True) this is the target file name on the NXOS device. | | **local\_file\_directory** string | | When (file\_pull is True) file is copied from a remote SCP server to the NXOS device, and written to this directory on the NXOS device. If the directory does not exist, it will be created under the file\_system. This is an optional parameter. When (file\_pull is False), this is not used. | | **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. | | **remote\_file** string | | When (file\_pull is False) this is the remote file path on the NXOS device. If omitted, the name of the local file will be used. The remote directory must exist. When (file\_pull is True) this is the full path to the file on the remote SCP server to be copied to the NXOS device. | | **remote\_scp\_server** string | | The remote scp server address when file\_pull is True. This is required if file\_pull is True. When (file\_pull is False), this is not used. | | **remote\_scp\_server\_password** string | | The remote scp server password when file\_pull is True. This is required if file\_pull is True. When (file\_pull is False), this is not used. | | **remote\_scp\_server\_user** string | | The remote scp server username when file\_pull is True. This is required if file\_pull is True. When (file\_pull is False), this is not used. | | **vrf** string | **Default:**"management" | The VRF used to pull the file. Useful when no vrf management is defined | Notes ----- Note * Tested against NXOS 7.0(3)I2(5), 7.0(3)I4(6), 7.0(3)I5(3), 7.0(3)I6(1), 7.0(3)I7(3), 6.0(2)A8(8), 7.0(3)F3(4), 7.3(0)D1(1), 8.3(0), 9.2, 9.3 * Limited Support for Cisco MDS * When pushing files (file\_pull is False) to the NXOS device, feature scp-server must be enabled. * When pulling files (file\_pull is True) to the NXOS device, feature scp-server is not required. * When pulling files (file\_pull is True) to the NXOS device, no transfer will take place if the file is already present. * Check mode will tell you if the file would be copied. * 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 -------- ``` # File copy from ansible controller to nxos device - name: copy from server to device cisco.nxos.nxos_file_copy: local_file: ./test_file.txt remote_file: test_file.txt # Initiate file copy from the nxos device to transfer file from an SCP server back to the nxos device - name: initiate file copy from device cisco.nxos.nxos_file_copy: file_pull: true local_file: xyz local_file_directory: dir1/dir2/dir3 remote_file: /mydir/abc remote_scp_server: 192.168.0.1 remote_scp_server_user: myUser remote_scp_server_password: myPassword vrf: management # Initiate file copy from the nxos device to transfer file from a ftp server back to the nxos device. # remote_scp_server_user and remote_scp_server_password are used to login to the FTP server. - name: initiate file copy from device cisco.nxos.nxos_file_copy: file_pull: true file_pull_protocol: ftp local_file: xyz remote_file: /mydir/abc remote_scp_server: 192.168.0.1 remote_scp_server_user: myUser remote_scp_server_password: myPassword vrf: management ``` 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 | success | Indicates whether or not the file was copied. **Sample:** True | | **local\_file** string | success | The path of the local file. **Sample:** /path/to/local/file | | **remote\_file** string | success | The path of the remote file. **Sample:** /path/to/remote/file | | **remote\_scp\_server** string | success | The name of the scp server when file\_pull is True. **Sample:** fileserver.example.com | | **transfer\_status** string | success | Whether a file was transferred to the nxos device. **Sample:** Sent | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) * Rewritten as a plugin by (@mikewiebe) ansible cisco.nxos.nxos_vpc – Manages global VPC configuration cisco.nxos.nxos\_vpc – Manages global VPC configuration ======================================================= 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_vpc`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages global VPC configuration Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auto\_recovery** boolean | **Choices:*** no * yes | Enables/Disables auto recovery on platforms that support disable timers are not modifiable with this attribute mutually exclusive with auto\_recovery\_reload\_delay | | **auto\_recovery\_reload\_delay** string | | Manages auto-recovery reload-delay timer in seconds mutually exclusive with auto\_recovery | | **delay\_restore** string | | manages delay restore command and config value in seconds | | **delay\_restore\_interface\_vlan** string | | manages delay restore interface-vlan command and config value in seconds not supported on all platforms | | **delay\_restore\_orphan\_port** string | | manages delay restore orphan-port command and config value in seconds not supported on all platforms | | **domain** string / required | | VPC domain | | **peer\_gw** boolean | **Choices:*** no * yes | Enables/Disables peer gateway | | **pkl\_dest** string | | Destination (remote) IP address used for peer keepalive link pkl\_dest is required whenever pkl options are used. | | **pkl\_src** string | | Source IP address used for peer keepalive link | | **pkl\_vrf** string | | VRF used for peer keepalive link The VRF must exist on the device before using pkl\_vrf. (Note) 'default' is an overloaded term: Default vrf context for pkl\_vrf is 'management'; 'pkl\_vrf: default' refers to the literal 'default' rib. | | **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. | | **role\_priority** string | | Role priority for device. Remember lower is better. | | **state** string | **Choices:*** **present** ← * absent | Manages desired state of the resource | | **system\_priority** string | | System priority device. Remember they must match between peers. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * The feature vpc must be enabled before this module can be used * If not using management vrf, vrf must be globally on the device before using in the pkl config * Although source IP isn’t required on the command line it is required when using this module. The PKL VRF must also be configured prior to using this module. * Both pkl\_src and pkl\_dest are needed when changing PKL VRF. * 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: configure a simple asn cisco.nxos.nxos_vpc: domain: 100 role_priority: 1000 system_priority: 2000 pkl_dest: 192.168.100.4 pkl_src: 10.1.100.20 peer_gw: true auto_recovery: true - name: configure cisco.nxos.nxos_vpc: domain: 100 role_priority: 32667 system_priority: 2000 peer_gw: true pkl_src: 10.1.100.2 pkl_dest: 192.168.100.4 auto_recovery: true - name: Configure VPC with delay restore and existing keepalive VRF cisco.nxos.nxos_vpc: domain: 10 role_priority: 28672 system_priority: 2000 delay_restore: 180 peer_gw: true pkl_src: 1.1.1.2 pkl_dest: 1.1.1.1 pkl_vrf: vpckeepalive auto_recovery: 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 | | --- | --- | --- | | **commands** list / elements=string | always | commands sent to the device **Sample:** ['vpc domain 100', 'peer-keepalive destination 192.168.100.4 source 10.1.100.20 vrf management', 'auto-recovery', 'peer-gateway'] | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele)
programming_docs
ansible cisco.nxos.nxos_snmp_community – Manages SNMP community configs. cisco.nxos.nxos\_snmp\_community – Manages SNMP community configs. ================================================================== 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_snmp_community`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages SNMP community configuration. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **access** string | **Choices:*** ro * rw | Access type for community. | | **acl** string | | ACL name to filter snmp requests or keyword 'default'. | | **community** string / required | | Case-sensitive community string. | | **group** string | | Group to which the community belongs. | | **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. | | **state** string | **Choices:*** **present** ← * absent | Manage the state of the resource. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * 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 -------- ``` # ensure snmp community is configured - cisco.nxos.nxos_snmp_community: community: TESTING7 group: network-operator 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 | commands sent to the device **Sample:** ['snmp-server community TESTING7 group network-operator'] | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_vpc_interface – Manages interface VPC configuration cisco.nxos.nxos\_vpc\_interface – Manages interface VPC configuration ===================================================================== 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_vpc_interface`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages interface VPC configuration Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **peer\_link** boolean | **Choices:*** no * yes | Set to true/false for peer link config on associated portchannel. | | **portchannel** string / required | | Group number of the portchannel that will be configured. | | **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. | | **state** string | **Choices:*** **present** ← * absent | Manages desired state of the resource. | | **vpc** string | | VPC group/id that will be configured on associated portchannel. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * Either vpc or peer\_link param is required, but not both. * `state=absent` removes whatever VPC config is on a port-channel if one exists. * Re-assigning a vpc or peerlink from one portchannel to another is not supported. The module will force the user to unconfigure an existing vpc/pl before configuring the same value on a new portchannel * 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 -------- ``` - cisco.nxos.nxos_vpc_interface: portchannel: 10 vpc: 100 ``` 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 | commands sent to the device **Sample:** ['interface port-channel100', 'vpc 10'] | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_vxlan_vtep_vni – Creates a Virtual Network Identifier member (VNI) cisco.nxos.nxos\_vxlan\_vtep\_vni – Creates a Virtual Network Identifier member (VNI) ===================================================================================== 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_vxlan_vtep_vni`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Creates a Virtual Network Identifier member (VNI) for an NVE overlay interface. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **assoc\_vrf** boolean | **Choices:*** no * yes | This attribute is used to identify and separate processing VNIs that are associated with a VRF and used for routing. The VRF and VNI specified with this command must match the configuration of the VNI under the VRF. | | **ingress\_replication** string | **Choices:*** bgp * static * default | Specifies mechanism for host reachability advertisement. | | **interface** string / required | | Interface name for the VXLAN Network Virtualization Endpoint. | | **multicast\_group** string | | The multicast group (range) of the VNI. Valid values are string and keyword 'default'. | | **multisite\_ingress\_replication** string added in 1.1.0 of cisco.nxos | **Choices:*** disable * enable * optimized | Enables multisite ingress replication. | | **peer\_list** list / elements=string | | Set the ingress-replication static peer list. Valid values are an array, a space-separated string of ip addresses, or the keyword 'default'. | | **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. | | **state** string | **Choices:*** **present** ← * absent | Determines whether the config should be present or not on the device. | | **suppress\_arp** boolean | **Choices:*** no * yes | Suppress arp under layer 2 VNI. | | **suppress\_arp\_disable** boolean | **Choices:*** no * yes | Overrides the global ARP suppression config. This is available on NX-OS 9K series running 9.2.x or higher. | | **vni** string / required | | ID of the Virtual Network Identifier. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * default, where supported, restores params default value. * 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 -------- ``` - cisco.nxos.nxos_vxlan_vtep_vni: interface: nve1 vni: 6000 ingress_replication: default multisite_ingress_replication: enable ``` 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 | commands sent to the device **Sample:** ['interface nve1', 'member vni 6000', 'multisite ingress-replication'] | ### Authors * Gabriele Gerbino (@GGabriele)
programming_docs
ansible cisco.nxos.nxos_ntp_global – NTP Global resource module. cisco.nxos.nxos\_ntp\_global – NTP Global resource module. ========================================================== 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_ntp_global`. New in version 2.6.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages ntp configuration on devices running Cisco NX-OS. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | A dict of ntp configuration. | | | **access\_group** dictionary | | NTP access-group. | | | | **match\_all** boolean | **Choices:*** no * yes | Scan ACLs present in all ntp access groups. | | | | **peer** list / elements=dictionary | | Access-group peer. | | | | | **access\_list** string | | Name of access list. | | | | **query\_only** list / elements=dictionary | | Access-group query-only. | | | | | **access\_list** string | | Name of access list. | | | | **serve** list / elements=dictionary | | Access-group serve. | | | | | **access\_list** string | | Name of access list. | | | | **serve\_only** list / elements=dictionary | | Access-group serve-only. | | | | | **access\_list** string | | Name of access list. | | | **allow** dictionary | | Enable/Disable the packets. | | | | **control** dictionary | | Control mode packets. | | | | | **rate\_limit** integer | | Rate-limit delay. | | | | **private** boolean | **Choices:*** no * yes | Enable/Disable Private mode packets. | | | **authenticate** boolean | **Choices:*** no * yes | Enable/Disable authentication. | | | **authentication\_keys** list / elements=dictionary | | NTP authentication key. | | | | **encryption** integer | | 0 for Clear text 7 for Encrypted | | | | **id** integer | | Authentication key number (range 1-65535). | | | | **key** string | | Authentication key. | | | **logging** boolean | **Choices:*** no * yes | Enable/Disable logging of NTPD Events. | | | **master** dictionary | | Act as NTP master clock. | | | | **stratum** integer | | Stratum number. | | | **passive** boolean | **Choices:*** no * yes | NTP passive command. | | | **peers** list / elements=dictionary | | NTP Peers. | | | | **key\_id** integer | | Keyid to be used while communicating to this server. | | | | **maxpoll** integer | | Maximum interval to poll a peer. Poll interval in secs to a power of 2. | | | | **minpoll** integer | | Minimum interval to poll a peer. Poll interval in secs to a power of 2. | | | | **peer** string | | Hostname/IP address of the NTP Peer. | | | | **prefer** boolean | **Choices:*** no * yes | Preferred Server. | | | | **use\_vrf** string | | Display per-VRF information. | | | **servers** list / elements=dictionary | | NTP servers. | | | | **key\_id** integer | | Keyid to be used while communicating to this server. | | | | **maxpoll** integer | | Maximum interval to poll a peer. Poll interval in secs to a power of 2. | | | | **minpoll** integer | | Minimum interval to poll a peer. Poll interval in secs to a power of 2. | | | | **prefer** boolean | **Choices:*** no * yes | Preferred Server. | | | | **server** string | | Hostname/IP address of the NTP Peer. | | | | **use\_vrf** string | | Display per-VRF information. | | | **source** string | | Source of NTP packets. | | | **source\_interface** string | | Source interface sending NTP packets. | | | **trusted\_keys** list / elements=dictionary | | NTP trusted-key number. | | | | **key\_id** integer | | Trusted-Key number. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the command **show running-config ntp**. 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 the configuration should be left in. The states *replaced* and *overridden* have identical behaviour for this module. Please refer to examples for more details. | Notes ----- Note * Tested against NX-OS 9.3.6. * This module works with connection `network_cli` and `httpapi`. Examples -------- ``` # Using merged # Before state: # ------------- # nxos-9k-rdo# show running-config ntp # nxos-9k-rdo# - name: Merge the provided configuration with the existing running configuration cisco.nxos.nxos_ntp_global: &id001 config: access_group: peer: - access_list: PeerAcl1 serve: - access_list: ServeAcl1 authenticate: True authentication_keys: - id: 1001 key: vagwwtKfkv encryption: 7 - id: 1002 key: vagwwtKfkvgthz encryption: 7 logging: True master: stratum: 2 peers: - peer: 192.0.2.1 key_id: 1 maxpoll: 15 minpoll: 5 use_vrf: default - peer: 192.0.2.2 key_id: 2 prefer: True use_vrf: siteA servers: - server: 198.51.100.1 key_id: 2 use_vrf: default - server: 203.0.113.1 key_id: 1 use_vrf: siteB # Task output # ------------- # before: {} # # commands: # - "ntp authenticate" # - "ntp logging" # - "ntp master 2" # - "ntp authentication-keys 1001 md5 vagwwtKfkv 7" # - "ntp authentication-keys 1002 md5 vagwwtKfkvgthz 7" # - "ntp peer 192.0.2.1 use-vrf default key 1 minpoll 5 maxpoll 15" # - "ntp peer 192.0.2.2 prefer use-vrf siteA key 2" # - "ntp server 198.51.100.1 use-vrf default key 2" # - "ntp server 203.0.113.1 use-vrf siteB key 1" # - "ntp access-group peer PeerAcl1" # - "ntp access-group serve ServeAcl1" # # after: # access_group: # peer: # - access_list: PeerAcl1 # serve: # - access_list: ServeAcl1 # authenticate: True # authentication_keys: # - id: 1001 # key: vagwwtKfkv # encryption: 7 # - id: 1002 # key: vagwwtKfkvgthz # encryption: 7 # logging: True # master: # stratum: 2 # peers: # - peer: 192.0.2.1 # key_id: 1 # maxpoll: 15 # minpoll: 5 # use_vrf: default # - peer: 192.0.2.2 # key_id: 2 # prefer: True # use_vrf: siteA # servers: # - server: 198.51.100.1 # key_id: 2 # use_vrf: default # - server: 203.0.113.1 # key_id: 1 # use_vrf: siteB # After state: # ------------ # nxos-9k-rdo# show running-config ntp # ntp authenticate # ntp logging # ntp master 2 # ntp authentication-keys 1001 md5 vagwwtKfkv 7 # ntp authentication-keys 1002 md5 vagwwtKfkvgthz 7 # ntp peer 192.0.2.1 use-vrf default key 1 minpoll 5 maxpoll 15 # ntp peer 192.0.2.2 prefer use-vrf siteA key 2 # ntp server 198.51.100.1 use-vrf default key 2 # ntp server 203.0.113.1 use-vrf siteB key 1 # ntp access-group peer PeerAcl1 # ntp access-group serve ServeAcl1 # Using replaced # Before state: # ------------ # nxos-9k-rdo# show running-config ntp # ntp authenticate # ntp logging # ntp master 2 # ntp authentication-keys 1001 md5 vagwwtKfkv 7 # ntp authentication-keys 1002 md5 vagwwtKfkvgthz 7 # ntp peer 192.0.2.1 use-vrf default key 1 minpoll 5 maxpoll 15 # ntp peer 192.0.2.2 prefer use-vrf siteA key 2 # ntp server 198.51.100.1 use-vrf default key 2 # ntp server 203.0.113.1 use-vrf siteB key 1 # ntp access-group peer PeerAcl1 # ntp access-group serve ServeAcl1 - name: Replace logging global configurations of listed logging global with provided configurations cisco.nxos.nxos_ntp_global: config: access_group: peer: - access_list: PeerAcl2 serve: - access_list: ServeAcl2 logging: True master: stratum: 2 peers: - peer: 192.0.2.1 key_id: 1 maxpoll: 15 minpoll: 5 use_vrf: default - peer: 192.0.2.5 key_id: 2 prefer: True use_vrf: siteA servers: - server: 198.51.100.1 key_id: 2 use_vrf: default state: replaced # Task output # ------------- # before: # access_group: # peer: # - access_list: PeerAcl1 # serve: # - access_list: ServeAcl1 # authenticate: True # authentication_keys: # - id: 1001 # key: vagwwtKfkv # encryption: 7 # - id: 1002 # key: vagwwtKfkvgthz # encryption: 7 # logging: True # master: # stratum: 2 # peers: # - peer: 192.0.2.1 # key_id: 1 # maxpoll: 15 # minpoll: 5 # use_vrf: default # - peer: 192.0.2.2 # key_id: 2 # prefer: True # use_vrf: siteA # servers: # - server: 198.51.100.1 # key_id: 2 # use_vrf: default # - server: 203.0.113.1 # key_id: 1 # use_vrf: siteB # # commands: # - "no ntp authenticate" # - "no ntp authentication-keys 1001 md5 vagwwtKfkv 7" # - "no ntp authentication-keys 1002 md5 vagwwtKfkvgthz 7" # - "ntp peer 192.0.2.5 prefer use-vrf siteA key 2" # - "no ntp peer 192.0.2.2 prefer use-vrf siteA key 2" # - "no ntp server 203.0.113.1 use-vrf siteB key 1" # - "ntp access-group peer PeerAcl2" # - "no ntp access-group peer PeerAcl1" # - "ntp access-group serve ServeAcl2" # - "no ntp access-group serve ServeAcl1" # # after: # access_group: # peer: # - access_list: PeerAcl2 # serve: # - access_list: ServeAcl2 # logging: True # master: # stratum: 2 # peers: # - peer: 192.0.2.1 # key_id: 1 # maxpoll: 15 # minpoll: 5 # use_vrf: default # - peer: 192.0.2.5 # key_id: 2 # prefer: True # use_vrf: siteA # servers: # - server: 198.51.100.1 # key_id: 2 # use_vrf: default # After state: # ------------ # nxos-9k-rdo# show running-config ntp # ntp logging # ntp master 2 # ntp peer 192.0.2.1 use-vrf default key 1 minpoll 5 maxpoll 15 # ntp peer 192.0.2.5 prefer use-vrf siteA key 2 # ntp server 198.51.100.1 use-vrf default key 2 # ntp access-group peer PeerAcl2 # ntp access-group serve ServeAcl2 # Using deleted to delete all logging configurations # Before state: # ------------ # nxos-9k-rdo# show running-config ntp - name: Delete all logging configuration cisco.nxos.nxos_ntp_global: state: deleted # Task output # ------------- # before: # access_group: # peer: # - access_list: PeerAcl1 # serve: # - access_list: ServeAcl1 # authenticate: True # authentication_keys: # - id: 1001 # key: vagwwtKfkv # encryption: 7 # - id: 1002 # key: vagwwtKfkvgthz # encryption: 7 # logging: True # master: # stratum: 2 # peers: # - peer: 192.0.2.1 # key_id: 1 # maxpoll: 15 # minpoll: 5 # use_vrf: default # - peer: 192.0.2.2 # key_id: 2 # prefer: True # use_vrf: siteA # servers: # - server: 198.51.100.1 # key_id: 2 # use_vrf: default # - server: 203.0.113.1 # key_id: 1 # use_vrf: siteB # # commands: # - "no ntp authenticate" # - "no ntp logging" # - "no ntp master 2" # - "no ntp authentication-keys 1001 md5 vagwwtKfkv 7" # - "no ntp authentication-keys 1002 md5 vagwwtKfkvgthz 7" # - "no ntp peer 192.0.2.1 use-vrf default key 1 minpoll 5 maxpoll 15" # - "no ntp peer 192.0.2.2 prefer use-vrf siteA key 2" # - "no ntp server 198.51.100.1 use-vrf default key 2" # - "no ntp server 203.0.113.1 use-vrf siteB key 1" # - "no ntp access-group peer PeerAcl1" # - "no ntp access-group serve ServeAcl1" # # after: {} # After state: # ------------ # nxos-9k-rdo# show running-config ntp # nxos-9k-rdo# # Using rendered - name: Render platform specific configuration lines with state rendered (without connecting to the device) cisco.nxos.nxos_ntp_global: config: access_group: peer: - access_list: PeerAcl1 serve: - access_list: ServeAcl1 authenticate: True authentication_keys: - id: 1001 key: vagwwtKfkv encryption: 7 - id: 1002 key: vagwwtKfkvgthz encryption: 7 logging: True master: stratum: 2 peers: - peer: 192.0.2.1 key_id: 1 maxpoll: 15 minpoll: 5 use_vrf: default - peer: 192.0.2.2 key_id: 2 prefer: True use_vrf: siteA servers: - server: 198.51.100.1 key_id: 2 use_vrf: default - server: 203.0.113.1 key_id: 1 use_vrf: siteB state: rendered # Task Output (redacted) # ----------------------- # rendered: # - "ntp authenticate" # - "ntp logging" # - "ntp master 2" # - "ntp authentication-keys 1001 md5 vagwwtKfkv 7" # - "ntp authentication-keys 1002 md5 vagwwtKfkvgthz 7" # - "ntp peer 192.0.2.1 use-vrf default key 1 minpoll 5 maxpoll 15" # - "ntp peer 192.0.2.2 prefer use-vrf siteA key 2" # - "ntp server 198.51.100.1 use-vrf default key 2" # - "ntp server 203.0.113.1 use-vrf siteB key 1" # - "ntp access-group peer PeerAcl1" # - "ntp access-group serve ServeAcl1" # Using parsed # parsed.cfg # ------------ # ntp authenticate # ntp logging # ntp master 2 # ntp authentication-keys 1001 md5 vagwwtKfkv 7 # ntp authentication-keys 1002 md5 vagwwtKfkvgthz 7 # ntp peer 192.0.2.1 use-vrf default key 1 minpoll 5 maxpoll 15 # ntp peer 192.0.2.2 prefer use-vrf siteA key 2 # ntp server 198.51.100.1 use-vrf default key 2 # ntp server 203.0.113.1 use-vrf siteB key 1 # ntp access-group peer PeerAcl1 # ntp access-group serve ServeAcl1 - name: Parse externally provided ntp configuration cisco.nxos.nxos_ntp_global: running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # access_group: # peer: # - access_list: PeerAcl1 # serve: # - access_list: ServeAcl1 # authenticate: True # authentication_keys: # - id: 1001 # key: vagwwtKfkv # encryption: 7 # - id: 1002 # key: vagwwtKfkvgthz # encryption: 7 # logging: True # master: # stratum: 2 # peers: # - peer: 192.0.2.1 # key_id: 1 # maxpoll: 15 # minpoll: 5 # use_vrf: default # - peer: 192.0.2.2 # key_id: 2 # prefer: True # use_vrf: siteA # servers: # - server: 198.51.100.1 # key_id: 2 # use_vrf: default # - server: 203.0.113.1 # key_id: 1 # use_vrf: siteB ``` 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 resulting configuration after module execution. **Sample:** This output will always be in the same format as the module argspec. | | **before** dictionary | when *state* is `merged`, `replaced`, `overridden`, `deleted` or `purged` | The configuration prior to the module execution. **Sample:** This output will always be in the same format as the module argspec. | | **commands** list / elements=string | when *state* is `merged`, `replaced`, `overridden`, `deleted` or `purged` | The set of commands pushed to the remote device. **Sample:** ['ntp master stratum 2', 'ntp peer 198.51.100.1 use-vrf test maxpoll 7', 'ntp authentication-key 10 md5 wawyhanx2 7', 'ntp access-group peer PeerAcl1', 'ntp access-group peer PeerAcl2', 'ntp access-group query-only QueryAcl1'] | | **gathered** list / elements=string | when *state* is `gathered` | Facts about the network resource gathered from the remote device as structured data. **Sample:** This output will always be in the same format as the module argspec. | | **parsed** list / elements=string | when *state* is `parsed` | The device native config provided in *running\_config* option parsed into structured data as per module argspec. **Sample:** This output will always be in the same format as the module argspec. | | **rendered** list / elements=string | when *state* is `rendered` | The provided configuration in the task rendered in device-native format (offline). **Sample:** ['ntp master stratum 2', 'ntp peer 198.51.100.1 use-vrf test maxpoll 7', 'ntp authentication-key 10 md5 wawyhanx2 7', 'ntp access-group peer PeerAcl1', 'ntp access-group peer PeerAcl2', 'ntp access-group query-only QueryAcl1'] | ### Authors * Nilashish Chakraborty (@NilashishC) ansible cisco.nxos.nxos_vrrp – Manages VRRP configuration on NX-OS switches. cisco.nxos.nxos\_vrrp – Manages VRRP configuration on NX-OS switches. ===================================================================== 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_vrrp`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages VRRP configuration on NX-OS switches. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **admin\_state** string | **Choices:*** **shutdown** ← * no shutdown * default | Used to enable or disable the VRRP process. | | **authentication** string | | Clear text authentication string or 'default' keyword | | **group** string / required | | VRRP group number. | | **interface** string / required | | Full name of interface that is being managed for VRRP. | | **interval** string | | Time interval between advertisement or 'default' keyword | | **preempt** boolean | **Choices:*** no * yes | Enable/Disable preempt. | | **priority** string | | VRRP priority or 'default' keyword | | **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. | | **state** string | **Choices:*** **present** ← * absent | Specify desired state of the resource. | | **vip** string | | VRRP virtual IP address or 'default' keyword | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * VRRP feature needs to be enabled first on the system. * SVIs must exist before using this module. * Interface must be a L3 port before using this module. * `state=absent` removes the VRRP group if it exists on the device. * VRRP cannot be configured on loopback interfaces. * 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: Ensure vrrp group 100 and vip 10.1.100.1 is on vlan10 cisco.nxos.nxos_vrrp: interface: vlan10 group: 100 vip: 10.1.100.1 - name: Ensure removal of the vrrp group config cisco.nxos.nxos_vrrp: interface: vlan10 group: 100 vip: 10.1.100.1 state: absent - name: Re-config with more params cisco.nxos.nxos_vrrp: interface: vlan10 group: 100 vip: 10.1.100.1 preempt: false priority: 130 authentication: AUTHKEY ``` 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 | commands sent to the device **Sample:** ['interface vlan10', 'vrrp 150', 'address 10.1.15.1', 'authentication text testing', 'no shutdown'] | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele)
programming_docs
ansible cisco.nxos.nxos_vrf_af – Manages VRF AF. cisco.nxos.nxos\_vrf\_af – Manages VRF AF. ========================================== 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_vrf_af`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages VRF AF Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **afi** string / required | **Choices:*** ipv4 * ipv6 | Address-Family Identifier (AFI). | | **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. | | **route\_target\_both\_auto\_evpn** boolean | **Choices:*** no * yes | Enable/Disable the EVPN route-target 'auto' setting for both import and export target communities. | | **route\_targets** list / elements=dictionary | | Specify the route-targets which should be imported and/or exported under the AF. This argument accepts a list of dicts that specify the route-target, the direction (import|export|both) and state of each route-target. Default direction is `direction=both`. See examples. | | | **direction** string | **Choices:*** import * export * **both** ← | Indicates the direction of the route-target (import|export|both) | | | **rt** string / required | | Defines the route-target itself | | | **state** string | **Choices:*** **present** ← * absent | Determines whether the route-target with the given direction should be present or not on the device. | | **state** string | **Choices:*** **present** ← * absent | Determines whether the config should be present or not on the device. | | **vrf** string / required | | Name of the VRF. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * Default, where supported, restores params default value. * In case of `state=absent` the address-family configuration will be absent. Therefore the options `route_target_both_auto_evpn` and `route_targets` are ignored. * 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 -------- ``` - cisco.nxos.nxos_vrf_af: vrf: ntc afi: ipv4 route_target_both_auto_evpn: true state: present - cisco.nxos.nxos_vrf_af: vrf: ntc afi: ipv4 route_targets: - rt: 65000:1000 direction: import - rt: 65001:1000 direction: import - cisco.nxos.nxos_vrf_af: vrf: ntc afi: ipv4 route_targets: - rt: 65000:1000 direction: import - rt: 65001:1000 state: absent - cisco.nxos.nxos_vrf_af: vrf: ntc afi: ipv4 route_targets: - rt: 65000:1000 direction: export - rt: 65001:1000 direction: export - cisco.nxos.nxos_vrf_af: vrf: ntc afi: ipv4 route_targets: - rt: 65000:1000 direction: export state: absent - cisco.nxos.nxos_vrf_af: vrf: ntc afi: ipv4 route_targets: - rt: 65000:1000 direction: both state: present - rt: 65001:1000 direction: import state: present - rt: 65002:1000 direction: both 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 | commands sent to the device **Sample:** ['vrf context ntc', 'address-family ipv4 unicast'] | ### Authors * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_command – Run arbitrary command on Cisco NXOS devices 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) ansible cisco.nxos.nxos_config – Manage Cisco NXOS configuration sections cisco.nxos.nxos\_config – Manage Cisco NXOS configuration sections ================================================================== 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_config`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Cisco NXOS configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with NXOS configuration sections in a deterministic way. This module works with either CLI or NXAPI 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 *True*, if `backup` is set to *false* 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 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 * intended * running | 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. | | **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 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 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. | | **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. replace *config* will only work for NX-OS versions that support `config replace`. | | **replace\_src** string | | The *replace\_src* argument provides path to the configuration file to load into the remote system. This argument is used to replace the entire config with a flat-file. This is used with argument *replace* with value *config*. This is mutually exclusive with the *lines* and *src* arguments. This argument will only work for NX-OS versions that support `config replace`. Use *nxos\_file\_copy* module to copy the flat file to remote device and then use the path with this argument. The configuration lines in the file 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. | | **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 comparison. 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.6. | | **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. 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 * Unsupported for Cisco MDS * Abbreviated commands are NOT idempotent, see [https://docs.ansible.com/ansible/latest/network/user\_guide/faq.html#why-do-the-config-modules-always-return-changed-true-with-abbreviated-commands](../../../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 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: configure top level configuration and save it cisco.nxos.nxos_config: lines: hostname {{ inventory_hostname }} save_when: modified - name: diff the running-config against a provided config cisco.nxos.nxos_config: diff_against: intended intended_config: "{{ lookup('file', 'master.cfg') }}" - cisco.nxos.nxos_config: lines: - 10 permit ip 192.0.2.1/32 any log - 20 permit ip 192.0.2.2/32 any log - 30 permit ip 192.0.2.3/32 any log - 40 permit ip 192.0.2.4/32 any log - 50 permit ip 192.0.2.5/32 any log parents: ip access-list test before: no ip access-list test match: exact - cisco.nxos.nxos_config: lines: - 10 permit ip 192.0.2.1/32 any log - 20 permit ip 192.0.2.2/32 any log - 30 permit ip 192.0.2.3/32 any log - 40 permit ip 192.0.2.4/32 any log parents: ip access-list test before: no ip access-list test replace: block - name: replace config with flat file cisco.nxos.nxos_config: replace_src: config.txt replace: config - name: for idempotency, use full-form commands cisco.nxos.nxos_config: lines: # - shut - shutdown # parents: int eth1/1 parents: interface Ethernet1/1 - name: configurable backup path cisco.nxos.nxos_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/nxos\_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 foo', 'vlan 1', 'name default'] | | **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:** nxos\_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/nxos\_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 foo', 'vlan 1', 'name default'] | ### Authors * Peter Sprygada (@privateip)
programming_docs
ansible cisco.nxos.nxos_ospfv3 – OSPFv3 resource module cisco.nxos.nxos\_ospfv3 – OSPFv3 resource module ================================================ 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_ospfv3`. New in version 1.2.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages OSPFv3 configuration on devices running Cisco NX-OS. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | A list of OSPFv3 process configuration. | | | **processes** list / elements=dictionary | | A list of OSPFv3 instances' configurations. | | | | **address\_family** dictionary | | IPv6 unicast address-family OSPFv3 settings. | | | | | **afi** string | **Choices:*** ipv6 | Configure OSPFv3 settings under IPv6 address-family. | | | | | **areas** list / elements=dictionary | | Configure properties of OSPF Areas under address-family. | | | | | | **area\_id** string / required | | The Area ID in IP Address format. | | | | | | **default\_cost** integer | | Specify the default cost. | | | | | | **filter\_list** list / elements=dictionary | | Filter prefixes between OSPF areas. | | | | | | | **direction** string / required | **Choices:*** in * out | The direction to apply the route map. | | | | | | | **route\_map** string / required | | The Route-map name. | | | | | | **ranges** list / elements=dictionary | | Configure an address range for the area. | | | | | | | **cost** integer | | Cost to use for the range. | | | | | | | **not\_advertise** boolean | **Choices:*** no * yes | Suppress advertising the specified range. | | | | | | | **prefix** string / required | | IP in Prefix format (x.x.x.x/len) | | | | | **default\_information** dictionary | | Control distribution of default routes. | | | | | | **originate** dictionary | | Distribute a default route. | | | | | | | **always** boolean | **Choices:*** no * yes | Always advertise a default route. | | | | | | | **route\_map** string | | Policy to control distribution of default routes | | | | | | | **set** boolean | **Choices:*** no * yes | Enable distribution of default route. | | | | | **distance** integer | | Configure the OSPF administrative distance. | | | | | **maximum\_paths** integer | | Maximum paths per destination. | | | | | **redistribute** list / elements=dictionary | | Redistribute information from another routing protocol. | | | | | | **id** string | | The identifier for the protocol specified. | | | | | | **protocol** string / required | **Choices:*** bgp * direct * eigrp * isis * lisp * ospfv3 * rip * static | The name of the protocol. | | | | | | **route\_map** string / required | | The route map policy to constrain redistribution. | | | | | **safi** string | **Choices:*** unicast | Configure OSPFv3 settings under IPv6 unicast address-family. | | | | | **summary\_address** list / elements=dictionary | | Configure route summarization for redistribution. | | | | | | **not\_advertise** boolean | **Choices:*** no * yes | Suppress advertising the specified summary. | | | | | | **prefix** string / required | | IPv6 prefix format 'xxxx:xxxx/ml', 'xxxx:xxxx::/ml' or 'xxxx::xx/128' | | | | | | **tag** integer | | A 32-bit tag value. | | | | | **table\_map** dictionary | | Policy for filtering/modifying OSPF routes before sending them to RIB. | | | | | | **filter** boolean | **Choices:*** no * yes | Block the OSPF routes from being sent to RIB. | | | | | | **name** string / required | | The Route Map name. | | | | | **timers** dictionary | | Configure timer related constants. | | | | | | **throttle** dictionary | | Configure throttle related constants. | | | | | | | **spf** dictionary | | Set OSPF SPF timers. | | | | | | | | **initial\_spf\_delay** integer | | Initial SPF schedule delay in milliseconds. | | | | | | | | **max\_wait\_time** integer | | Maximum wait time between SPF calculations. | | | | | | | | **min\_hold\_time** integer | | Minimum hold time between SPF calculations. | | | | **areas** list / elements=dictionary | | Configure properties of OSPF Areas. | | | | | **area\_id** string / required | | The Area ID in IP Address format. | | | | | **nssa** dictionary | | NSSA settings for the area. | | | | | | **default\_information\_originate** boolean | **Choices:*** no * yes | Originate Type-7 default LSA into NSSA area. | | | | | | **no\_redistribution** boolean | **Choices:*** no * yes | Do not send redistributed LSAs into NSSA area. | | | | | | **no\_summary** boolean | **Choices:*** no * yes | Do not send summary LSAs into NSSA area. | | | | | | **route\_map** string | | Policy to control distribution of default route. | | | | | | **set** boolean | **Choices:*** no * yes | Configure area as NSSA. | | | | | | **translate** dictionary | | Translate LSA. | | | | | | | **type7** dictionary | | Translate from Type 7 to Type 5. | | | | | | | | **always** boolean | **Choices:*** no * yes | Always translate LSAs | | | | | | | | **never** boolean | **Choices:*** no * yes | Never translate LSAs | | | | | | | | **supress\_fa** boolean | **Choices:*** no * yes | Suppress forwarding address in translated LSAs. | | | | | **stub** dictionary | | Settings for configuring the area as a stub. | | | | | | **no\_summary** boolean | **Choices:*** no * yes | Prevent ABR from sending summary LSAs into stub area. | | | | | | **set** boolean | **Choices:*** no * yes | Configure the area as a stub. | | | | **auto\_cost** dictionary | | Calculate OSPF cost according to bandwidth. | | | | | **reference\_bandwidth** integer / required | | Reference bandwidth used to assign OSPF cost. | | | | | **unit** string / required | **Choices:*** Gbps * Mbps | Specify in which unit the reference bandwidth is specified. | | | | **flush\_routes** boolean | **Choices:*** no * yes | Flush routes on a non-graceful controlled restart. | | | | **graceful\_restart** dictionary | | Configure graceful restart. | | | | | **grace\_period** integer | | Configure maximum interval to restart gracefully. | | | | | **helper\_disable** boolean | **Choices:*** no * yes | Enable/Disable helper mode. | | | | | **planned\_only** boolean | **Choices:*** no * yes | Enable graceful restart only for a planned restart | | | | | **set** boolean | **Choices:*** no * yes | Enable graceful-restart. | | | | **isolate** boolean | **Choices:*** no * yes | Isolate this router from OSPF perspective. | | | | **log\_adjacency\_changes** dictionary | | Log changes in adjacency state. | | | | | **detail** boolean | **Choices:*** no * yes | Notify all state changes. | | | | | **log** boolean | **Choices:*** no * yes | Enable/disable logging changes in adjacency state. | | | | **max\_lsa** dictionary | | Feature to limit the number of non-self-originated LSAs. | | | | | **ignore\_count** integer | | Set count on how many times adjacencies can be suppressed. | | | | | **ignore\_time** integer | | Set time during which all adjacencies are suppressed. | | | | | **max\_non\_self\_generated\_lsa** integer / required | | Set the maximum number of non self-generated LSAs. | | | | | **reset\_time** integer | | Set number of minutes after which ignore-count is reset to zero. | | | | | **threshold** integer | | Threshold value (%) at which to generate a warning message. | | | | | **warning\_only** boolean | **Choices:*** no * yes | Log a warning message when limit is exceeded. | | | | **max\_metric** dictionary | | Maximize the cost metric. | | | | | **router\_lsa** dictionary | | Router LSA configuration. | | | | | | **external\_lsa** dictionary | | External LSA configuration. | | | | | | | **max\_metric\_value** integer | | Set max metric value for external LSAs. | | | | | | | **set** boolean | **Choices:*** no * yes | Set external-lsa attribute. | | | | | | **inter\_area\_prefix\_lsa** dictionary | | Inter-area-prefix LSAs configuration. | | | | | | | **max\_metric\_value** integer | | Max metric value for summary LSAs. | | | | | | | **set** boolean | **Choices:*** no * yes | Set summary-lsa attribute. | | | | | | **on\_startup** dictionary | | Effective only at startup. | | | | | | | **set** boolean | **Choices:*** no * yes | Set on-startup attribute. | | | | | | | **wait\_for\_bgp\_asn** integer | | ASN of BGP to wait for. | | | | | | | **wait\_period** integer | | Wait period in seconds after startup. | | | | | | **set** boolean | **Choices:*** no * yes | Set router-lsa attribute. | | | | | | **stub\_prefix\_lsa** boolean | **Choices:*** no * yes | Advertise Max metric for Stub links as well. | | | | **name\_lookup** boolean | **Choices:*** no * yes | Display OSPF router ids as DNS names. | | | | **passive\_interface** dictionary | | Suppress routing updates on the interface. | | | | | **default** boolean | **Choices:*** no * yes | Interfaces passive by default. | | | | **process\_id** string / required | | The OSPF process tag. | | | | **router\_id** string | | Set OSPF process router-id. | | | | **shutdown** boolean | **Choices:*** no * yes | Shutdown the OSPF protocol instance. | | | | **timers** dictionary | | Configure timer related constants. | | | | | **lsa\_arrival** integer | | Mimimum interval between arrival of a LSA. | | | | | **lsa\_group\_pacing** integer | | LSA group refresh/maxage interval. | | | | | **throttle** dictionary | | Configure throttle related constants. | | | | | | **lsa** dictionary | | Set rate-limiting for LSA generation. | | | | | | | **hold\_interval** integer | | The hold interval. | | | | | | | **max\_interval** integer | | The max interval. | | | | | | | **start\_interval** integer | | The start interval. | | | | **vrfs** list / elements=dictionary | | Configure VRF specific OSPF settings. | | | | | **areas** list / elements=dictionary | | Configure properties of OSPF Areas. | | | | | | **area\_id** string / required | | The Area ID in IP Address format. | | | | | | **nssa** dictionary | | NSSA settings for the area. | | | | | | | **default\_information\_originate** boolean | **Choices:*** no * yes | Originate Type-7 default LSA into NSSA area. | | | | | | | **no\_redistribution** boolean | **Choices:*** no * yes | Do not send redistributed LSAs into NSSA area. | | | | | | | **no\_summary** boolean | **Choices:*** no * yes | Do not send summary LSAs into NSSA area. | | | | | | | **route\_map** string | | Policy to control distribution of default route. | | | | | | | **set** boolean | **Choices:*** no * yes | Configure area as NSSA. | | | | | | | **translate** dictionary | | Translate LSA. | | | | | | | | **type7** dictionary | | Translate from Type 7 to Type 5. | | | | | | | | | **always** boolean | **Choices:*** no * yes | Always translate LSAs | | | | | | | | | **never** boolean | **Choices:*** no * yes | Never translate LSAs | | | | | | | | | **supress\_fa** boolean | **Choices:*** no * yes | Suppress forwarding address in translated LSAs. | | | | | | **stub** dictionary | | Settings for configuring the area as a stub. | | | | | | | **no\_summary** boolean | **Choices:*** no * yes | Prevent ABR from sending summary LSAs into stub area. | | | | | | | **set** boolean | **Choices:*** no * yes | Configure the area as a stub. | | | | | **auto\_cost** dictionary | | Calculate OSPF cost according to bandwidth. | | | | | | **reference\_bandwidth** integer / required | | Reference bandwidth used to assign OSPF cost. | | | | | | **unit** string / required | **Choices:*** Gbps * Mbps | Specify in which unit the reference bandwidth is specified. | | | | | **graceful\_restart** dictionary | | Configure graceful restart. | | | | | | **grace\_period** integer | | Configure maximum interval to restart gracefully. | | | | | | **helper\_disable** boolean | **Choices:*** no * yes | Enable/Disable helper mode. | | | | | | **planned\_only** boolean | **Choices:*** no * yes | Enable graceful restart only for a planned restart | | | | | | **set** boolean | **Choices:*** no * yes | Enable graceful-restart. | | | | | **log\_adjacency\_changes** dictionary | | Log changes in adjacency state. | | | | | | **detail** boolean | **Choices:*** no * yes | Notify all state changes. | | | | | | **log** boolean | **Choices:*** no * yes | Enable/disable logging changes in adjacency state. | | | | | **max\_lsa** dictionary | | Feature to limit the number of non-self-originated LSAs. | | | | | | **ignore\_count** integer | | Set count on how many times adjacencies can be suppressed. | | | | | | **ignore\_time** integer | | Set time during which all adjacencies are suppressed. | | | | | | **max\_non\_self\_generated\_lsa** integer / required | | Set the maximum number of non self-generated LSAs. | | | | | | **reset\_time** integer | | Set number of minutes after which ignore-count is reset to zero. | | | | | | **threshold** integer | | Threshold value (%) at which to generate a warning message. | | | | | | **warning\_only** boolean | **Choices:*** no * yes | Log a warning message when limit is exceeded. | | | | | **max\_metric** dictionary | | Maximize the cost metric. | | | | | | **router\_lsa** dictionary | | Router LSA configuration. | | | | | | | **external\_lsa** dictionary | | External LSA configuration. | | | | | | | | **max\_metric\_value** integer | | Set max metric value for external LSAs. | | | | | | | | **set** boolean | **Choices:*** no * yes | Set external-lsa attribute. | | | | | | | **inter\_area\_prefix\_lsa** dictionary | | Inter-area-prefix LSAs configuration. | | | | | | | | **max\_metric\_value** integer | | Max metric value for summary LSAs. | | | | | | | | **set** boolean | **Choices:*** no * yes | Set summary-lsa attribute. | | | | | | | **on\_startup** dictionary | | Effective only at startup. | | | | | | | | **set** boolean | **Choices:*** no * yes | Set on-startup attribute. | | | | | | | | **wait\_for\_bgp\_asn** integer | | ASN of BGP to wait for. | | | | | | | | **wait\_period** integer | | Wait period in seconds after startup. | | | | | | | **set** boolean | **Choices:*** no * yes | Set router-lsa attribute. | | | | | | | **stub\_prefix\_lsa** boolean | **Choices:*** no * yes | Advertise Max metric for Stub links as well. | | | | | **name\_lookup** boolean | **Choices:*** no * yes | Display OSPF router ids as DNS names. | | | | | **passive\_interface** dictionary | | Suppress routing updates on the interface. | | | | | | **default** boolean | **Choices:*** no * yes | Interfaces passive by default. | | | | | **router\_id** string | | Set OSPF process router-id. | | | | | **shutdown** boolean | **Choices:*** no * yes | Shutdown the OSPF protocol instance. | | | | | **timers** dictionary | | Configure timer related constants. | | | | | | **lsa\_arrival** integer | | Mimimum interval between arrival of a LSA. | | | | | | **lsa\_group\_pacing** integer | | LSA group refresh/maxage interval. | | | | | | **throttle** dictionary | | Configure throttle related constants. | | | | | | | **lsa** dictionary | | Set rate-limiting for LSA generation. | | | | | | | | **hold\_interval** integer | | The hold interval. | | | | | | | | **max\_interval** integer | | The max interval. | | | | | | | | **start\_interval** integer | | The start interval. | | | | | **vrf** string / required | | Name/Identifier of the VRF. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the command **show running-config | section "^router ospfv3"**. 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 * gathered * parsed * rendered | The state the configuration should be left in. | Notes ----- Note * Tested against NX-OS 7.0(3)I5(1). * Unsupported for Cisco MDS * This module works with connection `network_cli` and `httpapi`. Examples -------- ``` # Using merged # Before state: # ------------- # nxos-9k-rdo# sh running-config | section "^router ospfv3" # nxos-9k-rdo# - name: Merge the provided configuration with the existing running configuration cisco.nxos.nxos_ospfv3: config: processes: - process_id: 100 router_id: 203.0.113.20 - process_id: 102 router_id: 198.51.100.1 address_family: afi: ipv6 safi: unicast areas: - area_id: 0.0.0.100 filter_list: - route_map: rmap_1 direction: in - route_map: rmap_2 direction: out ranges: - prefix: 2001:db2::/32 not_advertise: true - prefix: 2001:db3::/32 cost: 120 redistribute: - protocol: eigrp id: 120 route_map: rmap_1 - protocol: direct route_map: ospf102-direct-connect vrfs: - vrf: zone1 router_id: 198.51.100.129 areas: - area_id: 0.0.0.102 nssa: default_information_originate: true no_summary: true - area_id: 0.0.0.103 nssa: no_summary: true translate: type7: always: true - vrf: zone2 auto_cost: reference_bandwidth: 45 unit: Gbps state: merged # Task output # ------------- # before: {} # # commands: # - router ospf 102 # - router-id 198.51.100.1 # - address-family ipv6 unicast # - redistribute eigrp 120 route-map rmap_1 # - redistribute direct route-map ospf102-direct-connect # - area 0.0.0.100 filter-list route-map rmap_1 in # - area 0.0.0.100 filter-list route-map rmap_2 out # - area 0.0.0.100 range 2001:db2::/32 not-advertise # - area 0.0.0.100 range 2001:db3::/32 cost 120 # - vrf zone1 # - router-id 198.51.100.129 # - area 0.0.0.102 nssa no-summary default-information-originate # - area 0.0.0.103 nssa no-summary # - area 0.0.0.103 nssa translate type7 always # - vrf zone2 # - auto-cost reference-bandwidth 45 Gbps # - router ospf 100 # - router-id 203.0.113.20 # # after: # processes: # - process_id: "100" # router_id: 203.0.113.20 # - address_family: # afi: ipv4 # safi: unicast # areas: # - area_id: 0.0.0.100 # filter_list: # - direction: out # route_map: rmap_2 # - direction: in # route_map: rmap_1 # ranges: # - not_advertise: true # prefix: 2001:db2::/32 # - cost: 120 # prefix: 2001:db3::/32 # redistribute: # - protocol: direct # route_map: ospf102-direct-connect # - id: "120" # protocol: eigrp # route_map: rmap_1 # process_id: "102" # router_id: 198.51.100.1 # vrfs: # - areas: # - area_id: 0.0.0.102 # nssa: # default_information_originate: true # no_summary: true # - area_id: 0.0.0.103 # nssa: # no_summary: true # translate: # type7: # always: true # router_id: 198.51.100.129 # vrf: zone1 # - auto_cost: # reference_bandwidth: 45 # unit: Gbps # vrf: zone2 # # After state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospfv3" # router ospfv3 100 # router-id 203.0.113.20 # router ospfv3 102 # router-id 198.51.100.1 # address-family ipv6 unicast # redistribute direct route-map ospf102-direct-connect # redistribute eigrp 120 route-map rmap_1 # area 0.0.0.100 filter-list route-map rmap_2 out # area 0.0.0.100 filter-list route-map rmap_1 in # area 0.0.0.100 range 2001:db2::/32 not-advertise # area 0.0.0.100 range 2001:db3::/32 cost 120 # vrf zone1 # router-id 198.51.100.129 # area 0.0.0.102 nssa no-summary default-information-originate # area 0.0.0.103 nssa no-summary # area 0.0.0.103 nssa translate type7 always # vrf zone2 # auto-cost reference-bandwidth 45 Gbps # Using replaced # Before state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospfv3" # router ospfv3 100 # router-id 203.0.113.20 # router ospfv3 102 # router-id 198.51.100.1 # address-family upv6 unicast # redistribute direct route-map ospf102-direct-connect # redistribute eigrp 120 route-map rmap_1 # area 0.0.0.100 filter-list route-map rmap_2 out # area 0.0.0.100 filter-list route-map rmap_1 in # area 0.0.0.100 range 2001:db2::/32 not-advertise # area 0.0.0.100 range 2001:db3::/32 cost 120 # vrf zone1 # router-id 198.51.100.129 # area 0.0.0.102 nssa no-summary default-information-originate # area 0.0.0.103 nssa no-summary # area 0.0.0.103 nssa translate type7 always # vrf zone2 # auto-cost reference-bandwidth 45 Gbps - name: Replace device configurations of listed OSPFv3 processes with provided configurations cisco.nxos.nxos_ospfv3: config: processes: - process_id: 102 router_id: 198.51.100.1 address_family: afi: ipv6 safi: unicast areas: - area_id: 0.0.0.100 filter_list: - route_map: rmap_8 direction: in ranges: - not_advertise: true prefix: 2001:db2::/32 redistribute: - protocol: eigrp id: 130 route_map: rmap_1 - protocol: direct route_map: ospf102-direct-connect vrfs: - vrf: zone1 router_id: 198.51.100.129 areas: - area_id: 0.0.0.102 nssa: default_information_originate: True no_summary: True state: replaced # Task output # ------------- # before: # processes: # - process_id: "100" # router_id: 203.0.113.20 # - address_family: # afi: ipv4 # safi: unicast # areas: # - area_id: 0.0.0.100 # filter_list: # - direction: out # route_map: rmap_2 # - direction: in # route_map: rmap_1 # ranges: # - not_advertise: true # prefix: 2001:db2::/32 # - cost: 120 # prefix: 2001:db3::/32 # redistribute: # - protocol: direct # route_map: ospf102-direct-connect # - id: "120" # protocol: eigrp # route_map: rmap_1 # process_id: "102" # router_id: 198.51.100.1 # vrfs: # - areas: # - area_id: 0.0.0.102 # nssa: # default_information_originate: true # no_summary: true # - area_id: 0.0.0.103 # nssa: # no_summary: true # translate: # type7: # always: true # router_id: 198.51.100.129 # vrf: zone1 # - auto_cost: # reference_bandwidth: 45 # unit: Gbps # vrf: zone2 # # commands: # - router ospf 102 # - address-family ipv6 unicast # - redistribute eigrp 130 route-map rmap_1 # - no redistribute eigrp 120 route-map rmap_1 # - area 0.0.0.100 filter-list route-map rmap_8 in # - no area 0.0.0.100 filter-list route-map rmap_2 out # - no area 0.0.0.100 range 2001:db3::/32 # - vrf zone1 # - no area 0.0.0.103 nssa # - no area 0.0.0.103 nssa translate type7 always # - no vrf zone2 # # after: # processes: # - process_id: "100" # router_id: 203.0.113.20 # - address_family: # afi: ipv6 # safi: unicast # areas: # - area_id: 0.0.0.100 # filter_list: # - direction: in # route_map: rmap_8 # ranges: # - not_advertise: true # prefix: 2001:db2::/32 # redistribute: # - protocol: direct # route_map: ospf102-direct-connect # - id: "130" # protocol: eigrp # route_map: rmap_1 # process_id: "102" # router_id: 198.51.100.1 # vrfs: # - areas: # - area_id: 0.0.0.102 # nssa: # default_information_originate: true # no_summary: true # router_id: 198.51.100.129 # vrf: zone1 # After state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospfv3" # router ospfv3 100 # router-id 203.0.113.20 # router ospfv3 102 # router-id 198.51.100.1 # address-family ipv6 unicast # redistribute direct route-map ospf102-direct-connect # redistribute eigrp 130 route-map rmap_1 # area 0.0.0.100 filter-list route-map rmap_8 in # area 0.0.0.100 range 198.51.100.64/27 not-advertise # vrf zone1 # router-id 198.51.100.129 # area 0.0.0.102 nssa no-summary default-information-originate # Using overridden # Before state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospfv3" # router ospfv3 100 # router-id 203.0.113.20 # router ospfv3 102 # router-id 198.51.100.1 # address-family ipv6 unicast # redistribute direct route-map ospf102-direct-connect # redistribute eigrp 120 route-map rmap_1 # area 0.0.0.100 filter-list route-map rmap_2 out # area 0.0.0.100 filter-list route-map rmap_1 in # area 0.0.0.100 range 2001:db2::/32 not-advertise # area 0.0.0.100 range 2001:db3::/32 cost 120 # vrf zone1 # router-id 198.51.100.129 # area 0.0.0.102 nssa no-summary default-information-originate # area 0.0.0.103 nssa no-summary # area 0.0.0.103 nssa translate type7 always # vrf zone2 # auto-cost reference-bandwidth 45 Gbps - name: Override all OSPFv3 configuration with provided configuration cisco.nxos.nxos_ospfv3: config: processes: - process_id: 104 router_id: 203.0.113.20 - process_id: 102 router_id: 198.51.100.1 shutdown: true state: overridden # Task output # ------------- # before: # processes: # - process_id: "100" # router_id: 203.0.113.20 # - address_family: # afi: ipv4 # safi: unicast # areas: # - area_id: 0.0.0.100 # filter_list: # - direction: out # route_map: rmap_2 # - direction: in # route_map: rmap_1 # ranges: # - not_advertise: true # prefix: 2001:db2::/32 # - cost: 120 # prefix: 2001:db3::/32 # redistribute: # - protocol: direct # route_map: ospf102-direct-connect # - id: "120" # protocol: eigrp # route_map: rmap_1 # process_id: "102" # router_id: 198.51.100.1 # vrfs: # - areas: # - area_id: 0.0.0.102 # nssa: # default_information_originate: true # no_summary: true # - area_id: 0.0.0.103 # nssa: # no_summary: true # translate: # type7: # always: true # router_id: 198.51.100.129 # vrf: zone1 # - auto_cost: # reference_bandwidth: 45 # unit: Gbps # vrf: zone2 # # commands: # - no router ospfv3 100 # - router ospfv3 104 # - router-id 203.0.113.20 # - router ospfv3 102 # - shutdown # - address-family ipv6 unicast # - no redistribute direct route-map ospf102-direct-connect # - no redistribute eigrp 120 route-map rmap_1 # - no area 0.0.0.100 filter-list route-map rmap_2 out # - no area 0.0.0.100 filter-list route-map rmap_1 in # - no area 0.0.0.100 range 2001:db2::/32 # - no area 0.0.0.100 range 2001:db3::/32 # - no vrf zone1 # - no vrf zone2 # # after: # processes: # - process_id: "102" # router_id: 198.51.100.1 # shutdown: true # address_family: # afi: ipv6 # safi: unicast # - process_id: "104" # router_id: 203.0.113.20 # After state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospfv3" # router ospfv3 102 # router-id 198.51.100.1 # address-family ipv6 unicast # shutdown # router ospfv3 104 # router-id 203.0.113.20 # Using deleted to delete a single OSPF process # Before state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospf .*" # router ospfv3 100 # router-id 203.0.113.20 # router ospfv3 102 # router-id 198.51.100.1 # address-family ipv6 unicast # redistribute direct route-map ospf102-direct-connect # redistribute eigrp 120 route-map rmap_1 # area 0.0.0.100 filter-list route-map rmap_2 out # area 0.0.0.100 filter-list route-map rmap_1 in # area 0.0.0.100 range 2001:db2::/32 not-advertise # area 0.0.0.100 range 2001:db3::/32 cost 120 # vrf zone1 # router-id 198.51.100.129 # area 0.0.0.102 nssa no-summary default-information-originate # area 0.0.0.103 nssa no-summary # area 0.0.0.103 nssa translate type7 always # vrf zone2 # auto-cost reference-bandwidth 45 Gbps - name: Delete a single OSPFv3 process cisco.nxos.nxos_ospfv3: config: processes: - process_id: 102 state: deleted # Task output # ------------- # before: # processes: # - process_id: "100" # router_id: 203.0.113.20 # - address_family: # afi: ipv4 # safi: unicast # areas: # - area_id: 0.0.0.100 # filter_list: # - direction: out # route_map: rmap_2 # - direction: in # route_map: rmap_1 # ranges: # - not_advertise: true # prefix: 2001:db2::/32 # - cost: 120 # prefix: 2001:db3::/32 # redistribute: # - protocol: direct # route_map: ospf102-direct-connect # - id: "120" # protocol: eigrp # route_map: rmap_1 # process_id: "102" # router_id: 198.51.100.1 # vrfs: # - areas: # - area_id: 0.0.0.102 # nssa: # default_information_originate: true # no_summary: true # - area_id: 0.0.0.103 # nssa: # no_summary: true # translate: # type7: # always: true # router_id: 198.51.100.129 # vrf: zone1 # - auto_cost: # reference_bandwidth: 45 # unit: Gbps # vrf: zone2 # # commands: # - no router ospfv3 102 # # after: # processes: # - process_id: "100" # router_id: 203.0.113.20 # After state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospfv3" # router ospfv3 100 # router-id 203.0.113.20 # Using deleted all OSPFv3 processes from the device # Before state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospfv3" # router ospfv3 100 # router-id 203.0.113.20 # router ospfv3 102 # router-id 198.51.100.1 # address-family ipv6 unicast # redistribute direct route-map ospf102-direct-connect # redistribute eigrp 120 route-map rmap_1 # area 0.0.0.100 filter-list route-map rmap_2 out # area 0.0.0.100 filter-list route-map rmap_1 in # area 0.0.0.100 range 2001:db2::/32 not-advertise # area 0.0.0.100 range 2001:db3::/32 cost 120 # vrf zone1 # router-id 198.51.100.129 # area 0.0.0.102 nssa no-summary default-information-originate # area 0.0.0.103 nssa no-summary # area 0.0.0.103 nssa translate type7 always # vrf zone2 # auto-cost reference-bandwidth 45 Gbps - name: Delete all OSPFv3 processes from the device cisco.nxos.nxos_ospfv3: state: deleted # Task output # ------------- # before: # processes: # - process_id: "100" # router_id: 203.0.113.20 # - address_family: # afi: ipv4 # safi: unicast # areas: # - area_id: 0.0.0.100 # filter_list: # - direction: out # route_map: rmap_2 # - direction: in # route_map: rmap_1 # ranges: # - not_advertise: true # prefix: 2001:db2::/32 # - cost: 120 # prefix: 2001:db3::/32 # redistribute: # - protocol: direct # route_map: ospf102-direct-connect # - id: "120" # protocol: eigrp # route_map: rmap_1 # process_id: "102" # router_id: 198.51.100.1 # vrfs: # - areas: # - area_id: 0.0.0.102 # nssa: # default_information_originate: true # no_summary: true # - area_id: 0.0.0.103 # nssa: # no_summary: true # translate: # type7: # always: true # router_id: 198.51.100.129 # vrf: zone1 # - auto_cost: # reference_bandwidth: 45 # unit: Gbps # vrf: zone2 # # commands: # - no router ospfv3 100 # - no router ospfv3 102 # # after: {} # After state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospfv3" # nxos-9k-rdo# # Using rendered - name: Render platform specific configuration lines with state rendered (without connecting to the device) cisco.nxos.nxos_ospfv3: config: processes: - process_id: 100 router_id: 203.0.113.20 - process_id: 102 router_id: 198.51.100.1 address_family: afi: ipv6 safi: unicast areas: - area_id: 0.0.0.100 filter_list: - route_map: rmap_1 direction: in - route_map: rmap_2 direction: out ranges: - prefix: 2001:db2::/32 not_advertise: true - prefix: 2001:db3::/32 cost: 120 redistribute: - protocol: eigrp id: 120 route_map: rmap_1 - protocol: direct route_map: ospf102-direct-connect vrfs: - vrf: zone1 router_id: 198.51.100.129 areas: - area_id: 0.0.0.102 nssa: default_information_originate: true no_summary: true - area_id: 0.0.0.103 nssa: no_summary: true translate: type7: always: true - vrf: zone2 auto_cost: reference_bandwidth: 45 unit: Gbps state: rendered # Task Output (redacted) # ----------------------- # rendered: # - router ospfv3 100 # - router-id 203.0.113.20 # - router ospfv3 102 # - router-id 198.51.100.1 # - address-family ipv6 unicast # - redistribute eigrp 120 route-map rmap_1 # - redistribute direct route-map ospf102-direct-connect # - area 0.0.0.100 filter-list route-map rmap_1 in # - area 0.0.0.100 filter-list route-map rmap_2 out # - area 0.0.0.100 range 2001:db2::/32 not-advertise # - area 0.0.0.100 range 2001:db3::/32 cost 120 # - vrf zone1 # - router-id 198.51.100.129 # - area 0.0.0.102 nssa no-summary default-information-originate # - area 0.0.0.103 nssa no-summary # - area 0.0.0.103 nssa translate type7 always # - vrf zone2 # - auto-cost reference-bandwidth 45 Gbps # Using parsed # parsed.cfg # ------------ # router ospfv3 100 # router-id 192.0.100.1 # address-family ipv6 unicast # redistribute direct route-map ospf-direct-connect # redistribute eigrp 120 route-map rmap_1 # area 0.0.0.100 filter-list route-map rmap_2 out # area 0.0.0.100 filter-list route-map rmap_1 in # area 0.0.0.100 range 2001:db2::/32 not-advertise # area 0.0.0.100 range 2001:db3::/32 cost 120 # vrf zone1 # router-id 198.51.100.129 # area 0.0.100.1 nssa no-summary no-redistribution # router ospfv3 102 # router-id 198.54.100.1 # shutdown - name: Parse externally provided OSPFv3 config cisco.nxos.nxos_ospfv3: running_config: "{{ lookup('file', 'ospfv2.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # processes: # - process_id: "100" # address_family: # afi: ipv6 # safi: unicast # areas: # - area_id: 0.0.0.101 # nssa: # no_redistribution: true # no_summary: true # - area_id: 0.0.0.102 # stub: # no_summary: true # filter_list: # - direction: out # route_map: rmap_2 # - direction: in # route_map: rmap_1 # ranges: # - not_advertise: true # prefix: 192.0.2.0/24 # - cost: 120 # prefix: 192.0.3.0/24 # redistribute: # - protocol: direct # route_map: ospf-direct-connect # - id: "120" # protocol: eigrp # route_map: rmap_1 # router_id: 192.0.100.1 # vrfs: # - vrf: zone1 # areas: # - area_id: 0.0.100.1 # nssa: # no_redistribution: true # no_summary: true # router_id: 192.0.100.2 # - process_id: "102" # router_id: 198.54.100.1 # shutdown: True # Using gathered - name: Gather OSPFv3 facts using gathered cisco.nxos.nxos_ospfv3: state: gathered # Task output (redacted) # ----------------------- # gathered: # processes: # - process_id: "100" # router_id: 203.0.113.20 # - address_family: # afi: ipv4 # safi: unicast # areas: # - area_id: 0.0.0.100 # filter_list: # - direction: out # route_map: rmap_2 # - direction: in # route_map: rmap_1 # ranges: # - not_advertise: true # prefix: 2001:db2::/32 # - cost: 120 # prefix: 2001:db3::/32 # redistribute: # - protocol: direct # route_map: ospf102-direct-connect # - id: "120" # protocol: eigrp # route_map: rmap_1 # process_id: "102" # router_id: 198.51.100.1 # vrfs: # - areas: # - area_id: 0.0.0.102 # nssa: # default_information_originate: true # no_summary: true # - area_id: 0.0.0.103 # nssa: # no_summary: true # translate: # type7: # always: true # router_id: 198.51.100.129 # vrf: zone1 # - auto_cost: # reference_bandwidth: 45 # unit: Gbps # vrf: zone2 # ``` 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 resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. | | **before** dictionary | always | The configuration prior to the model 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:** ['router ospfv3 102', 'router-id 198.54.100.1', 'router ospfv3 100', 'router-id 192.0.100.1', 'address-family ipv6 unicast', 'redistribute eigrp 120 route-map rmap\_1', 'redistribute direct route-map ospf-direct-connect', 'area 0.0.0.100 filter-list route-map rmap\_1 in', 'area 0.0.0.100 filter-list route-map rmap\_2 out', 'area 0.0.0.100 range 2001:db2::/32 not-advertise', 'area 0.0.0.100 range 2001:db3::/32 cost 120', 'vrf zone1', 'router-id 192.0.100.2', 'vrf zone2', 'auto-cost reference-bandwidth 45 Gbps'] | ### Authors * Nilashish Chakraborty (@NilashishC)
programming_docs
ansible cisco.nxos.nxos_ping – Tests reachability using ping from Nexus switch. cisco.nxos.nxos\_ping – Tests reachability using ping from Nexus switch. ======================================================================== 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_ping`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Tests reachability using ping from switch to a remote destination. * For a general purpose network module, see the [ansible.netcommon.net\_ping](../../ansible/netcommon/net_ping_module#ansible-collections-ansible-netcommon-net-ping-module) module. * For Windows targets, use the [ansible.windows.win\_ping](../../ansible/windows/win_ping_module#ansible-collections-ansible-windows-win-ping-module) module instead. * For targets running Python, use the [ansible.builtin.ping](../../ansible/builtin/ping_module#ansible-collections-ansible-builtin-ping-module) module instead. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **count** integer | **Default:**5 | Number of packets to send. | | **dest** string / required | | IP address or hostname (resolvable by switch) of remote node. | | **df\_bit** boolean | **Choices:*** **no** ← * yes | Set the DF bit. | | **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. | | **size** integer | | Size of packets to send. | | **source** string | | Source IP Address or hostname (resolvable by switch) | | **state** string | **Choices:*** absent * **present** ← | Determines if the expected result is success or fail. | | **vrf** string | | Outgoing VRF. | Notes ----- Note * Unsupported for Cisco MDS * For a general purpose network module, see the [ansible.netcommon.net\_ping](../../ansible/netcommon/net_ping_module#ansible-collections-ansible-netcommon-net-ping-module) module. * For Windows targets, use the [ansible.windows.win\_ping](../../ansible/windows/win_ping_module#ansible-collections-ansible-windows-win-ping-module) module instead. * For targets running Python, use the [ansible.builtin.ping](../../ansible/builtin/ping_module#ansible-collections-ansible-builtin-ping-module) module instead. * 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: Test reachability to 8.8.8.8 using mgmt vrf cisco.nxos.nxos_ping: dest: 8.8.8.8 vrf: management host: 68.170.147.165 - name: Test reachability to a few different public IPs using mgmt vrf cisco.nxos.nxos_ping: dest: "{{ item }}" vrf: management host: 68.170.147.165 with_items: - 8.8.8.8 - 4.4.4.4 - 198.6.1.4 - name: Test reachability to 8.8.8.8 using mgmt vrf, size and df-bit cisco.nxos.nxos_ping: dest: 8.8.8.8 df_bit: true size: 1400 vrf: management ``` 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 8.8.8.8 count 2 vrf management'] | | **packet\_loss** string | always | Percentage of packets lost **Sample:** 0.00% | | **packets\_rx** integer | always | Packets successfully received **Sample:** 2 | | **packets\_tx** integer | always | Packets successfully transmitted **Sample:** 2 | | **rtt** dictionary | always | Show RTT stats **Sample:** {'avg': 6.264, 'max': 6.564, 'min': 5.978} | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_interfaces – Interfaces resource module cisco.nxos.nxos\_interfaces – Interfaces resource module ======================================================== 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_interfaces`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages the interface attributes of NX-OS interfaces. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A dictionary of interface options | | | **description** string | | Interface description. | | | **duplex** string | **Choices:*** full * half * auto | Interface link status. Applicable for Ethernet interfaces only. | | | **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 | | | **fabric\_forwarding\_anycast\_gateway** boolean | **Choices:*** no * yes | Associate SVI with anycast gateway under VLAN configuration mode. Applicable for SVI interfaces only. | | | **ip\_forward** boolean | **Choices:*** no * yes | Enable or disable IP forward feature on SVIs. Set the value to `true` to enable or `false` to disable. | | | **mode** string | **Choices:*** layer2 * layer3 | Manage Layer2 or Layer3 state of the interface. Applicable for Ethernet and port channel interfaces only. | | | **mtu** string | | 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 interface, e.g. Ethernet1/1, port-channel10. | | | **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 NX-OS 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 * gathered * rendered * parsed * purged | The state of the configuration after module completion The state *rendered* considers the system default mode for interfaces to be "Layer 3" and the system default state for interfaces to be shutdown. The state *purged* negates virtual interfaces that are specified in task from running-config. | Notes ----- Note * Tested against NXOS 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS Examples -------- ``` # Using merged # Before state: # ------------- # # interface Ethernet1/1 # description testing # mtu 1800 - name: Merge provided configuration with device configuration cisco.nxos.nxos_interfaces: config: - name: Ethernet1/1 description: Configured by Ansible enabled: true - name: Ethernet1/2 description: Configured by Ansible Network enabled: false state: merged # After state: # ------------ # # interface Ethernet1/1 # description Configured by Ansible # no shutdown # mtu 1800 # interface Ethernet2 # description Configured by Ansible Network # shutdown # Using replaced # Before state: # ------------- # # interface Ethernet1/1 # description Interface 1/1 # interface Ethernet1/2 - name: Replaces device configuration of listed interfaces with provided configuration cisco.nxos.nxos_interfaces: config: - name: Ethernet1/1 description: Configured by Ansible enabled: true mtu: 2000 - name: Ethernet1/2 description: Configured by Ansible Network enabled: false mode: layer2 state: replaced # After state: # ------------ # # interface Ethernet1/1 # description Configured by Ansible # no shutdown # mtu 1500 # interface Ethernet2/2 # description Configured by Ansible Network # shutdown # switchport # Using overridden # Before state: # ------------- # # interface Ethernet1/1 # description Interface Ethernet1/1 # interface Ethernet1/2 # interface mgmt0 # description Management interface # ip address dhcp - name: Override device configuration of all interfaces with provided configuration cisco.nxos.nxos_interfaces: config: - name: Ethernet1/1 enabled: true - name: Ethernet1/2 description: Configured by Ansible Network enabled: false state: overridden # After state: # ------------ # # interface Ethernet1/1 # interface Ethernet1/2 # description Configured by Ansible Network # shutdown # interface mgmt0 # ip address dhcp # Using deleted # Before state: # ------------- # # interface Ethernet1/1 # description Interface Ethernet1/1 # interface Ethernet1/2 # interface mgmt0 # description Management interface # ip address dhcp - name: Delete or return interface parameters to default settings cisco.nxos.nxos_interfaces: config: - name: Ethernet1/1 state: deleted # After state: # ------------ # # interface Ethernet1/1 # interface Ethernet1/2 # interface mgmt0 # description Management interface # ip address dhcp # Using rendered - name: Use rendered state to convert task input to device specific commands cisco.nxos.nxos_interfaces: config: - name: Ethernet1/1 description: outbound-intf mode: layer3 speed: 100 - name: Ethernet1/2 mode: layer2 enabled: true duplex: full state: rendered # Task Output (redacted) # ----------------------- # rendered: # - "interface Ethernet1/1" # - "description outbound-intf" # - "speed 100" # - "interface Ethernet1/2" # - "switchport" # - "duplex full" # - "no shutdown" # Using parsed # parsed.cfg # ------------ # interface Ethernet1/800 # description test-1 # speed 1000 # shutdown # no switchport # duplex half # interface Ethernet1/801 # description test-2 # switchport # no shutdown # mtu 1800 - name: Use parsed state to convert externally supplied config to structured format cisco.nxos.nxos_interfaces: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # - description: "test-1" # duplex: "half" # enabled: false # mode: "layer3" # name: "Ethernet1/800" # speed: "1000" # # - description: "test-2" # enabled: true # mode: "layer2" # mtu: "1800" # name: "Ethernet1/801" # Using gathered # Existing device config state # ----------------------------- # interface Ethernet1/1 # description outbound-intf # switchport # no shutdown # interface Ethernet1/2 # description intf-l3 # speed 1000 # interface Ethernet1/3 # interface Ethernet1/4 # interface Ethernet1/5 - name: Gather interfaces facts from the device using nxos_interfaces cisco.nxos.nxos_interfaces: state: gathered # Task output (redacted) # ----------------------- # - name: Ethernet1/1 # description: outbound-intf # mode: layer2 # enabled: True # - name: Ethernet1/2 # description: intf-l3 # speed: "1000" # Using purged # Existing device config state # ----------------------------- # interface Vlan1 # interface Vlan42 # mtu 1800 # interface port-channel10 # interface port-channel11 # interface Ethernet1/1 # interface Ethernet1/2 # interface Ethernet1/2.100 # description sub-intf - name: Purge virtual interfaces from running-config cisco.nxos.nxos_interfaces: config: - name: Vlan42 - name: port-channel10 - name: Ethernet1/2.100 state: purged # Task output # ------------ # before: # - name: Vlan1 # - mtu: '1800' # name: Vlan42 # - name: port-channel10 # - name: port-channel11 # - name: Ethernet1/1 # - name: Ethernet1/2 # - description: sub-intf # name: Ethernet1/2.100 # # commands: # - no interface port-channel10 # - no interface Ethernet1/2.100 # - no interface Vlan42 # # after: # - name: Vlan1 # - name: port-channel11 # - name: Ethernet1/1 # - name: Ethernet1/2 ``` 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 Ethernet1/1', 'mtu 1800'] | ### Authors * Trishna Guha (@trishnaguha) ansible cisco.nxos.nxos_telemetry – TELEMETRY resource module cisco.nxos.nxos\_telemetry – TELEMETRY resource module ====================================================== 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_telemetry`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages Telemetry Monitoring Service (TMS) configuration Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | The provided configuration | | | **certificate** dictionary | | Certificate SSL/TLS and hostname values. Value must be a dict defining values for keys (key and hostname). | | | | **hostname** string | | Certificate hostname | | | | **key** string | | Certificate key | | | **compression** string | **Choices:*** gzip | Destination profile compression method. | | | **destination\_groups** list / elements=raw | | List of telemetry destination groups. | | | | **destination** dictionary | | Group destination ipv4, port, protocol and encoding values. Value must be a dict defining values for keys (ip, port, protocol, encoding). | | | | | **encoding** string | **Choices:*** GPB * JSON | Destination group encoding. | | | | | **ip** string | | Destination group IP address. | | | | | **port** integer | | Destination group port number. | | | | | **protocol** string | **Choices:*** HTTP * TCP * UDP * gRPC | Destination group protocol. | | | | **id** integer | | Destination group identifier. Value must be a int representing the destination group identifier. | | | **sensor\_groups** list / elements=raw | | List of telemetry sensor groups. | | | | **data\_source** string | **Choices:*** NX-API * DME * YANG | Telemetry data source. | | | | **id** integer | | Sensor group identifier. Value must be a int representing the sensor group identifier. | | | | **path** dictionary | | Telemetry sensor path. Value must be a dict defining values for keys (name, depth, filter\_condition, query\_condition). Mandatory Keys (name) Optional Keys (depth, filter\_condition, query\_condition) | | | | | **depth** string | | Sensor group depth. | | | | | **filter\_condition** string | | Sensor group filter condition. | | | | | **name** string | | Sensor group path name. | | | | | **query\_condition** string | | Sensor group query condition. | | | **source\_interface** string | | Destination profile source interface. Valid value is a str representing the source interface name. | | | **subscriptions** list / elements=raw | | List of telemetry subscriptions. | | | | **destination\_group** integer | | Associated destination group. | | | | **id** integer | | Subscription identifier. Value must be a int representing the subscription identifier. | | | | **sensor\_group** dictionary | | Associated sensor group. Value must be a dict defining values for keys (id, sample\_interval). | | | | | **id** integer | | Associated sensor group id. | | | | | **sample\_interval** integer | | Associated sensor group id sample interval. | | | **vrf** string | | Destination profile vrf. Valid value is a str representing the vrf name. | | **state** string | **Choices:*** **merged** ← * replaced * deleted * gathered | Final configuration state | Notes ----- Note * Supported on N9k Version 7.0(3)I7(5) and later. * Unsupported for Cisco MDS Examples -------- ``` # Using deleted # This action will delete all telemetry configuration on the device - name: Delete Telemetry Configuration cisco.nxos.nxos_telemetry: state: deleted # Using merged # This action will merge telemetry configuration defined in the playbook with # telemetry configuration that is already on the device. - name: Merge Telemetry Configuration cisco.nxos.nxos_telemetry: config: certificate: key: /bootflash/server.key hostname: localhost compression: gzip source_interface: Ethernet1/1 vrf: management destination_groups: - id: 2 destination: ip: 192.168.0.2 port: 50001 protocol: gPRC encoding: GPB - id: 55 destination: ip: 192.168.0.55 port: 60001 protocol: gPRC encoding: GPB sensor_groups: - id: 1 data_source: NX-API path: name: '"show lldp neighbors detail"' depth: 0 - id: 55 data_source: DME path: name: sys/ch depth: unbounded filter_condition: ne(eqptFt.operSt,"ok") subscriptions: - id: 5 destination_group: 55 sensor_group: id: 1 sample_interval: 1000 - id: 6 destination_group: 2 sensor_group: id: 55 sample_interval: 2000 state: merged # Using replaced # This action will replace telemetry configuration on the device with the # telemetry configuration defined in the playbook. - name: Override Telemetry Configuration cisco.nxos.nxos_telemetry: config: certificate: key: /bootflash/server.key hostname: localhost compression: gzip source_interface: Ethernet1/1 vrf: management destination_groups: - id: 2 destination: ip: 192.168.0.2 port: 50001 protocol: gPRC encoding: GPB subscriptions: - id: 5 destination_group: 55 state: replaced ``` 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:** ['command 1', 'command 2', 'command 3'] | ### Authors * Mike Wiebe (@mikewiebe)
programming_docs
ansible cisco.nxos.nxos_bgp_address_family – BGP Address Family resource module. cisco.nxos.nxos\_bgp\_address\_family – BGP Address Family resource module. =========================================================================== 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_bgp_address_family`. New in version 2.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module manages BGP Address Family configuration on devices running Cisco NX-OS. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | A list of BGP process configuration. | | | **address\_family** list / elements=dictionary | | Address Family related configurations. | | | | **additional\_paths** dictionary | | Additional paths configuration. | | | | | **install\_backup** boolean | **Choices:*** no * yes | Install backup path. | | | | | **receive** boolean | **Choices:*** no * yes | Additional paths Receive capability. | | | | | **selection** dictionary | | Additional paths selection | | | | | | **route\_map** string | | Route-map for additional paths selection | | | | | **send** boolean | **Choices:*** no * yes | Additional paths Send capability | | | | **advertise\_l2vpn\_evpn** boolean | **Choices:*** no * yes | Enable advertising EVPN routes. | | | | **advertise\_pip** boolean | **Choices:*** no * yes | Advertise physical ip for type-5 route. | | | | **advertise\_system\_mac** boolean | **Choices:*** no * yes | Advertise extra EVPN RT-2 with system MAC. | | | | **afi** string / required | **Choices:*** ipv4 * ipv6 * link-state * vpnv4 * vpnv6 * l2vpn | Address Family indicator. | | | | **aggregate\_address** list / elements=dictionary | | Configure BGP aggregate prefixes | | | | | **advertise\_map** string | | Select attribute information from specific routes. | | | | | **as\_set** boolean | **Choices:*** no * yes | Generate AS-SET information. | | | | | **attribute\_map** string | | Set attribute information of aggregate. | | | | | **prefix** string | | Aggregate prefix. | | | | | **summary\_only** boolean | **Choices:*** no * yes | Do not advertise more specifics. | | | | | **suppress\_map** string | | Conditionally filter more specific routes. | | | | **allow\_vni\_in\_ethertag** boolean | **Choices:*** no * yes | Allow VNI in Ethernet Tag field in EVPN route. | | | | **client\_to\_client** dictionary | | Configure client-to-client route reflection. | | | | | **no\_reflection** boolean | **Choices:*** no * yes | Reflection of routes permitted. | | | | **dampen\_igp\_metric** integer | | Dampen IGP metric-related changes. | | | | **dampening** dictionary | | Configure route flap dampening. | | | | | **decay\_half\_life** integer | | Decay half life. | | | | | **max\_suppress\_time** integer | | Maximum suppress time for stable route. | | | | | **route\_map** string | | Apply route-map to specify dampening criteria. | | | | | **set** boolean | **Choices:*** no * yes | Set route flap dampening. | | | | | **start\_reuse\_route** integer | | Value to start reusing a route. | | | | | **start\_suppress\_route** integer | | Value to start suppressing a route. | | | | **default\_information** dictionary | | Control distribution of default information. | | | | | **originate** boolean | **Choices:*** no * yes | Distribute a default route. | | | | **default\_metric** integer | | Set metric of redistributed routes. | | | | **distance** dictionary | | Configure administrative distance. | | | | | **ebgp\_routes** integer | | Distance for EBGP routes. | | | | | **ibgp\_routes** integer | | Distance for IBGP routes. | | | | | **local\_routes** integer | | Distance for local routes. | | | | **export\_gateway\_ip** boolean | **Choices:*** no * yes | Export Gateway IP to Type-5 EVPN routes for VRF | | | | **inject\_map** list / elements=dictionary | | Routemap which specifies prefixes to inject. | | | | | **copy\_attributes** boolean | **Choices:*** no * yes | Copy attributes from aggregate. | | | | | **exist\_map** string | | Routemap which specifies exist condition. | | | | | **route\_map** string | | Route-map name. | | | | **maximum\_paths** dictionary | | Forward packets over multipath paths. | | | | | **eibgp** dictionary | | Configure multipath for both EBGP and IBGP paths. | | | | | | **parallel\_paths** integer | | Number of parallel paths. | | | | | **ibgp** dictionary | | Configure multipath for IBGP paths. | | | | | | **parallel\_paths** integer | | Number of parallel paths. | | | | | **local** dictionary | | Configure multipath for local paths. | | | | | | **parallel\_paths** integer | | Number of parallel paths. | | | | | **mixed** dictionary | | Configure multipath for local and remote paths. | | | | | | **parallel\_paths** integer | | Number of parallel paths. | | | | | **parallel\_paths** integer | | Number of parallel paths. | | | | **networks** list / elements=dictionary | | Configure an IP prefix to advertise. | | | | | **prefix** string | | IP prefix in CIDR format. | | | | | **route\_map** string | | Route-map name. | | | | **nexthop** dictionary | | Nexthop tracking. | | | | | **route\_map** string | | Route-map name. | | | | | **trigger\_delay** dictionary | | Set the delay to trigger nexthop tracking. | | | | | | **critical\_delay** integer | | Nexthop changes affecting reachability. Delay value (miliseconds). | | | | | | **non\_critical\_delay** integer | | Other nexthop changes. Delay value (miliseconds). | | | | **redistribute** list / elements=dictionary | | Configure redistribution. | | | | | **id** string | | The identifier for the protocol specified. | | | | | **protocol** string / required | **Choices:*** am * direct * eigrp * isis * lisp * ospf * ospfv3 * rip * static | The name of the protocol. | | | | | **route\_map** string / required | | The route map policy to constrain redistribution. | | | | **retain** dictionary | | Retain the routes based on Target VPN Extended Communities. | | | | | **route\_target** dictionary | | Specify Target VPN Extended Communities | | | | | | **retain\_all** boolean | **Choices:*** no * yes | All the routes regardless of Target-VPN community | | | | | | **route\_map** string | | Apply route-map to filter routes. | | | | **safi** string | **Choices:*** unicast * multicast * mvpn * evpn | Sub Address Family indicator. | | | | **suppress\_inactive** boolean | **Choices:*** no * yes | Advertise only active routes to peers. | | | | **table\_map** dictionary | | Policy for filtering/modifying OSPF routes before sending them to RIB. | | | | | **filter** boolean | **Choices:*** no * yes | Block the OSPF routes from being sent to RIB. | | | | | **name** string / required | | The Route Map name. | | | | **timers** dictionary | | Configure bgp related timers. | | | | | **bestpath\_defer** dictionary | | Configure bestpath defer timer value for batch prefix processing. | | | | | | **defer\_time** integer | | Bestpath defer time (mseconds). | | | | | | **maximum\_defer\_time** integer | | Maximum bestpath defer time (mseconds). | | | | **vrf** string | | Virtual Router Context. | | | | **wait\_igp\_convergence** boolean | **Choices:*** no * yes | Delay initial bestpath until redistributed IGPs have converged. | | | **as\_number** string | | Autonomous System Number of the router. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the command **show running-config | section '^router bgp'**. 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 the configuration should be left in. State *deleted* only removes BGP attributes that this modules manages and does not negate the BGP process completely. Refer to examples for more details. | Notes ----- Note * Tested against NX-OS 9.3.6. * Unsupported for Cisco MDS * For managing BGP neighbor address family configurations please use the [cisco.nxos.nxos\_bgp\_neighbor\_address\_family](nxos_bgp_neighbor_address_family_module#ansible-collections-cisco-nxos-nxos-bgp-neighbor-address-family-module) module. * This module works with connection `network_cli` and `httpapi`. Examples -------- ``` # Using merged # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # Nexus9000v# - name: Merge the provided configuration with the existing running configuration cisco.nxos.nxos_bgp_address_family: config: as_number: 65536 address_family: - afi: ipv4 safi: multicast networks: - prefix: 192.0.2.32/27 - prefix: 192.0.2.64/27 route_map: rmap1 nexthop: route_map: rmap2 trigger_delay: critical_delay: 120 non_critical_delay: 180 - afi: ipv4 safi: unicast vrf: site-1 default_information: originate: True aggregate_address: - prefix: 203.0.113.0/24 as_set: True summary_only: True - afi: ipv6 safi: multicast vrf: site-1 redistribute: - protocol: ospfv3 id: 100 route_map: rmap-ospf-1 - protocol: eigrp id: 101 route_map: rmap-eigrp-1 # Task output # ------------- # before: {} # # commands: # - router bgp 65536 # - address-family ipv4 multicast # - nexthop route-map rmap2 # - nexthop trigger-delay critical 120 non-critical 180 # - network 192.0.2.32/27 # - network 192.0.2.64/27 route-map rmap1 # - vrf site-1 # - address-family ipv4 unicast # - default-information originate # - aggregate-address 203.0.113.0/24 as-set summary-only # - address-family ipv6 multicast # - redistribute ospfv3 100 route-map rmap-ospf-1 # - redistribute eigrp 101 route-map rmap-eigrp-1 # # after: # as_number: "65536" # address_family: # - afi: ipv4 # safi: multicast # networks: # - prefix: 192.0.2.32/27 # - prefix: 192.0.2.64/27 # route_map: rmap1 # nexthop: # route_map: rmap2 # trigger_delay: # critical_delay: 120 # non_critical_delay: 180 # - afi: ipv4 # safi: unicast # vrf: site-1 # default_information: # originate: True # aggregate_address: # - prefix: 203.0.113.0/24 # as_set: True # summary_only: True # - afi: ipv6 # safi: multicast # vrf: site-1 # redistribute: # - id: "100" # protocol: ospfv3 # route_map: rmap-ospf-1 # - id: "101" # protocol: eigrp # route_map: rmap-eigrp-1 # After state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # address-family ipv4 multicast # nexthop route-map rmap2 # nexthop trigger-delay critical 120 non-critical 180 # network 192.0.2.32/27 # network 192.0.2.64/27 route-map rmap1 # vrf site-1 # address-family ipv4 unicast # default-information originate # aggregate-address 203.0.113.0/24 as-set summary-only # address-family ipv6 multicast # redistribute ospfv3 100 route-map rmap-ospf-1 # redistribute eigrp 101 route-map rmap-eigrp-1 # # Using replaced # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # address-family ipv4 multicast # nexthop route-map rmap2 # nexthop trigger-delay critical 120 non-critical 180 # network 192.0.2.32/27 # network 192.0.2.64/27 route-map rmap1 # vrf site-1 # address-family ipv4 unicast # default-information originate # aggregate-address 203.0.113.0/24 as-set summary-only # address-family ipv6 multicast # redistribute ospfv3 100 route-map rmap-ospf-1 # redistribute eigrp 101 route-map rmap-eigrp-1 - name: Replace configuration of specified AFs cisco.nxos.nxos_bgp_address_family: config: as_number: 65536 address_family: - afi: ipv4 safi: multicast networks: - prefix: 192.0.2.64/27 route_map: rmap1 nexthop: route_map: rmap2 trigger_delay: critical_delay: 120 non_critical_delay: 180 aggregate_address: - prefix: 203.0.113.0/24 as_set: True summary_only: True - afi: ipv4 safi: unicast vrf: site-1 state: replaced # Task output # ------------- # before: # as_number: "65536" # address_family: # - afi: ipv4 # safi: multicast # networks: # - prefix: 192.0.2.32/27 # - prefix: 192.0.2.64/27 # route_map: rmap1 # nexthop: # route_map: rmap2 # trigger_delay: # critical_delay: 120 # non_critical_delay: 180 # - afi: ipv4 # safi: unicast # vrf: site-1 # default_information: # originate: True # aggregate_address: # - prefix: 203.0.113.0/24 # as_set: True # summary_only: True # - afi: ipv6 # safi: multicast # vrf: site-1 # redistribute: # - id: "100" # protocol: ospfv3 # route_map: rmap-ospf-1 # - id: "101" # protocol: eigrp # route_map: rmap-eigrp-1 # # commands: # - router bgp 65536 # - address-family ipv4 multicast # - no network 192.0.2.32/27 # - aggregate-address 203.0.113.0/24 as-set summary-only # - vrf site-1 # - address-family ipv4 unicast # - no default-information originate # - no aggregate-address 203.0.113.0/24 as-set summary-only # # after: # as_number: "65536" # address_family: # - afi: ipv4 # safi: multicast # networks: # - prefix: 192.0.2.64/27 # route_map: rmap1 # nexthop: # route_map: rmap2 # trigger_delay: # critical_delay: 120 # non_critical_delay: 180 # aggregate_address: # - prefix: 203.0.113.0/24 # as_set: True # summary_only: True # # - afi: ipv4 # safi: unicast # vrf: site-1 # # - afi: ipv6 # safi: multicast # vrf: site-1 # redistribute: # - protocol: ospfv3 # id: "100" # route_map: rmap-ospf-1 # - protocol: eigrp # id: "101" # route_map: rmap-eigrp-1 # After state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # address-family ipv4 multicast # nexthop route-map rmap2 # nexthop trigger-delay critical 120 non-critical 180 # network 192.0.2.64/27 route-map rmap1 # aggregate-address 203.0.113.0/24 as-set summary-only # vrf site-1 # address-family ipv4 unicast # address-family ipv6 multicast # redistribute ospfv3 100 route-map rmap-ospf-1 # redistribute eigrp 101 route-map rmap-eigrp-1 # Using overridden # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # address-family ipv4 multicast # nexthop route-map rmap2 # nexthop trigger-delay critical 120 non-critical 180 # network 192.0.2.32/27 # network 192.0.2.64/27 route-map rmap1 # vrf site-1 # address-family ipv4 unicast # default-information originate # aggregate-address 203.0.113.0/24 as-set summary-only # address-family ipv6 multicast # redistribute ospfv3 100 route-map rmap-ospf-1 # redistribute eigrp 101 route-map rmap-eigrp-1 - name: Override all BGP AF configuration with provided configuration cisco.nxos.nxos_bgp_address_family: &overridden config: as_number: 65536 address_family: - afi: ipv4 safi: multicast networks: - prefix: 192.0.2.64/27 route_map: rmap1 aggregate_address: - prefix: 203.0.113.0/24 as_set: True summary_only: True - afi: ipv4 safi: unicast vrf: site-1 state: overridden # Task output # ------------- # before: # as_number: "65536" # address_family: # - afi: ipv4 # safi: multicast # networks: # - prefix: 192.0.2.32/27 # - prefix: 192.0.2.64/27 # route_map: rmap1 # nexthop: # route_map: rmap2 # trigger_delay: # critical_delay: 120 # non_critical_delay: 180 # - afi: ipv4 # safi: unicast # vrf: site-1 # default_information: # originate: True # aggregate_address: # - prefix: 203.0.113.0/24 # as_set: True # summary_only: True # - afi: ipv6 # safi: multicast # vrf: site-1 # redistribute: # - id: "100" # protocol: ospfv3 # route_map: rmap-ospf-1 # - id: "101" # protocol: eigrp # route_map: rmap-eigrp-1 # # commands: # - router bgp 65536 # - vrf site-1 # - no address-family ipv6 multicast # - exit # - address-family ipv4 multicast # - no nexthop route-map rmap2 # - no nexthop trigger-delay critical 120 non-critical 180 # - aggregate-address 203.0.113.0/24 as-set summary-only # - no network 192.0.2.32/27 # - vrf site-1 # - address-family ipv4 unicast # - no default-information originate # - no aggregate-address 203.0.113.0/24 as-set summary-only # # after: # as_number: "65536" # address_family: # - afi: ipv4 # safi: multicast # networks: # - prefix: 192.0.2.64/27 # route_map: rmap1 # aggregate_address: # - prefix: 203.0.113.0/24 # as_set: True # summary_only: True # - afi: ipv4 # safi: unicast # vrf: site-1 # # After state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # address-family ipv4 multicast # network 192.0.2.64/27 route-map rmap1 # aggregate-address 203.0.113.0/24 as-set summary-only # vrf site-1 # address-family ipv4 unicast # # Using deleted to remove specified AFs # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # address-family ipv4 multicast # nexthop route-map rmap2 # nexthop trigger-delay critical 120 non-critical 180 # network 192.0.2.32/27 # network 192.0.2.64/27 route-map rmap1 # vrf site-1 # address-family ipv4 unicast # default-information originate # aggregate-address 203.0.113.0/24 as-set summary-only # address-family ipv6 multicast # redistribute ospfv3 100 route-map rmap-ospf-1 # redistribute eigrp 101 route-map rmap-eigrp-1 - name: Delete specified BGP AFs cisco.nxos.nxos_bgp_address_family: config: as_number: 65536 address_family: - afi: ipv4 safi: multicast - vrf: site-1 afi: ipv6 safi: multicast state: deleted # Task output # ------------- # before: # as_number: "65536" # address_family: # - afi: ipv4 # safi: multicast # networks: # - prefix: 192.0.2.32/27 # - prefix: 192.0.2.64/27 # route_map: rmap1 # nexthop: # route_map: rmap2 # trigger_delay: # critical_delay: 120 # non_critical_delay: 180 # - afi: ipv4 # safi: unicast # vrf: site-1 # default_information: # originate: True # aggregate_address: # - prefix: 203.0.113.0/24 # as_set: True # summary_only: True # - afi: ipv6 # safi: multicast # vrf: site-1 # redistribute: # - id: "100" # protocol: ospfv3 # route_map: rmap-ospf-1 # - id: "101" # protocol: eigrp # route_map: rmap-eigrp-1 # # commands: # - router bgp 65563 # - no address-family ipv4 multicast # - vrf site-1 # - no address-family ipv6 multicast # # after: # as_number: "65536" # address_family: # - afi: ipv4 # safi: unicast # vrf: site-1 # default_information: # originate: True # aggregate_address: # - prefix: 203.0.113.0/24 # as_set: True # summary_only: True # After state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # vrf site-1 # address-family ipv4 unicast # default-information originate # aggregate-address 203.0.113.0/24 as-set summary-only # Using deleted to remove all BGP AFs # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # address-family ipv4 multicast # nexthop route-map rmap2 # nexthop trigger-delay critical 120 non-critical 180 # network 192.0.2.32/27 # network 192.0.2.64/27 route-map rmap1 # vrf site-1 # address-family ipv4 unicast # default-information originate # aggregate-address 203.0.113.0/24 as-set summary-only # address-family ipv6 multicast # redistribute ospfv3 100 route-map rmap-ospf-1 # redistribute eigrp 101 route-map rmap-eigrp-1 - name: Delete all BGP AFs cisco.nxos.nxos_bgp_address_family: state: deleted # Task output # ------------- # before: # as_number: "65536" # address_family: # - afi: ipv4 # safi: multicast # networks: # - prefix: 192.0.2.32/27 # - prefix: 192.0.2.64/27 # route_map: rmap1 # nexthop: # route_map: rmap2 # trigger_delay: # critical_delay: 120 # non_critical_delay: 180 # - afi: ipv4 # safi: unicast # vrf: site-1 # default_information: # originate: True # aggregate_address: # - prefix: 203.0.113.0/24 # as_set: True # summary_only: True # - afi: ipv6 # safi: multicast # vrf: site-1 # redistribute: # - id: "100" # protocol: ospfv3 # route_map: rmap-ospf-1 # - id: "101" # protocol: eigrp # route_map: rmap-eigrp-1 # # commands: # - router bgp 65563 # - no address-family ipv4 multicast # - vrf site-1 # - no address-family ipv4 unicast # - no address-family ipv6 multicast # # after: # as_number: "65536" # After state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # Nexus9000v# # Using rendered - name: Render platform specific configuration lines with state rendered (without connecting to the device) cisco.nxos.nxos_bgp_address_family: config: as_number: 65536 address_family: - afi: ipv4 safi: multicast networks: - prefix: 192.0.2.32/27 - prefix: 192.0.2.64/27 route_map: rmap1 nexthop: route_map: rmap2 trigger_delay: critical_delay: 120 non_critical_delay: 180 - afi: ipv4 safi: unicast vrf: site-1 default_information: originate: True aggregate_address: - prefix: 203.0.113.0/24 as_set: True summary_only: True - afi: ipv6 safi: multicast vrf: site-1 redistribute: - protocol: ospfv3 id: 100 route_map: rmap-ospf-1 - protocol: eigrp id: 101 route_map: rmap-eigrp-1 state: rendered # Task Output (redacted) # ----------------------- # rendered: # - router bgp 65536 # - address-family ipv4 multicast # - nexthop route-map rmap2 # - nexthop trigger-delay critical 120 non-critical 180 # - network 192.0.2.32/27 # - network 192.0.2.64/27 route-map rmap1 # - vrf site-1 # - address-family ipv4 unicast # - default-information originate # - aggregate-address 203.0.113.0/24 as-set summary-only # - address-family ipv6 multicast # - redistribute ospfv3 100 route-map rmap-ospf-1 # - redistribute eigrp 101 route-map rmap-eigrp-1 # Using parsed # parsed.cfg # ------------ # router bgp 65536 # address-family ipv4 multicast # nexthop route-map rmap2 # nexthop trigger-delay critical 120 non-critical 180 # network 192.0.2.32/27 # network 192.0.2.64/27 route-map rmap1 # vrf site-1 # address-family ipv4 unicast # default-information originate # aggregate-address 203.0.113.0/24 as-set summary-only # address-family ipv6 multicast # redistribute ospfv3 100 route-map rmap-ospf-1 # redistribute eigrp 101 route-map rmap-eigrp-1 - name: Parse externally provided BGP AF config cisco.nxos.nxos_bgp_address_family: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # as_number: "65536" # address_family: # - afi: ipv4 # safi: multicast # networks: # - prefix: 192.0.2.32/27 # - prefix: 192.0.2.64/27 # route_map: rmap1 # nexthop: # route_map: rmap2 # trigger_delay: # critical_delay: 120 # non_critical_delay: 180 # - afi: ipv4 # safi: unicast # vrf: site-1 # default_information: # originate: True # aggregate_address: # - prefix: 203.0.113.0/24 # as_set: True # summary_only: True # - afi: ipv6 # safi: multicast # vrf: site-1 # redistribute: # - id: "100" # protocol: ospfv3 # route_map: rmap-ospf-1 # - id: "101" # protocol: eigrp # route_map: rmap-eigrp-1 ``` ### Authors * Nilashish Chakraborty (@NilashishC)
programming_docs
ansible cisco.nxos.nxos_hsrp_interfaces – HSRP interfaces resource module cisco.nxos.nxos\_hsrp\_interfaces – HSRP interfaces resource module =================================================================== 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_hsrp_interfaces`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages Hot Standby Router Protocol (HSRP) interface attributes. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | The provided configuration | | | **bfd** string | **Choices:*** enable * disable | Enable/Disable HSRP Bidirectional Forwarding Detection (BFD) on the interface. | | | **name** string | | The name of the interface. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS 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 * gathered * rendered * parsed | The state the configuration should be left in | Notes ----- Note * Tested against NX-OS 7.0(3)I5(1). * Feature bfd should be enabled for this module. * Unsupported for Cisco MDS Examples -------- ``` # Using deleted - name: Configure hsrp attributes on interfaces cisco.nxos.nxos_hsrp_interfaces: config: - name: Ethernet1/1 - name: Ethernet1/2 operation: deleted # Using merged - name: Configure hsrp attributes on interfaces cisco.nxos.nxos_hsrp_interfaces: config: - name: Ethernet1/1 bfd: enable - name: Ethernet1/2 bfd: disable operation: merged # Using overridden - name: Configure hsrp attributes on interfaces cisco.nxos.nxos_hsrp_interfaces: config: - name: Ethernet1/1 bfd: enable - name: Ethernet1/2 bfd: disable operation: overridden # Using replaced - name: Configure hsrp attributes on interfaces cisco.nxos.nxos_hsrp_interfaces: config: - name: Ethernet1/1 bfd: enable - name: Ethernet1/2 bfd: disable operation: replaced # Using rendered - name: Use rendered state to convert task input to device specific commands cisco.nxos.nxos_hsrp_interfaces: config: - name: Ethernet1/800 bfd: enable - name: Ethernet1/801 bfd: enable state: rendered # Task Output (redacted) # ----------------------- # rendered: # - "interface Ethernet1/800" # - "hsrp bfd" # - "interface Ethernet1/801" # - "hsrp bfd" # Using parsed # parsed.cfg # ------------ # interface Ethernet1/800 # no switchport # hsrp bfd # interface Ethernet1/801 # no switchport # hsrp bfd - name: Use parsed state to convert externally supplied config to structured format cisco.nxos.nxos_hsrp_interfaces: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # - name: Ethernet1/800 # bfd: enable # - name: Ethernet1/801 # bfd: enable # Using gathered # Existing device config state # ------------------------------- # interface Ethernet1/1 # no switchport # hsrp bfd # interface Ethernet1/2 # no switchport # hsrp bfd # interface Ethernet1/3 # no switchport - name: Gather hsrp_interfaces facts from the device using nxos_hsrp_interfaces cisco.nxos.nxos_hsrp_interfaces: state: gathered # Task output (redacted) # ----------------------- # gathered: # - name: Ethernet1/1 # bfd: enable # - name: Ethernet1/2 # bfd: enable ``` 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 resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. | | **before** list / elements=string | always | The configuration prior to the model 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 Ethernet1/1', 'hsrp bfd'] | ### Authors * Chris Van Heuveln (@chrisvanheuveln) ansible cisco.nxos.nxos_ospf_interfaces – OSPF Interfaces Resource Module. cisco.nxos.nxos\_ospf\_interfaces – OSPF Interfaces Resource Module. ==================================================================== 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_ospf_interfaces`. New in version 1.3.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages OSPF(v2/v3) configuration of interfaces on devices running Cisco NX-OS. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A list of OSPF configuration for interfaces. | | | **address\_family** list / elements=dictionary | | OSPF settings on the interfaces in address-family context. | | | | **afi** string / required | **Choices:*** ipv4 * ipv6 | Address Family Identifier (AFI) for OSPF settings on the interfaces. | | | | **authentication** dictionary | | Authentication settings on the interface. | | | | | **enable** boolean | **Choices:*** no * yes | Enable/disable authentication on the interface. | | | | | **key\_chain** string | | Authentication password key-chain. | | | | | **message\_digest** boolean | **Choices:*** no * yes | Use message-digest authentication. | | | | | **null\_auth** boolean | **Choices:*** no * yes | Use null(disable) authentication. | | | | **authentication\_key** dictionary | | Configure the authentication key for the interface. | | | | | **encryption** integer | | 0 Specifies an UNENCRYPTED authentication key will follow. 3 Specifies an 3DES ENCRYPTED authentication key will follow. 7 Specifies a Cisco type 7 ENCRYPTED authentication key will follow. | | | | | **key** string / required | | Authentication key. Valid values are Cisco type 7 ENCRYPTED password, 3DES ENCRYPTED password and UNENCRYPTED (cleartext) password based on the value of encryption key. | | | | **cost** integer | | Cost associated with interface. | | | | **dead\_interval** integer | | Dead interval value (in seconds). | | | | **default\_passive\_interface** boolean | **Choices:*** no * yes | Set passive-interface attribute on this interface to default. This option is mutually exclusive with *passive\_interface*. | | | | **hello\_interval** integer | | Hello interval value (in seconds). | | | | **instance** integer | | Instance identifier. | | | | **message\_digest\_key** dictionary | | Message digest authentication password (key) settings. | | | | | **encryption** integer | | 0 Specifies an UNENCRYPTED ospf password (key) will follow. 3 Specifies an 3DES ENCRYPTED ospf password (key) will follow. 7 Specifies a Cisco type 7 ENCRYPTED the ospf password (key) will follow. | | | | | **key** string / required | | Authentication key. Valid values are Cisco type 7 ENCRYPTED password, 3DES ENCRYPTED password and UNENCRYPTED (cleartext) password based on the value of encryption key. | | | | | **key\_id** integer / required | | Key ID. | | | | **mtu\_ignore** boolean | **Choices:*** no * yes | Enable/disable OSPF MTU mismatch detection. | | | | **multi\_areas** list / elements=string | | Multi-Areas associated with interface (not tied to OSPF process). Valid values are Area Ids as an integer or IP address. | | | | **network** string | **Choices:*** broadcast * point-to-point | Network type. | | | | **passive\_interface** boolean | **Choices:*** no * yes | Suppress routing updates on the interface. This option is mutually exclusive with *default\_passive\_interface*. | | | | **priority** integer | | Router priority. | | | | **processes** list / elements=dictionary | | Interfaces configuration for an OSPF process. | | | | | **area** dictionary | | Area associated with interface. | | | | | | **area\_id** string / required | | Area ID in IP address format. | | | | | | **secondaries** boolean | **Choices:*** no * yes | Do not include secondary IPv4/IPv6 addresses. | | | | | **multi\_areas** list / elements=string | | Multi-Areas associated with interface. Valid values are Area Ids as an integer or IP address. | | | | | **process\_id** string / required | | OSPF process tag. | | | | **retransmit\_interval** integer | | Packet retransmission interval. | | | | **shutdown** boolean | **Choices:*** no * yes | Shutdown OSPF on this interface. | | | | **transmit\_delay** integer | | Packet transmission delay. | | | **name** string / required | | Name/Identifier of the interface. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS 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 * gathered * parsed * rendered | The state the configuration should be left in. | Notes ----- Note * Unsupported for Cisco MDS Examples -------- ``` # Using merged # Before state: # ------------- # NXOS# show running-config | section ^interface # interface Ethernet1/1 # no switchport # interface Ethernet1/2 # no switchport # interface Ethernet1/3 # no switchport - name: Merge the provided configuration with the existing running configuration cisco.nxos.nxos_ospf_interfaces: config: - name: Ethernet1/1 address_family: - afi: ipv4 processes: - process_id: "100" area: area_id: 1.1.1.1 secondaries: False multi_areas: - 11.11.11.11 - afi: ipv6 processes: - process_id: "200" area: area_id: 2.2.2.2 multi_areas: - 21.0.0.0 - process_id: "300" multi_areas: - 50.50.50.50 multi_areas: - 16.10.10.10 - name: Ethernet1/2 address_family: - afi: ipv4 authentication: enable: True key_chain: test-1 message_digest_key: key_id: 10 encryption: 3 key: abc01d272be25d29 cost: 100 - afi: ipv6 network: broadcast shutdown: True - name: Ethernet1/3 address_family: - afi: ipv4 authentication_key: encryption: 7 key: 12090404011C03162E state: merged # Task output # ------------- # "before": [ # { # "name": "Ethernet1/1" # }, # { # "name": "Ethernet1/2" # }, # { # "name": "Ethernet1/3" # }, # ] # # "commands": [ # "interface Ethernet1/1", # "ip router ospf multi-area 11.11.11.11", # "ip router ospf 100 area 1.1.1.1 secondaries none", # "ipv6 router ospfv3 multi-area 16.10.10.10", # "ipv6 router ospfv3 200 area 2.2.2.2", # "ipv6 router ospfv3 200 multi-area 21.0.0.0", # "ipv6 router ospfv3 300 multi-area 50.50.50.50", # "interface Ethernet1/2", # "ip ospf authentication key-chain test-1", # "ip ospf authentication", # "ip ospf message-digest-key 10 md5 3 abc01d272be25d29", # "ip ospf cost 100", # "ospfv3 network broadcast", # "ospfv3 shutdown", # "interface Ethernet1/3", # "ip ospf authentication-key 7 12090404011C03162E" # ] # # "after": [ # { # "address_family": [ # { # "afi": "ipv4", # "multi_areas": [ # "11.11.11.11" # ], # "processes": [ # { # "area": { # "area_id": "1.1.1.1", # "secondaries": false # }, # "process_id": "100" # } # ] # }, # { # "afi": "ipv6", # "multi_areas": [ # "16.10.10.10" # ], # "processes": [ # { # "area": { # "area_id": "2.2.2.2" # }, # "multi_areas": [ # "21.0.0.0" # ], # "process_id": "200" # }, # { # "multi_areas": [ # "50.50.50.50" # ], # "process_id": "300" # } # ] # } # ], # "name": "Ethernet1/1" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "enable": true, # "key_chain": "test-1" # }, # "cost": 100, # "message_digest_key": { # "encryption": 3, # "key": "abc01d272be25d29", # "key_id": 10 # } # }, # { # "afi": "ipv6", # "network": "broadcast", # "shutdown": true # } # ], # "name": "Ethernet1/2" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication_key": { # "encryption": 7, # "key": "12090404011C03162E" # } # } # ], # "name": "Ethernet1/3" # }, # ] # After state: # ------------- # NXOS# show running-config | section ^interface # interface Ethernet1/1 # no switchport # ip router ospf 100 area 1.1.1.1 secondaries none # ip router ospf multi-area 11.11.11.11 # ipv6 router ospfv3 200 area 2.2.2.2 # ipv6 router ospfv3 multi-area 16.10.10.10 # ipv6 router ospfv3 200 multi-area 21.0.0.0 # ipv6 router ospfv3 300 multi-area 50.50.50.50 # interface Ethernet1/2 # no switchport # ip ospf authentication # ip ospf authentication key-chain test-1 # ip ospf message-digest-key 10 md5 3 abc01d272be25d29 # ip ospf cost 100 # ospfv3 network broadcast # ospfv3 shutdown # interface Ethernet1/3 # no switchport # ip ospf authentication-key 7 12090404011C03162E # Using replaced # Before state: # ------------ # NXOS# show running-config | section ^interface # interface Ethernet1/1 # no switchport # ip router ospf 100 area 1.1.1.1 secondaries none # ip router ospf multi-area 11.11.11.11 # ipv6 router ospfv3 200 area 2.2.2.2 # ipv6 router ospfv3 multi-area 16.10.10.10 # ipv6 router ospfv3 200 multi-area 21.0.0.0 # ipv6 router ospfv3 300 multi-area 50.50.50.50 # interface Ethernet1/2 # no switchport # ip ospf authentication # ip ospf authentication key-chain test-1 # ip ospf message-digest-key 10 md5 3 abc01d272be25d29 # ip ospf cost 100 # ospfv3 network broadcast # ospfv3 shutdown # interface Ethernet1/3 # no switchport # ip ospf authentication-key 7 12090404011C03162E - name: Replace OSPF configurations of listed interfaces with provided configurations cisco.nxos.nxos_ospf_interfaces: config: - name: Ethernet1/1 address_family: - afi: ipv4 processes: - process_id: "100" area: area_id: 1.1.1.1 secondaries: False multi_areas: - 11.11.11.12 - name: Ethernet1/3 state: replaced # Task output # ------------- # "before": [ # { # "address_family": [ # { # "afi": "ipv4", # "multi_areas": [ # "11.11.11.11" # ], # "processes": [ # { # "area": { # "area_id": "1.1.1.1", # "secondaries": false # }, # "process_id": "100" # } # ] # }, # { # "afi": "ipv6", # "multi_areas": [ # "16.10.10.10" # ], # "processes": [ # { # "area": { # "area_id": "2.2.2.2" # }, # "multi_areas": [ # "21.0.0.0" # ], # "process_id": "200" # }, # { # "multi_areas": [ # "50.50.50.50" # ], # "process_id": "300" # } # ] # } # ], # "name": "Ethernet1/1" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "enable": true, # "key_chain": "test-1" # }, # "cost": 100, # "message_digest_key": { # "encryption": 3, # "key": "abc01d272be25d29", # "key_id": 10 # } # }, # { # "afi": "ipv6", # "network": "broadcast", # "shutdown": true # } # ], # "name": "Ethernet1/2" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication_key": { # "encryption": 7, # "key": "12090404011C03162E" # } # } # ], # "name": "Ethernet1/3" # }, # ] # # "commands": [ # "interface Ethernet1/1", # "ip router ospf multi-area 11.11.11.12", # "no ip router ospf multi-area 11.11.11.11", # "no ipv6 router ospfv3 multi-area 16.10.10.10", # "no ipv6 router ospfv3 200 area 2.2.2.2", # "no ipv6 router ospfv3 200 multi-area 21.0.0.0", # "no ipv6 router ospfv3 300 multi-area 50.50.50.50", # "interface Ethernet1/3", # "no ip ospf authentication-key 7 12090404011C03162E" # ] # # "after": [ # { # "address_family": [ # { # "afi": "ipv4", # "multi_areas": [ # "11.11.11.12" # ], # "processes": [ # { # "area": { # "area_id": "1.1.1.1", # "secondaries": false # }, # "process_id": "100" # } # ] # } # ], # "name": "Ethernet1/1" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "enable": true, # "key_chain": "test-1" # }, # "cost": 100, # "message_digest_key": { # "encryption": 3, # "key": "abc01d272be25d29", # "key_id": 10 # } # }, # { # "afi": "ipv6", # "network": "broadcast", # "shutdown": true # } # ], # "name": "Ethernet1/2" # }, # { # "name": "Ethernet1/3" # }, # # After state: # ------------- # NXOS# show running-config | section ^interface # interface Ethernet1/1 # no switchport # ip router ospf 100 area 1.1.1.1 secondaries none # ip router ospf multi-area 11.11.11.12 # interface Ethernet1/2 # no switchport # ip ospf authentication # ip ospf authentication key-chain test-1 # ip ospf message-digest-key 10 md5 3 abc01d272be25d29 # ip ospf cost 100 # ospfv3 network broadcast # ospfv3 shutdown # interface Ethernet1/3 # no switchport # Using overridden # Before state: # ------------ # NXOS# show running-config | section ^interface # interface Ethernet1/1 # no switchport # ip router ospf 100 area 1.1.1.1 secondaries none # ip router ospf multi-area 11.11.11.11 # ipv6 router ospfv3 200 area 2.2.2.2 # ipv6 router ospfv3 multi-area 16.10.10.10 # ipv6 router ospfv3 200 multi-area 21.0.0.0 # ipv6 router ospfv3 300 multi-area 50.50.50.50 # interface Ethernet1/2 # no switchport # ip ospf authentication # ip ospf authentication key-chain test-1 # ip ospf message-digest-key 10 md5 3 abc01d272be25d29 # ip ospf cost 100 # ospfv3 network broadcast # ospfv3 shutdown # interface Ethernet1/3 # no switchport # ip ospf authentication-key 7 12090404011C03162E - name: Override all OSPF interfaces configuration with provided configuration cisco.nxos.nxos_ospf_interfaces: config: - name: Ethernet1/1 address_family: - afi: ipv4 processes: - process_id: "100" area: area_id: 1.1.1.1 secondaries: False multi_areas: - 11.11.11.12 state: overridden # Task output # ------------- # "before": [ # { # "address_family": [ # { # "afi": "ipv4", # "multi_areas": [ # "11.11.11.11" # ], # "processes": [ # { # "area": { # "area_id": "1.1.1.1", # "secondaries": false # }, # "process_id": "100" # } # ] # }, # { # "afi": "ipv6", # "multi_areas": [ # "16.10.10.10" # ], # "processes": [ # { # "area": { # "area_id": "2.2.2.2" # }, # "multi_areas": [ # "21.0.0.0" # ], # "process_id": "200" # }, # { # "multi_areas": [ # "50.50.50.50" # ], # "process_id": "300" # } # ] # } # ], # "name": "Ethernet1/1" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "enable": true, # "key_chain": "test-1" # }, # "cost": 100, # "message_digest_key": { # "encryption": 3, # "key": "abc01d272be25d29", # "key_id": 10 # } # }, # { # "afi": "ipv6", # "network": "broadcast", # "shutdown": true # } # ], # "name": "Ethernet1/2" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication_key": { # "encryption": 7, # "key": "12090404011C03162E" # } # } # ], # "name": "Ethernet1/3" # }, # ] # # "commands": [ # "interface Ethernet1/2", # "no ip ospf authentication key-chain test-1", # "no ip ospf authentication", # "no ip ospf message-digest-key 10 md5 3 abc01d272be25d29", # "no ip ospf cost 100", # "no ospfv3 network broadcast", # "no ospfv3 shutdown", # "interface Ethernet1/3", # "no ip ospf authentication-key 7 12090404011C03162E", # "interface Ethernet1/1", # "ip router ospf multi-area 11.11.11.12", # "no ip router ospf multi-area 11.11.11.11", # "no ipv6 router ospfv3 multi-area 16.10.10.10", # "no ipv6 router ospfv3 200 area 2.2.2.2", # "no ipv6 router ospfv3 200 multi-area 21.0.0.0", # "no ipv6 router ospfv3 300 multi-area 50.50.50.50" # ] # # "after": [ # { # "address_family": [ # { # "afi": "ipv4", # "multi_areas": [ # "11.11.11.12" # ], # "processes": [ # { # "area": { # "area_id": "1.1.1.1", # "secondaries": false # }, # "process_id": "100" # } # ] # } # ], # "name": "Ethernet1/1" # }, # { # "name": "Ethernet1/2" # }, # { # "name": "Ethernet1/3" # }, # ] # After state: # ------------- # NXOS# show running-config | section ^interface # interface Ethernet1/1 # no switchport # ip router ospf 100 area 1.1.1.1 secondaries none # ip router ospf multi-area 11.11.11.12 # interface Ethernet1/2 # no switchport # interface Ethernet1/3 # no switchport # Using deleted to delete OSPF config of a single interface # Before state: # ------------ # NXOS# show running-config | section ^interface # interface Ethernet1/1 # no switchport # ip router ospf 100 area 1.1.1.1 secondaries none # ip router ospf multi-area 11.11.11.11 # ipv6 router ospfv3 200 area 2.2.2.2 # ipv6 router ospfv3 multi-area 16.10.10.10 # ipv6 router ospfv3 200 multi-area 21.0.0.0 # ipv6 router ospfv3 300 multi-area 50.50.50.50 # interface Ethernet1/2 # no switchport # ip ospf authentication # ip ospf authentication key-chain test-1 # ip ospf message-digest-key 10 md5 3 abc01d272be25d29 # ip ospf cost 100 # ospfv3 network broadcast # ospfv3 shutdown # interface Ethernet1/3 # no switchport # ip ospf authentication-key 7 12090404011C03162E - name: Delete OSPF config from a single interface cisco.nxos.nxos_ospf_interfaces: config: - name: Ethernet1/1 state: deleted # Task output # ------------- # "before": [ # { # "address_family": [ # { # "afi": "ipv4", # "multi_areas": [ # "11.11.11.11" # ], # "processes": [ # { # "area": { # "area_id": "1.1.1.1", # "secondaries": false # }, # "process_id": "100" # } # ] # }, # { # "afi": "ipv6", # "multi_areas": [ # "16.10.10.10" # ], # "processes": [ # { # "area": { # "area_id": "2.2.2.2" # }, # "multi_areas": [ # "21.0.0.0" # ], # "process_id": "200" # }, # { # "multi_areas": [ # "50.50.50.50" # ], # "process_id": "300" # } # ] # } # ], # "name": "Ethernet1/1" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "enable": true, # "key_chain": "test-1" # }, # "cost": 100, # "message_digest_key": { # "encryption": 3, # "key": "abc01d272be25d29", # "key_id": 10 # } # }, # { # "afi": "ipv6", # "network": "broadcast", # "shutdown": true # } # ], # "name": "Ethernet1/2" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication_key": { # "encryption": 7, # "key": "12090404011C03162E" # } # } # ], # "name": "Ethernet1/3" # }, # ] # # "commands": [ # "interface Ethernet1/1", # "no ip router ospf multi-area 11.11.11.11", # "no ip router ospf 100 area 1.1.1.1 secondaries none", # "no ipv6 router ospfv3 multi-area 16.10.10.10", # "no ipv6 router ospfv3 200 area 2.2.2.2", # "no ipv6 router ospfv3 200 multi-area 21.0.0.0", # "no ipv6 router ospfv3 300 multi-area 50.50.50.50" # ] # # "before": [ # { # "name": "Ethernet1/1" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "enable": true, # "key_chain": "test-1" # }, # "cost": 100, # "message_digest_key": { # "encryption": 3, # "key": "abc01d272be25d29", # "key_id": 10 # } # }, # { # "afi": "ipv6", # "network": "broadcast", # "shutdown": true # } # ], # "name": "Ethernet1/2" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication_key": { # "encryption": 7, # "key": "12090404011C03162E" # } # } # ], # "name": "Ethernet1/3" # }, # ] # After state: # ------------ # NXOS# show running-config | section ^interface # interface Ethernet1/1 # no switchport # interface Ethernet1/2 # no switchport # ip ospf authentication # ip ospf authentication key-chain test-1 # ip ospf message-digest-key 10 md5 3 abc01d272be25d29 # ip ospf cost 100 # ospfv3 network broadcast # ospfv3 shutdown # interface Ethernet1/3 # no switchport # ip ospf authentication-key 7 12090404011C03162E # Using deleted to delete OSPF config from all interfaces # Before state: # ------------ # NXOS# show running-config | section ^interface # interface Ethernet1/1 # no switchport # ip router ospf 100 area 1.1.1.1 secondaries none # ip router ospf multi-area 11.11.11.11 # ipv6 router ospfv3 200 area 2.2.2.2 # ipv6 router ospfv3 multi-area 16.10.10.10 # ipv6 router ospfv3 200 multi-area 21.0.0.0 # ipv6 router ospfv3 300 multi-area 50.50.50.50 # interface Ethernet1/2 # no switchport # ip ospf authentication # ip ospf authentication key-chain test-1 # ip ospf message-digest-key 10 md5 3 abc01d272be25d29 # ip ospf cost 100 # ospfv3 network broadcast # ospfv3 shutdown # interface Ethernet1/3 # no switchport # ip ospf authentication-key 7 12090404011C03162E - name: Delete OSPF config from all interfaces cisco.nxos.nxos_ospf_interfaces: state: deleted # Task output # ------------- # "before": [ # { # "address_family": [ # { # "afi": "ipv4", # "multi_areas": [ # "11.11.11.11" # ], # "processes": [ # { # "area": { # "area_id": "1.1.1.1", # "secondaries": false # }, # "process_id": "100" # } # ] # }, # { # "afi": "ipv6", # "multi_areas": [ # "16.10.10.10" # ], # "processes": [ # { # "area": { # "area_id": "2.2.2.2" # }, # "multi_areas": [ # "21.0.0.0" # ], # "process_id": "200" # }, # { # "multi_areas": [ # "50.50.50.50" # ], # "process_id": "300" # } # ] # } # ], # "name": "Ethernet1/1" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "enable": true, # "key_chain": "test-1" # }, # "cost": 100, # "message_digest_key": { # "encryption": 3, # "key": "abc01d272be25d29", # "key_id": 10 # } # }, # { # "afi": "ipv6", # "network": "broadcast", # "shutdown": true # } # ], # "name": "Ethernet1/2" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication_key": { # "encryption": 7, # "key": "12090404011C03162E" # } # } # ], # "name": "Ethernet1/3" # }, # ] # # "commands": [ # "interface Ethernet1/1", # "no ip router ospf multi-area 11.11.11.11", # "no ip router ospf 100 area 1.1.1.1 secondaries none", # "no ipv6 router ospfv3 multi-area 16.10.10.10", # "no ipv6 router ospfv3 200 area 2.2.2.2", # "no ipv6 router ospfv3 200 multi-area 21.0.0.0", # "no ipv6 router ospfv3 300 multi-area 50.50.50.50", # "interface Ethernet1/2", # "no ip ospf authentication key-chain test-1", # "no ip ospf authentication", # "no ip ospf message-digest-key 10 md5 3 abc01d272be25d29", # "no ip ospf cost 100", # "no ospfv3 network broadcast", # "no ospfv3 shutdown", # "interface Ethernet1/3", # "no ip ospf authentication-key 7 12090404011C03162E" # ] # # "after": [ # { # "name": "Ethernet1/1" # }, # { # "name": "Ethernet1/2" # }, # { # "name": "Ethernet1/3" # }, # ] # After state: # ------------ # NXOS# show running-config | section ^interface # interface Ethernet1/1 # no switchport # interface Ethernet1/2 # no switchport # interface Ethernet1/3 # no switchport # Using rendered - name: Render platform specific configuration lines with state rendered (without connecting to the device) cisco.nxos.nxos_ospf_interfaces: config: - name: Ethernet1/1 address_family: - afi: ipv4 processes: - process_id: "100" area: area_id: 1.1.1.1 secondaries: False multi_areas: - 11.11.11.11 - afi: ipv6 processes: - process_id: "200" area: area_id: 2.2.2.2 multi_areas: - 21.0.0.0 - process_id: "300" multi_areas: - 50.50.50.50 multi_areas: - 16.10.10.10 - name: Ethernet1/2 address_family: - afi: ipv4 authentication: enable: True key_chain: test-1 message_digest_key: key_id: 10 encryption: 3 key: abc01d272be25d29 cost: 100 - afi: ipv6 network: broadcast shutdown: True - name: Ethernet1/3 address_family: - afi: ipv4 authentication_key: encryption: 7 key: 12090404011C03162E state: rendered # Task Output (redacted) # ----------------------- # "rendered": [ # "interface Ethernet1/1", # "ip router ospf multi-area 11.11.11.11", # "ip router ospf 100 area 1.1.1.1 secondaries none", # "ipv6 router ospfv3 multi-area 16.10.10.10", # "ipv6 router ospfv3 200 area 2.2.2.2", # "ipv6 router ospfv3 200 multi-area 21.0.0.0", # "ipv6 router ospfv3 300 multi-area 50.50.50.50", # "interface Ethernet1/2", # "ip ospf authentication key-chain test-1", # "ip ospf authentication", # "ip ospf message-digest-key 10 md5 3 abc01d272be25d29", # "ip ospf cost 100", # "ospfv3 network broadcast", # "ospfv3 shutdown", # "interface Ethernet1/3", # "ip ospf authentication-key 7 12090404011C03162E" # ] # Using parsed # parsed.cfg # ------------ # interface Ethernet1/1 # ip router ospf 100 area 1.1.1.1 secondaries none # ip router ospf multi-area 11.11.11.11 # ipv6 router ospfv3 200 area 2.2.2.2 # ipv6 router ospfv3 200 multi-area 21.0.0.0 # ipv6 router ospfv3 300 multi-area 50.50.50.50 # ipv6 router ospfv3 multi-area 16.10.10.10 # interface Ethernet1/2 # ip ospf authentication # ip ospf authentication key-chain test-1 # ip ospf message-digest-key 10 md5 3 abc01d272be25d29 # ip ospf cost 100 # ospfv3 network broadcast # ospfv3 shutdown # interface Ethernet1/3 # ip ospf authentication-key 7 12090404011C03162E - name: arse externally provided OSPF interfaces config cisco.nxos.nxos_ospf_interfaces: running_config: "{{ lookup('file', 'ospf_interfaces.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # "parsed": [ # { # "address_family": [ # { # "afi": "ipv4", # "multi_areas": [ # "11.11.11.11" # ], # "processes": [ # { # "area": { # "area_id": "1.1.1.1", # "secondaries": false # }, # "process_id": "100" # } # ] # }, # { # "afi": "ipv6", # "multi_areas": [ # "16.10.10.10" # ], # "processes": [ # { # "area": { # "area_id": "2.2.2.2" # }, # "multi_areas": [ # "21.0.0.0" # ], # "process_id": "200" # }, # { # "multi_areas": [ # "50.50.50.50" # ], # "process_id": "300" # } # ] # } # ], # "name": "Ethernet1/1" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "enable": true, # "key_chain": "test-1" # }, # "cost": 100, # "message_digest_key": { # "encryption": 3, # "key": "abc01d272be25d29", # "key_id": 10 # } # }, # { # "afi": "ipv6", # "network": "broadcast", # "shutdown": true # } # ], # "name": "Ethernet1/2" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication_key": { # "encryption": 7, # "key": "12090404011C03162E" # } # } # ], # "name": "Ethernet1/3" # }, # ] # Using gathered # On-box config # NXOS# show running-config | section ^interface # interface Ethernet1/1 # no switchport # ip router ospf 100 area 1.1.1.1 secondaries none # ip router ospf multi-area 11.11.11.12 # interface Ethernet1/2 # no switchport # ip ospf authentication # ip ospf authentication key-chain test-1 # ip ospf message-digest-key 10 md5 3 abc01d272be25d29 # ip ospf cost 100 # ospfv3 network broadcast # ospfv3 shutdown # interface Ethernet1/3 # no switchport # Task output (redacted) # ----------------------- # "gathered": [ # { # "address_family": [ # { # "afi": "ipv4", # "multi_areas": [ # "11.11.11.12" # ], # "processes": [ # { # "area": { # "area_id": "1.1.1.1", # "secondaries": false # }, # "process_id": "100" # } # ] # } # ], # "name": "Ethernet1/1" # }, # { # "address_family": [ # { # "afi": "ipv4", # "authentication": { # "enable": true, # "key_chain": "test-1" # }, # "cost": 100, # "message_digest_key": { # "encryption": 3, # "key": "abc01d272be25d29", # "key_id": 10 # } # }, # { # "afi": "ipv6", # "network": "broadcast", # "shutdown": true # } # ], # "name": "Ethernet1/2" # }, # { # "name": "Ethernet1/3" # }, ``` 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 resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. | | **before** list / elements=string | always | The configuration prior to the model 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 Ethernet1/1', 'ip router ospf multi-area 11.11.11.11', 'ip router ospf 100 area 1.1.1.1 secondaries none', 'no ipv6 router ospfv3 multi-area 16.10.10.10', 'ipv6 router ospfv3 200 area 2.2.2.2', 'ipv6 router ospfv3 200 multi-area 21.0.0.0', 'ipv6 router ospfv3 300 multi-area 50.50.50.50', 'interface Ethernet1/2', 'no ip ospf authentication key-chain test-1', 'ip ospf authentication'] | ### Authors * Nilashish Chakraborty (@NilashishC)
programming_docs
ansible cisco.nxos.nxos – Use NX-API to run commands on Cisco NX-OS platform cisco.nxos.nxos – Use NX-API to run commands on Cisco NX-OS platform ==================================================================== 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`. New in version 1.0.0: of cisco.nxos Synopsis -------- * This plugin provides low level abstraction APIs for sending and receiving commands using NX-API with devices running Cisco NX-OS. ### Authors * Ansible Networking Team ansible cisco.nxos.nxos_bfd_interfaces – BFD interfaces resource module cisco.nxos.nxos\_bfd\_interfaces – BFD interfaces resource module ================================================================= 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_bfd_interfaces`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages attributes of Bidirectional Forwarding Detection (BFD) on the interface. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | The provided configuration | | | **bfd** string | **Choices:*** enable * disable | Enable/Disable Bidirectional Forwarding Detection (BFD) on the interface. | | | **echo** string | **Choices:*** enable * disable | Enable/Disable BFD Echo functionality on the interface. | | | **name** string | | The name of the interface. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the command **show running-config | section '^interface|^feature bfd'**. 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 * gathered * rendered * parsed | The state of the configuration after module completion | Notes ----- Note * Tested against NX-OS 7.0(3)I5(1). * Unsupported for Cisco MDS * Feature bfd should be enabled for this module. Examples -------- ``` # Using deleted - name: Configure interfaces cisco.nxos.nxos_bfd_interfaces: state: deleted # Using merged - name: Configure interfaces cisco.nxos.nxos_bfd_interfaces: config: - name: Ethernet1/1 bfd: enable echo: enable - name: Ethernet1/2 bfd: disable echo: disable state: merged # Using overridden - name: Configure interfaces cisco.nxos.nxos_bfd_interfaces: config: - name: Ethernet1/1 bfd: enable echo: enable - name: Ethernet1/2 bfd: disable echo: disable state: overridden # Using replaced - name: Configure interfaces cisco.nxos.nxos_bfd_interfaces: config: - name: Ethernet1/1 bfd: enable echo: enable - name: Ethernet1/2 bfd: disable echo: disable state: replaced # Using rendered - name: Use rendered state to convert task input to device specific commands cisco.nxos.nxos_bfd_interfaces: config: - name: Ethernet1/800 bfd: enable echo: enable - name: Ethernet1/801 bfd: disable echo: disable state: rendered # Task Output (redacted) # ----------------------- # rendered: # - "interface Ethernet1/800" # - "bfd" # - "bfd echo" # - "interface Ethernet1/801" # - "no bfd" # - "no bfd echo" # Using parsed # parsed.cfg # ------------ # feature bfd # interface Ethernet1/800 # no switchport # no bfd # no bfd echo # interface Ethernet1/801 # no switchport # no bfd # interface Ethernet1/802 # no switchport # no bfd echo # interface mgmt0 # ip address dhcp # vrf member management - name: Use parsed state to convert externally supplied config to structured format cisco.nxos.nxos_bfd_interfaces: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # - bfd: disable # echo: disable # name: Ethernet1/800 # - bfd: disable # echo: enable # name: Ethernet1/801 # - bfd: enable # echo: disable # name: Ethernet1/802 # - bfd: enable # echo: enable # name: mgmt0 # Using gathered # Existing device config state # ------------------------------- # feature bfd # interface Ethernet1/1 # no switchport # no bfd # interface Ethernet1/2 # no switchport # no bfd echo # interface mgmt0 # ip address dhcp # vrf member management - name: Gather bfd_interfaces facts from the device using nxos_bfd_interfaces cisco.nxos.nxos_bfd_interfaces: state: gathered # Task output (redacted) # ----------------------- # gathered: # - name: Ethernet1/1 # bfd: disable # echo: enable # - name: Ethernet1/3 # echo: disable # bfd: enable # - name: mgmt0 # bfd: enable # echo: enable ``` 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 Ethernet1/1', 'no bfd', 'no bfd echo'] | ### Authors * Chris Van Heuveln (@chrisvanheuveln) ansible cisco.nxos.nxos_pim_interface – Manages PIM interface configuration. cisco.nxos.nxos\_pim\_interface – Manages PIM interface configuration. ====================================================================== 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_pim_interface`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages PIM interface configuration settings. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **bfd** string | **Choices:*** enable * disable * default | Enables BFD for PIM at the interface level. This overrides the bfd variable set at the pim global level. Valid values are 'enable', 'disable' or 'default'. Dependency: ''feature bfd'' | | **border** boolean | **Choices:*** **no** ← * yes | Configures interface to be a boundary of a PIM domain. | | **dr\_prio** string | | Configures priority for PIM DR election on interface. | | **hello\_auth\_key** string | | Authentication for hellos on this interface. | | **hello\_interval** integer | | Hello interval in milliseconds or seconds for this interface. Use the option *hello\_interval\_ms* to specify if the given value is in milliseconds or seconds. The default is seconds. | | **hello\_interval\_ms** boolean added in 2.0.0 of cisco.nxos | **Choices:*** no * yes | Specifies that the hello\_interval is in milliseconds. When set to True, this indicates that the user is providing the hello\_interval in milliseconds and hence, no conversion is required. | | **interface** string / required | | Full name of the interface such as Ethernet1/33. | | **jp\_policy\_in** string | | Policy for join-prune messages (inbound). | | **jp\_policy\_out** string | | Policy for join-prune messages (outbound). | | **jp\_type\_in** string | **Choices:*** prefix * routemap | Type of policy mapped to `jp_policy_in`. | | **jp\_type\_out** string | **Choices:*** prefix * routemap | Type of policy mapped to `jp_policy_out`. | | **neighbor\_policy** string | | Configures a neighbor policy for filtering adjacencies. | | **neighbor\_type** string | **Choices:*** prefix * routemap | Type of policy mapped to neighbor\_policy. | | **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. | | **sparse** boolean | **Choices:*** **no** ← * yes | Enable/disable sparse-mode on the interface. | | **state** string | **Choices:*** **present** ← * absent * default | Manages desired state of the resource. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * When `state=default`, supported params will be reset to a default state. These include `dr_prio`, `hello_auth_key`, `hello_interval`, `jp_policy_out`, `jp_policy_in`, `jp_type_in`, `jp_type_out`, `border`, `neighbor_policy`, `neighbor_type`. * The `hello_auth_key` param is not idempotent. * `hello_auth_key` only supports clear text passwords. * When `state=absent`, pim interface configuration will be set to defaults and pim-sm will be disabled on the interface. * PIM must be enabled on the device to use this module. * This module is for Layer 3 interfaces. * 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: Ensure PIM is not running on the interface cisco.nxos.nxos_pim_interface: interface: eth1/33 state: absent - name: Ensure the interface has pim-sm enabled with the appropriate priority and hello interval cisco.nxos.nxos_pim_interface: interface: eth1/33 dr_prio: 10 hello_interval: 40 state: present - name: Ensure join-prune policies exist cisco.nxos.nxos_pim_interface: interface: eth1/33 jp_policy_in: JPIN jp_policy_out: JPOUT jp_type_in: routemap jp_type_out: routemap - name: disable bfd on the interface cisco.nxos.nxos_pim_interface: interface: eth1/33 bfd: disable - name: Ensure defaults are in place cisco.nxos.nxos_pim_interface: interface: eth1/33 state: 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 | | --- | --- | --- | | **commands** list / elements=string | always | command sent to the device **Sample:** ['interface eth1/33', 'ip pim neighbor-policy test', 'ip pim bfd-instance disable', 'ip pim neighbor-policy test'] | ### Authors * Jason Edelman (@jedelman8) ansible cisco.nxos.nxos_interface – (deprecated, removed after 2022-06-01) Manages physical attributes of interfaces. cisco.nxos.nxos\_interface – (deprecated, removed after 2022-06-01) Manages physical attributes of interfaces. ============================================================================================================== 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_interface`. New in version 1.0.0: of cisco.nxos * [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 nxos\_interfaces Synopsis -------- * Manages physical attributes of interfaces of NX-OS switches. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **admin\_state** string | **Choices:*** **up** ← * down | Administrative state of the interface. | | **aggregate** list / elements=dictionary | | List of Interfaces definitions. | | | **admin\_state** string | **Choices:*** up * down | Administrative state of the interface. | | | **delay** integer | | Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state arguments. | | | **description** string | | Interface description. | | | **duplex** string | **Choices:*** full * half * auto | Interface link status. Applicable for ethernet interface only. | | | **fabric\_forwarding\_anycast\_gateway** boolean | **Choices:*** no * yes | Associate SVI with anycast gateway under VLAN configuration mode. Applicable for SVI interface only. | | | **interface\_type** string | **Choices:*** loopback * portchannel * svi * nve | Interface type to be unconfigured from the device. | | | **ip\_forward** string | **Choices:*** enable * disable | Enable/Disable ip forward feature on SVIs. | | | **mode** string | **Choices:*** layer2 * layer3 | Manage Layer 2 or Layer 3 state of the interface. This option is supported for ethernet and portchannel interface. Applicable for ethernet and portchannel interface only. | | | **mtu** string | | MTU for a specific interface. Must be an even number between 576 and 9216. Applicable for ethernet interface only. | | | **name** string / required | | Full name of interface, i.e. Ethernet1/1, port-channel10. | | | **neighbors** list / elements=dictionary | | Check the operational state of given interface `name` for LLDP neighbor. The following suboptions are available. This is state check parameter only. | | | | **host** string | | LLDP neighbor host for given interface `name`. | | | | **port** string | | LLDP neighbor port to which given interface `name` is connected. | | | **rx\_rate** string | | Receiver rate in bits per second (bps). This is state check parameter only. Supports conditionals, see [https://docs.ansible.com/ansible/latest/network/user\_guide/network\_working\_with\_command\_output.html#conditionals-in-networking-modules](../../../network/user_guide/network_working_with_command_output#conditionals-in-networking-modules) | | | **speed** string | | Interface link speed. Applicable for ethernet interface only. | | | **state** string | **Choices:*** present * absent * default | Specify desired state of the resource. | | | **tx\_rate** string | | Transmit rate in bits per second (bps). This is state check parameter only. Supports conditionals, see [https://docs.ansible.com/ansible/latest/network/user\_guide/network\_working\_with\_command\_output.html#conditionals-in-networking-modules](../../../network/user_guide/network_working_with_command_output#conditionals-in-networking-modules) | | **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. | | **description** string | | Interface description. | | **duplex** string | **Choices:*** full * half * auto | Interface link status. Applicable for ethernet interface only. | | **fabric\_forwarding\_anycast\_gateway** boolean | **Choices:*** no * yes | Associate SVI with anycast gateway under VLAN configuration mode. Applicable for SVI interface only. | | **interface\_type** string | **Choices:*** loopback * portchannel * svi * nve | Interface type to be unconfigured from the device. | | **ip\_forward** string | **Choices:*** enable * disable | Enable/Disable ip forward feature on SVIs. | | **mode** string | **Choices:*** layer2 * layer3 | Manage Layer 2 or Layer 3 state of the interface. This option is supported for ethernet and portchannel interface. Applicable for ethernet and portchannel interface only. | | **mtu** string | | MTU for a specific interface. Must be an even number between 576 and 9216. Applicable for ethernet interface only. | | **name** string | | Full name of interface, i.e. Ethernet1/1, port-channel10. aliases: interface | | **neighbors** list / elements=dictionary | | Check the operational state of given interface `name` for LLDP neighbor. The following suboptions are available. This is state check parameter only. | | | **host** string | | LLDP neighbor host for given interface `name`. | | | **port** string | | LLDP neighbor port to which given interface `name` is connected. | | **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. | | **rx\_rate** string | | Receiver rate in bits per second (bps). This is state check parameter only. Supports conditionals, see [https://docs.ansible.com/ansible/latest/network/user\_guide/network\_working\_with\_command\_output.html#conditionals-in-networking-modules](../../../network/user_guide/network_working_with_command_output#conditionals-in-networking-modules) | | **speed** string | | Interface link speed. Applicable for ethernet interface only. | | **state** string | **Choices:*** **present** ← * absent * default | Specify desired state of the resource. | | **tx\_rate** string | | Transmit rate in bits per second (bps). This is state check parameter only. Supports conditionals, see [https://docs.ansible.com/ansible/latest/network/user\_guide/network\_working\_with\_command\_output.html#conditionals-in-networking-modules](../../../network/user_guide/network_working_with_command_output#conditionals-in-networking-modules) | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * This module is also used to create logical interfaces such as svis and loopbacks. * Be cautious of platform specific idiosyncrasies. For example, when you default a loopback interface, the admin state toggles on certain versions of NX-OS. * The [cisco.nxos.nxos\_overlay\_global](nxos_overlay_global_module#ansible-collections-cisco-nxos-nxos-overlay-global-module) `anycast_gateway_mac` attribute must be set before setting the `fabric_forwarding_anycast_gateway` property. * 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: Ensure an interface is a Layer 3 port and that it has the proper description cisco.nxos.nxos_interface: name: Ethernet1/1 description: Configured by Ansible mode: layer3 - name: Admin down an interface cisco.nxos.nxos_interface: name: Ethernet2/1 admin_state: down - name: Remove all loopback interfaces cisco.nxos.nxos_interface: name: loopback state: absent - name: Remove all logical interfaces cisco.nxos.nxos_interface: interface_type: '{{ item }} ' state: absent loop: - loopback - portchannel - svi - nve - name: Admin up all loopback interfaces cisco.nxos.nxos_interface: name: loopback 0-1023 admin_state: up - name: Admin down all loopback interfaces cisco.nxos.nxos_interface: name: loopback 0-1023 admin_state: down - name: Check neighbors intent arguments cisco.nxos.nxos_interface: name: Ethernet2/3 neighbors: - port: Ethernet2/3 host: abc.mycompany.com - name: Add interface using aggregate cisco.nxos.nxos_interface: aggregate: - {name: Ethernet0/1, mtu: 256, description: test-interface-1} - {name: Ethernet0/2, mtu: 516, description: test-interface-2} duplex: full speed: 100 state: present - name: Delete interface using aggregate cisco.nxos.nxos_interface: aggregate: - name: Loopback9 - name: Loopback10 state: absent - name: Check intent arguments cisco.nxos.nxos_interface: name: Ethernet0/2 state: up tx_rate: ge(0) rx_rate: le(0) ``` 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 | command list sent to the device **Sample:** ['interface Ethernet2/3', 'mtu 1500', 'speed 10'] | Status ------ * This module will be removed in a major release after 2022-06-01. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Jason Edelman (@jedelman8) * Trishna Guha (@trishnaguha)
programming_docs
ansible cisco.nxos.nxos_ntp_options – Manages NTP options. cisco.nxos.nxos\_ntp\_options – Manages NTP options. ==================================================== 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_ntp_options`. New in version 1.0.0: of cisco.nxos * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in major release after 2024-01-01 Why Updated module released with more functionality. Alternative nxos\_ntp\_global Synopsis -------- * Manages NTP options, e.g. authoritative server and logging. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **logging** boolean | **Choices:*** no * yes | Sets whether NTP logging is enabled on the device. | | **master** boolean | **Choices:*** no * yes | Sets whether the device is an authoritative NTP server. | | **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. | | **state** string | **Choices:*** **present** ← * absent | Manage the state of the resource. | | **stratum** string | | If `master=true`, an optional stratum can be supplied (1-15). The device default is 8. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Limited Support for Cisco MDS * When `state=absent`, master and logging will be set to False and stratum will be removed as well * 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 -------- ``` # Basic NTP options configuration - cisco.nxos.nxos_ntp_options: master: true stratum: 12 logging: false host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' ``` 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 | | --- | --- | --- | | **updates** list / elements=string | always | command sent to the device **Sample:** ['no ntp logging', 'ntp master 12'] | Status ------ * This module will be removed in a major release after 2024-01-01. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Jason Edelman (@jedelman8) ansible cisco.nxos.nxos_vlans – VLANs resource module cisco.nxos.nxos\_vlans – VLANs resource module ============================================== 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_vlans`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module creates and manages VLAN configurations on Cisco NX-OS. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A dictionary of Vlan options | | | **enabled** boolean | **Choices:*** no * yes | Manage administrative state of the vlan. | | | **mapped\_vni** integer | | The Virtual Network Identifier (VNI) ID that is mapped to the VLAN. | | | **mode** string | **Choices:*** ce * fabricpath | Set vlan mode to classical ethernet or fabricpath. This is a valid option for Nexus 5000, 6000 and 7000 series. | | | **name** string | | Name of VLAN. | | | **state** string | **Choices:*** active * suspend | Manage operational state of the vlan. | | | **vlan\_id** integer / required | | Vlan ID. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the commands **show vlans | json-pretty** and **show running-config | section ^vlan** in order and delimited by a line. 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 * gathered * rendered * parsed | The state of the configuration after module completion. The state *overridden* would override the configuration of all the VLANs on the device (including VLAN 1) with the provided configuration in the task. Use caution with this state. | Notes ----- Note * Tested against NXOS 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS Examples -------- ``` # Using merged # Before state: # ------------- # vlan 1 - name: Merge provided configuration with device configuration. cisco.nxos.nxos_vlans: config: - vlan_id: 5 name: test-vlan5 - vlan_id: 10 enabled: false state: merged # After state: # ------------ # vlan 5 # name test-vlan5 # state active # no shutdown # vlan 10 # state active # shutdown # Using replaced # Before state: # ------------- # vlan 1 # vlan 5 # name test-vlan5 # vlan 10 # shutdown - name: Replace device configuration of specified vlan with provided configuration. cisco.nxos.nxos_vlans: config: - vlan_id: 5 name: test-vlan enabled: false - vlan_id: 10 enabled: false state: replaced # After state: # ------------ # vlan 1 # vlan 5 # name test-vlan # state active # shutdown # vlan 10 # state active # shutdown # Using overridden # Before state: # ------------- # vlan 1 # vlan 3 # name testing # vlan 5 # name test-vlan5 # shutdown # vlan 10 # shutdown - name: Override device configuration of all vlans with provided configuration. cisco.nxos.nxos_vlans: config: - vlan_id: 5 name: test-vlan - vlan_id: 10 state: active state: overridden # After state: # ------------ # vlan 5 # name test-vlan # state active # no shutdown # vlan 10 # state active # no shutdown # Using deleted # Before state: # ------------- # vlan 1 # vlan 5 # vlan 10 - name: Delete vlans. cisco.nxos.nxos_vlans: config: - vlan_id: 5 - vlan_id: 10 state: deleted # After state: # ------------ # # Using rendered - name: Use rendered state to convert task input to device specific commands cisco.nxos.nxos_vlans: config: - vlan_id: 5 name: vlan5 mapped_vni: 100 - vlan_id: 6 name: vlan6 state: suspend state: rendered # Task Output (redacted) # ----------------------- # rendered: # - vlan 5 # - name vlan5 # - vn-segment 100 # - vlan 6 # - name vlan6 # - state suspend # Using parsed # parsed.cfg # ------------ # { # "TABLE_vlanbrief": { # "ROW_vlanbrief": [ # { # "vlanshowbr-vlanid": "1", # "vlanshowbr-vlanid-utf": "1", # "vlanshowbr-vlanname": "default", # "vlanshowbr-vlanstate": "active", # "vlanshowbr-shutstate": "noshutdown" # }, # { # "vlanshowbr-vlanid": "5", # "vlanshowbr-vlanid-utf": "5", # "vlanshowbr-vlanname": "vlan5", # "vlanshowbr-vlanstate": "suspend", # "vlanshowbr-shutstate": "noshutdown" # }, # { # "vlanshowbr-vlanid": "6", # "vlanshowbr-vlanid-utf": "6", # "vlanshowbr-vlanname": "VLAN0006", # "vlanshowbr-vlanstate": "active", # "vlanshowbr-shutstate": "noshutdown" # }, # { # "vlanshowbr-vlanid": "7", # "vlanshowbr-vlanid-utf": "7", # "vlanshowbr-vlanname": "vlan7", # "vlanshowbr-vlanstate": "active", # "vlanshowbr-shutstate": "noshutdown" # } # ] # }, # "TABLE_mtuinfo": { # "ROW_mtuinfo": [ # { # "vlanshowinfo-vlanid": "1", # "vlanshowinfo-media-type": "enet", # "vlanshowinfo-vlanmode": "ce-vlan" # }, # { # "vlanshowinfo-vlanid": "5", # "vlanshowinfo-media-type": "enet", # "vlanshowinfo-vlanmode": "ce-vlan" # }, # { # "vlanshowinfo-vlanid": "6", # "vlanshowinfo-media-type": "enet", # "vlanshowinfo-vlanmode": "ce-vlan" # }, # { # "vlanshowinfo-vlanid": "7", # "vlanshowinfo-media-type": "enet", # "vlanshowinfo-vlanmode": "ce-vlan" # } # ] # } # } # # vlan 1,5-7 # vlan 5 # state suspend # name vlan5 # vlan 7 # name vlan7 # vn-segment 100 - name: Use parsed state to convert externally supplied config to structured format cisco.nxos.nxos_vlans: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # - vlan_id: 5 # enabled: True # mode: "ce" # name: "vlan5" # state: suspend # # - vlan_id: 6 # enabled: True # mode: "ce" # state: active # # - vlan_id: 7 # enabled: True # mode: "ce" # name: "vlan7" # state: active # mapped_vni: 100 # Using gathered # Existing device config state # ------------------------------- # nxos-9k# show vlan | json # {"TABLE_vlanbrief": {"ROW_vlanbrief": [{"vlanshowbr-vlanid": "1", "vlanshowbr-vlanid-utf": "1", "vlanshowbr-vlanname": "default", "vlanshowbr-vlanstate # ": "active", "vlanshowbr-shutstate": "noshutdown"}, {"vlanshowbr-vlanid": "5", "vlanshowbr-vlanid-utf": "5", "vlanshowbr-vlanname": "vlan5", "vlanshowb # r-vlanstate": "suspend", "vlanshowbr-shutstate": "noshutdown"}, {"vlanshowbr-vlanid": "6", "vlanshowbr-vlanid-utf": "6", "vlanshowbr-vlanname": "VLAN00 # 06", "vlanshowbr-vlanstate": "active", "vlanshowbr-shutstate": "noshutdown"}, {"vlanshowbr-vlanid": "7", "vlanshowbr-vlanid-utf": "7", "vlanshowbr-vlan # name": "vlan7", "vlanshowbr-vlanstate": "active", "vlanshowbr-shutstate": "shutdown"}]}, "TABLE_mtuinfo": {"ROW_mtuinfo": [{"vlanshowinfo-vlanid": "1", # "vlanshowinfo-media-type": "enet", "vlanshowinfo-vlanmode": "ce-vlan"}, {"vlanshowinfo-vlanid": "5", "vlanshowinfo-media-type": "enet", "vlanshowinfo- # vlanmode": "ce-vlan"}, {"vlanshowinfo-vlanid": "6", "vlanshowinfo-media-type": "enet", "vlanshowinfo-vlanmode": "ce-vlan"}, {"vlanshowinfo-vlanid": "7" # , "vlanshowinfo-media-type": "enet", "vlanshowinfo-vlanmode": "ce-vlan"}]}} # # nxos-9k# show running-config | section ^vlan # vlan 1,5-7 # vlan 5 # state suspend # name vlan5 # vlan 7 # shutdown # name vlan7 # vn-segment 190 - name: Gather vlans facts from the device using nxos_vlans cisco.nxos.nxos_vlans: state: gathered # Task output (redacted) # ----------------------- # gathered: # - vlan_id: 5 # enabled: True # mode: "ce" # name: "vlan5" # state: suspend # # - vlan_id: 6 # enabled: True # mode: "ce" # state: active # # - vlan_id: 7 # enabled: False # mode: "ce" # name: "vlan7" # state: active # mapped_vni: 190 ``` 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:** ['vlan 5', 'name test-vlan5', 'state suspend'] | ### Authors * Trishna Guha (@trishnaguha) ansible cisco.nxos.nxos_gir – Trigger a graceful removal or insertion (GIR) of the switch. cisco.nxos.nxos\_gir – Trigger a graceful removal or insertion (GIR) of the switch. =================================================================================== 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_gir`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Trigger a graceful removal or insertion (GIR) of the switch. * GIR processing may take more than 2 minutes. Timeout settings are automatically extended to 200s when user timeout settings are insufficient. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **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. | | **state** string | **Choices:*** **present** ← * absent | Specify desired state of the resource. | | **system\_mode\_maintenance** boolean | **Choices:*** no * yes | When `system_mode_maintenance=true` it puts all enabled protocols in maintenance mode (using the isolate command). When `system_mode_maintenance=false` it puts all enabled protocols in normal mode (using the no isolate command). | | **system\_mode\_maintenance\_dont\_generate\_profile** boolean | **Choices:*** no * yes | When `system_mode_maintenance_dont_generate_profile=true` it prevents the dynamic searching of enabled protocols and executes commands configured in a maintenance-mode profile. Use this option if you want the system to use a maintenance-mode profile that you have created. When `system_mode_maintenance_dont_generate_profile=false` it prevents the dynamic searching of enabled protocols and executes commands configured in a normal-mode profile. Use this option if you want the system to use a normal-mode profile that you have created. | | **system\_mode\_maintenance\_on\_reload\_reset\_reason** string | **Choices:*** hw\_error * svc\_failure * kern\_failure * wdog\_timeout * fatal\_error * lc\_failure * match\_any * manual\_reload * any\_other * maintenance | Boots the switch into maintenance mode automatically in the event of a specified system crash. Note that not all reset reasons are applicable for all platforms. Also if reset reason is set to match\_any, it is not idempotent as it turns on all reset reasons. If reset reason is match\_any and state is absent, it turns off all the reset reasons. | | **system\_mode\_maintenance\_shutdown** boolean | **Choices:*** no * yes | Shuts down all protocols, vPC domains, and interfaces except the management interface (using the shutdown command). This option is disruptive while `system_mode_maintenance` (which uses the isolate command) is not. | | **system\_mode\_maintenance\_timeout** string | | Keeps the switch in maintenance mode for a specified number of minutes. Range is 5-65535. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * `state` has effect only in combination with `system_mode_maintenance_timeout` or `system_mode_maintenance_on_reload_reset_reason`. * Using `system_mode_maintenance` and `system_mode_maintenance_dont_generate_profile` would make the module fail, but the system mode will be triggered anyway. * 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 -------- ``` # Trigger system maintenance mode - cisco.nxos.nxos_gir: system_mode_maintenance: true host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' # Trigger system normal mode - cisco.nxos.nxos_gir: system_mode_maintenance: false host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' # Configure on-reload reset-reason for maintenance mode - cisco.nxos.nxos_gir: system_mode_maintenance_on_reload_reset_reason: manual_reload state: present host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' # Add on-reload reset-reason for maintenance mode - cisco.nxos.nxos_gir: system_mode_maintenance_on_reload_reset_reason: hw_error state: present host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' # Remove on-reload reset-reason for maintenance mode - cisco.nxos.nxos_gir: system_mode_maintenance_on_reload_reset_reason: manual_reload state: absent host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' # Set timeout for maintenance mode - cisco.nxos.nxos_gir: system_mode_maintenance_timeout: 30 state: present host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' # Remove timeout for maintenance mode - cisco.nxos.nxos_gir: system_mode_maintenance_timeout: 30 state: absent host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' ``` 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 **Sample:** True | | **final\_system\_mode** string | verbose mode | describe the last system mode **Sample:** normal | | **updates** list / elements=string | verbose mode | commands sent to the device **Sample:** ['terminal dont-ask', 'system mode maintenance timeout 10'] | ### Authors * Gabriele Gerbino (@GGabriele)
programming_docs
ansible cisco.nxos.nxos_snmp_host – Manages SNMP host configuration. cisco.nxos.nxos\_snmp\_host – Manages SNMP host configuration. ============================================================== 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_snmp_host`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages SNMP host configuration parameters. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **community** string | | Community string or v3 username. | | **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. | | **snmp\_host** string / required | | IP address of hostname of target host. | | **snmp\_type** string | **Choices:*** trap * inform | type of message to send to host. If this is not specified, trap type is used. | | **src\_intf** string | | Source interface. Must be fully qualified interface name. If state = absent, the interface is removed. | | **state** string | **Choices:*** **present** ← * absent | Manage the state of the resource. If state = present, the host is added to the configuration. If only vrf and/or vrf\_filter and/or src\_intf are given, they will be added to the existing host configuration. If state = absent, the host is removed if community parameter is given. It is possible to remove only vrf and/or src\_int and/or vrf\_filter by providing only those parameters and no community parameter. | | **udp** string | **Default:**162 | UDP port number (0-65535). | | **v3** string | **Choices:*** noauth * auth * priv | Use this when verion is v3. SNMPv3 Security level. | | **version** string | **Choices:*** v1 * v2c * v3 | SNMP version. If this is not specified, v1 is used. | | **vrf** string | | VRF to use to source traffic to source. If state = absent, the vrf is removed. | | **vrf\_filter** string | | Name of VRF to filter. If state = absent, the vrf is removed from the filter. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Limited Support for Cisco MDS * `state=absent` removes the host configuration if it is configured. * 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 -------- ``` # ensure snmp host is configured - cisco.nxos.nxos_snmp_host: snmp_host: 192.0.2.3 community: TESTING 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 | commands sent to the device **Sample:** ['snmp-server host 192.0.2.3 filter-vrf another\_test\_vrf'] | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_l2_interfaces – L2 interfaces resource module cisco.nxos.nxos\_l2\_interfaces – L2 interfaces resource module =============================================================== 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_l2_interfaces`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages Layer-2 interfaces attributes of NX-OS Interfaces. 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-2 interface options | | | **access** dictionary | | Switchport mode access command to configure the interface as a Layer-2 access. | | | | **vlan** integer | | Configure given VLAN in access port. It's used as the access VLAN ID. | | | **mode** string | **Choices:*** access * trunk * fex-fabric * fabricpath | Mode in which interface needs to be configured. Access mode is not shown in interface facts, so idempotency will not be maintained for switchport mode access and every time the output will come as changed=True. | | | **name** string / required | | Full name of interface, i.e. Ethernet1/1. | | | **trunk** dictionary | | Switchport mode trunk command to configure the interface as a Layer-2 trunk. | | | | **allowed\_vlans** string | | List of allowed VLANs in a given trunk port. These are the only VLANs that will be configured on the trunk. | | | | **native\_vlan** integer | | Native VLAN to be configured in trunk port. It is used as the trunk native VLAN ID. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS 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 * gathered * rendered * parsed | The state of the configuration after module completion. | Notes ----- Note * Tested against NXOS 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS Examples -------- ``` # Using merged # Before state: # ------------- # # interface Ethernet1/1 # switchport access vlan 20 # interface Ethernet1/2 # switchport trunk native vlan 20 # interface mgmt0 # ip address dhcp # ipv6 address auto-config - name: Merge provided configuration with device configuration. cisco.nxos.nxos_l2_interfaces: config: - name: Ethernet1/1 trunk: native_vlan: 10 allowed_vlans: 2,4,15 - name: Ethernet1/2 access: vlan: 30 state: merged # After state: # ------------ # # interface Ethernet1/1 # switchport trunk native vlan 10 # switchport trunk allowed vlans 2,4,15 # interface Ethernet1/2 # switchport access vlan 30 # interface mgmt0 # ip address dhcp # ipv6 address auto-config # Using replaced # Before state: # ------------- # # interface Ethernet1/1 # switchport access vlan 20 # interface Ethernet1/2 # switchport trunk native vlan 20 # interface mgmt0 # ip address dhcp # ipv6 address auto-config - name: Replace device configuration of specified L2 interfaces with provided configuration. cisco.nxos.nxos_l2_interfaces: config: - name: Ethernet1/1 trunk: native_vlan: 20 allowed_vlans: 5-10, 15 state: replaced # After state: # ------------ # # interface Ethernet1/1 # switchport trunk native vlan 20 # switchport trunk allowed vlan 5-10,15 # interface Ethernet1/2 # switchport trunk native vlan 20 # switchport mode trunk # interface mgmt0 # ip address dhcp # ipv6 address auto-config # Using overridden # Before state: # ------------- # # interface Ethernet1/1 # switchport access vlan 20 # interface Ethernet1/2 # switchport trunk native vlan 20 # interface mgmt0 # ip address dhcp # ipv6 address auto-config - name: Override device configuration of all L2 interfaces on device with provided configuration. cisco.nxos.nxos_l2_interfaces: config: - name: Ethernet1/2 access: vlan: 30 state: overridden # After state: # ------------ # # interface Ethernet1/1 # interface Ethernet1/2 # switchport access vlan 30 # interface mgmt0 # ip address dhcp # ipv6 address auto-config # Using deleted # Before state: # ------------- # # interface Ethernet1/1 # switchport access vlan 20 # interface Ethernet1/2 # switchport trunk native vlan 20 # interface mgmt0 # ip address dhcp # ipv6 address auto-config - name: Delete L2 attributes of given interfaces (Note This won't delete the interface itself). cisco.nxos.nxos_l2_interfaces: config: - name: Ethernet1/1 - name: Ethernet1/2 state: deleted # After state: # ------------ # # interface Ethernet1/1 # interface Ethernet1/2 # interface mgmt0 # ip address dhcp # ipv6 address auto-config # Using rendered - name: Render platform specific configuration lines (without connecting to the device) cisco.nxos.nxos_l2_interfaces: config: - name: Ethernet1/1 trunk: native_vlan: 10 allowed_vlans: 2,4,15 - name: Ethernet1/2 access: vlan: 30 - name: Ethernet1/3 trunk: native_vlan: 20 allowed_vlans: 5-10, 15 state: rendered # Task Output (redacted) # ----------------------- # rendered: # - "interface Ethernet1/1" # - "switchport trunk allowed vlan 2,4,15" # - "switchport trunk native vlan 10" # - "interface Ethernet1/2" # - "switchport access vlan 30" # - "interface Ethernet1/3" # - "switchport trunk allowed vlan 5,6,7,8,9,10,15" # - "switchport trunk native vlan 20" # Using parsed # parsed.cfg # ------------ # interface Ethernet1/800 # switchport access vlan 18 # switchport trunk allowed vlan 210 # interface Ethernet1/801 # switchport trunk allowed vlan 2,4,15 - name: Use parsed state to convert externally supplied config to structured format cisco.nxos.nxos_l2_interfaces: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # - name: Ethernet1/800 # access: # vlan: 18 # trunk: # allowed_vlans: "210" # - name: Ethernet1/801 # trunk: # allowed_vlans: "2,4,15" # Using gathered # Existing device config state # ------------------------------- # Nexus9kvI5# sh running-config | section ^interface # interface Ethernet1/1 # switchport access vlan 6 # switchport trunk allowed vlan 200 # interface Ethernet1/2 # switchport trunk native vlan 10 - name: Gather l2_interfaces facts from the device using nxos_l2_interfaces cisco.nxos.nxos_l2_interfaces: state: gathered # Task output (redacted) # ----------------------- # gathered: # - name: "Ethernet1/1" # access: # vlan: 6 # trunk: # allowed_vlans: "200" # # - name: "Ethernet1/2" # trunk: # native_vlan: 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 | | --- | --- | --- | | **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 Ethernet1/1', 'switchport trunk allowed vlan 2,4,15', 'switchport trunk native vlan 10', 'interface Ethernet1/2', 'switchport access vlan 30', 'interface Ethernet1/3', 'switchport trunk allowed vlan 5,6,7,8,9,10,15', 'switchport trunk native vlan 20'] | ### Authors * Trishna Guha (@trishnaguha) ansible cisco.nxos.nxos_ospf_vrf – (deprecated, removed after 2022-10-01)Manages a VRF for an OSPF router. cisco.nxos.nxos\_ospf\_vrf – (deprecated, removed after 2022-10-01)Manages a VRF for an OSPF router. ==================================================================================================== 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_ospf_vrf`. New in version 1.0.0: of cisco.nxos * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in major release after 2022-10-01 Why Updated modules released with more functionality. Alternative nxos\_ospfv2 and nxos\_ospfv3 Synopsis -------- * Manages a VRF for an OSPF router. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auto\_cost** string | | Specifies the reference bandwidth used to assign OSPF cost. Valid values are an integer, in Mbps, or the keyword 'default'. | | **bfd** string | **Choices:*** enable * disable | Enables BFD on all OSPF interfaces. Dependency: ''feature bfd'' | | **default\_metric** string | | Specify the default Metric value. Valid values are an integer or the keyword 'default'. | | **log\_adjacency** string | **Choices:*** log * detail * default | Controls the level of log messages generated whenever a neighbor changes state. Valid values are 'log', 'detail', and 'default'. | | **ospf** string / required | | Name of the OSPF instance. | | **passive\_interface** boolean | **Choices:*** no * yes | Setting to `yes` will suppress routing update on interface. | | **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. | | **router\_id** string | | Router Identifier (ID) of the OSPF router VRF instance. | | **state** string | **Choices:*** **present** ← * absent | State of ospf vrf configuration. | | **timer\_throttle\_lsa\_hold** string | | Specify the hold interval for rate-limiting Link-State Advertisement (LSA) generation. Valid values are an integer, in milliseconds, or the keyword 'default'. | | **timer\_throttle\_lsa\_max** string | | Specify the max interval for rate-limiting Link-State Advertisement (LSA) generation. Valid values are an integer, in milliseconds, or the keyword 'default'. | | **timer\_throttle\_lsa\_start** string | | Specify the start interval for rate-limiting Link-State Advertisement (LSA) generation. Valid values are an integer, in milliseconds, or the keyword 'default'. | | **timer\_throttle\_spf\_hold** string | | Specify minimum hold time between Shortest Path First (SPF) calculations. Valid values are an integer, in milliseconds, or the keyword 'default'. | | **timer\_throttle\_spf\_max** string | | Specify the maximum wait time between Shortest Path First (SPF) calculations. Valid values are an integer, in milliseconds, or the keyword 'default'. | | **timer\_throttle\_spf\_start** string | | Specify initial Shortest Path First (SPF) schedule delay. Valid values are an integer, in milliseconds, or the keyword 'default'. | | **vrf** string | **Default:**"default" | Name of the resource instance. Valid value is a string. The name 'default' is a valid VRF representing the global OSPF. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * Value *default* restores params default value, if any. Otherwise it removes the existing param configuration. * 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 -------- ``` - cisco.nxos.nxos_ospf_vrf: ospf: 1 timer_throttle_spf_start: 50 timer_throttle_spf_hold: 1000 timer_throttle_spf_max: 2000 timer_throttle_lsa_start: 60 timer_throttle_lsa_hold: 1100 timer_throttle_lsa_max: 3000 vrf: test bfd: enable 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 | commands sent to the device **Sample:** ['router ospf 1', 'vrf test', 'bfd', 'timers throttle lsa 60 1100 3000'] | Status ------ * This module will be removed in a major release after 2022-10-01. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Gabriele Gerbino (@GGabriele)
programming_docs
ansible cisco.nxos.nxos_acl – (deprecated, removed after 2022-06-01) Manages access list entries for ACLs. cisco.nxos.nxos\_acl – (deprecated, removed after 2022-06-01) Manages access list entries for ACLs. =================================================================================================== 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_acl`. New in version 1.0.0: of cisco.nxos * [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 nxos\_acls Synopsis -------- * Manages access list entries for ACLs. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ack** string | **Choices:*** enable | Match on the ACK bit. | | **action** string | **Choices:*** permit * deny * remark | Action of the ACE. | | **dest** string | | Destination ip and mask using IP/MASK notation and supports the keyword 'any'. | | **dest\_port1** string | | Port/protocol and also first (lower) port when using range operand. | | **dest\_port2** string | | Second (end) port when using range operand. | | **dest\_port\_op** string | **Choices:*** any * eq * gt * lt * neq * range | Destination port operands such as eq, neq, gt, lt, range. | | **dscp** string | **Choices:*** af11 * af12 * af13 * af21 * af22 * af23 * af31 * af32 * af33 * af41 * af42 * af43 * cs1 * cs2 * cs3 * cs4 * cs5 * cs6 * cs7 * default * ef | Match packets with given dscp value. | | **established** string | **Choices:*** enable | Match established connections. | | **fin** string | **Choices:*** enable | Match on the FIN bit. | | **fragments** string | **Choices:*** enable | Check non-initial fragments. | | **log** string | **Choices:*** enable | Log matches against this entry. | | **name** string / required | | Case sensitive name of the access list (ACL). | | **precedence** string | **Choices:*** critical * flash * flash-override * immediate * internet * network * priority * routine | Match packets with given precedence. | | **proto** string | | Port number or protocol (as supported by the switch). | | **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. | | **psh** string | **Choices:*** enable | Match on the PSH bit. | | **remark** string | | If action is set to remark, this is the description. | | **rst** string | **Choices:*** enable | Match on the RST bit. | | **seq** string | | Sequence number of the entry (ACE). | | **src** string | | Source ip and mask using IP/MASK notation and supports keyword 'any'. | | **src\_port1** string | | Port/protocol and also first (lower) port when using range operand. | | **src\_port2** string | | Second (end) port when using range operand. | | **src\_port\_op** string | **Choices:*** any * eq * gt * lt * neq * range | Source port operands such as eq, neq, gt, lt, range. | | **state** string | **Choices:*** **present** ← * absent * delete\_acl | Specify desired state of the resource. | | **syn** string | **Choices:*** enable | Match on the SYN bit. | | **time\_range** string | | Name of time-range to apply. | | **urg** string | **Choices:*** enable | Match on the URG bit. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * `state=absent` removes the ACE if it exists. * `state=delete_acl` deletes the ACL if it exists. * For idempotency, use port numbers for the src/dest port params like *src\_port1* and names for the well defined protocols for the *proto* param. * Although this module is idempotent in that if the ace as presented in the task is identical to the one on the switch, no changes will be made. If there is any difference, what is in Ansible will be pushed (configured options will be overridden). This is to improve security, but at the same time remember an ACE is removed, then re-added, so if there is a change, the new ACE will be exactly what parameters you are sending to the module. * 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 -------- ``` # configure ACL ANSIBLE - cisco.nxos.nxos_acl: name: ANSIBLE seq: 10 action: permit proto: tcp src: 192.0.2.1/24 dest: any 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 | commands sent to the device **Sample:** ['ip access-list ANSIBLE', '10 permit tcp 192.0.2.1/24 any'] | Status ------ * This module will be removed in a major release after 2022-06-01. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_bfd_global – Bidirectional Forwarding Detection (BFD) global-level configuration cisco.nxos.nxos\_bfd\_global – Bidirectional Forwarding Detection (BFD) global-level configuration ================================================================================================== 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_bfd_global`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages Bidirectional Forwarding Detection (BFD) global-level configuration. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **echo\_interface** string | | Loopback interface used for echo frames. Valid values are loopback interface name or 'deleted'. Not supported on N5K/N6K | | **echo\_rx\_interval** integer | | BFD Echo receive interval in milliseconds. | | **fabricpath\_interval** dictionary | | BFD fabricpath interval timer values. Value must be a dict defining values for keys (tx, min\_rx, and multiplier). | | **fabricpath\_slow\_timer** integer | | BFD fabricpath slow rate timer in milliseconds. | | **fabricpath\_vlan** integer | | BFD fabricpath control vlan. | | **interval** dictionary | | BFD interval timer values. Value must be a dict defining values for keys (tx, min\_rx, and multiplier) | | **ipv4\_echo\_rx\_interval** integer | | BFD IPv4 session echo receive interval in milliseconds. | | **ipv4\_interval** dictionary | | BFD IPv4 interval timer values. Value must be a dict defining values for keys (tx, min\_rx, and multiplier). | | **ipv4\_slow\_timer** integer | | BFD IPv4 slow rate timer in milliseconds. | | **ipv6\_echo\_rx\_interval** integer | | BFD IPv6 session echo receive interval in milliseconds. | | **ipv6\_interval** dictionary | | BFD IPv6 interval timer values. Value must be a dict defining values for keys (tx, min\_rx, and multiplier). | | **ipv6\_slow\_timer** integer | | BFD IPv6 slow rate timer in milliseconds. | | **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. | | **slow\_timer** integer | | BFD slow rate timer in milliseconds. | | **startup\_timer** integer | | BFD delayed startup timer in seconds. Not supported on N5K/N6K/N7K | Notes ----- Note * Tested against NXOSv 9.2(2) * Unsupported for Cisco MDS * BFD global will automatically enable β€˜feature bfd’ if it is disabled. * BFD global does not have a β€˜state’ parameter. All of the BFD commands are unique and are defined if β€˜feature bfd’ is enabled. * 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 -------- ``` - cisco.nxos.nxos_bfd_global: echo_interface: Ethernet1/2 echo_rx_interval: 50 interval: tx: 50 min_rx: 50 multiplier: 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 | | --- | --- | --- | | **cmds** list / elements=string | always | commands sent to the device **Sample:** ['bfd echo-interface loopback1', 'bfd slow-timer 2000'] | ### Authors * Chris Van Heuveln (@chrisvanheuveln) ansible cisco.nxos.nxos_logging – Manage logging on network devices cisco.nxos.nxos\_logging – Manage logging on network 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_logging`. New in version 1.0.0: of cisco.nxos * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in major release after 2023-08-01 Why Updated module released with more functionality. Alternative nxos\_logging\_global Synopsis -------- * This module provides declarative management of logging on Cisco NX-OS devices. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **aggregate** list / elements=dictionary | | List of logging definitions. | | **dest** string | **Choices:*** console * logfile * module * monitor * server | Destination of the logs. | | **dest\_level** integer | | Set logging severity levels. aliases: level | | **event** string | **Choices:*** link-enable * link-default * trunk-enable * trunk-default | Link/trunk enable/default interface configuration logging | | **facility** string | | Facility name for logging. | | **facility\_level** integer | | Set logging severity levels for facility based log messages. | | **facility\_link\_status** string | **Choices:*** link-down-notif * link-down-error * link-up-notif * link-up-error | Set logging facility ethpm link status. Not idempotent with version 6.0 images. | | **file\_size** integer | | Set logfile size | | **interface** string | | Interface to be used while configuring source-interface for logging (e.g., 'Ethernet1/2', 'mgmt0') | | **interface\_message** string | **Choices:*** add-interface-description | Add interface description to interface syslogs. Does not work with version 6.0 images using nxapi as a transport. | | **name** string | | If value of `dest` is *logfile* it indicates file-name. | | **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. | | **purge** boolean | **Choices:*** **no** ← * yes | Remove any switch logging configuration that does not match what has been configured Not supported for ansible\_connection local. All nxos\_logging tasks must use the same ansible\_connection type. | | **remote\_server** string | | Hostname or IP Address for remote logging (when dest is 'server'). | | **state** string | **Choices:*** **present** ← * absent | State of the logging configuration. | | **timestamp** string | **Choices:*** microseconds * milliseconds * seconds | Set logging timestamp format | | **use\_vrf** string | | VRF to be used while configuring remote logging (when dest is 'server'). | 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: configure console logging with level cisco.nxos.nxos_logging: dest: console level: 2 state: present - name: remove console logging configuration cisco.nxos.nxos_logging: dest: console level: 2 state: absent - name: configure file logging with level cisco.nxos.nxos_logging: dest: logfile name: testfile dest_level: 3 state: present - name: Configure logging logfile with size cisco.nxos.nxos_logging: dest: logfile name: testfile dest_level: 3 file_size: 16384 - name: configure facility level logging cisco.nxos.nxos_logging: facility: daemon facility_level: 0 state: present - name: remove facility level logging cisco.nxos.nxos_logging: facility: daemon facility_level: 0 state: absent - name: Configure Remote Logging cisco.nxos.nxos_logging: dest: server remote_server: test-syslogserver.com facility: auth facility_level: 1 use_vrf: management state: present - name: Configure Source Interface for Logging cisco.nxos.nxos_logging: interface: mgmt0 state: present - name: Purge nxos_logging configuration not managed by this playbook cisco.nxos.nxos_logging: purge: true - name: Configure logging timestamp cisco.nxos.nxos_logging: timestamp: milliseconds state: present - name: Configure logging facility ethpm link status cisco.nxos.nxos_logging: facility: ethpm facility_link_status: link-up-notif state: present - name: Configure logging message ethernet description cisco.nxos.nxos_logging: interface_message: add-interface-description state: present - name: Configure logging event link enable cisco.nxos.nxos_logging: event: link-enable state: present - name: Configure logging using aggregate cisco.nxos.nxos_logging: aggregate: - {dest: console, dest_level: 2} - {dest: logfile, dest_level: 2, name: testfile} - {facility: daemon, facility_level: 0} 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:** ['logging console 2', 'logging logfile testfile 3', 'logging level daemon 0'] | Status ------ * This module will be removed in a major release after 2023-08-01. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Trishna Guha (@trishnaguha)
programming_docs
ansible cisco.nxos.nxos_vrf – Manages global VRF configuration. cisco.nxos.nxos\_vrf – Manages global VRF configuration. ======================================================== 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_vrf`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module provides declarative management of VRFs on CISCO NXOS network devices. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **admin\_state** string | **Choices:*** **up** ← * down | Administrative state of the VRF. | | **aggregate** list / elements=dictionary | | List of VRFs definitions. | | | **admin\_state** string | **Choices:*** up * down | Administrative state of the VRF. | | | **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 | | Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state arguments. | | | **description** string | | Description of the VRF or keyword 'default'. | | | **interfaces** list / elements=string | | List of interfaces to check the VRF has been configured correctly or keyword 'default'. | | | **name** string | | Name of VRF to be managed. aliases: vrf | | | **rd** string | | VPN Route Distinguisher (RD). Valid values are a string in one of the route-distinguisher formats (ASN2:NN, ASN4:NN, or IPV4:NN); the keyword 'auto', or the keyword 'default'. | | | **state** string | **Choices:*** present * absent | Manages desired state of the resource. | | | **vni** string | | Specify virtual network identifier. Valid values are Integer or keyword 'default'. | | **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. | | **description** string | | Description of the VRF or keyword 'default'. | | **interfaces** list / elements=string | | List of interfaces to check the VRF has been configured correctly or keyword 'default'. | | **name** string | | Name of VRF to be managed. aliases: 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 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. | | **purge** boolean | **Choices:*** **no** ← * yes | Purge VRFs not defined in the *aggregate* parameter. | | **rd** string | | VPN Route Distinguisher (RD). Valid values are a string in one of the route-distinguisher formats (ASN2:NN, ASN4:NN, or IPV4:NN); the keyword 'auto', or the keyword 'default'. | | **state** string | **Choices:*** **present** ← * absent | Manages desired state of the resource. | | **vni** string | | Specify virtual network identifier. Valid values are Integer or keyword 'default'. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * Cisco NX-OS creates the default VRF by itself. Therefore, you’re not allowed to use default as *vrf* name in this module. * `vrf` name must be shorter than 32 chars. * VRF names are not case sensible in NX-OS. Anyway, the name is stored just like it’s inserted by the user and it’ll not be changed again unless the VRF is removed and re-created. i.e. `vrf=NTC` will create a VRF named NTC, but running it again with `vrf=ntc` will not cause a configuration change. * 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: Ensure ntc VRF exists on switch cisco.nxos.nxos_vrf: name: ntc description: testing state: present - name: Aggregate definition of VRFs cisco.nxos.nxos_vrf: aggregate: - {name: test1, description: Testing, admin_state: down} - {name: test2, interfaces: Ethernet1/2} - name: Aggregate definitions of VRFs with Purge cisco.nxos.nxos_vrf: aggregate: - {name: ntc1, description: purge test1} - {name: ntc2, description: purge test2} state: present purge: yes - name: Delete VRFs exist on switch cisco.nxos.nxos_vrf: aggregate: - {name: ntc1} - {name: ntc2} state: absent - name: Assign interfaces to VRF declaratively cisco.nxos.nxos_vrf: name: test1 interfaces: - Ethernet2/3 - Ethernet2/5 - name: Check interfaces assigned to VRF cisco.nxos.nxos_vrf: name: test1 associated_interfaces: - Ethernet2/3 - Ethernet2/5 - name: Ensure VRF is tagged with interface Ethernet2/5 only (Removes from Ethernet2/3) cisco.nxos.nxos_vrf: name: test1 interfaces: - Ethernet2/5 - name: Delete VRF cisco.nxos.nxos_vrf: name: ntc 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 | commands sent to the device **Sample:** ['vrf context ntc', 'no shutdown', 'interface Ethernet1/2', 'no switchport', 'vrf member test2'] | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) * Trishna Guha (@trishnaguha) ansible cisco.nxos.nxos_bgp_neighbor_address_family – BGP Neighbor Address Family resource module. cisco.nxos.nxos\_bgp\_neighbor\_address\_family – BGP Neighbor Address Family resource module. ============================================================================================== 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_bgp_neighbor_address_family`. New in version 2.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module manages BGP Neighbor Address Family configuration on devices running Cisco NX-OS. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | BGP Neighbor AF configuration. | | | **as\_number** string | | Autonomous System Number of the router. | | | **neighbors** list / elements=dictionary | | A list of BGP Neighbor AF configuration. | | | | **address\_family** list / elements=dictionary | | BGP Neighbor Address Family related configurations. | | | | | **advertise\_map** dictionary | | Specify route-map for conditional advertisement. | | | | | | **exist\_map** string | | Condition route-map to advertise only when prefix in condition exists. | | | | | | **non\_exist\_map** string | | Condition route-map to advertise only when prefix in condition does not exist. | | | | | | **route\_map** string / required | | Route-map name. | | | | | **advertisement\_interval** integer | | Minimum interval between sending BGP routing updates. | | | | | **afi** string / required | **Choices:*** ipv4 * ipv6 * link-state * vpnv4 * vpnv6 * l2vpn | Address Family indicator. | | | | | **allowas\_in** dictionary | | Accept as-path with my AS present in it. | | | | | | **max\_occurences** integer | | Number of occurrences of AS number, default is 3. | | | | | | **set** boolean | **Choices:*** no * yes | Activate allowas-in property. | | | | | **as\_override** boolean | **Choices:*** no * yes | Override matching AS-number while sending update. | | | | | **capability** dictionary | | Advertise capability to the peer. | | | | | | **additional\_paths** dictionary | | Additional paths capability. | | | | | | | **receive** string | **Choices:*** enable * disable | Additional paths Receive capability. | | | | | | | **send** string | **Choices:*** enable * disable | Additional paths Send capability. | | | | | **default\_originate** dictionary | | Originate a default toward this peer. | | | | | | **route\_map** string | | Route-map to specify criteria for originating default. | | | | | | **set** boolean | **Choices:*** no * yes | Set default-originate attribute. | | | | | **disable\_peer\_as\_check** boolean | **Choices:*** no * yes | Disable checking of peer AS-number while advertising. | | | | | **filter\_list** dictionary | | Name of filter-list. | | | | | | **inbound** string | | Apply policy to incoming routes. | | | | | | **outbound** string | | Apply policy to outgoing routes. | | | | | **inherit** dictionary | | Inherit a template. | | | | | | **sequence** integer | | Sequence number. | | | | | | **template** string | | Template name. | | | | | **maximum\_prefix** dictionary | | Maximum number of prefixes from this neighbor. | | | | | | **generate\_warning\_threshold** integer | | Threshold percentage at which to generate a warning. | | | | | | **max\_prefix\_limit** integer | | Maximum prefix limit. | | | | | | **restart\_interval** integer | | Restart bgp connection after limit is exceeded. | | | | | | **warning\_only** boolean | **Choices:*** no * yes | Only give a warning message when limit is exceeded. | | | | | **next\_hop\_self** dictionary | | Set our address as nexthop (non-reflected). | | | | | | **all\_routes** boolean | **Choices:*** no * yes | Set our address as nexthop for all routes. | | | | | | **set** boolean | **Choices:*** no * yes | Set next-hop-self attribute. | | | | | **next\_hop\_third\_party** boolean | **Choices:*** no * yes | Compute a third-party nexthop if possible. | | | | | **prefix\_list** dictionary | | Apply prefix-list. | | | | | | **inbound** string | | Apply policy to incoming routes. | | | | | | **outbound** string | | Apply policy to outgoing routes. | | | | | **rewrite\_evpn\_rt\_asn** boolean | **Choices:*** no * yes | Auto generate RTs for EBGP neighbor. | | | | | **route\_map** dictionary | | Apply route-map to neighbor. | | | | | | **inbound** string | | Apply policy to incoming routes. | | | | | | **outbound** string | | Apply policy to outgoing routes. | | | | | **route\_reflector\_client** boolean | **Choices:*** no * yes | Configure a neighbor as Route reflector client. | | | | | **safi** string | **Choices:*** unicast * multicast * mvpn * evpn | Sub Address Family indicator. | | | | | **send\_community** dictionary | | Send Community attribute to this neighbor. | | | | | | **both** boolean | **Choices:*** no * yes | Send Standard and Extended Community attributes. | | | | | | **extended** boolean | **Choices:*** no * yes | Send Extended Community attribute. | | | | | | **set** boolean | **Choices:*** no * yes | Set send-community attribute. | | | | | | **standard** boolean | **Choices:*** no * yes | Send Standard Community attribute. | | | | | **soft\_reconfiguration\_inbound** dictionary | | Soft reconfiguration. | | | | | | **always** boolean | **Choices:*** no * yes | Always perform inbound soft reconfiguration. | | | | | | **set** boolean | **Choices:*** no * yes | Set soft-reconfiguration inbound attribute. | | | | | **soo** string | | Specify Site-of-origin extcommunity. | | | | | **suppress\_inactive** boolean | **Choices:*** no * yes | Advertise only active routes to peer. | | | | | **unsuppress\_map** string | | Route-map to selectively unsuppress suppressed routes. | | | | | **weight** integer | | Set default weight for routes from this neighbor. | | | | **neighbor\_address** string / required | | IP/IPv6 address of the neighbor. | | | **vrfs** list / elements=dictionary | | Virtual Router Context. | | | | **neighbors** list / elements=dictionary | | A list of BGP Neighbor AF configuration. | | | | | **address\_family** list / elements=dictionary | | BGP Neighbor Address Family related configurations. | | | | | | **advertise\_map** dictionary | | Specify route-map for conditional advertisement. | | | | | | | **exist\_map** string | | Condition route-map to advertise only when prefix in condition exists. | | | | | | | **non\_exist\_map** string | | Condition route-map to advertise only when prefix in condition does not exist. | | | | | | | **route\_map** string / required | | Route-map name. | | | | | | **advertisement\_interval** integer | | Minimum interval between sending BGP routing updates. | | | | | | **afi** string / required | **Choices:*** ipv4 * ipv6 * link-state * vpnv4 * vpnv6 * l2vpn | Address Family indicator. | | | | | | **allowas\_in** dictionary | | Accept as-path with my AS present in it. | | | | | | | **max\_occurences** integer | | Number of occurrences of AS number, default is 3. | | | | | | | **set** boolean | **Choices:*** no * yes | Activate allowas-in property. | | | | | | **as\_override** boolean | **Choices:*** no * yes | Override matching AS-number while sending update. | | | | | | **capability** dictionary | | Advertise capability to the peer. | | | | | | | **additional\_paths** dictionary | | Additional paths capability. | | | | | | | | **receive** string | **Choices:*** enable * disable | Additional paths Receive capability. | | | | | | | | **send** string | **Choices:*** enable * disable | Additional paths Send capability. | | | | | | **default\_originate** dictionary | | Originate a default toward this peer. | | | | | | | **route\_map** string | | Route-map to specify criteria for originating default. | | | | | | | **set** boolean | **Choices:*** no * yes | Set default-originate attribute. | | | | | | **disable\_peer\_as\_check** boolean | **Choices:*** no * yes | Disable checking of peer AS-number while advertising. | | | | | | **filter\_list** dictionary | | Name of filter-list. | | | | | | | **inbound** string | | Apply policy to incoming routes. | | | | | | | **outbound** string | | Apply policy to outgoing routes. | | | | | | **inherit** dictionary | | Inherit a template. | | | | | | | **sequence** integer | | Sequence number. | | | | | | | **template** string | | Template name. | | | | | | **maximum\_prefix** dictionary | | Maximum number of prefixes from this neighbor. | | | | | | | **generate\_warning\_threshold** integer | | Threshold percentage at which to generate a warning. | | | | | | | **max\_prefix\_limit** integer | | Maximum prefix limit. | | | | | | | **restart\_interval** integer | | Restart bgp connection after limit is exceeded. | | | | | | | **warning\_only** boolean | **Choices:*** no * yes | Only give a warning message when limit is exceeded. | | | | | | **next\_hop\_self** dictionary | | Set our address as nexthop (non-reflected). | | | | | | | **all\_routes** boolean | **Choices:*** no * yes | Set our address as nexthop for all routes. | | | | | | | **set** boolean | **Choices:*** no * yes | Set next-hop-self attribute. | | | | | | **next\_hop\_third\_party** boolean | **Choices:*** no * yes | Compute a third-party nexthop if possible. | | | | | | **prefix\_list** dictionary | | Apply prefix-list. | | | | | | | **inbound** string | | Apply policy to incoming routes. | | | | | | | **outbound** string | | Apply policy to outgoing routes. | | | | | | **rewrite\_evpn\_rt\_asn** boolean | **Choices:*** no * yes | Auto generate RTs for EBGP neighbor. | | | | | | **route\_map** dictionary | | Apply route-map to neighbor. | | | | | | | **inbound** string | | Apply policy to incoming routes. | | | | | | | **outbound** string | | Apply policy to outgoing routes. | | | | | | **route\_reflector\_client** boolean | **Choices:*** no * yes | Configure a neighbor as Route reflector client. | | | | | | **safi** string | **Choices:*** unicast * multicast * mvpn * evpn | Sub Address Family indicator. | | | | | | **send\_community** dictionary | | Send Community attribute to this neighbor. | | | | | | | **both** boolean | **Choices:*** no * yes | Send Standard and Extended Community attributes. | | | | | | | **extended** boolean | **Choices:*** no * yes | Send Extended Community attribute. | | | | | | | **set** boolean | **Choices:*** no * yes | Set send-community attribute. | | | | | | | **standard** boolean | **Choices:*** no * yes | Send Standard Community attribute. | | | | | | **soft\_reconfiguration\_inbound** dictionary | | Soft reconfiguration. | | | | | | | **always** boolean | **Choices:*** no * yes | Always perform inbound soft reconfiguration. | | | | | | | **set** boolean | **Choices:*** no * yes | Set soft-reconfiguration inbound attribute. | | | | | | **soo** string | | Specify Site-of-origin extcommunity. | | | | | | **suppress\_inactive** boolean | **Choices:*** no * yes | Advertise only active routes to peer. | | | | | | **unsuppress\_map** string | | Route-map to selectively unsuppress suppressed routes. | | | | | | **weight** integer | | Set default weight for routes from this neighbor. | | | | | **neighbor\_address** string / required | | IP/IPv6 address of the neighbor. | | | | **vrf** string | | VRF name. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the command **show running-config | section '^router bgp'**. 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 the configuration should be left in. State *deleted* only removes BGP attributes that this modules manages and does not negate the BGP process completely. Refer to examples for more details. | Notes ----- Note * Tested against NX-OS 9.3.6. * Unsupported for Cisco MDS * For managing BGP address family configurations please use the [cisco.nxos.nxos\_bgp\_address\_family](nxos_bgp_address_family_module#ansible-collections-cisco-nxos-nxos-bgp-address-family-module) module. * This module works with connection `network_cli` and `httpapi`. Examples -------- ``` # Using merged # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # Nexus9000v# - name: Merge the provided configuration with the existing running configuration cisco.nxos.nxos_bgp_neighbor_address_family: &id001 config: as_number: 65536 neighbors: - neighbor_address: 192.0.2.32 address_family: - afi: ipv4 safi: unicast maximum_prefix: max_prefix_limit: 20 generate_warning_threshold: 75 weight: 100 prefix_list: inbound: rmap1 outbound: rmap2 - afi: ipv6 safi: unicast - neighbor_address: 192.0.2.33 address_family: - afi: ipv4 safi: multicast inherit: template: BasePolicy sequence: 200 vrfs: - vrf: site-1 neighbors: - neighbor_address: 203.0.113.1 address_family: - afi: ipv4 safi: unicast suppress_inactive: True next_hop_self: set: True - neighbor_address: 203.0.113.2 address_family: - afi: ipv6 safi: unicast - afi: ipv4 safi: multicast send_community: set: True # Task output # ------------- # before: {} # # commands: # - router bgp 65536 # - neighbor 192.0.2.32 # - address-family ipv4 unicast # - maximum-prefix 20 75 # - weight 100 # - prefix-list rmap1 in # - prefix-list rmap2 out # - address-family ipv6 unicast # - neighbor 192.0.2.33 # - address-family ipv4 multicast # - inherit peer-policy BasePolicy 200 # - vrf site-1 # - neighbor 203.0.113.1 # - address-family ipv4 unicast # - suppress-inactive # - next-hop-self # - neighbor 203.0.113.2 # - address-family ipv6 unicast # - address-family ipv4 multicast # - send-community # # after: # as_number: "65536" # neighbors: # - neighbor_address: 192.0.2.32 # address_family: # - afi: ipv4 # safi: unicast # maximum_prefix: # max_prefix_limit: 20 # generate_warning_threshold: 75 # weight: 100 # prefix_list: # inbound: rmap1 # outbound: rmap2 # - afi: ipv6 # safi: unicast # - neighbor_address: 192.0.2.33 # address_family: # - afi: ipv4 # safi: multicast # inherit: # template: BasePolicy # sequence: 200 # vrfs: # - vrf: site-1 # neighbors: # - neighbor_address: 203.0.113.1 # address_family: # - afi: ipv4 # safi: unicast # suppress_inactive: true # next_hop_self: # set: true # - neighbor_address: 203.0.113.2 # address_family: # - afi: ipv4 # safi: multicast # send_community: # set: True # - afi: ipv6 # safi: unicast # After state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # neighbor 192.0.2.32 # address-family ipv4 unicast # maximum-prefix 20 75 # weight 100 # prefix-list rmap1 in # prefix-list rmap2 out # address-family ipv6 unicast # neighbor 192.0.2.33 # address-family ipv4 multicast # inherit peer-policy BasePolicy 200 # vrf site-1 # neighbor 203.0.113.1 # address-family ipv4 unicast # suppress-inactive # next-hop-self # neighbor 203.0.113.2 # address-family ipv4 multicast # send-community # address-family ipv6 unicast # # Using replaced # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # neighbor 192.0.2.32 # address-family ipv4 unicast # maximum-prefix 20 75 # weight 100 # prefix-list rmap1 in # prefix-list rmap2 out # address-family ipv6 unicast # neighbor 192.0.2.33 # address-family ipv4 multicast # inherit peer-policy BasePolicy 200 # vrf site-1 # neighbor 203.0.113.1 # address-family ipv4 unicast # suppress-inactive # next-hop-self # neighbor 203.0.113.2 # address-family ipv4 multicast # send-community # address-family ipv6 unicast # - name: Replace specified neighbor AFs with given configuration cisco.nxos.nxos_bgp_neighbor_address_family: &replaced config: as_number: 65536 neighbors: - neighbor_address: 192.0.2.32 address_family: - afi: ipv4 safi: unicast weight: 110 - afi: ipv6 safi: unicast - neighbor_address: 192.0.2.33 address_family: - afi: ipv4 safi: multicast inherit: template: BasePolicy sequence: 200 vrfs: - vrf: site-1 neighbors: - neighbor_address: 203.0.113.1 address_family: - afi: ipv4 safi: unicast - neighbor_address: 203.0.113.2 address_family: - afi: ipv6 safi: unicast - afi: ipv4 safi: multicast send_community: set: True state: replaced # Task output # ------------- # before: # as_number: "65536" # neighbors: # - neighbor_address: 192.0.2.32 # address_family: # - afi: ipv4 # safi: unicast # maximum_prefix: # max_prefix_limit: 20 # generate_warning_threshold: 75 # weight: 100 # prefix_list: # inbound: rmap1 # outbound: rmap2 # - afi: ipv6 # safi: unicast # - neighbor_address: 192.0.2.33 # address_family: # - afi: ipv4 # safi: multicast # inherit: # template: BasePolicy # sequence: 200 # vrfs: # - vrf: site-1 # neighbors: # - neighbor_address: 203.0.113.1 # address_family: # - afi: ipv4 # safi: unicast # suppress_inactive: true # next_hop_self: # set: true # - neighbor_address: 203.0.113.2 # address_family: # - afi: ipv4 # safi: multicast # send_community: # set: True # - afi: ipv6 # safi: unicast # # commands: # - router bgp 65536 # - neighbor 192.0.2.32 # - address-family ipv4 unicast # - no maximum-prefix 20 75 # - weight 110 # - no prefix-list rmap1 in # - no prefix-list rmap2 out # - vrf site-1 # - neighbor 203.0.113.1 # - address-family ipv4 unicast # - no suppress-inactive # - no next-hop-self # # after: # as_number: "65536" # neighbors: # - neighbor_address: 192.0.2.32 # address_family: # - afi: ipv4 # safi: unicast # weight: 110 # - afi: ipv6 # safi: unicast # - neighbor_address: 192.0.2.33 # address_family: # - afi: ipv4 # safi: multicast # inherit: # template: BasePolicy # sequence: 200 # vrfs: # - vrf: site-1 # neighbors: # - neighbor_address: 203.0.113.1 # address_family: # - afi: ipv4 # safi: unicast # - neighbor_address: 203.0.113.2 # address_family: # - afi: ipv4 # safi: multicast # send_community: # set: True # - afi: ipv6 # safi: unicast # After state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # neighbor 192.0.2.32 # address-family ipv4 unicast # weight 110 # address-family ipv6 unicast # neighbor 192.0.2.33 # address-family ipv4 multicast # inherit peer-policy BasePolicy 200 # vrf site-1 # neighbor 203.0.113.1 # address-family ipv4 unicast # neighbor 203.0.113.2 # address-family ipv4 multicast # send-community # address-family ipv6 unicast # # Using overridden # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # neighbor 192.0.2.32 # address-family ipv4 unicast # maximum-prefix 20 75 # weight 100 # prefix-list rmap1 in # prefix-list rmap2 out # address-family ipv6 unicast # neighbor 192.0.2.33 # address-family ipv4 multicast # inherit peer-policy BasePolicy 200 # vrf site-1 # neighbor 203.0.113.1 # address-family ipv4 unicast # suppress-inactive # next-hop-self # neighbor 203.0.113.2 # address-family ipv4 multicast # send-community # address-family ipv6 unicast # - name: Override all BGP AF configuration with provided configuration cisco.nxos.nxos_bgp_neighbor_address_family: config: as_number: 65536 neighbors: - neighbor_address: 192.0.2.32 address_family: - afi: ipv4 safi: unicast vrfs: - vrf: site-1 neighbors: - neighbor_address: 203.0.113.1 address_family: - afi: ipv4 safi: unicast suppress_inactive: True next_hop_self: set: True state: overridden # Task output # ------------- # before: # as_number: "65536" # neighbors: # - neighbor_address: 192.0.2.32 # address_family: # - afi: ipv4 # safi: unicast # maximum_prefix: # max_prefix_limit: 20 # generate_warning_threshold: 75 # weight: 100 # prefix_list: # inbound: rmap1 # outbound: rmap2 # - afi: ipv6 # safi: unicast # - neighbor_address: 192.0.2.33 # address_family: # - afi: ipv4 # safi: multicast # inherit: # template: BasePolicy # sequence: 200 # vrfs: # - vrf: site-1 # neighbors: # - neighbor_address: 203.0.113.1 # address_family: # - afi: ipv4 # safi: unicast # suppress_inactive: true # next_hop_self: # set: true # - neighbor_address: 203.0.113.2 # address_family: # - afi: ipv4 # safi: multicast # send_community: # set: True # - afi: ipv6 # safi: unicast # # commands: # - router bgp 65536 # - neighbor 192.0.2.32 # - address-family ipv4 unicast # - no maximum-prefix 20 75 # - no weight 100 # - no prefix-list rmap1 in # - no prefix-list rmap2 out # - no address-family ipv6 unicast # - neighbor 192.0.2.33 # - no address-family ipv4 multicast # - vrf site-1 # - neighbor 203.0.113.2 # - no address-family ipv4 multicast # - no address-family ipv6 unicast # # after: # as_number: "65536" # neighbors: # - neighbor_address: 192.0.2.32 # address_family: # - afi: ipv4 # safi: unicast # vrfs: # - vrf: site-1 # neighbors: # - neighbor_address: 203.0.113.1 # address_family: # - afi: ipv4 # safi: unicast # suppress_inactive: True # next_hop_self: # set: True # After state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # neighbor 192.0.2.32 # address-family ipv4 unicast # vrf site-1 # neighbor 203.0.113.1 # address-family ipv4 unicast # suppress-inactive # next-hop-self # Using deleted to remove specified neighbor AFs # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # neighbor 192.0.2.32 # address-family ipv4 unicast # maximum-prefix 20 75 # weight 100 # prefix-list rmap1 in # prefix-list rmap2 out # address-family ipv6 unicast # neighbor 192.0.2.33 # address-family ipv4 multicast # inherit peer-policy BasePolicy 200 # vrf site-1 # neighbor 203.0.113.1 # address-family ipv4 unicast # suppress-inactive # next-hop-self # neighbor 203.0.113.2 # address-family ipv4 multicast # send-community # address-family ipv6 unicast # - name: Delete BGP configs handled by this module cisco.nxos.nxos_bgp_neighbor_address_family: config: as_number: 65536 neighbors: - neighbor_address: 192.0.2.32 address_family: - afi: ipv4 safi: unicast vrfs: - vrf: site-1 neighbors: - neighbor_address: 203.0.113.2 address_family: - afi: ipv6 safi: unicast state: deleted # Task output # ------------- # before: # as_number: "65536" # neighbors: # - neighbor_address: 192.0.2.32 # address_family: # - afi: ipv4 # safi: unicast # maximum_prefix: # max_prefix_limit: 20 # generate_warning_threshold: 75 # weight: 100 # prefix_list: # inbound: rmap1 # outbound: rmap2 # - afi: ipv6 # safi: unicast # - neighbor_address: 192.0.2.33 # address_family: # - afi: ipv4 # safi: multicast # inherit: # template: BasePolicy # sequence: 200 # vrfs: # - vrf: site-1 # neighbors: # - neighbor_address: 203.0.113.1 # address_family: # - afi: ipv4 # safi: unicast # suppress_inactive: true # next_hop_self: # set: true # - neighbor_address: 203.0.113.2 # address_family: # - afi: ipv4 # safi: multicast # send_community: # set: True # - afi: ipv6 # safi: unicast # # commands: # - router bgp 65536 # - neighbor 192.0.2.32 # - no address-family ipv4 unicast # - vrf site-1 # - neighbor 203.0.113.2 # - no address-family ipv6 unicast # # after: # as_number: "65536" # neighbors: # - neighbor_address: 192.0.2.32 # address_family: # - afi: ipv6 # safi: unicast # - neighbor_address: 192.0.2.33 # address_family: # - afi: ipv4 # safi: multicast # inherit: # template: BasePolicy # sequence: 200 # vrfs: # - vrf: site-1 # neighbors: # - neighbor_address: 203.0.113.1 # address_family: # - afi: ipv4 # safi: unicast # suppress_inactive: true # next_hop_self: # set: true # - neighbor_address: 203.0.113.2 # address_family: # - afi: ipv4 # safi: multicast # send_community: # set: True # # After state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # neighbor 192.0.2.32 # address-family ipv6 unicast # neighbor 192.0.2.33 # address-family ipv4 multicast # inherit peer-policy BasePolicy 200 # vrf site-1 # neighbor 203.0.113.1 # address-family ipv4 unicast # suppress-inactive # next-hop-self # neighbor 203.0.113.2 # address-family ipv4 multicast # send-community # # Using deleted to remove all neighbor AFs # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # neighbor 192.0.2.32 # address-family ipv4 unicast # maximum-prefix 20 75 # weight 100 # prefix-list rmap1 in # prefix-list rmap2 out # address-family ipv6 unicast # neighbor 192.0.2.33 # address-family ipv4 multicast # inherit peer-policy BasePolicy 200 # vrf site-1 # neighbor 203.0.113.1 # address-family ipv4 unicast # suppress-inactive # next-hop-self # neighbor 203.0.113.2 # address-family ipv4 multicast # send-community # address-family ipv6 unicast # - name: Delete all BGP neighbor AF configs handled by this module cisco.nxos.nxos_bgp_neighbor_address_family: state: deleted # Task output # ------------- # before: # as_number: "65536" # neighbors: # - neighbor_address: 192.0.2.32 # address_family: # - afi: ipv4 # safi: unicast # maximum_prefix: # max_prefix_limit: 20 # generate_warning_threshold: 75 # weight: 100 # prefix_list: # inbound: rmap1 # outbound: rmap2 # - afi: ipv6 # safi: unicast # - neighbor_address: 192.0.2.33 # address_family: # - afi: ipv4 # safi: multicast # inherit: # template: BasePolicy # sequence: 200 # vrfs: # - vrf: site-1 # neighbors: # - neighbor_address: 203.0.113.1 # address_family: # - afi: ipv4 # safi: unicast # suppress_inactive: true # next_hop_self: # set: true # - neighbor_address: 203.0.113.2 # address_family: # - afi: ipv4 # safi: multicast # send_community: # set: True # - afi: ipv6 # safi: unicast # # commands: # - router bgp 65536 # - neighbor 192.0.2.32 # - no address-family ipv4 unicast # - no address-family ipv6 unicast # - neighbor 192.0.2.33 # - no address-family ipv4 multicast # - vrf site-1 # - neighbor 203.0.113.1 # - no address-family ipv4 unicast # - neighbor 203.0.113.2 # - no address-family ipv6 unicast # - no address-family ipv4 multicast # # after: # as_number: "65536" # # After state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # neighbor 192.0.2.32 # neighbor 192.0.2.33 # vrf site-1 # neighbor 203.0.113.1 # neighbor 203.0.113.2 # # Using rendered - name: Render platform specific configuration lines with state rendered (without connecting to the device) cisco.nxos.nxos_bgp_neighbor_address_family: config: as_number: 65536 neighbors: - neighbor_address: 192.0.2.32 address_family: - afi: ipv4 safi: unicast maximum_prefix: max_prefix_limit: 20 generate_warning_threshold: 75 weight: 100 prefix_list: inbound: rmap1 outbound: rmap2 - afi: ipv6 safi: unicast - neighbor_address: 192.0.2.33 address_family: - afi: ipv4 safi: multicast inherit: template: BasePolicy sequence: 200 vrfs: - vrf: site-1 neighbors: - neighbor_address: 203.0.113.1 address_family: - afi: ipv4 safi: unicast suppress_inactive: True next_hop_self: set: True - neighbor_address: 203.0.113.2 address_family: - afi: ipv6 safi: unicast - afi: ipv4 safi: multicast send_community: set: True state: rendered # Task Output (redacted) # ----------------------- # rendered: # - router bgp 65536 # - neighbor 192.0.2.32 # - address-family ipv4 unicast # - maximum-prefix 20 75 # - weight 100 # - prefix-list rmap1 in # - prefix-list rmap2 out # - address-family ipv6 unicast # - neighbor 192.0.2.33 # - address-family ipv4 multicast # - inherit peer-policy BasePolicy 200 # - vrf site-1 # - neighbor 203.0.113.1 # - address-family ipv4 unicast # - suppress-inactive # - next-hop-self # - neighbor 203.0.113.2 # - address-family ipv6 unicast # - address-family ipv4 multicast # - send-community # Using parsed # parsed.cfg # ------------ # router bgp 65536 # neighbor 192.0.2.32 # address-family ipv4 unicast # maximum-prefix 20 75 # weight 100 # prefix-list rmap1 in # prefix-list rmap2 out # address-family ipv6 unicast # neighbor 192.0.2.33 # address-family ipv4 multicast # inherit peer-policy BasePolicy 200 # vrf site-1 # neighbor 203.0.113.1 # address-family ipv4 unicast # suppress-inactive # next-hop-self # neighbor 203.0.113.2 # address-family ipv4 multicast # send-community # address-family ipv6 unicast - name: Parse externally provided BGP neighbor AF config register: result cisco.nxos.nxos_bgp_neighbor_address_family: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # as_number: "65536" # neighbors: # - neighbor_address: 192.0.2.32 # address_family: # - afi: ipv4 # safi: unicast # maximum_prefix: # max_prefix_limit: 20 # generate_warning_threshold: 75 # weight: 100 # prefix_list: # inbound: rmap1 # outbound: rmap2 # - afi: ipv6 # safi: unicast # - neighbor_address: 192.0.2.33 # address_family: # - afi: ipv4 # safi: multicast # inherit: # template: BasePolicy # sequence: 200 # vrfs: # - vrf: site-1 # neighbors: # - neighbor_address: 203.0.113.1 # address_family: # - afi: ipv4 # safi: unicast # suppress_inactive: true # next_hop_self: # set: true # - neighbor_address: 203.0.113.2 # address_family: # - afi: ipv4 # safi: multicast # send_community: # set: True # - afi: ipv6 # safi: unicast ``` ### Authors * Nilashish Chakraborty (@NilashishC)
programming_docs
ansible cisco.nxos.nxos_snmp_traps – Manages SNMP traps. cisco.nxos.nxos\_snmp\_traps – Manages SNMP traps. ================================================== 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_snmp_traps`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages SNMP traps configurations. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **group** string / required | **Choices:*** aaa * bfd * bgp * bridge * callhome * cfs * config * eigrp * entity * feature-control * generic * hsrp * license * link * lldp * mmode * ospf * pim * rf * rmon * snmp * storm-control * stpx * switchfabric * syslog * sysmgr * system * upgrade * vtp * all | Case sensitive group. | | **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. | | **state** string | **Choices:*** **enabled** ← * disabled | Manage the state of the resource. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Limited Support for Cisco MDS * This module works at the group level for traps. If you need to only enable/disable 1 specific trap within a group, use the [cisco.nxos.nxos\_command](nxos_command_module#ansible-collections-cisco-nxos-nxos-command-module) module. * Be aware that you can set a trap only for an enabled feature. * 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 -------- ``` # ensure lldp trap configured - cisco.nxos.nxos_snmp_traps: group: lldp state: enabled # ensure lldp trap is not configured - cisco.nxos.nxos_snmp_traps: group: lldp state: disabled ``` 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 | command sent to the device **Sample:** snmp-server enable traps lldp ; | ### Authors * Jason Edelman (@jedelman8) ansible cisco.nxos.nxos_lldp – (deprecated, removed after 2022-06-01) Manage LLDP configuration on Cisco NXOS network devices. cisco.nxos.nxos\_lldp – (deprecated, removed after 2022-06-01) Manage LLDP configuration on Cisco NXOS network 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_lldp`. New in version 1.0.0: of cisco.nxos * [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 nxos\_lldp\_global Synopsis -------- * This module provides declarative management of LLDP service on Cisco NXOS network devices. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **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. | | **state** string | **Choices:*** **present** ← * absent * enabled * disabled | State of the LLDP configuration. If value is *present* lldp will be enabled else if it is *absent* it will be disabled. | Notes ----- Note * Tested against NXOSv 7.0(3)I5(1). * Unsupported 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: Enable LLDP service cisco.nxos.nxos_lldp: state: present - name: Disable LLDP service cisco.nxos.nxos_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:** ['feature lldp'] | 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) ansible cisco.nxos.nxos_rpm – Install patch or feature rpms on Cisco NX-OS devices. cisco.nxos.nxos\_rpm – Install patch or feature rpms on Cisco NX-OS 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_rpm`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Install software maintenance upgrade (smu) RPMS and 3rd party RPMS on Cisco NX-OS devices. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **aggregate** list / elements=dictionary | | List of RPM/patch definitions. | | | **file\_system** string | | The remote file system of the device. If omitted, devices that support a file\_system parameter will use their default values. | | | **pkg** string / required | | Name of the RPM package. | | | **state** string | **Choices:*** present * absent | If the state is present, the rpm will be installed, If the state is absent, it will be removed. | | **file\_system** string | **Default:**"bootflash" | The remote file system of the device. If omitted, devices that support a file\_system parameter will use their default values. | | **pkg** string | | Name of the RPM package. | | **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. | | **state** string | **Choices:*** **present** ← * absent | If the state is present, the rpm will be installed, If the state is absent, it will be removed. | Notes ----- Note * Tested against NXOSv 7.0(3)I2(5), 7.0(3)I4(6), 7.0(3)I5(3), 7.0(3)I6(1), 7.0(3)I7(3) * Unsupported for Cisco MDS * For patches, the minimum platform version needed is 7.0(3)I2(5) * For feature rpms, the minimum platform version needed is 7.0(3)I6(1) * The module manages the entire RPM lifecycle (Add, activate, commit, deactivate, remove) * For reload patches, this module is NOT idempotent until the patch is committed. * 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 -------- ``` - cisco.nxos.nxos_rpm: pkg: nxos.sample-n9k_ALL-1.0.0-7.0.3.I7.3.lib32_n9000.rpm ``` 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 | commands sent to the device **Sample:** ['install add bootflash:nxos.sample-n9k\_ALL-1.0.0-7.0.3.I7.3.lib32\_n9000.rpm forced', 'install activate nxos.sample-n9k\_ALL-1.0.0-7.0.3.I7.3.lib32\_n9000 forced', 'install commit nxos.sample-n9k\_ALL-1.0.0-7.0.3.I7.3.lib32\_n9000'] | ### Authors * Sai Chintalapudi (@saichint)
programming_docs
ansible cisco.nxos.nxos_vtp_version – Manages VTP version configuration. cisco.nxos.nxos\_vtp\_version – Manages VTP version configuration. ================================================================== 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_vtp_version`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages VTP version configuration. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **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. | | **version** string / required | **Choices:*** 1 * 2 | VTP version number. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * VTP feature must be active on the device to use this module. * This module is used to manage only VTP version. * Use this in combination with [cisco.nxos.nxos\_vtp\_password](nxos_vtp_password_module#ansible-collections-cisco-nxos-nxos-vtp-password-module) and [cisco.nxos.nxos\_vtp\_version](#ansible-collections-cisco-nxos-nxos-vtp-version-module) to fully manage VTP operations. * 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 -------- ``` # ENSURE VTP VERSION IS 2 - cisco.nxos.nxos_vtp_version: version: 2 host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' ``` 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 **Sample:** True | | **end\_state** dictionary | always | k/v pairs of vtp after module execution **Sample:** {'domain': 'testing', 'version': '2', 'vtp\_password': ''} | | **existing** dictionary | always | k/v pairs of existing vtp **Sample:** {'domain': 'testing', 'version': '1', 'vtp\_password': ''} | | **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'version': '2'} | | **updates** list / elements=string | always | command sent to the device **Sample:** ['vtp version 2'] | ### Authors * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_lldp_global – LLDP resource module cisco.nxos.nxos\_lldp\_global – LLDP resource module ==================================================== 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_lldp_global`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module configures and manages the Link Layer Discovery Protocol(LLDP) attributes on NX-OS platforms. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | A list of link layer discovery configurations | | | **holdtime** integer | | Amount of time the receiving device should hold the information (in seconds) | | | **port\_id** integer | **Choices:*** 0 * 1 | This attribute defines if the interface names should be advertised in the long(0) or short(1) form. | | | **reinit** integer | | Amount of time to delay the initialization of LLDP on any interface (in seconds) | | | **timer** integer | | Frequency at which LLDP updates need to be transmitted (in seconds) | | | **tlv\_select** dictionary | | This attribute can be used to specify the TLVs that need to be sent and received in the LLDP packets. By default, all TLVs are advertised | | | | **dcbxp** boolean | **Choices:*** no * yes | Used to specify the Data Center Bridging Exchange Protocol TLV | | | | **management\_address** dictionary | | Used to specify the management address in TLV messages | | | | | **v4** boolean | **Choices:*** no * yes | Management address with TLV v4 | | | | | **v6** boolean | **Choices:*** no * yes | Management address with TLV v6 | | | | **port** dictionary | | Used to manage port based attributes in TLV messages | | | | | **description** boolean | **Choices:*** no * yes | Used to specify the port description TLV | | | | | **vlan** boolean | **Choices:*** no * yes | Used to specify the port VLAN ID TLV | | | | **power\_management** boolean | **Choices:*** no * yes | Used to specify IEEE 802.3 DTE Power via MDI TLV | | | | **system** dictionary | | Used to manage system based attributes in TLV messages | | | | | **capabilities** boolean | **Choices:*** no * yes | Used to specify the system capabilities TLV | | | | | **description** boolean | **Choices:*** no * yes | Used to specify the system description TLV | | | | | **name** boolean | **Choices:*** no * yes | Used to specify the system name TLV | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the command **show running-config | include lldp**. 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 * deleted * gathered * rendered * parsed | The state of the configuration after module completion | Notes ----- Note * Tested against NxOS 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * The LLDP feature needs to be enabled before using this module Examples -------- ``` # Using merged # Before state: # ------------- # # user(config)# show running-config | include lldp # feature lldp - name: Merge provided configuration with device configuration cisco.nxos.nxos_lldp_global: config: timer: 35 holdtime: 100 state: merged # After state: # ------------ # # user(config)# show running-config | include lldp # feature lldp # lldp timer 35 # lldp holdtime 100 # Using replaced # Before state: # ------------- # # user(config)# show running-config | include lldp # feature lldp # lldp holdtime 100 # lldp reinit 5 # lldp timer 35 - name: Replace device configuration of specific LLDP attributes with provided configuration cisco.nxos.nxos_lldp_global: config: timer: 40 tlv_select: system: description: true name: false management_address: v4: true state: replaced # After state: # ------------ # # user(config)# show running-config | include lldp # feature lldp # lldp timer 40 # no lldp tlv-select system-name # Using deleted # Before state: # ------------- # # user(config)# show running-config | include lldp # feature lldp # lldp holdtime 5 # lldp reinit 3 - name: Delete LLDP configuration (this will by default remove all lldp configuration) cisco.nxos.nxos_lldp_global: state: deleted # After state: # ------------ # # user(config)# show running-config | include lldp # feature lldp # Using rendered - name: Use rendered state to convert task input to device specific commands cisco.nxos.nxos_lldp_global: config: holdtime: 130 port_id: 1 reinit: 5 tlv_select: dcbxp: yes power_management: yes state: rendered # Task Output (redacted) # ----------------------- # rendered: # - "lldp tlv-select dcbxp" # - "lldp tlv-select power-management" # - "lldp portid-subtype 1" # - "lldp reinit 5" # - "lldp holdtime 130" # Using parsed # parsed.cfg # ------------ # lldp holdtime 131 # lldp reinit 7 # no lldp tlv-select system-name # no lldp tlv-select system-description # Task output (redacted) # ----------------------- # parsed: # holdtime: 131 # reinit: 7 # tlv_select: # system: # description: false # name: false # Using gathered # Existing device config state # ------------------------------- # feature lldp # lldp holdtime 129 # lldp reinit 5 # lldp timer 35 # no lldp tlv-select system-name # Task output (redacted) # ----------------------- # gathered: # reinit: 5 # timer: 35 # tlv_select: # system: # name: False # holdtime: 129 ``` 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:** ['lldp holdtime 125', 'lldp reinit 4', 'no lldp tlv-select system-name'] | ### Authors * Adharsh Srivats Rangarajan (@adharshsrivatsr) ansible cisco.nxos.nxos_nxapi – Manage NXAPI configuration on an NXOS device. cisco.nxos.nxos\_nxapi – Manage NXAPI configuration on an NXOS device. ====================================================================== 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_nxapi`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Configures the NXAPI feature on devices running Cisco NXOS. The NXAPI feature is absent from the configuration by default. Since this module manages the NXAPI feature it only supports the use of the `Cli` transport. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **http** boolean | **Choices:*** no * **yes** ← | Controls the operating state of the HTTP protocol as one of the underlying transports for NXAPI. By default, NXAPI will enable the HTTP transport when the feature is first configured. To disable the use of the HTTP transport, set the value of this argument to False. aliases: enable\_http | | **http\_port** integer | **Default:**80 | Configure the port with which the HTTP server will listen on for requests. By default, NXAPI will bind the HTTP service to the standard HTTP port 80. This argument accepts valid port values in the range of 1 to 65535. | | **https** boolean | **Choices:*** **no** ← * yes | Controls the operating state of the HTTPS protocol as one of the underlying transports for NXAPI. By default, NXAPI will disable the HTTPS transport when the feature is first configured. To enable the use of the HTTPS transport, set the value of this argument to True. aliases: enable\_https | | **https\_port** integer | **Default:**443 | Configure the port with which the HTTPS server will listen on for requests. By default, NXAPI will bind the HTTPS service to the standard HTTPS port 443. This argument accepts valid port values in the 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 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. | | **sandbox** boolean | **Choices:*** no * yes | The NXAPI feature provides a web base UI for developers for entering commands. This feature is initially disabled when the NXAPI feature is configured for the first time. When the `sandbox` argument is set to True, the developer sandbox URL will accept requests and when the value is set to False, the sandbox URL is unavailable. This is supported on NX-OS 7K series. aliases: enable\_sandbox | | **ssl\_strong\_ciphers** boolean | **Choices:*** **no** ← * yes | Controls the use of whether strong or weak ciphers are configured. By default, this feature is disabled and weak ciphers are configured. To enable the use of strong ciphers, set the value of this argument to True. | | **state** string | **Choices:*** **present** ← * absent | The `state` argument controls whether or not the NXAPI feature is configured on the remote device. When the value is `present` the NXAPI feature configuration is present in the device running-config. When the values is `absent` the feature configuration is removed from the running-config. | | **tlsv1\_0** boolean | **Choices:*** no * **yes** ← | Controls the use of the Transport Layer Security version 1.0 is configured. By default, this feature is enabled. To disable the use of TLSV1.0, set the value of this argument to True. | | **tlsv1\_1** boolean | **Choices:*** **no** ← * yes | Controls the use of the Transport Layer Security version 1.1 is configured. By default, this feature is disabled. To enable the use of TLSV1.1, set the value of this argument to True. | | **tlsv1\_2** boolean | **Choices:*** **no** ← * yes | Controls the use of the Transport Layer Security version 1.2 is configured. By default, this feature is disabled. To enable the use of TLSV1.2, set the value of this argument to True. | 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: Enable NXAPI access with default configuration cisco.nxos.nxos_nxapi: state: present - name: Enable NXAPI with no HTTP, HTTPS at port 9443 and sandbox disabled cisco.nxos.nxos_nxapi: enable_http: false https_port: 9443 https: yes enable_sandbox: no - name: remove NXAPI configuration cisco.nxos.nxos_nxapi: 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 | | --- | --- | --- | | **updates** list / elements=string | always | Returns the list of commands that need to be pushed into the remote device to satisfy the arguments **Sample:** ['no feature nxapi'] | ### Authors * Peter Sprygada (@privateip)
programming_docs
ansible cisco.nxos.nxos_bgp_global – BGP Global resource module. cisco.nxos.nxos\_bgp\_global – BGP Global resource module. ========================================================== 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_bgp_global`. New in version 1.4.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages global BGP configuration on devices running Cisco NX-OS. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | A list of BGP process configuration. | | | **affinity\_group** dictionary | | Configure an affinity group. | | | | **group\_id** integer | | Affinity Group ID. | | | **as\_number** string | | Autonomous System Number of the router. | | | **bestpath** dictionary | | Define the default bestpath selection algorithm. | | | | **always\_compare\_med** boolean | **Choices:*** no * yes | Compare MED on paths from different AS. | | | | **as\_path** dictionary | | AS-Path. | | | | | **ignore** boolean | **Choices:*** no * yes | Ignore AS-Path during bestpath selection. | | | | | **multipath\_relax** boolean | **Choices:*** no * yes | Relax AS-Path restriction when choosing multipaths. | | | | **compare\_neighborid** boolean | **Choices:*** no * yes | When more paths are available than max path config, use neighborid as tie-breaker. | | | | **compare\_routerid** boolean | **Choices:*** no * yes | Compare router-id for identical EBGP paths. | | | | **cost\_community\_ignore** boolean | **Choices:*** no * yes | Ignore cost communities in bestpath selection. | | | | **igp\_metric\_ignore** boolean | **Choices:*** no * yes | Ignore IGP metric for next-hop during bestpath selection. | | | | **med** dictionary | | MED | | | | | **confed** boolean | **Choices:*** no * yes | Compare MED only from paths originated from within a confederation. | | | | | **missing\_as\_worst** boolean | **Choices:*** no * yes | Treat missing MED as highest MED. | | | | | **non\_deterministic** boolean | **Choices:*** no * yes | Not always pick the best-MED path among paths from same AS. | | | **cluster\_id** string | | Configure Route Reflector Cluster-ID. | | | **confederation** dictionary | | AS confederation parameters. | | | | **identifier** string | | Set routing domain confederation AS. | | | | **peers** list / elements=string | | Peer ASs in BGP confederation. | | | **disable\_policy\_batching** dictionary | | Disable batching evaluation of outbound policy for a peer. | | | | **ipv4** dictionary | | IPv4 address-family settings. | | | | | **prefix\_list** string | | Name of prefix-list to apply. | | | | **ipv6** dictionary | | IPv6 address-family settings. | | | | | **prefix\_list** string | | Name of prefix-list to apply. | | | | **nexthop** boolean | **Choices:*** no * yes | Batching based on nexthop. | | | | **set** boolean | **Choices:*** no * yes | Set policy batching. | | | **dynamic\_med\_interval** integer | | Sets the interval for dampening of med changes. | | | **enforce\_first\_as** boolean | **Choices:*** no * yes | Enforce neighbor AS is the first AS in AS-PATH attribute (EBGP). | | | **enhanced\_error** boolean | **Choices:*** no * yes | Enable BGP Enhanced error handling. | | | **fabric\_soo** string | | Fabric site of origin. | | | **fast\_external\_fallover** boolean | **Choices:*** no * yes | Immediately reset the session if the link to a directly connected BGP peer goes down. | | | **flush\_routes** boolean | **Choices:*** no * yes | Flush routes in RIB upon controlled restart. | | | **graceful\_restart** dictionary | | Configure Graceful Restart functionality. | | | | **helper** boolean | **Choices:*** no * yes | Configure Graceful Restart Helper mode functionality. | | | | **restart\_time** integer | | Maximum time for restart advertised to peers. | | | | **set** boolean | **Choices:*** no * yes | Enable graceful-restart. | | | | **stalepath\_time** integer | | Maximum time to keep a restarting peer's stale routes. | | | **graceful\_shutdown** dictionary | | Graceful-shutdown for BGP protocol. | | | | **activate** dictionary | | Send graceful-shutdown community on all routes. | | | | | **route\_map** string | | Apply route-map to modify attributes for outbound. | | | | | **set** boolean | **Choices:*** no * yes | Activiate graceful-shutdown. | | | | **aware** boolean | **Choices:*** no * yes | Lower preference of routes carrying graceful-shutdown community. | | | **isolate** dictionary | | Isolate this router from BGP perspective. | | | | **include\_local** boolean | **Choices:*** no * yes | Withdraw both local and remote BGP routes. | | | | **set** boolean | **Choices:*** no * yes | Withdraw remote BGP routes to isolate this router. | | | **log\_neighbor\_changes** boolean | **Choices:*** no * yes | Log a message for neighbor up/down event. | | | **maxas\_limit** integer | | Allow AS-PATH attribute from EBGP neighbor imposing a limit on number of ASes. | | | **neighbor\_down** dictionary | | Handle BGP neighbor down event, due to various reasons. | | | | **fib\_accelerate** boolean | **Choices:*** no * yes | Accelerate the hardware updates for IP/IPv6 adjacencies for neighbor. | | | **neighbors** list / elements=dictionary | | Configure BGP neighbors. | | | | **bfd** dictionary | | Bidirectional Fast Detection for the neighbor. | | | | | **multihop** dictionary | | Multihop session. | | | | | | **interval** dictionary | | Configure BFD session interval parameters. | | | | | | | **min\_rx\_interval** integer | | Minimum RX interval. | | | | | | | **multiplier** integer | | Detect Multiplier. | | | | | | | **tx\_interval** integer | | TX interval in milliseconds. | | | | | | **set** boolean | **Choices:*** no * yes | Set BFD multihop. | | | | | **set** boolean | **Choices:*** no * yes | Set BFD for this neighbor. | | | | | **singlehop** boolean | **Choices:*** no * yes | Single-hop session. | | | | **bmp\_activate\_server** integer | | Specify server ID for activating BMP monitoring for the peer. | | | | **capability** dictionary | | Capability. | | | | | **suppress\_4\_byte\_as** boolean | **Choices:*** no * yes | Suppress 4-byte AS Capability. | | | | **description** string | | Neighbor specific descripion. | | | | **disable\_connected\_check** boolean | **Choices:*** no * yes | Disable check for directly connected peer. | | | | **dont\_capability\_negotiate** boolean | **Choices:*** no * yes | Don't negotiate capability with this neighbor. | | | | **dscp** string | | Set dscp value for tcp transport. | | | | **dynamic\_capability** boolean | **Choices:*** no * yes | Dynamic Capability | | | | **ebgp\_multihop** integer | | Specify multihop TTL for remote peer. | | | | **graceful\_shutdown** dictionary | | Graceful-shutdown for this neighbor. | | | | | **activate** dictionary | | Send graceful-shutdown community. | | | | | | **route\_map** string | | Apply route-map to modify attributes for outbound. | | | | | | **set** boolean | **Choices:*** no * yes | Set activate. | | | | **inherit** dictionary | | Inherit a template. | | | | | **peer** string | | Peer template to inherit. | | | | | **peer\_session** string | | Peer-session template to inherit. | | | | **local\_as** string | | Specify the local-as number for the eBGP neighbor. | | | | **log\_neighbor\_changes** dictionary | | Log message for neighbor up/down event. | | | | | **disable** boolean | **Choices:*** no * yes | Disable logging of neighbor up/down event. | | | | | **set** boolean | **Choices:*** no * yes | Set log-neighbor-changes. | | | | **low\_memory** dictionary | | Behaviour in low memory situations. | | | | | **exempt** boolean | **Choices:*** no * yes | Do not shutdown this peer when under memory pressure. | | | | **neighbor\_address** string / required | | IP address/Prefix of the neighbor or interface. | | | | **neighbor\_affinity\_group** dictionary | | Configure an affinity group. | | | | | **group\_id** integer | | Affinity Group ID. | | | | **password** dictionary | | Configure a password for neighbor. | | | | | **encryption** integer | | 0 specifies an UNENCRYPTED neighbor password. 3 specifies an 3DES ENCRYPTED neighbor password will follow. 7 specifies a Cisco type 7 ENCRYPTED neighbor password will follow. | | | | | **key** string | | Authentication password. | | | | **path\_attribute** list / elements=dictionary | | BGP path attribute optional filtering. | | | | | **action** string | **Choices:*** discard * treat-as-withdraw | Action. | | | | | **range** dictionary | | Path attribute range. | | | | | | **end** integer | | Path attribute range end value. | | | | | | **start** integer | | Path attribute range start value. | | | | | **type** integer | | Path attribute type | | | | **peer\_type** string | **Choices:*** fabric-border-leaf * fabric-external | Neighbor facing | | | | **remote\_as** string | | Specify Autonomous System Number of the neighbor. | | | | **remove\_private\_as** dictionary | | Remove private AS number from outbound updates. | | | | | **all** boolean | **Choices:*** no * yes | All. | | | | | **replace\_as** boolean | **Choices:*** no * yes | Replace. | | | | | **set** boolean | **Choices:*** no * yes | Remove private AS. | | | | **shutdown** boolean | **Choices:*** no * yes | Administratively shutdown this neighbor. | | | | **timers** dictionary | | Configure keepalive and hold timers. | | | | | **holdtime** integer | | Holdtime (seconds). | | | | | **keepalive** integer | | Keepalive interval (seconds). | | | | **transport** dictionary | | BGP transport connection. | | | | | **connection\_mode** dictionary | | Specify type of connection. | | | | | | **passive** boolean | **Choices:*** no * yes | Allow passive connection setup only. | | | | **ttl\_security** dictionary | | Enable TTL Security Mechanism. | | | | | **hops** integer | | Specify hop count for remote peer. | | | | **update\_source** string | | Specify source of BGP session and updates. | | | **nexthop** dictionary | | Nexthop resolution options. | | | | **suppress\_default\_resolution** boolean | **Choices:*** no * yes | Prohibit use of default route for nexthop address resolution. | | | **rd** dictionary | | Secondary Route Distinguisher for vxlan multisite border gateway. | | | | **dual** boolean | **Choices:*** no * yes | Generate Secondary RD for all VRFs and L2VNIs. | | | | **id** integer | | Specify 2 byte value for ID. | | | **reconnect\_interval** integer | | Configure connection reconnect interval. | | | **router\_id** string | | Specify the IP address to use as router-id. | | | **shutdown** boolean | **Choices:*** no * yes | Administratively shutdown BGP protocol. | | | **suppress\_fib\_pending** boolean | **Choices:*** no * yes | Advertise only routes that are programmed in hardware to peers. | | | **timers** dictionary | | Configure bgp related timers. | | | | **bestpath\_limit** dictionary | | Configure timeout for first bestpath after restart. | | | | | **always** boolean | **Choices:*** no * yes | Configure update-delay-always option. | | | | | **timeout** integer | | Bestpath timeout (seconds). | | | | **bgp** dictionary | | Configure different bgp keepalive and holdtimes. | | | | | **holdtime** integer | | Holdtime (seconds). | | | | | **keepalive** integer | | Keepalive interval (seconds). | | | | **prefix\_peer\_timeout** integer | | Prefix Peer timeout (seconds). | | | | **prefix\_peer\_wait** integer | | Configure wait timer for a prefix peer. | | | **vrfs** list / elements=dictionary | | Virtual Router Context configurations. | | | | **allocate\_index** integer | | Configure allocate-index. | | | | **bestpath** dictionary | | Define the default bestpath selection algorithm. | | | | | **always\_compare\_med** boolean | **Choices:*** no * yes | Compare MED on paths from different AS. | | | | | **as\_path** dictionary | | AS-Path. | | | | | | **ignore** boolean | **Choices:*** no * yes | Ignore AS-Path during bestpath selection. | | | | | | **multipath\_relax** boolean | **Choices:*** no * yes | Relax AS-Path restriction when choosing multipaths. | | | | | **compare\_neighborid** boolean | **Choices:*** no * yes | When more paths are available than max path config, use neighborid as tie-breaker. | | | | | **compare\_routerid** boolean | **Choices:*** no * yes | Compare router-id for identical EBGP paths. | | | | | **cost\_community\_ignore** boolean | **Choices:*** no * yes | Ignore cost communities in bestpath selection. | | | | | **igp\_metric\_ignore** boolean | **Choices:*** no * yes | Ignore IGP metric for next-hop during bestpath selection. | | | | | **med** dictionary | | MED | | | | | | **confed** boolean | **Choices:*** no * yes | Compare MED only from paths originated from within a confederation. | | | | | | **missing\_as\_worst** boolean | **Choices:*** no * yes | Treat missing MED as highest MED. | | | | | | **non\_deterministic** boolean | **Choices:*** no * yes | Not always pick the best-MED path among paths from same AS. | | | | **cluster\_id** string | | Configure Route Reflector Cluster-ID. | | | | **confederation** dictionary | | AS confederation parameters. | | | | | **identifier** string | | Set routing domain confederation AS. | | | | | **peers** list / elements=string | | Peer ASs in BGP confederation. | | | | **graceful\_restart** dictionary | | Configure Graceful Restart functionality. | | | | | **helper** boolean | **Choices:*** no * yes | Configure Graceful Restart Helper mode functionality. | | | | | **restart\_time** integer | | Maximum time for restart advertised to peers. | | | | | **set** boolean | **Choices:*** no * yes | Enable graceful-restart. | | | | | **stalepath\_time** integer | | Maximum time to keep a restarting peer's stale routes. | | | | **local\_as** string | | Specify the local-as for this vrf. | | | | **log\_neighbor\_changes** boolean | **Choices:*** no * yes | Log a message for neighbor up/down event. | | | | **maxas\_limit** integer | | Allow AS-PATH attribute from EBGP neighbor imposing a limit on number of ASes. | | | | **neighbor\_down** dictionary | | Handle BGP neighbor down event, due to various reasons. | | | | | **fib\_accelerate** boolean | **Choices:*** no * yes | Accelerate the hardware updates for IP/IPv6 adjacencies for neighbor. | | | | **neighbors** list / elements=dictionary | | Configure BGP neighbors. | | | | | **bfd** dictionary | | Bidirectional Fast Detection for the neighbor. | | | | | | **multihop** dictionary | | Multihop session. | | | | | | | **interval** dictionary | | Configure BFD session interval parameters. | | | | | | | | **min\_rx\_interval** integer | | Minimum RX interval. | | | | | | | | **multiplier** integer | | Detect Multiplier. | | | | | | | | **tx\_interval** integer | | TX interval in milliseconds. | | | | | | | **set** boolean | **Choices:*** no * yes | Set BFD multihop. | | | | | | **set** boolean | **Choices:*** no * yes | Set BFD for this neighbor. | | | | | | **singlehop** boolean | **Choices:*** no * yes | Single-hop session. | | | | | **bmp\_activate\_server** integer | | Specify server ID for activating BMP monitoring for the peer. | | | | | **capability** dictionary | | Capability. | | | | | | **suppress\_4\_byte\_as** boolean | **Choices:*** no * yes | Suppress 4-byte AS Capability. | | | | | **description** string | | Neighbor specific descripion. | | | | | **disable\_connected\_check** boolean | **Choices:*** no * yes | Disable check for directly connected peer. | | | | | **dont\_capability\_negotiate** boolean | **Choices:*** no * yes | Don't negotiate capability with this neighbor. | | | | | **dscp** string | | Set dscp value for tcp transport. | | | | | **dynamic\_capability** boolean | **Choices:*** no * yes | Dynamic Capability | | | | | **ebgp\_multihop** integer | | Specify multihop TTL for remote peer. | | | | | **graceful\_shutdown** dictionary | | Graceful-shutdown for this neighbor. | | | | | | **activate** dictionary | | Send graceful-shutdown community. | | | | | | | **route\_map** string | | Apply route-map to modify attributes for outbound. | | | | | | | **set** boolean | **Choices:*** no * yes | Set activate. | | | | | **inherit** dictionary | | Inherit a template. | | | | | | **peer** string | | Peer template to inherit. | | | | | | **peer\_session** string | | Peer-session template to inherit. | | | | | **local\_as** string | | Specify the local-as number for the eBGP neighbor. | | | | | **log\_neighbor\_changes** dictionary | | Log message for neighbor up/down event. | | | | | | **disable** boolean | **Choices:*** no * yes | Disable logging of neighbor up/down event. | | | | | | **set** boolean | **Choices:*** no * yes | Set log-neighbor-changes. | | | | | **low\_memory** dictionary | | Behaviour in low memory situations. | | | | | | **exempt** boolean | **Choices:*** no * yes | Do not shutdown this peer when under memory pressure. | | | | | **neighbor\_address** string / required | | IP address/Prefix of the neighbor or interface. | | | | | **neighbor\_affinity\_group** dictionary | | Configure an affinity group. | | | | | | **group\_id** integer | | Affinity Group ID. | | | | | **password** dictionary | | Configure a password for neighbor. | | | | | | **encryption** integer | | 0 specifies an UNENCRYPTED neighbor password. 3 specifies an 3DES ENCRYPTED neighbor password will follow. 7 specifies a Cisco type 7 ENCRYPTED neighbor password will follow. | | | | | | **key** string | | Authentication password. | | | | | **path\_attribute** list / elements=dictionary | | BGP path attribute optional filtering. | | | | | | **action** string | **Choices:*** discard * treat-as-withdraw | Action. | | | | | | **range** dictionary | | Path attribute range. | | | | | | | **end** integer | | Path attribute range end value. | | | | | | | **start** integer | | Path attribute range start value. | | | | | | **type** integer | | Path attribute type | | | | | **peer\_type** string | **Choices:*** fabric-border-leaf * fabric-external | Neighbor facing | | | | | **remote\_as** string | | Specify Autonomous System Number of the neighbor. | | | | | **remove\_private\_as** dictionary | | Remove private AS number from outbound updates. | | | | | | **all** boolean | **Choices:*** no * yes | All. | | | | | | **replace\_as** boolean | **Choices:*** no * yes | Replace. | | | | | | **set** boolean | **Choices:*** no * yes | Remove private AS. | | | | | **shutdown** boolean | **Choices:*** no * yes | Administratively shutdown this neighbor. | | | | | **timers** dictionary | | Configure keepalive and hold timers. | | | | | | **holdtime** integer | | Holdtime (seconds). | | | | | | **keepalive** integer | | Keepalive interval (seconds). | | | | | **transport** dictionary | | BGP transport connection. | | | | | | **connection\_mode** dictionary | | Specify type of connection. | | | | | | | **passive** boolean | **Choices:*** no * yes | Allow passive connection setup only. | | | | | **ttl\_security** dictionary | | Enable TTL Security Mechanism. | | | | | | **hops** integer | | Specify hop count for remote peer. | | | | | **update\_source** string | | Specify source of BGP session and updates. | | | | **reconnect\_interval** integer | | Configure connection reconnect interval. | | | | **router\_id** string | | Specify the IP address to use as router-id. | | | | **timers** dictionary | | Configure bgp related timers. | | | | | **bestpath\_limit** dictionary | | Configure timeout for first bestpath after restart. | | | | | | **always** boolean | **Choices:*** no * yes | Configure update-delay-always option. | | | | | | **timeout** integer | | Bestpath timeout (seconds). | | | | | **bgp** dictionary | | Configure different bgp keepalive and holdtimes. | | | | | | **holdtime** integer | | Holdtime (seconds). | | | | | | **keepalive** integer | | Keepalive interval (seconds). | | | | | **prefix\_peer\_timeout** integer | | Prefix Peer timeout (seconds). | | | | | **prefix\_peer\_wait** integer | | Configure wait timer for a prefix peer. | | | | **vrf** string | | VRF name. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the command **show running-config | section '^router bgp'**. 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 * deleted * purged * parsed * gathered * rendered | The state the configuration should be left in. State *purged* removes all the BGP configurations from the target device. Use caution with this state. State *deleted* only removes BGP attributes that this modules manages and does not negate the BGP process completely. Thereby, preserving address-family related configurations under BGP context. Running states *deleted* and *replaced* will result in an error if there are address-family configuration lines present under a neighbor, or a vrf context that is to be removed. Please use the [cisco.nxos.nxos\_bgp\_af](nxos_bgp_af_module) or [cisco.nxos.nxos\_bgp\_neighbor\_af](nxos_bgp_neighbor_af_module) modules for prior cleanup. States *merged* and *replaced* will result in a failure if BGP is already configured with a different ASN than what is provided in the task. In such cases, please use state *purged* to remove the existing BGP process and proceed further. Refer to examples for more details. | Notes ----- Note * Tested against NX-OS 9.3.6. * Unsupported for Cisco MDS * This module works with connection `network_cli` and `httpapi`. Examples -------- ``` # Using merged # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # Nexus9000v# - name: Merge the provided configuration with the existing running configuration cisco.nxos.nxos_bgp_global: config: as_number: 65563 router_id: 192.168.1.1 bestpath: as_path: multipath_relax: True compare_neighborid: True cost_community_ignore: True confederation: identifier: 42 peers: - 65020 - 65030 - 65040 log_neighbor_changes: True maxas_limit: 20 neighbors: - neighbor_address: 192.168.1.100 neighbor_affinity_group: group_id: 160 bmp_activate_server: 1 remote_as: 65563 description: NBR-1 low_memory: exempt: True - neighbor_address: 192.168.1.101 remote_as: 65563 password: encryption: 7 key: 12090404011C03162E neighbor_down: fib_accelerate: True vrfs: - vrf: site-1 allocate_index: 5000 local_as: 200 log_neighbor_changes: True neighbors: - neighbor_address: 198.51.100.1 description: site-1-nbr-1 password: encryption: 3 key: 13D4D3549493D2877B1DC116EE27A6BE remote_as: 65562 - neighbor_address: 198.51.100.2 remote_as: 65562 description: site-1-nbr-2 - vrf: site-2 local_as: 300 log_neighbor_changes: True neighbors: - neighbor_address: 203.0.113.2 description: site-2-nbr-1 password: encryption: 3 key: AF92F4C16A0A0EC5BDF56CF58BC030F6 remote_as: 65568 neighbor_down: fib_accelerate: True # Task output # ------------- # before: {} # # commands: # - router bgp 65563 # - bestpath as-path multipath-relax # - bestpath compare-neighborid # - bestpath cost-community ignore # - confederation identifier 42 # - log-neighbor-changes # - maxas-limit 20 # - neighbor-down fib-accelerate # - router-id 192.168.1.1 # - confederation peers 65020 65030 65040 # - neighbor 192.168.1.100 # - remote-as 65563 # - affinity-group 160 # - bmp-activate-server 1 # - description NBR-1 # - low-memory exempt # - neighbor 192.168.1.101 # - remote-as 65563 # - password 7 12090404011C03162E # - vrf site-1 # - allocate-index 5000 # - local-as 200 # - log-neighbor-changes # - neighbor 198.51.100.1 # - remote-as 65562 # - description site-1-nbr-1 # - password 3 13D4D3549493D2877B1DC116EE27A6BE # - neighbor 198.51.100.2 # - remote-as 65562 # - description site-1-nbr-2 # - vrf site-2 # - local-as 300 # - log-neighbor-changes # - neighbor-down fib-accelerate # - neighbor 203.0.113.2 # - remote-as 65568 # - description site-2-nbr-1 # - password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6 # # after: # as_number: '65563' # bestpath: # as_path: # multipath_relax: true # compare_neighborid: true # cost_community_ignore: true # confederation: # identifier: '42' # peers: # - '65020' # - '65030' # - '65040' # log_neighbor_changes: true # maxas_limit: 20 # neighbor_down: # fib_accelerate: true # neighbors: # - bmp_activate_server: 1 # description: NBR-1 # low_memory: # exempt: true # neighbor_address: 192.168.1.100 # neighbor_affinity_group: # group_id: 160 # remote_as: '65563' # - neighbor_address: 192.168.1.101 # password: # encryption: 7 # key: 12090404011C03162E # remote_as: '65563' # router_id: 192.168.1.1 # vrfs: # - allocate_index: 5000 # local_as: '200' # log_neighbor_changes: true # neighbors: # - description: site-1-nbr-1 # neighbor_address: 198.51.100.1 # password: # encryption: 3 # key: 13D4D3549493D2877B1DC116EE27A6BE # remote_as: '65562' # - description: site-1-nbr-2 # neighbor_address: 198.51.100.2 # remote_as: '65562' # vrf: site-1 # - local_as: '300' # log_neighbor_changes: true # neighbor_down: # fib_accelerate: true # neighbors: # - description: site-2-nbr-1 # neighbor_address: 203.0.113.2 # password: # encryption: 3 # key: AF92F4C16A0A0EC5BDF56CF58BC030F6 # remote_as: '65568' # vrf: site-2 # After state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65563 # router-id 192.168.1.1 # confederation identifier 42 # confederation peers 65020 65030 65040 # bestpath as-path multipath-relax # bestpath cost-community ignore # bestpath compare-neighborid # neighbor-down fib-accelerate # maxas-limit 20 # log-neighbor-changes # neighbor 192.168.1.100 # low-memory exempt # bmp-activate-server 1 # remote-as 65563 # description NBR-1 # affinity-group 160 # neighbor 192.168.1.101 # remote-as 65563 # password 7 12090404011C03162E # vrf site-1 # local-as 200 # log-neighbor-changes # allocate-index 5000 # neighbor 198.51.100.1 # remote-as 65562 # description site-1-nbr-1 # password 3 13D4D3549493D2877B1DC116EE27A6BE # neighbor 198.51.100.2 # remote-as 65562 # description site-1-nbr-2 # vrf site-2 # local-as 300 # neighbor-down fib-accelerate # log-neighbor-changes # neighbor 203.0.113.2 # remote-as 65568 # description site-2-nbr-1 # password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6 # Using replaced # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65563 # router-id 192.168.1.1 # confederation identifier 42 # confederation peers 65020 65030 65040 # bestpath as-path multipath-relax # bestpath cost-community ignore # bestpath compare-neighborid # neighbor-down fib-accelerate # maxas-limit 20 # log-neighbor-changes # neighbor 192.168.1.100 # low-memory exempt # bmp-activate-server 1 # remote-as 65563 # description NBR-1 # affinity-group 160 # neighbor 192.168.1.101 # remote-as 65563 # password 7 12090404011C03162E # vrf site-1 # local-as 200 # log-neighbor-changes # allocate-index 5000 # neighbor 198.51.100.1 # remote-as 65562 # description site-1-nbr-1 # password 3 13D4D3549493D2877B1DC116EE27A6BE # neighbor 198.51.100.2 # remote-as 65562 # description site-1-nbr-2 # vrf site-2 # local-as 300 # neighbor-down fib-accelerate # log-neighbor-changes # neighbor 203.0.113.2 # remote-as 65568 # description site-2-nbr-1 # password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6 - name: Replace BGP configuration with provided configuration cisco.nxos.nxos_bgp_global: config: as_number: 65563 router_id: 192.168.1.1 bestpath: compare_neighborid: True cost_community_ignore: True confederation: identifier: 42 peers: - 65020 - 65030 - 65050 maxas_limit: 40 neighbors: - neighbor_address: 192.168.1.100 neighbor_affinity_group: group_id: 160 bmp_activate_server: 1 remote_as: 65563 description: NBR-1 low_memory: exempt: True neighbor_down: fib_accelerate: True vrfs: - vrf: site-2 local_as: 300 log_neighbor_changes: True neighbors: - neighbor_address: 203.0.113.2 password: encryption: 7 key: 12090404011C03162E neighbor_down: fib_accelerate: True state: replaced # Task output # ------------- # before: # as_number: '65563' # bestpath: # as_path: # multipath_relax: true # compare_neighborid: true # cost_community_ignore: true # confederation: # identifier: '42' # peers: # - '65020' # - '65030' # - '65040' # log_neighbor_changes: true # maxas_limit: 20 # neighbor_down: # fib_accelerate: true # neighbors: # - bmp_activate_server: 1 # description: NBR-1 # low_memory: # exempt: true # neighbor_address: 192.168.1.100 # neighbor_affinity_group: # group_id: 160 # remote_as: '65563' # - neighbor_address: 192.168.1.101 # password: # encryption: 7 # key: 12090404011C03162E # remote_as: '65563' # router_id: 192.168.1.1 # vrfs: # - allocate_index: 5000 # local_as: '200' # log_neighbor_changes: true # neighbors: # - description: site-1-nbr-1 # neighbor_address: 198.51.100.1 # password: # encryption: 3 # key: 13D4D3549493D2877B1DC116EE27A6BE # remote_as: '65562' # - description: site-1-nbr-2 # neighbor_address: 198.51.100.2 # remote_as: '65562' # vrf: site-1 # - local_as: '300' # log_neighbor_changes: true # neighbor_down: # fib_accelerate: true # neighbors: # - description: site-2-nbr-1 # neighbor_address: 203.0.113.2 # password: # encryption: 3 # key: AF92F4C16A0A0EC5BDF56CF58BC030F6 # remote_as: '65568' # vrf: site-2 # # commands: # - router bgp 65563 # - no bestpath as-path multipath-relax # - no log-neighbor-changes # - maxas-limit 40 # - no confederation peers 65020 65030 65040 # - confederation peers 65020 65030 65050 # - no neighbor 192.168.1.101 # - vrf site-2 # - neighbor 203.0.113.2 # - no remote-as 65568 # - no description site-2-nbr-1 # - password 7 12090404011C03162E # - no vrf site-1 # after: # as_number: '65563' # bestpath: # compare_neighborid: true # cost_community_ignore: true # confederation: # identifier: '42' # peers: # - '65020' # - '65030' # - '65050' # maxas_limit: 40 # neighbor_down: # fib_accelerate: true # neighbors: # - bmp_activate_server: 1 # description: NBR-1 # low_memory: # exempt: true # neighbor_address: 192.168.1.100 # neighbor_affinity_group: # group_id: 160 # remote_as: '65563' # router_id: 192.168.1.1 # vrfs: # - local_as: '300' # log_neighbor_changes: true # neighbor_down: # fib_accelerate: true # neighbors: # - neighbor_address: 203.0.113.2 # password: # encryption: 7 # key: 12090404011C03162E # vrf: site-2 # # After state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65563 # router-id 192.168.1.1 # confederation identifier 42 # confederation peers 65020 65030 65050 # bestpath cost-community ignore # bestpath compare-neighborid # neighbor-down fib-accelerate # maxas-limit 40 # neighbor 192.168.1.100 # low-memory exempt # bmp-activate-server 1 # remote-as 65563 # description NBR-1 # affinity-group 160 # vrf site-2 # local-as 300 # neighbor-down fib-accelerate # log-neighbor-changes # neighbor 203.0.113.2 # password 7 12090404011C03162E # Using deleted # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65563 # router-id 192.168.1.1 # confederation identifier 42 # confederation peers 65020 65030 65040 # bestpath as-path multipath-relax # bestpath cost-community ignore # bestpath compare-neighborid # neighbor-down fib-accelerate # maxas-limit 20 # log-neighbor-changes # address-family ipv4 unicast # default-metric 400 # suppress-inactive # default-information originate # address-family ipv6 multicast # wait-igp-convergence # redistribute eigrp eigrp-1 route-map site-1-rmap # neighbor 192.168.1.100 # low-memory exempt # bmp-activate-server 1 # remote-as 65563 # description NBR-1 # affinity-group 160 # neighbor 192.168.1.101 # remote-as 65563 # password 7 12090404011C03162E # vrf site-1 # local-as 200 # log-neighbor-changes # allocate-index 5000 # address-family ipv4 multicast # maximum-paths 40 # dampen-igp-metric 1200 # neighbor 198.51.100.1 # remote-as 65562 # description site-1-nbr-1 # password 3 13D4D3549493D2877B1DC116EE27A6BE # neighbor 198.51.100.2 # remote-as 65562 # description site-1-nbr-2 # vrf site-2 # local-as 300 # neighbor-down fib-accelerate # log-neighbor-changes # neighbor 203.0.113.2 # remote-as 65568 # description site-1-nbr-1 # password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6 - name: Delete BGP configurations handled by this module cisco.nxos.nxos_bgp_global: state: deleted # Task output # ------------- # before: # as_number: '65563' # bestpath: # as_path: # multipath_relax: true # compare_neighborid: true # cost_community_ignore: true # confederation: # identifier: '42' # peers: # - '65020' # - '65030' # - '65040' # log_neighbor_changes: true # maxas_limit: 20 # neighbor_down: # fib_accelerate: true # neighbors: # - bmp_activate_server: 1 # description: NBR-1 # low_memory: # exempt: true # neighbor_address: 192.168.1.100 # neighbor_affinity_group: # group_id: 160 # remote_as: '65563' # - neighbor_address: 192.168.1.101 # password: # encryption: 7 # key: 12090404011C03162E # remote_as: '65563' # router_id: 192.168.1.1 # vrfs: # - allocate_index: 5000 # local_as: '200' # log_neighbor_changes: true # neighbors: # - description: site-1-nbr-1 # neighbor_address: 198.51.100.1 # password: # encryption: 3 # key: 13D4D3549493D2877B1DC116EE27A6BE # remote_as: '65562' # - description: site-1-nbr-2 # neighbor_address: 198.51.100.2 # remote_as: '65562' # vrf: site-1 # - local_as: '300' # log_neighbor_changes: true # neighbor_down: # fib_accelerate: true # neighbors: # - description: site-1-nbr-1 # neighbor_address: 203.0.113.2 # password: # encryption: 3 # key: AF92F4C16A0A0EC5BDF56CF58BC030F6 # remote_as: '65568' # vrf: site-2 # # commands: # - router bgp 65563 # - no bestpath as-path multipath-relax # - no bestpath compare-neighborid # - no bestpath cost-community ignore # - no confederation identifier 42 # - no log-neighbor-changes # - no maxas-limit 20 # - no neighbor-down fib-accelerate # - no router-id 192.168.1.1 # - no confederation peers 65020 65030 65040 # - no neighbor 192.168.1.100 # - no neighbor 192.168.1.101 # - no vrf site-1 # - no vrf site-2 # # after: # as_number: '65563' # # After state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65563 # address-family ipv4 unicast # default-metric 400 # suppress-inactive # default-information originate # address-family ipv6 multicast # wait-igp-convergence # redistribute eigrp eigrp-1 route-map site-1-rmap # # Using purged # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65563 # router-id 192.168.1.1 # confederation identifier 42 # confederation peers 65020 65030 65040 # bestpath as-path multipath-relax # bestpath cost-community ignore # bestpath compare-neighborid # neighbor-down fib-accelerate # maxas-limit 20 # log-neighbor-changes # address-family ipv4 unicast # default-metric 400 # suppress-inactive # default-information originate # address-family ipv6 multicast # wait-igp-convergence # redistribute eigrp eigrp-1 route-map site-1-rmap # neighbor 192.168.1.100 # low-memory exempt # bmp-activate-server 1 # remote-as 65563 # description NBR-1 # affinity-group 160 # neighbor 192.168.1.101 # remote-as 65563 # password 7 12090404011C03162E # vrf site-1 # local-as 200 # log-neighbor-changes # allocate-index 5000 # address-family ipv4 multicast # maximum-paths 40 # dampen-igp-metric 1200 # neighbor 198.51.100.1 # remote-as 65562 # description site-1-nbr-1 # password 3 13D4D3549493D2877B1DC116EE27A6BE # neighbor 198.51.100.2 # remote-as 65562 # description site-1-nbr-2 # vrf site-2 # local-as 300 # neighbor-down fib-accelerate # log-neighbor-changes # neighbor 203.0.113.2 # remote-as 65568 # description site-1-nbr-1 # password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6 - name: Purge all BGP configurations from the device cisco.nxos.nxos_bgp_global: state: purged # Task output # ------------- # before: # as_number: '65563' # bestpath: # as_path: # multipath_relax: true # compare_neighborid: true # cost_community_ignore: true # confederation: # identifier: '42' # peers: # - '65020' # - '65030' # - '65040' # log_neighbor_changes: true # maxas_limit: 20 # neighbor_down: # fib_accelerate: true # neighbors: # - bmp_activate_server: 1 # description: NBR-1 # low_memory: # exempt: true # neighbor_address: 192.168.1.100 # neighbor_affinity_group: # group_id: 160 # remote_as: '65563' # - neighbor_address: 192.168.1.101 # password: # encryption: 7 # key: 12090404011C03162E # remote_as: '65563' # router_id: 192.168.1.1 # vrfs: # - allocate_index: 5000 # local_as: '200' # log_neighbor_changes: true # neighbors: # - description: site-1-nbr-1 # neighbor_address: 198.51.100.1 # password: # encryption: 3 # key: 13D4D3549493D2877B1DC116EE27A6BE # remote_as: '65562' # - description: site-1-nbr-2 # neighbor_address: 198.51.100.2 # remote_as: '65562' # vrf: site-1 # - local_as: '300' # log_neighbor_changes: true # neighbor_down: # fib_accelerate: true # neighbors: # - description: site-1-nbr-1 # neighbor_address: 203.0.113.2 # password: # encryption: 3 # key: AF92F4C16A0A0EC5BDF56CF58BC030F6 # remote_as: '65568' # vrf: site-2 # # commands: # - no router bgp 65563 # # after: {} # # After state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # Nexus9000v# # Using rendered - name: Render platform specific configuration lines (without connecting to the device) cisco.nxos.nxos_bgp_global: config: as_number: 65563 router_id: 192.168.1.1 bestpath: as_path: multipath_relax: True compare_neighborid: True cost_community_ignore: True confederation: identifier: 42 peers: - 65020 - 65030 - 65040 log_neighbor_changes: True maxas_limit: 20 neighbors: - neighbor_address: 192.168.1.100 neighbor_affinity_group: group_id: 160 bmp_activate_server: 1 remote_as: 65563 description: NBR-1 low_memory: exempt: True - neighbor_address: 192.168.1.101 remote_as: 65563 password: encryption: 7 key: 12090404011C03162E neighbor_down: fib_accelerate: True vrfs: - vrf: site-1 allocate_index: 5000 local_as: 200 log_neighbor_changes: True neighbors: - neighbor_address: 198.51.100.1 description: site-1-nbr-1 password: encryption: 3 key: 13D4D3549493D2877B1DC116EE27A6BE remote_as: 65562 - neighbor_address: 198.51.100.2 remote_as: 65562 description: site-1-nbr-2 - vrf: site-2 local_as: 300 log_neighbor_changes: True neighbors: - neighbor_address: 203.0.113.2 description: site-1-nbr-1 password: encryption: 3 key: AF92F4C16A0A0EC5BDF56CF58BC030F6 remote_as: 65568 neighbor_down: fib_accelerate: True # Task Output (redacted) # ----------------------- # rendered: # - router bgp 65563 # - bestpath as-path multipath-relax # - bestpath compare-neighborid # - bestpath cost-community ignore # - confederation identifier 42 # - log-neighbor-changes # - maxas-limit 20 # - neighbor-down fib-accelerate # - router-id 192.168.1.1 # - confederation peers 65020 65030 65040 # - neighbor 192.168.1.100 # - remote-as 65563 # - affinity-group 160 # - bmp-activate-server 1 # - description NBR-1 # - low-memory exempt # - neighbor 192.168.1.101 # - remote-as 65563 # - password 7 12090404011C03162E # - vrf site-1 # - allocate-index 5000 # - local-as 200 # - log-neighbor-changes # - neighbor 198.51.100.1 # - remote-as 65562 # - description site-1-nbr-1 # - password 3 13D4D3549493D2877B1DC116EE27A6BE # - neighbor 198.51.100.2 # - remote-as 65562 # - description site-1-nbr-2 # - vrf site-2 # - local-as 300 # - log-neighbor-changes # - neighbor-down fib-accelerate # - neighbor 203.0.113.2 # - remote-as 65568 # - description site-1-nbr-1 # - password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6 # Using parsed # parsed.cfg # ------------ # router bgp 65563 # router-id 192.168.1.1 # confederation identifier 42 # confederation peers 65020 65030 65040 # bestpath as-path multipath-relax # bestpath cost-community ignore # bestpath compare-neighborid # neighbor-down fib-accelerate # maxas-limit 20 # log-neighbor-changes # neighbor 192.168.1.100 # low-memory exempt # bmp-activate-server 1 # remote-as 65563 # description NBR-1 # affinity-group 160 # neighbor 192.168.1.101 # remote-as 65563 # password 7 12090404011C03162E # vrf site-1 # local-as 200 # log-neighbor-changes # allocate-index 5000 # neighbor 198.51.100.1 # remote-as 65562 # description site-1-nbr-1 # password 3 13D4D3549493D2877B1DC116EE27A6BE # neighbor 198.51.100.2 # remote-as 65562 # description site-1-nbr-2 # vrf site-2 # local-as 300 # neighbor-down fib-accelerate # log-neighbor-changes # neighbor 203.0.113.2 # remote-as 65568 # description site-1-nbr-1 # password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6 - name: Parse externally provided BGP config cisco.nxos.nxos_bgp_global: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # as_number: '65563' # bestpath: # as_path: # multipath_relax: true # compare_neighborid: true # cost_community_ignore: true # confederation: # identifier: '42' # peers: # - '65020' # - '65030' # - '65040' # log_neighbor_changes: true # maxas_limit: 20 # neighbor_down: # fib_accelerate: true # neighbors: # - bmp_activate_server: 1 # description: NBR-1 # low_memory: # exempt: true # neighbor_address: 192.168.1.100 # neighbor_affinity_group: # group_id: 160 # remote_as: '65563' # - neighbor_address: 192.168.1.101 # password: # encryption: 7 # key: 12090404011C03162E # remote_as: '65563' # router_id: 192.168.1.1 # vrfs: # - allocate_index: 5000 # local_as: '200' # log_neighbor_changes: true # neighbors: # - description: site-1-nbr-1 # neighbor_address: 198.51.100.1 # password: # encryption: 3 # key: 13D4D3549493D2877B1DC116EE27A6BE # remote_as: '65562' # - description: site-1-nbr-2 # neighbor_address: 198.51.100.2 # remote_as: '65562' # vrf: site-1 # - local_as: '300' # log_neighbor_changes: true # neighbor_down: # fib_accelerate: true # neighbors: # - description: site-1-nbr-1 # neighbor_address: 203.0.113.2 # password: # encryption: 3 # key: AF92F4C16A0A0EC5BDF56CF58BC030F6 # remote_as: '65568' # vrf: site-2 # Using gathered # existing config # # Nexus9000v# show running-config | section "^router bgp" # router bgp 65563 # router-id 192.168.1.1 # confederation identifier 42 # confederation peers 65020 65030 65050 # bestpath cost-community ignore # bestpath compare-neighborid # neighbor-down fib-accelerate # maxas-limit 40 # neighbor 192.168.1.100 # low-memory exempt # bmp-activate-server 1 # remote-as 65563 # description NBR-1 # affinity-group 160 # vrf site-1 # vrf site-2 # local-as 300 # neighbor-down fib-accelerate # log-neighbor-changes # neighbor 203.0.113.2 # password 7 12090404011C03162E - name: Gather BGP facts using gathered cisco.nxos.nxos_bgp_global: state: gathered # Task output (redacted) # ----------------------- # gathered: # as_number: '65563' # bestpath: # compare_neighborid: true # cost_community_ignore: true # confederation: # identifier: '42' # peers: # - '65020' # - '65030' # - '65050' # maxas_limit: 40 # neighbor_down: # fib_accelerate: true # neighbors: # - bmp_activate_server: 1 # description: NBR-1 # low_memory: # exempt: true # neighbor_address: 192.168.1.100 # neighbor_affinity_group: # group_id: 160 # remote_as: '65563' # router_id: 192.168.1.1 # vrfs: # - vrf: site-1 # - local_as: '300' # log_neighbor_changes: true # neighbor_down: # fib_accelerate: true # neighbors: # - neighbor_address: 203.0.113.2 # password: # encryption: 7 # key: 12090404011C03162E # vrf: site-2 # Remove a neighbor having AF configurations with state replaced (will fail) # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # log-neighbor-changes # maxas-limit 20 # router-id 198.51.100.2 # neighbor 203.0.113.2 # address-family ipv4 unicast # next-hop-self # remote-as 65538 # affinity-group 160 # description NBR-1 # low-memory exempt # neighbor 192.0.2.1 # remote-as 65537 # password 7 12090404011C03162E - name: Remove a neighbor having AF configurations (should fail) cisco.nxos.nxos_bgp_global: config: as_number: 65536 router_id: 198.51.100.2 maxas_limit: 20 log_neighbor_changes: True neighbors: - neighbor_address: 192.0.2.1 remote_as: 65537 password: encryption: 7 key: 12090404011C03162E state: replaced # Task output (redacted) # ----------------------- # fatal: [Nexus9000v]: FAILED! => changed=false # msg: Neighbor 203.0.113.2 has address-family configurations. # Please use the nxos_bgp_neighbor_af module to remove those first. # Remove a VRF having AF configurations with state replaced (will fail) # Before state: # ------------- # Nexus9000v# show running-config | section "^router bgp" # router bgp 65536 # log-neighbor-changes # maxas-limit 20 # router-id 198.51.100.2 # neighbor 192.0.2.1 # remote-as 65537 # password 7 12090404011C03162E # vrf site-1 # address-family ipv4 unicast # default-information originate # neighbor 203.0.113.2 # remote-as 65538 # affinity-group 160 # description NBR-1 # low-memory exempt # vrf site-2 # neighbor-down fib-accelerate - name: Remove a VRF having AF configurations (should fail) cisco.nxos.nxos_bgp_global: config: as_number: 65536 router_id: 198.51.100.2 maxas_limit: 20 log_neighbor_changes: True neighbors: - neighbor_address: 192.0.2.1 remote_as: 65537 password: encryption: 7 key: 12090404011C03162E vrfs: - vrf: site-2 neighbor_down: fib_accelerate: True state: replaced # Task output (redacted) # ----------------------- # fatal: [Nexus9000v]: FAILED! => changed=false # msg: VRF site-1 has address-family configurations. # Please use the nxos_bgp_af module to remove those first. ``` 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 resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. | | **before** dictionary | always | The configuration prior to the model 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:** ['router bgp 65563', 'maxas-limit 20', 'router-id 192.168.1.1', 'confederation peers 65020 65030 65040', 'neighbor 192.168.1.100', 'remote-as 65563', 'affinity-group 160', 'bmp-activate-server 1', 'description NBR-1', 'low-memory exempt', 'vrf site-1', 'log-neighbor-changes', 'neighbor 198.51.100.1', 'remote-as 65562', 'description site-1-nbr-1', 'password 3 13D4D3549493D2877B1DC116EE27A6BE'] | ### Authors * Nilashish Chakraborty (@NilashishC)
programming_docs
ansible cisco.nxos.nxos_l3_interface – (deprecated, removed after 2022-06-01) Manage L3 interfaces on Cisco NXOS network devices cisco.nxos.nxos\_l3\_interface – (deprecated, removed after 2022-06-01) Manage L3 interfaces on Cisco NXOS network 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_l3_interface`. New in version 1.0.0: of cisco.nxos * [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 nxos\_l3\_interfaces Synopsis -------- * This module provides declarative management of L3 interfaces on Cisco NXOS 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 L3 interfaces definitions. | | | **ipv4** string | | IPv4 of the L3 interface. | | | **ipv6** string | | IPv6 of the L3 interface. | | | **name** string | | Name of the L3 interface. | | | **state** string | **Choices:*** present * absent | State of the L3 interface configuration. | | **ipv4** string | | IPv4 of the L3 interface. | | **ipv6** string | | IPv6 of the L3 interface. | | **name** string | | Name of the L3 interface. | | **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. | | **state** string | **Choices:*** **present** ← * absent | State of the L3 interface configuration. | Notes ----- Note * Tested against NXOSv 7.0(3)I5(1). * Unsupported 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: Set interface IPv4 address cisco.nxos.nxos_l3_interface: name: Ethernet2/3 ipv4: 192.168.0.1/24 - name: Remove interface IPv4 address cisco.nxos.nxos_l3_interface: name: Ethernet2/3 state: absent - name: Set IP addresses on aggregate cisco.nxos.nxos_l3_interface: aggregate: - {name: "Ethernet2/1", ipv4: "192.168.2.10/24"} - {name: "Ethernet2/5", ipv4: "192.168.3.10/24", ipv6: "fd5d:12c9:2201:1::1/64"} - name: Remove IP addresses on aggregate cisco.nxos.nxos_l3_interface: aggregate: - {name: "Ethernet2/1", ipv4: "192.168.2.10/24"} - {name: "Ethernet2/5", 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:** ['interface ethernet2/3', 'no switchport', 'ip address 192.168.22.1/24', 'ipv6 address "fd5d:12c9:2201:1::1/64"', 'no ip address 192.168.22.1/24'] | 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) ansible cisco.nxos.nxos_snmp_location – Manages SNMP location information. cisco.nxos.nxos\_snmp\_location – Manages SNMP location information. ==================================================================== 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_snmp_location`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages SNMP location configuration. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **location** string / required | | Location information. | | **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. | | **state** string | **Choices:*** **present** ← * absent | Manage the state of the resource. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * 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 -------- ``` # ensure snmp location is configured - cisco.nxos.nxos_snmp_location: location: Test state: present # ensure snmp location is not configured - cisco.nxos.nxos_snmp_location: location: Test 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 | commands sent to the device **Sample:** ['snmp-server location New\_Test'] | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_zone_zoneset – Configuration of zone/zoneset for Cisco NXOS MDS Switches. cisco.nxos.nxos\_zone\_zoneset – Configuration of zone/zoneset for Cisco NXOS MDS Switches. =========================================================================================== 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_zone_zoneset`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Configuration of zone/zoneset for Cisco MDS NXOS. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **zone\_zoneset\_details** list / elements=dictionary | | List of zone/zoneset details to be added or removed | | | **default\_zone** string | **Choices:*** permit * deny | default zone behaviour for the vsan | | | **mode** string | **Choices:*** enhanced * basic | mode of the zone for the vsan | | | **smart\_zoning** boolean | **Choices:*** no * yes | Removes the vsan if True | | | **vsan** integer / required | | vsan id | | | **zone** list / elements=dictionary | | List of zone options for that vsan | | | | **members** list / elements=dictionary | | Members of the zone that needs to be removed or added | | | | | **devtype** string | **Choices:*** initiator * target * both | devtype of the zone member used along with Smart zoning config | | | | | **pwwn** string / required | | pwwn member of the zone, use alias 'device\_alias' as option for device\_alias member aliases: device\_alias | | | | | **remove** boolean | **Choices:*** **no** ← * yes | Removes member from the zone if True | | | | **name** string / required | | name of the zone | | | | **remove** boolean | **Choices:*** **no** ← * yes | Deletes the zone if True | | | **zoneset** list / elements=dictionary | | List of zoneset options for the vsan | | | | **action** string | **Choices:*** activate * deactivate | activates/de-activates the zoneset | | | | **members** list / elements=dictionary | | Members of the zoneset that needs to be removed or added | | | | | **name** string / required | | name of the zone that needs to be added to the zoneset or removed from the zoneset | | | | | **remove** boolean | **Choices:*** **no** ← * yes | Removes zone member from the zoneset | | | | **name** string / required | | name of the zoneset | | | | **remove** boolean | **Choices:*** **no** ← * yes | Removes zoneset if True | Notes ----- Note * Tested against Cisco MDS NX-OS 8.4(1) Examples -------- ``` - name: Test that zone/zoneset module works cisco.nxos.nxos_zone_zoneset: zone_zoneset_details: - mode: enhanced vsan: 22 zone: - members: - pwwn: 11:11:11:11:11:11:11:11 - device_alias: test123 - pwwn: 61:61:62:62:12:12:12:12 remove: true name: zoneA - members: - pwwn: 10:11:11:11:11:11:11:11 - pwwn: 62:62:62:62:21:21:21:21 name: zoneB - name: zoneC remove: true zoneset: - action: activate members: - name: zoneA - name: zoneB - name: zoneC remove: true name: zsetname1 - action: deactivate name: zsetTestExtra remove: true - mode: basic smart_zoning: true vsan: 21 zone: - members: - devtype: both pwwn: 11:11:11:11:11:11:11:11 - pwwn: 62:62:62:62:12:12:12:12 - devtype: both pwwn: 92:62:62:62:12:12:1a:1a remove: true name: zone21A - members: - pwwn: 10:11:11:11:11:11:11:11 - pwwn: 62:62:62:62:21:21:21:21 name: zone21B zoneset: - action: activate members: - name: zone21A - name: zone21B name: zsetname212 ``` 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 | commands sent to the device **Sample:** ['terminal dont-ask', 'zone name zoneA vsan 923', 'member pwwn 11:11:11:11:11:11:11:11', 'no member device-alias test123', 'zone commit vsan 923', 'no terminal dont-ask'] | | **messages** list / elements=string | always | debug messages **Sample:** ['zone mode is already enhanced ,no change in zone mode configuration for vsan 922', "zone member '11:11:11:11:11:11:11:11' is already present in zone 'zoneA' in vsan 922 hence nothing to add", "zone member 'test123' is already present in zone 'zoneA' in vsan 922 hence nothing to add", "zone member '61:61:62:62:12:12:12:12' is not present in zone 'zoneA' in vsan 922 hence nothing to remove", "zone member '10:11:11:11:11:11:11:11' is already present in zone 'zoneB' in vsan 922 hence nothing to add", "zone member '62:62:62:62:21:21:21:21' is already present in zone 'zoneB' in vsan 922 hence nothing to add", "zone 'zoneC' is not present in vsan 922 , so nothing to remove"] | ### Authors * Suhas Bharadwaj (@srbharadwaj) ([[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#314244535950435055171202060a171204030a171205090a525842525e171205070a525e5c))
programming_docs
ansible cisco.nxos.nxos_feature – Manage features in NX-OS switches. cisco.nxos.nxos\_feature – Manage features in NX-OS switches. ============================================================= 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_feature`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Offers ability to enable and disable features in NX-OS. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **feature** string / required | | Name of feature. | | **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. | | **state** string | **Choices:*** **enabled** ← * disabled | Desired state of the feature. | 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: Ensure lacp is enabled cisco.nxos.nxos_feature: feature: lacp state: enabled - name: Ensure ospf is disabled cisco.nxos.nxos_feature: feature: ospf state: disabled - name: Ensure vpc is enabled cisco.nxos.nxos_feature: feature: vpc state: enabled ``` 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 set of commands to be sent to the remote device **Sample:** ['nv overlay evpn'] | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_prefix_lists – Prefix-Lists resource module. cisco.nxos.nxos\_prefix\_lists – Prefix-Lists resource module. ============================================================== 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_prefix_lists`. New in version 2.4.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module manages prefix-lists configuration on devices running Cisco NX-OS. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A list of prefix-list configuration. | | | **afi** string | **Choices:*** ipv4 * ipv6 | The Address Family Identifier (AFI) for the prefix-lists. | | | **prefix\_lists** list / elements=dictionary | | List of prefix-list configurations. | | | | **description** string | | Description of the prefix list | | | | **entries** list / elements=dictionary | | List of configurations for the specified prefix-list | | | | | **action** string | **Choices:*** permit * deny | Prefix-List permit or deny. | | | | | **eq** integer | | Exact prefix length to be matched. | | | | | **ge** integer | | Minimum prefix length to be matched. | | | | | **le** integer | | Maximum prefix length to be matched. | | | | | **mask** string | | Explicit match mask. | | | | | **prefix** string | | IP or IPv6 prefix in A.B.C.D/LEN or A:B::C:D/LEN format. | | | | | **sequence** integer | | Sequence Number. | | | | **name** string | | Name of the prefix-list. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the command **show running-config | section '^ip(.\*** prefix-list'). 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 the configuration should be left in. Refer to examples for more details. With state *replaced*, for the listed prefix-lists, sequences that are in running-config but not in the task are negated. With state *overridden*, all prefix-lists that are in running-config but not in the task are negated. Please refer to examples for more details. | Notes ----- Note * Tested against NX-OS 9.3.6. * Unsupported for Cisco MDS * This module works with connection `network_cli` and `httpapi`. Examples -------- ``` # Using merged # Before state: # ------------- # nxos-9k-rdo# show running-config | section 'ip(.*) prefix-list' # nxos-9k-rdo# - name: Merge the provided configuration with the existing running configuration cisco.nxos.nxos_prefix_lists: config: - afi: ipv4 prefix_lists: - name: AllowPrefix description: allows engineering IPv4 networks entries: - sequence: 10 action: permit prefix: 192.0.2.0/23 eq: 24 - sequence: 20 action: permit prefix: 198.51.100.128/26 - name: DenyPrefix description: denies lab IPv4 networks entries: - sequence: 20 action: deny prefix: 203.0.113.0/24 le: 25 - afi: ipv6 prefix_lists: - name: AllowIPv6Prefix description: allows engineering IPv6 networks entries: - sequence: 8 action: permit prefix: "2001:db8:400::/38" - sequence: 20 action: permit prefix: "2001:db8:8000::/35" le: 37 # Task output # ------------- # before: [] # # commands: # - "ipv6 prefix-list AllowIPv6Prefix description allows engineering IPv6 networks" # - "ipv6 prefix-list AllowIPv6Prefix seq 8 permit 2001:db8:400::/38" # - "ipv6 prefix-list AllowIPv6Prefix seq 20 permit 2001:db8:8000::/35 le 37" # - "ip prefix-list AllowPrefix description allows engineering IPv4 networks" # - "ip prefix-list AllowPrefix seq 10 permit 192.0.2.0/23 eq 24" # - "ip prefix-list AllowPrefix seq 20 permit 198.51.100.128/26" # - "ip prefix-list DenyPrefix description denies lab IPv4 networks" # - "ip prefix-list DenyPrefix seq 20 deny 203.0.113.0/24 le 25" # # after: # - afi: ipv4 # prefix_lists: # - description: allows engineering IPv4 networks # entries: # - sequence: 10 # action: permit # prefix: 192.0.2.0/23 # eq: 24 # - sequence: 20 # action: permit # prefix: 198.51.100.128/26 # name: AllowPrefix # - description: denies lab IPv4 networks # entries: # - sequence: 20 # action: deny # prefix: 203.0.113.0/24 # le: 25 # name: DenyPrefix # # - afi: ipv6 # prefix_lists: # - description: allows engineering IPv6 networks # entries: # - sequence: 8 # action: permit # prefix: "2001:db8:400::/38" # - sequence: 20 # action: permit # prefix: "2001:db8:8000::/35" # le: 37 # name: AllowIPv6Prefix # After state: # ------------ # nxos-9k-rdo# show running-config | section 'ip(.*) prefix-list' # ip prefix-list AllowPrefix description allows engineering IPv4 networks # ip prefix-list AllowPrefix seq 10 permit 192.0.2.0/23 eq 24 # ip prefix-list AllowPrefix seq 20 permit 198.51.100.128/26 # ip prefix-list DenyPrefix description denies lab IPv4 networks # ip prefix-list DenyPrefix seq 20 deny 203.0.113.0/24 le 25 # ipv6 prefix-list AllowIPv6Prefix description allows engineering IPv6 networks # ipv6 prefix-list AllowIPv6Prefix seq 8 permit 2001:db8:400::/38 # ipv6 prefix-list AllowIPv6Prefix seq 20 permit 2001:db8:8000::/35 le 37 # Using replaced # Before state: # ------------ # nxos-9k-rdo# show running-config | section 'ip(.*) prefix-list' # ip prefix-list AllowPrefix description allows engineering IPv4 networks # ip prefix-list AllowPrefix seq 10 permit 192.0.2.0/23 eq 24 # ip prefix-list AllowPrefix seq 20 permit 198.51.100.128/26 # ip prefix-list DenyPrefix description denies lab IPv4 networks # ip prefix-list DenyPrefix seq 20 deny 203.0.113.0/24 le 25 # ipv6 prefix-list AllowIPv6Prefix description allows engineering IPv6 networks # ipv6 prefix-list AllowIPv6Prefix seq 8 permit 2001:db8:400::/38 # ipv6 prefix-list AllowIPv6Prefix seq 20 permit 2001:db8:8000::/35 le 37 - name: Replace prefix-lists configurations of listed prefix-lists with provided configurations cisco.nxos.nxos_prefix_lists: config: - afi: ipv4 prefix_lists: - name: AllowPrefix description: allows engineering IPv4 networks entries: - sequence: 10 action: permit prefix: 203.0.113.64/27 - sequence: 30 action: permit prefix: 203.0.113.96/27 - name: AllowPrefix2Stub description: allow other engineering IPv4 network state: replaced # Task output # ------------- # before: # - afi: ipv4 # prefix_lists: # - description: allows engineering IPv4 networks # entries: # - sequence: 10 # action: permit # prefix: 192.0.2.0/23 # eq: 24 # - sequence: 20 # action: permit # prefix: 198.51.100.128/26 # name: AllowPrefix # - description: denies lab IPv4 networks # entries: # - sequence: 20 # action: deny # prefix: 203.0.113.0/24 # le: 25 # name: DenyPrefix # # - afi: ipv6 # prefix_lists: # - description: allows engineering IPv6 networks # entries: # - sequence: 8 # action: permit # prefix: "2001:db8:400::/38" # - sequence: 20 # action: permit # prefix: "2001:db8:8000::/35" # le: 37 # name: AllowIPv6Prefix # # commands: # - "no ip prefix-list AllowPrefix seq 10 permit 192.0.2.0/23 eq 24" # - "ip prefix-list AllowPrefix seq 10 permit 203.0.113.64/27" # - "ip prefix-list AllowPrefix seq 30 permit 203.0.113.96/27" # - "no ip prefix-list AllowPrefix seq 20 permit 198.51.100.128/26" # - "ip prefix-list AllowPrefix2Stub description allow other engineering IPv4 network" # # after: # - afi: ipv4 # prefix_lists: # - description: allows engineering IPv4 networks # entries: # - sequence: 10 # action: permit # prefix: 203.0.113.64/27 # - sequence: 30 # action: permit # prefix: 203.0.113.96/27 # name: AllowPrefix # - description: allow other engineering IPv4 network # name: AllowPrefix2Stub # - description: denies lab IPv4 networks # entries: # - sequence: 20 # action: deny # prefix: 203.0.113.0/24 # le: 25 # name: DenyPrefix # # - afi: ipv6 # prefix_lists: # - description: allows engineering IPv6 networks # entries: # - sequence: 8 # action: permit # prefix: "2001:db8:400::/38" # - sequence: 20 # action: permit # prefix: "2001:db8:8000::/35" # le: 37 # name: AllowIPv6Prefix # # After state: # ------------ # nxos-9k-rdo# show running-config | section 'ip(.*) prefix-list' # ip prefix-list AllowPrefix description allows engineering IPv4 networks # ip prefix-list AllowPrefix seq 10 permit 203.0.113.64/27 # ip prefix-list AllowPrefix seq 30 permit 203.0.113.96/27 # ip prefix-list AllowPrefix2Stub description allow other engineering IPv4 network # ip prefix-list DenyPrefix description denies lab IPv4 networks # ip prefix-list DenyPrefix seq 20 deny 203.0.113.0/24 le 25 # ipv6 prefix-list AllowIPv6Prefix description allows engineering IPv6 networks # ipv6 prefix-list AllowIPv6Prefix seq 8 permit 2001:db8:400::/38 # ipv6 prefix-list AllowIPv6Prefix seq 20 permit 2001:db8:8000::/35 le 37 # Using overridden # Before state: # ------------ # nxos-9k-rdo# show running-config | section 'ip(.*) prefix-list' # ip prefix-list AllowPrefix description allows engineering IPv4 networks # ip prefix-list AllowPrefix seq 10 permit 192.0.2.0/23 eq 24 # ip prefix-list AllowPrefix seq 20 permit 198.51.100.128/26 # ip prefix-list DenyPrefix description denies lab IPv4 networks # ip prefix-list DenyPrefix seq 20 deny 203.0.113.0/24 le 25 # ipv6 prefix-list AllowIPv6Prefix description allows engineering IPv6 networks # ipv6 prefix-list AllowIPv6Prefix seq 8 permit 2001:db8:400::/38 # ipv6 prefix-list AllowIPv6Prefix seq 20 permit 2001:db8:8000::/35 le 37 - name: Override all prefix-lists configuration with provided configuration cisco.nxos.nxos_prefix_lists: &id003 config: - afi: ipv4 prefix_lists: - name: AllowPrefix description: allows engineering IPv4 networks entries: - sequence: 10 action: permit prefix: 203.0.113.64/27 - sequence: 30 action: permit prefix: 203.0.113.96/27 - name: AllowPrefix2Stub description: allow other engineering IPv4 network state: overridden # Task output # ------------- # before: # - afi: ipv4 # prefix_lists: # - description: allows engineering IPv4 networks # entries: # - sequence: 10 # action: permit # prefix: 192.0.2.0/23 # eq: 24 # - sequence: 20 # action: permit # prefix: 198.51.100.128/26 # name: AllowPrefix # - description: denies lab IPv4 networks # entries: # - sequence: 20 # action: deny # prefix: 203.0.113.0/24 # le: 25 # name: DenyPrefix # # - afi: ipv6 # prefix_lists: # - description: allows engineering IPv6 networks # entries: # - sequence: 8 # action: permit # prefix: "2001:db8:400::/38" # - sequence: 20 # action: permit # prefix: "2001:db8:8000::/35" # le: 37 # name: AllowIPv6Prefix # # commands: # - "no ip prefix-list AllowPrefix seq 10 permit 192.0.2.0/23 eq 24" # - "ip prefix-list AllowPrefix seq 10 permit 203.0.113.64/27" # - "ip prefix-list AllowPrefix seq 30 permit 203.0.113.96/27" # - "no ip prefix-list AllowPrefix seq 20 permit 198.51.100.128/26" # - "ip prefix-list AllowPrefix2Stub description allow other engineering IPv4 network" # - "no ip prefix-list DenyPrefix" # - "no ipv6 prefix-list AllowIPv6Prefix" # # after: # - afi: ipv4 # prefix_lists: # - name: AllowPrefix # description: allows engineering IPv4 networks # entries: # - sequence: 10 # action: permit # prefix: 203.0.113.64/27 # # - sequence: 30 # action: permit # prefix: 203.0.113.96/27 # - name: AllowPrefix2Stub # description: allow other engineering IPv4 network # # After state: # ------------ # nxos-9k-rdo# show running-config | section 'ip(.*) prefix-list' # ip prefix-list AllowPrefix description allows engineering IPv4 networks # ip prefix-list AllowPrefix seq 10 permit 203.0.113.64/27 # ip prefix-list AllowPrefix seq 30 permit 203.0.113.96/27 # ip prefix-list AllowPrefix2Stub description allow other engineering IPv4 network # Using deleted to delete a all prefix lists for an AFI # Before state: # ------------ # nxos-9k-rdo# show running-config | section 'ip(.*) prefix-list' # ip prefix-list AllowPrefix description allows engineering IPv4 networks # ip prefix-list AllowPrefix seq 10 permit 192.0.2.0/23 eq 24 # ip prefix-list AllowPrefix seq 20 permit 198.51.100.128/26 # ip prefix-list DenyPrefix description denies lab IPv4 networks # ip prefix-list DenyPrefix seq 20 deny 203.0.113.0/24 le 25 # ipv6 prefix-list AllowIPv6Prefix description allows engineering IPv6 networks # ipv6 prefix-list AllowIPv6Prefix seq 8 permit 2001:db8:400::/38 # ipv6 prefix-list AllowIPv6Prefix seq 20 permit 2001:db8:8000::/35 le 37 - name: Delete all prefix-lists for an AFI cisco.nxos.nxos_prefix_lists: config: - afi: ipv4 state: deleted register: result # Task output # ------------- # before: # - afi: ipv4 # prefix_lists: # - description: allows engineering IPv4 networks # entries: # - sequence: 10 # action: permit # prefix: 192.0.2.0/23 # eq: 24 # - sequence: 20 # action: permit # prefix: 198.51.100.128/26 # name: AllowPrefix # - description: denies lab IPv4 networks # entries: # - sequence: 20 # action: deny # prefix: 203.0.113.0/24 # le: 25 # name: DenyPrefix # # - afi: ipv6 # prefix_lists: # - description: allows engineering IPv6 networks # entries: # - sequence: 8 # action: permit # prefix: "2001:db8:400::/38" # - sequence: 20 # action: permit # prefix: "2001:db8:8000::/35" # le: 37 # name: AllowIPv6Prefix # # commands: # - "no ip prefix-list AllowPrefix" # - "no ip prefix-list DenyPrefix" # # after: # - afi: ipv6 # prefix_lists: # - description: allows engineering IPv6 networks # entries: # - sequence: 8 # action: permit # prefix: "2001:db8:400::/38" # - sequence: 20 # action: permit # prefix: "2001:db8:8000::/35" # le: 37 # name: AllowIPv6Prefix # # After state: # ------------ # nxos-9k-rdo# show running-config | section 'ip(.*) prefix-list' # ipv6 prefix-list AllowIPv6Prefix description allows engineering IPv6 networks # ipv6 prefix-list AllowIPv6Prefix seq 8 permit 2001:db8:400::/38 # ipv6 prefix-list AllowIPv6Prefix seq 20 permit 2001:db8:8000::/35 le 37 # Using deleted to delete a single prefix-list # Before state: # ------------ # nxos-9k-rdo# show running-config | section 'ip(.*) prefix-list' # ip prefix-list AllowPrefix description allows engineering IPv4 networks # ip prefix-list AllowPrefix seq 10 permit 192.0.2.0/23 eq 24 # ip prefix-list AllowPrefix seq 20 permit 198.51.100.128/26 # ip prefix-list DenyPrefix description denies lab IPv4 networks # ip prefix-list DenyPrefix seq 20 deny 203.0.113.0/24 le 25 # ipv6 prefix-list AllowIPv6Prefix description allows engineering IPv6 networks # ipv6 prefix-list AllowIPv6Prefix seq 8 permit 2001:db8:400::/38 # ipv6 prefix-list AllowIPv6Prefix seq 20 permit 2001:db8:8000::/35 le 37 - name: Delete a single prefix-list cisco.nxos.nxos_prefix_lists: config: - afi: ipv4 prefix_lists: - name: AllowPrefix state: deleted # Task output # ------------- # before: # - afi: ipv4 # prefix_lists: # - description: allows engineering IPv4 networks # entries: # - sequence: 10 # action: permit # prefix: 192.0.2.0/23 # eq: 24 # - sequence: 20 # action: permit # prefix: 198.51.100.128/26 # name: AllowPrefix # - description: denies lab IPv4 networks # entries: # - sequence: 20 # action: deny # prefix: 203.0.113.0/24 # le: 25 # name: DenyPrefix # # - afi: ipv6 # prefix_lists: # - description: allows engineering IPv6 networks # entries: # - sequence: 8 # action: permit # prefix: "2001:db8:400::/38" # - sequence: 20 # action: permit # prefix: "2001:db8:8000::/35" # le: 37 # name: AllowIPv6Prefix # # commands: # - "no ip prefix-list AllowPrefix" # # after: # - afi: ipv4 # prefix_lists: # - description: denies lab IPv4 networks # entries: # - sequence: 20 # action: deny # prefix: 203.0.113.0/24 # le: 25 # name: DenyPrefix # # - afi: ipv6 # prefix_lists: # - description: allows engineering IPv6 networks # entries: # - sequence: 8 # action: permit # prefix: "2001:db8:400::/38" # - sequence: 20 # action: permit # prefix: "2001:db8:8000::/35" # le: 37 # name: AllowIPv6Prefix # # After state: # ------------ # nxos-9k-rdo# show running-config | section 'ip(.*) prefix-list' # ip prefix-list DenyPrefix description denies lab IPv4 networks # ip prefix-list DenyPrefix seq 20 deny 203.0.113.0/24 le 25 # ipv6 prefix-list AllowIPv6Prefix description allows engineering IPv6 networks # ipv6 prefix-list AllowIPv6Prefix seq 8 permit 2001:db8:400::/38 # ipv6 prefix-list AllowIPv6Prefix seq 20 permit 2001:db8:8000::/35 le 37 # Using deleted to delete all prefix-lists from the device # Before state: # ------------ # nxos-9k-rdo# show running-config | section 'ip(.*) prefix-list' # ip prefix-list AllowPrefix description allows engineering IPv4 networks # ip prefix-list AllowPrefix seq 10 permit 192.0.2.0/23 eq 24 # ip prefix-list AllowPrefix seq 20 permit 198.51.100.128/26 # ip prefix-list DenyPrefix description denies lab IPv4 networks # ip prefix-list DenyPrefix seq 20 deny 203.0.113.0/24 le 25 # ipv6 prefix-list AllowIPv6Prefix description allows engineering IPv6 networks # ipv6 prefix-list AllowIPv6Prefix seq 8 permit 2001:db8:400::/38 # ipv6 prefix-list AllowIPv6Prefix seq 20 permit 2001:db8:8000::/35 le 37 - name: Delete all prefix-lists cisco.nxos.nxos_prefix_lists: state: deleted # Task output # ------------- # before: # - afi: ipv4 # prefix_lists: # - description: allows engineering IPv4 networks # entries: # - sequence: 10 # action: permit # prefix: 192.0.2.0/23 # eq: 24 # - sequence: 20 # action: permit # prefix: 198.51.100.128/26 # name: AllowPrefix # - description: denies lab IPv4 networks # entries: # - sequence: 20 # action: deny # prefix: 203.0.113.0/24 # le: 25 # name: DenyPrefix # # - afi: ipv6 # prefix_lists: # - description: allows engineering IPv6 networks # entries: # - sequence: 8 # action: permit # prefix: "2001:db8:400::/38" # - sequence: 20 # action: permit # prefix: "2001:db8:8000::/35" # le: 37 # name: AllowIPv6Prefix # # commands: # - "no ip prefix-list AllowPrefix" # - "no ip prefix-list DenyPrefix" # - "no ipv6 prefix-list AllowIPv6Prefix" # # after: [] # # After state: # ------------ # nxos-9k-rdo# show running-config | section 'ip(.*) prefix-list' # nxos-9k-rdo# # Using rendered - name: Render platform specific configuration lines with state rendered (without connecting to the device) cisco.nxos.nxos_prefix_lists: &id001 config: - afi: ipv4 prefix_lists: - name: AllowPrefix description: allows engineering IPv4 networks entries: - sequence: 10 action: permit prefix: 192.0.2.0/23 eq: 24 - sequence: 20 action: permit prefix: 198.51.100.128/26 - name: DenyPrefix description: denies lab IPv4 networks entries: - sequence: 20 action: deny prefix: 203.0.113.0/24 le: 25 - afi: ipv6 prefix_lists: - name: AllowIPv6Prefix description: allows engineering IPv6 networks entries: - sequence: 8 action: permit prefix: "2001:db8:400::/38" - sequence: 20 action: permit prefix: "2001:db8:8000::/35" le: 37 state: rendered # Task Output (redacted) # ----------------------- # rendered: # - afi: ipv4 # prefix_lists: # - description: allows engineering IPv4 networks # entries: # - sequence: 10 # action: permit # prefix: 192.0.2.0/23 # eq: 24 # - sequence: 20 # action: permit # prefix: 198.51.100.128/26 # name: AllowPrefix # - description: denies lab IPv4 networks # entries: # - sequence: 20 # action: deny # prefix: 203.0.113.0/24 # le: 25 # name: DenyPrefix # # - afi: ipv6 # prefix_lists: # - description: allows engineering IPv6 networks # entries: # - sequence: 8 # action: permit # prefix: "2001:db8:400::/38" # - sequence: 20 # action: permit # prefix: "2001:db8:8000::/35" # le: 37 # name: AllowIPv6Prefix # Using parsed # parsed.cfg # ------------ # ip prefix-list AllowPrefix description allows engineering IPv4 networks # ip prefix-list AllowPrefix seq 10 permit 192.0.2.0/23 eq 24 # ip prefix-list AllowPrefix seq 20 permit 198.51.100.128/26 # ip prefix-list DenyPrefix description denies lab IPv4 networks # ip prefix-list DenyPrefix seq 20 deny 203.0.113.0/24 le 25 # ipv6 prefix-list AllowIPv6Prefix description allows engineering IPv6 networks # ipv6 prefix-list AllowIPv6Prefix seq 8 permit 2001:db8:400::/38 # ipv6 prefix-list AllowIPv6Prefix seq 20 permit 2001:db8:8000::/35 le 37 - name: Parse externally provided prefix-lists configuration register: result cisco.nxos.nxos_prefix_lists: running_config: "{{ lookup('file', './parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # - afi: ipv4 # prefix_lists: # - description: allows engineering IPv4 networks # entries: # - sequence: 10 # action: permit # prefix: 192.0.2.0/23 # eq: 24 # - sequence: 20 # action: permit # prefix: 198.51.100.128/26 # name: AllowPrefix # - description: denies lab IPv4 networks # entries: # - sequence: 20 # action: deny # prefix: 203.0.113.0/24 # le: 25 # name: DenyPrefix # # - afi: ipv6 # prefix_lists: # - description: allows engineering IPv6 networks # entries: # - sequence: 8 # action: permit # prefix: "2001:db8:400::/38" # - sequence: 20 # action: permit # prefix: "2001:db8:8000::/35" # le: 37 # name: AllowIPv6Prefix ``` ### Authors * Nilashish Chakraborty (@NilashishC)
programming_docs
ansible cisco.nxos.nxos_interface_ospf – (deprecated, removed after 2022-10-26) Manages configuration of an OSPF interface instance. cisco.nxos.nxos\_interface\_ospf – (deprecated, removed after 2022-10-26) Manages configuration of an OSPF interface instance. ============================================================================================================================== 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_interface_ospf`. New in version 1.0.0: of cisco.nxos * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in major release after 2022-10-26 Why Updated modules released with more functionality Alternative nxos\_ospf\_interfaces Synopsis -------- * Manages configuration of an OSPF interface instance. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **area** string / required | | Ospf area associated with this cisco\_interface\_ospf instance. Valid values are a string, formatted as an IP address (i.e. "0.0.0.0") or as an integer. | | **bfd** string | **Choices:*** enable * disable * default | Enables bfd at interface level. This overrides the bfd variable set at the ospf router level. Valid values are 'enable', 'disable' or 'default'. Dependency: ''feature bfd'' | | **cost** string | | The cost associated with this cisco\_interface\_ospf instance. | | **dead\_interval** string | | Time interval an ospf neighbor waits for a hello packet before tearing down adjacencies. Valid values are an integer or the keyword 'default'. | | **hello\_interval** string | | Time between sending successive hello packets. Valid values are an integer or the keyword 'default'. | | **interface** string / required | | Name of this cisco\_interface resource. Valid value is a string. | | **message\_digest** boolean | **Choices:*** no * yes | Enables or disables the usage of message digest authentication. | | **message\_digest\_algorithm\_type** string | **Choices:*** md5 * default | Algorithm used for authentication among neighboring routers within an area. Valid values are 'md5' and 'default'. | | **message\_digest\_encryption\_type** string | **Choices:*** cisco\_type\_7 * 3des * default | Specifies the scheme used for encrypting message\_digest\_password. Valid values are '3des' or 'cisco\_type\_7' encryption or 'default'. | | **message\_digest\_key\_id** string | | Md5 authentication key-id associated with the ospf instance. If this is present, message\_digest\_encryption\_type, message\_digest\_algorithm\_type and message\_digest\_password are mandatory. Valid value is an integer and 'default'. | | **message\_digest\_password** string | | Specifies the message\_digest password. Valid value is a string. | | **network** string | **Choices:*** point-to-point * broadcast | Specifies interface ospf network type. Valid values are 'point-to-point' or 'broadcast'. | | **ospf** string / required | | Name of the ospf instance. | | **passive\_interface** boolean | **Choices:*** no * yes | Enable or disable passive-interface state on this interface. true - (enable) Prevent OSPF from establishing an adjacency or sending routing updates on this interface. false - (disable) Override global 'passive-interface default' for this interface. | | **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. | | **state** string | **Choices:*** **present** ← * absent | Determines whether the config should be present or not on the device. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * Default, where supported, restores params default value. * To remove an existing authentication configuration you should use `message_digest_key_id=default` plus all other options matching their existing values. * Loopback interfaces only support ospf network type β€˜point-to-point’. * `state=absent` removes the whole OSPF interface configuration. * 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 -------- ``` - cisco.nxos.nxos_interface_ospf: interface: ethernet1/32 ospf: 1 area: 1 bfd: disable cost: default - cisco.nxos.nxos_interface_ospf: interface: loopback0 ospf: prod area: 0.0.0.0 bfd: enable network: point-to-point 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 | commands sent to the device **Sample:** ['interface Ethernet1/32', 'ip router ospf 1 area 0.0.0.1', 'ip ospf bfd disable'] | Status ------ * This module will be removed in a major release after 2022-10-26. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_bgp_neighbor_af – (deprecated, removed after 2023-02-24) Manages BGP address-family’s neighbors configuration. cisco.nxos.nxos\_bgp\_neighbor\_af – (deprecated, removed after 2023-02-24) Manages BGP address-family’s neighbors configuration. ================================================================================================================================= 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_bgp_neighbor_af`. New in version 1.0.0: of cisco.nxos * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in major release after 2023-02-24 Why Updated module released with more functionality. Alternative nxos\_bgp\_neighbor\_address\_family Synopsis -------- * Manages BGP address-family’s neighbors configurations on NX-OS switches. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **additional\_paths\_receive** string | **Choices:*** enable * disable * inherit | Valid values are enable for basic command enablement; disable for disabling the command at the neighbor af level (it adds the disable keyword to the basic command); and inherit to remove the command at this level (the command value is inherited from a higher BGP layer). | | **additional\_paths\_send** string | **Choices:*** enable * disable * inherit | Valid values are enable for basic command enablement; disable for disabling the command at the neighbor af level (it adds the disable keyword to the basic command); and inherit to remove the command at this level (the command value is inherited from a higher BGP layer). | | **advertise\_map\_exist** list / elements=string | | Conditional route advertisement. This property requires two route maps, an advertise-map and an exist-map. Valid values are an array specifying both the advertise-map name and the exist-map name, or simply 'default' e.g. ['my\_advertise\_map', 'my\_exist\_map']. This command is mutually exclusive with the advertise\_map\_non\_exist property. | | **advertise\_map\_non\_exist** list / elements=string | | Conditional route advertisement. This property requires two route maps, an advertise-map and an exist-map. Valid values are an array specifying both the advertise-map name and the non-exist-map name, or simply 'default' e.g. ['my\_advertise\_map', 'my\_non\_exist\_map']. This command is mutually exclusive with the advertise\_map\_exist property. | | **afi** string / required | **Choices:*** ipv4 * ipv6 * vpnv4 * vpnv6 * l2vpn | Address Family Identifier. | | **allowas\_in** boolean | **Choices:*** no * yes | Activate allowas-in property | | **allowas\_in\_max** string | | Max-occurrences value for allowas\_in. Valid values are an integer value or 'default'. This is mutually exclusive with allowas\_in. | | **as\_override** boolean | **Choices:*** no * yes | Activate the as-override feature. | | **asn** string / required | | BGP autonomous system number. Valid values are String, Integer in ASPLAIN or ASDOT notation. | | **default\_originate** boolean | **Choices:*** no * yes | Activate the default-originate feature. | | **default\_originate\_route\_map** string | | Route-map for the default\_originate property. Valid values are a string defining a route-map name, or 'default'. This is mutually exclusive with default\_originate. | | **disable\_peer\_as\_check** boolean | **Choices:*** no * yes | Disable checking of peer AS-number while advertising | | **filter\_list\_in** string | | Valid values are a string defining a filter-list name, or 'default'. | | **filter\_list\_out** string | | Valid values are a string defining a filter-list name, or 'default'. | | **max\_prefix\_interval** string | | Optional restart interval. Valid values are an integer. Requires max\_prefix\_limit. May not be combined with max\_prefix\_warning. | | **max\_prefix\_limit** string | | maximum-prefix limit value. Valid values are an integer value or 'default'. | | **max\_prefix\_threshold** string | | Optional threshold percentage at which to generate a warning. Valid values are an integer value. Requires max\_prefix\_limit. | | **max\_prefix\_warning** boolean | **Choices:*** no * yes | Optional warning-only keyword. Requires max\_prefix\_limit. May not be combined with max\_prefix\_interval. | | **neighbor** string / required | | Neighbor Identifier. Valid values are string. Neighbors may use IPv4 or IPv6 notation, with or without prefix length. | | **next\_hop\_self** boolean | **Choices:*** no * yes | Activate the next-hop-self feature. | | **next\_hop\_third\_party** boolean | **Choices:*** no * yes | Activate the next-hop-third-party feature. | | **prefix\_list\_in** string | | Valid values are a string defining a prefix-list name, or 'default'. | | **prefix\_list\_out** string | | Valid values are a string defining a prefix-list name, or 'default'. | | **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. | | **rewrite\_evpn\_rt\_asn** boolean added in 1.1.0 of cisco.nxos | **Choices:*** no * yes | Auto generate route targets for EBGP neighbor. | | **route\_map\_in** string | | Valid values are a string defining a route-map name, or 'default'. | | **route\_map\_out** string | | Valid values are a string defining a route-map name, or 'default'. | | **route\_reflector\_client** boolean | **Choices:*** no * yes | Router reflector client. | | **safi** string / required | **Choices:*** unicast * multicast * evpn | Sub Address Family Identifier. | | **send\_community** string | **Choices:*** none * both * extended * standard * default | send-community attribute. | | **soft\_reconfiguration\_in** string | **Choices:*** enable * always * inherit | Valid values are 'enable' for basic command enablement; 'always' to add the always keyword to the basic command; and 'inherit' to remove the command at this level (the command value is inherited from a higher BGP layer). | | **soo** string | | Site-of-origin. Valid values are a string defining a VPN extcommunity or 'default'. | | **state** string | **Choices:*** **present** ← * absent | Determines whether the config should be present or not on the device. | | **suppress\_inactive** boolean | **Choices:*** no * yes | suppress-inactive feature. | | **unsuppress\_map** string | | unsuppress-map. Valid values are a string defining a route-map name or 'default'. | | **vrf** string | **Default:**"default" | Name of the VRF. The name 'default' is a valid VRF representing the global bgp. | | **weight** string | | Weight value. Valid values are an integer value or 'default'. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * `state=absent` removes the whole BGP address-family’s neighbor configuration. * Default, when supported, removes properties * In order to default maximum-prefix configuration, only `max_prefix_limit=default` is needed. * 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: configure RR client cisco.nxos.nxos_bgp_neighbor_af: asn: 65535 neighbor: 192.0.2.3 afi: ipv4 safi: unicast route_reflector_client: true state: present rewrite_evpn_rt_asn: 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 | | --- | --- | --- | | **commands** list / elements=string | always | commands sent to the device **Sample:** ['router bgp 65535', 'neighbor 192.0.2.3', 'address-family ipv4 unicast', 'route-reflector-client', 'rewrite-evpn-rt-asn'] | Status ------ * This module will be removed in a major release after 2023-02-24. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Gabriele Gerbino (@GGabriele)
programming_docs
ansible cisco.nxos.nxos_acls – ACLs resource module cisco.nxos.nxos\_acls – ACLs resource module ============================================ 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_acls`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage named IP ACLs on the Cisco NX-OS platform Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A dictionary of ACL options. | | | **acls** list / elements=dictionary | | A list of the ACLs. | | | | **aces** list / elements=dictionary | | The entries within the ACL. | | | | | **destination** dictionary | | Specify the packet destination. | | | | | | **address** string | | Destination network address. | | | | | | **any** boolean | **Choices:*** no * yes | Any destination address. | | | | | | **host** string | | Host IP address. | | | | | | **port\_protocol** dictionary | | Specify the destination port or protocol (only for TCP and UDP). | | | | | | | **eq** string | | Match only packets on a given port number. | | | | | | | **gt** string | | Match only packets with a greater port number. | | | | | | | **lt** string | | Match only packets with a lower port number. | | | | | | | **neq** string | | Match only packets not on a given port number. | | | | | | | **range** dictionary | | Match only packets in the range of port numbers. | | | | | | | | **end** string | | Specify the end of the port range. | | | | | | | | **start** string | | Specify the start of the port range. | | | | | | **prefix** string | | Destination network prefix. Only for prefixes of value less than 31 for ipv4 and 127 for ipv6. Prefixes of 32 (ipv4) and 128 (ipv6) should be given in the 'host' key. | | | | | | **wildcard\_bits** string | | Destination wildcard bits. | | | | | **dscp** string | | Match packets with given DSCP value. | | | | | **fragments** boolean | **Choices:*** no * yes | Check non-initial fragments. | | | | | **grant** string | **Choices:*** permit * deny | Action to be applied on the rule. | | | | | **log** boolean | **Choices:*** no * yes | Log matches against this entry. | | | | | **precedence** string | | Match packets with given precedence value. | | | | | **protocol** string | | Specify the protocol. | | | | | **protocol\_options** dictionary | | All possible suboptions for the protocol chosen. | | | | | | **icmp** dictionary | | ICMP protocol options. | | | | | | | **administratively\_prohibited** boolean | **Choices:*** no * yes | Administratively prohibited | | | | | | | **alternate\_address** boolean | **Choices:*** no * yes | Alternate address | | | | | | | **conversion\_error** boolean | **Choices:*** no * yes | Datagram conversion | | | | | | | **dod\_host\_prohibited** boolean | **Choices:*** no * yes | Host prohibited | | | | | | | **dod\_net\_prohibited** boolean | **Choices:*** no * yes | Net prohibited | | | | | | | **echo** boolean | **Choices:*** no * yes | Echo (ping) | | | | | | | **echo\_reply** boolean | **Choices:*** no * yes | Echo reply | | | | | | | **echo\_request** boolean | **Choices:*** no * yes | Echo request (ping) | | | | | | | **general\_parameter\_problem** boolean | **Choices:*** no * yes | Parameter problem | | | | | | | **host\_isolated** boolean | **Choices:*** no * yes | Host isolated | | | | | | | **host\_precedence\_unreachable** boolean | **Choices:*** no * yes | Host unreachable for precedence | | | | | | | **host\_redirect** boolean | **Choices:*** no * yes | Host redirect | | | | | | | **host\_tos\_redirect** boolean | **Choices:*** no * yes | Host redirect for TOS | | | | | | | **host\_tos\_unreachable** boolean | **Choices:*** no * yes | Host unreachable for TOS | | | | | | | **host\_unknown** boolean | **Choices:*** no * yes | Host unknown | | | | | | | **host\_unreachable** boolean | **Choices:*** no * yes | Host unreachable | | | | | | | **information\_reply** boolean | **Choices:*** no * yes | Information replies | | | | | | | **information\_request** boolean | **Choices:*** no * yes | Information requests | | | | | | | **mask\_reply** boolean | **Choices:*** no * yes | Mask replies | | | | | | | **mask\_request** boolean | **Choices:*** no * yes | Mask requests | | | | | | | **message\_code** integer | | ICMP message code | | | | | | | **message\_type** integer | | ICMP message type | | | | | | | **mobile\_redirect** boolean | **Choices:*** no * yes | Mobile host redirect | | | | | | | **net\_redirect** boolean | **Choices:*** no * yes | Network redirect | | | | | | | **net\_tos\_redirect** boolean | **Choices:*** no * yes | Net redirect for TOS | | | | | | | **net\_tos\_unreachable** boolean | **Choices:*** no * yes | Network unreachable for TOS | | | | | | | **net\_unreachable** boolean | **Choices:*** no * yes | Net unreachable | | | | | | | **network\_unknown** boolean | **Choices:*** no * yes | Network unknown | | | | | | | **no\_room\_for\_option** boolean | **Choices:*** no * yes | Parameter required but no room | | | | | | | **option\_missing** boolean | **Choices:*** no * yes | Parameter required but not present | | | | | | | **packet\_too\_big** boolean | **Choices:*** no * yes | Fragmentation needed and DF set | | | | | | | **parameter\_problem** boolean | **Choices:*** no * yes | All parameter problems | | | | | | | **port\_unreachable** boolean | **Choices:*** no * yes | Port unreachable | | | | | | | **precedence\_unreachable** boolean | **Choices:*** no * yes | Precedence cutoff | | | | | | | **protocol\_unreachable** boolean | **Choices:*** no * yes | Protocol unreachable | | | | | | | **reassembly\_timeout** boolean | **Choices:*** no * yes | Reassembly timeout | | | | | | | **redirect** boolean | **Choices:*** no * yes | All redirects | | | | | | | **router\_advertisement** boolean | **Choices:*** no * yes | Router discovery advertisements | | | | | | | **router\_solicitation** boolean | **Choices:*** no * yes | Router discovery solicitations | | | | | | | **source\_quench** boolean | **Choices:*** no * yes | Source quenches | | | | | | | **source\_route\_failed** boolean | **Choices:*** no * yes | Source route failed | | | | | | | **time\_exceeded** boolean | **Choices:*** no * yes | All time exceeded. | | | | | | | **timestamp\_reply** boolean | **Choices:*** no * yes | Timestamp replies | | | | | | | **timestamp\_request** boolean | **Choices:*** no * yes | Timestamp requests | | | | | | | **traceroute** boolean | **Choices:*** no * yes | Traceroute | | | | | | | **ttl\_exceeded** boolean | **Choices:*** no * yes | TTL exceeded | | | | | | | **unreachable** boolean | **Choices:*** no * yes | All unreachables | | | | | | **igmp** dictionary | | IGMP protocol options. | | | | | | | **dvmrp** boolean | **Choices:*** no * yes | Distance Vector Multicast Routing Protocol | | | | | | | **host\_query** boolean | **Choices:*** no * yes | Host Query | | | | | | | **host\_report** boolean | **Choices:*** no * yes | Host Report | | | | | | **tcp** dictionary | | TCP flags. | | | | | | | **ack** boolean | **Choices:*** no * yes | Match on the ACK bit | | | | | | | **established** boolean | **Choices:*** no * yes | Match established connections | | | | | | | **fin** boolean | **Choices:*** no * yes | Match on the FIN bit | | | | | | | **psh** boolean | **Choices:*** no * yes | Match on the PSH bit | | | | | | | **rst** boolean | **Choices:*** no * yes | Match on the RST bit | | | | | | | **syn** boolean | **Choices:*** no * yes | Match on the SYN bit | | | | | | | **urg** boolean | **Choices:*** no * yes | Match on the URG bit | | | | | **remark** string | | Access list entry comment. | | | | | **sequence** integer | | Sequence number. | | | | | **source** dictionary | | Specify the packet source. | | | | | | **address** string | | Source network address. | | | | | | **any** boolean | **Choices:*** no * yes | Any source address. | | | | | | **host** string | | Host IP address. | | | | | | **port\_protocol** dictionary | | Specify the destination port or protocol (only for TCP and UDP). | | | | | | | **eq** string | | Match only packets on a given port number. | | | | | | | **gt** string | | Match only packets with a greater port number. | | | | | | | **lt** string | | Match only packets with a lower port number. | | | | | | | **neq** string | | Match only packets not on a given port number. | | | | | | | **range** dictionary | | Match only packets in the range of port numbers. | | | | | | | | **end** string | | Specify the end of the port range. | | | | | | | | **start** string | | Specify the start of the port range. | | | | | | **prefix** string | | Source network prefix. Only for prefixes of mask value less than 31 for ipv4 and 127 for ipv6. Prefixes of mask 32 (ipv4) and 128 (ipv6) should be given in the 'host' key. | | | | | | **wildcard\_bits** string | | Source wildcard bits. | | | | **name** string / required | | Name of the ACL. | | | **afi** string / required | **Choices:*** ipv4 * ipv6 | The Address Family Indicator (AFI) for the ACL. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the command **show running-config | section 'ip(v6**\* access-list). 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:*** deleted * gathered * **merged** ← * overridden * rendered * replaced * parsed | The state the configuration should be left in | Notes ----- Note * Tested against NX-OS 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * As NX-OS allows configuring a rule again with different sequence numbers, the user is expected to provide sequence numbers for the access control entries to preserve idempotency. If no sequence number is given, the rule will be added as a new rule by the device. Examples -------- ``` # Using merged # Before state: # ------------- # - name: Merge new ACLs configuration cisco.nxos.nxos_acls: config: - afi: ipv4 acls: - name: ACL1v4 aces: - grant: deny destination: address: 192.0.2.64 wildcard_bits: 0.0.0.255 source: any: true port_protocol: lt: 55 protocol: tcp protocol_options: tcp: ack: true fin: true sequence: 50 - afi: ipv6 acls: - name: ACL1v6 aces: - grant: permit sequence: 10 source: any: true destination: prefix: 2001:db8:12::/32 protocol: sctp state: merged # After state: # ------------ # # ip access-list ACL1v4 # 50 deny tcp any lt 55 192.0.2.64 0.0.0.255 ack fin # ipv6 access-list ACL1v6 # 10 permit sctp any any # Using replaced # Before state: # ---------------- # # ip access-list ACL1v4 # 10 permit ip any any # 20 deny udp any any # ip access-list ACL2v4 # 10 permit ahp 192.0.2.0 0.0.0.255 any # ip access-list ACL1v6 # 10 permit sctp any any # 20 remark IPv6 ACL # ip access-list ACL2v6 # 10 deny ipv6 any 2001:db8:3000::/36 # 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128 - name: Replace existing ACL configuration with provided configuration cisco.nxos.nxos_acls: config: - afi: ipv4 - afi: ipv6 acls: - name: ACL1v6 aces: - sequence: 20 grant: permit source: any: true destination: any: true protocol: pip - remark: Replaced ACE - name: ACL2v6 state: replaced # After state: # --------------- # # ipv6 access-list ACL1v6 # 20 permit pip any any # 30 remark Replaced ACE # ipv6 access-list ACL2v6 # Using overridden # Before state: # ---------------- # # ip access-list ACL1v4 # 10 permit ip any any # 20 deny udp any any # ip access-list ACL2v4 # 10 permit ahp 192.0.2.0 0.0.0.255 any # ip access-list ACL1v6 # 10 permit sctp any any # 20 remark IPv6 ACL # ip access-list ACL2v6 # 10 deny ipv6 any 2001:db8:3000::/36 # 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128 - name: Override existing configuration with provided configuration cisco.nxos.nxos_acls: config: - afi: ipv4 acls: - name: NewACL aces: - grant: deny source: address: 192.0.2.0 wildcard_bits: 0.0.255.255 destination: any: true protocol: eigrp - remark: Example for overridden state state: overridden # After state: # ------------ # # ip access-list NewACL # 10 deny eigrp 192.0.2.0 0.0.255.255 any # 20 remark Example for overridden state # Using deleted: # # Before state: # ------------- # # ip access-list ACL1v4 # 10 permit ip any any # 20 deny udp any any # ip access-list ACL2v4 # 10 permit ahp 192.0.2.0 0.0.0.255 any # ip access-list ACL1v6 # 10 permit sctp any any # 20 remark IPv6 ACL # ip access-list ACL2v6 # 10 deny ipv6 any 2001:db8:3000::/36 # 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128 - name: Delete all ACLs cisco.nxos.nxos_acls: config: state: deleted # After state: # ----------- # # Before state: # ------------- # # ip access-list ACL1v4 # 10 permit ip any any # 20 deny udp any any # ip access-list ACL2v4 # 10 permit ahp 192.0.2.0 0.0.0.255 any # ip access-list ACL1v6 # 10 permit sctp any any # 20 remark IPv6 ACL # ip access-list ACL2v6 # 10 deny ipv6 any 2001:db8:3000::/36 # 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128 - name: Delete all ACLs in given AFI cisco.nxos.nxos_acls: config: - afi: ipv4 state: deleted # After state: # ------------ # # ip access-list ACL1v6 # 10 permit sctp any any # 20 remark IPv6 ACL # ip access-list ACL2v6 # 10 deny ipv6 any 2001:db8:3000::/36 # 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128 # Before state: # ------------- # # ip access-list ACL1v4 # 10 permit ip any any # 20 deny udp any any # ip access-list ACL2v4 # 10 permit ahp 192.0.2.0 0.0.0.255 any # ipv6 access-list ACL1v6 # 10 permit sctp any any # 20 remark IPv6 ACL # ipv6 access-list ACL2v6 # 10 deny ipv6 any 2001:db8:3000::/36 # 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128 - name: Delete specific ACLs cisco.nxos.nxos_acls: config: - afi: ipv4 acls: - name: ACL1v4 - name: ACL2v4 - afi: ipv6 acls: - name: ACL1v6 state: deleted # After state: # ------------ # ipv6 access-list ACL2v6 # 10 deny ipv6 any 2001:db8:3000::/36 # 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128 # Using parsed - name: Parse given config to structured data cisco.nxos.nxos_acls: running_config: | ip access-list ACL1v4 50 deny tcp any lt 55 192.0.2.64 0.0.0.255 ack fin ipv6 access-list ACL1v6 10 permit sctp any any state: parsed # returns: # parsed: # - afi: ipv4 # acls: # - name: ACL1v4 # aces: # - grant: deny # destination: # address: 192.0.2.64 # wildcard_bits: 0.0.0.255 # source: # any: true # port_protocol: # lt: 55 # protocol: tcp # protocol_options: # tcp: # ack: true # fin: true # sequence: 50 # # - afi: ipv6 # acls: # - name: ACL1v6 # aces: # - grant: permit # sequence: 10 # source: # any: true # destination: # prefix: 2001:db8:12::/32 # protocol: sctp # Using gathered: # Before state: # ------------ # # ip access-list ACL1v4 # 50 deny tcp any lt 55 192.0.2.64 0.0.0.255 ack fin # ipv6 access-list ACL1v6 # 10 permit sctp any any - name: Gather existing configuration cisco.nxos.nxos_acls: state: gathered # returns: # gathered: # - afi: ipv4 # acls: # - name: ACL1v4 # aces: # - grant: deny # destination: # address: 192.0.2.64 # wildcard_bits: 0.0.0.255 # source: # any: true # port_protocol: # lt: 55 # protocol: tcp # protocol_options: # tcp: # ack: true # fin: true # sequence: 50 # - afi: ipv6 # acls: # - name: ACL1v6 # aces: # - grant: permit # sequence: 10 # source: # any: true # destination: # prefix: 2001:db8:12::/32 # protocol: sctp # Using rendered - name: Render required configuration to be pushed to the device cisco.nxos.nxos_acls: config: - afi: ipv4 acls: - name: ACL1v4 aces: - grant: deny destination: address: 192.0.2.64 wildcard_bits: 0.0.0.255 source: any: true port_protocol: lt: 55 protocol: tcp protocol_options: tcp: ack: true fin: true sequence: 50 - afi: ipv6 acls: - name: ACL1v6 aces: - grant: permit sequence: 10 source: any: true destination: prefix: 2001:db8:12::/32 protocol: sctp state: rendered # returns: # rendered: # ip access-list ACL1v4 # 50 deny tcp any lt 55 192.0.2.64 0.0.0.255 ack fin # ipv6 access-list ACL1v6 # 10 permit sctp any 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 | | --- | --- | --- | | **after** dictionary | when changed | The resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. | | **before** dictionary | always | The configuration prior to the model 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:** ['ip access-list ACL1v4', '10 permit ip any any precedence critical log', '20 deny tcp any lt smtp host 192.0.2.64 ack fin'] | ### Authors * Adharsh Srivats Rangarajan (@adharshsrivatsr)
programming_docs
ansible cisco.nxos.nxos_user – Manage the collection of local users on Nexus devices cisco.nxos.nxos\_user – Manage the collection of local users on Nexus 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_user`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module provides declarative management of the local usernames configured on Cisco Nexus devices. It allows playbooks to manage either individual usernames or the collection 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** list / elements=dictionary | | The set of username objects to be configured on the remote Cisco Nexus 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. aliases: users, collection | | | **configured\_password** string | | The password to be configured on the network device. The password needs to be provided in cleartext 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 Cisco Nexus device. This argument accepts a string value and is mutually exclusive with the `aggregate` argument. | | | **roles** list / elements=string | | The `role` argument 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. aliases: role | | | **sshkey** string | | The `sshkey` argument defines the SSH public key to configure for the username. This argument accepts a valid SSH key value. | | | **state** string | **Choices:*** present * absent | The `state` argument 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. | | **configured\_password** string | | The password to be configured on the network device. The password needs to be provided in cleartext 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 Cisco Nexus device. This argument accepts a string value and is mutually exclusive with the `aggregate` argument. | | **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. | | **purge** boolean | **Choices:*** **no** ← * yes | The `purge` argument 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 which cannot be deleted per nxos constraints. | | **roles** list / elements=string | | The `role` argument 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. aliases: role | | **sshkey** string | | The `sshkey` argument defines the SSH public key to configure for the username. This argument accepts a valid SSH key value. | | **state** string | **Choices:*** **present** ← * absent | The `state` argument 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 * 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: create a new user cisco.nxos.nxos_user: name: ansible sshkey: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}" state: present - name: remove all users except admin cisco.nxos.nxos_user: purge: yes - name: set multiple users role cisco.nxos.nxos_user: aggregate: - name: netop - name: netend role: network-operator 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:** ['name ansible', 'name ansible password password'] | ### Authors * Peter Sprygada (@privateip) ansible cisco.nxos.nxos_snapshot – Manage snapshots of the running states of selected features. cisco.nxos.nxos\_snapshot – Manage snapshots of the running states of selected features. ======================================================================================== 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_snapshot`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create snapshots of the running states of selected features, add new show commands for snapshot creation, delete and compare existing snapshots. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **action** string / required | **Choices:*** add * compare * create * delete * delete\_all | Define what snapshot action the module would perform. | | **compare\_option** string | **Choices:*** summary * ipv4routes * ipv6routes | Snapshot options to be used when `action=compare`. | | **comparison\_results\_file** string | | Name of the file where snapshots comparison will be stored when `action=compare`. | | **description** string | | Snapshot description to be used when `action=create`. | | **element\_key1** string | | Specify the tags used to distinguish among row entries, to be used when `action=add`. | | **element\_key2** string | | Specify the tags used to distinguish among row entries, to be used when `action=add`. | | **path** string | **Default:**"./" | Specify the path of the file where new created snapshot or snapshots comparison will be stored, to be used when `action=create` and `save_snapshot_locally=true` or `action=compare`. | | **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. | | **row\_id** string | | Specifies the tag of each row entry of the show command's XML output, to be used when `action=add`. | | **save\_snapshot\_locally** boolean | **Choices:*** **no** ← * yes | Specify to locally store a new created snapshot, to be used when `action=create`. | | **section** string | | Used to name the show command output, to be used when `action=add`. | | **show\_command** string | | Specify a new show command, to be used when `action=add`. | | **snapshot1** string | | First snapshot to be used when `action=compare`. | | **snapshot2** string | | Second snapshot to be used when `action=compare`. | | **snapshot\_name** string | | Snapshot name, to be used when `action=create` or `action=delete`. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * `transport=cli` may cause timeout errors. * The `element_key1` and `element_key2` parameter specify the tags used to distinguish among row entries. In most cases, only the element\_key1 parameter needs to specified to be able to distinguish among row entries. * `action=compare` will always store a comparison report on a local file. * 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 -------- ``` # Create a snapshot and store it locally - cisco.nxos.nxos_snapshot: action: create snapshot_name: test_snapshot description: Done with Ansible save_snapshot_locally: true path: /home/user/snapshots/ # Delete a snapshot - cisco.nxos.nxos_snapshot: action: delete snapshot_name: test_snapshot # Delete all existing snapshots - cisco.nxos.nxos_snapshot: action: delete_all # Add a show command for snapshots creation - cisco.nxos.nxos_snapshot: section: myshow show_command: show ip interface brief row_id: ROW_intf element_key1: intf-name # Compare two snapshots - cisco.nxos.nxos_snapshot: action: compare snapshot1: pre_snapshot snapshot2: post_snapshot comparison_results_file: compare_snapshots.txt compare_option: summary path: ../snapshot_reports/ ``` 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 | verbose mode | commands sent to the device **Sample:** ['snapshot create post\_snapshot Post-snapshot'] | ### Authors * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_evpn_vni – Manages Cisco EVPN VXLAN Network Identifier (VNI). cisco.nxos.nxos\_evpn\_vni – Manages Cisco EVPN VXLAN Network Identifier (VNI). =============================================================================== 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_evpn_vni`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages Cisco Ethernet Virtual Private Network (EVPN) VXLAN Network Identifier (VNI) configurations of a Nexus device. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **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. | | **route\_distinguisher** string | | The VPN Route Distinguisher (RD). The RD is combined with the IPv4 or IPv6 prefix learned by the PE router to create a globally unique address. | | **route\_target\_both** list / elements=string | | Enables/Disables route-target settings for both import and export target communities using a single property. | | **route\_target\_export** list / elements=string | | Sets the route-target 'export' extended communities. | | **route\_target\_import** list / elements=string | | Sets the route-target 'import' extended communities. | | **state** string | **Choices:*** **present** ← * absent | Determines whether the config should be present or not on the device. | | **vni** string / required | | The EVPN VXLAN Network Identifier. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * default, where supported, restores params default value. * RD override is not permitted. You should set it to the default values first and then reconfigure it. * `route_target_both`, `route_target_import` and `route_target_export valid` values are a list of extended communities, (i.e. [β€˜1.2.3.4:5’, β€˜33:55’]) or the keywords β€˜auto’ or β€˜default’. * The `route_target_both` property is discouraged due to the inconsistent behavior of the property across Nexus platforms and image versions. For this reason it is recommended to use explicit `route_target_export` and `route_target_import` properties instead of `route_target_both`. * RD valid values are a string in one of the route-distinguisher formats, the keyword β€˜auto’, or the keyword β€˜default’. * 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: vni configuration cisco.nxos.nxos_evpn_vni: vni: 6000 route_distinguisher: 60:10 route_target_import: - 5000:10 - 4100:100 route_target_export: auto route_target_both: 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 | | --- | --- | --- | | **commands** list / elements=string | always | commands sent to the device **Sample:** ['evpn', 'vni 6000 l2', 'route-target import 5001:10'] | ### Authors * Gabriele Gerbino (@GGabriele)
programming_docs
ansible cisco.nxos.nxos_gir_profile_management – Create a maintenance-mode or normal-mode profile for GIR. cisco.nxos.nxos\_gir\_profile\_management – Create a maintenance-mode or normal-mode profile for GIR. ===================================================================================================== 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_gir_profile_management`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage a maintenance-mode or normal-mode profile with configuration commands that can be applied during graceful removal or graceful insertion. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **commands** list / elements=string | | List of commands to be included into the profile. | | **mode** string / required | **Choices:*** maintenance * normal | Configure the profile as Maintenance or Normal mode. | | **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. | | **state** string | **Choices:*** **present** ← * absent | Specify desired state of the resource. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * `state=absent` removes the whole profile. * 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 -------- ``` # Create a maintenance-mode profile - cisco.nxos.nxos_gir_profile_management: mode: maintenance commands: - router eigrp 11 - isolate # Remove the maintenance-mode profile - cisco.nxos.nxos_gir_profile_management: mode: maintenance 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 | check to see if a change was made on the device **Sample:** True | | **end\_state** list / elements=string | verbose mode | list of profile entries after module execution. **Sample:** ['router bgp 65535', 'isolate', 'router eigrp 10', 'isolate', 'diagnostic bootup level complete', 'router eigrp 11', 'isolate'] | | **existing** list / elements=string | verbose mode | list of existing profile commands. **Sample:** ['router bgp 65535', 'isolate', 'router eigrp 10', 'isolate', 'diagnostic bootup level complete'] | | **proposed** list / elements=string | verbose mode | list of commands passed into module. **Sample:** ['router eigrp 11', 'isolate'] | | **updates** list / elements=string | always | commands sent to the device **Sample:** ['configure maintenance profile maintenance-mode', 'router eigrp 11', 'isolate'] | ### Authors * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_evpn_global – Handles the EVPN control plane for VXLAN. cisco.nxos.nxos\_evpn\_global – Handles the EVPN control plane for VXLAN. ========================================================================= 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_evpn_global`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Handles the EVPN control plane for VXLAN. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **nv\_overlay\_evpn** boolean / required | **Choices:*** no * yes | EVPN control plane. | | **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. | Notes ----- Note * This module is not supported on Nexus 3000 series of switches. * Unsupported 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 -------- ``` - cisco.nxos.nxos_evpn_global: nv_overlay_evpn: 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 | | --- | --- | --- | | **commands** list / elements=string | always | The set of commands to be sent to the remote device **Sample:** ['nv overlay evpn'] | ### Authors * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_vtp_password – Manages VTP password configuration. cisco.nxos.nxos\_vtp\_password – Manages VTP password configuration. ==================================================================== 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_vtp_password`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages VTP password configuration. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **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. | | **state** string | **Choices:*** **present** ← * absent | Manage the state of the resource | | **vtp\_password** string | | VTP password | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * VTP feature must be active on the device to use this module. * This module is used to manage only VTP passwords. * Use this in combination with [cisco.nxos.nxos\_vtp\_domain](nxos_vtp_domain_module#ansible-collections-cisco-nxos-nxos-vtp-domain-module) and [cisco.nxos.nxos\_vtp\_version](nxos_vtp_version_module#ansible-collections-cisco-nxos-nxos-vtp-version-module) to fully manage VTP operations. * You can set/remove password only if a VTP domain already exist. * If `state=absent` and no `vtp_password` is provided, it remove the current VTP password. * If `state=absent` and `vtp_password` is provided, the proposed `vtp_password` has to match the existing one in order to remove it. * 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 -------- ``` # ENSURE VTP PASSWORD IS SET - cisco.nxos.nxos_vtp_password: state: present host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' # ENSURE VTP PASSWORD IS REMOVED - cisco.nxos.nxos_vtp_password: state: absent host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' ``` 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 **Sample:** True | | **end\_state** dictionary | always | k/v pairs of vtp after module execution **Sample:** {'domain': 'ntc', 'version': '1', 'vtp\_password': 'new\_ntc'} | | **existing** dictionary | always | k/v pairs of existing vtp **Sample:** {'domain': 'ntc', 'version': '1', 'vtp\_password': 'ntc'} | | **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'vtp\_password': 'new\_ntc'} | | **updates** list / elements=string | always | command sent to the device **Sample:** ['vtp password new\_ntc'] | ### Authors * Gabriele Gerbino (@GGabriele)
programming_docs
ansible cisco.nxos.nxos_install_os – Set boot options like boot, kickstart image and issu. cisco.nxos.nxos\_install\_os – Set boot options like boot, kickstart image and issu. ==================================================================================== 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_install_os`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Install an operating system by setting the boot options like boot image and kickstart image and optionally select to install using ISSU (In Server Software Upgrade). Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **issu** string | **Choices:*** required * desired * yes * **no** ← | Upgrade using In Service Software Upgrade (ISSU). (Supported on N5k, N7k, N9k platforms) Selecting 'required' or 'yes' means that upgrades will only proceed if the switch is capable of ISSU. Selecting 'desired' means that upgrades will use ISSU if possible but will fall back to disruptive upgrade if needed. Selecting 'no' means do not use ISSU. Forced disruptive. | | **kickstart\_image\_file** string | | Name of the kickstart image file on flash. (Not required on all Nexus platforms) | | **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. | | **system\_image\_file** string / required | | Name of the system (or combined) image file on flash. | Notes ----- Note * Tested against the following platforms and images - N9k 7.0(3)I4(6), 7.0(3)I5(3), 7.0(3)I6(1), 7.0(3)I7(1), 7.0(3)F2(2), 7.0(3)F3(2) - N3k 6.0(2)A8(6), 6.0(2)A8(8), 7.0(3)I6(1), 7.0(3)I7(1) - N7k 7.3(0)D1(1), 8.0(1), 8.1(1), 8.2(1) * Limited Support for Cisco MDS * This module requires both the ANSIBLE\_PERSISTENT\_CONNECT\_TIMEOUT and ANSIBLE\_PERSISTENT\_COMMAND\_TIMEOUT timers to be set to 600 seconds or higher. The module will exit if the timers are not set properly. * When using connection local, ANSIBLE\_PERSISTENT\_CONNECT\_TIMEOUT and ANSIBLE\_PERSISTENT\_COMMAND\_TIMEOUT can only be set using ENV variables or the ansible.cfg file. * Do not include full file paths, just the name of the file(s) stored on the top level flash directory. * This module attempts to install the software immediately, which may trigger a reboot. * In check mode, the module will indicate if an upgrade is needed and whether or not the upgrade is disruptive or non-disruptive(ISSU). * 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: Install OS on N9k check_mode: no cisco.nxos.nxos_install_os: system_image_file: nxos.7.0.3.I6.1.bin issu: desired - name: Wait for device to come back up with new image wait_for: port: 22 state: started timeout: 500 delay: 60 host: '{{ inventory_hostname }}' - name: Check installed OS for newly installed version nxos_command: commands: [show version | json] provider: '{{ connection }}' register: output - assert: that: - output['stdout'][0]['kickstart_ver_str'] == '7.0(3)I6(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 module: | Key | Returned | Description | | --- | --- | --- | | **install\_state** dictionary | always | Boot and install information. **Sample:** {'install\_state': ['Compatibility check is done:', 'Module bootable Impact Install-type Reason', '------ -------- -------------- ------------ ------', ' 1 yes non-disruptive reset ', 'Images will be upgraded according to following table:', 'Module Image Running-Version(pri:alt) New-Version Upg-Required', '------ ---------- ---------------------------------------- -------------------- ------------', ' 1 nxos 7.0(3)I6(1) 7.0(3)I7(1) yes', ' 1 bios v4.4.0(07/12/2017) v4.4.0(07/12/2017) no']} | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbibo (@GGabriele) ansible cisco.nxos.nxos_bgp_neighbor – (deprecated, removed after 2023-01-27) Manages BGP neighbors configurations. cisco.nxos.nxos\_bgp\_neighbor – (deprecated, removed after 2023-01-27) Manages BGP neighbors configurations. ============================================================================================================= 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_bgp_neighbor`. New in version 1.0.0: of cisco.nxos * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in major release after 2023-01-27 Why Updated module released with more functionality. Alternative nxos\_bgp\_global Synopsis -------- * Manages BGP neighbors configurations on NX-OS switches. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **asn** string / required | | BGP autonomous system number. Valid values are string, Integer in ASPLAIN or ASDOT notation. | | **bfd** string | **Choices:*** enable * disable | Enables/Disables BFD for a given neighbor. Dependency: ''feature bfd'' | | **capability\_negotiation** boolean | **Choices:*** no * yes | Configure whether or not to negotiate capability with this neighbor. | | **connected\_check** boolean | **Choices:*** no * yes | Configure whether or not to check for directly connected peer. | | **description** string | | Description of the neighbor. | | **dynamic\_capability** boolean | **Choices:*** no * yes | Configure whether or not to enable dynamic capability. | | **ebgp\_multihop** string | | Specify multihop TTL for a remote peer. Valid values are integers between 2 and 255, or keyword 'default' to disable this property. | | **local\_as** string | | Specify the local-as number for the eBGP neighbor. Valid values are String or Integer in ASPLAIN or ASDOT notation, or 'default', which means not to configure it. | | **log\_neighbor\_changes** string | **Choices:*** enable * disable * inherit | Specify whether or not to enable log messages for neighbor up/down event. | | **low\_memory\_exempt** boolean | **Choices:*** no * yes | Specify whether or not to shut down this neighbor under memory pressure. | | **maximum\_peers** string | | Specify Maximum number of peers for this neighbor prefix Valid values are between 1 and 1000, or 'default', which does not impose the limit. Note that this parameter is accepted only on neighbors with address/prefix. | | **neighbor** string / required | | Neighbor Identifier. Valid values are string. Neighbors may use IPv4 or IPv6 notation, with or without prefix length. | | **peer\_type** string added in 1.1.0 of cisco.nxos | **Choices:*** fabric\_border\_leaf * fabric\_external * disable | Specify the peer type for BGP session. | | **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. | | **pwd** string | | Specify the password for neighbor. Valid value is string. | | **pwd\_type** string | **Choices:*** 3des * cisco\_type\_7 * default | Specify the encryption type the password will use. Valid values are '3des' or 'cisco\_type\_7' encryption or keyword 'default'. | | **remote\_as** string | | Specify Autonomous System Number of the neighbor. Valid values are String or Integer in ASPLAIN or ASDOT notation, or 'default', which means not to configure it. | | **remove\_private\_as** string | **Choices:*** enable * disable * all * replace-as | Specify the config to remove private AS number from outbound updates. Valid values are 'enable' to enable this config, 'disable' to disable this config, 'all' to remove all private AS number, or 'replace-as', to replace the private AS number. | | **shutdown** boolean | **Choices:*** no * yes | Configure to administratively shutdown this neighbor. | | **state** string | **Choices:*** **present** ← * absent | Determines whether the config should be present or not on the device. | | **suppress\_4\_byte\_as** boolean | **Choices:*** no * yes | Configure to suppress 4-byte AS Capability. | | **timers\_holdtime** string | | Specify holdtime timer value. Valid values are integers between 0 and 3600 in terms of seconds, or 'default', which is 180. | | **timers\_keepalive** string | | Specify keepalive timer value. Valid values are integers between 0 and 3600 in terms of seconds, or 'default', which is 60. | | **transport\_passive\_only** boolean | **Choices:*** no * yes | Specify whether or not to only allow passive connection setup. Valid values are 'true', 'false', and 'default', which defaults to 'false'. This property can only be configured when the neighbor is in 'ip' address format without prefix length. | | **update\_source** string | | Specify source interface of BGP session and updates. | | **vrf** string | **Default:**"default" | Name of the VRF. The name 'default' is a valid VRF representing the global bgp. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * `state=absent` removes the whole BGP neighbor configuration. * Default, where supported, restores params default value. * 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 -------- ``` # create a new neighbor - cisco.nxos.nxos_bgp_neighbor: asn: 65535 neighbor: 192.0.2.3 local_as: 20 remote_as: 30 bfd: enable description: just a description update_source: Ethernet1/3 state: present peer_type: fabric_external ``` 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 | commands sent to the device **Sample:** ['router bgp 65535', 'neighbor 192.0.2.3', 'remote-as 30', 'update-source Ethernet1/3', 'description just a description', 'local-as 20', 'peer-type fabric-external'] | Status ------ * This module will be removed in a major release after 2023-01-27. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_static_route – (deprecated, removed after 2022-06-01) Manages static route configuration cisco.nxos.nxos\_static\_route – (deprecated, removed after 2022-06-01) Manages static route configuration ========================================================================================================== 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_static_route`. New in version 1.0.0: of cisco.nxos * [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 nxos\_static\_routes Synopsis -------- * Manages static route configuration Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **aggregate** list / elements=dictionary | | List of static route definitions | | | **next\_hop** string / required | | Next hop address or interface of static route. If interface, it must be the fully-qualified interface name. | | | **pref** string | | Preference or administrative difference of route (range 1-255) or keyword 'default'. aliases: admin\_distance | | | **prefix** string / required | | Destination prefix of static route. | | | **route\_name** string | | Name of the route or keyword 'default'. Used with the name parameter on the CLI. | | | **state** string | **Choices:*** present * absent | Manage the state of the resource. | | | **tag** string | | Route tag value (numeric) or keyword 'default'. | | | **track** integer | | Track value (range 1 - 512). Track must already be configured on the device before adding the route. | | | **vrf** string | | VRF for static route. | | **next\_hop** string | | Next hop address or interface of static route. If interface, it must be the fully-qualified interface name. | | **pref** string | | Preference or administrative difference of route (range 1-255) or keyword 'default'. aliases: admin\_distance | | **prefix** string | | Destination prefix of static route. aliases: address | | **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. | | **route\_name** string | | Name of the route or keyword 'default'. Used with the name parameter on the CLI. | | **state** string | **Choices:*** **present** ← * absent | Manage the state of the resource. | | **tag** string | | Route tag value (numeric) or keyword 'default'. | | **track** integer | | Track value (range 1 - 512). Track must already be configured on the device before adding the route. | | **vrf** string | **Default:**"default" | VRF for static route. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * If no vrf is supplied, vrf is set to default. * If `state=absent`, the route will be removed, regardless of the non-required parameters. * 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 -------- ``` - cisco.nxos.nxos_static_route: prefix: 192.168.20.64/24 next_hop: 192.0.2.3 route_name: testing pref: 100 ``` 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 | commands sent to the device **Sample:** ['ip route 192.168.20.0/24 192.0.2.3 name testing 100'] | Status ------ * This module will be removed in a major release after 2022-06-01. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Gabriele Gerbino (@GGabriele)
programming_docs
ansible cisco.nxos.nxos_ospf – (deprecated, removed after 2022-06-01) Manages configuration of an ospf instance. cisco.nxos.nxos\_ospf – (deprecated, removed after 2022-06-01) Manages configuration of an ospf instance. ========================================================================================================= 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_ospf`. New in version 1.0.0: of cisco.nxos * [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 nxos\_ospfv2 and nxos\_ospfv3 Synopsis -------- * Manages configuration of an ospf instance. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ospf** string / required | | Name of the ospf instance. | | **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. | | **state** string | **Choices:*** **present** ← * absent | Determines whether the config should be present or not on the device. | Notes ----- Note * Unsupported 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 -------- ``` - cisco.nxos.nxos_ospf: ospf: 1 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 | commands sent to the device **Sample:** ['router ospf 1'] | Status ------ * This module will be removed in a major release after 2022-06-01. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_bgp_af – (deprecated, removed after 2023-02-24) Manages BGP Address-family configuration. cisco.nxos.nxos\_bgp\_af – (deprecated, removed after 2023-02-24) Manages BGP Address-family configuration. =========================================================================================================== 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_bgp_af`. New in version 1.0.0: of cisco.nxos * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in major release after 2023-02-24 Why Updated module released with more functionality. Alternative nxos\_bgp\_address\_family Synopsis -------- * Manages BGP Address-family configurations on NX-OS switches. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **additional\_paths\_install** boolean | **Choices:*** no * yes | Install a backup path into the forwarding table and provide prefix independent convergence (PIC) in case of a PE-CE link failure. | | **additional\_paths\_receive** boolean | **Choices:*** no * yes | Enables the receive capability of additional paths for all of the neighbors under this address family for which the capability has not been disabled. | | **additional\_paths\_selection** string | | Configures the capability of selecting additional paths for a prefix. Valid values are a string defining the name of the route-map. | | **additional\_paths\_send** boolean | **Choices:*** no * yes | Enables the send capability of additional paths for all of the neighbors under this address family for which the capability has not been disabled. | | **advertise\_l2vpn\_evpn** boolean | **Choices:*** no * yes | Advertise evpn routes. | | **afi** string / required | **Choices:*** ipv4 * ipv6 * vpnv4 * vpnv6 * l2vpn | Address Family Identifier. | | **asn** string / required | | BGP autonomous system number. Valid values are String, Integer in ASPLAIN or ASDOT notation. | | **client\_to\_client** boolean | **Choices:*** no * yes | Configure client-to-client route reflection. | | **dampen\_igp\_metric** string | | Specify dampen value for IGP metric-related changes, in seconds. Valid values are integer and keyword 'default'. | | **dampening\_half\_time** string | | Specify decay half-life in minutes for route-flap dampening. Valid values are integer and keyword 'default'. | | **dampening\_max\_suppress\_time** string | | Specify max suppress time for route-flap dampening stable route. Valid values are integer and keyword 'default'. | | **dampening\_reuse\_time** string | | Specify route reuse time for route-flap dampening. Valid values are integer and keyword 'default'. | | **dampening\_routemap** string | | Specify route-map for route-flap dampening. Valid values are a string defining the name of the route-map. | | **dampening\_state** boolean | **Choices:*** no * yes | Enable/disable route-flap dampening. | | **dampening\_suppress\_time** string | | Specify route suppress time for route-flap dampening. Valid values are integer and keyword 'default'. | | **default\_information\_originate** boolean | **Choices:*** no * yes | Default information originate. | | **default\_metric** string | | Sets default metrics for routes redistributed into BGP. Valid values are Integer or keyword 'default' | | **distance\_ebgp** string | | Sets the administrative distance for eBGP routes. Valid values are Integer or keyword 'default'. | | **distance\_ibgp** string | | Sets the administrative distance for iBGP routes. Valid values are Integer or keyword 'default'. | | **distance\_local** string | | Sets the administrative distance for local BGP routes. Valid values are Integer or keyword 'default'. | | **inject\_map** list / elements=list | | An array of route-map names which will specify prefixes to inject. Each array entry must first specify the inject-map name, secondly an exist-map name, and optionally the copy-attributes keyword which indicates that attributes should be copied from the aggregate. For example [['lax\_inject\_map', 'lax\_exist\_map'], ['nyc\_inject\_map', 'nyc\_exist\_map', 'copy-attributes'], ['fsd\_inject\_map', 'fsd\_exist\_map']]. | | **maximum\_paths** string | | Configures the maximum number of equal-cost paths for load sharing. Valid value is an integer in the range 1-64. | | **maximum\_paths\_ibgp** string | | Configures the maximum number of ibgp equal-cost paths for load sharing. Valid value is an integer in the range 1-64. | | **networks** list / elements=list | | Networks to configure. Valid value is a list of network prefixes to advertise. The list must be in the form of an array. Each entry in the array must include a prefix address and an optional route-map. For example [['10.0.0.0/16', 'routemap\_LA'], ['192.168.1.1', 'Chicago'], ['192.168.2.0/24'], ['192.168.3.0/24', 'routemap\_NYC']]. | | **next\_hop\_route\_map** string | | Configure a route-map for valid nexthops. Valid values are a string defining the name of the route-map. | | **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. | | **redistribute** list / elements=list | | A list of redistribute directives. Multiple redistribute entries are allowed. The list must be in the form of a nested array. the first entry of each array defines the source-protocol to redistribute from; the second entry defines a route-map name. A route-map is highly advised but may be optional on some platforms, in which case it may be omitted from the array list. For example [['direct', 'rm\_direct'], ['lisp', 'rm\_lisp']]. | | **retain\_route\_target** string added in 1.1.0 of cisco.nxos | | Retains all of the routes or the routes which are part of configured route-map. Valid values are route-map names or keyword `all` or keyword `default`. `all` retains all the routes regardless of Target-VPN community. `default` will disable the retain route target option. If you are using route-map name please ensure that the name is not same as `all` and `default`. | | **safi** string / required | **Choices:*** unicast * multicast * evpn | Sub Address Family Identifier. | | **state** string | **Choices:*** **present** ← * absent | Determines whether the config should be present or not on the device. | | **suppress\_inactive** boolean | **Choices:*** no * yes | Advertises only active routes to peers. | | **table\_map** string | | Apply table-map to filter routes downloaded into URIB. Valid values are a string. | | **table\_map\_filter** boolean | **Choices:*** no * yes | Filters routes rejected by the route-map and does not download them to the RIB. | | **vrf** string | **Default:**"default" | Name of the VRF. The name 'default' is a valid VRF representing the global bgp. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * `state=absent` removes the whole BGP ASN configuration * Default, where supported, restores params default value. * 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 -------- ``` # configure a simple address-family - cisco.nxos.nxos_bgp_af: asn: 65535 vrf: TESTING afi: ipv4 safi: unicast advertise_l2vpn_evpn: true state: present retain_route_target: 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 | | --- | --- | --- | | **commands** list / elements=string | always | commands sent to the device **Sample:** ['router bgp 65535', 'vrf TESTING', 'address-family ipv4 unicast', 'advertise l2vpn evpn', 'retain route-target all'] | Status ------ * This module will be removed in a major release after 2023-02-24. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_vrf_interface – Manages interface specific VRF configuration. cisco.nxos.nxos\_vrf\_interface – Manages interface specific VRF configuration. =============================================================================== 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_vrf_interface`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages interface specific VRF configuration. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **interface** string / required | | Full name of interface to be managed, i.e. Ethernet1/1. | | **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. | | **state** string | **Choices:*** **present** ← * absent | Manages desired state of the resource. | | **vrf** string / required | | Name of VRF to be managed. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * VRF needs to be added globally with [cisco.nxos.nxos\_vrf](nxos_vrf_module#ansible-collections-cisco-nxos-nxos-vrf-module) before adding a VRF to an interface. * Remove a VRF from an interface will still remove all L3 attributes just as it does from CLI. * VRF is not read from an interface until IP address is configured on that interface. * 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: Ensure vrf ntc exists on Eth1/1 cisco.nxos.nxos_vrf_interface: vrf: ntc interface: Ethernet1/1 state: present - name: Ensure ntc VRF does not exist on Eth1/1 cisco.nxos.nxos_vrf_interface: vrf: ntc interface: Ethernet1/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 | commands sent to the device **Sample:** ['interface loopback16', 'vrf member ntc'] | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele)
programming_docs
ansible cisco.nxos.nxos_lag_interfaces – LAG interfaces resource module cisco.nxos.nxos\_lag\_interfaces – LAG interfaces resource module ================================================================= 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_lag_interfaces`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages attributes of link aggregation groups of NX-OS Interfaces. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A list of link aggregation group configurations. | | | **members** list / elements=dictionary | | The list of interfaces that are part of the group. | | | | **force** boolean | **Choices:*** no * yes | When true it forces link aggregation group members to match what is declared in the members param. This can be used to remove members. | | | | **member** string | | The interface name. | | | | **mode** string | **Choices:*** active * on * passive | Link aggregation group (LAG). | | | **name** string / required | | Name of the link aggregation group (LAG). | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS 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 * gathered * rendered * parsed | The state of the configuration after module completion. | Notes ----- Note * Tested against NXOS 7.3.(0)D1(1) on VIRL. * Unsupported for Cisco MDS * This module works with connection `network_cli`. Examples -------- ``` # Using merged # Before state: # ------------- # # interface Ethernet1/4 - name: Merge provided configuration with device configuration. cisco.nxos.nxos_lag_interfaces: config: - name: port-channel99 members: - member: Ethernet1/4 state: merged # After state: # ------------ # # interface Ethernet1/4 # channel-group 99 # Using replaced # Before state: # ------------- # # interface Ethernet1/4 # channel-group 99 mode active - name: Replace device configuration of specified LAG attributes of given interfaces with provided configuration. cisco.nxos.nxos_lag_interfaces: config: - name: port-channel10 members: - member: Ethernet1/4 state: replaced # After state: # ------------ # # interface Ethernet1/4 # channel-group 10 # Using overridden # Before state: # ------------- # # interface Ethernet1/4 # channel-group 10 # interface Ethernet1/2 # channel-group 99 mode passive - name: Override device configuration of all LAG attributes of given interfaces on device with provided configuration. cisco.nxos.nxos_lag_interfaces: config: - name: port-channel20 members: - member: Ethernet1/6 force: true state: overridden # After state: # ------------ # interface Ethernet1/2 # interface Ethernet1/4 # interface Ethernet1/6 # channel-group 20 force # Using deleted # Before state: # ------------- # # interface Ethernet1/4 # channel-group 99 mode active - name: Delete LAG attributes of given interface (This won't delete the port-channel itself). cisco.nxos.nxos_lag_interfaces: config: - port-channel: port-channel99 state: deleted - name: Delete LAG attributes of all the interfaces cisco.nxos.nxos_lag_interfaces: state: deleted # After state: # ------------ # # interface Ethernet1/4 # no channel-group 99 # Using rendered - name: Use rendered state to convert task input to device specific commands cisco.nxos.nxos_lag_interfaces: config: - name: port-channel10 members: - member: Ethernet1/800 mode: active - member: Ethernet1/801 - name: port-channel11 members: - member: Ethernet1/802 mode: passive state: rendered # Task Output (redacted) # ----------------------- # rendered: # - "interface Ethernet1/800" # - "channel-group 10 mode active" # - "interface Ethernet1/801" # - "channel-group 10" # - "interface Ethernet1/802" # - "channel-group 11 mode passive" # Using parsed # parsed.cfg # ------------ # interface port-channel10 # interface port-channel11 # interface port-channel12 # interface Ethernet1/800 # channel-group 10 mode active # interface Ethernet1/801 # channel-group 10 mode active # interface Ethernet1/802 # channel-group 11 mode passive # interface Ethernet1/803 # channel-group 11 mode passive - name: Use parsed state to convert externally supplied config to structured format cisco.nxos.nxos_lag_interfaces: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # - members: # - member: Ethernet1/800 # mode: active # - member: Ethernet1/801 # mode: active # name: port-channel10 # # - members: # - member: Ethernet1/802 # mode: passive # - member: Ethernet1/803 # mode: passive # name: port-channel11 # # - name: port-channel12 # Using gathered # Existing device config state # ------------------------------- # interface port-channel10 # interface port-channel11 # interface Ethernet1/1 # channel-group 10 mode active # interface Ethernet1/2 # channel-group 11 mode passive # - name: Gather lag_interfaces facts from the device using nxos_lag_interfaces cisco.nxos.nxos_lag_interfaces: state: gathered # Task output (redacted) # ----------------------- # gathered: # - name: port-channel10 # members: # - member: Ethernet1/1 # mode: active # - name: port-channel11 # members: # - member: Ethernet1/2 # mode: passive ``` 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 Ethernet1/800', 'channel-group 10 mode active', 'interface Ethernet1/801', 'channel-group 10', 'interface Ethernet1/802', 'channel-group 11 mode passive'] | ### Authors * Trishna Guha (@trishnaguha) * Nilashish Chakraborty (@NilashishC) ansible cisco.nxos.nxos_aaa_server_host – Manages AAA server host-specific configuration. cisco.nxos.nxos\_aaa\_server\_host – Manages AAA server host-specific configuration. ==================================================================================== 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_aaa_server_host`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages AAA server host-specific configuration. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **acct\_port** string | | Alternate UDP port for RADIUS accounting or keyword 'default'. | | **address** string / required | | Address or name of the radius or tacacs host. | | **auth\_port** string | | Alternate UDP port for RADIUS authentication or keyword 'default'. | | **encrypt\_type** string | **Choices:*** 0 * 7 | The state of encryption applied to the entered key. O for clear text, 7 for encrypted. Type-6 encryption is not supported. | | **host\_timeout** string | | Timeout period for specified host, in seconds or keyword 'default. Range is 1-60. | | **key** string | | Shared secret for the specified host or keyword 'default'. | | **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. | | **server\_type** string / required | **Choices:*** radius * tacacs | The server type is either radius or tacacs. | | **state** string | **Choices:*** **present** ← * absent | Manage the state of the resource. | | **tacacs\_port** string | | Alternate TCP port TACACS Server or keyword 'default'. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Limited Support for Cisco MDS * Changes to the host key (shared secret) are not idempotent for type 0. * If `state=absent` removes the whole host configuration. * 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 -------- ``` # Radius Server Host Basic settings - name: Radius Server Host Basic settings cisco.nxos.nxos_aaa_server_host: state: present server_type: radius address: 1.2.3.4 acct_port: 2084 host_timeout: 10 # Radius Server Host Key Configuration - name: Radius Server Host Key Configuration cisco.nxos.nxos_aaa_server_host: state: present server_type: radius address: 1.2.3.4 key: hello encrypt_type: 7 # TACACS Server Host Configuration - name: Tacacs Server Host Configuration cisco.nxos.nxos_aaa_server_host: state: present server_type: tacacs tacacs_port: 89 host_timeout: 10 address: 5.6.7.8 ``` 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 **Sample:** True | | **end\_state** dictionary | always | k/v pairs of configuration after module execution **Sample:** {'address': '1.2.3.4', 'auth\_port': '2084', 'host\_timeout': '10', 'server\_type': 'radius'} | | **existing** dictionary | always | k/v pairs of existing configuration | | **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'address': '1.2.3.4', 'auth\_port': '2084', 'host\_timeout': '10', 'server\_type': 'radius'} | | **updates** list / elements=string | always | command sent to the device **Sample:** ['radius-server host 1.2.3.4 auth-port 2084 timeout 10'] | ### Authors * Jason Edelman (@jedelman8) ansible cisco.nxos.nxos_udld – Manages UDLD global configuration params. cisco.nxos.nxos\_udld – Manages UDLD global configuration params. ================================================================= 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_udld`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages UDLD global configuration params. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **aggressive** string | **Choices:*** enabled * disabled | Toggles aggressive mode. | | **msg\_time** string | | Message time in seconds for UDLD packets or keyword 'default'. | | **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. | | **reset** boolean | **Choices:*** no * yes | Ability to reset all ports shut down by UDLD. 'state' parameter cannot be 'absent' when this is present. | | **state** string | **Choices:*** **present** ← * absent | Manage the state of the resource. When set to 'absent', aggressive and msg\_time are set to their default values. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * Module will fail if the udld feature has not been previously enabled. * 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 -------- ``` # ensure udld aggressive mode is globally disabled and se global message interval is 20 - cisco.nxos.nxos_udld: aggressive: disabled msg_time: 20 host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' # Ensure agg mode is globally enabled and msg time is 15 - cisco.nxos.nxos_udld: aggressive: enabled msg_time: 15 host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' ``` 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 **Sample:** True | | **end\_state** dictionary | always | k/v pairs of udld configuration after module execution **Sample:** {'aggressive': 'enabled', 'msg\_time': '40'} | | **existing** dictionary | always | k/v pairs of existing udld configuration **Sample:** {'aggressive': 'disabled', 'msg\_time': '15'} | | **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'aggressive': 'enabled', 'msg\_time': '40'} | | **updates** list / elements=string | always | command sent to the device **Sample:** ['udld message-time 40', 'udld aggressive'] | ### Authors * Jason Edelman (@jedelman8)
programming_docs
ansible cisco.nxos.nxos_reboot – Reboot a network device. cisco.nxos.nxos\_reboot – Reboot a network device. ================================================== 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_reboot`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Reboot a network device. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **confirm** boolean | **Choices:*** **no** ← * yes | Safeguard boolean. Set to true if you're sure you want to reboot. | | **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. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Limited Support for Cisco MDS * The module will fail due to timeout issues, but the reboot will be performed anyway. * 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 -------- ``` - cisco.nxos.nxos_reboot: confirm: 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 | | --- | --- | --- | | **rebooted** boolean | success | Whether the device was instructed to reboot. **Sample:** True | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_lacp – LACP resource module cisco.nxos.nxos\_lacp – LACP resource module ============================================ 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_lacp`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages Global Link Aggregation Control Protocol (LACP) on NX-OS devices. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | LACP global options. | | | **system** dictionary | | LACP system options | | | | **mac** dictionary | | MAC address to be used for the LACP Protocol exchanges | | | | | **address** string | | MAC-address (FORMAT :xxxx.xxxx.xxxx). | | | | | **role** string | **Choices:*** primary * secondary | The role for the Switch. | | | | **priority** integer | | The system priority to use in LACP negotiations. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the command **show running-config | include lacp**. 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 * deleted * gathered * rendered * parsed | The state of the configuration after module completion. | Notes ----- Note * Tested against NXOS 7.3.(0)D1(1) on VIRL. * Unsupported for Cisco MDS * Feature lacp should be enabled for this module. Examples -------- ``` # Using merged # Before state: # ------------- # - name: Merge provided configuration with device configuration. cisco.nxos.nxos_lacp: config: system: priority: 10 mac: address: 00c1.4c00.bd15 state: merged # After state: # ------------ # # lacp system-priority 10 # lacp system-mac 00c1.4c00.bd15 # Using replaced # Before state: # ------------- # # lacp system-priority 10 - name: Replace device global lacp configuration with the given configuration. cisco.nxos.nxos_lacp: config: system: mac: address: 00c1.4c00.bd15 state: replaced # After state: # ------------ # # lacp system-mac 00c1.4c00.bd15 # Using deleted # Before state: # ------------- # # lacp system-priority 10 - name: Delete global LACP configurations. cisco.nxos.nxos_lacp: state: deleted # After state: # ------------ # # Using rendered - name: Render platform specific configuration lines (without connecting to the device) cisco.nxos.nxos_lacp: config: system: priority: 10 mac: address: 00c1.4c00.bd15 role: secondary state: rendered # Task Output (redacted) # ----------------------- # rendered: # - "lacp system-priority 10" # - "lacp system-mac 00c1.4c00.bd15 role secondary" # Using parsed # parsed.cfg # ------------ # lacp system-priority 10 # lacp system-mac 00c1.4c00.bd15 role secondary - name: Use parsed state to convert externally supplied config to structured format cisco.nxos.nxos_lacp: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # system: # priority: 10 # mac: # address: 00c1.4c00.bd15 # role: secondary # Using gathered # Existing device config state # ------------------------------- # Nexus9000v# show running-config | include lacp # lacp system-priority 11 # lacp system-mac 00c1.4c00.bd15 role primary - name: Gather lacp facts from the device using nxos_lacp cisco.nxos.nxos_lacp: state: gathered # Task output (redacted) # ----------------------- # gathered: # system: # priority: 11 # mac: # address: 00c1.4c00.bd15 # role: primary ``` 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:** ['lacp system-priority 15', 'lacp system-mac 00c1.4c00.bd15 role primary'] | ### Authors * Trishna Guha (@trishnaguha) ansible cisco.nxos.nxos_ospfv2 – OSPFv2 resource module cisco.nxos.nxos\_ospfv2 – OSPFv2 resource module ================================================ 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_ospfv2`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages OSPFv2 configuration on devices running Cisco NX-OS. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** dictionary | | A list of OSPF process configuration. | | | **processes** list / elements=dictionary | | A list of OSPF instances' configurations. | | | | **areas** list / elements=dictionary | | Configure properties of OSPF Areas. | | | | | **area\_id** string / required | | The Area ID in IP Address format. | | | | | **authentication** dictionary | | Authentication settings for the Area. | | | | | | **message\_digest** boolean | **Choices:*** no * yes | Use message-digest authentication. | | | | | | **set** boolean | **Choices:*** no * yes | Set authentication for the area. | | | | | **default\_cost** integer | | Specify the default cost for default summary LSA. | | | | | **filter\_list** list / elements=dictionary | | Filter prefixes between OSPF areas. | | | | | | **direction** string / required | **Choices:*** in * out | The direction to apply the route map. | | | | | | **route\_map** string / required | | The Route-map name. | | | | | **nssa** dictionary | | NSSA settings for the area. | | | | | | **default\_information\_originate** boolean | **Choices:*** no * yes | Originate Type-7 default LSA into NSSA area. | | | | | | **no\_redistribution** boolean | **Choices:*** no * yes | Do not send redistributed LSAs into NSSA area. | | | | | | **no\_summary** boolean | **Choices:*** no * yes | Do not send summary LSAs into NSSA area. | | | | | | **set** boolean | **Choices:*** no * yes | Configure area as NSSA. | | | | | | **translate** dictionary | | Translate LSA. | | | | | | | **type7** dictionary | | Translate from Type 7 to Type 5. | | | | | | | | **always** boolean | **Choices:*** no * yes | Always translate LSAs | | | | | | | | **never** boolean | **Choices:*** no * yes | Never translate LSAs | | | | | | | | **supress\_fa** boolean | **Choices:*** no * yes | Suppress forwarding address in translated LSAs. | | | | | **ranges** list / elements=dictionary | | Configure an address range for the area. | | | | | | **cost** integer | | Cost to use for the range. | | | | | | **not\_advertise** boolean | **Choices:*** no * yes | Suppress advertising the specified range. | | | | | | **prefix** string / required | | IP in Prefix format (x.x.x.x/len) | | | | | **stub** dictionary | | Settings for configuring the area as a stub. | | | | | | **no\_summary** boolean | **Choices:*** no * yes | Prevent ABR from sending summary LSAs into stub area. | | | | | | **set** boolean | **Choices:*** no * yes | Configure the area as a stub. | | | | **auto\_cost** dictionary | | Calculate OSPF cost according to bandwidth. | | | | | **reference\_bandwidth** integer / required | | Reference bandwidth used to assign OSPF cost. | | | | | **unit** string / required | **Choices:*** Gbps * Mbps | Specify in which unit the reference bandwidth is specified. | | | | **bfd** boolean | **Choices:*** no * yes | Enable BFD on all OSPF interfaces. | | | | **default\_information** dictionary | | Control distribution of default routes. | | | | | **originate** dictionary | | Distribute a default route. | | | | | | **always** boolean | **Choices:*** no * yes | Always advertise a default route. | | | | | | **route\_map** string | | Policy to control distribution of default routes | | | | | | **set** boolean | **Choices:*** no * yes | Enable distribution of default route. | | | | **default\_metric** integer | | Specify default metric for redistributed routes. | | | | **distance** integer | | Configure the OSPF administrative distance. | | | | **flush\_routes** boolean | **Choices:*** no * yes | Flush routes on a non-graceful controlled restart. | | | | **graceful\_restart** dictionary | | Configure graceful restart. | | | | | **grace\_period** integer | | Configure maximum interval to restart gracefully. | | | | | **helper\_disable** boolean | **Choices:*** no * yes | Enable/Disable helper mode. | | | | | **set** boolean | **Choices:*** no * yes | Enable graceful-restart. | | | | **isolate** boolean | **Choices:*** no * yes | Isolate this router from OSPF perspective. | | | | **log\_adjacency\_changes** dictionary | | Log changes in adjacency state. | | | | | **detail** boolean | **Choices:*** no * yes | Notify all state changes. | | | | | **log** boolean | **Choices:*** no * yes | Enable/disable logging changes in adjacency state. | | | | **max\_lsa** dictionary | | Feature to limit the number of non-self-originated LSAs. | | | | | **ignore\_count** integer | | Set count on how many times adjacencies can be suppressed. | | | | | **ignore\_time** integer | | Set time during which all adjacencies are suppressed. | | | | | **max\_non\_self\_generated\_lsa** integer / required | | Set the maximum number of non self-generated LSAs. | | | | | **reset\_time** integer | | Set number of minutes after which ignore-count is reset to zero. | | | | | **threshold** integer | | Threshold value (%) at which to generate a warning message. | | | | | **warning\_only** boolean | **Choices:*** no * yes | Log a warning message when limit is exceeded. | | | | **max\_metric** dictionary | | Maximize the cost metric. | | | | | **router\_lsa** dictionary | | Router LSA configuration. | | | | | | **external\_lsa** dictionary | | External LSA configuration. | | | | | | | **max\_metric\_value** integer | | Set max metric value for external LSAs. | | | | | | | **set** boolean | **Choices:*** no * yes | Set external-lsa attribute. | | | | | | **include\_stub** boolean | **Choices:*** no * yes | Advertise Max metric for Stub links as well. | | | | | | **on\_startup** dictionary | | Effective only at startup. | | | | | | | **set** boolean | **Choices:*** no * yes | Set on-startup attribute. | | | | | | | **wait\_for\_bgp\_asn** integer | | ASN of BGP to wait for. | | | | | | | **wait\_period** integer | | Wait period in seconds after startup. | | | | | | **set** boolean | **Choices:*** no * yes | Set router-lsa attribute. | | | | | | **summary\_lsa** dictionary | | Summary LSAs configuration. | | | | | | | **max\_metric\_value** integer | | Max metric value for summary LSAs. | | | | | | | **set** boolean | **Choices:*** no * yes | Set summary-lsa attribute. | | | | **maximum\_paths** integer | | Maximum paths per destination. | | | | **mpls** dictionary | | OSPF MPLS configuration settings. | | | | | **traffic\_eng** dictionary | | OSPF MPLS Traffic Engineering commands. | | | | | | **areas** list / elements=dictionary | | List of Area IDs. | | | | | | | **area\_id** string | | Area Id in ip address format. | | | | | | **multicast\_intact** boolean | **Choices:*** no * yes | MPLS TE multicast support. | | | | | | **router\_id** string | | Router ID associated with TE. | | | | **name\_lookup** boolean | **Choices:*** no * yes | Display OSPF router ids as DNS names. | | | | **passive\_interface** dictionary | | Suppress routing updates on the interface. | | | | | **default** boolean | **Choices:*** no * yes | Interfaces passive by default. | | | | **process\_id** string / required | | The OSPF process tag. | | | | **redistribute** list / elements=dictionary | | Redistribute information from another routing protocol. | | | | | **id** string | | The identifier for the protocol specified. | | | | | **protocol** string / required | **Choices:*** bgp * direct * eigrp * isis * lisp * ospf * rip * static | The name of the protocol. | | | | | **route\_map** string / required | | The route map policy to constrain redistribution. | | | | **rfc1583compatibility** boolean | **Choices:*** no * yes | Configure 1583 compatibility for external path preferences. | | | | **router\_id** string | | Set OSPF process router-id. | | | | **shutdown** boolean | **Choices:*** no * yes | Shutdown the OSPF protocol instance. | | | | **summary\_address** list / elements=dictionary | | Configure route summarization for redistribution. | | | | | **not\_advertise** boolean | **Choices:*** no * yes | Suppress advertising the specified summary. | | | | | **prefix** string / required | | IP prefix in format x.x.x.x/ml. | | | | | **tag** integer | | A 32-bit tag value. | | | | **table\_map** dictionary | | Policy for filtering/modifying OSPF routes before sending them to RIB. | | | | | **filter** boolean | **Choices:*** no * yes | Block the OSPF routes from being sent to RIB. | | | | | **name** string / required | | The Route Map name. | | | | **timers** dictionary | | Configure timer related constants. | | | | | **lsa\_arrival** integer | | Mimimum interval between arrival of a LSA. | | | | | **lsa\_group\_pacing** integer | | LSA group refresh/maxage interval. | | | | | **throttle** dictionary | | Configure throttle related constants. | | | | | | **lsa** dictionary | | Set rate-limiting for LSA generation. | | | | | | | **hold\_interval** integer | | The hold interval. | | | | | | | **max\_interval** integer | | The max interval. | | | | | | | **start\_interval** integer | | The start interval. | | | | | | **spf** dictionary | | Set OSPF SPF timers. | | | | | | | **initial\_spf\_delay** integer | | Initial SPF schedule delay in milliseconds. | | | | | | | **max\_wait\_time** integer | | Maximum wait time between SPF calculations. | | | | | | | **min\_hold\_time** integer | | Minimum hold time between SPF calculations. | | | | **vrfs** list / elements=dictionary | | Configure VRF specific OSPF settings. | | | | | **areas** list / elements=dictionary | | Configure properties of OSPF Areas. | | | | | | **area\_id** string / required | | The Area ID in IP Address format. | | | | | | **authentication** dictionary | | Authentication settings for the Area. | | | | | | | **message\_digest** boolean | **Choices:*** no * yes | Use message-digest authentication. | | | | | | | **set** boolean | **Choices:*** no * yes | Set authentication for the area. | | | | | | **default\_cost** integer | | Specify the default cost for default summary LSA. | | | | | | **filter\_list** list / elements=dictionary | | Filter prefixes between OSPF areas. | | | | | | | **direction** string / required | **Choices:*** in * out | The direction to apply the route map. | | | | | | | **route\_map** string / required | | The Route-map name. | | | | | | **nssa** dictionary | | NSSA settings for the area. | | | | | | | **default\_information\_originate** boolean | **Choices:*** no * yes | Originate Type-7 default LSA into NSSA area. | | | | | | | **no\_redistribution** boolean | **Choices:*** no * yes | Do not send redistributed LSAs into NSSA area. | | | | | | | **no\_summary** boolean | **Choices:*** no * yes | Do not send summary LSAs into NSSA area. | | | | | | | **set** boolean | **Choices:*** no * yes | Configure area as NSSA. | | | | | | | **translate** dictionary | | Translate LSA. | | | | | | | | **type7** dictionary | | Translate from Type 7 to Type 5. | | | | | | | | | **always** boolean | **Choices:*** no * yes | Always translate LSAs | | | | | | | | | **never** boolean | **Choices:*** no * yes | Never translate LSAs | | | | | | | | | **supress\_fa** boolean | **Choices:*** no * yes | Suppress forwarding address in translated LSAs. | | | | | | **ranges** list / elements=dictionary | | Configure an address range for the area. | | | | | | | **cost** integer | | Cost to use for the range. | | | | | | | **not\_advertise** boolean | **Choices:*** no * yes | Suppress advertising the specified range. | | | | | | | **prefix** string / required | | IP in Prefix format (x.x.x.x/len) | | | | | | **stub** dictionary | | Settings for configuring the area as a stub. | | | | | | | **no\_summary** boolean | **Choices:*** no * yes | Prevent ABR from sending summary LSAs into stub area. | | | | | | | **set** boolean | **Choices:*** no * yes | Configure the area as a stub. | | | | | **auto\_cost** dictionary | | Calculate OSPF cost according to bandwidth. | | | | | | **reference\_bandwidth** integer / required | | Reference bandwidth used to assign OSPF cost. | | | | | | **unit** string / required | **Choices:*** Gbps * Mbps | Specify in which unit the reference bandwidth is specified. | | | | | **bfd** boolean | **Choices:*** no * yes | Enable BFD on all OSPF interfaces. | | | | | **capability** dictionary | | OSPF capability settings. | | | | | | **vrf\_lite** dictionary | | Enable VRF-lite capability settings. | | | | | | | **evpn** boolean | **Choices:*** no * yes | Ethernet VPN. | | | | | | | **set** boolean | **Choices:*** no * yes | Enable VRF-lite support. | | | | | **default\_information** dictionary | | Control distribution of default routes. | | | | | | **originate** dictionary | | Distribute a default route. | | | | | | | **always** boolean | **Choices:*** no * yes | Always advertise a default route. | | | | | | | **route\_map** string | | Policy to control distribution of default routes | | | | | | | **set** boolean | **Choices:*** no * yes | Enable distribution of default route. | | | | | **default\_metric** integer | | Specify default metric for redistributed routes. | | | | | **distance** integer | | Configure the OSPF administrative distance. | | | | | **down\_bit\_ignore** boolean | **Choices:*** no * yes | Configure a PE router to ignore the DN bit for network summary, external and NSSA external LSA. | | | | | **graceful\_restart** dictionary | | Configure graceful restart. | | | | | | **grace\_period** integer | | Configure maximum interval to restart gracefully. | | | | | | **helper\_disable** boolean | **Choices:*** no * yes | Enable/Disable helper mode. | | | | | | **set** boolean | **Choices:*** no * yes | Enable graceful-restart. | | | | | **log\_adjacency\_changes** dictionary | | Log changes in adjacency state. | | | | | | **detail** boolean | **Choices:*** no * yes | Notify all state changes. | | | | | | **log** boolean | **Choices:*** no * yes | Enable/disable logging changes in adjacency state. | | | | | **max\_lsa** dictionary | | Feature to limit the number of non-self-originated LSAs. | | | | | | **ignore\_count** integer | | Set count on how many times adjacencies can be suppressed. | | | | | | **ignore\_time** integer | | Set time during which all adjacencies are suppressed. | | | | | | **max\_non\_self\_generated\_lsa** integer / required | | Set the maximum number of non self-generated LSAs. | | | | | | **reset\_time** integer | | Set number of minutes after which ignore-count is reset to zero. | | | | | | **threshold** integer | | Threshold value (%) at which to generate a warning message. | | | | | | **warning\_only** boolean | **Choices:*** no * yes | Log a warning message when limit is exceeded. | | | | | **max\_metric** dictionary | | Maximize the cost metric. | | | | | | **router\_lsa** dictionary | | Router LSA configuration. | | | | | | | **external\_lsa** dictionary | | External LSA configuration. | | | | | | | | **max\_metric\_value** integer | | Set max metric value for external LSAs. | | | | | | | | **set** boolean | **Choices:*** no * yes | Set external-lsa attribute. | | | | | | | **include\_stub** boolean | **Choices:*** no * yes | Advertise Max metric for Stub links as well. | | | | | | | **on\_startup** dictionary | | Effective only at startup. | | | | | | | | **set** boolean | **Choices:*** no * yes | Set on-startup attribute. | | | | | | | | **wait\_for\_bgp\_asn** integer | | ASN of BGP to wait for. | | | | | | | | **wait\_period** integer | | Wait period in seconds after startup. | | | | | | | **set** boolean | **Choices:*** no * yes | Set router-lsa attribute. | | | | | | | **summary\_lsa** dictionary | | Summary LSAs configuration. | | | | | | | | **max\_metric\_value** integer | | Max metric value for summary LSAs. | | | | | | | | **set** boolean | **Choices:*** no * yes | Set summary-lsa attribute. | | | | | **maximum\_paths** integer | | Maximum paths per destination. | | | | | **name\_lookup** boolean | **Choices:*** no * yes | Display OSPF router ids as DNS names. | | | | | **passive\_interface** dictionary | | Suppress routing updates on the interface. | | | | | | **default** boolean | **Choices:*** no * yes | Interfaces passive by default. | | | | | **redistribute** list / elements=dictionary | | Redistribute information from another routing protocol. | | | | | | **id** string | | The identifier for the protocol specified. | | | | | | **protocol** string / required | **Choices:*** bgp * direct * eigrp * isis * lisp * ospf * rip * static | The name of the protocol. | | | | | | **route\_map** string / required | | The route map policy to constrain redistribution. | | | | | **rfc1583compatibility** boolean | **Choices:*** no * yes | Configure 1583 compatibility for external path preferences. | | | | | **router\_id** string | | Set OSPF process router-id. | | | | | **shutdown** boolean | **Choices:*** no * yes | Shutdown the OSPF protocol instance. | | | | | **summary\_address** list / elements=dictionary | | Configure route summarization for redistribution. | | | | | | **not\_advertise** boolean | **Choices:*** no * yes | Suppress advertising the specified summary. | | | | | | **prefix** string / required | | IP prefix in format x.x.x.x/ml. | | | | | | **tag** integer | | A 32-bit tag value. | | | | | **table\_map** dictionary | | Policy for filtering/modifying OSPF routes before sending them to RIB. | | | | | | **filter** boolean | **Choices:*** no * yes | Block the OSPF routes from being sent to RIB. | | | | | | **name** string / required | | The Route Map name. | | | | | **timers** dictionary | | Configure timer related constants. | | | | | | **lsa\_arrival** integer | | Mimimum interval between arrival of a LSA. | | | | | | **lsa\_group\_pacing** integer | | LSA group refresh/maxage interval. | | | | | | **throttle** dictionary | | Configure throttle related constants. | | | | | | | **lsa** dictionary | | Set rate-limiting for LSA generation. | | | | | | | | **hold\_interval** integer | | The hold interval. | | | | | | | | **max\_interval** integer | | The max interval. | | | | | | | | **start\_interval** integer | | The start interval. | | | | | | | **spf** dictionary | | Set OSPF SPF timers. | | | | | | | | **initial\_spf\_delay** integer | | Initial SPF schedule delay in milliseconds. | | | | | | | | **max\_wait\_time** integer | | Maximum wait time between SPF calculations. | | | | | | | | **min\_hold\_time** integer | | Minimum hold time between SPF calculations. | | | | | **vrf** string / required | | Name/Identifier of the VRF. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the command **show running-config | section "^router ospf .\*"**. 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 * gathered * parsed * rendered | The state the configuration should be left in. | Notes ----- Note * Tested against NX-OS 7.0(3)I5(1). * Unsupported for Cisco MDS * This module works with connection `network_cli` and `httpapi`. Examples -------- ``` # Using merged # Before state: # ------------- # nxos-9k-rdo# sh running-config | section "^router ospf .*" # nxos-9k-rdo# - name: Merge the provided configuration with the existing running configuration cisco.nxos.nxos_ospfv2: config: processes: - process_id: 100 router_id: 203.0.113.20 - process_id: 102 router_id: 198.51.100.1 areas: - area_id: 0.0.0.100 filter_list: - route_map: rmap_1 direction: in - route_map: rmap_2 direction: out ranges: - prefix: 198.51.100.64/27 not_advertise: true - prefix: 198.51.100.96/27 cost: 120 - area_id: 0.0.0.101 authentication: message_digest: true redistribute: - protocol: eigrp id: 120 route_map: rmap_1 - protocol: direct route_map: ospf102-direct-connect vrfs: - vrf: zone1 router_id: 198.51.100.129 redistribute: - protocol: static route_map: zone1-static-connect summary_address: - prefix: 198.51.100.128/27 tag: 121 - prefix: 198.51.100.160/27 areas: - area_id: 0.0.0.102 nssa: default_information_originate: true no_summary: true - area_id: 0.0.0.103 nssa: no_summary: true translate: type7: always: true - vrf: zone2 auto_cost: reference_bandwidth: 45 unit: Gbps state: merged # Task output # ------------- # before: {} # # commands: # - router ospf 102 # - router-id 198.51.100.1 # - redistribute eigrp 120 route-map rmap_1 # - redistribute direct route-map ospf102-direct-connect # - area 0.0.0.100 filter-list route-map rmap_1 in # - area 0.0.0.100 filter-list route-map rmap_2 out # - area 0.0.0.100 range 198.51.100.64/27 not-advertise # - area 0.0.0.100 range 198.51.100.96/27 cost 120 # - area 0.0.0.101 authentication message-digest # - vrf zone1 # - router-id 198.51.100.129 # - summary-address 198.51.100.128/27 tag 121 # - summary-address 198.51.100.160/27 # - redistribute static route-map zone1-static-connect # - area 0.0.0.102 nssa no-summary default-information-originate # - area 0.0.0.103 nssa no-summary # - area 0.0.0.103 nssa translate type7 always # - vrf zone2 # - auto-cost reference-bandwidth 45 Gbps # - router ospf 100 # - router-id 203.0.113.20 # # after: # processes: # - process_id: "100" # router_id: 203.0.113.20 # - areas: # - area_id: 0.0.0.100 # filter_list: # - direction: out # route_map: rmap_2 # - direction: in # route_map: rmap_1 # ranges: # - not_advertise: true # prefix: 198.51.100.64/27 # - cost: 120 # prefix: 198.51.100.96/27 # - area_id: 0.0.0.101 # authentication: # message_digest: true # process_id: "102" # redistribute: # - protocol: direct # route_map: ospf102-direct-connect # - id: "120" # protocol: eigrp # route_map: rmap_1 # router_id: 198.51.100.1 # vrfs: # - areas: # - area_id: 0.0.0.102 # nssa: # default_information_originate: true # no_summary: true # - area_id: 0.0.0.103 # nssa: # no_summary: true # translate: # type7: # always: true # redistribute: # - protocol: static # route_map: zone1-static-connect # router_id: 198.51.100.129 # vrf: zone1 # - auto_cost: # reference_bandwidth: 45 # unit: Gbps # vrf: zone2 # # After state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospf .*" # router ospf 100 # router-id 203.0.113.20 # router ospf 102 # router-id 198.51.100.1 # redistribute direct route-map ospf102-direct-connect # redistribute eigrp 120 route-map rmap_1 # area 0.0.0.100 filter-list route-map rmap_2 out # area 0.0.0.100 filter-list route-map rmap_1 in # area 0.0.0.100 range 198.51.100.64/27 not-advertise # area 0.0.0.100 range 198.51.100.96/27 cost 120 # area 0.0.0.101 authentication message-digest # vrf zone1 # router-id 198.51.100.129 # area 0.0.0.102 nssa no-summary default-information-originate # area 0.0.0.103 nssa no-summary # area 0.0.0.103 nssa translate type7 always # redistribute static route-map zone1-static-connect # summary-address 198.51.100.128/27 tag 121 # summary-address 198.51.100.160/27 # vrf zone2 # auto-cost reference-bandwidth 45 Gbps # Using replaced # Before state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospf .*" # router ospf 100 # router-id 203.0.113.20 # router ospf 102 # router-id 198.51.100.1 # redistribute direct route-map ospf102-direct-connect # redistribute eigrp 120 route-map rmap_1 # area 0.0.0.100 filter-list route-map rmap_2 out # area 0.0.0.100 filter-list route-map rmap_1 in # area 0.0.0.100 range 198.51.100.64/27 not-advertise # area 0.0.0.100 range 198.51.100.96/27 cost 120 # area 0.0.0.101 authentication message-digest # vrf zone1 # router-id 198.51.100.129 # area 0.0.0.102 nssa no-summary default-information-originate # area 0.0.0.103 nssa no-summary # area 0.0.0.103 nssa translate type7 always # redistribute static route-map zone1-static-connect # summary-address 198.51.100.128/27 tag 121 # summary-address 198.51.100.160/27 # vrf zone2 # auto-cost reference-bandwidth 45 Gbps - name: Replace device configurations of listed OSPF processes with provided configurations cisco.nxos.nxos_ospfv2: config: processes: - process_id: 102 router_id: 198.51.100.1 areas: - area_id: 0.0.0.100 filter_list: - route_map: rmap_8 direction: in ranges: - prefix: 198.51.100.64/27 not_advertise: true - area_id: 0.0.0.101 stub: no_summary: true redistribute: - protocol: eigrp id: 130 route_map: rmap_1 - protocol: direct route_map: ospf102-direct-connect vrfs: - vrf: zone1 router_id: 198.51.100.129 redistribute: - protocol: bgp id: 65563 route_map: zone1-bgp-connect areas: - area_id: 0.0.0.102 nssa: default_information_originate: true no_summary: true state: replaced # Task output # ------------- # before: # processes: # - process_id: "100" # router_id: 203.0.113.20 # - areas: # - area_id: 0.0.0.100 # filter_list: # - direction: out # route_map: rmap_2 # - direction: in # route_map: rmap_1 # ranges: # - not_advertise: true # prefix: 198.51.100.64/27 # - cost: 120 # prefix: 198.51.100.96/27 # - area_id: 0.0.0.101 # authentication: # message_digest: true # process_id: "102" # redistribute: # - protocol: direct # route_map: ospf102-direct-connect # - id: "120" # protocol: eigrp # route_map: rmap_1 # router_id: 198.51.100.1 # vrfs: # - areas: # - area_id: 0.0.0.102 # nssa: # default_information_originate: true # no_summary: true # - area_id: 0.0.0.103 # nssa: # no_summary: true # translate: # type7: # always: true # redistribute: # - protocol: static # route_map: zone1-static-connect # router_id: 198.51.100.129 # vrf: zone1 # - auto_cost: # reference_bandwidth: 45 # unit: Gbps # vrf: zone2 # # commands: # - router ospf 102 # - redistribute eigrp 130 route-map rmap_1 # - no redistribute eigrp 120 route-map rmap_1 # - area 0.0.0.100 filter-list route-map rmap_8 in # - no area 0.0.0.100 filter-list route-map rmap_2 out # - no area 0.0.0.100 range 198.51.100.96/27 # - no area 0.0.0.101 authentication # - area 0.0.0.101 stub no-summary # - vrf zone1 # - no summary-address 198.51.100.128/27 tag 121 # - no summary-address 198.51.100.160/27 # - redistribute bgp 65563 route-map zone1-bgp-connect # - no redistribute static route-map zone1-static-connect # - no area 0.0.0.103 nssa # - no area 0.0.0.103 nssa translate type7 always # - no vrf zone2 # # after: # processes: # - process_id: "100" # router_id: 203.0.113.20 # - areas: # - area_id: 0.0.0.101 # stub: # no_summary: true # - area_id: 0.0.0.100 # filter_list: # - direction: in # route_map: rmap_8 # ranges: # - not_advertise: true # prefix: 198.51.100.64/27 # process_id: "102" # redistribute: # - protocol: direct # route_map: ospf102-direct-connect # - id: "130" # protocol: eigrp # route_map: rmap_1 # router_id: 198.51.100.1 # vrfs: # - areas: # - area_id: 0.0.0.102 # nssa: # default_information_originate: true # no_summary: true # redistribute: # - id: "65563" # protocol: bgp # route_map: zone1-bgp-connect # router_id: 198.51.100.129 # vrf: zone1 # After state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospf .*" # router ospf 100 # router-id 203.0.113.20 # router ospf 102 # router-id 198.51.100.1 # area 0.0.0.101 stub no-summary # redistribute direct route-map ospf102-direct-connect # redistribute eigrp 130 route-map rmap_1 # area 0.0.0.100 filter-list route-map rmap_8 in # area 0.0.0.100 range 198.51.100.64/27 not-advertise # vrf zone1 # router-id 198.51.100.129 # area 0.0.0.102 nssa no-summary default-information-originate # redistribute bgp 65563 route-map zone1-bgp-connect # Using overridden # Before state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospf .*" # router ospf 100 # router-id 203.0.113.20 # router ospf 102 # router-id 198.51.100.1 # redistribute direct route-map ospf102-direct-connect # redistribute eigrp 120 route-map rmap_1 # area 0.0.0.100 filter-list route-map rmap_2 out # area 0.0.0.100 filter-list route-map rmap_1 in # area 0.0.0.100 range 198.51.100.64/27 not-advertise # area 0.0.0.100 range 198.51.100.96/27 cost 120 # area 0.0.0.101 authentication message-digest # vrf zone1 # router-id 198.51.100.129 # area 0.0.0.102 nssa no-summary default-information-originate # area 0.0.0.103 nssa no-summary # area 0.0.0.103 nssa translate type7 always # redistribute static route-map zone1-static-connect # summary-address 198.51.100.128/27 tag 121 # summary-address 198.51.100.160/27 # vrf zone2 # auto-cost reference-bandwidth 45 Gbps - name: Override all OSPF configuration with provided configuration cisco.nxos.nxos_ospfv2: config: processes: - process_id: 104 router_id: 203.0.113.20 - process_id: 102 router_id: 198.51.100.1 shutdown: true state: overridden # Task output # ------------- # before: # processes: # - process_id: "100" # router_id: 203.0.113.20 # - areas: # - area_id: 0.0.0.100 # filter_list: # - direction: out # route_map: rmap_2 # - direction: in # route_map: rmap_1 # ranges: # - not_advertise: true # prefix: 198.51.100.64/27 # - cost: 120 # prefix: 198.51.100.96/27 # - area_id: 0.0.0.101 # authentication: # message_digest: true # process_id: "102" # redistribute: # - protocol: direct # route_map: ospf102-direct-connect # - id: "120" # protocol: eigrp # route_map: rmap_1 # router_id: 198.51.100.1 # vrfs: # - areas: # - area_id: 0.0.0.102 # nssa: # default_information_originate: true # no_summary: true # - area_id: 0.0.0.103 # nssa: # no_summary: true # translate: # type7: # always: true # redistribute: # - protocol: static # route_map: zone1-static-connect # router_id: 198.51.100.129 # vrf: zone1 # - auto_cost: # reference_bandwidth: 45 # unit: Gbps # vrf: zone2 # # commands: # - no router ospf 100 # - router ospf 104 # - router-id 203.0.113.20 # - router ospf 102 # - shutdown # - no redistribute direct route-map ospf102-direct-connect # - no redistribute eigrp 120 route-map rmap_1 # - no area 0.0.0.100 filter-list route-map rmap_2 out # - no area 0.0.0.100 filter-list route-map rmap_1 in # - no area 0.0.0.100 range 198.51.100.64/27 # - no area 0.0.0.100 range 198.51.100.96/27 # - no area 0.0.0.101 authentication # - no vrf zone1 # - no vrf zone2 # # after: # processes: # - process_id: "102" # router_id: 198.51.100.1 # shutdown: true # - process_id: "104" # router_id: 203.0.113.20 # After state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospf .*" # router ospf 102 # router-id 198.51.100.1 # shutdown # router ospf 104 # router-id 203.0.113.20 # Using deleted to delete a single OSPF process # Before state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospf .*" # router ospf 100 # router-id 203.0.113.20 # router ospf 102 # router-id 198.51.100.1 # redistribute direct route-map ospf102-direct-connect # redistribute eigrp 120 route-map rmap_1 # area 0.0.0.100 filter-list route-map rmap_2 out # area 0.0.0.100 filter-list route-map rmap_1 in # area 0.0.0.100 range 198.51.100.64/27 not-advertise # area 0.0.0.100 range 198.51.100.96/27 cost 120 # area 0.0.0.101 authentication message-digest # vrf zone1 # router-id 198.51.100.129 # area 0.0.0.102 nssa no-summary default-information-originate # area 0.0.0.103 nssa no-summary # area 0.0.0.103 nssa translate type7 always # redistribute static route-map zone1-static-connect # summary-address 198.51.100.128/27 tag 121 # summary-address 198.51.100.160/27 # vrf zone2 # auto-cost reference-bandwidth 45 Gbps - name: Delete a single OSPF process cisco.nxos.nxos_ospfv2: config: processes: - process_id: 102 state: deleted # Task output # ------------- # before: # processes: # - process_id: "100" # router_id: 203.0.113.20 # - areas: # - area_id: 0.0.0.100 # filter_list: # - direction: out # route_map: rmap_2 # - direction: in # route_map: rmap_1 # ranges: # - not_advertise: true # prefix: 198.51.100.64/27 # - cost: 120 # prefix: 198.51.100.96/27 # - area_id: 0.0.0.101 # authentication: # message_digest: true # process_id: "102" # redistribute: # - protocol: direct # route_map: ospf102-direct-connect # - id: "120" # protocol: eigrp # route_map: rmap_1 # router_id: 198.51.100.1 # vrfs: # - areas: # - area_id: 0.0.0.102 # nssa: # default_information_originate: true # no_summary: true # - area_id: 0.0.0.103 # nssa: # no_summary: true # translate: # type7: # always: true # redistribute: # - protocol: static # route_map: zone1-static-connect # router_id: 198.51.100.129 # vrf: zone1 # - auto_cost: # reference_bandwidth: 45 # unit: Gbps # vrf: zone2 # # commands: # - no router ospf 102 # # after: # processes: # - process_id: "100" # router_id: 203.0.113.20 # After state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospf .*" # router ospf 100 # router-id 203.0.113.20 # Using deleted all OSPF processes from the device # Before state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospf .*" # router ospf 100 # router-id 203.0.113.20 # router ospf 102 # router-id 198.51.100.1 # redistribute direct route-map ospf102-direct-connect # redistribute eigrp 120 route-map rmap_1 # area 0.0.0.100 filter-list route-map rmap_2 out # area 0.0.0.100 filter-list route-map rmap_1 in # area 0.0.0.100 range 198.51.100.64/27 not-advertise # area 0.0.0.100 range 198.51.100.96/27 cost 120 # area 0.0.0.101 authentication message-digest # vrf zone1 # router-id 198.51.100.129 # area 0.0.0.102 nssa no-summary default-information-originate # area 0.0.0.103 nssa no-summary # area 0.0.0.103 nssa translate type7 always # redistribute static route-map zone1-static-connect # summary-address 198.51.100.128/27 tag 121 # summary-address 198.51.100.160/27 # vrf zone2 # auto-cost reference-bandwidth 45 Gbps - name: Delete all OSPF processes from the device cisco.nxos.nxos_ospfv2: state: deleted # Task output # ------------- # before: # processes: # - process_id: "100" # router_id: 203.0.113.20 # - areas: # - area_id: 0.0.0.100 # filter_list: # - direction: out # route_map: rmap_2 # - direction: in # route_map: rmap_1 # ranges: # - not_advertise: true # prefix: 198.51.100.64/27 # - cost: 120 # prefix: 198.51.100.96/27 # - area_id: 0.0.0.101 # authentication: # message_digest: true # process_id: "102" # redistribute: # - protocol: direct # route_map: ospf102-direct-connect # - id: "120" # protocol: eigrp # route_map: rmap_1 # router_id: 198.51.100.1 # vrfs: # - areas: # - area_id: 0.0.0.102 # nssa: # default_information_originate: true # no_summary: true # - area_id: 0.0.0.103 # nssa: # no_summary: true # translate: # type7: # always: true # redistribute: # - protocol: static # route_map: zone1-static-connect # router_id: 198.51.100.129 # vrf: zone1 # - auto_cost: # reference_bandwidth: 45 # unit: Gbps # vrf: zone2 # # commands: # - no router ospf 100 # - no router ospf 102 # # after: {} # After state: # ------------ # nxos-9k-rdo# sh running-config | section "^router ospf .*" # nxos-9k-rdo# # Using rendered - name: Render platform specific configuration lines (without connecting to the device) cisco.nxos.nxos_ospfv2: config: processes: - process_id: 100 router_id: 203.0.113.20 - process_id: 102 router_id: 198.51.100.1 areas: - area_id: 0.0.0.100 filter_list: - route_map: rmap_1 direction: in - route_map: rmap_2 direction: out ranges: - prefix: 198.51.100.64/27 not_advertise: true - prefix: 198.51.100.96/27 cost: 120 - area_id: 0.0.0.101 authentication: message_digest: true redistribute: - protocol: eigrp id: 120 route_map: rmap_1 - protocol: direct route_map: ospf102-direct-connect vrfs: - vrf: zone1 router_id: 198.51.100.129 redistribute: - protocol: static route_map: zone1-static-connect summary_address: - prefix: 198.51.100.128/27 tag: 121 - prefix: 198.51.100.160/27 areas: - area_id: 0.0.0.102 nssa: default_information_originate: true no_summary: true - area_id: 0.0.0.103 nssa: no_summary: true translate: type7: always: true - vrf: zone2 auto_cost: reference_bandwidth: 45 unit: Gbps state: rendered # Task Output (redacted) # ----------------------- # rendered: # - router ospf 100 # - router-id 203.0.113.20 # - router ospf 102 # - router-id 198.51.100.1 # - redistribute eigrp 120 route-map rmap_1 # - redistribute direct route-map ospf102-direct-connect # - area 0.0.0.100 filter-list route-map rmap_1 in # - area 0.0.0.100 filter-list route-map rmap_2 out # - area 0.0.0.100 range 198.51.100.64/27 not-advertise # - area 0.0.0.100 range 198.51.100.96/27 cost 120 # - area 0.0.0.101 authentication message-digest # - vrf zone1 # - router-id 198.51.100.129 # - summary-address 198.51.100.128/27 tag 121 # - summary-address 198.51.100.160/27 # - redistribute static route-map zone1-static-connect # - area 0.0.0.102 nssa no-summary default-information-originate # - area 0.0.0.103 nssa no-summary # - area 0.0.0.103 nssa translate type7 always # - vrf zone2 # - auto-cost reference-bandwidth 45 Gbps # Using parsed # parsed.cfg # ------------ # router ospf 100 # router-id 192.0.100.1 # area 0.0.0.101 nssa no-summary no-redistribution # area 0.0.0.102 stub no-summary # redistribute direct route-map ospf-direct-connect # redistribute eigrp 120 route-map rmap_1 # area 0.0.0.100 filter-list route-map rmap_2 out # area 0.0.0.100 filter-list route-map rmap_1 in # area 0.0.0.100 range 192.0.2.0/24 not-advertise # area 0.0.0.100 range 192.0.3.0/24 cost 120 # area 0.0.0.100 authentication message-digest # vrf zone1 # router-id 192.0.100.2 # area 0.0.100.1 nssa no-summary no-redistribution # redistribute static route-map zone1-direct-connect # summary-address 10.0.0.0/24 tag 120 # summary-address 11.0.0.0/24 not-advertise # vrf zone2 # auto-cost reference-bandwidth 45 Gbps # down-bit-ignore # capability vrf-lite evpn # shutdown # router ospf 102 # router-id 198.54.100.1 # shutdown # vrf zone2 # summary-address 192.0.8.0/24 tag 120 # vrf zone4 # shutdown - name: Parse externally provided OSPFv2 config cisco.nxos.nxos_ospfv2: running_config: "{{ lookup('file', 'ospfv2.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # processes: # - process_id: "100" # areas: # - area_id: 0.0.0.101 # nssa: # no_redistribution: true # no_summary: true # - area_id: 0.0.0.102 # stub: # no_summary: true # - area_id: 0.0.0.100 # authentication: # message_digest: true # filter_list: # - direction: out # route_map: rmap_2 # - direction: in # route_map: rmap_1 # ranges: # - not_advertise: true # prefix: 192.0.2.0/24 # - cost: 120 # prefix: 192.0.3.0/24 # redistribute: # - protocol: direct # route_map: ospf-direct-connect # - id: "120" # protocol: eigrp # route_map: rmap_1 # router_id: 192.0.100.1 # vrfs: # - vrf: zone1 # areas: # - area_id: 0.0.100.1 # nssa: # no_redistribution: true # no_summary: true # redistribute: # - protocol: static # route_map: zone1-direct-connect # router_id: 192.0.100.2 # summary_address: # - prefix: 10.0.0.0/24 # tag: 120 # - not_advertise: true # prefix: 11.0.0.0/24 # - vrf: zone2 # auto_cost: # reference_bandwidth: 45 # unit: Gbps # capability: # vrf_lite: # evpn: true # down_bit_ignore: true # shutdown: true # - process_id: "102" # router_id: 198.54.100.1 # shutdown: true # vrfs: # - vrf: zone2 # summary_address: # - prefix: 192.0.8.0/24 # tag: 120 # - vrf: zone4 # shutdown: true # Using gathered - name: Gather OSPFv2 facts using gathered cisco.nxos.nxos_ospfv2: state: gathered # Task output (redacted) # ----------------------- # gathered: # processes: # - process_id: "102" # areas: # - area_id: 0.0.0.101 # stub: # no_summary: true # - area_id: 0.0.0.100 # filter_list: # - direction: in # route_map: rmap_8 # ranges: # - not_advertise: true # prefix: 198.51.100.64/27 # redistribute: # - protocol: direct # route_map: ospf102-direct-connect # - id: "130" # protocol: eigrp # route_map: rmap_1 # router_id: 198.51.100.1 # vrfs: # - vrf: zone1 # areas: # - area_id: 0.0.0.102 # nssa: # default_information_originate: true # no_summary: true # redistribute: # - id: "65563" # protocol: bgp # route_map: zone1-bgp-connect # router_id: 198.51.100.129 # ``` 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 resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. | | **before** dictionary | always | The configuration prior to the model 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:** ['router ospf 102', 'router-id 198.54.100.1', 'router ospf 100', 'router-id 192.0.100.1', 'redistribute eigrp 120 route-map rmap\_1', 'redistribute direct route-map ospf-direct-connect', 'area 0.0.0.100 filter-list route-map rmap\_1 in', 'area 0.0.0.100 filter-list route-map rmap\_2 out', 'area 0.0.0.100 range 192.0.2.0/24 not-advertise', 'area 0.0.0.100 range 192.0.3.0/24 cost 120', 'vrf zone1', 'router-id 192.0.100.2', 'summary-address 10.0.0.0/24 tag 121', 'summary-address 11.0.0.0/24', 'redistribute static route-map zone1-direct-connect', 'vrf zone2', 'auto-cost reference-bandwidth 45 Gbps', 'capability vrf-lite evpn'] | ### Authors * Nilashish Chakraborty (@NilashishC)
programming_docs
ansible cisco.nxos.nxos_pim_rp_address – Manages configuration of an PIM static RP address instance. cisco.nxos.nxos\_pim\_rp\_address – Manages configuration of an PIM static RP address instance. =============================================================================================== 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_pim_rp_address`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages configuration of an Protocol Independent Multicast (PIM) static rendezvous point (RP) address instance. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **bidir** boolean | **Choices:*** no * yes | Group range is treated in PIM bidirectional mode. | | **group\_list** string | | Group range for static RP. Valid values are multicast addresses. | | **prefix\_list** string | | Prefix list policy for static RP. Valid values are prefix-list policy names. | | **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. | | **route\_map** string | | Route map policy for static RP. Valid values are route-map policy names. | | **rp\_address** string / required | | Configures a Protocol Independent Multicast (PIM) static rendezvous point (RP) address. Valid values are unicast addresses. | | **state** string | **Choices:*** **present** ← * absent | Specify desired state of the resource. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * `state=absent` is currently not supported on all platforms. * 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 -------- ``` - cisco.nxos.nxos_pim_rp_address: rp_address: 10.1.1.20 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 | commands sent to the device **Sample:** ['router bgp 65535', 'vrf test', 'router-id 192.0.2.1'] | ### Authors * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_igmp – Manages IGMP global configuration. cisco.nxos.nxos\_igmp – Manages IGMP global configuration. ========================================================== 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_igmp`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages IGMP global configuration configuration settings. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **enforce\_rtr\_alert** boolean | **Choices:*** no * yes | Enables or disables the enforce router alert option check for IGMPv2 and IGMPv3 packets. | | **flush\_routes** boolean | **Choices:*** no * yes | Removes routes when the IGMP process is restarted. By default, routes are not flushed. | | **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. | | **restart** boolean | **Choices:*** **no** ← * yes | Restarts the igmp process (using an exec config command). | | **state** string | **Choices:*** **present** ← * default | Manages desired state of the resource. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * When `state=default`, all supported params will be reset to a default state. * If restart is set to true with other params set, the restart will happen last, i.e. after the configuration takes place. * 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: Default igmp global params (all params except restart) cisco.nxos.nxos_igmp: state: default - name: Ensure the following igmp global config exists on the device cisco.nxos.nxos_igmp: flush_routes: true enforce_rtr_alert: true - name: Restart the igmp process cisco.nxos.nxos_igmp: restart: 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 | | --- | --- | --- | | **updates** list / elements=string | always | commands sent to the device **Sample:** ['ip igmp flush-routes'] | ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_vxlan_vtep – Manages VXLAN Network Virtualization Endpoint (NVE). cisco.nxos.nxos\_vxlan\_vtep – Manages VXLAN Network Virtualization Endpoint (NVE). =================================================================================== 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_vxlan_vtep`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages VXLAN Network Virtualization Endpoint (NVE) overlay interface that terminates VXLAN tunnels. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **description** string | | Description of the NVE interface. | | **global\_ingress\_replication\_bgp** boolean | **Choices:*** no * yes | Configures ingress replication protocol as bgp for all VNIs. This is available on Nexus 9000 series switches running NX-OS software release 9.2(x) or higher. | | **global\_mcast\_group\_L2** string | | Global multicast IP prefix for L2 VNIs or the keyword 'default'. This is available on Nexus 9000 series switches running NX-OS software release 9.2(x) or higher. | | **global\_mcast\_group\_L3** string | | Global multicast IP prefix for L3 VNIs or the keyword 'default'. This is available on Nexus 9000 series switches running NX-OS software release 9.2(x) or higher. | | **global\_suppress\_arp** boolean | **Choices:*** no * yes | Enables ARP suppression for all VNIs. This is available on NX-OS 9K series running 9.2.x or higher. | | **host\_reachability** boolean | **Choices:*** no * yes | Specify mechanism for host reachability advertisement. A Boolean value of 'true' indicates that BGP will be used for host reachability advertisement. A Boolean value of 'false' indicates that no protocol is used for host reachability advertisement. Other host reachability advertisement protocols (e.g. OpenFlow, controller, etc.) are not supported. | | **interface** string / required | | Interface name for the VXLAN Network Virtualization Endpoint. | | **multisite\_border\_gateway\_interface** string added in 1.1.0 of cisco.nxos | | Specify the loopback interface whose IP address should be used for the NVE Multisite Border-gateway Interface. This is available on specific Nexus 9000 series switches running NX-OS 7.0(3)I7(x) or higher. Specify "default" to remove an existing gateway config. | | **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. | | **shutdown** boolean | **Choices:*** no * yes | Administratively shutdown the NVE interface. | | **source\_interface** string | | Specify the loopback interface whose IP address should be used for the NVE interface. | | **source\_interface\_hold\_down\_time** string | | Suppresses advertisement of the NVE loopback address until the overlay has converged. | | **state** string | **Choices:*** **present** ← * absent | Determines whether the config should be present or not on the device. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * The module is used to manage NVE properties, not to create NVE interfaces. Use [cisco.nxos.nxos\_interface](nxos_interface_module#ansible-collections-cisco-nxos-nxos-interface-module) if you wish to do so. * `state=absent` removes the interface. * Default, where supported, restores params default value. * 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 -------- ``` - cisco.nxos.nxos_vxlan_vtep: interface: nve1 description: default host_reachability: true source_interface: Loopback0 source_interface_hold_down_time: 30 shutdown: default multisite_border_gateway_interface: Loopback0 ``` 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 | commands sent to the device **Sample:** ['interface nve1', 'source-interface loopback0', 'source-interface hold-down-time 30', 'description simple description', 'shutdown', 'host-reachability protocol bgp', 'multisite border-gateway interface loopback0'] | ### Authors * Gabriele Gerbino (@GGabriele)
programming_docs
ansible cisco.nxos.nxos_vtp_domain – Manages VTP domain configuration. cisco.nxos.nxos\_vtp\_domain – Manages VTP domain configuration. ================================================================ 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_vtp_domain`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages VTP domain configuration. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **domain** string / required | | VTP domain name. | | **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. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * VTP feature must be active on the device to use this module. * This module is used to manage only VTP domain names. * VTP domain names are case-sensible. * If it’s never been configured before, VTP version is set to 1 by default. Otherwise, it leaves the previous configured version untouched. Use [cisco.nxos.nxos\_vtp\_version](nxos_vtp_version_module#ansible-collections-cisco-nxos-nxos-vtp-version-module) to change it. * Use this in combination with [cisco.nxos.nxos\_vtp\_password](nxos_vtp_password_module#ansible-collections-cisco-nxos-nxos-vtp-password-module) and [cisco.nxos.nxos\_vtp\_version](nxos_vtp_version_module#ansible-collections-cisco-nxos-nxos-vtp-version-module) to fully manage VTP operations. * 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 -------- ``` # ENSURE VTP DOMAIN IS CONFIGURED - cisco.nxos.nxos_vtp_domain: domain: ntc host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' ``` 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 **Sample:** True | | **end\_state** dictionary | always | k/v pairs of vtp domain after module execution **Sample:** {'domain': 'ntc', 'version': '2', 'vtp\_password': ''} | | **existing** dictionary | always | k/v pairs of existing vtp domain **Sample:** {'domain': 'testing', 'version': '2', 'vtp\_password': ''} | | **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'domain': 'ntc'} | | **updates** list / elements=string | always | command sent to the device **Sample:** ['vtp domain ntc'] | ### Authors * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_snmp_user – Manages SNMP users for monitoring. cisco.nxos.nxos\_snmp\_user – Manages SNMP users for monitoring. ================================================================ 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_snmp_user`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages SNMP user configuration. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **authentication** string | **Choices:*** md5 * sha | Authentication parameters for the user. | | **encrypt** boolean | **Choices:*** no * yes | Enables AES-128 bit encryption when using privacy password. | | **group** string | | Group to which the user will belong to. If state = present, and the user is existing, the group is added to the user. If the user is not existing, user entry is created with this group argument. If state = absent, only the group is removed from the user entry. However, to maintain backward compatibility, if the existing user belongs to only one group, and if group argument is same as the existing user's group, then the user entry also is deleted. | | **privacy** string | | Privacy password for the user. This is not idempotent | | **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. | | **pwd** string | | Authentication password when using md5 or sha. This is not idempotent | | **state** string | **Choices:*** **present** ← * absent | Manage the state of the resource. | | **user** string / required | | Name of the user. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Limited Support for Cisco MDS * Authentication parameters not idempotent. * 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 -------- ``` - cisco.nxos.nxos_snmp_user: user: ntc group: network-operator authentication: md5 pwd: test_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 | | --- | --- | --- | | **commands** list / elements=string | always | commands sent to the device **Sample:** ['snmp-server user ntc network-operator auth md5 test\_password'] | ### Authors * Jason Edelman (@jedelman8) ansible cisco.nxos.nxos_ntp – Manages core NTP configuration. cisco.nxos.nxos\_ntp – Manages core NTP configuration. ====================================================== 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_ntp`. New in version 1.0.0: of cisco.nxos * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in major release after 2024-01-01 Why Updated module released with more functionality. Alternative nxos\_ntp\_global Synopsis -------- * Manages core NTP configuration. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **key\_id** string | | Authentication key identifier to use with given NTP server or peer or keyword 'default'. | | **peer** string | | Network address of NTP peer. | | **prefer** string | **Choices:*** enabled * disabled | Makes given NTP server or peer the preferred NTP server or peer for the device. | | **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. | | **server** string | | Network address of NTP server. | | **source\_addr** string | | Local source address from which NTP messages are sent or keyword 'default'. | | **source\_int** string | | Local source interface from which NTP messages are sent. Must be fully qualified interface name or keyword 'default' | | **state** string | **Choices:*** **present** ← * absent | Manage the state of the resource. | | **vrf\_name** string | | Makes the device communicate with the given NTP server or peer over a specific VRF or keyword 'default'. | 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 -------- ``` # Set NTP Server with parameters - cisco.nxos.nxos_ntp: server: 1.2.3.4 key_id: 32 prefer: enabled host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' ``` 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 **Sample:** True | | **end\_state** dictionary | always | k/v pairs of ntp info after module execution **Sample:** {'address': '192.0.2.2', 'key\_id': '48', 'peer\_type': 'server', 'prefer': 'enabled', 'source': '192.0.2.3', 'source\_type': 'source'} | | **existing** dictionary | always | k/v pairs of existing ntp server/peer **Sample:** {'address': '192.0.2.2', 'key\_id': '32', 'peer\_type': 'server', 'prefer': 'enabled', 'source': 'ethernet2/1', 'source\_type': 'source-interface'} | | **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'address': '192.0.2.2', 'key\_id': '48', 'peer\_type': 'server', 'prefer': 'enabled', 'source': '192.0.2.3', 'source\_type': 'source'} | | **updates** list / elements=string | always | command sent to the device **Sample:** ['ntp server 192.0.2.2 prefer key 48', 'no ntp source-interface ethernet2/1', 'ntp source 192.0.2.3'] | Status ------ * This module will be removed in a major release after 2024-01-01. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Jason Edelman (@jedelman8)
programming_docs
ansible cisco.nxos.nxos_l3_interfaces – L3 interfaces resource module cisco.nxos.nxos\_l3\_interfaces – L3 interfaces resource module =============================================================== 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_l3_interfaces`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages Layer-3 interfaces attributes of NX-OS Interfaces. 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 | | | **dot1q** integer | | Configures IEEE 802.1Q VLAN encapsulation on a subinterface. | | | **evpn\_multisite\_tracking** string added in 1.1.0 of cisco.nxos | **Choices:*** fabric-tracking * dci-tracking | VxLAN evpn multisite Interface tracking. Supported only on selected model. | | | **ipv4** list / elements=dictionary | | IPv4 address and attributes of the L3 interface. | | | | **address** string | | IPV4 address of the L3 interface. | | | | **secondary** boolean | **Choices:*** no * yes | A boolean attribute to manage addition of secondary IP address. | | | | **tag** integer | | URIB route tag value for local/direct routes. | | | **ipv6** list / elements=dictionary | | IPv6 address and attributes of the L3 interface. | | | | **address** string | | IPV6 address of the L3 interface. | | | | **tag** integer | | URIB route tag value for local/direct routes. | | | **name** string / required | | Full name of L3 interface, i.e. Ethernet1/1. | | | **redirects** boolean | **Choices:*** no * yes | Enables/disables ip redirects | | | **unreachables** boolean | **Choices:*** no * yes | Enables/disables ip redirects | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS 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 * gathered * rendered * parsed | The state of the configuration after module completion. The state *overridden* would override the IP address configuration of all interfaces on the device with the provided configuration in the task. Use caution with this state as you may loose access to the device. | Notes ----- Note * Tested against NXOS 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS Examples -------- ``` # Using merged # Before state: # ------------- # # interface Ethernet1/6 - name: Merge provided configuration with device configuration. cisco.nxos.nxos_l3_interfaces: config: - name: Ethernet1/6 ipv4: - address: 192.168.1.1/24 tag: 5 - address: 10.1.1.1/24 secondary: true tag: 10 ipv6: - address: fd5d:12c9:2201:2::1/64 tag: 6 - name: Ethernet1/7.42 dot1q: 42 redirects: false unreachables: false state: merged # After state: # ------------ # # interface Ethernet1/6 # ip address 192.168.22.1/24 tag 5 # ip address 10.1.1.1/24 secondary tag 10 # interface Ethernet1/6 # ipv6 address fd5d:12c9:2201:2::1/64 tag 6 # interface Ethernet1/7.42 # encapsulation dot1q 42 # no ip redirects # no ip unreachables # Using replaced # Before state: # ------------- # # interface Ethernet1/6 # ip address 192.168.22.1/24 # ipv6 address "fd5d:12c9:2201:1::1/64" - name: Replace device configuration of specified L3 interfaces with provided configuration. cisco.nxos.nxos_l3_interfaces: config: - name: Ethernet1/6 ipv4: - address: 192.168.22.3/24 state: replaced # After state: # ------------ # # interface Ethernet1/6 # ip address 192.168.22.3/24 # Using overridden # Before state: # ------------- # # interface Ethernet1/2 # ip address 192.168.22.1/24 # interface Ethernet1/6 # ipv6 address "fd5d:12c9:2201:1::1/64" - name: Override device configuration of all L3 interfaces on device with provided configuration. cisco.nxos.nxos_l3_interfaces: config: - name: Ethernet1/2 ipv4: 192.168.22.3/4 state: overridden # After state: # ------------ # # interface Ethernet1/2 # ipv4 address 192.168.22.3/24 # interface Ethernet1/6 # Using deleted # Before state: # ------------- # # interface Ethernet1/6 # ip address 192.168.22.1/24 # interface Ethernet1/2 # ipv6 address "fd5d:12c9:2201:1::1/64" - name: Delete L3 attributes of given interfaces (This won't delete the interface itself). cisco.nxos.nxos_l3_interfaces: config: - name: Ethernet1/6 - name: Ethernet1/2 state: deleted # After state: # ------------ # # interface Ethernet1/6 # interface Ethernet1/2 # Using rendered - name: Use rendered state to convert task input to device specific commands cisco.nxos.nxos_l3_interfaces: config: - name: Ethernet1/800 ipv4: - address: 192.168.1.100/24 tag: 5 - address: 10.1.1.1/24 secondary: true tag: 10 - name: Ethernet1/800 ipv6: - address: fd5d:12c9:2201:2::1/64 tag: 6 state: rendered # Task Output (redacted) # ----------------------- # rendered: # - "interface Ethernet1/800" # - "ip address 192.168.1.100/24 tag 5" # - "ip address 10.1.1.1/24 secondary tag 10" # - "interface Ethernet1/800" # - "ipv6 address fd5d:12c9:2201:2::1/64 tag 6" # Using parsed # parsed.cfg # ------------ # interface Ethernet1/800 # ip address 192.168.1.100/24 tag 5 # ip address 10.1.1.1/24 secondary tag 10 # no ip redirects # interface Ethernet1/801 # ipv6 address fd5d:12c9:2201:2::1/64 tag 6 # ip unreachables # interface mgmt0 # ip address dhcp # vrf member management - name: Use parsed state to convert externally supplied config to structured format cisco.nxos.nxos_l3_interfaces: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # - name: Ethernet1/800 # ipv4: # - address: 192.168.1.100/24 # tag: 5 # - address: 10.1.1.1/24 # secondary: True # tag: 10 # redirects: False # - name: Ethernet1/801 # ipv6: # - address: fd5d:12c9:2201:2::1/64 # tag: 6 # unreachables: True # Using gathered # Existing device config state # ------------------------------- # interface Ethernet1/1 # ip address 192.0.2.100/24 # interface Ethernet1/2 # no ip redirects # ip address 203.0.113.10/24 # ip unreachables # ipv6 address 2001:db8::1/32 - name: Gather l3_interfaces facts from the device using nxos_l3_interfaces cisco.nxos.nxos_l3_interfaces: state: gathered # Task output (redacted) # ----------------------- # gathered: # - name: Ethernet1/1 # ipv4: # - address: 192.0.2.100/24 # - name: Ethernet1/2 # ipv4: # - address: 203.0.113.10/24 # ipv6: # - address: 2001:db8::1/32 # redirects: False # unreachables: 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 | | --- | --- | --- | | **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 Ethernet1/2', 'ip address 192.168.0.1/2'] | ### Authors * Trishna Guha (@trishnaguha) ansible cisco.nxos.nxos_acl_interface – (deprecated, removed after 2022-06-01) Manages applying ACLs to interfaces. cisco.nxos.nxos\_acl\_interface – (deprecated, removed after 2022-06-01) Manages applying ACLs to interfaces. ============================================================================================================= 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_acl_interface`. New in version 1.0.0: of cisco.nxos * [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 nxos\_acl\_interfaces Synopsis -------- * Manages applying ACLs to interfaces. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **direction** string / required | **Choices:*** ingress * egress | Direction ACL to be applied in on the interface. | | **interface** string / required | | Full name of interface, e.g. *Ethernet1/1*. | | **name** string / required | | Case sensitive name of the access list (ACL). | | **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. | | **state** string | **Choices:*** **present** ← * absent | Specify desired state of the resource. | Notes ----- Note * 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: apply egress acl to ethernet1/41 cisco.nxos.nxos_acl_interface: name: ANSIBLE interface: ethernet1/41 direction: egress 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 | | --- | --- | --- | | **acl\_applied\_to** list / elements=string | always | list of interfaces the ACL is applied to **Sample:** [{'acl\_type': 'Router ACL', 'direction': 'egress', 'interface': 'Ethernet1/41', 'name': 'ANSIBLE'}] | | **commands** list / elements=string | always | commands sent to the device **Sample:** ['interface ethernet1/41', 'ip access-group ANSIBLE out'] | Status ------ * This module will be removed in a major release after 2022-06-01. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Jason Edelman (@jedelman8) * Gabriele Gerbino (@GGabriele) ansible cisco.nxos.nxos_route_maps – Route Maps resource module. cisco.nxos.nxos\_route\_maps – Route Maps resource module. ========================================================== 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_route_maps`. New in version 2.2.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages route maps configuration on devices running Cisco NX-OS. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** list / elements=dictionary | | A list of route-map configuration. | | | **entries** list / elements=dictionary | | List of entries (identified by sequence number) for this route-map. | | | | **action** string | **Choices:*** deny * permit | Route map denies or permits set operations. | | | | **continue\_sequence** integer | | Continue on a different entry within the route-map. | | | | **description** string | | Description of the route-map. | | | | **match** dictionary | | Match values from routing table. | | | | | **as\_number** dictionary | | Match BGP peer AS number. | | | | | | **as\_path\_list** list / elements=string | | AS path access list name. | | | | | | **asn** list / elements=string | | AS number. | | | | | **as\_path** list / elements=string | | Match BGP AS path access-list. | | | | | **community** dictionary | | Match BGP community list. | | | | | | **community\_list** list / elements=string | | Community list. | | | | | | **exact\_match** boolean | **Choices:*** no * yes | Do exact matching of communities. | | | | | **evpn** dictionary | | Match BGP EVPN Routes. | | | | | | **route\_types** list / elements=string | | Match route type for evpn route. | | | | | **extcommunity** dictionary | | Match BGP community list. | | | | | | **exact\_match** boolean | **Choices:*** no * yes | Do exact matching of extended communities. | | | | | | **extcommunity\_list** list / elements=string | | Extended Community list. | | | | | **interfaces** list / elements=string | | Match first hop interface of route. | | | | | **ip** dictionary | | Configure IP specific information. | | | | | | **address** dictionary | | Match address of route or match packet. | | | | | | | **access\_list** string | | IP access-list name (for use in route-maps for PBR only). | | | | | | | **prefix\_lists** list / elements=string | | Match entries of prefix-lists. | | | | | | **multicast** dictionary | | Match multicast attributes. | | | | | | | **group** dictionary | | Multicast Group prefix. Mutually exclusive with group\_range. | | | | | | | | **prefix** string | | IPv4 group prefix. | | | | | | | **group\_range** dictionary | | Multicast Group address range. Mutually exclusive with group. | | | | | | | | **first** string | | First Group address. | | | | | | | | **last** string | | Last Group address. | | | | | | | **rp** dictionary | | Rendezvous point. | | | | | | | | **prefix** string | | IPv4 rendezvous prefix. | | | | | | | | **rp\_type** string | **Choices:*** ASM * Bidir | Multicast rendezvous point type. | | | | | | | **source** string | | Multicast source address. | | | | | | **next\_hop** dictionary | | Match next-hop address of route. | | | | | | | **prefix\_lists** list / elements=string | | Match entries of prefix-lists. | | | | | | **route\_source** dictionary | | Match advertising source address of route. | | | | | | | **prefix\_lists** list / elements=string | | Match entries of prefix-lists. | | | | | **ipv6** dictionary | | Configure IPv6 specific information. | | | | | | **address** dictionary | | Match address of route or match packet. | | | | | | | **access\_list** string | | IP access-list name (for use in route-maps for PBR only). | | | | | | | **prefix\_lists** list / elements=string | | Match entries of prefix-lists. | | | | | | **multicast** dictionary | | Match multicast attributes. | | | | | | | **group** dictionary | | Multicast Group prefix. Mutually exclusive with group\_range. | | | | | | | | **prefix** string | | IPv4 group prefix. | | | | | | | **group\_range** dictionary | | Multicast Group address range. Mutually exclusive with group. | | | | | | | | **first** string | | First Group address. | | | | | | | | **last** string | | Last Group address. | | | | | | | **rp** dictionary | | Rendezvous point. | | | | | | | | **prefix** string | | IPv4 rendezvous prefix. | | | | | | | | **rp\_type** string | **Choices:*** ASM * Bidir | Multicast rendezvous point type. | | | | | | | **source** string | | Multicast source address. | | | | | | **next\_hop** dictionary | | Match next-hop address of route. | | | | | | | **prefix\_lists** list / elements=string | | Match entries of prefix-lists. | | | | | | **route\_source** dictionary | | Match advertising source address of route. | | | | | | | **prefix\_lists** list / elements=string | | Match entries of prefix-lists. | | | | | **mac\_list** list / elements=string | | Match entries of mac-lists. | | | | | **metric** list / elements=integer | | Match metric of route. | | | | | **ospf\_area** list / elements=integer | | Match ospf area. | | | | | **route\_types** list / elements=string | **Choices:*** external * inter-area * internal * intra-area * level-1 * level-2 * local * nssa-external * type-1 * type-2 | Match route-type of route. | | | | | **source\_protocol** list / elements=string | | Match source protocol. | | | | | **tags** list / elements=integer | | Match tag of route. | | | | **sequence** integer | | Sequence to insert to/delete from existing route-map entry. | | | | **set** dictionary | | Set values in destination routing protocol. | | | | | **as\_path** dictionary | | Prepend string for a BGP AS-path attribute. | | | | | | **prepend** dictionary | | Prepend to the AS-Path. | | | | | | | **as\_number** list / elements=string | | AS number. | | | | | | | **last\_as** integer | | Number of last-AS prepends. | | | | | | **tag** boolean | **Choices:*** no * yes | Set the tag as an AS-path attribute. | | | | | **comm\_list** string | | Set BGP community list (for deletion). | | | | | **community** dictionary | | Set BGP community attribute. | | | | | | **additive** boolean | **Choices:*** no * yes | Add to existing community. | | | | | | **graceful\_shutdown** boolean | **Choices:*** no * yes | Graceful Shutdown (well-known community). | | | | | | **internet** boolean | **Choices:*** no * yes | Internet (well-known community). | | | | | | **local\_as** boolean | **Choices:*** no * yes | Do not send outside local AS (well-known community). | | | | | | **no\_advertise** boolean | **Choices:*** no * yes | Do not advertise to any peer (well-known community). | | | | | | **no\_export** boolean | **Choices:*** no * yes | Do not export to next AS (well-known community). | | | | | | **number** list / elements=string | | Community number aa:nn format | | | | | **dampening** dictionary | | Set BGP route flap dampening parameters. | | | | | | **half\_life** integer | | Half-life time for the penalty. | | | | | | **max\_suppress\_time** integer | | Maximum suppress time for stable route. | | | | | | **start\_reuse\_route** integer | | Value to start reusing a route. | | | | | | **start\_suppress\_route** integer | | Value to start suppressing a route. | | | | | **distance** dictionary | | Configure administrative distance. | | | | | | **igp\_ebgp\_routes** integer | | Administrative distance for IGP or EBGP routes | | | | | | **internal\_routes** integer | | Distance for internal routes. | | | | | | **local\_routes** integer | | Distance for local routes. | | | | | **evpn** dictionary | | Set BGP EVPN Routes. | | | | | | **gateway\_ip** dictionary | | Set gateway IP for type 5 EVPN routes. Cannot set ip and use-nexthop in the same route-map sequence. | | | | | | | **ip** string | | Gateway IP address. | | | | | | | **use\_nexthop** boolean | **Choices:*** no * yes | Use nexthop address as gateway IP. | | | | | **extcomm\_list** string | | Set BGP extcommunity list (for deletion). | | | | | **forwarding\_address** boolean | **Choices:*** no * yes | Set the forwarding address. | | | | | **ip** dictionary | | Configure IP features. | | | | | | **address** dictionary | | Specify IP address. | | | | | | | **prefix\_list** string | | Name of prefix list (Max Size 63). | | | | | | **precedence** string | | Set precedence field. | | | | | **ipv6** dictionary | | Configure IPv6 features. | | | | | | **address** dictionary | | Specify IP address. | | | | | | | **prefix\_list** string | | Name of prefix list (Max Size 63). | | | | | | **precedence** string | | Set precedence field. | | | | | **label\_index** integer | | Set Segment Routing (SR) label index of route. | | | | | **level** string | **Choices:*** level-1 * level-1-2 * level-2 | Where to import route. | | | | | **local\_preference** integer | | BGP local preference path attribute. | | | | | **metric** dictionary | | Set metric for destination routing protocol. | | | | | | **bandwidth** integer | | Metric value or Bandwidth in Kbits per second (Max Size 11). | | | | | | **igrp\_delay\_metric** integer | | IGRP delay metric. | | | | | | **igrp\_effective\_bandwidth\_metric** integer | | IGRP Effective bandwidth metric (Loading) 255 is 100%. | | | | | | **igrp\_mtu** integer | | IGRP MTU of the path. | | | | | | **igrp\_reliability\_metric** integer | | IGRP reliability metric where 255 is 100 percent reliable. | | | | | **metric\_type** string | **Choices:*** external * internal * type-1 * type-2 | Type of metric for destination routing protocol. | | | | | **nssa\_only** boolean | **Choices:*** no * yes | OSPF NSSA Areas. | | | | | **null\_interface** string | | Output Null interface. | | | | | **origin** string | **Choices:*** egp * igp * incomplete | BGP origin code. | | | | | **path\_selection** string | **Choices:*** all * backup * best2 * multipaths | Path selection criteria for BGP. | | | | | **tag** integer | | Tag value for destination routing protocol. | | | | | **weight** integer | | BGP weight for routing table. | | | **route\_map** string | | Route-map name. | | **running\_config** string | | This option is used only with state *parsed*. The value of this option should be the output received from the NX-OS device by executing the command **show running-config | section '^route-map'**. 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 the configuration should be left in. With state *replaced*, for the listed route-maps, sequences that are in running-config but not in the task are negated. With state *overridden*, all route-maps that are in running-config but not in the task are negated. Please refer to examples for more details. | Notes ----- Note * Tested against NX-OS 9.3.6. * Unsupported for Cisco MDS * This module works with connection `network_cli` and `httpapi`. Examples -------- ``` # Using merged # Before state: # ------------- # nxos-9k-rdo# show running-config | section "^route-map" # nxos-9k-rdo# - name: Merge the provided configuration with the existing running configuration cisco.nxos.nxos_route_maps: config: - route_map: rmap1 entries: - sequence: 10 action: permit description: rmap1-10-permit match: ip: address: access_list: acl_1 as_path: Allow40 as_number: asn: 65564 - sequence: 20 action: deny description: rmap1-20-deny match: community: community_list: - BGPCommunity1 - BGPCommunity2 ip: address: prefix_lists: - AllowPrefix1 - AllowPrefix2 set: dampening: half_life: 30 start_reuse_route: 1500 start_suppress_route: 10000 max_suppress_time: 120 - route_map: rmap2 entries: - sequence: 20 action: permit description: rmap2-20-permit continue_sequence: 40 match: ipv6: address: prefix_lists: AllowIPv6Prefix interfaces: "{{ nxos_int1 }}" set: as_path: prepend: as_number: - 65563 - 65568 - 65569 comm_list: BGPCommunity - sequence: 40 action: deny description: rmap2-40-deny match: route_types: - level-1 - level-2 tags: 2 ip: multicast: rp: prefix: 192.0.2.0/24 rp_type: ASM source: 203.0.113.0/24 group_range: first: 239.0.0.1 last: 239.255.255.255 state: merged # Task output # ------------- # before: [] # # commands: # - "route-map rmap1 permit 10" # - "match as-number 65564" # - "match as-path Allow40" # - "match ip address acl_1" # - "description rmap1-10-permit" # - "route-map rmap1 deny 20" # - "match community BGPCommunity1 BGPCommunity2" # - "match ip address prefix-list AllowPrefix1 AllowPrefix2" # - "description rmap1-20-deny" # - "set dampening 30 1500 10000 120" # - "route-map rmap2 permit 20" # - "match interface Ethernet1/1" # - "match ipv6 address prefix-list AllowIPv6Prefix" # - "set as-path prepend 65563 65568 65569" # - "description rmap2-20-permit" # - "continue 40" # - "set comm-list BGPCommunity delete" # - "route-map rmap2 deny 40" # - "match ip multicast source 203.0.113.0/24 group-range 239.0.0.1 to 239.255.255.255 rp 192.0.2.0/24 rp-type ASM" # - "match route-type level-1 level-2" # - "match tag 2" # - "description rmap2-40-deny" # # after: # - route_map: rmap1 # entries: # - action: permit # description: rmap1-10-permit # match: # as_number: # asn: # - '65564' # as_path: # - Allow40 # ip: # address: # access_list: acl_1 # sequence: 10 # # - action: deny # description: rmap1-20-deny # match: # community: # community_list: # - BGPCommunity1 # - BGPCommunity2 # ip: # address: # prefix_lists: # - AllowPrefix1 # - AllowPrefix2 # sequence: 20 # set: # dampening: # half_life: 30 # max_suppress_time: 120 # start_reuse_route: 1500 # start_suppress_route: 10000 # # - route_map: rmap2 # entries: # - action: permit # continue_sequence: 40 # description: rmap2-20-permit # match: # interfaces: # - Ethernet1/1 # ipv6: # address: # prefix_lists: # - AllowIPv6Prefix # sequence: 20 # set: # as_path: # prepend: # as_number: # - '65563' # - '65568' # - '65569' # comm_list: BGPCommunity # # - action: deny # description: rmap2-40-deny # match: # ip: # multicast: # group_range: # first: 239.0.0.1 # last: 239.255.255.255 # rp: # prefix: 192.0.2.0/24 # rp_type: ASM # source: 203.0.113.0/24 # route_types: # - level-1 # - level-2 # tags: # - 2 # sequence: 40 # After state: # ------------ # nxos-9k-rdo# show running-config | section "^route-map" # route-map rmap1 permit 10 # match as-number 65564 # match as-path Allow40 # match ip address acl_1 # description rmap1-10-permit # route-map rmap1 deny 20 # match community BGPCommunity1 BGPCommunity2 # match ip address prefix-list AllowPrefix1 AllowPrefix2 # description rmap1-20-deny # set dampening 30 1500 10000 120 # route-map rmap2 permit 20 # match interface Ethernet1/1 # match ipv6 address prefix-list AllowIPv6Prefix # set as-path prepend 65563 65568 65569 # description rmap2-20-permit # continue 40 # set comm-list BGPCommunity delete # route-map rmap2 deny 40 # match ip multicast source 203.0.113.0/24 group-range 239.0.0.1 to 239.255.255.255 rp 192.0.2.0/24 rp-type ASM # match route-type level-1 level-2 # match tag 2 # description rmap2-40-deny # Using replaced # (for the listed route-map(s), sequences that are in running-config but not in the task are negated) # Before state: # ------------ # nxos-9k-rdo# show running-config | section "^route-map" # route-map rmap1 permit 10 # match as-number 65564 # match as-path Allow40 # match ip address acl_1 # description rmap1-10-permit # route-map rmap1 deny 20 # match community BGPCommunity1 BGPCommunity2 # match ip address prefix-list AllowPrefix1 AllowPrefix2 # description rmap1-20-deny # set dampening 30 1500 10000 120 # route-map rmap2 permit 20 # match interface Ethernet1/1 # match ipv6 address prefix-list AllowIPv6Prefix # set as-path prepend 65563 65568 65569 # description rmap2-20-permit # continue 40 # set comm-list BGPCommunity delete # route-map rmap2 deny 40 # match ip multicast source 203.0.113.0/24 group-range 239.0.0.1 to 239.255.255.255 rp 192.0.2.0/24 rp-type ASM # match route-type level-1 level-2 # match tag 2 # description rmap2-40-deny - name: Replace route-maps configurations of listed route-maps with provided configurations cisco.nxos.nxos_route_maps: config: - route_map: rmap1 entries: - sequence: 20 action: deny description: rmap1-20-deny match: community: community_list: - BGPCommunity4 - BGPCommunity5 ip: address: prefix_lists: - AllowPrefix1 set: community: local_as: True state: replaced # Task output # ------------- # before: # - route_map: rmap1 # entries: # - action: permit # description: rmap1-10-permit # match: # as_number: # asn: # - '65564' # as_path: # - Allow40 # ip: # address: # access_list: acl_1 # sequence: 10 # # - action: deny # description: rmap1-20-deny # match: # community: # community_list: # - BGPCommunity1 # - BGPCommunity2 # ip: # address: # prefix_lists: # - AllowPrefix1 # - AllowPrefix2 # sequence: 20 # set: # dampening: # half_life: 30 # max_suppress_time: 120 # start_reuse_route: 1500 # start_suppress_route: 10000 # # - route_map: rmap2 # entries: # - action: permit # continue_sequence: 40 # description: rmap2-20-permit # match: # interfaces: # - Ethernet1/1 # ipv6: # address: # prefix_lists: # - AllowIPv6Prefix # sequence: 20 # set: # as_path: # prepend: # as_number: # - '65563' # - '65568' # - '65569' # comm_list: BGPCommunity # # - action: deny # description: rmap2-40-deny # match: # ip: # multicast: # group_range: # first: 239.0.0.1 # last: 239.255.255.255 # rp: # prefix: 192.0.2.0/24 # rp_type: ASM # source: 203.0.113.0/24 # route_types: # - level-1 # - level-2 # tags: # - 2 # sequence: 40 # # commands: # - no route-map rmap1 permit 10 # - route-map rmap1 deny 20 # - no match community BGPCommunity1 BGPCommunity2 # - match community BGPCommunity4 BGPCommunity5 # - no match ip address prefix-list AllowPrefix1 AllowPrefix2 # - match ip address prefix-list AllowPrefix1 # - no set dampening 30 1500 10000 120 # - set community local-AS # # after: # - route_map: rmap1 # entries: # - sequence: 20 # action: deny # description: rmap1-20-deny # match: # community: # community_list: # - BGPCommunity4 # - BGPCommunity5 # ip: # address: # prefix_lists: # - AllowPrefix1 # set: # community: # local_as: True # # - route_map: rmap2 # entries: # - action: permit # continue_sequence: 40 # description: rmap2-20-permit # match: # interfaces: # - Ethernet1/1 # ipv6: # address: # prefix_lists: # - AllowIPv6Prefix # sequence: 20 # set: # as_path: # prepend: # as_number: # - '65563' # - '65568' # - '65569' # comm_list: BGPCommunity # # - action: deny # description: rmap2-40-deny # match: # ip: # multicast: # group_range: # first: 239.0.0.1 # last: 239.255.255.255 # rp: # prefix: 192.0.2.0/24 # rp_type: ASM # source: 203.0.113.0/24 # route_types: # - level-1 # - level-2 # tags: # - 2 # sequence: 40 # # After state: # ------------ # nxos-9k-rdo# show running-config | section "^route-map" # route-map rmap1 deny 20 # description rmap1-20-deny # match community BGPCommunity4 BGPCommunity5 # match ip address prefix-list AllowPrefix1 # set community local-AS # route-map rmap2 permit 20 # match interface Ethernet1/1 # match ipv6 address prefix-list AllowIPv6Prefix # set as-path prepend 65563 65568 65569 # description rmap2-20-permit # continue 40 # set comm-list BGPCommunity delete # route-map rmap2 deny 40 # match ip multicast source 203.0.113.0/24 group-range 239.0.0.1 to 239.255.255.255 rp 192.0.2.0/24 rp-type ASM # match route-type level-1 level-2 # match tag 2 # description rmap2-40-deny # Using overridden # Before state: # ------------ # nxos-9k-rdo# show running-config | section "^route-map" # route-map rmap1 permit 10 # match as-number 65564 # match as-path Allow40 # match ip address acl_1 # description rmap1-10-permit # route-map rmap1 deny 20 # match community BGPCommunity1 BGPCommunity2 # match ip address prefix-list AllowPrefix1 AllowPrefix2 # description rmap1-20-deny # set dampening 30 1500 10000 120 # route-map rmap2 permit 20 # match interface Ethernet1/1 # match ipv6 address prefix-list AllowIPv6Prefix # set as-path prepend 65563 65568 65569 # description rmap2-20-permit # continue 40 # set comm-list BGPCommunity delete # route-map rmap2 deny 40 # match ip multicast source 203.0.113.0/24 group-range 239.0.0.1 to 239.255.255.255 rp 192.0.2.0/24 rp-type ASM # match route-type level-1 level-2 # match tag 2 # description rmap2-40-deny - name: Override all route-maps configuration with provided configuration cisco.nxos.nxos_route_maps: config: - route_map: rmap1 entries: - sequence: 20 action: deny description: rmap1-20-deny match: community: community_list: - BGPCommunity4 - BGPCommunity5 ip: address: prefix_lists: - AllowPrefix1 set: community: local_as: True state: overridden # Task output # ------------- # before: # - route_map: rmap1 # entries: # - action: permit # description: rmap1-10-permit # match: # as_number: # asn: # - '65564' # as_path: # - Allow40 # ip: # address: # access_list: acl_1 # sequence: 10 # # - action: deny # description: rmap1-20-deny # match: # community: # community_list: # - BGPCommunity1 # - BGPCommunity2 # ip: # address: # prefix_lists: # - AllowPrefix1 # - AllowPrefix2 # sequence: 20 # set: # dampening: # half_life: 30 # max_suppress_time: 120 # start_reuse_route: 1500 # start_suppress_route: 10000 # # - route_map: rmap2 # entries: # - action: permit # continue_sequence: 40 # description: rmap2-20-permit # match: # interfaces: # - Ethernet1/1 # ipv6: # address: # prefix_lists: # - AllowIPv6Prefix # sequence: 20 # set: # as_path: # prepend: # as_number: # - '65563' # - '65568' # - '65569' # comm_list: BGPCommunity # # - action: deny # description: rmap2-40-deny # match: # ip: # multicast: # group_range: # first: 239.0.0.1 # last: 239.255.255.255 # rp: # prefix: 192.0.2.0/24 # rp_type: ASM # source: 203.0.113.0/24 # route_types: # - level-1 # - level-2 # tags: # - 2 # sequence: 40 # # commands: # - no route-map rmap1 permit 10 # - route-map rmap1 deny 20 # - no match community BGPCommunity1 BGPCommunity2 # - match community BGPCommunity4 BGPCommunity5 # - no match ip address prefix-list AllowPrefix1 AllowPrefix2 # - match ip address prefix-list AllowPrefix1 # - no set dampening 30 1500 10000 120 # - set community local-AS # - no route-map rmap2 permit 20 # - no route-map rmap2 deny 40 # # after: # - route_map: rmap1 # entries: # - sequence: 20 # action: deny # description: rmap1-20-deny # match: # community: # community_list: # - BGPCommunity4 # - BGPCommunity5 # ip: # address: # prefix_lists: # - AllowPrefix1 # set: # community: # local_as: True # # After state: # ------------ # nxos-9k-rdo# sh running-config | section "^route-map" # route-map rmap1 deny 20 # description rmap1-20-deny # match community BGPCommunity4 BGPCommunity5 # match ip address prefix-list AllowPrefix1 # set community local-AS # Using deleted to delete a single route-map # Before state: # ------------ # nxos-9k-rdo# show running-config | section "^route-map" # route-map rmap1 permit 10 # match as-number 65564 # match as-path Allow40 # match ip address acl_1 # description rmap1-10-permit # route-map rmap1 deny 20 # match community BGPCommunity1 BGPCommunity2 # match ip address prefix-list AllowPrefix1 AllowPrefix2 # description rmap1-20-deny # set dampening 30 1500 10000 120 # route-map rmap2 permit 20 # match interface Ethernet1/1 # match ipv6 address prefix-list AllowIPv6Prefix # set as-path prepend 65563 65568 65569 # description rmap2-20-permit # continue 40 # set comm-list BGPCommunity delete # route-map rmap2 deny 40 # match ip multicast source 203.0.113.0/24 group-range 239.0.0.1 to 239.255.255.255 rp 192.0.2.0/24 rp-type ASM # match route-type level-1 level-2 # match tag 2 # description rmap2-40-deny - name: Delete single route-map cisco.nxos.nxos_route_maps: config: - route_map: rmap1 state: deleted # Task output # ------------- # before: # - route_map: rmap1 # entries: # - action: permit # description: rmap1-10-permit # match: # as_number: # asn: # - '65564' # as_path: # - Allow40 # ip: # address: # access_list: acl_1 # sequence: 10 # # - action: deny # description: rmap1-20-deny # match: # community: # community_list: # - BGPCommunity1 # - BGPCommunity2 # ip: # address: # prefix_lists: # - AllowPrefix1 # - AllowPrefix2 # sequence: 20 # set: # dampening: # half_life: 30 # max_suppress_time: 120 # start_reuse_route: 1500 # start_suppress_route: 10000 # # - route_map: rmap2 # entries: # - action: permit # continue_sequence: 40 # description: rmap2-20-permit # match: # interfaces: # - Ethernet1/1 # ipv6: # address: # prefix_lists: # - AllowIPv6Prefix # sequence: 20 # set: # as_path: # prepend: # as_number: # - '65563' # - '65568' # - '65569' # comm_list: BGPCommunity # # - action: deny # description: rmap2-40-deny # match: # ip: # multicast: # group_range: # first: 239.0.0.1 # last: 239.255.255.255 # rp: # prefix: 192.0.2.0/24 # rp_type: ASM # source: 203.0.113.0/24 # route_types: # - level-1 # - level-2 # tags: # - 2 # sequence: 40 # # commands: # - no route-map rmap1 permit 10 # - no route-map rmap1 deny 20 # # after: # - route_map: rmap2 # entries: # - action: permit # continue_sequence: 40 # description: rmap2-20-permit # match: # interfaces: # - Ethernet1/1 # ipv6: # address: # prefix_lists: # - AllowIPv6Prefix # sequence: 20 # set: # as_path: # prepend: # as_number: # - '65563' # - '65568' # - '65569' # comm_list: BGPCommunity # # - action: deny # description: rmap2-40-deny # match: # ip: # multicast: # group_range: # first: 239.0.0.1 # last: 239.255.255.255 # rp: # prefix: 192.0.2.0/24 # rp_type: ASM # source: 203.0.113.0/24 # route_types: # - level-1 # - level-2 # tags: # - 2 # sequence: 40 # # After state: # ------------ # nxos-9k-rdo# sh running-config | section "^route-map" # route-map rmap2 permit 20 # match interface Ethernet1/1 # match ipv6 address prefix-list AllowIPv6Prefix # set as-path prepend 65563 65568 65569 # description rmap2-20-permit # continue 40 # set comm-list BGPCommunity delete # route-map rmap2 deny 40 # match ip multicast source 203.0.113.0/24 group-range 239.0.0.1 to 239.255.255.255 rp 192.0.2.0/24 rp-type ASM # match route-type level-1 level-2 # match tag 2 # description rmap2-40-deny # Using deleted to delete all route-maps from the device running-config # Before state: # ------------ # nxos-9k-rdo# show running-config | section "^route-map" # route-map rmap1 permit 10 # match as-number 65564 # match as-path Allow40 # match ip address acl_1 # description rmap1-10-permit # route-map rmap1 deny 20 # match community BGPCommunity1 BGPCommunity2 # match ip address prefix-list AllowPrefix1 AllowPrefix2 # description rmap1-20-deny # set dampening 30 1500 10000 120 # route-map rmap2 permit 20 # match interface Ethernet1/1 # match ipv6 address prefix-list AllowIPv6Prefix # set as-path prepend 65563 65568 65569 # description rmap2-20-permit # continue 40 # set comm-list BGPCommunity delete # route-map rmap2 deny 40 # match ip multicast source 203.0.113.0/24 group-range 239.0.0.1 to 239.255.255.255 rp 192.0.2.0/24 rp-type ASM # match route-type level-1 level-2 # match tag 2 # description rmap2-40-deny - name: Delete all route-maps cisco.nxos.nxos_route_maps: state: deleted # Task output # ------------- # before: # - route_map: rmap1 # entries: # - action: permit # description: rmap1-10-permit # match: # as_number: # asn: # - '65564' # as_path: # - Allow40 # ip: # address: # access_list: acl_1 # sequence: 10 # # - action: deny # description: rmap1-20-deny # match: # community: # community_list: # - BGPCommunity1 # - BGPCommunity2 # ip: # address: # prefix_lists: # - AllowPrefix1 # - AllowPrefix2 # sequence: 20 # set: # dampening: # half_life: 30 # max_suppress_time: 120 # start_reuse_route: 1500 # start_suppress_route: 10000 # # - route_map: rmap2 # entries: # - action: permit # continue_sequence: 40 # description: rmap2-20-permit # match: # interfaces: # - Ethernet1/1 # ipv6: # address: # prefix_lists: # - AllowIPv6Prefix # sequence: 20 # set: # as_path: # prepend: # as_number: # - '65563' # - '65568' # - '65569' # comm_list: BGPCommunity # # - action: deny # description: rmap2-40-deny # match: # ip: # multicast: # group_range: # first: 239.0.0.1 # last: 239.255.255.255 # rp: # prefix: 192.0.2.0/24 # rp_type: ASM # source: 203.0.113.0/24 # route_types: # - level-1 # - level-2 # tags: # - 2 # sequence: 40 # # commands: # - no route-map rmap1 permit 10 # - no route-map rmap1 deny 20 # - no route-map rmap2 permit 20 # - no route-map rmap2 deny 40 # # after: [] # # After state: # ------------ # nxos-9k-rdo# sh running-config | section "^route-map" - name: Render platform specific configuration lines with state rendered (without connecting to the device) cisco.nxos.nxos_route_maps: config: - route_map: rmap1 entries: - sequence: 10 action: permit description: rmap1-10-permit match: ip: address: access_list: acl_1 as_path: Allow40 as_number: asn: 65564 - sequence: 20 action: deny description: rmap1-20-deny match: community: community_list: - BGPCommunity1 - BGPCommunity2 ip: address: prefix_lists: - AllowPrefix1 - AllowPrefix2 set: dampening: half_life: 30 start_reuse_route: 1500 start_suppress_route: 10000 max_suppress_time: 120 - route_map: rmap2 entries: - sequence: 20 action: permit description: rmap2-20-permit continue_sequence: 40 match: ipv6: address: prefix_lists: AllowIPv6Prefix interfaces: "{{ nxos_int1 }}" set: as_path: prepend: as_number: - 65563 - 65568 - 65569 comm_list: BGPCommunity - sequence: 40 action: deny description: rmap2-40-deny match: route_types: - level-1 - level-2 tags: 2 ip: multicast: rp: prefix: 192.0.2.0/24 rp_type: ASM source: 203.0.113.0/24 group_range: first: 239.0.0.1 last: 239.255.255.255 state: rendered # Task Output (redacted) # ----------------------- # rendered: # - "route-map rmap1 permit 10" # - "match as-number 65564" # - "match as-path Allow40" # - "match ip address acl_1" # - "description rmap1-10-permit" # - "route-map rmap1 deny 20" # - "match community BGPCommunity1 BGPCommunity2" # - "match ip address prefix-list AllowPrefix1 AllowPrefix2" # - "description rmap1-20-deny" # - "set dampening 30 1500 10000 120" # - "route-map rmap2 permit 20" # - "match interface Ethernet1/1" # - "match ipv6 address prefix-list AllowIPv6Prefix" # - "set as-path prepend 65563 65568 65569" # - "description rmap2-20-permit" # - "continue 40" # - "set comm-list BGPCommunity delete" # - "route-map rmap2 deny 40" # - "match ip multicast source 203.0.113.0/24 group-range 239.0.0.1 to 239.255.255.255 rp 192.0.2.0/24 rp-type ASM" # - "match route-type level-1 level-2" # - "match tag 2" # - "description rmap2-40-deny" # Using parsed # parsed.cfg # ------------ # route-map rmap1 permit 10 # match as-number 65564 # match as-path Allow40 # match ip address acl_1 # description rmap1-10-permit # route-map rmap1 deny 20 # match community BGPCommunity1 BGPCommunity2 # match ip address prefix-list AllowPrefix1 AllowPrefix2 # description rmap1-20-deny # set dampening 30 1500 10000 120 # route-map rmap2 permit 20 # match interface Ethernet1/1 # match ipv6 address prefix-list AllowIPv6Prefix # set as-path prepend 65563 65568 65569 # description rmap2-20-permit # continue 40 # set comm-list BGPCommunity delete # route-map rmap2 deny 40 # match ip multicast source 203.0.113.0/24 group-range 239.0.0.1 to 239.255.255.255 rp 192.0.2.0/24 rp-type ASM # match route-type level-1 level-2 # match tag 2 # description rmap2-40-deny - name: Parse externally provided route-maps configuration cisco.nxos.nxos_route_maps: running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}" state: parsed # Task output (redacted) # ----------------------- # parsed: # - route_map: rmap1 # entries: # - action: permit # description: rmap1-10-permit # match: # as_number: # asn: # - '65564' # as_path: # - Allow40 # ip: # address: # access_list: acl_1 # sequence: 10 # # - action: deny # description: rmap1-20-deny # match: # community: # community_list: # - BGPCommunity1 # - BGPCommunity2 # ip: # address: # prefix_lists: # - AllowPrefix1 # - AllowPrefix2 # sequence: 20 # set: # dampening: # half_life: 30 # max_suppress_time: 120 # start_reuse_route: 1500 # start_suppress_route: 10000 # # - route_map: rmap2 # entries: # - action: permit # continue_sequence: 40 # description: rmap2-20-permit # match: # interfaces: # - Ethernet1/1 # ipv6: # address: # prefix_lists: # - AllowIPv6Prefix # sequence: 20 # set: # as_path: # prepend: # as_number: # - '65563' # - '65568' # - '65569' # comm_list: BGPCommunity # # - action: deny # description: rmap2-40-deny # match: # ip: # multicast: # group_range: # first: 239.0.0.1 # last: 239.255.255.255 # rp: # prefix: 192.0.2.0/24 # rp_type: ASM # source: 203.0.113.0/24 # route_types: # - level-1 # - level-2 # tags: # - 2 # sequence: 40 # Using gathered # Existing route-map config # --------------------------- # nxos-9k-rdo# show running-config | section "^route-map" # route-map rmap1 permit 10 # match as-number 65564 # match as-path Allow40 # match ip address acl_1 # description rmap1-10-permit # route-map rmap2 permit 20 # match interface Ethernet1/1 # match ipv6 address prefix-list AllowIPv6Prefix # set as-path prepend 65563 65568 65569 # description rmap2-20-permit # continue 40 # set comm-list BGPCommunity delete - name: Gather route-maps facts using gathered cisco.nxos.nxos_route_maps: state: gathered # gathered: # - route_map: rmap1 # entries: # - action: permit # description: rmap1-10-permit # match: # as_number: # asn: # - '65564' # as_path: # - Allow40 # ip: # address: # access_list: acl_1 # sequence: 10 # # - route_map: rmap2 # entries: # - action: permit # continue_sequence: 40 # description: rmap2-20-permit # match: # interfaces: # - Ethernet1/1 # ipv6: # address: # prefix_lists: # - AllowIPv6Prefix # sequence: 20 # set: # as_path: # prepend: # as_number: # - '65563' # - '65568' # - '65569' # comm_list: BGPCommunity # ``` 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 resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. | | **before** dictionary | always | The configuration prior to the model 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:** ['route-map rmap1 permit 10', 'match as-number 65564', 'match as-path Allow40', 'match ip address acl\_1', 'description rmap1-10-permit', 'route-map rmap1 deny 20', 'match community BGPCommunity1 BGPCommunity2'] | ### Authors * Nilashish Chakraborty (@NilashishC)
programming_docs
ansible cisco.nxos.nxos_banner – Manage multiline banners on Cisco NXOS devices cisco.nxos.nxos\_banner – Manage multiline banners 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_banner`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This will configure both exec and motd banners on remote devices running Cisco NXOS. 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:*** exec * motd | Specifies which banner that should be configured on the remote device. | | **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. | | **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 * Since responses from the device are always read with surrounding whitespaces stripped, tasks that configure banners with preceeding or trailing whitespaces will not be idempotent. * 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: configure the exec banner cisco.nxos.nxos_banner: banner: exec text: | this is my exec banner that contains a multiline string state: present - name: remove the motd banner cisco.nxos.nxos_banner: banner: motd state: absent - name: Configure banner from file cisco.nxos.nxos_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 | The list of configuration mode commands to send to the device **Sample:** ['banner exec', 'this is my exec banner', 'that contains a multiline', 'string'] | ### Authors * Trishna Guha (@trishnaguha) ansible cisco.nxos.nxos_ntp_auth – Manages NTP authentication. cisco.nxos.nxos\_ntp\_auth – Manages NTP authentication. ======================================================== 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_ntp_auth`. New in version 1.0.0: of cisco.nxos * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in major release after 2024-01-01 Why Updated module released with more functionality. Alternative nxos\_ntp\_global Synopsis -------- * Manages NTP authentication. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auth\_type** string | **Choices:*** **text** ← * encrypt | Whether the given md5string is in cleartext or has been encrypted. If in cleartext, the device will encrypt it before storing it. | | **authentication** string | **Choices:*** on * off | Turns NTP authentication on or off. | | **key\_id** string | | Authentication key identifier (numeric). | | **md5string** string | | MD5 String. | | **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. | | **state** string | **Choices:*** **present** ← * absent | Manage the state of the resource. | | **trusted\_key** string | **Choices:*** **false** ← * true | Whether the given key is required to be supplied by a time source for the device to synchronize to the time source. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Limited Support for Cisco MDS * If `state=absent`, the module will remove the given key configuration if it exists. * If `state=absent` and `authentication=on`, authentication will be turned off. * 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 -------- ``` # Basic NTP authentication configuration - cisco.nxos.nxos_ntp_auth: key_id: 32 md5string: hello auth_type: text ``` 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 | command sent to the device **Sample:** ['ntp authentication-key 32 md5 helloWorld 0', 'ntp trusted-key 32'] | Status ------ * This module will be removed in a major release after 2024-01-01. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Jason Edelman (@jedelman8) ansible cisco.nxos.nxos_udld_interface – Manages UDLD interface configuration params. cisco.nxos.nxos\_udld\_interface – Manages UDLD interface configuration params. =============================================================================== 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_udld_interface`. New in version 1.0.0: of cisco.nxos * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages UDLD interface configuration params. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **interface** string / required | | FULL name of the interface, i.e. Ethernet1/1- | | **mode** string / required | **Choices:*** enabled * disabled * aggressive | Manages UDLD mode for an interface. | | **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. | | **state** string | **Choices:*** **present** ← * absent | Manage the state of the resource. | Notes ----- Note * Tested against NXOSv 7.3.(0)D1(1) on VIRL * Unsupported for Cisco MDS * Feature UDLD must be enabled on the device to use this module. * 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 -------- ``` # ensure Ethernet1/1 is configured to be in aggressive mode - cisco.nxos.nxos_udld_interface: interface: Ethernet1/1 mode: aggressive state: present host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' # Remove the aggressive config only if it's currently in aggressive mode and then disable udld (switch default) - cisco.nxos.nxos_udld_interface: interface: Ethernet1/1 mode: aggressive state: absent host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' # ensure Ethernet1/1 has aggressive mode enabled - cisco.nxos.nxos_udld_interface: interface: Ethernet1/1 mode: enabled host: '{{ inventory_hostname }}' username: '{{ un }}' password: '{{ pwd }}' ``` 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 **Sample:** True | | **end\_state** dictionary | always | k/v pairs of configuration after module execution **Sample:** {'mode': 'enabled'} | | **existing** dictionary | always | k/v pairs of existing configuration **Sample:** {'mode': 'aggressive'} | | **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'mode': 'enabled'} | | **updates** list / elements=string | always | command sent to the device **Sample:** ['interface ethernet1/33', 'no udld aggressive ; no udld disable'] | ### Authors * Jason Edelman (@jedelman8)
programming_docs
ansible cisco.nso.nso_verify – Verifies Cisco NSO configuration. cisco.nso.nso\_verify – Verifies Cisco NSO configuration. ========================================================= Note This plugin is part of the [cisco.nso collection](https://galaxy.ansible.com/cisco/nso) (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 cisco.nso`. To use it in a playbook, specify: `cisco.nso.nso_verify`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module provides support for verifying Cisco NSO configuration is in compliance with specified values. Requirements ------------ The below requirements are needed on the host that executes this module. * Cisco NSO version 3.4.12 or higher, 4.2.7 or higher, 4.3.8 or higher, 4.4.3 or higher, 4.5 or higher. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **data** dictionary / required | | NSO data in format as `| display json` converted to YAML. List entries can be annotated with a `__state` entry. Set to in-sync/deep-in-sync for services to verify service is in sync with the network. Set to absent in list entries to ensure they are deleted if they exist in NSO. | | **password** string / required | | NSO password | | **timeout** integer | **Default:**300 | JSON-RPC request timeout in seconds | | **url** string / required | | NSO JSON-RPC URL, http://localhost:8080/jsonrpc | | **username** string / required | | NSO username | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | When set to true, validates the SSL certificate of NSO when using SSL | See Also -------- See also [Cisco DevNet NSO Sandbox](https://blogs.cisco.com/developer/nso-learning-lab-and-sandbox) Provides a reservable pod with NSO, virtual network topology simulated with Cisco CML and a Linux host running Ansible [NSO Developer Resources on DevNet](https://developer.cisco.com/docs/nso/) Documentation for getting started using NSO [NSO Developer Hub](https://community.cisco.com/t5/nso-developer-hub/ct-p/5672j-dev-nso) Collaboration community portal for NSO developers [NSO Developer Github](https://github.com/NSO-developer/) Code for NSO on Github Examples -------- ``` - name: VERIFY INTERFACE IS ADMINISTRATIVELY UP cisco.nso.nso_verify: url: http://localhost:8080/jsonrpc username: username password: password data: tailf-ncs:devices: device: - name: dist-sw01 config: interface: Ethernet: - name: "1/1" shutdown: false ``` 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 | | --- | --- | --- | | **violations** complex | failed | List of value violations **Sample:** [{'expected-value': False, 'path': '/ncs:devices/device{dist-sw01}/config/interface/Ethernet{1/1}/shutdown', 'value': True}] | | | **expected-value** string | always | Expected value of path | | | **path** string | always | Path to the value in violation | | | **value** string | always | Current value of path | ### Authors * Claes NΓ€stΓ©n (@cnasten) ansible Cisco.Nso 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. ansible cisco.nso.nso_show – Displays data from Cisco NSO. cisco.nso.nso\_show – Displays data from Cisco NSO. =================================================== Note This plugin is part of the [cisco.nso collection](https://galaxy.ansible.com/cisco/nso) (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 cisco.nso`. To use it in a playbook, specify: `cisco.nso.nso_show`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module provides support for displaying data from Cisco NSO. Requirements ------------ The below requirements are needed on the host that executes this module. * Cisco NSO version 3.4.12 or higher, 4.1.9 or higher, 4.2.6 or higher, 4.3.7 or higher, 4.4.5 or higher, 4.5 or higher. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **operational** boolean | **Choices:*** **no** ← * yes | Controls whether or not operational data is included in the result. | | **password** string / required | | NSO password | | **path** string / required | | Path to NSO data. | | **timeout** integer | **Default:**300 | JSON-RPC request timeout in seconds | | **url** string / required | | NSO JSON-RPC URL, http://localhost:8080/jsonrpc | | **username** string / required | | NSO username | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | When set to true, validates the SSL certificate of NSO when using SSL | See Also -------- See also [Cisco DevNet NSO Sandbox](https://blogs.cisco.com/developer/nso-learning-lab-and-sandbox) Provides a reservable pod with NSO, virtual network topology simulated with Cisco CML and a Linux host running Ansible [NSO Developer Resources on DevNet](https://developer.cisco.com/docs/nso/) Documentation for getting started using NSO [NSO Developer Hub](https://community.cisco.com/t5/nso-developer-hub/ct-p/5672j-dev-nso) Collaboration community portal for NSO developers [NSO Developer Github](https://github.com/NSO-developer/) Code for NSO on Github Examples -------- ``` - name: DISPLAY DEVICE INCLUDING OPERATIONAL DATA cisco.nso.nso_show: url: https://10.10.20.49/jsonrpc username: developer password: C1sco12345 path: /ncs:devices/device{dist-rtr01} operational: true register: result - name: Display the result debug: var: result - name: DISPLAY INTERFACES cisco.nso.nso_show: url: "https://10.10.20.49/jsonrpc" username: developer password: C1sco12345 path: /ncs:devices/device{dist-rtr01}/config/interface operational: true register: result - name: Display the result debug: var: result ``` 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** dictionary | success | Configuration | ### Authors * Claes NΓ€stΓ©n (@cnasten) ansible cisco.nso.nso_action – Executes Cisco NSO actions and verifies output. cisco.nso.nso\_action – Executes Cisco NSO actions and verifies output. ======================================================================= Note This plugin is part of the [cisco.nso collection](https://galaxy.ansible.com/cisco/nso) (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 cisco.nso`. To use it in a playbook, specify: `cisco.nso.nso_action`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module provides support for executing Cisco NSO actions and then verifying that the output is as expected. Requirements ------------ The below requirements are needed on the host that executes this module. * Cisco NSO version 3.4 or higher. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **input** dictionary | | NSO action parameters. | | **output\_invalid** dictionary | | List of result parameter names that will cause the task to fail if they are present. | | **output\_required** dictionary | | Required output parameters. | | **password** string / required | | NSO password | | **path** string / required | | Path to NSO action. | | **timeout** integer | **Default:**300 | JSON-RPC request timeout in seconds | | **url** string / required | | NSO JSON-RPC URL, http://localhost:8080/jsonrpc | | **username** string / required | | NSO username | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | When set to true, validates the SSL certificate of NSO when using SSL | | **validate\_strict** boolean | **Choices:*** **no** ← * yes | If set to true, the task will fail if any output parameters not in output\_required is present in the output. | See Also -------- See also [Cisco DevNet NSO Sandbox](https://blogs.cisco.com/developer/nso-learning-lab-and-sandbox) Provides a reservable pod with NSO, virtual network topology simulated with Cisco CML and a Linux host running Ansible [NSO Developer Resources on DevNet](https://developer.cisco.com/docs/nso/) Documentation for getting started using NSO [NSO Developer Hub](https://community.cisco.com/t5/nso-developer-hub/ct-p/5672j-dev-nso) Collaboration community portal for NSO developers [NSO Developer Github](https://github.com/NSO-developer/) Code for NSO on Github Examples -------- ``` - name: Sync NSO device cisco.nso.nso_action: url: https://10.10.20.49/jsonrpc username: developer password: C1sco12345 path: /ncs:devices/device{dist-rtr01}/sync-from input: {} - name: Check device sync cisco.nso.nso_action: url: https://10.10.20.49/jsonrpc username: developer password: C1sco12345 path: /ncs:devices/check-sync input: {} - name: Load Native Config cisco.nso.nso_action: url: "https://10.10.20.49/jsonrpc" username: developer password: C1sco12345 path: /ncs:devices/ncs:device{dist-rtr01}/load-native-config input: { file: "/home/developer/test.cfg" , verbose: true, mode: "merge"} register: result ``` 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** dictionary | success | Action output **Sample:** {'result': True} | ### Authors * Claes NΓ€stΓ©n (@cnasten) ansible cisco.nso.nso_query – Query data from Cisco NSO. cisco.nso.nso\_query – Query data from Cisco NSO. ================================================= Note This plugin is part of the [cisco.nso collection](https://galaxy.ansible.com/cisco/nso) (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 cisco.nso`. To use it in a playbook, specify: `cisco.nso.nso_query`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module provides support for querying data from Cisco NSO using XPath. Requirements ------------ The below requirements are needed on the host that executes this module. * Cisco NSO version 3.4 or higher. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **fields** list / elements=string / required | | List of fields to select from matching nodes. | | **password** string / required | | NSO password | | **timeout** integer | **Default:**300 | JSON-RPC request timeout in seconds | | **url** string / required | | NSO JSON-RPC URL, http://localhost:8080/jsonrpc | | **username** string / required | | NSO username | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | When set to true, validates the SSL certificate of NSO when using SSL | | **xpath** string / required | | XPath selection relative to the root. | See Also -------- See also [Cisco DevNet NSO Sandbox](https://blogs.cisco.com/developer/nso-learning-lab-and-sandbox) Provides a reservable pod with NSO, virtual network topology simulated with Cisco CML and a Linux host running Ansible [NSO Developer Resources on DevNet](https://developer.cisco.com/docs/nso/) Documentation for getting started using NSO [NSO Developer Hub](https://community.cisco.com/t5/nso-developer-hub/ct-p/5672j-dev-nso) Collaboration community portal for NSO developers [NSO Developer Github](https://github.com/NSO-developer/) Code for NSO on Github Examples -------- ``` - name: QUERY DEVICES DISPLAYING NAME AND DESCRIPTION cisco.nso.nso_query: url: https://10.10.20.49/jsonrpc username: developer password: C1sco12345 xpath: /ncs:devices/device fields: - name - description register: nso_query_result - name: DISPLAY NSO_QUERY RESULT debug: var: nso_query_result ``` 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 | success | Value of matching nodes | ### Authors * Claes NΓ€stΓ©n (@cnasten) ansible cisco.nso.nso_config – Manage Cisco NSO configuration and service synchronization. cisco.nso.nso\_config – Manage Cisco NSO configuration and service synchronization. =================================================================================== Note This plugin is part of the [cisco.nso collection](https://galaxy.ansible.com/cisco/nso) (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 cisco.nso`. To use it in a playbook, specify: `cisco.nso.nso_config`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module provides support for managing configuration in Cisco NSO and can also ensure services are in sync. Requirements ------------ The below requirements are needed on the host that executes this module. * Cisco NSO version 3.4.12 or higher, 4.2.7 or higher, 4.3.8 or higher, 4.4.3 or higher, 4.5 or higher. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **commit\_flags** list / elements=string | | A list containing commit flags. See the API documentation for supported commit flags. https://developer.cisco.com/docs/nso/guides/#!life-cycle-operations-how-to-manipulate-existing-services-and-devices/commit-flags-and-device-service-actions | | **data** dictionary / required | | NSO data in format as | display json converted to YAML. List entries can be annotated with a \_\_state entry. Set to in-sync/deep-in-sync for services to verify service is in sync with the network. Set to absent in list entries to ensure they are deleted if they exist in NSO. | | **password** string / required | | NSO password | | **timeout** integer | **Default:**300 | JSON-RPC request timeout in seconds | | **url** string / required | | NSO JSON-RPC URL, http://localhost:8080/jsonrpc | | **username** string / required | | NSO username | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | When set to true, validates the SSL certificate of NSO when using SSL | See Also -------- See also [Cisco DevNet NSO Sandbox](https://blogs.cisco.com/developer/nso-learning-lab-and-sandbox) Provides a reservable pod with NSO, virtual network topology simulated with Cisco CML and a Linux host running Ansible [NSO Developer Resources on DevNet](https://developer.cisco.com/docs/nso/) Documentation for getting started using NSO [NSO Developer Hub](https://community.cisco.com/t5/nso-developer-hub/ct-p/5672j-dev-nso) Collaboration community portal for NSO developers [NSO Developer Github](https://github.com/NSO-developer/) Code for NSO on Github Examples -------- ``` - name: CREATE DEVICE IN NSO cisco.nso.nso_config: url: https://10.10.20.49/jsonrpc username: developer password: C1sco12345 data: tailf-ncs:devices: device: - address: 10.10.20.175 description: CONFIGURED BY ANSIBLE! name: dist-rtr01 authgroup: "labadmin" device-type: cli: ned-id: "cisco-ios-cli-6.44" port: "22" state: admin-state: "unlocked" - name: ADD NEW LOOPBACK cisco.nso.nso_config: url: https://10.10.20.49/jsonrpc username: developer password: C1sco12345 data: tailf-ncs:devices: device: - name: dist-rtr01 config: tailf-ned-cisco-ios:interface: Loopback: - name: "1" description: Created by Ansible! - name: CONFIGURE IP ADDRESS ON LOOPBACK cisco.nso.nso_config: url: https://10.10.20.49/jsonrpc username: developer password: C1sco12345 data: tailf-ncs:devices: device: - name: dist-rtr01 config: tailf-ned-cisco-ios:interface: Loopback: - name: "1" description: Created by Ansible! ip: address: primary: address: 10.10.10.10 mask: 255.255.255.255 - name: CONFIGURE NTP SERVER ON DEVICE cisco.nso.nso_config: url: https://10.10.20.49/jsonrpc username: developer password: C1sco12345 data: tailf-ncs:devices: device: - name: dist-rtr01 config: tailf-ned-cisco-ios:ntp: server: peer-list: - name: 2.2.2.2 ``` 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 | | --- | --- | --- | | **changes** complex | always | List of changes **Sample:** [{'from': None, 'path': '/ncs:devices/device{dist-rtr01}/config/ios:interface/Loopback{1}/ip/address/primary/address', 'to': '10.10.10.10', 'type': 'set'}] | | | **from** string | When previous value is present on value change | Previous value if any, else null | | | **path** string | always | Path to value changed | | **commit\_result** complex | always | Return values from commit operation **Sample:** [{'commit\_queue': {'id': 1611776004976, 'status': 'async'}}] | | | **commit\_queue** dictionary | When commit-queue is set in commit\_flags | Commit queue ID and status, if any | | **diffs** complex | always | List of sync changes | | | **diff** string | always | configuration difference triggered the re-deploy | | | **path** string | always | keypath to service changed | ### Authors * Claes NΓ€stΓ©n (@cnasten)
programming_docs
ansible cisco.aci.aci_epg – Manage End Point Groups (EPG) objects (fv:AEPg) cisco.aci.aci\_epg – Manage End Point Groups (EPG) objects (fv:AEPg) ==================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_epg`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage End Point Groups (EPG) on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **ap** string | | Name of an existing application network profile, that will contain the EPGs. aliases: app\_profile, app\_profile\_name | | **bd** string | | Name of the bridge domain being associated with the EPG. aliases: bd\_name, bridge\_domain | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **custom\_qos\_policy** string | | The name of the custom Quality of Service policy. | | **description** string | | Description for the EPG. aliases: descr | | **epg** string | | Name of the end point group. aliases: epg\_name, name | | **fwd\_control** string | **Choices:*** none * proxy-arp | The forwarding control used by the EPG. The APIC defaults to `none` when unset during creation. | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **intra\_epg\_isolation** string | **Choices:*** enforced * unenforced | The Intra EPG Isolation. The APIC defaults to `unenforced` when unset during creation. | | **monitoring\_policy** string | | The name of the monitoring policy. | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **preferred\_group** boolean | **Choices:*** no * yes | Whether ot not the EPG is part of the Preferred Group and can communicate without contracts. This is very convenient for migration scenarios, or when ACI is used for network automation but not for policy. The APIC defaults to `no` when unset during creation. | | **priority** string | **Choices:*** level1 * level2 * level3 * unspecified | The QoS class. The APIC defaults to `unspecified` when unset during creation. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | Name of an existing tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The `tenant` and `app_profile` used must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) and [cisco.aci.aci\_ap](aci_ap_module#ansible-collections-cisco-aci-aci-ap-module) modules can be used for this. See Also -------- See also [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [cisco.aci.aci\_ap](aci_ap_module#ansible-collections-cisco-aci-aci-ap-module) The official documentation on the **cisco.aci.aci\_ap** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **fv:AEPg**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add a new EPG cisco.aci.aci_epg: host: apic username: admin password: SomeSecretPassword tenant: production ap: intranet epg: web_epg description: Web Intranet EPG bd: prod_bd monitoring_policy: default preferred_group: yes state: present delegate_to: localhost - aci_epg: host: apic username: admin password: SomeSecretPassword tenant: production ap: ticketing epg: "{{ item.epg }}" description: Ticketing EPG bd: "{{ item.bd }}" priority: unspecified intra_epg_isolation: unenforced state: present delegate_to: localhost with_items: - epg: web bd: web_bd - epg: database bd: database_bd - name: Remove an EPG cisco.aci.aci_epg: host: apic username: admin password: SomeSecretPassword validate_certs: no tenant: production app_profile: intranet epg: web_epg monitoring_policy: default state: absent delegate_to: localhost - name: Query an EPG cisco.aci.aci_epg: host: apic username: admin password: SomeSecretPassword tenant: production ap: ticketing epg: web_epg state: query delegate_to: localhost register: query_result - name: Query all EPGs cisco.aci.aci_epg: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result - name: Query all EPGs with a Specific Name cisco.aci.aci_epg: host: apic username: admin password: SomeSecretPassword validate_certs: no epg: web_epg state: query delegate_to: localhost register: query_result - name: Query all EPGs of an App Profile cisco.aci.aci_epg: host: apic username: admin password: SomeSecretPassword validate_certs: no ap: ticketing state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Swetha Chunduri (@schunduri) * Shreyas Srish (@shrsr) ansible cisco.aci.aci_maintenance_group_node – Manage maintenance group nodes cisco.aci.aci\_maintenance\_group\_node – Manage maintenance group nodes ======================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_maintenance_group_node`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage maintenance group nodes Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **group** string | | The maintenance group name that you want to add the node to. | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **node** string | | The node to be added to the maintenance group. The value equals the nodeid. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: maintenance group cisco.aci.aci_maintenance_group_node: host: "{{ inventory_hostname }}" username: "{{ user }}" password: "{{ pass }}" validate_certs: no group: maintenancegrp1 node: 1001 state: present - name: maintenance group cisco.aci.aci_maintenance_group_node: host: "{{ inventory_hostname }}" username: "{{ user }}" password: "{{ pass }}" validate_certs: no group: maintenancegrp1 node: 1002 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Steven Gerhart (@sgerhart)
programming_docs
ansible cisco.aci.aci_static_binding_to_epg – Bind static paths to EPGs (fv:RsPathAtt) cisco.aci.aci\_static\_binding\_to\_epg – Bind static paths to EPGs (fv:RsPathAtt) ================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_static_binding_to_epg`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Bind static paths to EPGs on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **ap** string | | Name of an existing application network profile, that will contain the EPGs. aliases: app\_profile, app\_profile\_name | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **deploy\_immediacy** string | **Choices:*** immediate * lazy | The Deployment Immediacy of Static EPG on PC, VPC or Interface. The APIC defaults to `lazy` when unset during creation. | | **description** string | | Description for the static path to EPG binding. aliases: descr | | **encap\_id** integer | | The encapsulation ID associating the `epg` with the interface path. This acts as the secondary `encap_id` when using micro-segmentation. Accepted values are any valid encap ID for specified encap, currently ranges between `1` and `4096`. aliases: vlan, vlan\_id | | **epg** string | | The name of the end point group. aliases: epg\_name | | **extpaths** list / elements=string | | The `extpaths` integer value part of the tDn. `extpaths` is only used if `interface_type` is `fex`, `fex_vpc` or `fex_port_channel`. When `interface_type` is `fex_vpc`, then `extpaths` is a list with both fex IDs. Usually something like `1011`. | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **interface** string | | The `interface` string value part of the tDn. Usually a policy group like `test-IntPolGrp` or an interface of the following format `1/7` depending on `interface_type`. | | **interface\_mode** string | **Choices:*** 802.1p * access * native * regular * tagged * trunk * untagged | Determines how layer 2 tags will be read from and added to frames. Values `802.1p` and `native` are identical. Values `access` and `untagged` are identical. Values `regular`, `tagged` and `trunk` are identical. The APIC defaults to `trunk` when unset during creation. aliases: interface\_mode\_name, mode | | **interface\_type** string | **Choices:*** fex * port\_channel * **switch\_port** ← * vpc * fex\_port\_channel * fex\_vpc | The type of interface for the static EPG deployment. | | **leafs** list / elements=string | | The switch ID(s) that the `interface` belongs to. When `interface_type` is `switch_port`, `port_channel`, or `fex`, then `leafs` is a string of the leaf ID. When `interface_type` is `vpc`, then `leafs` is a list with both leaf IDs. The `leafs` value is usually something like '101' or '101-102' depending on `connection_type`. aliases: leaves, nodes, paths, switches | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **pod\_id** integer | | The pod number part of the tDn. `pod_id` is usually an integer below `10`. aliases: pod, pod\_number | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **primary\_encap\_id** string | | Determines the primary encapsulation ID associating the `epg` with the interface path when using micro-segmentation. Accepted values are any valid encap ID for specified encap, currently ranges between `1` and `4096` and C(unknown. `unknown` is the default value and using `unknown` disables the Micro-Segmentation. aliases: primary\_vlan, primary\_vlan\_id | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | Name of an existing tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The `tenant`, `ap`, `epg` used must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module), [cisco.aci.aci\_ap](aci_ap_module#ansible-collections-cisco-aci-aci-ap-module), [cisco.aci.aci\_epg](aci_epg_module#ansible-collections-cisco-aci-aci-epg-module) modules can be used for this. See Also -------- See also [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [cisco.aci.aci\_ap](aci_ap_module#ansible-collections-cisco-aci-aci-ap-module) The official documentation on the **cisco.aci.aci\_ap** module. [cisco.aci.aci\_epg](aci_epg_module#ansible-collections-cisco-aci-aci-epg-module) The official documentation on the **cisco.aci.aci\_epg** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **fv:RsPathAtt**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Deploy Static Path binding for given EPG cisco.aci.aci_static_binding_to_epg: host: apic username: admin password: SomeSecretPassword tenant: accessport-code-cert ap: accessport_code_app epg: accessport_epg1 encap_id: 222 deploy_immediacy: lazy interface_mode: untagged interface_type: switch_port pod_id: 1 leafs: 101 interface: '1/7' state: present delegate_to: localhost - name: Remove Static Path binding for given EPG cisco.aci.aci_static_binding_to_epg: host: apic username: admin password: SomeSecretPassword tenant: accessport-code-cert ap: accessport_code_app epg: accessport_epg1 interface_type: switch_port pod: 1 leafs: 101 interface: '1/7' state: absent delegate_to: localhost - name: Get specific Static Path binding for given EPG cisco.aci.aci_static_binding_to_epg: host: apic username: admin password: SomeSecretPassword tenant: accessport-code-cert ap: accessport_code_app epg: accessport_epg1 interface_type: switch_port pod: 1 leafs: 101 interface: '1/7' state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Bruno Calogero (@brunocalogero) * Marcel Zehnder (@maercu) ansible cisco.aci.aci_syslog_source – Manage Syslog Source objects (syslog:Src) cisco.aci.aci\_syslog\_source – Manage Syslog Source objects (syslog:Src) ========================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_syslog_source`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage Syslog Source objects Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **destination\_group** string | | Name of an existing syslog group | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **include** list / elements=string | **Choices:*** audit * events * faults * session | List of message types to include | | **min\_severity** string | **Choices:*** alerts * critical * debugging * emergencies * errors * information * notifications * warnings | Minimum Severity of message to include | | **name** string | | Name of the Syslog Source policy aliases: syslog\_src, syslog\_source | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **syslog:Src**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add a new syslog source cisco.aci.aci_syslog_source: host: apic username: admin password: SomeSecretPassword name: my_syslog_src include: - audit - events - faults min_severity: errors destination_group: my_syslog_group state: present delegate_to: localhost - name: Remove an existing syslog source cisco.aci.aci_syslog_source: host: apic username: admin password: SomeSecretPassword name: my_syslog_src state: absent delegate_to: localhost - name: Query all syslog sources cisco.aci.aci_syslog_source: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result - name: Query a specific syslog source cisco.aci.aci_syslog_source: host: apic username: admin password: SomeSecretPassword name: my_syslog_src state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Tim Cragg (@timcragg)
programming_docs
ansible cisco.aci.aci_bd_dhcp_label – Manage DHCP Labels (dhcp:Lbl) cisco.aci.aci\_bd\_dhcp\_label – Manage DHCP Labels (dhcp:Lbl) ============================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_bd_dhcp_label`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage DHCP Labels on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **bd** string | | The name of the Bridge Domain. aliases: bd\_name | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | The description for the DHCP Label. aliases: descr | | **dhcp\_label** string | | The name of the DHCP Relay Label. aliases: name | | **dhcp\_option** string | | Name of the DHCP Option Policy to be associated with the DCHP Relay Policy. This policy need to be present in the same tenant as the bridge domain. The DHCP option is used to supply DHCP clients with configuration parameters such as a domain, name server, subnet, and network address. | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **scope** string | **Choices:*** **infra** ← * tenant | Represents the target relay servers ownership. aliases: owner | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | The name of the Tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * A DHCP relay label contains a `name` for the label, the `scope`, and a DHCP option policy. The scope is the `owner` of the relay server and the DHCP option policy supplies DHCP clients with configuration parameters such as domain, nameserver, and subnet router addresses. * The `tenant` and `bd` used must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) module and [cisco.aci.aci\_bd](aci_bd_module#ansible-collections-cisco-aci-aci-bd-module) can be used for these. See Also -------- See also [cisco.aci.aci\_bd](aci_bd_module#ansible-collections-cisco-aci-aci-bd-module) The official documentation on the **cisco.aci.aci\_bd** module. [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **dhcp:Lbl**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Create a new DHCP Relay Label to a Bridge Domain cisco.aci.aci_bd_dhcp_label: host: apic username: admin password: SomeSecretPassword tenant: production bd: database dhcp_label: label1 scope: infra state: present - name: Query a DHCP Relay Label of a Bridge Domain cisco.aci.aci_bd_dhcp_label: host: apic username: admin password: SomeSecretPassword tenant: production bd: database dhcp_label: label1 scope: infra state: query - name: Query all DHCP Relay Labels of a Bridge Domain cisco.aci.aci_bd_dhcp_label: host: apic username: admin password: SomeSecretPassword tenant: production bd: database state: query - name: Remove a DHCP Relay Label for a Bridge Domain cisco.aci.aci_bd_dhcp_label: host: apic username: admin password: SomeSecretPassword tenant: production bd: database dhcp_label: label1 scope: infra 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * sig9 (@sig9org) * Dag Wieers (@dagwieers) ansible cisco.aci.aci_l3out_logical_interface_profile – Manage Layer 3 Outside (L3Out) logical interface profiles (l3ext:LIfP) cisco.aci.aci\_l3out\_logical\_interface\_profile – Manage Layer 3 Outside (L3Out) logical interface profiles (l3ext:LIfP) ========================================================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_l3out_logical_interface_profile`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage L3Out interface profiles on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **egress\_dpp\_policy** string | | Name of the egress data plane policing policy. | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **ingress\_dpp\_policy** string | | Name of the ingress data plane policing policy. | | **interface\_profile** string | | Name of the interface profile. aliases: name, interface\_profile\_name, logical\_interface | | **l3out** string | | Name of an existing L3Out. aliases: l3out\_name | | **nd\_policy** string | | Name of the neighbor discovery interface policy. | | **node\_profile** string | | Name of the node profile. aliases: node\_profile\_name, logical\_node | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | Name of an existing tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also M(aci\_l3out) The official documentation on the **aci\_l3out** module. M(aci\_l3out\_logical\_node\_profile) The official documentation on the **aci\_l3out\_logical\_node\_profile** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC classes [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add a new interface profile cisco.aci.aci_l3out_logical_interface_profile: host: apic username: admin password: SomeSecretPassword tenant: my_tenant l3out: my_l3out node_profile: my_node_profile interface_profile: my_interface_profile state: present delegate_to: localhost - name: Delete an interface profile cisco.aci.aci_l3out_logical_interface_profile: host: apic username: admin password: SomeSecretPassword tenant: my_tenant l3out: my_l3out node_profile: my_node_profile interface_profile: my_interface_profile state: absent delegate_to: localhost - name: Query an interface profile cisco.aci.aci_l3out_logical_interface_profile: host: apic username: admin password: SomeSecretPassword tenant: my_tenant l3out: my_l3out node_profile: my_node_profile interface_profile: my_interface_profile state: query delegate_to: localhost register: query_result - name: Query all interface profiles cisco.aci.aci_l3out_logical_interface_profile: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Marcel Zehnder (@maercu)
programming_docs
ansible cisco.aci.aci_vzany_to_contract – Attach contracts to vzAny (vz:RsAnyToProv, vz:RsAnyToCons, vz:RsAnyToConsIf) cisco.aci.aci\_vzany\_to\_contract – Attach contracts to vzAny (vz:RsAnyToProv, vz:RsAnyToCons, vz:RsAnyToConsIf) ================================================================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_vzany_to_contract`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Bind contracts to vzAny on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **contract** string | | The name of the contract or contract interface. aliases: contract\_name | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | The name of the Tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **type** string / required | **Choices:*** provider * consumer * interface | Determines if this is a provided or consumed contract or a consumed contract interface. aliases: contract\_type | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | | **vrf** string | | The name of the VRF. aliases: context, vrf\_name | See Also -------- See also [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [cisco.aci.aci\_vrf](aci_vrf_module#ansible-collections-cisco-aci-aci-vrf-module) The official documentation on the **cisco.aci.aci\_vrf** module. [cisco.aci.aci\_contract](aci_contract_module#ansible-collections-cisco-aci-aci-contract-module) The official documentation on the **cisco.aci.aci\_contract** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC classes **fv:RsCons** and **fv:RsProv**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add a new contract to vzAny cisco.aci.aci_vzany_to_contract: host: apic username: admin password: SomeSecretPassword tenant: vzatest vrf: vzatest contract: vzatest_http type: provider state: present delegate_to: localhost - name: Remove an existing contract from vzAny cisco.aci.aci_vzany_to_contract: host: apic username: admin password: SomeSecretPassword tenant: vzatest vrf: vzatest contract: vzatest_http type: provider state: absent delegate_to: localhost - name: Query a specific contract to vzAny binding cisco.aci.aci_vzany_to_contract: host: apic username: admin password: SomeSecretPassword tenant: vzatest vrf: vzatest contract: vzatest_http type: provider state: query delegate_to: localhost register: query_result - name: Query all provider contract to vzAny bindings cisco.aci.aci_vzany_to_contract: host: apic username: admin password: SomeSecretPassword type: provider state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Marcel Zehnder (@maercu) ansible cisco.aci.aci_vmm_credential – Manage virtual domain credential profiles (vmm:UsrAccP) cisco.aci.aci\_vmm\_credential – Manage virtual domain credential profiles (vmm:UsrAccP) ======================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_vmm_credential`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage virtual domain credential profiles on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **credential\_password** string | | VMM controller password. | | **credential\_username** string | | VMM controller username. | | **description** string | | Description for the tenant. aliases: descr | | **domain** string | | Name of the virtual domain profile. aliases: domain\_name, domain\_profile, name | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name** string | | Name of the credential profile. aliases: credential\_name, credential\_profile | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | | **vm\_provider** string | **Choices:*** cloudfoundry * kubernetes * microsoft * openshift * openstack * redhat * vmware | The VM platform for VMM Domains. Support for Kubernetes was added in ACI v3.0. Support for CloudFoundry, OpenShift and Red Hat was added in ACI v3.1. | See Also -------- See also [cisco.aci.aci\_domain](aci_domain_module#ansible-collections-cisco-aci-aci-domain-module) The official documentation on the **cisco.aci.aci\_domain** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC classes **vmm:DomP** [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add credential to VMware VMM domain cisco.aci.aci_vmm_credential: host: apic username: admin password: SomeSecretPassword domain: vmware_dom description: secure credential name: vCenterCredential credential_username: vCenterUsername credential_password: vCenterPassword vm_provider: vmware state: present - name: Remove credential from VMware VMM domain cisco.aci.aci_vmm_credential: host: apic username: admin password: SomeSecretPassword domain: vmware_dom name: myCredential vm_provider: vmware state: absent - name: Query a specific VMware VMM credential cisco.aci.aci_vmm_credential: host: apic username: admin password: SomeSecretPassword domain: vmware_dom name: vCenterCredential vm_provider: vmware state: query delegate_to: localhost register: query_result - name: Query all VMware VMM credentials cisco.aci.aci_vmm_credential: host: apic username: admin password: SomeSecretPassword domain: vmware_dom vm_provider: vmware state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Jason Juenger (@jasonjuenger)
programming_docs
ansible cisco.aci.aci_domain – Manage physical, virtual, bridged, routed or FC domain profiles (phys:DomP, vmm:DomP, l2ext:DomP, l3ext:DomP, fc:DomP) cisco.aci.aci\_domain – Manage physical, virtual, bridged, routed or FC domain profiles (phys:DomP, vmm:DomP, l2ext:DomP, l3ext:DomP, fc:DomP) ============================================================================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_domain`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage physical, virtual, bridged, routed or FC domain profiles on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **add\_infra\_pg** boolean | **Choices:*** no * yes | Configure port groups for infra VLAN (e.g. Virtual APIC). aliases: infra\_pg | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **domain** string | | Name of the physical, virtual, bridged routed or FC domain profile. aliases: domain\_name, domain\_profile, name | | **domain\_type** string / required | **Choices:*** fc * l2dom * l3dom * phys * vmm | The type of domain profile. `fc`: The FC domain profile is a policy pertaining to single FC Management domain `l2dom`: The external bridged domain profile is a policy for managing L2 bridged infrastructure bridged outside the fabric. `l3dom`: The external routed domain profile is a policy for managing L3 routed infrastructure outside the fabric. `phys`: The physical domain profile stores the physical resources and encap resources that should be used for EPGs associated with this domain. `vmm`: The VMM domain profile is a policy for grouping VM controllers with similar networking policy requirements. aliases: type | | **dscp** string | **Choices:*** AF11 * AF12 * AF13 * AF21 * AF22 * AF23 * AF31 * AF32 * AF33 * AF41 * AF42 * AF43 * CS0 * CS1 * CS2 * CS3 * CS4 * CS5 * CS6 * CS7 * EF * VA * unspecified | The target Differentiated Service (DSCP) value. The APIC defaults to `unspecified` when unset during creation. aliases: target | | **encap\_mode** string | **Choices:*** unknown * vlan * vxlan | The layer 2 encapsulation protocol to use with the virtual switch. | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **multicast\_address** string | | The multicast IP address to use for the virtual switch. | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tag\_collection** boolean | **Choices:*** no * yes | Enables Cisco APIC to collect VMs that have been assigned tags in VMware vCenter for microsegmentation. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | | **vm\_provider** string | **Choices:*** cloudfoundry * kubernetes * microsoft * openshift * openstack * redhat * vmware | The VM platform for VMM Domains. Support for Kubernetes was added in ACI v3.0. Support for CloudFoundry, OpenShift and Red Hat was added in ACI v3.1. | | **vswitch** string | **Choices:*** avs * default * dvs * unknown | The virtual switch to use for vmm domains. The APIC defaults to `default` when unset during creation. | See Also -------- See also [cisco.aci.aci\_aep\_to\_domain](aci_aep_to_domain_module#ansible-collections-cisco-aci-aci-aep-to-domain-module) The official documentation on the **cisco.aci.aci\_aep\_to\_domain** module. [cisco.aci.aci\_domain\_to\_encap\_pool](aci_domain_to_encap_pool_module#ansible-collections-cisco-aci-aci-domain-to-encap-pool-module) The official documentation on the **cisco.aci.aci\_domain\_to\_encap\_pool** module. [cisco.aci.aci\_domain\_to\_vlan\_pool](aci_domain_to_vlan_pool_module#ansible-collections-cisco-aci-aci-domain-to-vlan-pool-module) The official documentation on the **cisco.aci.aci\_domain\_to\_vlan\_pool** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC classes **phys:DomP**, **vmm:DomP**, **l2ext:DomP**, **l3ext:DomP** and **fc:DomP** [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add a new physical domain cisco.aci.aci_domain: host: apic username: admin password: SomeSecretPassword domain: phys_dom domain_type: phys state: present - name: Remove a physical domain cisco.aci.aci_domain: host: apic username: admin password: SomeSecretPassword domain: phys_dom domain_type: phys state: absent - name: Add a new VMM domain cisco.aci.aci_domain: host: apic username: admin password: SomeSecretPassword domain: hyperv_dom domain_type: vmm vm_provider: microsoft state: present delegate_to: localhost - name: Remove a VMM domain cisco.aci.aci_domain: host: apic username: admin password: SomeSecretPassword domain: hyperv_dom domain_type: vmm vm_provider: microsoft state: absent delegate_to: localhost - name: Query a specific physical domain cisco.aci.aci_domain: host: apic username: admin password: SomeSecretPassword domain: phys_dom domain_type: phys state: query delegate_to: localhost register: query_result - name: Query all domains cisco.aci.aci_domain: host: apic username: admin password: SomeSecretPassword domain_type: phys state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Dag Wieers (@dagwieers) ansible cisco.aci.aci_vmm_vswitch_policy – Manage vSwitch policy for VMware virtual domains profiles (vmm:DomP) cisco.aci.aci\_vmm\_vswitch\_policy – Manage vSwitch policy for VMware virtual domains profiles (vmm:DomP) ========================================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_vmm_vswitch_policy`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage vSwitch policy for VMware VMM domains on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **cdp\_policy** string | | Name of the fabric access CDP policy. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **domain** string | | Name of the virtual domain profile. aliases: domain\_name, domain\_profile | | **enhanced\_lag** list / elements=dictionary | | List of enhanced LAG policies if vSwitch needs to be connected via VPC. | | | **lacp\_mode** string | **Choices:*** active * passive | LACP port channel mode. | | | **load\_balancing\_mode** string | **Choices:*** dst-ip * dst-ip-l4port * dst-ip-vlan * dst-ip-l4port-vlan * dst-mac * dst-l4port * src-ip * src-ip-l4port * src-ip-vlan * src-ip-l4port-vlan * src-mac * src-l4port * src-dst-ip * src-dst-ip-l4port * src-dst-ip-vlan * src-dst-ip-l4port-vlan * src-dst-mac * src-dst-l4port * src-port-id * vlan | Load balancing mode of the port channel. See also https://pubhub.devnetcloud.com/media/apic-mim-ref-421/docs/MO-lacpEnhancedLagPol.html. | | | **name** string / required | | Name of the enhanced Lag policy. | | | **number\_uplinks** integer | | Number of uplinks, must be between 2 and 8. | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **lldp\_policy** string | | Name of the fabric access LLDP policy. | | **mtu\_policy** string | | VMWare only. Name of the fabric access MTU policy. | | **netflow\_exporter** dictionary | | Parameters for the netflow exporter policy | | | **active\_flow\_timeout** integer | | Specifies the delay in seconds that NetFlow waits after the active flow is initiated, after which NetFlow sends the collected data. The range is from 60 to 3600. The default value is 60 | | | **idle\_flow\_timeout** integer | | Specifies the delay in seconds that NetFlow waits after the idle flow is initiated, after which NetFlow sends the collected data. The range is from 10 to 600. The default value is 15. | | | **name** string / required | | Name of the netflow exporter policy | | | **sampling\_rate** integer | | (VDS only) Specifies how many packets that NetFlow will drop after every collected packet. If you specify a value of 0, then NetFlow does not drop any packets. The range is from 0 to 1000. The default value is 0. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **port\_channel\_policy** string | | Name of the fabric access port-channel policy. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **stp\_policy** string | | SCVMM only. Name of the STP policy. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | | **vm\_provider** string | **Choices:*** cloudfoundry * kubernetes * microsoft * openshift * openstack * redhat * vmware | The VM platform for VMM Domains. Support for Kubernetes was added in ACI v3.0. Support for CloudFoundry, OpenShift and Red Hat was added in ACI v3.1. | See Also -------- See also [cisco.aci.aci\_domain](aci_domain_module#ansible-collections-cisco-aci-aci-domain-module) The official documentation on the **cisco.aci.aci\_domain** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC classes **vmm:DomP** [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add a vSwitch policy with LLDP cisco.aci.aci_vmm_vswitch_policy: host: apic username: admin password: SomeSecretPassword lldp_policy: LLDP_ENABLED domain: vmware_dom vm_provider: vmware state: present - name: Add a vSwitch policy with link aggregation cisco.aci.aci_vmm_vswitch_policy: host: apic username: admin password: SomeSecretPassword port_channel_policy: LACP_ACTIVE lldp_policy: LLDP_ENABLED domain: vmware_dom vm_provider: vmware enhanced_lag: - name: my_lacp_uplink lacp_mode: active load_balancing_mode: src-dst-ip number_uplinks: 2 state: present - name: Remove vSwitch Policy from VMware VMM domain cisco.aci.aci_vmm_vswitch_policy: host: apic username: admin password: SomeSecretPassword domain: vmware_dom vm_provider: vmware state: absent - name: Query the vSwitch policy of the VMWare domain cisco.aci.aci_vmm_vswitch_policy: host: apic username: admin password: SomeSecretPassword domain: vmware_dom vm_provider: vmware state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Manuel Widmer (@lumean) * Anvitha Jain (@anvitha-jain)
programming_docs
ansible cisco.aci.aci_aep_to_epg – Bind EPG to AEP (infra:RsFuncToEpg). cisco.aci.aci\_aep\_to\_epg – Bind EPG to AEP (infra:RsFuncToEpg). ================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_aep_to_epg`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Bind EPG to AEP. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **aep** string | | The name of the Attachable Access Entity Profile. aliases: aep\_name | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **ap** string | | Name of an existing application network profile, that will contain the EPGs. aliases: app\_profile, app\_profile\_name | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **encap** integer | | The VLAN associated with this application EPG. aliases: vlan, vlan\_id, encap\_id | | **epg** string | | The name of the end point group. aliases: epg\_name | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **interface\_mode** string | **Choices:*** 802.1p * access * native * regular * tagged * trunk * untagged | Determines how layer 2 tags will be read from and added to frames. Values `802.1p` and `native` are identical. Values `access` and `untagged` are identical. Values `regular`, `tagged` and `trunk` are identical. The APIC defaults to `trunk` when unset during creation. aliases: mode, mode\_name, interface\_mode\_name | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **primary\_encap** integer | | The primary VLAN associated with this EPG aliases: primary\_vlan, primary\_vlan\_id, primary\_encap\_id | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | The name of an existing tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Associate EPG with AEP cisco.aci.aci_aep_to_epg: host: apic username: admin password: SomeSecretPassword aep: aep1 tenant: tenant1 ap: ap1 epg: epg1 encap_id: 222 interface_mode: access state: present delegate_to: localhost - name: Associate EPG with AEP cisco.aci.aci_aep_to_epg: host: apic username: admin password: SomeSecretPassword aep: aep1 tenant: tenant1 ap: ap1 epg: epg1 encap_id: 222 interface_mode: access state: absent delegate_to: localhost - name: Get specific EPG with AEP association cisco.aci.aci_aep_to_epg: host: apic username: admin password: SomeSecretPassword aep: aep1 tenant: tenant1 ap: ap1 epg: epg1 encap_id: 222 interface_mode: access state: query delegate_to: localhost register: query_result - name: Get all EPG with AEP association cisco.aci.aci_aep_to_epg: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Marcel Zehnder (@maercu) ansible cisco.aci.aci_tenant_span_dst_group – Manage SPAN destination groups (span:DestGrp) cisco.aci.aci\_tenant\_span\_dst\_group – Manage SPAN destination groups (span:DestGrp) ======================================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_tenant_span_dst_group`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage SPAN destination groups on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | The description of the SPAN destination group. aliases: descr | | **dst\_group** string | | The name of the SPAN destination group. aliases: name | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | The name of the tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The `tenant` used must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) module can be used for this. See Also -------- See also [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **span:DestGrp**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - cisco.aci.aci_tenant_span_dst_group: host: apic username: admin password: SomeSecretPassword dst_group: '{{ dst_group }}' description: '{{ descr }}' tenant: '{{ tenant }}' delegate_to: localhost ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Dag Wieers (@dagwieers)
programming_docs
ansible cisco.aci.aci_bd_to_l3out – Bind Bridge Domain to L3 Out (fv:RsBDToOut) cisco.aci.aci\_bd\_to\_l3out – Bind Bridge Domain to L3 Out (fv:RsBDToOut) ========================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_bd_to_l3out`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Bind Bridge Domain to L3 Out on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **bd** string | | The name of the Bridge Domain. aliases: bd\_name, bridge\_domain | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **l3out** string | | The name of the l3out to associate with th Bridge Domain. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | The name of the Tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The `bd` and `l3out` parameters should exist before using this module. The [cisco.aci.aci\_bd](aci_bd_module#ansible-collections-cisco-aci-aci-bd-module) and `aci_l3out` can be used for these. See Also -------- See also [cisco.aci.aci\_bd](aci_bd_module#ansible-collections-cisco-aci-aci-bd-module) The official documentation on the **cisco.aci.aci\_bd** module. [cisco.aci.aci\_l3out](aci_l3out_module#ansible-collections-cisco-aci-aci-l3out-module) The official documentation on the **cisco.aci.aci\_l3out** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **fv:RsBDToOut**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` # ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Jacob McGill (@jmcgill298) ansible cisco.aci.aci_cloud_subnet – Manage Cloud Subnet (cloud:Subnet) cisco.aci.aci\_cloud\_subnet – Manage Cloud Subnet (cloud:Subnet) ================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_cloud_subnet`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage Cloud Subnet on Cisco Cloud ACI. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **address** string | | Ip address of the Cloud Subnet. aliases: subnet | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **availability\_zone** string | | The cloud zone which is attached to the given cloud context profile. Only used when it is an aws cloud apic. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **cidr** string / required | | Address of cloud cidr. | | **cloud\_context\_profile** string / required | | The name of cloud context profile. | | **description** string | | Description of the Cloud Subnet. | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name** string | | The name of the Cloud Subnet. | | **name\_alias** string | | An alias for the name of the current object. This relates to the nameAlias field in ACI and is used to rename object without changing the DN. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string / required | | The name of tenant. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | | **vnet\_gateway** boolean | **Choices:*** **no** ← * yes | Determine if a vNet Gateway Router will be deployed or not. Only used when it is an azure cloud apic. | Notes ----- Note * More information about the internal APIC class **cloud:Subnet** from [the APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/). See Also -------- See also [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Create aci cloud subnet cisco.aci.aci_cloud_subnet: host: apic username: userName password: somePassword validate_certs: no tenant: anstest cloud_context_profile: aws_cloudCtxProfile cidr: '10.10.0.0/16' availability_zone: us-west-1a address: 10.10.0.1 delegate_to: localhost - name: Query a specific subnet cisco.aci.aci_cloud_subnet: host: apic username: userName password: somePassword validate_certs: no tenant: anstest cloud_context_profile: ctx_profile_1 cidr: '10.10.0.0/16' address: 10.10.0.1 state: query delegate_to: localhost - name: Query all subnets cisco.aci.aci_cloud_subnet: host: apic username: userName password: somePassword validate_certs: no tenant: anstest cloud_context_profile: ctx_profile_1 cidr: '10.10.0.0/16' state: query delegate_to: localhost ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Nirav (@nirav) * Cindy Zhao (@cizhao) ansible cisco.aci.aci_fabric_node – Manage Fabric Node Members (fabric:NodeIdentP) cisco.aci.aci\_fabric\_node – Manage Fabric Node Members (fabric:NodeIdentP) ============================================================================ Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_fabric_node`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage Fabric Node Members on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | Description for the new Fabric Node Member. aliases: descr | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **node\_id** integer | | Node ID Number for the new Fabric Node Member. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **pod\_id** integer | | The pod id of the new Fabric Node Member. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **role** string | **Choices:*** leaf * spine * unspecified | Role for the new Fabric Node Member. aliases: role\_name | | **serial** string | | Serial Number for the new Fabric Node Member. aliases: serial\_number | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **switch** string | | Switch Name for the new Fabric Node Member. aliases: name, switch\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **fabric:NodeIdentP**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add fabric node cisco.aci.aci_fabric_node: host: apic username: admin password: SomeSecretPassword serial: FDO2031124L node_id: 1011 switch: fab4-sw1011 state: present delegate_to: localhost - name: Remove fabric node cisco.aci.aci_fabric_node: host: apic username: admin password: SomeSecretPassword serial: FDO2031124L node_id: 1011 state: absent delegate_to: localhost - name: Query fabric nodes cisco.aci.aci_fabric_node: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Bruno Calogero (@brunocalogero)
programming_docs
ansible cisco.aci.aci_l3out_logical_interface_vpc_member – Manage Member Node objects (l3extMember:Member) cisco.aci.aci\_l3out\_logical\_interface\_vpc\_member – Manage Member Node objects (l3extMember:Member) ======================================================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_l3out_logical_interface_vpc_member`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage Member Node objects (l3extMember:Member) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | The description for the logical interface VPC member. aliases: descr | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **l3out** string | | Name of an existing L3Out. aliases: l3out\_name | | **logical\_interface** string | | Name of an existing logical interface. | | **logical\_node** string | | Name of an existing logical node profile. | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **path\_dn** string | | DN of existing path endpoints for VPC policy group used to reach external L3 network. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **side** string | | Provides the side of member. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | Name of an existing tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The `tenant`, `l3out`, `logical_node`, `logical_interface`, `path_dn` and `member` used must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) and [cisco.aci.aci\_l3out](aci_l3out_module#ansible-collections-cisco-aci-aci-l3out-module) modules can be used for this. See Also -------- See also [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [cisco.aci.aci\_l3out](aci_l3out_module#ansible-collections-cisco-aci-aci-l3out-module) The official documentation on the **cisco.aci.aci\_l3out** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **l3ext:Out**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Create a VPC member cisco.aci.aci_l3out_logical_interface_vpc_member: host: apic username: admin password: SomeSecretPassword tenant: tenantName l3out: l3out logical_node: nodeName logical_interface: interfaceName path_dn: topology/pod-1/protpaths-101-102/pathep-[policy_group_name] side: A state: present delegate_to: localhost - name: Delete a VPC member cisco.aci.aci_l3out_logical_interface_vpc_member: host: apic username: admin password: SomeSecretPassword tenant: tenantName l3out: l3out logical_node: nodeName logical_interface: interfaceName path_dn: topology/pod-1/protpaths-101-102/pathep-[policy_group_name] side: A state: absent delegate_to: localhost - name: Query all VPC members cisco.aci.aci_l3out_logical_interface_vpc_member: host: apic username: admin password: SomeSecretPassword tenant: production state: query delegate_to: localhost register: query_result - name: Query a specific VPC member under l3out cisco.aci.aci_l3out_logical_interface_vpc_member: host: apic username: admin password: SomeSecretPassword tenant: tenantName l3out: l3out logical_node: nodeName logical_interface: interfaceName path_dn: topology/pod-1/protpaths-101-102/pathep-[policy_group_name] side: A state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Anvitha Jain(@anvitha-jain) ansible cisco.aci.aci_interface_policy_cdp – Manage CDP interface policies (cdp:IfPol) cisco.aci.aci\_interface\_policy\_cdp – Manage CDP interface policies (cdp:IfPol) ================================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_interface_policy_cdp`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage CDP interface policies on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **admin\_state** boolean | **Choices:*** no * yes | Enable or Disable CDP state. The APIC defaults to `yes` when unset during creation. | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **cdp\_policy** string | | The CDP interface policy name. aliases: cdp\_interface, name | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | The description for the CDP interface policy name. aliases: descr | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **cdp:IfPol**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Create CDP Interface Policy to enable CDP cisco.aci.aci_interface_policy_cdp: name: Ansible_CDP_Interface_Policy host: apic.example.com username: admin password: adminpass admin_state: true state: present - name: Create CDP Interface Policy to disable CDP cisco.aci.aci_interface_policy_cdp: name: Ansible_CDP_Interface_Policy host: apic.example.com username: admin password: adminpass admin_state: false state: present - name: Remove CDP Interface Policy cisco.aci.aci_interface_policy_cdp: name: Ansible_CDP_Interface_Policy host: apic.example.com username: admin password: adminpass output_level: debug state: absent - name: Query CDP Policy cisco.aci.aci_interface_policy_cdp: host: apic.example.com username: admin password: adminpass state: query ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'cdpIfPol': {'attributes': {'adminSt': 'disabled', 'annotation': '', 'descr': 'Ansible Created CDP Test Policy', 'dn': 'uni/infra/cdpIfP-Ansible\_CDP\_Test\_Policy', 'name': 'Ansible\_CDP\_Test\_Policy', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Tim Knipper (@tknipper11)
programming_docs
ansible cisco.aci.aci_taboo_contract – Manage taboo contracts (vz:BrCP) cisco.aci.aci\_taboo\_contract – Manage taboo contracts (vz:BrCP) ================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_taboo_contract`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage taboo contracts on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | The description for the Taboo Contract. aliases: descr | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **scope** string | **Choices:*** application-profile * context * global * tenant | The scope of a service contract. The APIC defaults to `context` when unset during creation. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **taboo\_contract** string | | The name of the Taboo Contract. aliases: name | | **tenant** string | | The name of the tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The `tenant` used must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) module can be used for this. See Also -------- See also [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **vz:BrCP**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add taboo contract cisco.aci.aci_taboo_contract: host: apic username: admin password: SomeSecretPassword tenant: ansible_test taboo_contract: taboo_contract_test state: present delegate_to: localhost - name: Remove taboo contract cisco.aci.aci_taboo_contract: host: apic username: admin password: SomeSecretPassword tenant: ansible_test taboo_contract: taboo_contract_test state: absent delegate_to: localhost - name: Query all taboo contracts cisco.aci.aci_taboo_contract: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result - name: Query a specific taboo contract cisco.aci.aci_taboo_contract: host: apic username: admin password: SomeSecretPassword tenant: ansible_test taboo_contract: taboo_contract_test state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Dag Wieers (@dagwieers) ansible Cisco.Aci 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.
programming_docs
ansible cisco.aci.aci_vmm_controller – Manage VMM Controller for virtual domains profiles (vmm:CtrlrP) cisco.aci.aci\_vmm\_controller – Manage VMM Controller for virtual domains profiles (vmm:CtrlrP) ================================================================================================ Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_vmm_controller`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage vCenter virtual domains on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **controller\_hostname** string | | Hostname or IP of the controller. | | **credentials** string | | Name of the VMM credentials to be used | | **datacenter** string | | Name of the data center, as seen in vCenter | | **domain** string | | Name of the virtual domain profile. aliases: domain\_name, domain\_profile | | **dvs\_version** string | **Choices:*** unmanaged * 5.1 * 5.5 * 6.0 * 6.5 * 6.6 * 7.0 | Version of the VMware DVS. | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **inband\_management\_epg** string | | Name of the management EPG to be used by the controller. Only supports in-band management EPGs for now. | | **name** string | | Name of VMM Controller. | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **stats\_collection** string | **Choices:*** enabled * **disabled** ← | Whether stats collection is enabled. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | | **vm\_provider** string | **Choices:*** cloudfoundry * kubernetes * microsoft * openshift * openstack * redhat * vmware | The VM platform for VMM Domains. Support for Kubernetes was added in ACI v3.0. Support for CloudFoundry, OpenShift and Red Hat was added in ACI v3.1. | See Also -------- See also [cisco.aci.aci\_domain](aci_domain_module#ansible-collections-cisco-aci-aci-domain-module) The official documentation on the **cisco.aci.aci\_domain** module. [cisco.aci.aci\_vmm\_credential](aci_vmm_credential_module#ansible-collections-cisco-aci-aci-vmm-credential-module) The official documentation on the **cisco.aci.aci\_vmm\_credential** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC classes **vmm:DomP** [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add controller to VMware VMM domain cisco.aci.aci_vmm_controller: host: apic username: admin password: SomeSecretPassword domain: vmware_dom name: vCenter1 controller_hostname: 10.1.1.1 dvs_version: unmanaged vm_provider: vmware credentials: vCenterCredentials1 datacenter: DC1 state: present - name: Remove controller from VMware VMM domain cisco.aci.aci_vmm_controller: host: apic username: admin password: SomeSecretPassword domain: vmware_dom name: vCenter1 vm_provider: vmware state: absent - name: Query a specific VMware VMM controller cisco.aci.aci_vmm_controller: host: apic username: admin password: SomeSecretPassword domain: vmware_dom name: vCenter1 vm_provider: vmware state: query delegate_to: localhost register: query_result - name: Query all VMware VMM controller cisco.aci.aci_vmm_controller: host: apic username: admin password: SomeSecretPassword vm_provider: vmware state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Manuel Widmer (@lumean) ansible cisco.aci.aci_encap_pool – Manage encap pools (fvns:VlanInstP, fvns:VxlanInstP, fvns:VsanInstP) cisco.aci.aci\_encap\_pool – Manage encap pools (fvns:VlanInstP, fvns:VxlanInstP, fvns:VsanInstP) ================================================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_encap_pool`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage vlan, vxlan, and vsan pools on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | Description for the `pool`. aliases: descr | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **pool** string | | The name of the pool. aliases: name, pool\_name | | **pool\_allocation\_mode** string | **Choices:*** dynamic * static | The method used for allocating encaps to resources. Only vlan and vsan support allocation modes. aliases: allocation\_mode, mode | | **pool\_type** string / required | **Choices:*** vlan * vsan * vxlan | The encap type of `pool`. aliases: type | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [cisco.aci.aci\_encap\_pool\_range](aci_encap_pool_range_module#ansible-collections-cisco-aci-aci-encap-pool-range-module) The official documentation on the **cisco.aci.aci\_encap\_pool\_range** module. [cisco.aci.aci\_vlan\_pool](aci_vlan_pool_module#ansible-collections-cisco-aci-aci-vlan-pool-module) The official documentation on the **cisco.aci.aci\_vlan\_pool** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC classes **fvns:VlanInstP**, **fvns:VxlanInstP** and **fvns:VsanInstP** [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add a new vlan pool cisco.aci.aci_encap_pool: host: apic username: admin password: SomeSecretPassword pool: production pool_type: vlan description: Production VLANs state: present delegate_to: localhost - name: Remove a vlan pool cisco.aci.aci_encap_pool: host: apic username: admin password: SomeSecretPassword pool: production pool_type: vlan state: absent delegate_to: localhost - name: Query a vlan pool cisco.aci.aci_encap_pool: host: apic username: admin password: SomeSecretPassword pool: production pool_type: vlan state: query delegate_to: localhost register: query_result - name: Query all vlan pools cisco.aci.aci_encap_pool: host: apic username: admin password: SomeSecretPassword pool_type: vlan state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Jacob McGill (@jmcgill298)
programming_docs
ansible cisco.aci.aci_l3out_static_routes_nexthop – Manage nexthops for static routes (ip:NexthopP) cisco.aci.aci\_l3out\_static\_routes\_nexthop – Manage nexthops for static routes (ip:NexthopP) =============================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_l3out_static_routes_nexthop`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage nexthops for static routes. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **l3out** string | | Name of an existing L3Out. aliases: l3out\_name | | **nexthop** string | | The nexthop for the prefix | | **node\_id** integer | | Existing nodeId. | | **node\_profile** string | | Name of the node profile. aliases: node\_profile\_name, logical\_node | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **pod\_id** integer | | Existing podId. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **prefix** string | | The IP prefix aliases: route | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | Name of an existing tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also M(aci\_l3out) The official documentation on the **aci\_l3out** module. M(aci\_l3out\_logical\_node\_profile) The official documentation on the **aci\_l3out\_logical\_node\_profile** module. M(aci\_l3out\_logical\_node\_profile\_to\_node) The official documentation on the **aci\_l3out\_logical\_node\_profile\_to\_node** module. M(aci\_l3out\_static\_routes) The official documentation on the **aci\_l3out\_static\_routes** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC classes **vmm:DomP** [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add a new nexthop to a prefix cisco.aci.aci_l3out_static_routes_nexthop: host: apic username: admin password: SomeSecretPassword tenant: my_tenant l3out: my_l3out node_profile: my_node_profile pod_id: 1 node_id: 111 prefix: 10.84.90.0/24 nexthop: 10.1.1.1 state: present delegate_to: localhost - name: Delete a nexthop from a prefix cisco.aci.aci_l3out_static_routes_nexthop: host: apic username: admin password: SomeSecretPassword tenant: my_tenant l3out: my_l3out node_profile: my_node_profile pod_id: 1 node_id: 111 prefix: 10.84.90.0/24 nexthop: 10.1.1.1 state: absent delegate_to: localhost - name: Query a nexthop cisco.aci.aci_l3out_static_routes_nexthop: host: apic username: admin password: SomeSecretPassword tenant: my_tenant l3out: my_l3out node_profile: my_node_profile pod_id: 1 node_id: 111 prefix: 10.84.90.0/24 nexthop: 10.1.1.1 state: query delegate_to: localhost register: query_result - name: Query all nexthops cisco.aci.aci_l3out_static_routes_nexthop: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Marcel Zehnder (@maercu) ansible cisco.aci.aci_tenant_span_src_group_to_dst_group – Bind SPAN source groups to destination groups (span:SpanLbl) cisco.aci.aci\_tenant\_span\_src\_group\_to\_dst\_group – Bind SPAN source groups to destination groups (span:SpanLbl) ====================================================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_tenant_span_src_group_to_dst_group`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Bind SPAN source groups to associated destination groups on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | The description for Span source group to destination group binding. aliases: descr | | **dst\_group** string | | The Span destination group to associate with the source group. | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **src\_group** string | | The name of the Span source group. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | The name of the Tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The `tenant`, `src_group`, and `dst_group` must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module), [cisco.aci.aci\_tenant\_span\_src\_group](aci_tenant_span_src_group_module#ansible-collections-cisco-aci-aci-tenant-span-src-group-module), and [cisco.aci.aci\_tenant\_span\_dst\_group](aci_tenant_span_dst_group_module#ansible-collections-cisco-aci-aci-tenant-span-dst-group-module) modules can be used for this. See Also -------- See also [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [cisco.aci.aci\_tenant\_span\_src\_group](aci_tenant_span_src_group_module#ansible-collections-cisco-aci-aci-tenant-span-src-group-module) The official documentation on the **cisco.aci.aci\_tenant\_span\_src\_group** module. [cisco.aci.aci\_tenant\_span\_dst\_group](aci_tenant_span_dst_group_module#ansible-collections-cisco-aci-aci-tenant-span-dst-group-module) The official documentation on the **cisco.aci.aci\_tenant\_span\_dst\_group** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **span:SrcGrp**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - cisco.aci.aci_tenant_span_src_group_to_dst_group: host: apic username: admin password: SomeSecretPassword tenant: production src_group: "{{ src_group }}" dst_group: "{{ dst_group }}" description: "{{ description }}" delegate_to: localhost ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Jacob McGill (@jmcgill298)
programming_docs
ansible cisco.aci.aci_snmp_client_group – Manage SNMP client groups (snmp:ClientGrpP). cisco.aci.aci\_snmp\_client\_group – Manage SNMP client groups (snmp:ClientGrpP). ================================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_snmp_client_group`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage SNMP client groups Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **client\_group** string | | Name of the SNMP client group aliases: client\_group\_name, client\_group\_profile | | **description** string | | Description of the SNMP policy | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **mgmt\_epg** string | | Associated management EPG aliases: management\_epg\_name, management\_epg | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **policy** string | | Name of an existing SNMP policy aliases: snmp\_policy, snmp\_policy\_name | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC classes **snmp:ClientGrpP**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Create an SNMP client group cisco.aci.aci_snmp_client_group: host: apic username: admin password: SomeSecretPassword policy: my_snmp_policy client_group: my_snmp_client_group mgmt_epg: oob-default state: present delegate_to: localhost - name: Remove an SNMP client group cisco.aci.aci_snmp_client_group: host: apic username: admin password: SomeSecretPassword policy: my_snmp_policy client_group: my_snmp_client_group state: absent delegate_to: localhost - name: Query an SNMP client group cisco.aci.aci_snmp_client_group: host: apic username: admin password: SomeSecretPassword policy: my_snmp_policy client_group: my_snmp_client_group state: query delegate_to: localhost register: query_result - name: Query all SNMP client group cisco.aci.aci_snmp_community_policy: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Tim Cragg (@timcragg) ansible cisco.aci.aci_bd – Manage Bridge Domains (BD) objects (fv:BD) cisco.aci.aci\_bd – Manage Bridge Domains (BD) objects (fv:BD) ============================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_bd`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages Bridge Domains (BD) on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **arp\_flooding** boolean | **Choices:*** no * yes | Determines if the Bridge Domain should flood ARP traffic. The APIC defaults to `no` when unset during creation. | | **bd** string | | The name of the Bridge Domain. aliases: bd\_name, name | | **bd\_type** string | **Choices:*** ethernet * fc | The type of traffic on the Bridge Domain. The APIC defaults to `ethernet` when unset during creation. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | Description for the Bridge Domain. | | **enable\_multicast** boolean | **Choices:*** no * yes | Determines if PIM is enabled. The APIC defaults to `no` when unset during creation. | | **enable\_routing** boolean | **Choices:*** no * yes | Determines if IP forwarding should be allowed. The APIC defaults to `yes` when unset during creation. | | **endpoint\_clear** boolean | **Choices:*** no * yes | Clears all End Points in all Leaves when `yes`. The value is not reset to disabled once End Points have been cleared; that requires a second task. The APIC defaults to `no` when unset during creation. | | **endpoint\_move\_detect** string | **Choices:*** default * garp | Determines if GARP should be enabled to detect when End Points move. The APIC defaults to `garp` when unset during creation. | | **endpoint\_retention\_action** string | **Choices:*** inherit * resolve | Determines if the Bridge Domain should inherit or resolve the End Point Retention Policy. The APIC defaults to `resolve` when unset during creation. | | **endpoint\_retention\_policy** string | | The name of the End Point Retention Policy the Bridge Domain should use when overriding the default End Point Retention Policy. | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **igmp\_snoop\_policy** string | | The name of the IGMP Snooping Policy the Bridge Domain should use when overriding the default IGMP Snooping Policy. | | **ip\_learning** boolean | **Choices:*** no * yes | Determines if the Bridge Domain should learn End Point IPs. The APIC defaults to `yes` when unset during creation. | | **ipv6\_l3\_unknown\_multicast** string | **Choices:*** flood * opt-flood | Determines the forwarding method to use for IPv6 unknown multicast destinations. The APIC defaults to `flood` when unset during creation. | | **ipv6\_nd\_policy** string | | The name of the IPv6 Neighbor Discovery Policy the Bridge Domain should use when overridding the default IPV6 ND Policy. | | **l2\_unknown\_unicast** string | **Choices:*** proxy * flood | Determines what forwarding method to use for unknown l2 destinations. The APIC defaults to `proxy` when unset during creation. | | **l3\_unknown\_multicast** string | **Choices:*** flood * opt-flood | Determines the forwarding method to use for unknown multicast destinations. The APIC defaults to `flood` when unset during creation. | | **limit\_ip\_learn** boolean | **Choices:*** no * yes | Determines if the BD should limit IP learning to only subnets owned by the Bridge Domain. The APIC defaults to `yes` when unset during creation. | | **mac\_address** string | | The MAC Address to assign to the `bd` instead of using the default. The APIC defaults to `00:22:BD:F8:19:FF` when unset during creation. aliases: mac | | **multi\_dest** string | **Choices:*** bd-flood * drop * encap-flood | Determines the forwarding method for L2 multicast, broadcast, and link layer traffic. The APIC defaults to `bd-flood` when unset during creation. | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **route\_profile** string | | The Route Profile to associate with the Bridge Domain. | | **route\_profile\_l3out** string | | The L3 Out that contains the associated Route Profile. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | The name of the Tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | | **vrf** string | | The name of the VRF. aliases: vrf\_name | Notes ----- Note * The `tenant` used must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) module can be used for this. See Also -------- See also [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **fv:BD**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add Bridge Domain cisco.aci.aci_bd: host: "{{ inventory_hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: no tenant: prod bd: web_servers mac_address: 00:22:BD:F8:19:FE vrf: prod_vrf state: present delegate_to: localhost - name: Add an FC Bridge Domain cisco.aci.aci_bd: host: "{{ inventory_hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: no tenant: prod bd: storage bd_type: fc vrf: fc_vrf enable_routing: no state: present delegate_to: localhost - name: Modify a Bridge Domain cisco.aci.aci_bd: host: "{{ inventory_hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: yes tenant: prod bd: web_servers arp_flooding: yes l2_unknown_unicast: flood state: present delegate_to: localhost - name: Query All Bridge Domains cisco.aci.aci_bd: host: "{{ inventory_hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: yes state: query delegate_to: localhost register: query_result - name: Query a Bridge Domain cisco.aci.aci_bd: host: "{{ inventory_hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: yes tenant: prod bd: web_servers state: query delegate_to: localhost register: query_result - name: Delete a Bridge Domain cisco.aci.aci_bd: host: "{{ inventory_hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: yes tenant: prod bd: web_servers state: absent delegate_to: localhost ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Jacob McGill (@jmcgill298)
programming_docs
ansible cisco.aci.aci_snmp_client – Manage SNMP clients (snmp:ClientP). cisco.aci.aci\_snmp\_client – Manage SNMP clients (snmp:ClientP). ================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_snmp_client`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage SNMP clients Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **address** string | | IP subnet to accept SNMP requests from | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **client\_group** string | | Name of an existing SNMP client group aliases: client\_group\_name, client\_group\_profile | | **client\_name** string | | Name of the SNMP client | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **policy** string | | Name of an existing SNMP policy aliases: snmp\_policy, snmp\_policy\_name | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC classes **snmp:ClientP**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Create an SNMP client cisco.aci.aci_snmp_client: host: apic username: admin password: SomeSecretPassword policy: my_snmp_policy client_group: my_snmp_client_group address: 10.20.30.0/24 client_name: my_client_name state: present delegate_to: localhost - name: Remove an SNMP client cisco.aci.aci_snmp_client_group: host: apic username: admin password: SomeSecretPassword policy: my_snmp_policy client_group: my_snmp_client_group address: 10.20.30.0/24 state: absent delegate_to: localhost - name: Query an SNMP client cisco.aci.aci_snmp_client: host: apic username: admin password: SomeSecretPassword policy: my_snmp_policy client_group: my_snmp_client_group address: 10.20.30.0/24 state: query delegate_to: localhost register: query_result - name: Query all SNMP clients cisco.aci.aci_snmp_client: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Tim Cragg (@timcragg) ansible cisco.aci.aci_switch_policy_leaf_profile – Manage switch policy leaf profiles (infra:NodeP) cisco.aci.aci\_switch\_policy\_leaf\_profile – Manage switch policy leaf profiles (infra:NodeP) =============================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_switch_policy_leaf_profile`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage switch policy leaf profiles on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | Description for the Leaf Profile. aliases: descr | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **leaf\_profile** string | | The name of the Leaf Profile. aliases: leaf\_profile\_name, name | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [cisco.aci.aci\_switch\_policy\_leaf\_profile](#ansible-collections-cisco-aci-aci-switch-policy-leaf-profile-module) The official documentation on the **cisco.aci.aci\_switch\_policy\_leaf\_profile** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **infra:NodeP**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: creating a Leaf Profile with description cisco.aci.aci_switch_policy_leaf_profile: host: apic username: admin password: SomeSecretPassword leaf_profile: sw_name description: sw_description state: present delegate_to: localhost - name: Deleting a Leaf Profile cisco.aci.aci_switch_policy_leaf_profile: host: apic username: admin password: SomeSecretPassword leaf_profile: sw_name state: absent delegate_to: localhost - name: Query a Leaf Profile cisco.aci.aci_switch_policy_leaf_profile: host: apic username: admin password: SomeSecretPassword leaf_profile: sw_name state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Bruno Calogero (@brunocalogero)
programming_docs
ansible cisco.aci.aci_firmware_policy – This creates a firmware policy cisco.aci.aci\_firmware\_policy – This creates a firmware policy ================================================================ Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_firmware_policy`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module creates a firmware policy for firmware groups. The firmware policy is create first and then * referenced by the firmware group. You will assign the firmware and specify if you want to ignore the compatibility * check Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **ignoreCompat** boolean | **Choices:*** no * yes | Check if compatibility checks should be ignored | | **name** string | | Name of the firmware policy | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | | **version** string | | The version of the firmware associated with this policy. This value is very import as well as constructing it correctly. The syntax for this field is n9000-xx.x. If you look at the firmware repository using the UI each version will have a "Full Version" column, this is the value you need to use. So, if the Full Version is 13.1(1i), the value for this field would be n9000-13.1(1i) | See Also -------- See also [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: firmware policy cisco.aci.aci_firmware_policy: host: "{{ inventory_hostname }}" username: "{{ user }}" password: "{{ pass }}" validate_certs: no name: test2FrmPol version: n9000-13.2(1m) ignoreCompat: False 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Steven Gerhart (@sgerhart) ansible cisco.aci.aci_tenant_span_src_group – Manage SPAN source groups (span:SrcGrp) cisco.aci.aci\_tenant\_span\_src\_group – Manage SPAN source groups (span:SrcGrp) ================================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_tenant_span_src_group`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage SPAN source groups on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **admin\_state** boolean | **Choices:*** no * yes | Enable or disable the span sources. The APIC defaults to `yes` when unset during creation. | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | The description for Span source group. aliases: descr | | **dst\_group** string | | The Span destination group to associate with the source group. | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **src\_group** string | | The name of the Span source group. aliases: name | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | The name of the Tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The `tenant` used must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) module can be used for this. See Also -------- See also [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **span:SrcGrp**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - cisco.aci.aci_tenant_span_src_group: host: apic username: admin password: SomeSecretPassword tenant: production src_group: "{{ src_group }}" dst_group: "{{ dst_group }}" admin_state: "{{ admin_state }}" description: "{{ description }}" delegate_to: localhost ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Jacob McGill (@jmcgill298) ansible cisco.aci.aci_l2out_extepg_to_contract – Bind Contracts to L2 External End Point Groups (EPGs) cisco.aci.aci\_l2out\_extepg\_to\_contract – Bind Contracts to L2 External End Point Groups (EPGs) ================================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_l2out_extepg_to_contract`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Bind Contracts to L2 External End Point Groups (EPGs) on ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **contract** string | | Name of the contract. | | **contract\_type** string / required | **Choices:*** consumer * provider | The type of contract. | | **extepg** string | | Name of the external end point group. aliases: extepg\_name, external\_epg | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **l2out** string | | Name of the l2out. aliases: l2out\_name | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **priority** string | **Choices:*** level1 * level2 * level3 * unspecified | This has four levels of priority. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **provider\_match** string | **Choices:*** all * at\_least\_one * at\_most\_one * none | This is configurable for provided contracts. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | Name of existing tenant. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The `tenant`, `l2out` and `extepg` must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module), [cisco.aci.aci\_l2out](aci_l2out_module#ansible-collections-cisco-aci-aci-l2out-module) and [cisco.aci.aci\_l2out\_extepg](aci_l2out_extepg_module#ansible-collections-cisco-aci-aci-l2out-extepg-module) modules can be used for this. See Also -------- See also [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **fvtenant**, **l2extInstP** and **l2extOut**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Bind a contract to an L2 external EPG cisco.aci.aci_l2out_extepg_to_contract: host: apic username: admin password: SomeSecretePassword tenant: Auto-Demo l2out: l2out extepg : testEpg contract: contract1 contract_type: provider state: present delegate_to: localhost - name: Remove existing contract from an L2 external EPG cisco.aco.aci_l2out_extepg_to_contract: host: apic username: admin password: SomeSecretePassword tenant: Auto-Demo l2out: l2out extepg : testEpg contract: contract1 contract_type: provider state: absent delegate_to: localhost - name: Query a contract bound to an L2 external EPG cisco.aci.aci_l2out_extepg_to_contract: host: apic username: admin password: SomeSecretePassword tenant: ansible_tenant l2out: ansible_l2out extepg: ansible_extEpg contract: ansible_contract contract_type: provider state: query delegate_to: localhost register: query_result - name: Query all contracts relationships cisco.aci.aci_l2out_extepg_to_contract: host: apic username: admin password: SomeSecretePassword contract_type: provider state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class "/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Sudhakar Shet Kudtarkar (@kudtarkar1) * Shreyas Srish (@shrsr) * Oleksandr Kreshchenko (@alexkross)
programming_docs
ansible cisco.aci.aci_tenant_action_rule_profile – Manage action rule profiles (rtctrl:AttrP) cisco.aci.aci\_tenant\_action\_rule\_profile – Manage action rule profiles (rtctrl:AttrP) ========================================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_tenant_action_rule_profile`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage action rule profiles on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **action\_rule** string | | The name of the action rule profile. aliases: action\_rule\_name, name | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | The description for the action rule profile. aliases: descr | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | The name of the tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The `tenant` used must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) module can be used for this. See Also -------- See also [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **rtctrl:AttrP**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - cisco.aci.aci_tenant_action_rule_profile: host: apic username: admin password: SomeSecretPassword action_rule: '{{ action_rule }}' description: '{{ descr }}' tenant: '{{ tenant }}' delegate_to: localhost ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Dag Wieers (@dagwieers) ansible cisco.aci.aci_domain_to_encap_pool – Bind Domain to Encap Pools (infra:RsVlanNs) cisco.aci.aci\_domain\_to\_encap\_pool – Bind Domain to Encap Pools (infra:RsVlanNs) ==================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_domain_to_encap_pool`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Bind Domain to Encap Pools on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **domain** string | | Name of the domain being associated with the Encap Pool. aliases: domain\_name, domain\_profile | | **domain\_type** string / required | **Choices:*** fc * l2dom * l3dom * phys * vmm | Determines if the Domain is physical (phys) or virtual (vmm). | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **pool** string | | The name of the pool. aliases: pool\_name | | **pool\_allocation\_mode** string | **Choices:*** dynamic * static | The method used for allocating encaps to resources. Only vlan and vsan support allocation modes. aliases: allocation\_mode, mode | | **pool\_type** string / required | **Choices:*** vlan * vsan * vxlan | The encap type of `pool`. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | | **vm\_provider** string | **Choices:*** cloudfoundry * kubernetes * microsoft * openshift * openstack * redhat * vmware | The VM platform for VMM Domains. Support for Kubernetes was added in ACI v3.0. Support for CloudFoundry, OpenShift and Red Hat was added in ACI v3.1. | Notes ----- Note * The `domain` and `encap_pool` parameters should exist before using this module. The [cisco.aci.aci\_domain](aci_domain_module#ansible-collections-cisco-aci-aci-domain-module) and [cisco.aci.aci\_encap\_pool](aci_encap_pool_module#ansible-collections-cisco-aci-aci-encap-pool-module) can be used for these. See Also -------- See also [cisco.aci.aci\_domain](aci_domain_module#ansible-collections-cisco-aci-aci-domain-module) The official documentation on the **cisco.aci.aci\_domain** module. [cisco.aci.aci\_encap\_pool](aci_encap_pool_module#ansible-collections-cisco-aci-aci-encap-pool-module) The official documentation on the **cisco.aci.aci\_encap\_pool** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **infra:RsVlanNs**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add domain to VLAN pool binding cisco.aci.aci_domain_to_encap_pool: host: apic username: admin password: SomeSecretPassword domain: phys_dom domain_type: phys pool: test_pool pool_type: vlan pool_allocation_mode: dynamic state: present delegate_to: localhost - name: Remove domain to VLAN pool binding cisco.aci.aci_domain_to_encap_pool: host: apic username: admin password: SomeSecretPassword domain: phys_dom domain_type: phys pool: test_pool pool_type: vlan pool_allocation_mode: dynamic state: absent delegate_to: localhost - name: Query our domain to VLAN pool binding cisco.aci.aci_domain_to_encap_pool: host: apic username: admin password: SomeSecretPassword domain: phys_dom pool: test_pool pool_type: vlan pool_allocation_mode: dynamic state: query delegate_to: localhost register: query_result - name: Query all domain to VLAN pool bindings cisco.aci.aci_domain_to_encap_pool: host: apic username: admin password: SomeSecretPassword domain_type: phys pool_type: vlan pool_allocation_mode: dynamic state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Dag Wieers (@dagwieers)
programming_docs
ansible cisco.aci.aci_firmware_group_node – This modules adds and remove nodes from the firmware group cisco.aci.aci\_firmware\_group\_node – This modules adds and remove nodes from the firmware group ================================================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_firmware_group_node`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module addes/deletes a node to the firmware group. This modules assigns 1 node at a time. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **group** string | | This is the name of the firmware group | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **node** string | | The node to be added to the firmware group - the value equals the NodeID | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: add firmware group node cisco.aci.aci_firmware_group_node: host: "{{ inventory_hostname }}" username: "{{ user }}" password: "{{ pass }}" validate_certs: no group: testingfwgrp node: 1001 state: present - name: Remove firmware group node cisco.aci.aci_firmware_group_node: host: "{{ inventory_hostname }}" username: "{{ user }}" password: "{{ pass }}" validate_certs: no group: testingfwgrp node: 1001 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Steven Gerhart (@sgerhart) ansible cisco.aci.aci_ap – Manage top level Application Profile (AP) objects (fv:Ap) cisco.aci.aci\_ap – Manage top level Application Profile (AP) objects (fv:Ap) ============================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_ap`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage top level Application Profile (AP) objects on Cisco ACI fabrics Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **ap** string | | The name of the application network profile. aliases: app\_profile, app\_profile\_name, name | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | Description for the AP. aliases: descr | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **monitoring\_policy** string | | The name of the monitoring policy. | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | The name of an existing tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * This module does not manage EPGs, see [cisco.aci.aci\_epg](aci_epg_module#ansible-collections-cisco-aci-aci-epg-module) to do this. * The used `tenant` must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) module can be used for this. See Also -------- See also [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **fv:Ap**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add a new AP cisco.aci.aci_ap: host: apic username: admin password: SomeSecretPassword tenant: production ap: default description: default ap monitoring_policy: default state: present delegate_to: localhost - name: Remove an AP cisco.aci.aci_ap: host: apic username: admin password: SomeSecretPassword tenant: production ap: default state: absent delegate_to: localhost - name: Query an AP cisco.aci.aci_ap: host: apic username: admin password: SomeSecretPassword tenant: production ap: default state: query delegate_to: localhost register: query_result - name: Query all APs cisco.aci.aci_ap: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Swetha Chunduri (@schunduri) * Shreyas Srish (@shrsr) ansible cisco.aci.aci_static_node_mgmt_address – In band or Out of band management IP address cisco.aci.aci\_static\_node\_mgmt\_address – In band or Out of band management IP address ========================================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_static_node_mgmt_address`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Cisco ACI Fabric Node IP address Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **epg** string | | The name of the end point group | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **ipv4\_address** string | | ipv4 address of in band/out of band mgmt aliases: ip | | **ipv4\_gw** string | | Gateway address of in band / out of band mgmt network aliases: gw | | **ipv6\_address** string | | ipv6 address of in band/out of band mgmt aliases: ipv6 | | **ipv6\_gw** string | | GW address of in band/out of band mgmt | | **node\_id** integer | | ACI Fabric's node id of a leaf, spine or APIC | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **pod\_id** integer | | The pod number of the leaf, spine or APIC | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **type** string / required | **Choices:*** in\_band * out\_of\_band | type of management interface | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add ipv4 address to in band mgmt interface cisco.aci.aci_static_node_mgmt_address: host: "Host IP" username: admin password: SomeSecretePassword epg: default pod_id: 1 type: in_band node_id: 1102 ipv4_address: "3.1.1.2/24" ipv4_gw: "3.1.1.1" state: present delegate_to: localhost - name: Add ipv4 address to out of band mgmt interface cisco.aci.aci_static_node_mgmt_address: host: "Host IP" username: admin password: SomeSecretePassword epg: default pod_id: 1 band_type: out_of_band node_id: 1102 ipv4_address: "3.1.1.2/24" ipv4_gw: "3.1.1.1" state: present delegate_to: localhost - name: Remove ipv4 address to in band mgmt interface cisco.aci.aci_static_node_mgmt_address: host: "Host IP" username: admin password: SomeSecretePassword epg: default pod_id: 1 type: in_band node_id: 1102 ipv4_address: "3.1.1.2/24" ipv4_gw: "3.1.1.1" state: absent delegate_to: localhost - name: Query the in band mgmt ipv4 address cisco.aci.aci_static_node_mgmt_address: host: "Host IP" username: admin password: SomeSecretePassword epg: default pod_id: 1 type: in_band node_id: 1102 ipv4_address: "3.1.1.2/24" ipv4_gw: "3.1.1.1" state: query delegate_to: localhost - name: Query all addresses in epg out of band25wf cisco.aci.aci_static_node_mgmt_address: host: "Host IP" username: admin password: SomeSecretePassword epg: default type: out_of_band state: query delegate_to: localhost - name: Query all in band addresses cisco.aci.aci_static_node_mgmt_address: host: "Host IP" username: admin password: SomeSecretePassword type: in_band state: query delegate_to: localhost ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class "/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** class\_map (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Sudhakar Shet Kudtarkar (@kudtarkar1) * Lionel Hercot (@lhercot) * Shreyas Srish (@shrsr)
programming_docs
ansible cisco.aci.aci_rest – Direct access to the Cisco APIC REST API cisco.aci.aci\_rest – Direct access to the Cisco APIC REST API ============================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_rest`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Enables the management of the Cisco ACI fabric through direct access to the Cisco APIC REST API. * Thanks to the idempotent nature of the APIC, this module is idempotent and reports changes. Requirements ------------ The below requirements are needed on the host that executes this module. * lxml (when using XML payload) * xmljson >= 0.1.8 (when using XML payload) * python 2.7+ (when using xmljson) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **content** raw | | When used instead of `src`, sets the payload of the API request directly. This may be convenient to template simple requests. For anything complex use the `template` lookup plugin (see examples) or the M(template) module with parameter `src`. | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **method** string | **Choices:*** delete * **get** ← * post | The HTTP method of the request. Using `delete` is typically used for deleting objects. Using `get` is typically used for querying objects. Using `post` is typically used for modifying objects. aliases: action | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **path** string / required | | URI being used to execute API calls. Must end in `.xml` or `.json`. aliases: uri | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **src** path | | Name of the absolute path of the filename that includes the body of the HTTP request being sent to the ACI fabric. If you require a templated payload, use the `content` parameter together with the `template` lookup plugin, or use M(template). aliases: config\_file | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Certain payloads are known not to be idempotent, so be careful when constructing payloads, e.g. using `status="created"` will cause idempotency issues, use `status="modified"` instead. More information in [the ACI documentation](../../../scenario_guides/guide_aci#aci-guide-known-issues). * Certain payloads (and used paths) are known to report no changes happened when changes did happen. This is a known APIC problem and has been reported to the vendor. A workaround for this issue exists. More information in [the ACI documentation](../../../scenario_guides/guide_aci#aci-guide-known-issues). * XML payloads require the `lxml` and `xmljson` python libraries. For JSON payloads nothing special is needed. * If you do not have any attributes, it may be necessary to add the β€œattributes” key with an empty dictionnary β€œ{}” for value as the APIC does expect the entry to precede any children. See Also -------- See also [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [Cisco APIC REST API Configuration Guide](http://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) More information about the APIC REST API. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add a tenant using certificate authentication cisco.aci.aci_rest: host: apic username: admin private_key: pki/admin.key method: post path: /api/mo/uni.xml src: /home/cisco/ansible/aci/configs/aci_config.xml delegate_to: localhost - name: Add a tenant from a templated payload file from templates/ cisco.aci.aci_rest: host: apic username: admin private_key: pki/admin.key method: post path: /api/mo/uni.xml content: "{{ lookup('template', 'aci/tenant.xml.j2') }}" delegate_to: localhost - name: Add a tenant using inline YAML cisco.aci.aci_rest: host: apic username: admin private_key: pki/admin.key validate_certs: no path: /api/mo/uni.json method: post content: fvTenant: attributes: name: Sales descr: Sales department delegate_to: localhost - name: Add a tenant using a JSON string cisco.aci.aci_rest: host: apic username: admin private_key: pki/admin.key validate_certs: no path: /api/mo/uni.json method: post content: { "fvTenant": { "attributes": { "name": "Sales", "descr": "Sales department" } } } delegate_to: localhost - name: Add a tenant using an XML string cisco.aci.aci_rest: host: apic username: admin private_key: pki/{{ aci_username }}.key validate_certs: no path: /api/mo/uni.xml method: post content: '<fvTenant name="Sales" descr="Sales departement"/>' delegate_to: localhost - name: Get tenants using password authentication cisco.aci.aci_rest: host: apic username: admin password: SomeSecretPassword method: get path: /api/node/class/fvTenant.json delegate_to: localhost register: query_result - name: Configure contracts cisco.aci.aci_rest: host: apic username: admin private_key: pki/admin.key method: post path: /api/mo/uni.xml src: /home/cisco/ansible/aci/configs/contract_config.xml delegate_to: localhost - name: Register leaves and spines cisco.aci.aci_rest: host: apic username: admin private_key: pki/admin.key validate_certs: no method: post path: /api/mo/uni/controller/nodeidentpol.xml content: <fabricNodeIdentPol> <fabricNodeIdentP name="{{ item.name }}" nodeId="{{ item.nodeid }}" status="{{ item.status }}" serial="{{ item.serial }}"/> </fabricNodeIdentPol> with_items: - '{{ apic_leavesspines }}' delegate_to: localhost - name: Wait for all controllers to become ready cisco.aci.aci_rest: host: apic username: admin private_key: pki/admin.key validate_certs: no path: /api/node/class/topSystem.json?query-target-filter=eq(topSystem.role,"controller") register: apics until: "'totalCount' in apics and apics.totalCount|int >= groups['apic']|count" retries: 120 delay: 30 delegate_to: localhost run_once: 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 | | --- | --- | --- | | **error\_code** integer | always | The REST ACI return code, useful for troubleshooting on failure **Sample:** 122 | | **error\_text** string | always | The REST ACI descriptive text, useful for troubleshooting on failure **Sample:** unknown managed object class foo | | **imdata** string | always | Converted output returned by the APIC REST (register this for post-processing) **Sample:** [{'error': {'attributes': {'code': '122', 'text': 'unknown managed object class foo'}}}] | | **payload** string | always | The (templated) payload send to the APIC REST API (xml or json) **Sample:** <foo bar="boo"/> | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | always | HTTP response string **Sample:** HTTP Error 400: Bad Request | | **status** integer | always | HTTP status code **Sample:** 400 | | **totalCount** string | always | Number of items in the imdata array **Sample:** 0 | | **url** string | success | URL used for APIC REST call **Sample:** https://1.2.3.4/api/mo/uni/tn-[Dag].json?rsp-subtree=modified | ### Authors * Dag Wieers (@dagwieers) * Cindy Zhao (@cizhao) ansible cisco.aci.aci_snmp_user – Manage SNMP v3 Users (snmp:UserP). cisco.aci.aci\_snmp\_user – Manage SNMP v3 Users (snmp:UserP). ============================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_snmp_user`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage SNMP v3 Users * Note that all properties within the snmpUserP class are Create-only. To modify any property of an existing user, you must delete and re-create it. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **auth\_key** string | | SNMP authentication key | | **auth\_type** string | **Choices:*** hmac-md5-96 * hmac-sha1-96 | SNMP authentication method | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name** string | | Name of the SNMP user policy aliases: snmp\_user\_policy | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **policy** string | | Name of an existing SNMP policy aliases: snmp\_policy, snmp\_policy\_name | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **privacy\_key** string | | SNMP privacy key | | **privacy\_type** string | **Choices:*** aes-128 * des * none | SNMP privacy type | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **snmp:UserP**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Create an SNMP user cisco.aci.aci_snmp_user: host: apic username: admin password: SomeSecretPassword policy: my_snmp_policy name: my_snmp_user auth_type: hmac-sha1-96 auth_key: "{{ hmac_key }}" state: present delegate_to: localhost - name: Create an SNMP user with both authentication and privacy cisco.aci.aci_snmp_user: host: apic username: admin password: SomeSecretPassword policy: my_snmp_policy name: my_snmp_user auth_type: hmac-sha1-96 auth_key: "{{ hmac_key }}" privacy_type: aes-128 privacy_key: "{{ aes_key }}" state: present delegate_to: localhost - name: Remove an SNMP user cisco.aci.aci_snmp_user: host: apic username: admin password: SomeSecretPassword policy: my_snmp_policy name: my_snmp_user state: absent delegate_to: localhost - name: Query an SNMP user cisco.aci.aci_snmp_user: host: apic username: admin password: SomeSecretPassword policy: my_snmp_policy name: my_snmp_user state: query delegate_to: localhost register: query_result - name: Query all SNMP users cisco.aci.aci_snmp_user: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Tim Cragg (@timcragg)
programming_docs
ansible cisco.aci.aci_l2out_extepg – Manage External Network Instance (L2Out External EPG) objects (l2extInstP). cisco.aci.aci\_l2out\_extepg – Manage External Network Instance (L2Out External EPG) objects (l2extInstP). ========================================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_l2out_extepg`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage External Network Instance (L2Out External EPG) objects (l2extInstP) on ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | Description for the l2out. | | **extepg** string | | Name of the external end point group. aliases: external\_epg, extepg\_name, name | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **l2out** string | | Name of the l2out. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **preferred\_group** boolean | **Choices:*** no * yes | This depicts whether this External EPG is part of the Preferred Group and can communicate without contracts. This is convenient for migration scenarios, or when ACI is used for network automation but not for policy. The APIC defaults to `no` when unset during creation. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **qos\_class** string | **Choices:*** level1 * level2 * level3 * level4 * level5 * level6 * Unspecified | The bandwidth level for Quality of service. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | Name of existing tenant. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The `tenant` and `l2out` must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) and [cisco.aci.aci\_l2out](aci_l2out_module#ansible-collections-cisco-aci-aci-l2out-module) modules can be used for this. See Also -------- See also [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **fvtenant** and **l2extOut**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add a new L2 external end point group cisco.aci.aci_l2out_extepg: host: apic username: admin password: SomeSecretePassword tenant: Auto-Demo l2out: l2out extepg: NewExt description: external epg preferred_group: False state: present delegate_to: localhost - name: Remove an L2 external end point group cisco.aci.aci_l2out_extepg: host: apic username: admin password: SomeSecretePassword tenant: Auto-Demo l2out: l2out extepg: NewExt state: absent delegate_to: localhost - name: Query the L2 external end point group cisco.aci.aci_l2out_extepg: host: apic username: admin password: SomeSecretePassword tenant: Auto-Demo l2out: l2out extepg: NewExt state: query delegate_to: localhost register: query_result - name: Query all L2 external end point groups in a tenant cisco.aci.aci_l2out_extepg: host: apic username: admin password: SomeSecretePassword tenant: Auto-Demo state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class "/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Sudhakar Shet Kudtarkar (@kudtarkar1) * Shreyas Srish (@shrsr) ansible cisco.aci.aci_l3out_logical_node – Manage Layer 3 Outside (L3Out) logical node profile nodes (l3ext:RsNodeL3OutAtt) cisco.aci.aci\_l3out\_logical\_node – Manage Layer 3 Outside (L3Out) logical node profile nodes (l3ext:RsNodeL3OutAtt) ====================================================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_l3out_logical_node`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Bind nodes to node profiles on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **l3out** string | | Name of an existing L3Out. aliases: l3out\_name | | **node\_id** integer | | Existing nodeId. | | **node\_profile** string | | Name of the node profile. aliases: node\_profile\_name, logical\_node | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **pod\_id** integer | | Existing podId. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **router\_id** string | | Router ID in dotted decimal notation. | | **router\_id\_as\_loopback** string | **Choices:*** **yes** ← * no | Configure the router ID as a loopback IP. | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | Name of an existing tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also M(aci\_l3out) The official documentation on the **aci\_l3out** module. M(aci\_l3out\_logical\_node\_profile) The official documentation on the **aci\_l3out\_logical\_node\_profile** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC classes **vmm:DomP** [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add a new node to a node profile cisco.aci.aci_l3out_logical_node: host: apic username: admin password: SomeSecretPassword tenant: my_tenant l3out: my_l3out node_profile: my_node_profile pod_id: 1 node_id: 111 router_id: 111.111.111.111 state: present delegate_to: localhost - name: Delete a node from a node profile cisco.aci.aci_l3out_logical_node: host: apic username: admin password: SomeSecretPassword tenant: my_tenant l3out: my_l3out node_profile: my_node_profile pod_id: 1 node_id: 111 state: absent delegate_to: localhost - name: Query a node cisco.aci.aci_l3out_logical_node: host: apic username: admin password: SomeSecretPassword tenant: my_tenant l3out: my_l3out node_profile: my_node_profile pod_id: 1 node_id: 111 state: query delegate_to: localhost register: query_result - name: Query all nodes cisco.aci.aci_l3out_logical_node: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Marcel Zehnder (@maercu)
programming_docs
ansible cisco.aci.aci_interface_policy_mcp – Manage MCP interface policies (mcp:IfPol) cisco.aci.aci\_interface\_policy\_mcp – Manage MCP interface policies (mcp:IfPol) ================================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_interface_policy_mcp`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage MCP interface policies on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **admin\_state** boolean | **Choices:*** no * yes | Enable or disable admin state. The APIC defaults to `yes` when unset during creation. | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | The description for the MCP interface. aliases: descr | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **mcp** string | | The name of the MCP interface. aliases: mcp\_interface, name | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **mcp:IfPol**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add a MCP interface policy cisco.aci.aci_interface_policy_mcp: host: '{{ hostname }}' username: '{{ username }}' password: '{{ password }}' mcp: '{{ mcp }}' description: '{{ descr }}' admin_state: '{{ admin_state }}' delegate_to: localhost ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Dag Wieers (@dagwieers) ansible cisco.aci.aci_vlan_pool_encap_block – Manage encap blocks assigned to VLAN pools (fvns:EncapBlk) cisco.aci.aci\_vlan\_pool\_encap\_block – Manage encap blocks assigned to VLAN pools (fvns:EncapBlk) ==================================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_vlan_pool_encap_block`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage VLAN encap blocks that are assigned to VLAN pools on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **allocation\_mode** string | **Choices:*** dynamic * inherit * static | The method used for allocating encaps to resources. aliases: mode | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **block\_end** integer | | The end of encap block. aliases: end | | **block\_name** string | | The name to give to the encap block. aliases: name | | **block\_start** integer | | The start of the encap block. aliases: start | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | Description for the pool encap block. aliases: descr | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **pool** string | | The name of the pool that the encap block should be assigned to. aliases: pool\_name | | **pool\_allocation\_mode** string | **Choices:*** dynamic * static | The method used for allocating encaps to resources. aliases: pool\_mode | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The `pool` must exist in order to add or delete a encap block. See Also -------- See also [cisco.aci.aci\_encap\_pool\_range](aci_encap_pool_range_module#ansible-collections-cisco-aci-aci-encap-pool-range-module) The official documentation on the **cisco.aci.aci\_encap\_pool\_range** module. [cisco.aci.aci\_vlan\_pool](aci_vlan_pool_module#ansible-collections-cisco-aci-aci-vlan-pool-module) The official documentation on the **cisco.aci.aci\_vlan\_pool** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **fvns:EncapBlk**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add a new VLAN encap block cisco.aci.aci_vlan_pool_encap_block: host: apic username: admin password: SomeSecretPassword pool: production block_start: 20 block_end: 50 state: present delegate_to: localhost - name: Remove a VLAN encap block cisco.aci.aci_vlan_pool_encap_block: host: apic username: admin password: SomeSecretPassword pool: production block_start: 20 block_end: 50 state: absent delegate_to: localhost - name: Query a VLAN encap block cisco.aci.aci_vlan_pool_encap_block: host: apic username: admin password: SomeSecretPassword pool: production block_start: 20 block_end: 50 state: query delegate_to: localhost register: query_result - name: Query a VLAN pool for encap blocks cisco.aci.aci_vlan_pool_encap_block: host: apic username: admin password: SomeSecretPassword pool: production state: query delegate_to: localhost register: query_result - name: Query all VLAN encap blocks cisco.aci.aci_vlan_pool_encap_block: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Jacob McGill (@jmcgill298) * Dag Wieers (@dagwieers)
programming_docs
ansible cisco.aci.aci_l3out_route_tag_policy – Manage route tag policies (l3ext:RouteTagPol) cisco.aci.aci\_l3out\_route\_tag\_policy – Manage route tag policies (l3ext:RouteTagPol) ======================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_l3out_route_tag_policy`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage route tag policies on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | The description for the route tag policy. aliases: descr | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **rtp** string | | The name of the route tag policy. aliases: name, rtp\_name | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tag** integer | | The value of the route tag. Accepted values range between `0` and `4294967295`. The APIC defaults to `4294967295` when unset during creation. | | **tenant** string | | The name of the tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The `tenant` used must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) module can be used for this. See Also -------- See also [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **l3ext:RouteTagPol**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - cisco.aci.aci_l3out_route_tag_policy: host: apic username: admin password: SomeSecretPassword rtp: '{{ rtp_name }}' tenant: production tag: '{{ tag }}' description: '{{ description }}' delegate_to: localhost ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Dag Wieers (@dagwieers) ansible cisco.aci.aci_switch_policy_vpc_protection_group – Manage switch policy explicit vPC protection groups (fabric:ExplicitGEp, fabric:NodePEp). cisco.aci.aci\_switch\_policy\_vpc\_protection\_group – Manage switch policy explicit vPC protection groups (fabric:ExplicitGEp, fabric:NodePEp). ================================================================================================================================================= Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_switch_policy_vpc_protection_group`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage switch policy explicit vPC protection groups on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **protection\_group** string | | The name of the Explicit vPC Protection Group. aliases: name, protection\_group\_name | | **protection\_group\_id** integer | | The Explicit vPC Protection Group ID. aliases: id | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **switch\_1\_id** integer | | The ID of the first Leaf Switch for the Explicit vPC Protection Group. | | **switch\_2\_id** integer | | The ID of the Second Leaf Switch for the Explicit vPC Protection Group. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | | **vpc\_domain\_policy** string | | The vPC domain policy to be associated with the Explicit vPC Protection Group. aliases: vpc\_domain\_policy\_name | See Also -------- See also [cisco.aci.aci\_switch\_policy\_leaf\_profile](aci_switch_policy_leaf_profile_module#ansible-collections-cisco-aci-aci-switch-policy-leaf-profile-module) The official documentation on the **cisco.aci.aci\_switch\_policy\_leaf\_profile** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC classes **fabric:ExplicitGEp** and **fabric:NodePEp**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add vPC Protection Group cisco.aci.aci_switch_policy_vpc_protection_group: host: apic username: admin password: SomeSecretPassword protection_group: leafPair101-vpcGrp protection_group_id: 6 switch_1_id: 1011 switch_2_id: 1012 state: present delegate_to: localhost - name: Remove Explicit vPC Protection Group cisco.aci.aci_switch_policy_vpc_protection_group: host: apic username: admin password: SomeSecretPassword protection_group: leafPair101-vpcGrp state: absent delegate_to: localhost - name: Query vPC Protection Groups cisco.aci.aci_switch_policy_vpc_protection_group: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result - name: Query our vPC Protection Group cisco.aci.aci_switch_policy_vpc_protection_group: host: apic username: admin password: SomeSecretPassword protection_group: leafPair101-vpcGrp state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Bruno Calogero (@brunocalogero)
programming_docs
ansible cisco.aci.aci_aep_to_domain – Bind AEPs to Physical or Virtual Domains (infra:RsDomP) cisco.aci.aci\_aep\_to\_domain – Bind AEPs to Physical or Virtual Domains (infra:RsDomP) ======================================================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_aep_to_domain`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Bind AEPs to Physical or Virtual Domains on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **aep** string | | The name of the Attachable Access Entity Profile. aliases: aep\_name | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **domain** string | | Name of the physical or virtual domain being associated with the AEP. aliases: domain\_name, domain\_profile | | **domain\_type** string | **Choices:*** fc * l2dom * l3dom * phys * vmm | Determines if the Domain is physical (phys) or virtual (vmm). aliases: type | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | | **vm\_provider** string | **Choices:*** cloudfoundry * kubernetes * microsoft * openshift * openstack * redhat * vmware | The VM platform for VMM Domains. Support for Kubernetes was added in ACI v3.0. Support for CloudFoundry, OpenShift and Red Hat was added in ACI v3.1. | Notes ----- Note * The `aep` and `domain` parameters should exist before using this module. The [cisco.aci.aci\_aep](aci_aep_module#ansible-collections-cisco-aci-aci-aep-module) and [cisco.aci.aci\_domain](aci_domain_module#ansible-collections-cisco-aci-aci-domain-module) can be used for these. See Also -------- See also [cisco.aci.aci\_aep](aci_aep_module#ansible-collections-cisco-aci-aci-aep-module) The official documentation on the **cisco.aci.aci\_aep** module. [cisco.aci.aci\_domain](aci_domain_module#ansible-collections-cisco-aci-aci-domain-module) The official documentation on the **cisco.aci.aci\_domain** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **infra:RsDomP**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Add AEP to domain binding cisco.aci.aci_aep_to_domain: &binding_present host: apic username: admin password: SomeSecretPassword aep: test_aep domain: phys_dom domain_type: phys state: present delegate_to: localhost - name: Remove AEP to domain binding cisco.aci.aci_aep_to_domain: &binding_absent host: apic username: admin password: SomeSecretPassword aep: test_aep domain: phys_dom domain_type: phys state: absent delegate_to: localhost - name: Query our AEP to domain binding cisco.aci.aci_aep_to_domain: host: apic username: admin password: SomeSecretPassword aep: test_aep domain: phys_dom domain_type: phys state: query delegate_to: localhost register: query_result - name: Query all AEP to domain bindings cisco.aci.aci_aep_to_domain: &binding_query host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Dag Wieers (@dagwieers) ansible cisco.aci.aci_epg_monitoring_policy – Manage monitoring policies (mon:EPGPol) cisco.aci.aci\_epg\_monitoring\_policy – Manage monitoring policies (mon:EPGPol) ================================================================================ Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_epg_monitoring_policy`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage monitoring policies on Cisco ACI fabrics. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | Description for the monitoring policy. aliases: descr | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **monitoring\_policy** string | | The name of the monitoring policy. aliases: name | | **name\_alias** string | | The alias for the current object. This relates to the nameAlias field in ACI. | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **tenant** string | | The name of the tenant. aliases: tenant\_name | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | Notes ----- Note * The `tenant` used must exist before using this module in your playbook. The [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) module can be used for this. See Also -------- See also [cisco.aci.aci\_tenant](aci_tenant_module#ansible-collections-cisco-aci-aci-tenant-module) The official documentation on the **cisco.aci.aci\_tenant** module. [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC class **mon:EPGPol**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - cisco.aci.aci_epg_monitoring_policy: host: '{{ hostname }}' username: '{{ username }}' password: '{{ password }}' monitoring_policy: '{{ monitoring_policy }}' description: '{{ description }}' tenant: '{{ tenant }}' delegate_to: localhost ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Dag Wieers (@dagwieers)
programming_docs
ansible cisco.aci.aci_snmp_policy – Manage Syslog groups (snmp:Pol). cisco.aci.aci\_snmp\_policy – Manage Syslog groups (snmp:Pol). ============================================================== Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_snmp_policy`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage syslog policies Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **admin\_state** string | **Choices:*** enabled * disabled | Administrative State of the policy | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **contact** string | | SNMP contact | | **description** string | | Description of the SNMP policy | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **location** string | | SNMP location | | **name** string | | Name of the SNMP policy aliases: snmp\_policy, snmp\_policy\_name | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC classes **snmp:Pol**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Create an SNMP policy and Set Admin State to Enable cisco.aci.aci_snmp_policy: host: apic username: admin password: SomeSecretPassword validate_certs: no admin_state: enabled name: my_snmp_policy state: present delegate_to: localhost - name: Remove an SNMP policy cisco.aci.aci_snmp_policy: host: apic username: admin password: SomeSecretPassword name: my_snmp_policy state: absent delegate_to: localhost - name: Query an SNMP policy cisco.aci.aci_snmp_policy: host: apic username: admin password: SomeSecretPassword name: my_snmp_policy state: query delegate_to: localhost register: query_result - name: Query all SNMP policies cisco.aci.aci_snmp_policy: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Tim Cragg (@timcragg) ansible cisco.aci.aci_syslog_remote_dest – Manage Syslog Remote Destinations (syslog:RemoteDest). cisco.aci.aci\_syslog\_remote\_dest – Manage Syslog Remote Destinations (syslog:RemoteDest). ============================================================================================ Note This plugin is part of the [cisco.aci collection](https://galaxy.ansible.com/cisco/aci) (version 2.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 cisco.aci`. To use it in a playbook, specify: `cisco.aci.aci_syslog_remote_dest`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage remote destinations for syslog messages within an existing syslog group object Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **admin\_state** string | **Choices:*** enabled * disabled | Administrative state of the syslog remote destination | | **annotation** string | | User-defined string for annotating an object. If the value is not specified in the task, the value of environment variable `ACI_ANNOTATION` will be used instead. | | **certificate\_name** string | | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a `private_key` filename was provided, this defaults to the `private_key` basename, without extension. If PEM-formatted content was provided for `private_key`, this defaults to the `username` value. If the value is not specified in the task, the value of environment variable `ACI_CERTIFICATE_NAME` will be used instead. aliases: cert\_name | | **description** string | | Description of the remote destination | | **destination** string | | Hostname or IP address to send syslog messages to | | **facility** string | **Choices:*** local0 * local1 * local2 * local3 * local4 * local5 * local6 * local7 | Forwarding facility for syslog messages | | **format** string | **Choices:*** aci * nxos | Format of the syslog messages | | **group** string | | Name of an existing syslog group aliases: syslog\_group, syslog\_group\_name | | **host** string / required | | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable `ACI_HOST` will be used instead. aliases: hostname | | **mgmt\_epg** string | | Name of a management EPG to send syslog messages from | | **name** string | | Name of the syslog remote destination aliases: remote\_destination\_name, remote\_destination | | **output\_level** string | **Choices:*** debug * info * **normal** ← | Influence the output of this ACI module. `normal` means the standard output, incl. `current` dict `info` adds informational output, incl. `previous`, `proposed` and `sent` dicts `debug` adds debugging output, incl. `filter_string`, `method`, `response`, `status` and `url` information If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_LEVEL` will be used instead. | | **output\_path** string | | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable `ACI_OUTPUT_PATH` will be used instead. | | **owner\_key** string | | User-defined string for the ownerKey attribute of an ACI object. This attribute represents a key for enabling clients to own their data for entity correlation. If the value is not specified in the task, the value of environment variable `ACI_OWNER_KEY` will be used instead. | | **owner\_tag** string | | User-defined string for the ownerTag attribute of an ACI object. This attribute represents a tag for enabling clients to add their own data. For example, to indicate who created this object. If the value is not specified in the task, the value of environment variable `ACI_OWNER_TAG` will be used instead. | | **password** string | | The password to use for authentication. This option is mutual exclusive with `private_key`. If `private_key` is provided too, it will be used instead. If the value is not specified in the task, the value of environment variables `ACI_PASSWORD` or `ANSIBLE_NET_PASSWORD` will be used instead. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable `ACI_PORT` will be used instead. | | **private\_key** string | | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default `certificate_name` that is used. This option is mutual exclusive with `password`. If `password` is provided too, it will be ignored. If the value is not specified in the task, the value of environment variable `ACI_PRIVATE_KEY` or `ANSIBLE_NET_SSH_KEYFILE` will be used instead. aliases: cert\_key | | **severity** string | **Choices:*** alerts * critical * debugging * emergencies * error * information * notifications * warnings | Severity of messages to send to remote syslog | | **state** string | **Choices:*** absent * **present** ← * query | Use `present` or `absent` for adding or removing. Use `query` for listing an object or multiple objects. | | **syslog\_port** integer | | UDP port to send syslog messages to | | **timeout** integer | **Default:**30 | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable `ACI_TIMEOUT` will be used instead. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable `ACI_USE_PROXY` will be used instead. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable `ACI_USE_SSL` will be used instead. | | **username** string | **Default:**"admin" | The username to use for authentication. If the value is not specified in the task, the value of environment variables `ACI_USERNAME` or `ANSIBLE_NET_USERNAME` will be used instead. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable `ACI_VALIDATE_CERTS` will be used instead. | See Also -------- See also [APIC Management Information Model reference](https://developer.cisco.com/docs/apic-mim-ref/) More information about the internal APIC classes **syslog:RemoteDest**. [Cisco ACI Guide](../../../scenario_guides/guide_aci#aci-guide) Detailed information on how to manage your ACI infrastructure using Ansible. [Developing Cisco ACI modules](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_aci.html#aci-dev-guide) Detailed guide on how to write your own Cisco ACI modules to contribute. Examples -------- ``` - name: Create a syslog remote destination cisco.aci.aci_syslog_remote_dest: host: apic username: admin password: SomeSecretPassword group: my_syslog_group facility: local7 destination: 10.20.30.40 syslog_port: 5678 mgmt_epg: oob-default state: present delegate_to: localhost - name: Delete syslog remote destination cisco.aci.aci_syslog_remote_dest: host: apic username: admin password: SomeSecretPassword group: my_syslog_group destination: 10.20.30.40 state: absent delegate_to: localhost - name: Query a syslog remote destination cisco.aci.aci_syslog_remote_dest: host: apic username: admin password: SomeSecretPassword group: my_syslog_group destination: 10.20.30.40 state: query delegate_to: localhost register: query_result - name: Query all syslog remote destinations cisco.aci.aci_syslog_remote_dest: host: apic username: admin password: SomeSecretPassword state: query delegate_to: localhost register: query_result ``` 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 | | --- | --- | --- | | **current** list / elements=string | success | The existing configuration from the APIC after the module has finished **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production environment', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **error** dictionary | failure | The error information as returned from the APIC **Sample:** {'code': '122', 'text': 'unknown managed object class foo'} | | **filter\_string** string | failure or debug | The filter string used for the request **Sample:** ?rsp-prop-include=config-only | | **method** string | failure or debug | The HTTP method used for the request to the APIC **Sample:** POST | | **previous** list / elements=string | info | The original configuration from the APIC before the module has started **Sample:** [{'fvTenant': {'attributes': {'descr': 'Production', 'dn': 'uni/tn-production', 'name': 'production', 'nameAlias': '', 'ownerKey': '', 'ownerTag': ''}}}] | | **proposed** dictionary | info | The assembled configuration from the user-provided parameters **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment', 'name': 'production'}}} | | **raw** string | parse error | The raw output returned by the APIC REST API (xml or json) **Sample:** <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata> | | **response** string | failure or debug | The HTTP response from the APIC **Sample:** OK (30 bytes) | | **sent** list / elements=string | info | The actual/minimal configuration pushed to the APIC **Sample:** {'fvTenant': {'attributes': {'descr': 'Production environment'}}} | | **status** integer | failure or debug | The HTTP status from the APIC **Sample:** 200 | | **url** string | failure or debug | The HTTP url used for the request to the APIC **Sample:** https://10.11.12.13/api/mo/uni/tn-production.json | ### Authors * Tim Cragg (@timcragg)
programming_docs