diff --git a/puppet/zulip_ops/files/postgresql/zulip_nagios_setup.sql b/puppet/zulip_ops/files/postgresql/zulip_nagios_setup.sql deleted file mode 100644 index de09556497..0000000000 --- a/puppet/zulip_ops/files/postgresql/zulip_nagios_setup.sql +++ /dev/null @@ -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; diff --git a/puppet/zulip_ops/manifests/postgres_appdb.pp b/puppet/zulip_ops/manifests/postgres_appdb.pp index 7eb28fc42a..0d1fa2d12e 100644 --- a/puppet/zulip_ops/manifests/postgres_appdb.pp +++ b/puppet/zulip_ops/manifests/postgres_appdb.pp @@ -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', - } - } diff --git a/puppet/zulip_ops/manifests/postgres_master.pp b/puppet/zulip_ops/manifests/postgres_master.pp index 31453abd47..16eb29bdfa 100644 --- a/puppet/zulip_ops/manifests/postgres_master.pp +++ b/puppet/zulip_ops/manifests/postgres_master.pp @@ -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}"], - } }