X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fnova%2Fmanifests%2Fdb%2Fpostgresql.pp;fp=3rdparty%2Fmodules%2Fnova%2Fmanifests%2Fdb%2Fpostgresql.pp;h=e6b7a49c9a5db5fa8e0e230178ba6fcf5d85f34d;hp=0000000000000000000000000000000000000000;hb=4631045ebb77ee8622f6fa09277a50c372bcc02e;hpb=3d4dc4fd9e59bd0e07646c99f6b356c7d9d859aa diff --git a/3rdparty/modules/nova/manifests/db/postgresql.pp b/3rdparty/modules/nova/manifests/db/postgresql.pp new file mode 100644 index 00000000..e6b7a49c --- /dev/null +++ b/3rdparty/modules/nova/manifests/db/postgresql.pp @@ -0,0 +1,36 @@ +# == Class: nova::db::postgresql +# +# Class that configures postgresql for nova +# Requires the Puppetlabs postgresql module. +# +# === Parameters: +# +# [*password*] +# Password to use to connect to postgresql +# +# [*dbname*] +# (optional) Name of the database to create for nova +# Defaults to 'nova' +# +# [*user*] +# (optional) Name of the user to connect to postgresql +# Defaults to 'nova' +# +class nova::db::postgresql( + $password, + $dbname = 'nova', + $user = 'nova' +) { + + require 'postgresql::python' + + Postgresql::Db[$dbname] -> Anchor<| title == 'nova-start' |> + Postgresql::Db[$dbname] ~> Exec<| title == 'nova-db-sync' |> + Package['python-psycopg2'] -> Exec<| title == 'nova-db-sync' |> + + postgresql::db { $dbname: + user => $user, + password => $password, + } + +}