The current code makes it mandatory to have a file /etc/apt/preferences
present. In the event that this file is empty or contains a space,
apt-get update cannot execute.
Add a case with the special value "false" that ensures the file does not
exist.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
will pull in the templates/apt/preferences file:
$custom_preferences = 'template("apt/preferences")'
+Also, if you need the preferences file to be absent, set this variable to false:
+
+$custom_preferences = false
+
$custom_key_dir
---------------
If you have different apt-key files that you want to get added to your
'': {
include apt::default_preferences
}
+ false: {
+ config_file { "/etc/apt/preferences":
+ alias => "apt_config",
+ ensure => absent;
+ }
+ }
default: {
config_file { "/etc/apt/preferences":
content => $custom_preferences,