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

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

Issue 29548730: Remove duplicate declaration of mercurial package (Closed)
Left Patch Set: Created Sept. 18, 2017, 6:33 p.m.
Right Patch Set: For comment 2 Created Sept. 18, 2017, 6:56 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 | « no previous file | 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 # [*target*] 7 # [*target*]
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 # [*static_files*] 12 # [*static_files*]
13 # Files to include in the synchronization of download resources without 13 # Files to include in the synchronization of download resources without
14 # prior aggregation, if any. Note that option is recognized only when 14 # prior aggregation, if any. Note that option is recognized only when
15 # setup via hiera('filtermaster::repo_downloads') as well! 15 # setup via hiera('filtermaster::repo_downloads') as well!
16 # 16 #
17 # === Examples: 17 # === Examples:
18 # 18 #
19 # filtermaster::repo_download {'exceptionrules': 19 # filtermaster::repo_download {'exceptionrules':
20 # alias => 'exceptions', 20 # alias => 'exceptions',
21 # } 21 # }
22 # 22 #
23 define filtermaster::repo_download ( 23 define filtermaster::repo_download (
24 $target = $title, 24 $target = $title,
25 $static_files = [], 25 $static_files = [],
26 ) { 26 ) {
27 27
28 include adblockplus::mercurial
29
28 $directory = "/home/rsync/subscription/$title" 30 $directory = "/home/rsync/subscription/$title"
29 $repository = "https://hg.adblockplus.org/$title" 31 $repository = "https://hg.adblockplus.org/$title"
30 32
31 exec {"filtermaster::repo_download#$title": 33 exec {"filtermaster::repo_download#$title":
32 command => shellquote('hg', 'clone', $repository, $directory), 34 command => shellquote('hg', 'clone', $repository, $directory),
33 onlyif => shellquote('test', '!', '-d', $directory), 35 onlyif => shellquote('test', '!', '-d', $directory),
34 path => ['/usr/local/bin', '/usr/bin', '/bin'], 36 path => ['/usr/local/bin', '/usr/bin', '/bin'],
35 require => Package['mercurial'], 37 require => Package['mercurial'],
36 timeout => 0, 38 timeout => 0,
37 user => 'rsync', 39 user => 'rsync',
38 } 40 }
39 41
40 file {"$directory/.hg/hgrc": 42 file {"$directory/.hg/hgrc":
41 content => template('filtermaster/hgrc.erb'), 43 content => template('filtermaster/hgrc.erb'),
42 owner => 'rsync', 44 owner => 'rsync',
43 require => Exec["filtermaster::repo_download#$title"], 45 require => Exec["filtermaster::repo_download#$title"],
44 } 46 }
45 } 47 }
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld