Going on merging immerda changes.
Incompatible change: I do prefer my own generic apt/preferences template to
shipping a static file that only supports Lenny. My own template supports
security, backports, volatile, next release etc.
Conflicts:
files/preferences
manifests/init.pp
manifests/preferences.pp
Let's set refreshonly on the 'update_apt' Exec (aliased to 'apt_updated')
instead of removing it for backward compatibility: it may be in use at some
places to trigger updates.
Simplifications: make apt_conf_snippet repeat less code, make code that
generates sources.list more concise.
Remove all inline content in favor of templates and static files.
The ability to include sources for static files was needed for
the main 'preferences' file, so it was added to the preferences_snippet
define.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
With the new define, it's easy to add an apt.conf snippet in apt.conf.d
It accepts either 'sources' to get a static file or 'content' to define
content inline or with the help of a template.
Put it to use where we create files in apt.conf.d
Finally, fix the dependancy to the apt_config file (however, I don't see
the need for this dependancy)
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
The contents of the file default_sources_list.pp is used in only one
place. Remove the file and move its contents inside the apt class in
order to have one less useless depth level.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
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>