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>
When $custom_key_dir has not been assigned any value, a useless exec of
/bin/true is run. Remove this by using 'if' instead of 'case'.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
The module currently doesn't have a handy way of making a server get its
packages via a proxy. Add a "proxy-client" class that makes this easy.
$apt_proxy declares the proxy server's fqdn
$apt_proxy_port declares the port used for connection
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
The file "/etc/apt/apt.conf.d/from_puppet" is currently only defined
when $custom_sources_list is not used (it is declared in
default_preferences).
Bring this file up in the apt class so that using custom sources doesn't
remove its addition.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
- refactor every class and define into its very own file to fit
better (at least our) puppet's best practices.
- some cosmetic rearrangements
- no code changes have been made, only reordering
This simplifies upgrades for DSA security announcements or point-releases. This
will ensure that the named package is upgrade to the version specified, only if the
package is installed, otherwise nothing happens. If the specified version is 'latest' (the
default), then the package is ensured to be upgraded to the latest package revision when
it becomes available.
For example, the following upgrades the perl package to version 5.8.8-7etch1 (if it is
installed), it also upgrades the syslog-ng and perl-modules packages to their latest (also,
only if they are installed):
upgrade_package { "perl":
version => '5.8.8-7etch1';
"syslog-ng":
version => latest;
"perl-modules":
}
add more detailed information for $custom_sources_list with an example
add information about $custom_preferences with an example
add information about $custom_key_dir
add information about the apt::preseeded_package resource
add information about the apt::upgrade_package resource