diff options
author | blsaws <bs3131@att.com> | 2016-05-16 07:40:31 -0700 |
---|---|---|
committer | blsaws <bs3131@att.com> | 2016-05-16 07:40:31 -0700 |
commit | 8dcfe1a692815ee3a34dca32fd427471dfd0046a (patch) | |
tree | 5619e2c7b7113fe6ec68c98064895f7d8723e5bb /components/congress/install/puppet/manifests/db/postgresql.pp | |
parent | e50f20b9c29fd6282025b4ccb87fedacb013ef66 (diff) |
Refactor installer code folders.
JIRA: COPPER-2
Add initial centos7 bash scripts in development.
Change-Id: I112aa43c231dac035f0d1bc2ae416fabf6b8b650
Signed-off-by: blsaws <bs3131@att.com>
Diffstat (limited to 'components/congress/install/puppet/manifests/db/postgresql.pp')
-rw-r--r-- | components/congress/install/puppet/manifests/db/postgresql.pp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/components/congress/install/puppet/manifests/db/postgresql.pp b/components/congress/install/puppet/manifests/db/postgresql.pp new file mode 100644 index 0000000..4766eca --- /dev/null +++ b/components/congress/install/puppet/manifests/db/postgresql.pp @@ -0,0 +1,55 @@ +# == Class: congress::db::postgresql +# +# Class that configures postgresql for congress +# Requires the Puppetlabs postgresql module. +# +# === Parameters +# +# [*password*] +# (Required) Password to connect to the database. +# +# [*dbname*] +# (Optional) Name of the database. +# Defaults to 'congress'. +# +# [*user*] +# (Optional) User to connect to the database. +# Defaults to 'congress'. +# +# [*encoding*] +# (Optional) The charset to use for the database. +# Default to undef. +# +# [*privileges*] +# (Optional) Privileges given to the database user. +# Default to 'ALL' +# +# == Dependencies +# +# == Examples +# +# == Authors +# +# == Copyright +# +class congress::db::postgresql( + $password, + $dbname = 'congress', + $user = 'congress', + $encoding = undef, + $privileges = 'ALL', +) { + + Class['congress::db::postgresql'] -> Service<| title == 'congress' |> + + ::openstacklib::db::postgresql { 'congress': + password_hash => postgresql_password($user, $password), + dbname => $dbname, + user => $user, + encoding => $encoding, + privileges => $privileges, + } + + ::Openstacklib::Db::Postgresql['congress'] ~> Exec<| title == 'congress-manage db_sync' |> + +} |