diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | hiera/common.yaml | 5 | ||||
-rw-r--r-- | hiera/hiera.yaml | 2 | ||||
-rw-r--r-- | manifests/classes/configurator.pp | 4 | ||||
-rw-r--r-- | templates/puppet/puppet.conf.erb | 2 |
5 files changed, 12 insertions, 5 deletions
@@ -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 diff --git a/hiera/common.yaml b/hiera/common.yaml index 5db8905..e3fe862 100644 --- a/hiera/common.yaml +++ b/hiera/common.yaml @@ -1,5 +1,10 @@ --- # +# Boostrap +# +bootstrap::base_domain: 'vagrantup.com' + +# # General # nodo::subsystem::apt::include_src: false diff --git a/hiera/hiera.yaml b/hiera/hiera.yaml index f5bc512..d22acc0 100644 --- a/hiera/hiera.yaml +++ b/hiera/hiera.yaml @@ -2,7 +2,7 @@ :backends: - yaml :yaml: - :datadir: /etc/puppet/hiera + :datadir: hiera :hierarchy: - '%{::environment}/domain/%{::domain}/node/%{::clientcert}' - '%{::environment}/domain/%{::domain}/role/%{::role}' diff --git a/manifests/classes/configurator.pp b/manifests/classes/configurator.pp index d0dd787..80c7ce3 100644 --- a/manifests/classes/configurator.pp +++ b/manifests/classes/configurator.pp @@ -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": diff --git a/templates/puppet/puppet.conf.erb b/templates/puppet/puppet.conf.erb index 2ebfc9e..d2b50d3 100644 --- a/templates/puppet/puppet.conf.erb +++ b/templates/puppet/puppet.conf.erb @@ -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 |