mirror of https://github.com/zulip/zulip.git
puppet: Switch from $::osfamily to non-legacy $::os.
This commit is contained in:
parent
a787ebe0e2
commit
d4eefbbeea
|
@ -1,7 +1,7 @@
|
|||
class zulip::apache_sso {
|
||||
include zulip::localhost_sso
|
||||
|
||||
case $::osfamily {
|
||||
case $::os['family'] {
|
||||
'debian': {
|
||||
$apache_packages = [ 'apache2', 'libapache2-mod-wsgi-py3', ]
|
||||
$conf_dir = '/etc/apache2'
|
||||
|
|
|
@ -6,7 +6,7 @@ class zulip::app_frontend_base {
|
|||
include zulip::supervisor
|
||||
include zulip::tornado_sharding
|
||||
|
||||
if $::osfamily == 'debian' {
|
||||
if $::os['family'] == 'debian' {
|
||||
# Upgrade and other tooling wants to be able to get a database
|
||||
# shell. This is not necessary on CentOS because the PostgreSQL
|
||||
# package already includes the client. This may get us a more
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class zulip::common {
|
||||
# Common parameters
|
||||
case $::osfamily {
|
||||
case $::os['family'] {
|
||||
'debian': {
|
||||
$nagios_plugins = 'monitoring-plugins-basic'
|
||||
$nagios_plugins_dir = '/usr/lib/nagios/plugins'
|
||||
|
|
|
@ -6,7 +6,7 @@ class zulip::nginx {
|
|||
]
|
||||
package { $web_packages: ensure => 'installed' }
|
||||
|
||||
if $::osfamily == 'redhat' {
|
||||
if $::os['family'] == 'redhat' {
|
||||
file { '/etc/nginx/sites-available':
|
||||
ensure => 'directory',
|
||||
owner => 'root',
|
||||
|
@ -80,7 +80,7 @@ class zulip::nginx {
|
|||
source => 'puppet:///modules/zulip/nginx/dhparam.pem',
|
||||
}
|
||||
|
||||
if $::osfamily == 'debian' {
|
||||
if $::os['family'] == 'debian' {
|
||||
$ca_crt = '/etc/ssl/certs/ca-certificates.crt'
|
||||
} else {
|
||||
$ca_crt = '/etc/pki/tls/certs/ca-bundle.crt'
|
||||
|
|
|
@ -3,7 +3,7 @@ class zulip::postgresql_base {
|
|||
include zulip::postgresql_common
|
||||
include zulip::process_fts_updates
|
||||
|
||||
case $::osfamily {
|
||||
case $::os['family'] {
|
||||
'debian': {
|
||||
$postgresql = "postgresql-${zulip::postgresql_common::version}"
|
||||
$postgresql_sharedir = "/usr/share/postgresql/${zulip::postgresql_common::version}"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class zulip::postgresql_common {
|
||||
include zulip::snakeoil
|
||||
$version = zulipconf('postgresql', 'version', undef)
|
||||
case $::osfamily {
|
||||
case $::os['family'] {
|
||||
'debian': {
|
||||
$postgresql = "postgresql-${version}"
|
||||
$postgresql_packages = [
|
||||
|
@ -63,7 +63,7 @@ class zulip::postgresql_common {
|
|||
require => Exec['generate-default-snakeoil'],
|
||||
}
|
||||
|
||||
if $::osfamily == 'debian' {
|
||||
if $::os['family'] == 'debian' {
|
||||
# The logrotate file only created in debian-based systems
|
||||
exec { 'disable_logrotate':
|
||||
# lint:ignore:140chars
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class zulip::process_fts_updates {
|
||||
include zulip::supervisor
|
||||
case $::osfamily {
|
||||
case $::os['family'] {
|
||||
'debian': {
|
||||
$fts_updates_packages = [
|
||||
# Needed to run process_fts_updates
|
||||
|
|
|
@ -10,7 +10,7 @@ class zulip::profile::app_frontend {
|
|||
} else {
|
||||
$nginx_listen_port = zulipconf('application_server', 'nginx_listen_port', 443)
|
||||
}
|
||||
$ssl_dir = $::osfamily ? {
|
||||
$ssl_dir = $::os['family'] ? {
|
||||
'debian' => '/etc/ssl',
|
||||
'redhat' => '/etc/pki/tls',
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# be able to be deployed on their own host.
|
||||
class zulip::profile::base {
|
||||
include zulip::common
|
||||
case $::osfamily {
|
||||
case $::os['family'] {
|
||||
'debian': {
|
||||
include zulip::apt_repository
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ class zulip::profile::base {
|
|||
fail('osfamily not supported')
|
||||
}
|
||||
}
|
||||
case $::osfamily {
|
||||
case $::os['family'] {
|
||||
'debian': {
|
||||
$base_packages = [
|
||||
# Basics
|
||||
|
|
|
@ -3,7 +3,7 @@ class zulip::profile::memcached {
|
|||
include zulip::sasl_modules
|
||||
include zulip::systemd_daemon_reload
|
||||
|
||||
case $::osfamily {
|
||||
case $::os['family'] {
|
||||
'debian': {
|
||||
$memcached_packages = [ 'memcached', 'sasl2-bin' ]
|
||||
$memcached_user = 'memcache'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class zulip::profile::rabbitmq {
|
||||
include zulip::profile::base
|
||||
$erlang = $::osfamily ? {
|
||||
$erlang = $::os['family'] ? {
|
||||
'debian' => 'erlang-base',
|
||||
'redhat' => 'erlang',
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class zulip::profile::redis {
|
||||
include zulip::profile::base
|
||||
case $::osfamily {
|
||||
case $::os['family'] {
|
||||
'debian': {
|
||||
$redis = 'redis-server'
|
||||
$redis_dir = '/etc/redis'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class zulip::sasl_modules {
|
||||
$sasl_module_packages = $::osfamily ? {
|
||||
$sasl_module_packages = $::os['family'] ? {
|
||||
'debian' => [ 'libsasl2-modules' ],
|
||||
'redhat' => [ 'cyrus-sasl-plain' ],
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class zulip::static_asset_compiler {
|
||||
case $::osfamily {
|
||||
case $::os['family'] {
|
||||
'debian': {
|
||||
$static_asset_compiler_packages = [
|
||||
# Used by makemessages i18n
|
||||
|
|
Loading…
Reference in New Issue