| 1 |
# Cisco IOSXR Collection |
| 2 |
<!--[](https://codecov.io/gh/ansible-collections/cisco.iosxr)--> |
| 3 |
[](https://github.com/ansible-collections/cisco.iosxr/actions/workflows/tests.yml) |
| 4 |
[](https://github.com/ansible-collections/cisco.iosxr/actions/workflows/integration-libssh.yml) |
| 5 |
|
| 6 |
The Ansible Cisco IOSXR collection includes a variety of Ansible content to help automate the management of Cisco IOSXR network appliances. |
| 7 |
|
| 8 |
This collection has been tested against Cisco IOS-XR version 7.0.2 |
| 9 |
|
| 10 |
## Communication |
| 11 |
|
| 12 |
* Join the Ansible forum: |
| 13 |
* [Get Help](https://forum.ansible.com/c/help/6): get help or help others. |
| 14 |
* [Posts tagged with 'network'](https://forum.ansible.com/tag/network): subscribe to participate in collection-related conversations. |
| 15 |
* [Ansible Network Automation Working Group](https://forum.ansible.com/g/network-wg): by joining the team you will automatically get subscribed to the posts tagged with [network](https://forum.ansible.com/tags/network). |
| 16 |
* [Social Spaces](https://forum.ansible.com/c/chat/4): gather and interact with fellow enthusiasts. |
| 17 |
* [News & Announcements](https://forum.ansible.com/c/news/5): track project-wide announcements including social events. |
| 18 |
|
| 19 |
* The Ansible [Bullhorn newsletter](https://docs.ansible.com/ansible/devel/community/communication.html#the-bullhorn): is used to announce releases and important changes. |
| 20 |
|
| 21 |
For more information about communication, see the [Ansible communication guide](https://docs.ansible.com/ansible/devel/community/communication.html). |
| 22 |
|
| 23 |
<!--start requires_ansible--> |
| 24 |
## Ansible version compatibility |
| 25 |
|
| 26 |
This collection has been tested against the following Ansible versions: **>=2.16.0**. |
| 27 |
|
| 28 |
Plugins and modules within a collection may be tested with only specific Ansible versions. |
| 29 |
A collection may contain metadata that identifies these versions. |
| 30 |
PEP440 is the schema used to describe the versions of Ansible. |
| 31 |
<!--end requires_ansible--> |
| 32 |
|
| 33 |
### Supported connections |
| 34 |
|
| 35 |
The Cisco IOS-XR collection supports ``network_cli`` and ``netconf`` connections. A detailed platform guide can be found [here](https://github.com/ansible-collections/cisco.iosxr/blob/main/platform_guide.rst). |
| 36 |
|
| 37 |
## Included content |
| 38 |
<!--start collection content--> |
| 39 |
### Cliconf plugins |
| 40 |
Name | Description |
| 41 |
--- | --- |
| 42 |
[cisco.iosxr.iosxr](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_cliconf.rst)|Use iosxr cliconf to run command on Cisco IOS XR platform |
| 43 |
|
| 44 |
### Netconf plugins |
| 45 |
Name | Description |
| 46 |
--- | --- |
| 47 |
[cisco.iosxr.iosxr](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_netconf.rst)|Use iosxr netconf plugin to run netconf commands on Cisco IOSXR platform |
| 48 |
|
| 49 |
### Modules |
| 50 |
Name | Description |
| 51 |
--- | --- |
| 52 |
[cisco.iosxr.iosxr_acl_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_acl_interfaces_module.rst)|Resource module to configure ACL interfaces. |
| 53 |
[cisco.iosxr.iosxr_acls](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_acls_module.rst)|Resource module to configure ACLs. |
| 54 |
[cisco.iosxr.iosxr_banner](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_banner_module.rst)|Module to configure multiline banners. |
| 55 |
[cisco.iosxr.iosxr_bgp_address_family](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_bgp_address_family_module.rst)|Resource module to configure BGP Address family. |
| 56 |
[cisco.iosxr.iosxr_bgp_global](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_bgp_global_module.rst)|Resource module to configure BGP. |
| 57 |
[cisco.iosxr.iosxr_bgp_neighbor_address_family](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_bgp_neighbor_address_family_module.rst)|Resource module to configure BGP Neighbor Address family. |
| 58 |
[cisco.iosxr.iosxr_bgp_templates](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_bgp_templates_module.rst)|Manages BGP templates resource module. |
| 59 |
[cisco.iosxr.iosxr_command](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_command_module.rst)|Module to run commands on remote devices. |
| 60 |
[cisco.iosxr.iosxr_config](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_config_module.rst)|Module to manage configuration sections. |
| 61 |
[cisco.iosxr.iosxr_facts](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_facts_module.rst)|Module to collect facts from remote devices. |
| 62 |
[cisco.iosxr.iosxr_hostname](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_hostname_module.rst)|Resource module to configure hostname. |
| 63 |
[cisco.iosxr.iosxr_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_interfaces_module.rst)|Resource module to configure interfaces. |
| 64 |
[cisco.iosxr.iosxr_l2_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_l2_interfaces_module.rst)|Resource Module to configure L2 interfaces. |
| 65 |
[cisco.iosxr.iosxr_l3_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_l3_interfaces_module.rst)|Resource module to configure L3 interfaces. |
| 66 |
[cisco.iosxr.iosxr_lacp](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_lacp_module.rst)|Resource module to configure LACP. |
| 67 |
[cisco.iosxr.iosxr_lacp_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_lacp_interfaces_module.rst)|Resource module to configure LACP interfaces. |
| 68 |
[cisco.iosxr.iosxr_lag_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_lag_interfaces_module.rst)|Resource module to configure LAG interfaces. |
| 69 |
[cisco.iosxr.iosxr_lldp_global](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_lldp_global_module.rst)|Resource module to configure LLDP. |
| 70 |
[cisco.iosxr.iosxr_lldp_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_lldp_interfaces_module.rst)|Resource module to configure LLDP interfaces. |
| 71 |
[cisco.iosxr.iosxr_logging_global](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_logging_global_module.rst)|Resource module to configure logging. |
| 72 |
[cisco.iosxr.iosxr_netconf](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_netconf_module.rst)|Configures NetConf sub-system service on Cisco IOS-XR devices |
| 73 |
[cisco.iosxr.iosxr_ntp_global](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_ntp_global_module.rst)|Resource module to configure NTP. |
| 74 |
[cisco.iosxr.iosxr_ospf_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_ospf_interfaces_module.rst)|Resource module to configure OSPF interfaces. |
| 75 |
[cisco.iosxr.iosxr_ospfv2](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_ospfv2_module.rst)|Resource module to configure OSPFv2. |
| 76 |
[cisco.iosxr.iosxr_ospfv3](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_ospfv3_module.rst)|Resource module to configure OSPFv3. |
| 77 |
[cisco.iosxr.iosxr_ping](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_ping_module.rst)|Tests reachability using ping from IOSXR switch. |
| 78 |
[cisco.iosxr.iosxr_prefix_lists](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_prefix_lists_module.rst)|Resource module to configure prefix lists. |
| 79 |
[cisco.iosxr.iosxr_route_maps](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_route_maps_module.rst)|Resource module to configure route maps. |
| 80 |
[cisco.iosxr.iosxr_snmp_server](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_snmp_server_module.rst)|Resource module to configure snmp server. |
| 81 |
[cisco.iosxr.iosxr_static_routes](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_static_routes_module.rst)|Resource module to configure static routes. |
| 82 |
[cisco.iosxr.iosxr_system](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_system_module.rst)|Module to manage the system attributes. |
| 83 |
[cisco.iosxr.iosxr_user](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_user_module.rst)|Module to manage the aggregates of local users. |
| 84 |
[cisco.iosxr.iosxr_vrf_address_family](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_vrf_address_family_module.rst)|Resource module to configure VRF Address family. |
| 85 |
[cisco.iosxr.iosxr_vrf_global](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_vrf_global_module.rst)|Manages global VRF configuration. |
| 86 |
[cisco.iosxr.iosxr_vrf_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_vrf_interfaces_module.rst)|Resource module to configure VRF interfaces. |
| 87 |
|
| 88 |
<!--end collection content--> |
| 89 |
|
| 90 |
Click the ``Content`` button to see the list of content included in this collection. |
| 91 |
|
| 92 |
## Installing this collection |
| 93 |
|
| 94 |
You can install the Cisco IOS-XR collection with the Ansible Galaxy CLI: |
| 95 |
|
| 96 |
ansible-galaxy collection install cisco.iosxr |
| 97 |
|
| 98 |
You can also include it in a `requirements.yml` file and install it with `ansible-galaxy collection install -r requirements.yml`, using the format: |
| 99 |
|
| 100 |
```yaml |
| 101 |
--- |
| 102 |
collections: |
| 103 |
- name: cisco.iosxr |
| 104 |
``` |
| 105 |
## Using this collection |
| 106 |
|
| 107 |
|
| 108 |
This collection includes [network resource modules](https://docs.ansible.com/ansible/latest/network/user_guide/network_resource_modules.html). |
| 109 |
|
| 110 |
### Using modules from the Cisco IOSXR collection in your playbooks |
| 111 |
|
| 112 |
You can call modules by their Fully Qualified Collection Namespace (FQCN), such as `cisco.iosxr.iosxr_l2_interfaces`. |
| 113 |
The following example task replaces configuration changes in the existing configuration on a Cisco IOSXR network device, using the FQCN: |
| 114 |
|
| 115 |
```yaml |
| 116 |
--- |
| 117 |
- name: Replace device configuration of specified L2 interfaces with provided configuration. |
| 118 |
cisco.iosxr.iosxr_l2_interfaces: |
| 119 |
config: |
| 120 |
- name: GigabitEthernet0/0/0/4 |
| 121 |
native_vlan: 40 |
| 122 |
l2transport: True |
| 123 |
l2protocol: |
| 124 |
- stp: forward |
| 125 |
- name: GigabitEthernet0/0/0/3.900 |
| 126 |
q_vlan: |
| 127 |
- 20 |
| 128 |
- any |
| 129 |
state: replaced |
| 130 |
|
| 131 |
``` |
| 132 |
|
| 133 |
**NOTE**: For Ansible 2.9, you may not see deprecation warnings when you run your playbooks with this collection. Use this documentation to track when a module is deprecated. |
| 134 |
|
| 135 |
|
| 136 |
### See Also: |
| 137 |
|
| 138 |
* [Cisco IOSXR Platform Options](https://docs.ansible.com/ansible/latest/network/user_guide/platform_iosxr.html) |
| 139 |
* [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details. |
| 140 |
|
| 141 |
## Contributing to this collection |
| 142 |
|
| 143 |
We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the [Cisco IOSXR collection repository](https://github.com/ansible-collections/cisco.iosxr). See [Contributing to Ansible-maintained collections](https://docs.ansible.com/ansible/devel/community/contributing_maintained_collections.html#contributing-maintained-collections) for complete details. |
| 144 |
|
| 145 |
You can also join us on: |
| 146 |
|
| 147 |
- IRC - the ``#ansible-network`` [libera.chat](https://libera.chat/) channel |
| 148 |
- Slack - [Ansible Network](https://ansiblenetwork.slack.com) |
| 149 |
|
| 150 |
See the [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html) for details on contributing to Ansible. |
| 151 |
|
| 152 |
## Support |
| 153 |
|
| 154 |
As a Red Hat Ansible [Certified Content](https://catalog.redhat.com/software/search?target_platforms=Red%20Hat%20Ansible%20Automation%20Platform), this collection is entitled to [support](https://access.redhat.com/support/) through [Ansible Automation Platform](https://www.redhat.com/en/technologies/management/ansible) (AAP). |
| 155 |
|
| 156 |
If a support case cannot be opened with Red Hat and the collection has been obtained either from [Galaxy](https://galaxy.ansible.com/ui/) or [GitHub](https://github.com/ansible-collections/cisco.iosxr), there is community support available at no charge. |
| 157 |
|
| 158 |
You can join us on [#network:ansible.com](https://matrix.to/#/#network:ansible.com) room or the [Ansible Forum Network Working Group](https://forum.ansible.com/g/network-wg). |
| 159 |
|
| 160 |
For more information you can check the communication section below. |
| 161 |
|
| 162 |
### Code of Conduct |
| 163 |
This collection follows the Ansible project's |
| 164 |
[Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html). |
| 165 |
Please read and familiarize yourself with this document. |
| 166 |
|
| 167 |
## Release notes |
| 168 |
|
| 169 |
Release notes are available [here](https://github.com/ansible-collections/cisco.iosxr/blob/main/CHANGELOG.rst). |
| 170 |
|
| 171 |
## Roadmap |
| 172 |
|
| 173 |
<!-- Optional. Include the roadmap for this collection, and the proposed release/versioning strategy so users can anticipate the upgrade/update cycle. --> |
| 174 |
|
| 175 |
## More information |
| 176 |
|
| 177 |
- [Ansible network resources](https://docs.ansible.com/ansible/latest/network/getting_started/network_resources.html) |
| 178 |
- [Ansible Collection overview](https://github.com/ansible-collections/overview) |
| 179 |
- [Ansible User guide](https://docs.ansible.com/ansible/latest/user_guide/index.html) |
| 180 |
- [Ansible Developer guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html) |
| 181 |
- [Ansible Community code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html) |
| 182 |
|
| 183 |
## Licensing |
| 184 |
|
| 185 |
GNU General Public License v3.0 or later. |
| 186 |
|
| 187 |
See [LICENSE](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text. |