salt.states.netntp

Network NTP

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
        }
    }
}