diff options
author | Cullum Smith <cullum@sacredheartsc.com> | 2024-10-25 00:49:42 -0400 |
---|---|---|
committer | Cullum Smith <cullum@sacredheartsc.com> | 2024-10-25 00:49:42 -0400 |
commit | 7bb5176a0e1d3a7d8a119b92758404d514f59be9 (patch) | |
tree | 216cc2c9b1af8ddd337d619bc8c77e44bba94b1a /scripts/hostclass/postgresql_server | |
parent | e2fc0433de38c322ce46ad250bc0f0f03e7710c8 (diff) | |
download | infrastructure-7bb5176a0e1d3a7d8a119b92758404d514f59be9.tar.gz |
icinga stuff
Diffstat (limited to 'scripts/hostclass/postgresql_server')
-rw-r--r-- | scripts/hostclass/postgresql_server | 5 |
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 |