git remote add bootstrap $(REPO)
config:
+ $(EDITOR) hiera/bootstrap.yaml
FACTER_BOOTSTRAP_PATH="$(CWD)" puppet apply --confdir="$(CWD)" --modulepath=modules manifests/classes/configurator.pp
apply:
* Make `config` target:
* Check if already ran.
- * Move from `config.pp` to hiera.
* Refactor `configurator.pp`.
--- /dev/null
+---
+#
+# Boostrap
+#
+# Use "mkpasswd -m sha-512" to generate root and first user's passwords
+# Do not include "ssh-rsa " into the sshkey definition.
+bootstrap::base_domain: 'vagrantup.com'
+bootstrap::root::password: ''
+bootstrap::first_user: 'user'
+bootstrap::first_user::password: ''
+bootstrap::first_user::sshkey: ''
+bootstrap::first_user::email: ''
---
-#
-# Boostrap
-#
-bootstrap::base_domain: 'vagrantup.com'
-
#
# General
#
#
# Nameservers
#
-# OpenDNS:
-#
-#nodo::subsystem::resolver::nameservers:
-# - '208.67.222.222'
-# - '208.67.220.220'
+# OpenDNS
+nodo::subsystem::resolver::nameservers:
+ - '208.67.222.222'
+ - '208.67.220.220'
- '%{::environment}/virtual/%{::virtual}'
- '%{::environment}/role/%{::role}'
- common
+ - bootstrap
# and want to configure it to boostrap a whole puppetmaster infrastructure.
#
-# Variables
-$templates = "$bootstrap_path/templates"
-$base_domain = hiera('bootstrap::base_domain', 'example.org')
-$db_password = hiera('nodo::role::master::db_password', 'changeme')
+# Basic variables
+$templates = "$bootstrap_path/templates"
+$base_domain = hiera('bootstrap::base_domain', 'example.org')
+$db_password = hiera('nodo::role::master::db_password', 'changeme')
+$mysql_rootpw = hiera('mysql::server::rootpw', '')
+$root_password = hiera('bootstrap::root:password', 'rootpass')
+$first_user = hiera('bootstrap::first_user', 'user')
+$first_user_password = hiera('bootstrap::first_user::password', 'userpass')
+$first_user_sshkey = hiera('bootstrap::first_user::sshkey', 'usersshkey')
+$first_user_email = hiera('bootstrap::first_user::email', 'usermail')
+$resolvconf_nameservers = hiera('nodo::subsystem::resolver::nameservers', '201.6.2.152:201.6.2.32')
+$global_munin_allow = hiera('nodo::munin_node::allow', '192.168.0.[0-9]*')
# Puppet configuration
file { "$bootstrap_path/puppet.conf":
+++ /dev/null
-# Use "mkpasswd -m sha-512" to generate root and first user's passwords
-$root_password = "rootpass"
-$first_user = "user"
-$first_user_password = "userpass"
-$first_user_sshkey = "usersshkey" # do not include "ssh-rsa " here.
-$first_user_email = "usermail"
-
-# Bootstrap dirs
-$puppet_bootstrap_tmpdir = "/var/tmp/puppet-bootstrap"
-$puppet_dir = "/usr/local/puppet"
-
-# Minimal config for puppet-nodo first run
-Exec { path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" }
-
-# Nameserver and munin configuration
-$resolvconf_nameservers = '201.6.2.152:201.6.2.32'
-$global_munin_allow = '192.168.0.[0-9]*'
-
-# MySQL configuration
-$mysql_rootpw = "mysqlpass"
-$puppetmaster_db_password = "puppetpass"
#
# Import the needed config and modules
-import "config.pp"
import "nodo"
-import "classes/admin_node.pp"
-import "classes/firewall.pp"
-import "classes/users.pp"
-import "classes/default_conf.pp"
# The server role
include nodo::role::server