The Opengear NG Collection includes a variety of Ansible content to help automate the management of Opengear network appliances.
The Opengear NG collection supports the following Opengear product families:
- OM12xx
- OM13xx
- OM22xx
- CM80xx
- CM81xx
Modules in this collection use the Ansible httpapi connection plugin by default
to communicate with Opengear devices via the REST API.
| Name | Description |
|---|---|
| opengear.ng.auth | Manage remote authentication, authorization, and accounting (AAA) configuration. |
| opengear.ng.conns | Manage network connection configuration. |
| opengear.ng.facts | Gather device information and network resource configuration facts. |
| opengear.ng.failover | Manage failover configuration and retrieve failover status. |
| opengear.ng.firmware_upgrade | Manage firmware upgrades on Opengear devices. |
| opengear.ng.groups | Manage user group configuration. |
| opengear.ng.pdu | Manage PDUs connected to the device, including configuration, monitoring, and control. |
| opengear.ng.physifs | Manage physical network interface configuration. |
| opengear.ng.ports | Manage serial port configuration. |
| opengear.ng.services | Manage system service configuration. |
| opengear.ng.static_routes | Manage static route configuration. |
| opengear.ng.system | Manage device system configuration and retrieve device information. |
| opengear.ng.user_authorized_keys | Manage configuration of user authorized keys on Opengear devices. |
| opengear.ng.users | Manage user configuration. |
You can install the latest release of this collection with the Ansible Galaxy CLI:
ansible-galaxy collection install opengear.ng
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: opengear.ngDevelopers: See CONTRIBUTING.md for local development installation instructions.
This collection includes network resource modules.
This collection uses the Ansible httpapi connection plugin for authentication.
Authentication is handled by the Opengear REST API using standard Ansible connection variables.
To connect to an Opengear device, define hosts in inventory.yml.
all:
children:
opengear:
hosts:
my-device:
ansible_host: 192.168.1.1
vars:
ansible_connection: httpapi
ansible_network_os: opengear.ng.http_api # required - httpapi plugin to use for this collection
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
ansible_user: "{{ opengear_user }}"
ansible_password: "{{ opengear_password }}"You can call modules by their Fully Qualified Collection Namespace (FQCN) such
as opengear.ng.users.
The following example task replaces configuration for an entity in the existing configuration of an Opengear network device, using the FQCN:
---
- name: Example playbook for managing groups
hosts: opengear
gather_facts: false
tasks:
- name: Replace device configuration of group1.
opengear.ng.groups:
config:
- name: group1
enabled: true
description: This is an example group
members: []
access_rights: ['web_ui', 'pmshell']
ports: ['port-1','port-2']
state: replacedFor more examples of opengear.ng module usage, see Examples.
For general Ansible collection usage, see Using Ansible Collections.
Contributions are welcome! Please read our Contributing Guide before submitting a pull request.
This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.
- Ansible network resources
- Ansible Collection overview
- Ansible User guide
- Ansible Developer guide
- Ansible Community code of conduct
- Opengear OM REST API
GNU General Public License v3.0 or later.
See LICENSE to see the full text.