summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Wiese <tobias@tobiaswiese.com>2020-05-10 22:27:01 +0200
committerTobias Wiese <tobias@tobiaswiese.com>2020-05-10 22:27:01 +0200
commit6e73fda0765e0498b3ef3976427c75e65a5f1850 (patch)
tree9107b8b2648649af1e9218d6b8aa51859494f909
parent1f358c5572bd1f847478b314bcd3e9378655ec92 (diff)
database: enable ido-pgsql
Makes icinga2 connect to the database. The password should be supplied in the master-secrets.conf Signed-off-by: Tobias Wiese <tobias@tobiaswiese.com>
-rw-r--r--.gitignore1
-rw-r--r--features-available/ido-pgsql.conf8
-rw-r--r--master-secrets.conf.example4
l---------zones.d/master/features/ido-pgsql.conf1
-rw-r--r--zones.d/master/secrets.conf1
5 files changed, 11 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..44c557d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/master-secrets.conf
diff --git a/features-available/ido-pgsql.conf b/features-available/ido-pgsql.conf
index 46d414d..3ee4661 100644
--- a/features-available/ido-pgsql.conf
+++ b/features-available/ido-pgsql.conf
@@ -4,8 +4,8 @@
*/
object IdoPgsqlConnection "ido-pgsql" {
- // user = "icinga"
- // password = "icinga"
- // host = "localhost"
- // database = "icinga"
+ user = "icinga"
+ password = SecretPgsqlPassword
+ host = "localhost"
+ database = "icinga"
}
diff --git a/master-secrets.conf.example b/master-secrets.conf.example
new file mode 100644
index 0000000..18f5cf7
--- /dev/null
+++ b/master-secrets.conf.example
@@ -0,0 +1,4 @@
+/*
+ * PGSQL password for the icinga user
+ */
+const SecretPgsqlPassword = "db password"
diff --git a/zones.d/master/features/ido-pgsql.conf b/zones.d/master/features/ido-pgsql.conf
new file mode 120000
index 0000000..8156f9d
--- /dev/null
+++ b/zones.d/master/features/ido-pgsql.conf
@@ -0,0 +1 @@
+../../../features-available/ido-pgsql.conf \ No newline at end of file
diff --git a/zones.d/master/secrets.conf b/zones.d/master/secrets.conf
new file mode 100644
index 0000000..c34ad1c
--- /dev/null
+++ b/zones.d/master/secrets.conf
@@ -0,0 +1 @@
+include "../../master-secrets.conf"