summaryrefslogtreecommitdiff
path: root/manifests/hosting.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-04-12 17:12:53 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-04-12 17:12:53 -0300
commitff9357ff1bf4682163e283620fe8e596387de713 (patch)
tree4c8325ca1fdd2a18044fb47a48003f313999bc40 /manifests/hosting.pp
downloadpuppet-websites-ff9357ff1bf4682163e283620fe8e596387de713.tar.gz
puppet-websites-ff9357ff1bf4682163e283620fe8e596387de713.tar.bz2
Initial import
Diffstat (limited to 'manifests/hosting.pp')
-rw-r--r--manifests/hosting.pp42
1 files changed, 42 insertions, 0 deletions
diff --git a/manifests/hosting.pp b/manifests/hosting.pp
new file mode 100644
index 0000000..309e840
--- /dev/null
+++ b/manifests/hosting.pp
@@ -0,0 +1,42 @@
+class websites::hosting inherits websites::setup {
+ # Include the needed classes for website hosting
+ include php
+ include trac
+ include websvn
+ include moin
+ include apache::rails
+
+ # Declare the needed classes for website hosting
+ class { [ 'drupal', 'ikiwiki', 'pmwiki', 'hotglue', 'wordpress' ]: }
+ class {
+ 'viewvc':
+ root_parents => "/var/svn : svn";
+ }
+
+ $git_daemon = hiera('nodo::web::git_daemon', True)
+
+ if $git_daemon != false {
+ class { 'gitweb': }
+ }
+
+ apache::site { "images":
+ docroot => "${apache::www_folder}/images",
+ mpm => false,
+ tag => 'all',
+ }
+
+ # Remove untagged site instances
+ Apache::Site <| tag != $::hostname and tag != 'all' |> {
+ ensure => absent,
+ }
+
+ # Remove untagged database instances
+ Database::Instance <| tag != $::hostname and tag != 'all' |> {
+ ensure => absent,
+ }
+
+ # Remove untagged ikiwiki instances
+ Ikiwiki::Instance <| tag != $::hostname and tag != 'all' |> {
+ ensure => absent,
+ }
+}