community.network.ce_ospf – Manages configuration of an OSPF instance on HUAWEI CloudEngine switches.
Note
This plugin is part of the community.network collection (version 3.0.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 community.network
.
To use it in a playbook, specify: community.network.ce_ospf
.
Parameters
Parameter |
Comments |
---|---|
Specifies the address of the network segment where the interface resides. The value is in dotted decimal notation. |
|
Specifies the area ID. The area with the area-id being 0 is a backbone area. Valid values are a string, formatted as an IP address (i.e. “0.0.0.0”) or as an integer between 1 and 4294967295. |
|
Authentication key id when |
|
Specifies the authentication type. Choices:
|
|
Specifies a password for MD5, HMAC-MD5, or HMAC-SHA256 authentication. The value is a string of 1 to 255 case-sensitive characters, spaces not supported. |
|
Specifies a password for simple authentication. The value is a string of 1 to 8 characters. |
|
IP network wildcard bits in decimal format between 0 and 32. |
|
The maximum number of paths for forward packets over multiple paths. Valid value is an integer in the range from 1 to 64. |
|
IPv4 address for configure next-hop address’s weight. Valid values are a string, formatted as an IP address. |
|
Indicates the weight of the next hop. The smaller the value is, the higher the preference of the route is. It is an integer that ranges from 1 to 254. |
|
Specifies a process ID. The value is an integer ranging from 1 to 4294967295. |
|
Determines whether the config should be present or not on the device. Choices:
|
Notes
Note
This module requires the netconf system service be enabled on the remote device being managed.
Recommended connection is
netconf
.This module also works with
local
connections for legacy playbooks.
Examples
- name: Ospf module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Configure ospf
community.network.ce_ospf:
process_id: 1
area: 100
state: present
provider: "{{ cli }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
check to see if a change was made on the device Returned: always Sample: true |
|
k/v pairs of configuration after module execution Returned: verbose mode Sample: {“areas”: [{“areaId”: “0.0.0.100”, “areaType”: “Normal”}], “max_load_balance”: “32”, “nexthops”: [], “process_id”: “1”} |
|
k/v pairs of existing configuration Returned: verbose mode Sample: {“areas”: [], “max_load_balance”: “32”, “nexthops”: [], “process_id”: “1”} |
|
k/v pairs of parameters passed into module Returned: verbose mode Sample: {“area”: “100”, “process_id”: “1”} |
|
commands sent to the device Returned: always Sample: [“ospf 1”, “area 0.0.0.100”] |
Authors
QijunPan (@QijunPan)