|
23 | 23 | # |
24 | 24 | # @example Install the puppetlabs apt source (deb822 format) |
25 | 25 | # apt::source { 'puppetlabs': |
26 | | -# source_format => 'deb822' |
| 26 | +# source_format => 'sources' |
27 | 27 | # uris => ['http://apt.puppetlabs.com'], |
28 | 28 | # suites => [$facts['os']['distro']['codename']], |
29 | 29 | # components => ['puppet8'], |
|
116 | 116 | # Specifies whether to check if the package release date is valid. Defaults to `True`. |
117 | 117 | # |
118 | 118 | define apt::source ( |
119 | | - Enum['legacy', 'deb822'] $source_format = 'legacy', |
| 119 | + Enum['list', 'sources'] $source_format = 'list', |
120 | 120 | Array[Enum['deb','deb-src'], 1, 2] $types = ['deb'], |
121 | 121 | Optional[String] $location = undef, |
122 | 122 | Optional[Array[String]] $uris = undef, # deb822 |
|
145 | 145 | $_before = Apt::Setting["list-${title}"] |
146 | 146 |
|
147 | 147 | case $source_format { |
148 | | - 'legacy': { |
149 | | - $_file_suffix = 'list' |
| 148 | + 'list': { |
| 149 | + $_file_suffix = $source_format |
150 | 150 |
|
151 | 151 | if !$release { |
152 | 152 | if fact('os.distro.codename') { |
|
292 | 292 | create_resources('apt::pin', { "${name}" => $_pin }) |
293 | 293 | } |
294 | 294 | } |
295 | | - 'deb822': { |
| 295 | + 'sources': { |
296 | 296 | if $pin { |
297 | 297 | fail('apt::source::pin parameter is not supported with deb822 format') |
298 | 298 | } |
|
305 | 305 | if !$components { |
306 | 306 | fail('You must specify a list of components for the apt::source resource') |
307 | 307 | } |
308 | | - $_file_suffix = 'sources' |
| 308 | + $_file_suffix = $source_format |
309 | 309 | case $ensure { |
310 | 310 | 'present': { |
311 | 311 | $header = epp('apt/_header.epp') |
|
0 commit comments