Remove hiera.yaml and instead manage it with puppet code

Added hunner/hiera to the Puppetfile and a manifest to use it
instead of placing a hiera.yaml in the repo.
This commit is contained in:
Nick Walker 2015-08-03 14:44:35 -07:00
parent bc6bae23d7
commit 437433ff44
3 changed files with 19 additions and 9 deletions

View File

@ -15,6 +15,11 @@ mod "saz/ssh", :latest
# Modules from Github using various references # Modules from Github using various references
# Further examples: https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd#examples # Further examples: https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd#examples
# update the tag to the most current release when implementing
mod 'hiera',
:git => 'https://github.com/hunner/puppet-hiera',
:tag => '1.3.1'
#mod 'notifyme', #mod 'notifyme',
# :git => 'git://github.com/glarizza/puppet-notifyme', # :git => 'git://github.com/glarizza/puppet-notifyme',
# :ref => '50c01703b2e3e352520a9a2271ea4947fe17a51f' # :ref => '50c01703b2e3e352520a9a2271ea4947fe17a51f'

View File

@ -1,9 +0,0 @@
---
:backends:
- yaml
:hierarchy:
- "nodes/%{clientcert}"
- common
:yaml:
:datadir: "/etc/puppetlabs/puppet/environments/%{environment}/hieradata"

View File

@ -0,0 +1,14 @@
class profile::puppetmaster {
class { 'hiera':
hierarchy => [
"nodes/%{::trusted.certname}",
:common",
],
hiera_yaml => '/etc/puppetlabs/code/hiera.yaml',
datadir => "/etc/puppetlabs/code/environments/%{environment}/hieradata",
owner => 'root',
group => 'root',
}
}