Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/adblockplus/manifests/web/fileserver.pp

Issue 29551585: #2317 - provide role fileserver for eyeofiles.com (Closed) Base URL: https://hg1/infrastructure
Patch Set: make repository into subdomains Created Sept. 22, 2017, 1:43 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/adblockplus/manifests/web/fileserver.pp
===================================================================
new file mode 100644
--- /dev/null
+++ b/modules/adblockplus/manifests/web/fileserver.pp
@@ -0,0 +1,51 @@
+# == Class: adblockplus::web::fileserver
+#
+# A fileserver serves multiple file repositories.
+#
+# === Parameters:
+#
+# [*fileserver_domain*]
+# A string which is the name of the fileserver domain, under which
+# each repository has a subdomain.
+#
+# [*certificate*]
+# The name of the SSL certificate file within modules/private/files, if any.
+# Requires a private_key as well.
+#
+# [*private_key*]
+# The name of the private key file within modules/private/files, if any.
+# Requires a certificate as well.
+#
+# [*is_default*]
+# Passed on to nginx (whether or not the site config should be default).
+#
+# [*repositories*]
+# A collection (hash) of repositories to serve.
+#
+class adblockplus::web::fileserver(
+ $fileserver_domain,
+ $certificate = undef,
+ $private_key = undef,
+ $is_default=false,
+ $repositories={},
+){
+
+ include nginx
+ include adblockplus
+ include adblockplus::web
+
+ # Root directory for serving repositories
+ realize(File[$adblockplus::directory])
+
+ file {[
+ "$adblockplus::directory/fileserver",
+ "$adblockplus::directory/fileserver/repositories"
+ ]:
+ ensure => directory,
+ }
+
+ ensure_resources('adblockplus::web::fileserver::repository', $repositories, {
+ ensure => 'present',
+ })
+}
+
« no previous file with comments | « hiera/roles/web/fileserver/eyeofiles.yaml ('k') | modules/adblockplus/manifests/web/fileserver/repository.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld