]> gitweb.fluxo.info Git - puppet-bootstrap.git/commitdiff
Adding hiera configuration
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 28 Jan 2014 17:06:44 +0000 (15:06 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 28 Jan 2014 17:06:44 +0000 (15:06 -0200)
hiera/hiera.yaml [new file with mode: 0644]
manifests/vagrant.pp

diff --git a/hiera/hiera.yaml b/hiera/hiera.yaml
new file mode 100644 (file)
index 0000000..f5bc512
--- /dev/null
@@ -0,0 +1,14 @@
+---
+:backends:
+  - yaml
+:yaml:
+  :datadir: /etc/puppet/hiera
+:hierarchy:
+  - '%{::environment}/domain/%{::domain}/node/%{::clientcert}'
+  - '%{::environment}/domain/%{::domain}/role/%{::role}'
+  - '%{::environment}/domain/%{::domain}/location/%{::location}'
+  - '%{::environment}/domain/%{::domain}/%{::domain}'
+  - '%{::environment}/location/%{::location}'
+  - '%{::environment}/virtual/%{::virtual}'
+  - '%{::environment}/role/%{::role}'
+  - common
index 619bc66fea47d738f897786ad3e4288402c0709a..94d5896ac605f90075a368a8b75625e69df6dae3 100644 (file)
@@ -1,11 +1,44 @@
 # Import main module
 import "nodo"
 
+#
+# Stage definitions
+#
+
+stage { 'first':
+  before => Stage['main'],
+}
+
+stage { 'last': }
+Stage['main'] -> Stage['last']
+
+#
+# Class definitions
+#
+
 # Vagrant classes
 include nodo::role::vagrant
 
-# Symlink to the mounted module folder
-file { '/etc/puppet/modules':
-  ensure => '/etc/puppet/modules-0',
-  force  => true,
+class vagrant_config {
+  # Symlink to the mounted module folder
+  file { '/etc/puppet/modules':
+    ensure => '/etc/puppet/modules-0',
+    force  => true,
+  }
+
+  # Ensure a custom hiera configuration
+  file { '/etc/puppet/hiera.yaml':
+    owner  => root,
+    group  => root,
+    mode   => 0644,
+    force  => true,
+    ensure => '/etc/puppet/hiera/hiera.yaml',
+  }
+}
+
+#
+# Class instantiations
+#
+class { 'vagrant_config':
+  stage => first,
 }