Commit graph

149 commits

Author SHA1 Message Date
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
92aa5a51e9 Ensure presence of sources.list.d and watch it
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>
2010-10-25 14:15:52 -04:00
Gabriel Filion
aaf3bd6adb Remove $apt_unattended_upgrades
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>
2010-10-25 14:15:52 -04:00
Gabriel Filion
4ebb7d463e Fix apt::preferences::absent
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>
2010-10-25 14:15:12 -04:00
Gabriel Filion
e2578c3b98 Add $main_apt_source
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>
2010-10-25 14:12:18 -04:00
Gabriel Filion
3c88b19dd3 Remove the now unused $apt_clean variable
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>
2010-10-25 11:44:41 -04:00
Gabriel Filion
27d5808299 rename things for easier understanding
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>
2010-10-25 01:44:04 -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
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
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
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
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
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
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
nadir
eae01000c1 re-added apt::custom_sources_template to deploy custom sources.list.d/xyz.list 2010-10-09 14:39:11 +02:00
intrigeri
fab154da39 Allow specifying custom mirrors for every supported archive. 2010-10-06 13:29:38 +02:00
intrigeri
53ca6e2235 Add opt-in support for next Debian release sources. 2010-10-06 12:39:50 +02:00
intrigeri
50136de420 Add opt-in support for deb-src. 2010-10-06 12:09:38 +02:00
intrigeri
de94b807ee Add opt-in support for Debian Volatile. 2010-10-06 12:04:17 +02:00
intrigeri
b312c866d5 Reindent for consistency with previous work. 2010-10-06 11:52:07 +02:00
intrigeri
32e9d9b922 Remove unneeded dependencies. 2010-10-06 11:30:56 +02:00
intrigeri
9139d33562 Initialize $release, $next_release, $codename, $next_codename in init.pp. 2010-10-06 11:17:30 +02:00
mh
521ccfec19 improve decision handling, remove unnecessary exec 2010-09-15 22:31:42 +02:00
Matt Taggart
356ff93340 backports.org has merged with the normal debian archive, the apt source changed and we don't need a separate apt-key for it now 2010-09-08 15:39:33 -07:00
Micah Anderson
cb9e265ad2 clean up the multiple File subscribes 2010-09-02 19:15:47 -04:00
Micah Anderson
92fd1d1351 quote all aliases to be consistent 2010-09-02 19:14:23 -04:00
mh
33f1b53c89 improve exec naming 2010-08-10 16:27:54 +02:00
mh
604cef0cc9 fix relation 2010-08-09 14:37:54 +02:00
mh
6aee66b509 remove unnecessary fileserver variable (#2460) 2010-08-07 02:12:12 +02:00
mh
bcb3ff88cd set loglevel to info so we don't pollute the logs 2010-06-28 21:49:09 +02:00
mh
a41c9ef86b adjust new module dir path 2010-05-09 22:44:40 +02:00
mh
f315dedce6 fix preseeding dir path 2009-11-14 14:35:09 +01:00
mh
64d2c07735 change pending module file resources to new 0.25 style 2009-11-02 01:12:12 +01:00
mh
848dff40a3 fixing requirements 2009-10-30 22:19:07 +01:00
mh
17be8ac184 switch to new lsb way 2009-10-30 22:04:48 +01:00
mh
61142025e7 our module_dir is currently called modules_dir 2009-10-30 21:43:43 +01:00
mh
84f7ca7641 introduce a class to manage unattended-upgrades 2009-10-30 20:35:30 +01:00
mh
87d2fe06d1 refactor to fit pbp
- 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
2009-10-30 18:21:42 +01:00
Micah Anderson
28c7b3d5f4 Merge commit 'sarava/master' 2009-09-03 19:18:34 -04:00
Silvio Rhatto
e68ee80773 Updating to new common module 2009-07-10 15:20:30 -03:00
Silvio Rhatto
91d300b52f Renaming modules_dir to module_dir 2009-07-10 15:03:05 -03:00
Micah Anderson
0a7ffc7d63 puppet wants a backslash escaped 2009-04-13 20:35:51 -04:00
Micah Anderson
430ddcea3f fix missing close bracket typo 2009-04-09 16:31:44 -04:00
Micah Anderson
53e765e5af the custom_keys exec needs to subscribe to an object for the refreshonly to fire 2009-04-09 16:08:55 -04:00
Micah Anderson
991fb6fdcf fix the exec call to be more reasonable shell and to not use a for loop variable
which is pure madness inside of puppet
2009-04-08 15:37:50 -04:00
Micah Anderson
be656a6ac8 Revert "fix the custom_key_dir process so it actually works by replacing the"
This reverts commit 21ef026475.

apt-key does not support glob options
2009-04-08 12:14:38 -04:00
Micah Anderson
21ef026475 fix the custom_key_dir process so it actually works by replacing the
bulky for loop in the exec with a much more simpler process that
works. Also, the recurse over the key dir needed to notify the exec to
trigger it.
2009-03-16 14:35:33 -04:00
Micah Anderson
b8a4b550b0 Merge branch 'master' of gitosis@labs.riseup.net:module_apt 2009-03-04 16:20:33 -05:00
Micah Anderson
42d4f33f41 fix recurse parameter for $custom_key_dir to use the proper value 2009-03-04 16:20:22 -05:00
Pietro Ferrari
b68f73c026 try to use backports.org key for lenny too 2009-03-04 12:34:18 -08:00
Micah Anderson
769bf79ddd update header to include additional copyright info for my modifications 2008-09-29 16:27:18 -04:00
Micah Anderson
9b40b913ed remove duplicate definition for preseeded_package, that was a mistake 2008-09-29 14:43:11 -04:00
Micah Anderson
91a49f53c4 add the upgrade_package define
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":
}
2008-09-29 14:36:28 -04:00
Micah Anderson
377e095431 add the preseeded_package define which simplifies apt preseeding
automatically making sure that the preseeding directories are present
and pulling the seed file from templates/$debian_version/$name.seeds
which enables you to define things such as:

apt::preseeded_package { [ locales, popularity-contest, apt-listchanges, apticron]: }

and the .seed files will be automatically pulled and populated
2008-09-29 13:39:18 -04:00
Micah Anderson
ee506f7586 need to set a null case for the $custom_key_dir variable so that it will fire properly when not set 2008-09-29 12:54:13 -04:00
Micah Anderson
aefa010160 fix another trivial syntax error 2008-09-29 12:29:23 -04:00
Micah Anderson
4995dff49d fix missing comma syntax error 2008-09-29 12:20:43 -04:00
Micah Anderson
1ce283591f add $custom_key_dir which lets you specify a directory where you will
place apt repository keys that should be added to apt-key
2008-09-29 12:12:31 -04:00
Micah Anderson
e4fa745ba0 move the dependency on the latest debian-archive-keyring package
outside of the etch lsbdistcodename selector as this package should be
the latest on every release of debian, not just etch
2008-09-28 18:17:31 -04:00
Micah Anderson
82e7e762b9 abstract the apt preferences so that custom preferences can be set,
while maintaining a sane default preferences set can be set. This is
done in the same manner that the custom/default sources_list are handled
2008-09-28 18:10:28 -04:00
Micah Anderson
e0a6bf1b7a Revert "turn preferences into a simple file"
This reverts commit 0011e70a24.
2008-09-28 18:00:56 -04:00
Micah Anderson
7652955acc Revert "move backports in a seperate class, add the Cache-Limit hack to all configs, try to depend on lsb-release properly"
This reverts commit 3ecbee6a27.
2008-09-28 17:56:39 -04:00
Antoine Beaupre
3ecbee6a27 move backports in a seperate class, add the Cache-Limit hack to all configs, try to depend on lsb-release properly 2008-07-03 18:05:58 -04:00
root
a717e86183 assert_lsbdistcodename for custom sources list too 2008-01-25 16:57:53 -05:00
root
383137e0fb use apt-get instead of dselect and create a dselect class for dselect configuration, making dselect optional 2008-01-25 16:41:26 -05:00
root
0011e70a24 turn preferences into a simple file 2008-01-25 16:36:33 -05:00
root
bb6bdb7701 add $custom_sources_list to override sources.list contents 2007-09-14 10:24:24 +02:00
David Schmitt
5e254ad298 Add README to apt module
additionally use modules_dir and remove legacy file removal
2007-08-16 09:32:09 +02:00
david
8dfbc303a5 another try at fixing the debian-backports-key
git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@161 f03ff2f1-f02d-0410-970d-b9634babeaa1
2007-08-03 15:07:32 +00:00
david
911386327e tighten down deps for backports key
git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@141 f03ff2f1-f02d-0410-970d-b9634babeaa1
2007-08-01 11:25:58 +00:00
david
888a4c1a06 rename all $bas_dir variables
git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@123 f03ff2f1-f02d-0410-970d-b9634babeaa1
2007-07-14 09:42:37 +00:00
david
27aebdb066 general catchup
git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@116 f03ff2f1-f02d-0410-970d-b9634babeaa1
2007-07-12 18:30:40 +00:00
david
82c10cd0d8 add the key package for the backports key
git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@107 f03ff2f1-f02d-0410-970d-b9634babeaa1
2007-07-11 11:59:15 +00:00
david
ebb51cf754 use dselect to update dpkg's available file
git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@102 f03ff2f1-f02d-0410-970d-b9634babeaa1
2007-07-03 10:20:19 +00:00
david
af6e1e6c8b minor workaround for 0.22.4 clients
git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@59 f03ff2f1-f02d-0410-970d-b9634babeaa1
2007-06-25 10:16:59 +00:00
david
f0c91f753a modularised apt
git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@58 f03ff2f1-f02d-0410-970d-b9634babeaa1
2007-06-25 09:50:19 +00:00