git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormail_redacted_for_web 2015-08-03 14:44:35 -0700
committermail_redacted_for_web 2015-08-03 14:49:06 -0700
commit437433ff44cd77915a4a7b1d61d7aa624c44b41a (patch)
tree532249eb2bd88efcb2651498c880b91d5312a6cb
parentbc6bae23d79aed7b05ac018496b8cddc02fe4fba (diff)
downloadcontrol-repo-template-437433ff44cd77915a4a7b1d61d7aa624c44b41a.tar.bz2
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.
-rw-r--r--Puppetfile5
-rw-r--r--hiera.yaml9
-rw-r--r--site/profile/manifests/puppetmaster.pp14
3 files changed, 19 insertions, 9 deletions
diff --git a/Puppetfile b/Puppetfile
index bba46dd..fde9831 100644
--- a/Puppetfile
+++ b/Puppetfile
@@ -15,6 +15,11 @@ mod "saz/ssh", :latest
# Modules from Github using various references
# 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',
# :git => 'git://github.com/glarizza/puppet-notifyme',
# :ref => '50c01703b2e3e352520a9a2271ea4947fe17a51f'
diff --git a/hiera.yaml b/hiera.yaml
deleted file mode 100644
index bc98555..0000000
--- a/hiera.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-:backends:
- - yaml
-:hierarchy:
- - "nodes/%{clientcert}"
- - common
-
-:yaml:
- :datadir: "/etc/puppetlabs/puppet/environments/%{environment}/hieradata"
diff --git a/site/profile/manifests/puppetmaster.pp b/site/profile/manifests/puppetmaster.pp
new file mode 100644
index 0000000..8242110
--- /dev/null
+++ b/site/profile/manifests/puppetmaster.pp
@@ -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',
+ }
+
+}