try again, with puppetforge modules, correctly included now
[mirror/dsa-puppet.git] / 3rdparty / modules / nova / manifests / db / postgresql.pp
1 # == Class: nova::db::postgresql
2 #
3 # Class that configures postgresql for nova
4 # Requires the Puppetlabs postgresql module.
5 #
6 # === Parameters:
7 #
8 # [*password*]
9 #   Password to use to connect to postgresql
10 #
11 # [*dbname*]
12 #   (optional) Name of the database to create for nova
13 #   Defaults to 'nova'
14 #
15 # [*user*]
16 #   (optional) Name of the user to connect to postgresql
17 #   Defaults to 'nova'
18 #
19 class nova::db::postgresql(
20   $password,
21   $dbname = 'nova',
22   $user   = 'nova'
23 ) {
24
25   require 'postgresql::python'
26
27   Postgresql::Db[$dbname] -> Anchor<| title == 'nova-start' |>
28   Postgresql::Db[$dbname] ~> Exec<| title == 'nova-db-sync' |>
29   Package['python-psycopg2'] -> Exec<| title == 'nova-db-sync' |>
30
31   postgresql::db { $dbname:
32     user     => $user,
33     password => $password,
34   }
35
36 }