|
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. |
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') { |
|
295 | 295 | } |
296 | 296 | } |
297 | 297 | } |
298 | | - 'deb822': { |
| 298 | + 'sources': { |
299 | 299 | if $pin { |
300 | 300 | fail('apt::source::pin parameter is not supported with deb822 format') |
301 | 301 | } |
|
308 | 308 | if !$components { |
309 | 309 | fail('You must specify a list of components for the apt::source resource') |
310 | 310 | } |
311 | | - $_file_suffix = 'sources' |
| 311 | + $_file_suffix = $source_format |
312 | 312 | case $ensure { |
313 | 313 | 'present': { |
314 | 314 | $header = epp('apt/_header.epp') |
|
0 commit comments