Skip to content

Commit

Permalink
Validate the values of $merge_behavior
Browse files Browse the repository at this point in the history
This introduces dependency to puppetlabs/stdlib module
  • Loading branch information
tampakrap committed Feb 8, 2015
1 parent 959802a commit 6071366
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Modulefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ summary 'Deploy hiera.yaml with hierarchy, and datadir'
description ''
project_page 'https://github.com/hunner/hunner-hiera'

dependency 'puppetlabs/stdlib', '>= 4.5.1'

## Add dependencies, if any:
# dependency 'username/name', '>= 1.2.0'
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@
ensure => directory,
}
}
if $merge_behavior {
$merge_behavior_options = ['native', 'deep', 'deeper']
validate_re($merge_behavior, $merge_behavior_options)
}
if $eyaml {
require hiera::eyaml
}
Expand Down

0 comments on commit 6071366

Please sign in to comment.