Files
upstream-mirror 64898b2c79
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
snapshot of https://github.com/zulip/zulip.git @ 48c69911c7dd4e03b20552eb3bd77ad8151c1357 (2026-09-15)
2026-09-15 15:05:30 +05:00

143 lines
3.3 KiB
Puppet

# @summary Included only by classes that can be deployed.
#
# 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 $facts['os']['family'] {
'Debian': {
include zulip::apt_repository
}
'RedHat': {
include zulip::yum_repository
}
default: {
fail('osfamily not supported')
}
}
case $facts['os']['family'] {
'Debian': {
$base_packages = [
# Basics
'python3',
'python3-yaml',
'puppet',
'git',
'curl',
'jq',
'procps',
# Used to read /etc/zulip/zulip.conf for `zulipconf` Puppet function
'crudini',
# Used for tools like sponge
'moreutils',
# Nagios monitoring plugins
$zulip::common::nagios_plugins,
# Required for using HTTPS in apt repositories.
'apt-transport-https',
# Needed for the cron jobs installed by Puppet
'cron',
# Applies log rotation config installed by Puppet
'logrotate',
]
}
'RedHat': {
$base_packages = [
'python3',
'python3-pyyaml',
'puppet',
'git',
'curl',
'jq',
'crudini',
'moreutils',
'nmap-ncat',
'nagios-plugins', # there is no dummy package on CentOS 7
'cronie',
]
}
default: {
fail('osfamily not supported')
}
}
package { $base_packages: ensure => installed }
group { 'zulip':
ensure => present,
}
user { 'zulip':
ensure => present,
require => Group['zulip'],
gid => 'zulip',
shell => '/bin/bash',
home => '/home/zulip',
managehome => true,
}
file { '/etc/zulip':
ensure => directory,
mode => '0755',
owner => 'zulip',
group => 'zulip',
links => follow,
}
file { ['/etc/zulip/zulip.conf', '/etc/zulip/settings.py']:
ensure => present,
require => File['/etc/zulip'],
mode => '0644',
owner => 'zulip',
group => 'zulip',
}
file { '/etc/zulip/zulip-secrets.conf':
ensure => present,
require => File['/etc/zulip'],
mode => '0640',
owner => 'zulip',
group => 'zulip',
}
file { '/etc/security/limits.d/zulip.conf':
ensure => file,
mode => '0640',
owner => 'root',
group => 'root',
source => 'puppet:///modules/zulip/limits.d/zulip.conf',
}
file { '/etc/systemd/system.conf.d/':
ensure => directory,
mode => '0755',
owner => 'root',
group => 'root',
}
file { '/etc/systemd/system.conf.d/limits.conf':
ensure => file,
mode => '0644',
owner => 'root',
group => 'root',
source => 'puppet:///modules/zulip/systemd/system.conf.d/limits.conf',
}
service { 'puppet':
ensure => stopped,
enable => false,
require => Package['puppet'],
}
# This directory is written to by cron jobs for reading by Nagios
file { '/var/lib/nagios_state/':
ensure => directory,
group => 'zulip',
mode => '0775',
}
file { '/var/log/zulip':
ensure => directory,
owner => 'zulip',
group => 'zulip',
mode => '0750',
}
zulip::nagios_plugins { 'zulip_base': }
}