# Specifies a keyserver to provide the GPG key. Valid options: a string containing a domain name or a full URL (http://, https://, or
# hkp://).
#
+# @param key_options
+# Specifies the default options for apt::key resources.
+#
# @param ppa_options
# Supplies options to be passed to the `add-apt-repository` command.
#
Hash $include_defaults = $apt::params::include_defaults,
String $provider = $apt::params::provider,
String $keyserver = $apt::params::keyserver,
+ Optional[String] $key_options = $apt::params::key_options,
Optional[String] $ppa_options = $apt::params::ppa_options,
Optional[String] $ppa_package = $apt::params::ppa_package,
Optional[Hash] $backports = $apt::params::backports,
String $conf_d = $apt::params::conf_d,
String $preferences = $apt::params::preferences,
String $preferences_d = $apt::params::preferences_d,
+ String $apt_conf_d = $apt::params::apt_conf_d,
Hash $config_files = $apt::params::config_files,
Hash $source_key_defaults = $apt::params::source_key_defaults,
) inherits apt::params {
if $purge['preferences.d'] {
assert_type(Boolean, $purge['preferences.d'])
}
+ if $purge['apt.conf.d'] {
+ assert_type(Boolean, $purge['apt.conf.d'])
+ }
$_purge = merge($::apt::purge_defaults, $purge)
$_proxy = merge($apt::proxy_defaults, $proxy)
}
}
- $sources_list_content = $_purge['sources.list'] ? {
- true => "# Repos managed by puppet.\n",
- default => undef,
+ $sources_list_ensure = $_purge['sources.list'] ? {
+ true => absent,
+ default => file,
}
$preferences_ensure = $_purge['preferences'] ? {
}
file { 'sources.list':
- ensure => file,
- path => $::apt::sources_list,
- owner => root,
- group => root,
- mode => '0644',
- content => $sources_list_content,
- notify => Class['apt::update'],
+ ensure => $sources_list_ensure,
+ path => $::apt::sources_list,
+ owner => root,
+ group => root,
+ notify => Class['apt::update'],
}
file { 'sources.list.d':
path => $::apt::sources_list_d,
owner => root,
group => root,
- mode => '0644',
purge => $_purge['sources.list.d'],
recurse => $_purge['sources.list.d'],
notify => Class['apt::update'],
path => $::apt::preferences,
owner => root,
group => root,
- mode => '0644',
notify => Class['apt::update'],
}
path => $::apt::preferences_d,
owner => root,
group => root,
- mode => '0644',
purge => $_purge['preferences.d'],
recurse => $_purge['preferences.d'],
notify => Class['apt::update'],
}
+ file { 'apt.conf.d':
+ ensure => directory,
+ path => $::apt::apt_conf_d,
+ owner => root,
+ group => root,
+ purge => $_purge['apt.conf.d'],
+ recurse => $_purge['apt.conf.d'],
+ notify => Class['apt::update'],
+ }
+
if $confs {
create_resources('apt::conf', $confs)
}
}
# required for adding GPG keys on Debian 9 (and derivatives)
- ensure_packages(['dirmngr'])
+ ensure_packages(['gnupg'])
}