puppet: Switch from $::osfamily to non-legacy $::os.

This commit is contained in:
Alex Vandiver 2022-02-14 16:24:04 -08:00 committed by Alex Vandiver
parent a787ebe0e2
commit d4eefbbeea
14 changed files with 17 additions and 17 deletions

View File

@ -1,7 +1,7 @@
class zulip::apache_sso { class zulip::apache_sso {
include zulip::localhost_sso include zulip::localhost_sso
case $::osfamily { case $::os['family'] {
'debian': { 'debian': {
$apache_packages = [ 'apache2', 'libapache2-mod-wsgi-py3', ] $apache_packages = [ 'apache2', 'libapache2-mod-wsgi-py3', ]
$conf_dir = '/etc/apache2' $conf_dir = '/etc/apache2'

View File

@ -6,7 +6,7 @@ class zulip::app_frontend_base {
include zulip::supervisor include zulip::supervisor
include zulip::tornado_sharding include zulip::tornado_sharding
if $::osfamily == 'debian' { if $::os['family'] == 'debian' {
# Upgrade and other tooling wants to be able to get a database # Upgrade and other tooling wants to be able to get a database
# shell. This is not necessary on CentOS because the PostgreSQL # shell. This is not necessary on CentOS because the PostgreSQL
# package already includes the client. This may get us a more # package already includes the client. This may get us a more

View File

@ -1,6 +1,6 @@
class zulip::common { class zulip::common {
# Common parameters # Common parameters
case $::osfamily { case $::os['family'] {
'debian': { 'debian': {
$nagios_plugins = 'monitoring-plugins-basic' $nagios_plugins = 'monitoring-plugins-basic'
$nagios_plugins_dir = '/usr/lib/nagios/plugins' $nagios_plugins_dir = '/usr/lib/nagios/plugins'

View File

@ -6,7 +6,7 @@ class zulip::nginx {
] ]
package { $web_packages: ensure => 'installed' } package { $web_packages: ensure => 'installed' }
if $::osfamily == 'redhat' { if $::os['family'] == 'redhat' {
file { '/etc/nginx/sites-available': file { '/etc/nginx/sites-available':
ensure => 'directory', ensure => 'directory',
owner => 'root', owner => 'root',
@ -80,7 +80,7 @@ class zulip::nginx {
source => 'puppet:///modules/zulip/nginx/dhparam.pem', source => 'puppet:///modules/zulip/nginx/dhparam.pem',
} }
if $::osfamily == 'debian' { if $::os['family'] == 'debian' {
$ca_crt = '/etc/ssl/certs/ca-certificates.crt' $ca_crt = '/etc/ssl/certs/ca-certificates.crt'
} else { } else {
$ca_crt = '/etc/pki/tls/certs/ca-bundle.crt' $ca_crt = '/etc/pki/tls/certs/ca-bundle.crt'

View File

@ -3,7 +3,7 @@ class zulip::postgresql_base {
include zulip::postgresql_common include zulip::postgresql_common
include zulip::process_fts_updates include zulip::process_fts_updates
case $::osfamily { case $::os['family'] {
'debian': { 'debian': {
$postgresql = "postgresql-${zulip::postgresql_common::version}" $postgresql = "postgresql-${zulip::postgresql_common::version}"
$postgresql_sharedir = "/usr/share/postgresql/${zulip::postgresql_common::version}" $postgresql_sharedir = "/usr/share/postgresql/${zulip::postgresql_common::version}"

View File

@ -1,7 +1,7 @@
class zulip::postgresql_common { class zulip::postgresql_common {
include zulip::snakeoil include zulip::snakeoil
$version = zulipconf('postgresql', 'version', undef) $version = zulipconf('postgresql', 'version', undef)
case $::osfamily { case $::os['family'] {
'debian': { 'debian': {
$postgresql = "postgresql-${version}" $postgresql = "postgresql-${version}"
$postgresql_packages = [ $postgresql_packages = [
@ -63,7 +63,7 @@ class zulip::postgresql_common {
require => Exec['generate-default-snakeoil'], require => Exec['generate-default-snakeoil'],
} }
if $::osfamily == 'debian' { if $::os['family'] == 'debian' {
# The logrotate file only created in debian-based systems # The logrotate file only created in debian-based systems
exec { 'disable_logrotate': exec { 'disable_logrotate':
# lint:ignore:140chars # lint:ignore:140chars

View File

@ -1,6 +1,6 @@
class zulip::process_fts_updates { class zulip::process_fts_updates {
include zulip::supervisor include zulip::supervisor
case $::osfamily { case $::os['family'] {
'debian': { 'debian': {
$fts_updates_packages = [ $fts_updates_packages = [
# Needed to run process_fts_updates # Needed to run process_fts_updates

View File

@ -10,7 +10,7 @@ class zulip::profile::app_frontend {
} else { } else {
$nginx_listen_port = zulipconf('application_server', 'nginx_listen_port', 443) $nginx_listen_port = zulipconf('application_server', 'nginx_listen_port', 443)
} }
$ssl_dir = $::osfamily ? { $ssl_dir = $::os['family'] ? {
'debian' => '/etc/ssl', 'debian' => '/etc/ssl',
'redhat' => '/etc/pki/tls', 'redhat' => '/etc/pki/tls',
} }

View File

@ -4,7 +4,7 @@
# be able to be deployed on their own host. # be able to be deployed on their own host.
class zulip::profile::base { class zulip::profile::base {
include zulip::common include zulip::common
case $::osfamily { case $::os['family'] {
'debian': { 'debian': {
include zulip::apt_repository include zulip::apt_repository
} }
@ -15,7 +15,7 @@ class zulip::profile::base {
fail('osfamily not supported') fail('osfamily not supported')
} }
} }
case $::osfamily { case $::os['family'] {
'debian': { 'debian': {
$base_packages = [ $base_packages = [
# Basics # Basics

View File

@ -3,7 +3,7 @@ class zulip::profile::memcached {
include zulip::sasl_modules include zulip::sasl_modules
include zulip::systemd_daemon_reload include zulip::systemd_daemon_reload
case $::osfamily { case $::os['family'] {
'debian': { 'debian': {
$memcached_packages = [ 'memcached', 'sasl2-bin' ] $memcached_packages = [ 'memcached', 'sasl2-bin' ]
$memcached_user = 'memcache' $memcached_user = 'memcache'

View File

@ -1,6 +1,6 @@
class zulip::profile::rabbitmq { class zulip::profile::rabbitmq {
include zulip::profile::base include zulip::profile::base
$erlang = $::osfamily ? { $erlang = $::os['family'] ? {
'debian' => 'erlang-base', 'debian' => 'erlang-base',
'redhat' => 'erlang', 'redhat' => 'erlang',
} }

View File

@ -1,6 +1,6 @@
class zulip::profile::redis { class zulip::profile::redis {
include zulip::profile::base include zulip::profile::base
case $::osfamily { case $::os['family'] {
'debian': { 'debian': {
$redis = 'redis-server' $redis = 'redis-server'
$redis_dir = '/etc/redis' $redis_dir = '/etc/redis'

View File

@ -1,5 +1,5 @@
class zulip::sasl_modules { class zulip::sasl_modules {
$sasl_module_packages = $::osfamily ? { $sasl_module_packages = $::os['family'] ? {
'debian' => [ 'libsasl2-modules' ], 'debian' => [ 'libsasl2-modules' ],
'redhat' => [ 'cyrus-sasl-plain' ], 'redhat' => [ 'cyrus-sasl-plain' ],
} }

View File

@ -1,5 +1,5 @@
class zulip::static_asset_compiler { class zulip::static_asset_compiler {
case $::osfamily { case $::os['family'] {
'debian': { 'debian': {
$static_asset_compiler_packages = [ $static_asset_compiler_packages = [
# Used by makemessages i18n # Used by makemessages i18n