Commit graph

163 commits

Author SHA1 Message Date
intrigeri
71d42350d1 Merge commit '1b0bc415977c1c8b49390e0cdb1361769e0fdbae'.
Merging one more commit.

Conflicts:
	files/preferences
	templates/Debian/sources.list.deb-src.erb
	templates/Debian/sources.list.volatile.erb
	templates/Ubuntu/sources.list.backports.erb
	templates/Ubuntu/sources.list.deb-src.erb
2010-11-21 16:38:50 +01:00
intrigeri
d30069c178 Merge commit 'd97a49b7b2c020c2c43df6524236f50a421789ee'.
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
2010-11-21 16:31:42 +01:00
intrigeri
ee6d13d1e4 Merge commit 'ac76a5d52df78aec919f08334ca5b140902a9298'
(Starting to merge changes from immerda.)

Conflicts:
	manifests/default_sources_list.pp
	manifests/init.pp
2010-11-21 16:24:57 +01:00
intrigeri
06a2957f9f Do not refresh APT lists on every run.
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.
2010-11-10 14:44:01 +01:00
intrigeri
2cd9496999 Merge remote branch 'nadir/master'
Conflicts:
	README
	manifests/custom_sources.pp
	manifests/default_preferences.pp
	manifests/init.pp
	manifests/unattended_upgrades.pp
	templates/Debian/sources.list.volatile.erb
2010-11-10 10:19:06 +01:00
Gabriel Filion
1b0bc41597 Add file headers for awareness of puppet presence
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 01:13:44 -04:00
Gabriel Filion
d97a49b7b2 refactor: simplify and remove inline content
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>
2010-10-25 00:14:33 -04:00
Gabriel Filion
ac76a5d52d Add apt_conf_snippet and use it where possible
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>
2010-10-24 09:17:09 -04:00
Gabriel Filion
e22029433a Move default_sources_list into apt class
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>
2010-10-24 07:37:29 -04:00
nadir
5bf01f148d notify => Exec['refresh_apt'] 2010-10-22 19:18:12 +02:00
nadir
851d20a7b6 merged with immerda/master 2010-10-22 19:17:57 +02:00
mh
e2ac1b3d8d Merge remote branch 'lelutin/master'
Integrate no custom preference into our new
way to manage the preferences.

Conflicts:
	README
	manifests/default_preferences.pp
	manifests/init.pp
2010-10-21 01:59:41 +02:00
Gabriel Filion
4dbcd09281 Make it possible to ensure preferences is absent
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>
2010-10-18 01:51:16 -04:00
Gabriel Filion
9736578481 Remove unnecessary exec
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>
2010-10-18 01:43:24 -04:00
Gabriel Filion
8175bff077 Add a proxy-client class
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>
2010-10-17 20:42:09 -04:00
Gabriel Filion
ebcda455df Make $apt_clean effective in all cases
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>
2010-10-17 20:36:45 -04:00
Gabriel Filion
296593bcbd Merge remote branch 'riseup/master'
Conflicts:
	manifests/init.pp
2010-10-17 20:35:35 -04:00
intrigeri
c43bfac6b8 Ensure apt-listbugs is absent in dist-upgrade mode.
Else it will crash automatic upgrades.
2010-10-17 17:44:19 +02:00
intrigeri
8a9bea09e9 Need to update APT lists after apt.conf.d changes. 2010-10-17 16:47:38 +02:00
intrigeri
e0e1b80c4e No need to update APT lists when pinning changes (bis). 2010-10-17 16:46:55 +02:00
intrigeri
3f20c7823e Fix one more relationship. 2010-10-17 16:43:56 +02:00
intrigeri
20b67058ab No need to refresh APT lists after changes to pinning preferences. 2010-10-17 16:43:04 +02:00
intrigeri
487855daf2 Fix indentation. 2010-10-17 16:42:15 +02:00
intrigeri
7b9ba44340 Fix relationships. 2010-10-17 16:41:40 +02:00
mh
e19c94dcd2 minor improvements, especially do not refresh apt every run 2010-10-17 15:18:08 +02:00
mh
9d1a018eed improve example 2010-10-17 14:43:06 +02:00
mh
b497ed88ef empty line between snippets 2010-10-17 14:40:27 +02:00
mh
68842b2f96 fix header file 2010-10-17 14:36:28 +02:00
mh
80ad2d086e fix classname 2010-10-17 14:29:01 +02:00
mh
b989192dfd fix modules directory stuff 2010-10-17 14:27:27 +02:00
mh
822d482f4d improve prefrences snippet 2010-10-17 14:13:02 +02:00
mh
4d28e6668f introduce preferences snippet
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.
2010-10-17 13:58:59 +02:00
intrigeri
e42b54af40 Support choosing a custom Ubuntu mirror. 2010-10-17 10:51:06 +02:00
intrigeri
2d75cda2db Use append_if_no_such_line instead of line. 2010-10-17 02:54:20 +02:00
intrigeri
7a0dc9a37a Migrate config file to line-editing.
This allows other modules to add lines there too.
2010-10-17 02:30:28 +02:00
intrigeri
8ce3c34be5 Backward compatibility: ensure old renamed file is absent. 2010-10-17 02:13:59 +02:00
intrigeri
e3c8c1b6af Bring /etc/apt/apt.conf.d/99from_puppet to init.
APT configuration has (unfortunately) nothing to do with APT preferences.
2010-10-17 02:11:41 +02:00
intrigeri
b4d6f30fae Support $apt_repos for Ubuntu as well. 2010-10-17 02:08:17 +02:00
intrigeri
bcfb35c969 Merge remote branch 'nadir/master' into wip
Conflicts:
	manifests/default_preferences.pp
	manifests/default_sources_list.pp
	manifests/init.pp
	templates/Debian/sources.list.deb-src.erb
	templates/Debian/sources.list.erb
	templates/Debian/sources.list.volatile.erb
	templates/Ubuntu/sources.list.erb
2010-10-17 01:57:55 +02:00
intrigeri
e2f80db7b7 Bring in a bit of Ubuntu support from Nadir. 2010-10-17 01:35:37 +02:00
intrigeri
7613ddde67 Rename $apt_use_volatile to $apt_volatile_enabled.
This will help merging with Nadir's changes.
2010-10-17 01:18:33 +02:00
root
7ed78d549b Manage a /etc/apt/apt.conf.d/99-puppet file. 2010-10-17 01:18:30 +02:00
intrigeri
7c90a47067 Syntax fix 2010-10-16 22:16:02 +02:00
intrigeri
e50e35e4c8 apt::preseeded_package: concatenate $name.seeds with $debian_version/$name.seeds. 2010-10-16 14:21:36 +02:00
intrigeri
e5c40bc6f0 Trim more empty lines. 2010-10-10 12:38:18 +02:00
intrigeri
1cea889f8c Trim empty lines in template. 2010-10-10 12:35:05 +02:00
intrigeri
b4e24ecc06 Fix functions return values. 2010-10-10 12:05:26 +02:00
intrigeri
7b82df6d0b Fix parent class name. 2010-10-10 11:09:25 +02:00
intrigeri
f0320059a9 Add support for customizing the repos list (main, contrib, etc.)
The templates already made use of it, but the code didn't set a default value.
2010-10-10 11:06:07 +02:00
intrigeri
d50104ce10 Fix functions declaration and filenames. 2010-10-10 11:00:18 +02:00