summaryrefslogtreecommitdiff
path: root/sitemodules
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2019-08-02 18:19:45 +0200
committerJan Dittberner <jandd@cacert.org>2019-08-02 18:19:45 +0200
commit9a49de9ffe7305e202f469a4153ea3b17643c6f6 (patch)
treec04ae685068f4f24e79a11b6bf0ddcc6d8885c40 /sitemodules
parentad2d04ff2dd9bd23e488ed5d901c5181c5da8c08 (diff)
downloadcacert-puppet-9a49de9ffe7305e202f469a4153ea3b17643c6f6.tar.gz
cacert-puppet-9a49de9ffe7305e202f469a4153ea3b17643c6f6.tar.xz
cacert-puppet-9a49de9ffe7305e202f469a4153ea3b17643c6f6.zip
Setup Apache httpd on webstatic
Diffstat (limited to 'sitemodules')
-rw-r--r--sitemodules/profiles/manifests/apache_common.pp29
-rw-r--r--sitemodules/profiles/manifests/static_websites.pp36
-rw-r--r--sitemodules/roles/manifests/webstatic.pp1
3 files changed, 66 insertions, 0 deletions
diff --git a/sitemodules/profiles/manifests/apache_common.pp b/sitemodules/profiles/manifests/apache_common.pp
new file mode 100644
index 0000000..4a94f80
--- /dev/null
+++ b/sitemodules/profiles/manifests/apache_common.pp
@@ -0,0 +1,29 @@
+# Class: profiles::static_websites
+# ================================
+#
+# This class takes care of basic Apache http setup. It is meant to be
+# included by other profiles.
+#
+# Examples
+# --------
+#
+# @example
+# class profiles::myprofile {
+# include profiles::icinga2_agent
+# }
+#
+# Authors
+# -------
+#
+# Jan Dittberner <jandd@cacert.org>
+#
+# Copyright
+# ---------
+#
+# Copyright 2019 Jan Dittberner
+class profiles::apache_common (
+) {
+ class { 'apache':
+ default_vhost => false,
+ }
+}
diff --git a/sitemodules/profiles/manifests/static_websites.pp b/sitemodules/profiles/manifests/static_websites.pp
new file mode 100644
index 0000000..0ef308b
--- /dev/null
+++ b/sitemodules/profiles/manifests/static_websites.pp
@@ -0,0 +1,36 @@
+# Class: profiles::static_websites
+# ================================
+#
+# This class takes care of VirtualHost setup for static websites.
+#
+# Parameters
+# ----------
+#
+# @param apache_vhosts Apache VirtualHost definitions that will be fed into
+# apache::vhost resources from the puppetlabs/apache
+# module
+#
+# Examples
+# --------
+#
+# @example
+# class roles::myhost {
+# include profiles::icinga2_agent
+# }
+#
+# Authors
+# -------
+#
+# Jan Dittberner <jandd@cacert.org>
+#
+# Copyright
+# ---------
+#
+# Copyright 2019 Jan Dittberner
+class profiles::static_websites (
+ Hash[String, Data] $apache_vhosts = {},
+) {
+ include profiles::apache_common
+
+ create_resources(apache::vhost, $apache_vhosts)
+}
diff --git a/sitemodules/roles/manifests/webstatic.pp b/sitemodules/roles/manifests/webstatic.pp
index 59bef2e..f93c73d 100644
--- a/sitemodules/roles/manifests/webstatic.pp
+++ b/sitemodules/roles/manifests/webstatic.pp
@@ -25,5 +25,6 @@ class roles::webstatic {
include profiles::rsyslog
include profiles::purge_nrpe_agent
include profiles::icinga2_agent
+ include profiles::static_websites
include profiles::debarchive
}