Changing default params for db/* and init.pp

Change-Id: I5fbc0693eed14cab2f1105fa374346ac8d239ede
This commit is contained in:
Marcos Fermin Lobo 2016-04-21 11:24:47 +02:00
parent 1cf79665d1
commit 3c5d1a3f97
4 changed files with 30 additions and 11 deletions

View File

@ -7,7 +7,6 @@
#
# [*password*]
# (Mandatory) Password to connect to the database.
# Defaults to 'false'.
#
# [*dbname*]
# (Optional) Name of the database.

View File

@ -16,13 +16,13 @@
# (Optional) User to connect to the database.
# Defaults to 'ec2api'.
#
# [*encoding*]
# (Optional) The charset to use for the database.
# Default to undef.
# [*encoding*]
# (Optional) The charset to use for the database.
# Default to undef.
#
# [*privileges*]
# (Optional) Privileges given to the database user.
# Default to 'ALL'
# [*privileges*]
# (Optional) Privileges given to the database user.
# Default to 'ALL'
#
# == Dependencies
#

View File

@ -4,11 +4,29 @@
#
# === Parameters
#
# [*sample_parameter*]
# Explanation of what this parameter affects and what it defaults to.
# [*package_ensure*]
# (Optional) Ensure state for package.
# Defaults to 'present'
#
class ec2api {
# [*package_manage*]
# (Optional) Activate/deactivate ec2api package installation.
# Defaults to true
#
#
class ec2api (
$package_ensure = 'present',
$package_manage = true,
){
if $package_manage {
package { 'ec2api':
ensure => $package_ensure,
name => $::ec2api::params::package_manage,
}
include ::ec2api::params
Package['ec2api'] ->
File <| title == 'ec2-api-config-file' |>
Package['ec2api'] ->
File <| title == 'ec2-api-paste-ini-file' |>
}
}

View File

@ -16,4 +16,6 @@ class ec2api::params {
}
} # Case $::osfamily
$package_name = 'openstack-ec2-api'
}