mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
puppet: Move to setup_disks to postgres_common.
The tooling should now be run no matter if the node is a primary or replica.
This commit is contained in:
committed by
Tim Abbott
parent
6f6a0e890a
commit
0774f54c1b
@@ -1,6 +1,9 @@
|
||||
class zulip_ops::postgres_common {
|
||||
include zulip::postgres_common
|
||||
|
||||
$common_packages = ['xfsprogs']
|
||||
package { $common_packages: ensure => 'installed' }
|
||||
|
||||
$wal_g_version = '0.2.15'
|
||||
$wal_g_hash = 'ea33c2341d7bfb203c6948590c29834c013ab06a28c7a2b236a73d906f785c84'
|
||||
exec {'install-wal-g':
|
||||
@@ -36,5 +39,18 @@ class zulip_ops::postgres_common {
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
file { '/root/setup_disks.sh':
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0744',
|
||||
source => 'puppet:///modules/zulip_ops/postgresql/setup_disks.sh',
|
||||
}
|
||||
|
||||
exec { 'setup_disks':
|
||||
command => '/root/setup_disks.sh',
|
||||
require => Package["postgresql-${zulip::base::postgres_version}", 'xfsprogs'],
|
||||
unless => 'test $(readlink /var/lib/postgresql) = "/srv/postgresql/" -a -d /srv/postgresql',
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,6 @@ class zulip_ops::postgres_master {
|
||||
include zulip_ops::base
|
||||
include zulip_ops::postgres_appdb
|
||||
|
||||
$master_packages = [# Packages needed for disk + RAID configuration
|
||||
'xfsprogs',
|
||||
]
|
||||
package { $master_packages: ensure => 'installed' }
|
||||
|
||||
file { '/etc/sysctl.d/40-postgresql.conf':
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
@@ -15,20 +10,6 @@ class zulip_ops::postgres_master {
|
||||
source => 'puppet:///modules/zulip_ops/postgresql/40-postgresql.conf.master',
|
||||
}
|
||||
|
||||
file { '/root/setup_disks.sh':
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0744',
|
||||
source => 'puppet:///modules/zulip_ops/postgresql/setup_disks.sh',
|
||||
}
|
||||
|
||||
exec { 'setup_disks':
|
||||
command => '/root/setup_disks.sh',
|
||||
require => Package["postgresql-${zulip::base::postgres_version}", 'xfsprogs'],
|
||||
unless => 'test $(readlink /var/lib/postgresql) = "/srv/postgresql/" -a -d /srv/postgresql',
|
||||
}
|
||||
|
||||
# This one will probably fail most of the time
|
||||
exec {'give_nagios_user_access':
|
||||
# lint:ignore:140chars
|
||||
|
||||
Reference in New Issue
Block a user