The Red Hat Ecosystem Catalog is the official source for discovering and learning more about the Red Hat Ecosystem of both Red Hat and certified third-party products and services.
We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

28Modules117Plugins1Dependency
Ansible Network Collection for VYOS devices.
The Ansible VyOS collection includes a variety of Ansible content to help automate the management of VyOS network appliances.
This collection has been tested against VyOS 1.3.8, 1.4.1 and the current rolling release for 1.5. Where possible, compatibility with older versions of VyOS are maintained but not guaranteed.
This collection has been tested against following Ansible versions: >=2.15.0.
For collections that support Ansible 2.9, please ensure you update your network_os to use the
fully qualified collection name (for example, cisco.ios.ios).
Plugins and modules within a collection may be tested with only specific Ansible versions.
A collection may contain metadata that identifies these versions.
PEP440 is the schema used to describe the versions of Ansible.
The VyOS collection supports network_cli connections.
| Name | Description |
|---|---|
| vyos.vyos.vyos | Use vyos cliconf to run command on VyOS platform |
| Name | Description |
|---|---|
| vyos.vyos.vyos_banner | Manage multiline banners on VyOS devices |
| vyos.vyos.vyos_bgp_address_family | BGP Address Family resource module |
| vyos.vyos.vyos_bgp_global | BGP global resource module |
| vyos.vyos.vyos_command | Run one or more commands on VyOS devices |
| vyos.vyos.vyos_config | Manage VyOS configuration on remote device |
| vyos.vyos.vyos_facts | Get facts about vyos devices. |
| vyos.vyos.vyos_firewall_global | Firewall global resource module |
| vyos.vyos.vyos_firewall_interfaces | Firewall interfaces resource module |
| vyos.vyos.vyos_firewall_rules | Firewall rules resource module |
| vyos.vyos.vyos_hostname | Manages hostname resource module |
| vyos.vyos.vyos_interfaces | Manages interface attributes of VyOS network devices. |
| vyos.vyos.vyos_l3_interfaces | Layer 3 interfaces resource module. |
| vyos.vyos.vyos_lag_interfaces | LAG interfaces resource module |
| vyos.vyos.vyos_lldp_global | LLDP global resource module |
| vyos.vyos.vyos_lldp_interfaces | LLDP interfaces resource module |
| vyos.vyos.vyos_logging_global | Logging resource module |
| vyos.vyos.vyos_ntp_global | NTP global resource module |
| vyos.vyos.vyos_ospf_interfaces | OSPF Interfaces Resource Module. |
| vyos.vyos.vyos_ospfv2 | OSPFv2 resource module |
| vyos.vyos.vyos_ospfv3 | OSPFv3 resource module |
| vyos.vyos.vyos_ping | Tests reachability using ping from VyOS network devices |
| vyos.vyos.vyos_prefix_lists | Prefix-Lists resource module for VyOS |
| vyos.vyos.vyos_route_maps | Route Map resource module |
| vyos.vyos.vyos_snmp_server | Manages snmp_server resource module |
| vyos.vyos.vyos_static_routes | Static routes resource module |
| vyos.vyos.vyos_system | Run set system commands on VyOS devices |
| vyos.vyos.vyos_user | Manage the collection of local users on VyOS device |
| vyos.vyos.vyos_vlan | Manage VLANs on VyOS network devices |
Click the Content button to see the list of content included in this collection.
You can install the VyOS collection with the Ansible Galaxy CLI:
ansible-galaxy collection install vyos.vyos
You can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml, using the format:
---
collections:
- name: vyos.vyos
This collection includes network resource modules.
You can call modules by their Fully Qualified Collection Namespace (FQCN), such as vyos.vyos.vyos_static_routes.
The following example task replaces configuration changes in the existing configuration on a VyOS network device, using the FQCN:
---
- name: Replace device configurations of listed static routes with provided
configurations
register: result
vyos.vyos.vyos_static_routes: &id001
config:
- address_families:
- afi: ipv4
routes:
- dest: 192.0.2.32/28
blackhole_config:
distance: 2
next_hops:
- forward_router_address: 192.0.2.7
- forward_router_address: 192.0.2.8
- forward_router_address: 192.0.2.9
state: replaced
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.
We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the VyOS collection repository. See Contributing to VyOS for complete details.
You can also join us on:
See the Contributing to VyOS for details on contributing to Ansible.
This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.
Some of our modules were templated using resource_module_builder, but some use
the newer cli_rm_builder
which tempaltes baed on in-place device information, but also uses a new network
parsing engine designed to simplify and standardize the parsing of network
configuration.
Last build was with a slightly-modified version of resource_module_builder. This changes the calling parameters for the resources.
To update the collection from the resource module models, run the following command:
ansible-playbook -e rm_dest=`pwd` \
-e structure=collection \
-e collection_org=vyos \
-e collection_name=vyos \
-e model=../../../resource_module_models/models/vyos/firewall_rules/vyos_firewall_rules.yaml \
../../../resource_module_builder/site.yml
The newer cli_rm_builder works similarly to the older resource_module_builder, but
pulls the information directly from the DOCUMENTATION, EXAMPLES and RETURN
blocks in the module itself.
To update the collection from the cli_rm_builder models, run the following command:
ansible-playbook -e rm_dest=`pwd` \
-e collection_org=vyos \
-e collection_name=vyos \
-e resource=bgp_address_family \
../../../cli_rm_builder/run.yml
Unlike the resource_module_builder, the cli_rm_builder does not require the model parameter. Instead, it uses the resource parameter to specify the resource to build.
You can use ANSIBLE_COLLECTIONS_PATH to test the collection locally. For example:
ANSIBLE_COLLECTIONS_PATHS=~/my_dev_path ansible-playbook -i inventory.network test.yml
Integration tests are run using ansible-test and require that there be an inventory
defined (you can pass this in with --inventory <filename>) and that the system be
configured for access (recommended to use SSH keys).
Additionally:
- eth0 should be configured for address dhcp and should have an assigned address
on the local network
- eth1 and eth2 should be defined and uncofirgured (they'll be overwritten by the tests)
- eth3 and beyond should not be present or interface-related tests will fail
- when using VMs for testing, ensure that the interfaces don't use virtio, as it will supress
some interface configurations. e1000e is a good choice for testing.
- eth0 is also expected to show duplex auto and speed auto in the output of show interfaces,
however others are not due to the fact that they are repeatedly deleted and recreated
which causes the default values to be hidden.
Change logs are available here.
Release notes are available here.
| Major Version | Ansible Support | VyOS Support | Details |
|---|---|---|---|
| 4.1.0 | 2.15 | 1.1.2 | Final release for the 4.x series |
| 5.0.0 | 2.16 | 1.1.2 | First relase under VyOS control as a separate collection |
| 6.0.0 | 2.18 | 1.3.8 | Planned release for supporting VyOS 1.3.8+ |
| 7.0.0 | x.xx | 1.4.x | Prospective release deprecating incompatible 1.3.x modules |
Note: - Unreleased versions are not guaranteed to be released as described. - Some modules may support a wider variety of versions depending upon the compatibility with prior versions of VyOS. - The roadmap is subject to change based on community feedback and contributions.
VyOS resources - Contributing to VyOS - VyOS documentation - VyOS forum
Ansible Resources - Ansible network resources - Ansible Collection overview - Ansible User guide - Ansible Developer guide - Ansible Community code of conduct
GNU General Public License v3.0 or later.
See LICENSE to see the full text.
| Product |
|---|
| 2.4 |
| 2.5 |
This collection requires the following collections for use:
| Name | Summary |
|---|
This collection is used by the following collections:
| Name | Summary | Version | Type |
|---|