diff --git a/REFERENCE.md b/REFERENCE.md index e25ee56875..b1b8b6c460 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1039,7 +1039,7 @@ apt::source { 'puppetlabs': ```puppet apt::source { 'puppetlabs': - source_format => 'deb822' + source_format => 'sources' uris => ['http://apt.puppetlabs.com'], suites => [$facts['os']['distro']['codename']], components => ['puppet8'], @@ -1077,11 +1077,11 @@ The following parameters are available in the `apt::source` defined type: ##### `source_format` -Data type: `Enum['legacy', 'deb822']` +Data type: `Enum['list', 'sources']` The file format to use for the apt source. See https://wiki.debian.org/SourcesList -Default value: `'legacy'` +Default value: `'list'` ##### `location` diff --git a/manifests/source.pp b/manifests/source.pp index 45d70e7e97..564c0ae1ce 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -23,7 +23,7 @@ # # @example Install the puppetlabs apt source (deb822 format) # apt::source { 'puppetlabs': -# source_format => 'deb822' +# source_format => 'sources' # uris => ['http://apt.puppetlabs.com'], # suites => [$facts['os']['distro']['codename']], # components => ['puppet8'], @@ -116,7 +116,7 @@ # Specifies whether to check if the package release date is valid. Defaults to `True`. # define apt::source ( - Enum['legacy', 'deb822'] $source_format = 'legacy', + Enum['list', 'sources'] $source_format = 'list', Array[Enum['deb','deb-src'], 1, 2] $types = ['deb'], Optional[String] $location = undef, Optional[Array[String]] $uris = undef, # deb822 @@ -145,8 +145,8 @@ $_before = Apt::Setting["list-${title}"] case $source_format { - 'legacy': { - $_file_suffix = 'list' + 'list': { + $_file_suffix = $source_format if !$release { if fact('os.distro.codename') { @@ -292,7 +292,7 @@ create_resources('apt::pin', { "${name}" => $_pin }) } } - 'deb822': { + 'sources': { if $pin { fail('apt::source::pin parameter is not supported with deb822 format') } @@ -305,7 +305,7 @@ if !$components { fail('You must specify a list of components for the apt::source resource') } - $_file_suffix = 'sources' + $_file_suffix = $source_format case $ensure { 'present': { $header = epp('apt/_header.epp')