.. _vyos.rest.vyos_ntp_global_module:
*************************
vyos.rest.vyos_ntp_global
*************************
**Manage NTP configuration on VyOS devices using REST API**
Version added: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- Manages NTP server, allow-client, and listen-address configuration on VyOS devices via the REST API.
- Supports idempotent operation using structured data.
- Uses REST API (``connection=httpapi``) instead of CLI.
- Targets VyOS 1.4+ where NTP is managed by chronyd under ``service ntp``.
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
config
dictionary
|
|
NTP configuration.
|
|
allow_clients
list
/ elements=string
|
|
List of client networks or addresses allowed to query this NTP server.
Maps to service ntp allow-client address on the device.
|
|
listen_addresses
list
/ elements=string
|
|
Local IP addresses the NTP service should listen on.
Maps to service ntp listen-address on the device.
|
|
servers
list
/ elements=dictionary
|
|
List of upstream NTP servers to synchronise from.
|
|
|
options
list
/ elements=string
|
Choices:
- dynamic
- noselect
- pool
- preempt
- prefer
- nts
- ptp
- interleave
|
Per-server options.
|
|
|
server
string
/ required
|
|
Server hostname or IP address.
|
|
running_config
string
|
|
Used only with state parsed.
Provide the output of show configuration commands | grep ntp.
|
|
state
string
|
Choices:
merged ←
- replaced
- overridden
- deleted
- gathered
- rendered
- parsed
|
The desired state of the NTP configuration.
|