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

Delta Between Two Patch Sets: modules/filtermaster/manifests/repo_download.pp

Issue 29329031: Issue 3191 - Move filtermaster::repo_download to a distinct file (Closed)
Left Patch Set: Created Oct. 12, 2015, 9:35 a.m.
Right Patch Set: Issue 3088 - Address feedback from codereview Created Oct. 12, 2015, 12:55 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « modules/filtermaster/manifests/init.pp ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # == Type: filtermaster::repo_download 1 # == Type: filtermaster::repo_download
2 # 2 #
3 # Manage filter list download source repositories for aggregation. 3 # Manage filter list download source repositories for aggregation.
4 # 4 #
5 # === Parameters: 5 # === Parameters:
6 # 6 #
7 # [*alias*] 7 # [*alias*]
8 # An optional alias for use as the download resource name, allows for 8 # An optional alias for use as the download resource name, allows for
9 # repositories with different names. Note that this option is recognized 9 # repositories with different names. Note that this option is recognized
10 # only when setup via hiera('filtermaster::repo_downloads')! 10 # only when setup via hiera('filtermaster::repo_downloads')!
11 # 11 #
12 # === Examples: 12 # === Examples:
13 # 13 #
14 # filtermaster::repo_download {'exceptionrules': 14 # filtermaster::repo_download {'exceptionrules':
15 # alias => 'exceptions', 15 # alias => 'exceptions',
16 # } 16 # }
17 # 17 #
18 define filtermaster::repo_download ( 18 define filtermaster::repo_download (
19 $alias = $title, 19 $alias = $title,
20 ) { 20 ) {
21 21
22 $directory = "/home/rsync/subscription/$title" 22 $directory = "/home/rsync/subscription/$title"
23 $repository = "https://hg.adblockplus.org/$title" 23 $repository = "https://hg.adblockplus.org/$title"
mathias 2015/10/12 10:00:22 IMHO $name would be a better fit here, but the doc
24 24
25 ensure_packages(['mercurial']) 25 ensure_packages(['mercurial'])
26 26
27 exec {"fetch_${title}": 27 exec {"filtermaster::repo_download#$title":
mathias 2015/10/12 10:00:22 Maybe we should rename this part to be more verbos
28 command => shellquote('hg', 'clone', $repository, $directory), 28 command => shellquote('hg', 'clone', $repository, $directory),
29 onlyif => shellquote('test', '!', '-d', $directory), 29 onlyif => shellquote('test', '!', '-d', $directory),
30 path => ['/usr/local/bin', '/usr/bin', '/bin'], 30 path => ['/usr/local/bin', '/usr/bin', '/bin'],
31 require => Package['mercurial'], 31 require => Package['mercurial'],
32 timeout => 0, 32 timeout => 0,
33 user => rsync, 33 user => 'rsync',
34 } 34 }
35 } 35 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld