Age | Commit message (Collapse) | Author |
|
|
|
sources_list doesn't currently force puppet to run 'apt-get update'
after creating/modifying/removing files in sources.list.d.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
|
|
The .d directories are only managed by the main 'apt' class. However,
both 'sources_list' and 'apt_conf' defines depend on those directories.
So in practice, the defines have an implicit need for those directories
to be somehow managed.
Let's turn this into an explicit relation, and include the directories
in the defines.
This makes it possible to use both defines without having to include the
main 'apt' class. (maybe when using puppet apply?)
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
|
|
This reverts commit 3c0499b78d1f671fcce13127ef14b1b662a48c5a.
This was already provided by sources_list.pp.
|
|
|
|
Move this Exec to a dedicated class that is not included by default i.e. we
default not to "apt-get update" on every Puppet run.
We now make use of this class in the apt::upgrade_package define to make sure
APT indexes are up-to-date before attempting package upgrades.
One may now use the following to ensure current packages are installed by
Package resources:
include apt::update
Package { require => Exec[apt_updated] }
|
|
|
|
Lenny's APT does not support pinning like this:
Pin: release o=Debian,n=<%= codename %>
We therefore switched (in commit ef2ebdffd) to:
Pin: release o=Debian,a=<%= release %>
With such a pinning setup, when Squeeze is released, systems using this module
with $apt_use_next_release set to true would immediately switch to prefer
packages from Squeeze. If an automated upgrade process is setup, they would be
automatically upgraded to Squeeze.
This does not sound safe to me, so let's use the release version number as an
additional selection criterion to prevent upgrades to Squeeze to happen behind
our back:
Pin: release o=Debian,a=<%= release %>,v=<%= release_version %>*
Note that the trailing '*' is intentional and necessary to match stable
point-releases.
|
|
|
|
the alias metaparameter.
the reason for this change was because the Exec override was not able to find the exec through its alias
|
|
|
|
The CDN checks your IP and uses the Max-Mind geoIP DB to determine your location and then uses your local country Debian Mirror, or if your local country doesn't have a debian mirror, it uses the local continent. It automatically checks and prunes dead mirrors. the technology for the Debian CDN setup is still improving, I believe that ASN-number associations are the next step to attempt to make more informed, finer-grained choices.
This is more useful than using ftp.debian.org because that is just a round-robin DNS entry that could get you any mirror anywhere.
|
|
Before you only had the choice of setting a 03clean apt configuration for either
all hosts, or every single host. Setting it to have the recommended settings for
vservers for all hosts meant that you were setting it for non-vservers as well
as vservers. The other option you had was to set it per host. This was a bit
annoying if you have any more than one vserver because you would need to create
a 03clean for every single vserver guest.
This change auto-detects if the node is a vserver, and if it is it automatically
installs the 03clean_vserver file, with the recommended DSelect::Clean settings,
and allows you to override this for all of your vservers, or for specific hosts.
|
|
|
|
A bunch of painlessly merged commits.
Conflicts:
manifests/init.pp
|
|
Conflicts:
manifests/init.pp
|
|
One more painless merge commit.
Conflicts:
manifests/init.pp
|
|
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
|
|
(Starting to merge changes from immerda.)
Conflicts:
manifests/default_sources_list.pp
manifests/init.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.
|
|
Conflicts:
README
manifests/custom_sources.pp
manifests/default_preferences.pp
manifests/init.pp
manifests/unattended_upgrades.pp
templates/Debian/sources.list.volatile.erb
|
|
Add a file resource on the apt/sources.list.d directory to ensure that
it is created as a directory and watch it for modifications to
automatically refresh the apt cache.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
|
|
Unattended upgrades are not always necessary. Including the
apt::unattended_upgrades class through the main apt class is not
appropriate. It is better to make nodes include the
apt::unattended_upgrades class explicitly.
Remove the $apt_unattended_upgrades variable along with the include in
the 'apt' class.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
|
|
Currently, setting the $custom_preferences variable to false fails
because of the /etc/apt/preferences concatenated_file being re-defined.
Fix this by setting dependencies on the resource only when we expect to
create the /etc/apt/preferences file. Also, since there is no "ensure"
parameter to concatenated_file, use a simple file resource to ensure
that it is removed.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
|
|
Currently, it's either we use the default source that's hardcoded in the
sources.list template or we redefine entirely this template.
Make it easier to just change the URL of the apt source while using the
rest of the default template by adding a $main_apt_source variable.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
|
|
This variable was deprecated in favor of using a list of file sources.
to change the value of the 'clean' property, you can either define a
file '03clean' in a site-apt module, or a per-host '$fqdn/03clean' file
in the same site-apt module.
Also, move the moduledir stuff below nearer to where it's actually used.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
|
|
remove the use of _snippet in names (except for preferences_snippet) so
that they represent directly a resource name.
rename custom_sources_template to sources_list.
modify sources_list to make it more flexible (gives the opportunity to
provide sources or content). this changes its behaviour in that the name
is now the name of the file in sources.list.d
rename proxy-client to proxy_client to use the same standard for its
name as the other classes.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
|
|
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>
|
|
|
|
Integrate no custom preference into our new
way to manage the preferences.
Conflicts:
README
manifests/default_preferences.pp
manifests/init.pp
|
|
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 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>
|
|
Conflicts:
manifests/init.pp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Now, we have the possibility to externally add snippes, so that
we can preferences for packages that are for example only in backports
or unstable.
|
|
|
|
|
|
This allows other modules to add lines there too.
|
|
|
|
APT configuration has (unfortunately) nothing to do with APT preferences.
|
|
|