W3cubDocs

/Ansible 2.10

mellanox.onyx.onyx_ntp_servers_peers – Configures NTP peers and servers parameters

Note

This plugin is part of the mellanox.onyx collection.

To install it use: ansible-galaxy collection install mellanox.onyx.

To use it in a playbook, specify: mellanox.onyx.onyx_ntp_servers_peers.

New in version 0.2.0: of mellanox.onyx

Synopsis

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

Parameters

Parameter Choices/Defaults Comments
ntpdate
string
Sets system clock once from a remote server using NTP.
peer
list / elements=string
List of ntp peers.
enabled
boolean
    Choices:
  • no
  • yes
Disables/Enables ntp peer state
ip_or_name
string / required
Configures ntp peer name or ip.
key_id
integer
Used to configure the key-id for the ntp peer
state
string
    Choices:
  • present
  • absent
Indicates if the ntp peer exists or should be deleted
version
integer
    Choices:
  • 3
  • 4
version number for the ntp peer
server
list / elements=string
List of ntp servers.
enabled
boolean
    Choices:
  • no
  • yes
Disables/Enables ntp server
ip_or_name
string / required
Configures ntp server name or ip.
key_id
integer
Used to configure the key-id for the ntp server
state
string
    Choices:
  • present
  • absent
Indicates if the ntp peer exists or should be deleted.
trusted_enable
boolean
    Choices:
  • no
  • yes
Disables/Enables the trusted state for the ntp server.
version
integer
    Choices:
  • 3
  • 4
version number for the ntp server

Examples

- 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

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
commands
list / elements=string
always.
The list of configuration mode commands to send to the device

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']


Authors

  • Sara-Touqan (@sarato)

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/mellanox/onyx/onyx_ntp_servers_peers_module.html