aboutsummaryrefslogtreecommitdiff
path: root/scripts/hostclass/postgresql_server
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-10-25 00:49:42 -0400
committerCullum Smith <cullum@sacredheartsc.com>2024-10-25 00:49:42 -0400
commit7bb5176a0e1d3a7d8a119b92758404d514f59be9 (patch)
tree216cc2c9b1af8ddd337d619bc8c77e44bba94b1a /scripts/hostclass/postgresql_server
parente2fc0433de38c322ce46ad250bc0f0f03e7710c8 (diff)
downloadinfrastructure-7bb5176a0e1d3a7d8a119b92758404d514f59be9.tar.gz
icinga stuff
Diffstat (limited to 'scripts/hostclass/postgresql_server')
-rw-r--r--scripts/hostclass/postgresql_server5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/hostclass/postgresql_server b/scripts/hostclass/postgresql_server
index cbd9c17..b3e8804 100644
--- a/scripts/hostclass/postgresql_server
+++ b/scripts/hostclass/postgresql_server
@@ -104,3 +104,8 @@ END
# Load citext extension (required by icingadb)
postgres_psql -c 'create extension if not exists citext;'
+
+# Create icinga user.
+postgres_psql <<EOF
+SELECT 'CREATE ROLE "${icinga_username}" WITH LOGIN' WHERE NOT EXISTS (SELECT FROM pg_roles WHERE rolname = '${icinga_username}')\\gexec
+EOF