]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - 3rdparty/modules/cinder/manifests/db/postgresql.pp
try again, with puppetforge modules, correctly included now
[dsa-puppet.git] / 3rdparty / modules / cinder / manifests / db / postgresql.pp
diff --git a/3rdparty/modules/cinder/manifests/db/postgresql.pp b/3rdparty/modules/cinder/manifests/db/postgresql.pp
new file mode 100644 (file)
index 0000000..52aa15b
--- /dev/null
@@ -0,0 +1,21 @@
+#
+# Class that configures postgresql for cinder
+#
+# Requires the Puppetlabs postgresql module.
+class cinder::db::postgresql(
+  $password,
+  $dbname = 'cinder',
+  $user   = 'cinder'
+) {
+
+  require postgresql::python
+
+  Postgresql::Db[$dbname]    ~> Exec<| title == 'cinder-manage db_sync' |>
+  Package['python-psycopg2'] -> Exec<| title == 'cinder-manage db_sync' |>
+
+  postgresql::db { $dbname:
+    user      =>  $user,
+    password  =>  $password,
+  }
+
+}