mirror of https://github.com/zulip/zulip.git
puppet: Remove unnecessary nagios authentication setup.
Since the nagios authentication is stored _in the database_, it is unnecessary to run if the database is simply a replica of the production database. The only case in which this statement would have an effect is if the postgres node contains a _different_ (or empty) database, which `setup_disks` now effectively prevents. Remove the unnecessary step.
This commit is contained in:
parent
0774f54c1b
commit
316498a169
|
@ -1,9 +0,0 @@
|
|||
CREATE USER NAGIOS;
|
||||
GRANT USAGE ON SCHEMA ZULIP TO NAGIOS;
|
||||
GRANT USAGE ON SCHEMA PUBLIC TO NAGIOS;
|
||||
GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO NAGIOS;
|
||||
GRANT SELECT ON ALL SEQUENCES IN SCHEMA zulip TO NAGIOS;
|
||||
GRANT SELECT ON ALL TABLES IN SCHEMA zulip TO NAGIOS;
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA ZULIP GRANT SELECT ON TABLES TO NAGIOS;
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA ZULIP GRANT SELECT ON SEQUENCES TO NAGIOS;
|
||||
ALTER ROLE NAGIOS SET SEARCH_PATH TO PUBLIC,ZULIP;
|
|
@ -10,14 +10,4 @@ class zulip_ops::postgres_appdb {
|
|||
mode => '0640',
|
||||
source => 'puppet:///modules/zulip_ops/postgresql/pg_hba.conf',
|
||||
}
|
||||
|
||||
file { "/usr/share/postgresql/${zulip::base::postgres_version}/zulip_nagios_setup.sql":
|
||||
ensure => file,
|
||||
require => Package["postgresql-${zulip::base::postgres_version}"],
|
||||
owner => 'postgres',
|
||||
group => 'postgres',
|
||||
mode => '0640',
|
||||
source => 'puppet:///modules/zulip_ops/postgresql/zulip_nagios_setup.sql',
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,13 +9,4 @@ class zulip_ops::postgres_master {
|
|||
mode => '0644',
|
||||
source => 'puppet:///modules/zulip_ops/postgresql/40-postgresql.conf.master',
|
||||
}
|
||||
|
||||
# This one will probably fail most of the time
|
||||
exec {'give_nagios_user_access':
|
||||
# lint:ignore:140chars
|
||||
command => "bash -c \"su postgres -c 'psql -v ON_ERROR_STOP=1 zulip < /usr/share/postgresql/${zulip::base::postgres_version}/zulip_nagios_setup.sql' && touch /usr/share/postgresql/${zulip::base::postgres_version}/zulip_nagios_setup.sql.applied\"",
|
||||
# lint:endignore
|
||||
creates => "/usr/share/postgresql/${zulip::base::postgres_version}/zulip_nagios_setup.sql.applied",
|
||||
require => Package["postgresql-${zulip::base::postgres_version}"],
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue