community.general.onyx_ntp_servers_peers (0.1.1) — module

Configures NTP peers and servers parameters

Authors: Sara-Touqan (@sarato)

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

This module provides declarative management of NTP peers and servers configuration on Mellanox ONYX network devices.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: configure NTP peers and servers
  onyx_ntp_peers_servers:
    peer:
       - ip_or_name: 1.1.1.1
         enabled: yes
         version: 4
         key_id: 6
         state: present
    server:
       - ip_or_name: 2.2.2.2
         enabled: true
         version: 3
         key_id: 8
         trusted_enable: no
         state: present
    ntpdate: 192.168.10.10

Inputs

    
peer:
    description:
    - List of ntp peers.
    suboptions:
      enabled:
        description:
        - Disables/Enables ntp peer state
        type: bool
      ip_or_name:
        description:
        - Configures ntp peer name or ip.
        required: true
        type: str
      key_id:
        description:
        - Used to configure the key-id for the ntp peer
        type: int
      state:
        choices:
        - present
        - absent
        description:
        - Indicates if the ntp peer exists or should be deleted
        type: str
      version:
        choices:
        - 3
        - 4
        description:
        - version number for the ntp peer
        type: int
    type: list

server:
    description:
    - List of ntp servers.
    suboptions:
      enabled:
        description:
        - Disables/Enables ntp server
        type: bool
      ip_or_name:
        description:
        - Configures ntp server name or ip.
        required: true
        type: str
      key_id:
        description:
        - Used to configure the key-id for the ntp server
        type: int
      state:
        choices:
        - present
        - absent
        description:
        - Indicates if the ntp peer exists or should be deleted.
        type: str
      trusted_enable:
        description:
        - Disables/Enables the trusted state for the ntp server.
        type: bool
      version:
        choices:
        - 3
        - 4
        description:
        - version number for the ntp server
        type: int
    type: list

ntpdate:
    description:
    - Sets system clock once from a remote server using NTP.
    type: str

Outputs

commands:
  description: The list of configuration mode commands to send to the device
  returned: always.
  sample:
  - ntp peer 1.1.1.1 disable no ntp peer 1.1.1.1 disable ntp peer 1.1.1.1 keyId 6
    ntp peer 1.1.1.1 version 4 no ntp peer 1.1.1.1 ntp server 2.2.2.2 disable no ntp
    server 2.2.2.2 disable ntp server 2.2.2.2 keyID 8 ntp server 2.2.2.2 version 3
    ntp server 2.2.2.2 trusted-enable no ntp server 2.2.2.2 ntp server 192.168.10.10
    ntpdate 192.168.10.10
  type: list