salt.states.netntp

Network NTP

New in version 2016.11.0.

Manage the configuration of NTP peers and servers on the network devices through the NAPALM proxy.

codeauthor

Mircea Ulinic <ping@mirceaulinic.net> & Jerome Fleury <jf@cloudflare.com>

maturity

new

depends

napalm

platform

unix

Dependencies

salt.states.netntp.managed(name, peers=None, servers=None)

Manages the configuration of NTP peers and servers on the device, as specified in the state SLS file. NTP entities not specified in these lists will be removed whilst entities not configured on the device will be set.

SLS Example:

netntp_example:
    netntp.managed:
         - peers:
            - 192.168.0.1
            - 172.17.17.1
         - servers:
            - 24.124.0.251
            - 138.236.128.36

Output example:

{
    'edge01.nrt04': {
        'netntp_|-netntp_example_|-netntp_example_|-managed': {
            'comment': 'NTP servers already configured as needed.',
            'name': 'netntp_example',
            'start_time': '12:45:24.056659',
            'duration': 2938.857,
            'changes': {
                'peers': {
                    'removed': [
                        '192.168.0.2',
                        '192.168.0.3'
                    ],
                    'added': [
                        '192.168.0.1',
                        '172.17.17.1'
                    ]
                }
            },
            'result': None
        }
    }
}

Docs for previous releases are available on readthedocs.org.

Latest Salt release: 3004

Table of Contents

Previous topic

salt.states.netconfig

Next topic

salt.states.netsnmp