diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-02-28 19:26:55 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-02-28 19:26:55 -0300 |
commit | c154a1076a6145a28133e9417d842310335d6805 (patch) | |
tree | ef16d294172fd448c8291442d13f5b32efe949ff /manifests | |
parent | d2331dfe6d46e7e1f824e7692828411e4b7d7d28 (diff) | |
download | puppet-bootstrap-c154a1076a6145a28133e9417d842310335d6805.tar.gz puppet-bootstrap-c154a1076a6145a28133e9417d842310335d6805.tar.bz2 |
New submodule scheme
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/classes/admin_node.pp | 12 | ||||
-rw-r--r-- | manifests/classes/firewall.pp | 13 | ||||
-rw-r--r-- | manifests/classes/puppet_bootstrap.pp | 35 | ||||
-rw-r--r-- | manifests/classes/puppetmasterd.pp | 21 | ||||
-rw-r--r-- | manifests/host.pp | 15 | ||||
-rw-r--r-- | manifests/master.pp | 2 | ||||
-rw-r--r-- | manifests/nodes/.empty | 0 | ||||
-rw-r--r-- | manifests/repository.pp | 8 |
8 files changed, 19 insertions, 87 deletions
diff --git a/manifests/classes/admin_node.pp b/manifests/classes/admin_node.pp deleted file mode 100644 index 22b08fd..0000000 --- a/manifests/classes/admin_node.pp +++ /dev/null @@ -1,12 +0,0 @@ -class admin_node { - nodo::vserver::instance { "$hostname-master": - context => '2', - puppetmaster => true, - } - - host { "puppet": - ensure => present, - ip => "192.168.0.2", - host_aliases => [ "puppet.$domain", "admin" ], - } -} diff --git a/manifests/classes/firewall.pp b/manifests/classes/firewall.pp deleted file mode 100644 index cd1b225..0000000 --- a/manifests/classes/firewall.pp +++ /dev/null @@ -1,13 +0,0 @@ -class firewall { - include shorewall - - shorewall::rule { "ssh-02": - action => 'DNAT', - source => 'net', - destination => "vm:192.168.0.2:22", - proto => 'tcp', - destinationport => "2202", - ratelimit => '-', - order => "202", - } -} diff --git a/manifests/classes/puppet_bootstrap.pp b/manifests/classes/puppet_bootstrap.pp deleted file mode 100644 index d0517f7..0000000 --- a/manifests/classes/puppet_bootstrap.pp +++ /dev/null @@ -1,35 +0,0 @@ -class puppet_bootstrap { - - $templates_dir = "$puppet_bootstrap_tmpdir/templates" - - # puppet-bootstrap script - file { "/usr/local/sbin/puppet-bootstrap": - owner => "root", - group => "root", - mode => 0755, - ensure => present, - content => template("$templates_dir/bin/puppet-bootstrap"), - } - - package { "lynx": ensure => installed } - - define puppet_modules($puppet_dir) { - - # directory to download modules - file { "$puppet_dir/modules": - ensure => directory, - owner => "puppet", - group => "puppet", - mode => 0755, - } - - # execute the bootstrap script to download puppet modules - exec { "/usr/local/sbin/puppet-bootstrap add-submodules $puppet_dir": - user => root, - require => [ File["/usr/local/sbin/puppet-bootstrap"], File["$puppet_dir/modules"] ], - timeout => 600, - } - - } - -} diff --git a/manifests/classes/puppetmasterd.pp b/manifests/classes/puppetmasterd.pp deleted file mode 100644 index 5aaebb7..0000000 --- a/manifests/classes/puppetmasterd.pp +++ /dev/null @@ -1,21 +0,0 @@ -class puppetmasterd { - - package { "puppetmaster": ensure => installed, } - - # updates the puppet configuration dir with git repositories - # every 5 minutes. - cron { puppet-conf: - command => "git --git-dir=/etc/puppet/.git/ pull /var/git/repositories/puppet.git master && \ - git --git-dir=/etc/puppet/.git/ --work-tree=/etc/puppet/ checkout -f", - user => root, - hour => '*', - minute => '*/5', - ensure => present, - } - - # runs the service - service { "puppetmasterd": - ensure => stopped, - depends => Package["puppetmaster"], - } -} diff --git a/manifests/host.pp b/manifests/host.pp index eaa9e22..eecb81e 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -1,5 +1,5 @@ # -# This file is intended to configure the initial +# This manifest is intended to configure the initial # machine wich will host the first puppetmaster # virtual machine. # @@ -16,7 +16,14 @@ import "classes/default_conf.pp" include nodo::role::server # Creates vserver for administrative node -include admin_node +nodo::vserver::instance { "$hostname-master": + context => '2', + puppetmaster => true, +} -# Creates firewall rules for administrative node's external acess -include firewall +# Create a host entry for this puppet node +host { "puppet": + ensure => present, + ip => "192.168.0.2", + host_aliases => [ "puppet.$domain", "admin" ], +} diff --git a/manifests/master.pp b/manifests/master.pp index 30f6dc2..0b64523 100644 --- a/manifests/master.pp +++ b/manifests/master.pp @@ -1,5 +1,5 @@ # -# This file is intended to configure the initial +# This manifest is intended to configure the initial # puppetmaster node. # # Once it's running it can setup all the other nodes. diff --git a/manifests/nodes/.empty b/manifests/nodes/.empty new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/manifests/nodes/.empty diff --git a/manifests/repository.pp b/manifests/repository.pp index b148933..9564123 100644 --- a/manifests/repository.pp +++ b/manifests/repository.pp @@ -1,7 +1,13 @@ +# +# This manifest is intended to generate the initial +# puppet repository. +# + +# Import the needed config and modules import "config.pp" import "classes/puppet_bootstrap.pp" -# setup modules for use with other stages +# Setup modules for use with other stages include puppet_bootstrap puppet_bootstrap::puppet_modules{ "modules": |