| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 # == Class: adblockplus::mercurial | 1 # == Class: adblockplus::mercurial |
| 2 # | 2 # |
| 3 # Manage Mercurial (https://www.mercurial-scm.org/) resources. | 3 # Manage Mercurial (https://www.mercurial-scm.org/) resources. |
| 4 # | 4 # |
| 5 # === Parameters: | 5 # === Parameters: |
|
mathias
2017/08/24 16:40:52
Please document parameters $config and $package, t
f.lopez
2017/08/24 17:45:58
Done.
| |
| 6 # | 6 # |
| 7 # [*config*] | |
| 8 # Overwrite the default hgrc file options for the Mercurial config. | |
| 9 # | |
| 10 # [*package*] | |
| 11 # Overwrite the default package options. | |
| 12 # | |
| 7 # === Examples: | 13 # === Examples: |
| 8 # | 14 # |
| 9 # class {'adblockplus::mercurial': | 15 # class {'adblockplus::mercurial': |
| 10 # ensure => 'latest', | 16 # package => { |
|
mathias
2017/08/24 16:40:52
That is not a valid example.
f.lopez
2017/08/24 17:45:57
Done.
| |
| 17 # ensure => 'latest', | |
| 18 # }, | |
| 11 # } | 19 # } |
| 12 # | 20 # |
| 13 class adblockplus::mercurial ( | 21 class adblockplus::mercurial ( |
| 14 $config = {}, | 22 $config = {}, |
| 15 $package = {}, | 23 $package = {}, |
| 16 ) { | 24 ) { |
| 17 | 25 |
| 18 # https://forge.puppet.com/puppetlabs/stdlib | 26 # https://forge.puppet.com/puppetlabs/stdlib |
| 19 include stdlib | 27 include stdlib |
| 20 | 28 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 47 content => $default_content, | 55 content => $default_content, |
| 48 }, $config)) | 56 }, $config)) |
| 49 | 57 |
| 50 # https://docs.puppet.com/puppet/latest/lang_relationships.html | 58 # https://docs.puppet.com/puppet/latest/lang_relationships.html |
| 51 Package['mercurial'] -> File['hgrc'] | 59 Package['mercurial'] -> File['hgrc'] |
| 52 | 60 |
| 53 # https://docs.puppet.com/puppet/latest/function.html#createresources | 61 # https://docs.puppet.com/puppet/latest/function.html#createresources |
| 54 $extensions = hiera_hash('adblockplus::mercurial::extensions', {}) | 62 $extensions = hiera_hash('adblockplus::mercurial::extensions', {}) |
| 55 create_resources('adblockplus::mercurial::extension', $extensions) | 63 create_resources('adblockplus::mercurial::extension', $extensions) |
| 56 } | 64 } |
| LEFT | RIGHT |