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

Unified Diff: modules/adblockplus/manifests/legacy/webserver.pp

Issue 29483575: #2007 - Create abp::legacy::webserver class for hiera compatibility (Closed)
Patch Set: Created July 8, 2017, 8:09 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/adblockplus/manifests/legacy/webserver.pp
===================================================================
new file mode 100644
--- /dev/null
+++ b/modules/adblockplus/manifests/legacy/webserver.pp
@@ -0,0 +1,60 @@
+# == Class: adblockplus::legacy::webserver
+#
+# A container for migrating obsolete resources in web2, formerly located
+# in manifests/webserver.pp.
+#
+# See http://hub.eyeo.com/issues/2007 for more information.
+#
+class adblockplus::legacy::webserver {
+ $subscription_repo = '/home/www/subscriptionlist'
+
+ $fetch_repo_cmd = [
+ 'hg', 'clone',
+ '--noupdate',
+ 'https://hg.adblockplus.org/subscriptionlist',
+ $subscription_repo,
+ ]
+
+ exec {'fetch_repository_subscriptionlist':
+ command => shellquote($fetch_repo_cmd),
+ path => '/usr/local/bin:/usr/bin:/bin',
+ user => 'www',
+ timeout => 0,
+ onlyif => "test ! -d $subscription_repo",
+ require => Package['mercurial'],
mathias 2017/07/09 07:12:35 One should not reference resources without them be
+ }
+
+ $update_repo_cmd = [
+ 'hg', 'pull',
+ '--quiet', '--repository',
+ $subscription_repo,
+ ]
+
+ cron {'update_repository_subscriptionlist':
+ ensure => present,
+ environment => hiera('cron::environment', []),
+ command => shellquote($update_repo_cmd),
+ user => 'www',
+ minute => '1-59/20',
+ require => Exec['fetch_repository_subscriptionlist']
+ }
+
+ $generate_docs_cmd = [
+ 'python', '-m',
+ 'sitescripts.docs.bin.generate_docs',
+ ]
+
+ cron {'generate_docs':
+ ensure => 'present',
+ require => [
mathias 2017/07/09 07:12:35 One should not reference resources without them be
+ Class['sitescripts'],
+ Exec['install_jsdoc'],
+ Package['make', 'doxygen'],
+ File['/var/www/docs'],
+ ],
+ command => shellquote($generate_docs_cmd),
+ user => www,
+ minute => '5-55/10',
+ }
+}
+
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld