replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in v9.0.0 from puppetlabs-stdlib. This also adds the type enforcement about purge_config which accepts only boolean values. Change-Id: I243572f19564a18003c3de66c1248f0f215bae65
This commit is contained in:
parent
dea64e7fd3
commit
926fed1836
@ -21,12 +21,10 @@
|
||||
# or Puppet catalog compilation will fail with duplicate resources.
|
||||
#
|
||||
class {{cookiecutter.project_name}}::config (
|
||||
${{cookiecutter.project_name}}_config = {},
|
||||
Hash ${{cookiecutter.project_name}}_config = {},
|
||||
) {
|
||||
|
||||
include {{cookiecutter.project_name}}::deps
|
||||
|
||||
validate_legacy(Hash, 'validate_hash', ${{cookiecutter.project_name}}_config)
|
||||
|
||||
create_resources('{{cookiecutter.project_name}}_config', ${{cookiecutter.project_name}}_config)
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
# Defaults to 'utf8_general_ci'
|
||||
#
|
||||
class {{cookiecutter.project_name}}::db::mysql(
|
||||
$password,
|
||||
String[1] $password,
|
||||
$dbname = '{{cookiecutter.project_name}}',
|
||||
$user = '{{cookiecutter.project_name}}',
|
||||
$host = '127.0.0.1',
|
||||
@ -45,8 +45,6 @@ class {{cookiecutter.project_name}}::db::mysql(
|
||||
|
||||
include {{cookiecutter.project_name}}::deps
|
||||
|
||||
validate_legacy(String, 'validate_string', $password)
|
||||
|
||||
::openstacklib::db::mysql { '{{cookiecutter.project_name}}':
|
||||
user => $user,
|
||||
password => $password,
|
||||
|
@ -48,18 +48,16 @@
|
||||
class {{cookiecutter.project_name}}::policy (
|
||||
$enforce_scope = $facts['os_service_default'],
|
||||
$enforce_new_defaults = $facts['os_service_default'],
|
||||
$policies = {},
|
||||
Hash $policies = {},
|
||||
$policy_path = '/etc/{{cookiecutter.project_name}}/policy.yaml',
|
||||
$policy_default_rule = $facts['os_service_default'],
|
||||
$policy_dirs = $facts['os_service_default'],
|
||||
$purge_config = false,
|
||||
Boolean $purge_config = false,
|
||||
) {
|
||||
|
||||
include {{cookiecutter.project_name}}::deps
|
||||
include {{cookiecutter.project_name}}::params
|
||||
|
||||
validate_legacy(Hash, 'validate_hash', $policies)
|
||||
|
||||
$policy_parameters = {
|
||||
policies => $policies,
|
||||
policy_path => $policy_path,
|
||||
|
Loading…
Reference in New Issue
Block a user