From fae36b34411860f7c68a2a21b5f94de5d4b598d2 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 4 Mar 2014 14:21:10 -0300 Subject: Configurator refactor --- manifests/bootstrap/configurator.pp | 99 +++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 49 deletions(-) (limited to 'manifests') diff --git a/manifests/bootstrap/configurator.pp b/manifests/bootstrap/configurator.pp index ce60731..56f234f 100644 --- a/manifests/bootstrap/configurator.pp +++ b/manifests/bootstrap/configurator.pp @@ -12,7 +12,9 @@ # Basic variables # $templates = "$bootstrap_path/templates" -$base_domain = hiera('bootstrap::base_domain', 'example.org') +$base_domain = hiera('bootstrap::base_domain', "${::domain}") +$first_hostname = hiera('bootstrap::first_hostname', "${::hostname}") +$first_nodes = hiera('bootstrap::first_nodes', 'absent') $db_password = hiera('nodo::role::master::db_password', 'changeme') $mysql_rootpw = hiera('mysql::server::rootpw', '') $root_password = hiera('bootstrap::root:password', 'rootpass') @@ -133,51 +135,50 @@ file { "$bootstrap_path/modules/site_postfix/files/tls_policy": # # Basic nodes # -#file { "$bootstrap_path/manifests/nodes.pp": -# ensure => present, -# mode => 0644, -# content => template("$templates/puppet/nodes.pp.erb"), -#} - -## First host -#file { "$bootstrap_path/manifests/nodes/$hostname.pp": -# ensure => present, -# mode => 0644, -# content => template("$templates/puppet/server.pp.erb"), -#} -# -## Master node -#file { "$bootstrap_path/manifests/nodes/$hostname-master.pp": -# ensure => present, -# mode => 0644, -# content => template("$templates/puppet/master.pp.erb"), -#} -# -## Proxy node -#file { "$bootstrap_path/manifests/nodes/$hostname-proxy.pp": -# ensure => present, -# mode => 0644, -# content => template("$templates/puppet/proxy.pp.erb"), -#} -# -## Web node -#file { "$bootstrap_path/manifests/nodes/$hostname-web.pp": -# ensure => present, -# mode => 0644, -# content => template("$templates/puppet/web.pp.erb"), -#} -# -## Storage node -#file { "$bootstrap_path/manifests/nodes/$hostname-storage.pp": -# ensure => present, -# mode => 0644, -# content => template("$templates/puppet/storage.pp.erb"), -#} -# -## Test node -#file { "$bootstrap_path/manifests/nodes/$hostname-test.pp": -# ensure => present, -# mode => 0644, -# content => template("$templates/puppet/test.pp.erb"), -#} -# +file { "$bootstrap_path/manifests/nodes.pp": + ensure => $first_nodes, + mode => 0644, + content => template("$templates/puppet/nodes.pp.erb"), +} + +# First host +file { "$bootstrap_path/manifests/nodes/$first_hostname.pp": + ensure => $first_nodes, + mode => 0644, + content => template("$templates/puppet/server.pp.erb"), +} + +# Master node +file { "$bootstrap_path/manifests/nodes/$first_hostname-master.pp": + ensure => $first_nodes, + mode => 0644, + content => template("$templates/puppet/master.pp.erb"), +} + +# Proxy node +file { "$bootstrap_path/manifests/nodes/$first_hostname-proxy.pp": + ensure => $first_nodes, + mode => 0644, + content => template("$templates/puppet/proxy.pp.erb"), +} + +# Web node +file { "$bootstrap_path/manifests/nodes/$first_hostname-web.pp": + ensure => $first_nodes, + mode => 0644, + content => template("$templates/puppet/web.pp.erb"), +} + +# Storage node +file { "$bootstrap_path/manifests/nodes/$first_hostname-storage.pp": + ensure => $first_nodes, + mode => 0644, + content => template("$templates/puppet/storage.pp.erb"), +} + +# Test node +file { "$bootstrap_path/manifests/nodes/$first_hostname-test.pp": + ensure => $first_nodes, + mode => 0644, + content => template("$templates/puppet/test.pp.erb"), +} -- cgit v1.2.3