OLD | NEW |
(Empty) | |
| 1 # == Type: filtermaster::repo_download |
| 2 # |
| 3 # Manage filter list download source repositories for aggregation. |
| 4 # |
| 5 # === Parameters: |
| 6 # |
| 7 # [*alias*] |
| 8 # An optional alias for use as the download resource name, allows for |
| 9 # repositories with different names. Note that this option is recognized |
| 10 # only when setup via hiera('filtermaster::repo_downloads')! |
| 11 # |
| 12 # === Examples: |
| 13 # |
| 14 # filtermaster::repo_download {'exceptionrules': |
| 15 # alias => 'exceptions', |
| 16 # } |
| 17 # |
| 18 define filtermaster::repo_download ( |
| 19 $alias = $title, |
| 20 ) { |
| 21 |
| 22 $directory = "/home/rsync/subscription/$title" |
| 23 $repository = "https://hg.adblockplus.org/$title" |
| 24 |
| 25 ensure_packages(['mercurial']) |
| 26 |
| 27 exec {"filtermaster::repo_download#$title": |
| 28 command => shellquote('hg', 'clone', $repository, $directory), |
| 29 onlyif => shellquote('test', '!', '-d', $directory), |
| 30 path => ['/usr/local/bin', '/usr/bin', '/bin'], |
| 31 require => Package['mercurial'], |
| 32 timeout => 0, |
| 33 user => 'rsync', |
| 34 } |
| 35 } |
OLD | NEW |