From 7bd2f91c12c2f270aa12d5a39da6eaec65375dfb Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 3 Mar 2014 14:23:01 -0300 Subject: Adding classes needed by puppetmaster --- README.md | 6 +++--- TODO.md | 1 + manifests/classes/websites.pp | 42 +++++++++++++++++++++++++++++++++++++++ manifests/modules.pp | 6 ++++++ manifests/nodes.pp | 5 +++++ manifests/site.pp | 8 ++++++++ templates/puppet/websites.pp.erb | 43 ---------------------------------------- 7 files changed, 65 insertions(+), 46 deletions(-) create mode 100644 manifests/classes/websites.pp create mode 100644 manifests/modules.pp create mode 100644 manifests/nodes.pp create mode 100644 manifests/site.pp delete mode 100644 templates/puppet/websites.pp.erb diff --git a/README.md b/README.md index a05301a..81000ca 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ You'll basically use the `bootstrap` repository as your `puppet` repository: git clone git://git.sarava.org/puppet-bootstrap.git puppet cd puppet && git tag -v - make submodules # get all needed submodules + make submodules # add all needed puppet moduleas as git submodules Using as a standalone provisioner --------------------------------- @@ -23,6 +23,6 @@ This will be a `Vagrant` example: cd your-project git clone git://git.sarava.org/puppet-bootstrap.git puppet # use submodule or subtree as you please - ln -s puppet/Vagrantfile . # or copy if you want to customize - ( cd puppet && mr up ) # need the mr binary to download the submodules + ln -s puppet/Vagrantfile # or copy if you want to customize + ( cd puppet && make modules ) # need the mr binary to download the submodules vagrant up web # with no arguments, all defined VMs are started diff --git a/TODO.md b/TODO.md index bc3b32b..c213071 100644 --- a/TODO.md +++ b/TODO.md @@ -2,3 +2,4 @@ TODO ==== * Make "config" target, refactoring config.pp and default_conf.pp. +* Make "subtrees" target, including all puppet modules as subtrees. diff --git a/manifests/classes/websites.pp b/manifests/classes/websites.pp new file mode 100644 index 0000000..35f27c6 --- /dev/null +++ b/manifests/classes/websites.pp @@ -0,0 +1,42 @@ +class websites::admin inherits websites::hosting::admin { + # An administrative Trac instance + #apache::site { "admin": + # docroot => "${apache::sites_folder}/admin/trac/htdocs", + # use => [ "Trac admin" ], + # redirect_match => "trac", + # mpm => false, + # tag => 'all', + #} + + apache::site { "munin": + docroot => '/var/www/munin', + owner => "munin", + group => "munin", + mpm => false, + tag => 'all', + } + + apache::site { "nagios": + source => true, + docroot => '/usr/share/nagios3/htdocs', + mpm => false, + tag => 'all', + } +} + +class websites inherits websites::hosting { + # Website definitions: always use tagged resources + + #apache::site { "site": + # source => true, + # ticket => '001', + # docroot => '/var/www/site', + # tag => 'all', + #} + + #database::instance { "site": + # password => 'xxx', + # tag => 'all', + #} + +} diff --git a/manifests/modules.pp b/manifests/modules.pp new file mode 100644 index 0000000..3df3fe3 --- /dev/null +++ b/manifests/modules.pp @@ -0,0 +1,6 @@ +# +# Module definitions. +# + +# Nodo automatically import all modules we need. +import "nodo" diff --git a/manifests/nodes.pp b/manifests/nodes.pp new file mode 100644 index 0000000..b90f04e --- /dev/null +++ b/manifests/nodes.pp @@ -0,0 +1,5 @@ +# +# Node definitions. +# + +#import "nodes/example.pp" diff --git a/manifests/site.pp b/manifests/site.pp new file mode 100644 index 0000000..6f3e5aa --- /dev/null +++ b/manifests/site.pp @@ -0,0 +1,8 @@ +# +# Puppet site configuration. +# + +import "classes/users.pp" +import "classes/websites.pp" +import "modules.pp" +import "nodes.pp" diff --git a/templates/puppet/websites.pp.erb b/templates/puppet/websites.pp.erb deleted file mode 100644 index 622c6c9..0000000 --- a/templates/puppet/websites.pp.erb +++ /dev/null @@ -1,43 +0,0 @@ -class websites::admin inherits websites::hosting::admin { - #apache::site { "admin": - # ticket => '64', - # docroot => "${apache::sites_folder}/admin/trac/htdocs", - # use => [ "Trac admin" ], - # redirect_match => "trac", - # mpm => false, - # tag => 'all', - #} - - #apache::site { "munin": - # ticket => '153', - # docroot => '/var/www/munin', - # owner => "munin", - # group => "munin", - # mpm => false, - # tag => 'all', - #} - - #apache::site { "nagios": - # source => true, - # docroot => '/usr/share/nagios3/htdocs', - # mpm => false, - # tag => 'all', - #} -} - -class websites inherits websites::hosting { - # Website definitions: always use tagged resources - - #apache::site { "site": - # source => true, - # ticket => '001', - # docroot => '/var/www/site', - # tag => 'all', - #} - - #database::instance { "site": - # password => 'xxx', - # tag => 'all', - #} - -} -- cgit v1.2.3