Commit graph

187 commits

Author SHA1 Message Date
mh
0e016e968d migrate away from hiera stuff 2012-06-14 10:07:29 -03:00
mh
ac166366d7 refactor things for >2.7 2012-06-08 12:16:46 -03:00
mh
39917fb4db new style for 2.7 2012-06-05 21:31:15 -03:00
mh
f1a0eca466 Migrate - in class names to _
In newer puppet releases the old way to name class/modules with a -,
won't anymore be supported.
2012-04-15 15:41:58 +02:00
mh
bdc2446671 Merge remote-tracking branch 'shared/master'
Conflicts:
	README
2012-04-15 13:19:45 +02:00
mh
56efade862 use correct references for new concat usage 2012-04-11 11:35:31 +02:00
mh
5173c71715 use the correct name 2012-04-11 11:35:31 +02:00
mh
8996d83489 migrate concatenated_file to the concat module 2012-04-11 11:35:31 +02:00
Gabriel Filion
a835369958 Force an apt-get update when changing an apt::sources_list
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>
2012-04-09 01:39:29 -04:00
Gabriel Filion
4d0ddd0057 Refactor: manage .d directories when using sources_list and apt_conf
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>
2012-04-09 01:38:30 -04:00
mh
7727549c02 use correct references for new concat usage 2011-08-05 11:22:05 +02:00
mh
2b7cfe52f7 use the correct name 2011-08-05 11:12:29 +02:00
mh
e99f7c8672 migrate concatenated_file to the concat module 2011-08-05 10:57:13 +02:00
mh
54932c9c21 fix unattended upgrades
as we use $lsbdistcodename as source we cannot name the sources
which should be used to update "stable". -> Fix it by deploying
a per lsbdistcodename configfile. This can also be used as a pre-
work for the #2681 shared modules bug.
2011-06-05 14:58:22 +02:00
intrigeri
d0f7e98ec5 Revert "apt::custom_sources_template to deploy custom sources.list.d/xyz.list"
This reverts commit 3c0499b78d.
This was already provided by sources_list.pp.
2011-04-25 22:50:53 +02:00
root
5964e90e33 Possibility to delpoy release related config file 2011-04-02 11:16:43 +00:00
root
63c7b5a643 Merge branch 'master' of git://labs.riseup.net/shared-apt 2011-04-02 07:53:38 +00:00
intrigeri
14cd91de33 apt::cron::dist-upgrade: silently keep old version of conffiles.
This makes this class' behaviour consistent with the apt::dist_upgrade one
and prevents stalled upgrades due to dpkg asking questions to a dumb robot.
2011-02-18 22:41:36 +01:00
root
13033f7d81 Merge branch 'master' of git://labs.riseup.net/shared-apt 2011-02-16 13:23:54 +00:00
varac
75f988242a preferences.pp for ubuntu maverick 2011-01-23 23:33:06 +01:00
nadir
3c0499b78d apt::custom_sources_template to deploy custom sources.list.d/xyz.list 2011-01-09 22:57:18 +01:00
intrigeri
d76f922dfb Make sources snippets world-readable.
Not doing this breaks big parts of functionality, such as aptitude why.
2011-01-08 19:39:10 +01:00
Micah Anderson
c5dc8ff5fc add -q to the apt-get invocation in upgrade_package.pp, also switch to using -y instead of --force-yes. this way we are acting in the same way as the dist_upgrade class 2010-12-18 15:47:11 -05:00
Micah Anderson
5fdadb955d switch aptitude to apt-get, since aptitude will sometimes automatically do things that are unrelated to the task at hand, such as deinstalling automatically installed packages, which can be undesirable behavior 2010-12-18 14:01:11 -05:00
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
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
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
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
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
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