alliedtelesis.awplus.awplus_ntp (1.2.2) — module

Manages NTP configuration of AlliedWare Plus devices

| "added in version" 2.10.4 of alliedtelesis.awplus"

Authors: Darryl Alang

preview | supported by network

Install collection

Install with ansible-galaxy collection install alliedtelesis.awplus:==1.2.2


Add to requirements.yml

  collections:
    - name: alliedtelesis.awplus
      version: 1.2.2

Description

This module manages attributes of AlliedWare Plus devices NTP configuration.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Using merged
#
# Before state:
# -------------
# awplus(config)#show running-config | include ntp
# ntp authentication-key 3 md5 mystring
# ntp server 1.2.2.2

- name: Configure a simple server
  alliedtelesis.awplus.awplus_ntp:
    config:
      server:
        - 1.2.2.3
    state: merged
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# After state:
# ------------
# awplus(config)#show running-config | include ntp
# ntp authentication-key 3 md5 mystring
# ntp server 1.2.2.3
# ntp server 1.2.2.2


# Using replaced
#
# Before state:
# -------------
# awplus(config)#show running-config | include ntp
# ntp authentication-key 3 md5 mystring
# ntp server 1.2.2.3
# ntp server 1.2.2.2

- name: Replace device configuration with provided configuration
  alliedtelesis.awplus.awplus_ntp:
    config:
      server:
        - 1.2.2.4
    state: replaced
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# After state:
# ------------
# awplus(config)#show running-config | include ntp
# ntp authentication-key 3 md5 mystring
# ntp server 1.2.2.4


# Using overridden
#
# Before state:
# -------------
# awplus(config)#show running-config | include ntp
# ntp authentication-key 3 md5 mystring
# ntp server 1.2.2.2

- name: Override NTP attributes
  alliedtelesis.awplus.awplus_ntp:
    config:
      server:
        - 1.2.2.3
    state: overridden
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# After state:
# -------------
# awplus(config)#show running-config | include ntp
# ntp server 1.2.2.3


# Using deleted
#
# Before state:
# -------------
# awplus(config)#show running-config | include ntp
# ntp authentication-key 3 md5 mystring
# ntp server 1.2.2.2

- name: Delete NTP attributes
  alliedtelesis.awplus.awplus_ntp:
    state: deleted

Inputs

    
state:
    choices:
    - merged
    - replaced
    - overridden
    - deleted
    default: merged
    description:
    - The state the configuration should be left in
    type: str

config:
    description: The provided configuration.
    suboptions:
      authentication:
        description:
        - Authentication
        elements: dict
        suboptions:
          auth_key:
            description:
            - The authentication key.
            required: true
            type: str
          key_id:
            description:
            - An identification number for the key.
            required: true
            type: int
          key_type:
            choices:
            - md5
            - sha1
            description:
            - Hash function.
            required: true
            type: str
        type: list
      server:
        description:
        - Specify the IP address of the peer or the server hostname.
        elements: str
        type: list
      source_int:
        description:
        - Specify the IP address of the NTP source interface.
        type: str
    type: dict

Outputs

after:
  description: The resulting configuration model invocation.
  returned: when changed
  sample: "The configuration returned will always be in the same format\n of the parameters\
    \ above.\n"
before:
  description: The configuration prior to the model invocation.
  returned: always
  sample: "The configuration returned will always be in the same format\n of the parameters\
    \ above.\n"
commands:
  description: The set of commands pushed to the remote device.
  returned: always
  sample:
  - ntp server 1.2.2.2
  type: list