Commit graph

432 commits

Author SHA1 Message Date
intrigeri
575e4ab9cc Fix apt::upgrade_package when used multiple times. 2010-12-16 18:14:23 +01:00
intrigeri
bbe2c8aee9 New class: apt::dist_upgrade::initiator.
This implements the "update initiator" pattern suggested by
http://projects.puppetlabs.com/projects/puppet/wiki/Debian_Patterns.

This feature is useful when one does not want to setup a fully automated upgrade
process but still needs a way to manually trigger full upgrades of any number of
systems at scheduled times.
2010-12-16 13:03:08 +01:00
intrigeri
4765a02564 New class: apt::dist_upgrade. 2010-12-16 13:02:28 +01:00
intrigeri
c0377ca737 Apply fix from 67dc9a22 to Squeeze template as well. 2010-12-15 22:20:08 +01:00
intrigeri
2d4f6d3522 Fix 5237f9da. 2010-12-15 22:11:34 +01:00
intrigeri
7ffedbad6b Merge remote branch 'riseup/master' 2010-12-15 22:01:34 +01:00
Micah Anderson
67dc9a2259 fix apticron template 2010-12-15 15:46:20 -05:00
Micah Anderson
5237f9dab0 change $listchanges_* to $apt_listchanges, not nice to clutter up the namespace like that 2010-12-15 14:49:34 -05:00
intrigeri
75cf15b7c7 Fix packages dependency. 2010-12-15 15:18:16 +01:00
intrigeri
a084ac642c Use line define instead of append_if_no_such_line.
The latter is only a wrapper around the former and it seems we want to remove
the latter from our shared common module.
2010-12-15 10:44:14 +01:00
intrigeri
a06bf5f71b apt::upgrade_package: explicitly depend on needed packages.
This define was previously broken unless dctrl-tools and apt-show-versions were
installed.
2010-12-15 10:00:47 +01:00
intrigeri
af8ecf1e9f Repair Exec['update_apt'] to run apt-get update when needed.
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] }
2010-12-15 09:47:57 +01:00
intrigeri
4979889584 (ugly workaround warning) Update packages lists before upgrading a package.
... because Exec[update_apt] is currently never run since we set it refreshonly.
Better solutions are being thought of, but in the meantime the least we can do
is somehow repair apt::upgrade_package.
2010-12-14 22:04:05 +01:00
intrigeri
1ae3fdfeb5 Make consistent the use of absolute path to apt-get. 2010-12-14 21:56:36 +01:00
intrigeri
5846da98ce Factorize. 2010-12-14 21:39:50 +01:00
intrigeri
4625afacae apt::reboot_required_notify: take into account the random sleep time. 2010-12-13 10:08:47 +01:00
intrigeri
4195a91773 Merge remote branch 'riseup/master' 2010-12-13 09:54:37 +01:00
Micah Anderson
f855a5a0ad switch default frontend to 'mail' instead of pager, as most things are done non-interactively 2010-12-12 21:41:21 -05:00
intrigeri
4103a27054 Additionally use version number in Lenny default pinning.
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.
2010-12-12 09:57:42 +01:00
intrigeri
248d7e46ff Bypass default APT proxy to access bugs.debian.org.
This is needed when using apt-listbugs with an APT proxy that only {wants,can}
proxy "normal" APT traffic.
2010-12-11 19:58:19 +01:00
intrigeri
fad111e036 Allow running cron-apt more than once a day. 2010-12-11 15:17:41 +01:00
intrigeri
874da52745 New class: apt::reboot_required_notify
This class installs a daily cronjob that checks if a package upgrade
requires the system to be rebooted; if so, cron sends a notification
email to root.
2010-12-11 14:50:16 +01:00
intrigeri
b467cda7f4 Fix formatting. 2010-12-11 14:46:29 +01:00
intrigeri
1cf642b3a8 Merge remote branch 'riseup/master' 2010-12-11 09:39:27 +01:00
intrigeri
5e94f0707c Update comment: Squeeze's unattended-upgrades 0.62 still does not support wildcards. 2010-12-11 09:30:51 +01:00
Micah Anderson
ab3a5294cf removed bit from README that is no longer true 2010-12-09 09:51:00 -05:00
Micah Anderson
c67abe8d16 fix compile syntax error in ubuntu sources.list, closes #2639 2010-12-09 09:48:38 -05:00
Micah Anderson
9223dfc186 Merge remote branch 'lelutin/master' 2010-12-09 09:44:00 -05:00
Micah Anderson
d61a64b394 fix syntax error 2010-12-08 22:32:00 -05:00
Micah Anderson
d32573ae83 fix template missing <%- end -%> 2010-12-08 22:29:45 -05:00
Micah Anderson
8944374bf2 fix confusion over lsbrelease / lsbdistcodename 2010-12-08 22:27:13 -05:00
Micah Anderson
13bf7d0623 add apt-listchanges support. this is a nice compliment to using the upgrade_package functionality, because you get an email when the package has been upgraded. 2010-12-08 22:25:09 -05:00
Micah Anderson
fbb291ed19 add apticron support.
Why apticron, when we have cron-apt already? Some people have different preferences, we use apticron along with the upgrade_package functionality in this module. I know someone who uses cron-apt to run the upgrades, but apticron for notifications, because apticron's notifications are much nicer (cron-apt just gives you the output of apt-get upgrade)
2010-12-08 22:24:24 -05:00
Micah Anderson
d9ccf2a99b provide an "03clean" alias for the 03clean_vserver to satisfy dependencies 2010-12-08 09:57:02 -05:00
Micah Anderson
72bb7b5ccb fix typo 2010-12-08 00:02:15 -05:00
Micah Anderson
36c4873f87 multiple sources for templates are not allowed (see #1818), so revert it to a single source referenced by the README, and clarify the README to indicate how you can pass the preseed contents directly 2010-12-07 23:57:25 -05:00
Micah Anderson
ee21742cf8 change the name of the custom_keys exec to be "custom_keys" instead of using the alias metaparameter.
the reason for this change was because the Exec override was not able to find the exec through its alias
2010-12-07 23:06:11 -05:00
Micah Anderson
dd0552dce1 update apt::preseeded_package template sources to use $lsbdistcodename instead of $debian_release, also expand it to allow for site-apt sources 2010-12-07 23:04:46 -05:00
Micah Anderson
ef2ebdffd2 switch to archive name for lenny default preferences
the templates/Debian/preferences_lenny.erb file checked in with
e2f80db7b7 contains pinning based on codename,
which is not supported in lenny (see #433624 - if you look at the version graph,
you see, "Fixed in version 0.7.21", and lenny has 0.7.20.2+lenny1.)
2010-12-07 22:59:58 -05:00
Micah Anderson
1c1ed0e352 README update: minor typo fix 2010-12-07 13:53:01 -05:00
Micah Anderson
b59bdb0a89 README update: clarify that the debian-archive-keyring is managed already
Just so people are clear that they do not need to specify a $custom_key_dir to manage the debian archive keyring, I've added some clarifying text so you know that this is not necessary
2010-12-07 13:44:30 -05:00
Micah Anderson
7e1a187f24 README update: clarify the site-apt preferences options
The README described a few things that were not true relating to the
apt/preferences file.

First of all it said you could ship a 'file', but preferences.pp very clearly
uses the 'content => $custom_preferences' parameter, which will not take file
sources, only templates.

Secondly, it seemed to imply that you could just drop the custom preferences
into your site-apt and it would work. But you actually need to set the
$custom_preferences to indicate the content source.

Lastly, it said that you could specify a host-specific file in the site-apt
module, but there is no facility for this (nor can you use files).

Perhaps this is where this module is going eventually, once we have a
preferences.d possibility? Until then, it makes more sense to have it reflect
the current situation.
2010-12-07 13:39:54 -05:00
Micah Anderson
e15283b781 format standardization 2010-12-07 13:18:41 -05:00
Micah Anderson
bb03c32b45 switch the default $debian_url to use the Debian CDN mirror address.
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.
2010-12-07 12:46:37 -05:00
Micah Anderson
2ee70ab5e0 Set dselect DSelect::Clean to 'pre-auto' by default for hosts that are vservers.
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.
2010-12-07 12:20:14 -05:00
Gabriel Filion
52ebb41690 apt_conf: change mode to 644
Current mode (600) makes it impossible to use apt-cache to search for
package names and info, since it tries to read all configuration files
in /etc/apt/apt.conf.d before executing.

Change configuration file mode to 644 so that search tasks can be made
without root priviledge.
2010-11-29 13:37:53 -05:00
Micah Anderson
6596641bb1 minor README fixups 2010-11-24 14:24:49 -05:00
intrigeri
2276147cc0 Bugfix 2010-11-21 21:54:17 +01:00
intrigeri
56340b780e Fix typo and rephrase. 2010-11-21 17:10:20 +01:00
intrigeri
10c7939f65 Merge remote branch 'immerda/master'.
Conflicts:
	README
	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 17:03:57 +01:00