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

Unified Diff: modules/filtermaster/manifests/repo_download.pp

Issue 29329031: Issue 3191 - Move filtermaster::repo_download to a distinct file (Closed)
Patch Set: Issue 3088 - Address feedback from codereview Created Oct. 12, 2015, 12:55 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 | « modules/filtermaster/manifests/init.pp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/filtermaster/manifests/repo_download.pp
diff --git a/modules/filtermaster/manifests/repo_download.pp b/modules/filtermaster/manifests/repo_download.pp
new file mode 100644
index 0000000000000000000000000000000000000000..fa08fb2f87f51b70d4dd0a9826f173bf4fdb8119
--- /dev/null
+++ b/modules/filtermaster/manifests/repo_download.pp
@@ -0,0 +1,35 @@
+# == Type: filtermaster::repo_download
+#
+# Manage filter list download source repositories for aggregation.
+#
+# === Parameters:
+#
+# [*alias*]
+# An optional alias for use as the download resource name, allows for
+# repositories with different names. Note that this option is recognized
+# only when setup via hiera('filtermaster::repo_downloads')!
+#
+# === Examples:
+#
+# filtermaster::repo_download {'exceptionrules':
+# alias => 'exceptions',
+# }
+#
+define filtermaster::repo_download (
+ $alias = $title,
+) {
+
+ $directory = "/home/rsync/subscription/$title"
+ $repository = "https://hg.adblockplus.org/$title"
+
+ ensure_packages(['mercurial'])
+
+ exec {"filtermaster::repo_download#$title":
+ command => shellquote('hg', 'clone', $repository, $directory),
+ onlyif => shellquote('test', '!', '-d', $directory),
+ path => ['/usr/local/bin', '/usr/bin', '/bin'],
+ require => Package['mercurial'],
+ timeout => 0,
+ user => 'rsync',
+ }
+}
« no previous file with comments | « modules/filtermaster/manifests/init.pp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld