]> gitweb.fluxo.info Git - puppet-websites.git/commitdiff
Move websites::hosting to websites
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 26 Sep 2015 19:11:51 +0000 (16:11 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 26 Sep 2015 19:11:51 +0000 (16:11 -0300)
manifests/hosting.pp
manifests/init.pp
manifests/setup.pp

index 75462225a00df02ae568babec78f5bd15b8a1293..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,44 +0,0 @@
-class websites::hosting inherits websites::setup {
-  # Include the needed classes for website hosting
-  include php
-  include trac
-  include websvn
-  include moin
-  include apache::rails
-  include rsync::rrsync
-
-  # 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 { 'git::gitweb': }
-    class { 'git::cgit': }
-  }
-
-  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,
-  }
-}
index 8f8b4405fb0702bb10573f49ef26f7ac65574537..c67e2852a744539b6e3fdd2dc38947b3c4e273f5 100644 (file)
@@ -1 +1,63 @@
-# Websites module
+class websites inherits websites::setup {
+  # Include the needed classes for website hosting
+  include php
+  include trac
+  include websvn
+  include moin
+  include apache::rails
+  include rsync::rrsync
+
+  # 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 { 'git::gitweb': }
+    class { 'git::cgit': }
+
+    apache::site { "git":
+      source         => true,
+      docroot        => '/var/git/repositories',
+      mpm            => false,
+      tag            => 'all',
+    }
+  }
+
+  apache::site { "images":
+    docroot => "${apache::www_folder}/images",
+    mpm     => false,
+    tag     => 'all',
+  }
+
+  # Retrieve configured instances
+  $sites     = hiera('apache::sites',           {})
+  $databases = hiera('database::instances',     {})
+  $ikiwikis  = hiera('ikiwiki::instances',      {})
+  $domains   = hiera('domain_check::instances', {})
+
+  # Apply instances
+  create_resources('apache::site',           $sites)
+  create_resources('database::instance',     $databases)
+  create_resources('ikiwiki::instance',      $ikiwikis)
+  create_resources('domain_check::instance', $domains)
+
+  # 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,
+  }
+}
index a7ec5fb7b60157224424e18ade8d168c1344e868..282c892985f7ad76768bb6ea3162e54dfc3ee7e9 100644 (file)
@@ -104,14 +104,4 @@ class websites::setup {
     force   => true,
     require => File["${apache::error_folder}", "${apache::www_folder}/images"],
   }
-
-  # Retrieve configured instances
-  $sites     = hiera('apache::sites',       {})
-  $databases = hiera('database::instances', {})
-  $ikiwikis  = hiera('ikiwiki::instances',  {})
-
-  # Apply instances
-  create_resources('apache::site',       $sites)
-  create_resources('database::instance', $databases)
-  create_resources('ikiwiki::instance',  $ikiwikis)
 }