mirror of https://github.com/zulip/zulip.git
puppet: Allow choice of timesync tool.
This commit is contained in:
parent
20841d9b65
commit
68f4071873
|
@ -625,6 +625,14 @@ you will need to add **`zulip::apache_sso`** to the list.
|
|||
Set to true if enabling the [multi-language PGroonga search
|
||||
extension](../subsystems/full-text-search.md#multi-language-full-text-search).
|
||||
|
||||
#### `timesync`
|
||||
|
||||
What time synchronization daemon to use; defaults to `chrony`, but also supports
|
||||
`ntpd` and `none`. Installations should not adjust this unless they are aligning
|
||||
with a fleet-wide standard of `ntpd`. `none` is only reasonable in containers
|
||||
like LXC which do not allow adjustment of the clock; a Zulip server will not
|
||||
function correctly without an accurate clock.
|
||||
|
||||
### `[deployment]`
|
||||
|
||||
#### `deploy_options`
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# This class should only be included by classes that are intended to
|
||||
# be able to be deployed on their own host.
|
||||
class zulip::profile::base {
|
||||
include zulip::timesync
|
||||
include zulip::common
|
||||
case $::os['family'] {
|
||||
'Debian': {
|
||||
|
@ -28,8 +29,6 @@ class zulip::profile::base {
|
|||
'procps',
|
||||
# Used to read /etc/zulip/zulip.conf for `zulipconf` Puppet function
|
||||
'crudini',
|
||||
# Accurate time is essential
|
||||
'chrony',
|
||||
# Used for tools like sponge
|
||||
'moreutils',
|
||||
# Nagios monitoring plugins
|
||||
|
@ -49,7 +48,6 @@ class zulip::profile::base {
|
|||
'curl',
|
||||
'jq',
|
||||
'crudini',
|
||||
'chrony',
|
||||
'moreutils',
|
||||
'nmap-ncat',
|
||||
'nagios-plugins', # there is no dummy package on CentOS 7
|
||||
|
@ -60,8 +58,6 @@ class zulip::profile::base {
|
|||
fail('osfamily not supported')
|
||||
}
|
||||
}
|
||||
package { 'ntp': ensure => purged, before => Package['chrony'] }
|
||||
service { 'chrony': require => Package['chrony'] }
|
||||
package { $base_packages: ensure => installed }
|
||||
|
||||
group { 'zulip':
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
# @summary Allows configuration of timesync tool.
|
||||
class zulip::timesync {
|
||||
$timesync = zulipconf('machine', 'timesync', 'chrony')
|
||||
|
||||
case $timesync {
|
||||
'chrony': {
|
||||
package { 'ntp': ensure => purged, before => Package['chrony'] }
|
||||
package { 'chrony': ensure => installed }
|
||||
service { 'chrony': require => Package['chrony'] }
|
||||
}
|
||||
'ntpd': {
|
||||
package { 'chrony': ensure => purged, before => Package['ntp'] }
|
||||
package { 'ntp': ensure => installed }
|
||||
service { 'ntp': require => Package['ntp'] }
|
||||
}
|
||||
'none': {
|
||||
package { ['ntp', 'chrony']: ensure => purged }
|
||||
}
|
||||
default: {
|
||||
fail('Unknown timesync tool: $timesync')
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue