]> gitweb.fluxo.info Git - puppet-bootstrap.git/commitdiff
Hiera suport at config target
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 4 Mar 2014 14:55:42 +0000 (11:55 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 4 Mar 2014 14:55:42 +0000 (11:55 -0300)
Makefile
hiera/common.yaml
hiera/hiera.yaml
manifests/classes/configurator.pp
templates/puppet/puppet.conf.erb

index 4b491a7ea5073d2d15ceeaadaf3222dd7de7c046..b50f868d88b71dc7f174763ee946f3b801588e69 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -32,10 +32,10 @@ remote:
        git remote add bootstrap $(REPO)
 
 config:
-       FACTER_BOOTSTRAP_PATH="$(CWD)" puppet apply --hiera-config=hiera.yaml --modulepath=modules manifests/classes/configurator.pp
+       FACTER_BOOTSTRAP_PATH="$(CWD)" puppet apply --confdir="$(CWD)" --modulepath=modules manifests/classes/configurator.pp
 
 apply:
-       FACTER_BOOTSTRAP_PATH="$(CWD)" puppet apply --hiera-config=hiera.yaml --modulepath=modules manifests/$(stage).pp
+       FACTER_BOOTSTRAP_PATH="$(CWD)" puppet apply --confdir="$(CWD)" --modulepath=modules manifests/$(stage).pp
 
 clean:
        rm -rf modules
index 5db890586435e239f22261d2bcf82f54325e5491..e3fe862a7aabbe27f273d1065a2b55dfeb3d13c3 100644 (file)
@@ -1,4 +1,9 @@
 ---
+#
+# Boostrap
+#
+bootstrap::base_domain: 'vagrantup.com'
+
 #
 # General
 #
index f5bc5129cf4ba8d2619b5af0795382a33d9b58a3..d22acc069444236c3568d560f3032a74eded34e9 100644 (file)
@@ -2,7 +2,7 @@
 :backends:
   - yaml
 :yaml:
-  :datadir: /etc/puppet/hiera
+  :datadir: hiera
 :hierarchy:
   - '%{::environment}/domain/%{::domain}/node/%{::clientcert}'
   - '%{::environment}/domain/%{::domain}/role/%{::role}'
index d0dd7870da099035b3e26db38fc5ee90ce5d1c87..80c7ce3e19afe25b3fea94e4a6ccf0012af82e4f 100644 (file)
@@ -10,7 +10,9 @@
 #
 
 # Variables
-$templates = "$bootstrap_path/templates"
+$templates   = "$bootstrap_path/templates"
+$base_domain = hiera('bootstrap::base_domain',          'example.org')
+$db_password = hiera('nodo::role::master::db_password', 'changeme')
 
 # Puppet configuration
 file { "$bootstrap_path/puppet.conf":
index 2ebfc9ea0b2e02891ce09b2d474ce6cb26bbf1d4..d2b50d33f4b198cf6d1d278eabc0279606f91597 100644 (file)
@@ -14,7 +14,7 @@ storeconfigs             = true
 dbadapter                = mysql
 dbserver                 = localhost
 dbuser                   = puppet
-dbpassword               = <%= storeconfigs_pw %>
+dbpassword               = <%= db_password %>
 dbconnections            = 15
 certname                 = puppet.<%= base_domain %>
 ssl_client_header        = SSL_CLIENT_S_DN