PageRenderTime 38ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/puphpet/puppet/modules/ntp/README.md

https://bitbucket.org/joshcrawmer4/php-contact-form
Markdown | 663 lines | 366 code | 297 blank | 0 comment | 0 complexity | 4f17bb2ee813fb6c27caeacb23bd5f36 MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause, MIT, GPL-2.0
  1. # ntp
  2. #### Table of Contents
  3. 1. [Module Description - What the module does and why it is useful](#module-description)
  4. 1. [Setup - The basics of getting started with ntp](#setup)
  5. 1. [Usage - Configuration options and additional functionality](#usage)
  6. 1. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
  7. 1. [Limitations - OS compatibility, etc.](#limitations)
  8. 1. [Development - Guide for contributing to the module](#development)
  9. ## Module description
  10. The ntp module installs, configures, and manages the NTP service across a range of operating systems and distributions.
  11. ## Setup
  12. ### Beginning with ntp
  13. `include ntp` is enough to get you up and running. To pass in parameters specifying which servers to use:
  14. ```puppet
  15. class { 'ntp':
  16. servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
  17. }
  18. ```
  19. ## Usage
  20. All parameters for the ntp module are contained within the main `ntp` class, so for any function of the module, set the options you want. See the common usages below for examples.
  21. ### Install and enable NTP
  22. ```puppet
  23. include ntp
  24. ```
  25. ### Change NTP servers
  26. ```puppet
  27. class { 'ntp':
  28. servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
  29. }
  30. ```
  31. ### Restrict who can connect
  32. ```puppet
  33. class { 'ntp':
  34. servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
  35. restrict => ['127.0.0.1'],
  36. }
  37. ```
  38. ### Install a client that can't be queried
  39. ```puppet
  40. class { 'ntp':
  41. servers => ['ntp1.corp.com', 'ntp2.corp.com'],
  42. restrict => [
  43. 'default ignore',
  44. '-6 default ignore',
  45. '127.0.0.1',
  46. '-6 ::1',
  47. 'ntp1.corp.com nomodify notrap nopeer noquery',
  48. 'ntp2.corp.com nomodify notrap nopeer noquery'
  49. ],
  50. }
  51. ```
  52. ### Listen on specific interfaces
  53. Restricting NTP to a specific interface is especially useful on Openstack node, which may have numerous virtual interfaces.
  54. ```puppet
  55. class { 'ntp':
  56. servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
  57. interfaces => ['127.0.0.1', '1.2.3.4']
  58. }
  59. ```
  60. ### Opt out of Puppet controlling the service
  61. ```puppet
  62. class { 'ntp':
  63. servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
  64. restrict => ['127.0.0.1'],
  65. service_manage => false,
  66. }
  67. ```
  68. ### Configure and run ntp without installing
  69. ```puppet
  70. class { 'ntp':
  71. package_manage => false,
  72. }
  73. ```
  74. ### Pass in a custom template
  75. ```puppet
  76. class { 'ntp':
  77. servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
  78. restrict => ['127.0.0.1'],
  79. service_manage => false,
  80. config_epp => 'different/module/custom.template.epp',
  81. }
  82. ```
  83. ## Reference
  84. ### Classes
  85. #### Public classes
  86. * ntp: Main class, includes all other classes.
  87. #### Private classes
  88. * ntp::install: Handles the packages.
  89. * ntp::config: Handles the configuration file.
  90. * ntp::service: Handles the service.
  91. ### Parameters
  92. The following parameters are available in the `ntp` class:
  93. #### `authprov`
  94. Optional.
  95. Data type: String.
  96. Enables compatibility with W32Time in some versions of NTPd, such as Novell DSfW.
  97. Default value: `undef`.
  98. #### `broadcastclient`
  99. Data type: Boolean.
  100. Enables reception of broadcast server messages to any local interface.
  101. Default value: `false`.
  102. #### `config`
  103. Data type: Stdlib::Absolutepath.
  104. Specifies a file for NTP's configuration info.
  105. Default value: '/etc/ntp.conf' (Solaris: '/etc/inet/ntp.conf').
  106. #### `config_dir`
  107. Optional.
  108. Data type: Stdlib::Absolutepath.
  109. Specifies a directory for the NTP configuration files.
  110. Default value: `undef`.
  111. #### `config_epp`
  112. Optional.
  113. Data type: String.
  114. Specifies an absolute or relative file path to an EPP template for the config file. Example value: 'ntp/ntp.conf.epp'. A validation error is thrown if both this **and** the `config_template` parameter are specified.
  115. #### `config_file_mode`
  116. Data type: String.
  117. Specifies a file mode for the ntp configuration file.
  118. Default value: '0664'.
  119. #### `config_template`
  120. Optional.
  121. Data type: String.
  122. Specifies an absolute or relative file path to an ERB template for the config file. Example value: 'ntp/ntp.conf.erb'. A validation error is thrown if both this **and** the `config_epp` parameter are specified.
  123. #### `disable_auth`
  124. Data type: Boolean.
  125. Disables cryptographic authentication for broadcast client, multicast client, and symmetric passive associations.
  126. #### `disable_dhclient`
  127. Data type: Boolean.
  128. Disables `ntp-servers` in `dhclient.conf` to prevent Dhclient from managing the NTP configuration.
  129. #### `disable_kernel`
  130. Data type: Boolean.
  131. Disables kernel time discipline.
  132. #### `disable_monitor`
  133. Data type: Boolean.
  134. Disables the monitoring facility in NTP.
  135. Default value: `true`.
  136. #### `driftfile`
  137. Data type: Stdlib::Absolutepath.
  138. Specifies the location of the NTP driftfile.
  139. Default value: '/var/lib/ntp/drift' (AIX: 'ntp::driftfile:', Solaris: '/var/ntp/ntp.drift').
  140. #### `enable_mode7`
  141. Data type: Boolean.
  142. Enables processing of NTP mode 7 implementation-specific requests which are used by the deprecated ntpdc program.
  143. Default value: `false`.
  144. #### `fudge`
  145. Optional.
  146. Data type: Array[String].
  147. Provides additional information for individual clock drivers.
  148. Default value: [ ].
  149. #### `iburst_enable`
  150. Data type: Boolean.
  151. Specifies whether to enable the iburst option for every NTP peer.
  152. Default value: `false` (AIX, Debian: `true`).
  153. #### `interfaces`
  154. Data type: Array[String].
  155. Specifies one or more network interfaces for NTP to listen on.
  156. Default value: [ ].
  157. #### `interfaces_ignore`
  158. Data type: Array[String].
  159. Specifies one or more ignore pattern for the NTP listener configuration (for example: all, wildcard, ipv6).
  160. Default value: [ ].
  161. #### `keys`
  162. Data type: Array[String].
  163. Distributes keys to keys file.
  164. Default value: [ ].
  165. #### `keys_controlkey`
  166. Optional.
  167. Data type: Ntp::Key_id.
  168. Specifies the key identifier to use with the ntpq utility. Value in the range of 1 to 65,534 inclusive.
  169. Default value: ' '.
  170. #### `keys_enable`
  171. Data type: Boolean.
  172. Whether to enable key-based authentication.
  173. Default value: `false`.
  174. #### `keys_file`
  175. Stdlib::Absolutepath.
  176. Specifies the complete path and location of the MD5 key file containing the keys and key identifiers used by ntpd, ntpq and ntpdc when operating with symmetric key cryptography.
  177. Default value: '/etc/ntp.keys' (RedHat, Amazon: `/etc/ntp/keys`).
  178. #### `keys_requestkey`
  179. Optional.
  180. Data type: Ntp::Key_id.
  181. Specifies the key identifier to use with the ntpdc utility program. Value in the range of 1 to 65,534 inclusive.
  182. Default value: ' '.
  183. #### `keys_trusted`
  184. Optional.
  185. Data type: Array[Ntp::Key_id].
  186. Provides one or more keys to be trusted by NTP.
  187. Default value: [ ].
  188. #### `leapfile`
  189. Optional.
  190. Data type: Stdlib::Absolutepath.
  191. Specifies a leap second file for NTP to use.
  192. Default value: ' '.
  193. #### `logfile`
  194. Optional.
  195. Data type: Stdlib::Absolutepath.
  196. Specifies a log file for NTP to use instead of syslog.
  197. Default value: ' '.
  198. #### `minpoll`
  199. Optional.
  200. Data type: Ntp::Poll_interval.
  201. Sets Puppet to non-standard minimal poll interval of upstream servers. Values: 4 to 17.
  202. Default: `undef`.
  203. #### `maxpoll`
  204. Optional.
  205. Data type: Ntp::Poll_interval.
  206. Sets use non-standard maximal poll interval of upstream servers. Values: 4 to 17.
  207. Default option: `undef`(FreeBSD: 9).
  208. #### `ntpsigndsocket`
  209. Optional.
  210. Data type: Stdlib::Absolutepath.
  211. Sets NTP to sign packets using the socket in the ntpsigndsocket path. Requires NTP to be configured to sign sockets. Value: Path to the socket directory; for example, for Samba: `usr/local/samba/var/lib/ntp_signd/`.
  212. Default value: `undef`.
  213. #### `package_ensure`
  214. Data type: String.
  215. Whether to install the NTP package, and what version to install. Values: 'present', 'latest', or a specific version number.
  216. Default value: 'present'.
  217. #### `package_manage`
  218. Data type: Boolean.
  219. Whether to manage the NTP package.
  220. Default value: `true`.
  221. #### `package_name`
  222. Data type: Array[String].
  223. Specifies the NTP package to manage.
  224. Default value: ['ntp'] (AIX: 'bos.net.tcp.client', Solaris: [ 'SUNWntp4r', 'SUNWntp4u' ]).
  225. #### `panic`
  226. Optional.
  227. Data type: Integer[0].
  228. Whether NTP should panic and exit in the event of a very large clock skew. Applies only if `tinker` option set to `true` or if your environment is in a virtual machine.
  229. Default value: `undef` (virtual environments: 0).
  230. #### `pool`
  231. Optional.
  232. Data type: Array[String].
  233. List of NTP server pools with which to synchronise the local clock.
  234. Default value: [ ].
  235. #### `peers`
  236. Data type: Array[String].
  237. List of NTP servers with which to synchronise the local clock.
  238. #### `preferred_servers`
  239. Data type: Array[String].
  240. Specifies one or more preferred peers. Puppet appends 'prefer' to each matching item in the `servers` array.
  241. Default value: [ ].
  242. #### `noselect_servers`
  243. Array[String] Specifies one or more peers to not sync with. Puppet appends 'noselect' to each matching item in the `servers` array. Default value: [ ].
  244. #### `restrict`
  245. Data type: Array[String].
  246. Specifies one or more `restrict` options for the NTP configuration. Puppet prefixes each item with 'restrict', so you need to list only the content of the restriction.
  247. Default value for most operating systems:
  248. ```shell
  249. [
  250. 'default kod nomodify notrap nopeer noquery',
  251. '-6 default kod nomodify notrap nopeer noquery',
  252. '127.0.0.1',
  253. '-6 ::1',
  254. ]
  255. ```
  256. Default value for AIX systems:
  257. ```shell
  258. [
  259. 'default nomodify notrap nopeer noquery',
  260. '127.0.0.1',
  261. ]
  262. ```
  263. #### `servers`
  264. Data type: Array[String].
  265. Specifies one or more servers to be used as NTP peers.
  266. Default value: varies by operating system.
  267. #### `service_enable`
  268. Data type: Boolean.
  269. Whether to enable the NTP service at boot.
  270. Default value: `true`.
  271. #### `service_ensure`
  272. Data type: Enum['running', 'stopped'].
  273. Whether the NTP service should be running.
  274. Default value: 'running'.
  275. #### `service_manage`
  276. Data type: Boolean.
  277. Whether to manage the NTP service.
  278. Default value: `true`.
  279. #### `service_name`
  280. Data type: String.
  281. The NTP service to manage.
  282. Default value: varies by operating system.
  283. #### `service_provider`
  284. Data type: String.
  285. Which service provider to use for NTP.
  286. Default value: `undef`.
  287. #### `statistics`
  288. Data type: Array.
  289. List of statistics to gather if ntp monitoring is enabled.
  290. Default value: [].
  291. #### `statsdir`
  292. Data type: Stdlib::Absolutepath.
  293. Location to store NTP statistics if ntp monitoring is enabled.
  294. Default value: '/var/log/ntpstats'.
  295. #### `step_tickers_file`
  296. Optional.
  297. Data type: Stdlib::Absolutepath.
  298. Location of the step tickers file on the managed system.
  299. Default value: varies by operating system.
  300. #### `step_tickers_epp`
  301. Optional.
  302. Data type: String.
  303. Location of the step tickers EPP template file. Validation error is thrown if both this and the `step_tickers_template` parameters are specified.
  304. Default value: varies by operating system.
  305. #### `step_tickers_template`
  306. Optional.
  307. Data type: String.
  308. Location of the step tickers ERB template file. Validation error is thrown if both this and the `step_tickers_epp` parameter are specified.
  309. Default value: varies by operating system.
  310. #### `stepout`
  311. Optional.
  312. Data type: Integer[0, 65535].
  313. Value for stepout if `tinker` value is `true`. Valid options: unsigned shortint digit.
  314. Default value: `undef`.
  315. #### `tos`
  316. Data type: Boolean.
  317. Whether to enable tos options.
  318. Default value: `false`.
  319. #### `tos_maxclock`
  320. Optional.
  321. Data type: Integer[1].
  322. Specifies the maxclock tos option.
  323. Default value: 6.
  324. #### `tos_minclock`
  325. Optional.
  326. Data type: Integer[1].
  327. Specifies the minclock tos option.
  328. Default value: 3.
  329. #### `tos_minsane`
  330. Optional.
  331. Data type: Integer[1].
  332. Specifies the minsane tos option.
  333. Default value: 1.
  334. #### `tos_floor`
  335. Optional.
  336. Data type: Integer[1].
  337. Specifies the floor tos option.
  338. Default value: 1.
  339. #### `tos_ceiling`
  340. Optional.
  341. Data type: Integer[1].
  342. Specifies the ceiling tos option.
  343. Default value: 15.
  344. #### `tos_cohort`
  345. Data type: Variant. Boolean, Integer[0,1].
  346. Specifies the cohort tos option. Valid options: 0 or 1.
  347. Default value: 0.
  348. #### `tinker`
  349. Data type: Boolean.
  350. Whether to enable tinker options.
  351. Default value: `false`.
  352. #### `udlc`
  353. Data type: Boolean.
  354. Specifies whether to configure NTP to use the undisciplined local clock as a time source.
  355. Default value: `false`.
  356. #### `udlc_stratum`
  357. Optional. Data type: Integer[1,15].
  358. Specifies the stratum the server should operate at when using the undisciplined local clock as the time source. This value should be set to no less than 10 if ntpd might be accessible outside your immediate, controlled network.
  359. Default value: 10.
  360. ## Limitations
  361. This module has been tested on [all PE-supported platforms](https://forge.puppetlabs.com/supported#compat-matrix). Additionally, it is tested (but not supported) on Solaris 10 and Fedora 20-22.
  362. ## Development
  363. Puppet modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. Please follow our guidelines when contributing changes.
  364. For more information, see our [module contribution guide.](https://docs.puppetlabs.com/forge/contributing.html)
  365. ### Contributors
  366. To see who's already involved, see the [list of contributors.](https://github.com/puppetlabs/puppetlabs-ntp/graphs/contributors)