community.general.ce_ospf (0.1.1) — module

Manages configuration of an OSPF instance on HUAWEI CloudEngine switches.

Authors: QijunPan (@QijunPan)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

Manages configuration of an OSPF instance on HUAWEI CloudEngine switches.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
    ce_ospf:
      process_id: 1
      area: 100
      state: present
      provider: "{{ cli }}"

Inputs

    
addr:
    description:
    - Specifies the address of the network segment where the interface resides. The value
      is in dotted decimal notation.

area:
    description:
    - 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.

mask:
    description:
    - IP network wildcard bits in decimal format between 0 and 32.

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Determines whether the config should be present or not on the device.

auth_mode:
    choices:
    - none
    - hmac-sha256
    - md5
    - hmac-md5
    - simple
    description:
    - Specifies the authentication type.

process_id:
    description:
    - Specifies a process ID. The value is an integer ranging from 1 to 4294967295.
    required: true

auth_key_id:
    description:
    - Authentication key id when C(auth_mode) is 'hmac-sha256', 'md5' or 'hmac-md5. Valid
      value is an integer is in the range from 1 to 255.

nexthop_addr:
    description:
    - IPv4 address for configure next-hop address's weight. Valid values are a string,
      formatted as an IP address.

auth_text_md5:
    description:
    - 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.

nexthop_weight:
    description:
    - 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.

auth_text_simple:
    description:
    - Specifies a password for simple authentication. The value is a string of 1 to 8
      characters.

max_load_balance:
    description:
    - The maximum number of paths for forward packets over multiple paths. Valid value
      is an integer in the range from 1 to 64.

Outputs

changed:
  description: check to see if a change was made on the device
  returned: always
  sample: true
  type: bool
end_state:
  description: 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'
  type: dict
existing:
  description: k/v pairs of existing configuration
  returned: verbose mode
  sample:
    areas: []
    max_load_balance: '32'
    nexthops: []
    process_id: '1'
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: verbose mode
  sample:
    area: '100'
    process_id: '1'
  type: dict
updates:
  description: commands sent to the device
  returned: always
  sample:
  - ospf 1
  - area 0.0.0.100
  type: list