Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Opengear NG Ansible Collection

The Opengear NG Collection includes a variety of Ansible content to help automate the management of Opengear network appliances.

Main CI Status

Supported Products

The Opengear NG collection supports the following Opengear product families:

  • OM12xx
  • OM13xx
  • OM22xx
  • CM80xx
  • CM81xx

Connections

Modules in this collection use the Ansible httpapi connection plugin by default to communicate with Opengear devices via the REST API.

Modules

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.

Installing The Collection

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.ng

Developers: See CONTRIBUTING.md for local development installation instructions.

Using NG Collection

This collection includes network resource modules.

Authentication

This collection uses the Ansible httpapi connection plugin for authentication.

Authentication is handled by the Opengear REST API using standard Ansible connection variables.

Inventory Example

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 }}"

Playbook Example

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: replaced

Further Examples

For more examples of opengear.ng module usage, see Examples.

For general Ansible collection usage, see Using Ansible Collections.

Contributing

Contributions are welcome! Please read our Contributing Guide before submitting a pull request.

Code of Conduct

This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.

More information

Licensing

GNU General Public License v3.0 or later.

See LICENSE to see the full text.

About

Ansible Network Collection for Opengear devices — In active development, not yet released

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

Contributors

Languages