blob: 6eeab8ad75846e359d47fc2998f9e5ede245377d [file] [log] [blame]
OlgaGusarenko5fc09322018-06-19 11:29:32 +03001=====
2Usage
3=====
Filip Pytloun10e4d6c2015-10-06 16:28:32 +02004
OlgaGusarenko5fc09322018-06-19 11:29:32 +03005The Network Time Protocol (NTP) formula is used to properly synchronize
6services across the nodes. This file provides the sample configurations for
7different use cases.
Filip Pytloun10e4d6c2015-10-06 16:28:32 +02008
OlgaGusarenko5fc09322018-06-19 11:29:32 +03009* [Deprecated] NTP client configuration, should not be used if the ``stratum``
10 parameter exists:
Filip Pytloun10e4d6c2015-10-06 16:28:32 +020011
OlgaGusarenko5fc09322018-06-19 11:29:32 +030012 .. code-block:: yaml
Filip Pytloun10e4d6c2015-10-06 16:28:32 +020013
OlgaGusarenko5fc09322018-06-19 11:29:32 +030014 ntp:
15 client:
Ondrej Smolad3c67032018-04-04 12:16:05 +020016 enabled: true
OlgaGusarenko5fc09322018-06-19 11:29:32 +030017 strata:
18 - ntp.cesnet.cz
19 - ntp.nic.cz
Ondrej Smolad3c67032018-04-04 12:16:05 +020020
OlgaGusarenko5fc09322018-06-19 11:29:32 +030021* The NTP client extended definition with auth:
Ondrej Smolad3c67032018-04-04 12:16:05 +020022
OlgaGusarenko5fc09322018-06-19 11:29:32 +030023 .. code-block:: yaml
24
25 ntp:
26 client:
Ondrej Smolad3c67032018-04-04 12:16:05 +020027 enabled: true
OlgaGusarenko5fc09322018-06-19 11:29:32 +030028 stratum:
29 primary:
30 server: ntp.cesnet.cz
31 key_id: 1
32 secondary:
33 server: ntp.nic.cz
34 key_id: 2
35
36* The NTP client with MD5 auth configuration:
37
38 .. code-block:: yaml
39
40 ntp:
41 client:
42 enabled: true
43 auth:
44 enabled: true
45 secrets:
46 1:
47 secret_type: 'M'
48 secret: 'Runrabbitrundigthath'
49 trustedkey: true
50 2:
51 secret_type: 'M'
52 secret: 'Howiwishyouwereherew'
53 trustedkey: true
54 stratum:
55 primary:
56 server: ntp.cesnet.cz
57 key_id: 1
58 secondary:
59 server: ntp.nic.cz
60 key_id: 2
61
62* The NTP server with MD5 auth configuration:
63
64 .. code-block:: yaml
65
66 ntp:
67 client:
68 enabled: false
69 server:
70 enabled: true
71 auth:
72 enabled: true
73 secrets:
74 1:
75 secret_type: 'M'
76 secret: 'Runrabbitrundigthath'
77 trustedkey: true
78 2:
79 secret_type: 'M'
80 secret: 'Howiwishyouwereherew'
81 trustedkey: true
82 stratum:
83 primary:
84 server: ntp.cesnet.cz
85 key_id: 1
86 secondary:
87 server: ntp.nic.cz
88 key_id: 2
89
90* A cleaning up of the NTP configurations left by DHCP:
91
92 .. code-block:: yaml
93
94 ntp:
95 client:
96 enabled: true
97 remove_dhcp_conf: true # default false
98
99* The NTP server simple peering definition:
100
101 .. code-block:: yaml
102
103 ntp:
104 server:
105 peers:
106 - 192.168.0.241
107 - 192.168.0.242
108
109* The NTP server extended peering definition:
110
111 .. code-block:: yaml
112
113 ntp:
114 server:
115 peers:
Ondrej Smolad3c67032018-04-04 12:16:05 +0200116 1:
OlgaGusarenko5fc09322018-06-19 11:29:32 +0300117 host: 192.168.31.1
Ondrej Smolad3c67032018-04-04 12:16:05 +0200118 2:
OlgaGusarenko5fc09322018-06-19 11:29:32 +0300119 host: 192.168.31.2
120 3:
121 host: 192.168.31.3
Ondrej Smolad3c67032018-04-04 12:16:05 +0200122
OlgaGusarenko5fc09322018-06-19 11:29:32 +0300123* The NTP server definition enabling the ``listen`` and ``ignore`` actions on
124 specific addresses:
azvyagintsev4e404702018-05-30 20:02:03 +0300125
OlgaGusarenko5fc09322018-06-19 11:29:32 +0300126 .. code-block:: yaml
azvyagintsev4e404702018-05-30 20:02:03 +0300127
OlgaGusarenko5fc09322018-06-19 11:29:32 +0300128 ntp:
129 server:
130 1:
131 value: wildcard
132 action: ignore
133 2:
134 value: ::1
135 action: listen
136 3:
137 value: 192.168.31.1
138 action: listen
azvyagintsev4e404702018-05-30 20:02:03 +0300139
OlgaGusarenko5fc09322018-06-19 11:29:32 +0300140**Read more**
Filip Pytloun10e4d6c2015-10-06 16:28:32 +0200141
142* https://collectd.org/wiki/index.php/Plugin:NTPd
Filip Pytlounc4da4342017-02-02 13:02:03 +0100143
OlgaGusarenko5fc09322018-06-19 11:29:32 +0300144**Documentation and bugs**
Filip Pytlounc4da4342017-02-02 13:02:03 +0100145
OlgaGusarenko5fc09322018-06-19 11:29:32 +0300146* http://salt-formulas.readthedocs.io/
147 Learn how to install and update salt-formulas
Filip Pytlounc4da4342017-02-02 13:02:03 +0100148
OlgaGusarenko5fc09322018-06-19 11:29:32 +0300149* https://github.com/salt-formulas/salt-formula-ntp/issues
150 In the unfortunate event that bugs are discovered, report the issue to the
151 appropriate issue tracker. Use the Github issue tracker for a specific salt
152 formula
Filip Pytlounc4da4342017-02-02 13:02:03 +0100153
OlgaGusarenko5fc09322018-06-19 11:29:32 +0300154* https://launchpad.net/salt-formulas
155 For feature requests, bug reports, or blueprints affecting the entire
156 ecosystem, use the Launchpad salt-formulas project
Filip Pytlounc4da4342017-02-02 13:02:03 +0100157
OlgaGusarenko5fc09322018-06-19 11:29:32 +0300158* https://launchpad.net/~salt-formulas-users
159 Join the salt-formulas-users team and subscribe to mailing list if required
Filip Pytlounc4da4342017-02-02 13:02:03 +0100160
OlgaGusarenko5fc09322018-06-19 11:29:32 +0300161* https://github.com/salt-formulas/salt-formula-ntp
162 Develop the salt-formulas projects in the master branch and then submit pull
163 requests against a specific formula
Filip Pytlounc4da4342017-02-02 13:02:03 +0100164
OlgaGusarenko5fc09322018-06-19 11:29:32 +0300165* #salt-formulas @ irc.freenode.net
166 Use this IRC channel in case of any questions or feedback which is always
167 welcome
Filip Pytlounc4da4342017-02-02 13:02:03 +0100168