Skip to content

Commit abb91cb

Browse files
committed
Update source_format parameter
Match the possible values to the file suffix of the created source files.
1 parent 9602bb0 commit abb91cb

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

REFERENCE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ apt::source { 'puppetlabs':
10921092

10931093
```puppet
10941094
apt::source { 'puppetlabs':
1095-
source_format => 'deb822'
1095+
source_format => 'sources'
10961096
uris => ['http://apt.puppetlabs.com'],
10971097
suites => [$facts['os']['distro']['codename']],
10981098
components => ['puppet8'],
@@ -1130,11 +1130,11 @@ The following parameters are available in the `apt::source` defined type:
11301130

11311131
##### <a name="-apt--source--source_format"></a>`source_format`
11321132

1133-
Data type: `Enum['legacy', 'deb822']`
1133+
Data type: `Enum['list', 'sources']`
11341134

11351135
The file format to use for the apt source. See https://wiki.debian.org/SourcesList
11361136

1137-
Default value: `'legacy'`
1137+
Default value: `'list'`
11381138

11391139
##### <a name="-apt--source--location"></a>`location`
11401140

manifests/source.pp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#
2424
# @example Install the puppetlabs apt source (deb822 format)
2525
# apt::source { 'puppetlabs':
26-
# source_format => 'deb822'
26+
# source_format => 'sources'
2727
# uris => ['http://apt.puppetlabs.com'],
2828
# suites => [$facts['os']['distro']['codename']],
2929
# components => ['puppet8'],
@@ -116,7 +116,7 @@
116116
# Specifies whether to check if the package release date is valid.
117117
#
118118
define apt::source (
119-
Enum['legacy', 'deb822'] $source_format = 'legacy',
119+
Enum['list', 'sources'] $source_format = 'list',
120120
Array[Enum['deb','deb-src'], 1, 2] $types = ['deb'],
121121
Optional[String] $location = undef,
122122
Optional[Array[String]] $uris = undef, # deb822
@@ -145,8 +145,8 @@
145145
$_before = Apt::Setting["list-${title}"]
146146

147147
case $source_format {
148-
'legacy': {
149-
$_file_suffix = 'list'
148+
'list': {
149+
$_file_suffix = $source_format
150150

151151
if !$release {
152152
if fact('os.distro.codename') {
@@ -295,7 +295,7 @@
295295
}
296296
}
297297
}
298-
'deb822': {
298+
'sources': {
299299
if $pin {
300300
fail('apt::source::pin parameter is not supported with deb822 format')
301301
}
@@ -308,7 +308,7 @@
308308
if !$components {
309309
fail('You must specify a list of components for the apt::source resource')
310310
}
311-
$_file_suffix = 'sources'
311+
$_file_suffix = $source_format
312312
case $ensure {
313313
'present': {
314314
$header = epp('apt/_header.epp')

0 commit comments

Comments
 (0)