Commit graph

272 commits

Author SHA1 Message Date
Jérôme Charaoui
53c49fe2ae Merge branch 'merge_debian_preferences_templates'
Conflicts:
	manifests/preferences.pp
	templates/Debian/preferences_jessie.erb
	templates/Debian/preferences_squeeze.erb
	templates/Debian/preferences_wheezy.erb
2016-06-29 16:35:17 +02:00
varac
7714aa0436 Remove loglevel directive from Exec[update_apt]
When using puppet apply (v 3.7), loglevel 'info'
won't show the output on error. This is bad for
debugging.
2016-02-25 19:59:58 +01:00
Gabriel Filion
c4a0aff2af Manage unattended-upgrades log directory
In some situations, the log directory for unattended-upgrades might not
exist. In those cases, packages will not get upgraded!

unattended-upgrades crashes with a python backtrace because the log dir
is not present.
2016-02-02 17:07:21 -05:00
varac
207218cee8 [refactor] Get rid of the disable_update parameter
The `disable_update` parameter has been removed. The main apt class
defaults to *not* run an `apt-get update` on every run anyway so
this parameter seems useless.
You can include the `apt::update` class if you want it to be
run every time.
2016-02-01 20:42:37 +01:00
varac
d2ae98e89b [feat] Remove apt-get autoclean from apt::update
`apt-get autoclean` should not be run on every puppetrun when
including `apt::update`, but rather be configured as a `APT::Periodic`
task that is run by cron, see
https://wiki.debian.org/UnattendedUpgrades.
2016-02-01 20:25:50 +01:00
varac
f12b007edd [refactor] Unify apt-get update into one resource
Before, there were two Execs that did an `apt-get update`,
`Exec[refresh_apt]` and `Exec[apt_updated]`, which were triggered
by different resources.
This changes gets rid of the first one, and all resources now depend
on `Exec[apt_updated]`.
2016-02-01 20:25:46 +01:00
varac
fa1751c4de [bug] Deploy preferene snippets before apt_refresh
When pinning packages with apt::preferences_snippet,
we need to make sure these get deployed before an
`apt-get update` is triggered, so pinned packages can
get installed in the right way with a single puppetrun.
2016-01-05 20:04:10 +01:00
varac
d67dfe4beb [feat] Don't run an additional apt-get update
When adding custom keys, an additional `apt-get update` would
be run before the Exec['refresh_apt'], which don't make sense.
2015-12-13 17:56:17 +01:00
Gabriel Filion
2942cd0dd8 remove requirement on lsb package for sources.list file
Managing requirements for installing the lsb package has proven over
time to make no sense. The best approach to this is to require
lsb-release to be installed alongside puppet, since otherwise there are
so much facts that get no value during the run and you end up needing to
run puppet twice to get the real end result.

Also, since we're not including a class that is actually installing the
'lsb' package, that require line makes it so that including the apt
module doesn't work, and there's no documentation in the README about
needing to provide a package{'lsb':} resource with the apt class.

Because of all that, it makes more sense to just get rid of that require
line and mark lsb as a pre-requirement in the README file.
2015-12-04 14:35:27 -05:00
Jerome Charaoui
4d3b720308 Simplify conditional expressions 2015-12-04 12:36:25 -05:00
Jerome Charaoui
f492e5840b Switch old $release and $codename local variables to new debian_* facts 2015-12-04 12:36:25 -05:00
Antoine Beaupré
e4a9222d86 move backports to snippets
this allows for third party modules to enable this on the fly
2015-12-04 12:36:25 -05:00
Gabriel Filion
bfa973a668 Use $ubuntu_url as default value of $backports_url on Ubuntu
Ubuntu shouldn't be using debian backports by default.

This was written by Anoine Beaupré, but split from the commit "move
backports to snippets" since the change is unrelated and needs to be
more visible in the commit history.
2015-12-04 12:36:25 -05:00
Gabriel Filion
e714859a10 Make it possible to specify own template.
Micah found an issue with usage of config_content: if you call template('...')
yourself and pass that on to config_content, then your template gets evaluated
without all of the variables. This means that you don't hava access to
blacklisted_packages, mail_recipient or mailonlyonerror.

To make it possible to use a different template while still having access to
those variables, let's make it possible to change the template name that we're
using.
2015-10-09 17:22:31 -04:00
Jerome Charaoui
e4d777e5ec Fix merge conflict in README 2015-10-09 12:08:26 -04:00
Jerome Charaoui
48bf4a390e Merge Debian squeeze, wheezy, jessie and sid preferences templates into one 2015-10-07 10:36:12 -04:00
intrigeri
5f7232b420 Add validation for apt::key's name.
It's great to document requirements in README, but error'ing out whenever
the user messes up is even better IMO.
2015-08-31 10:01:03 +00:00
intrigeri
8745de17d6 Quote apt-key variable parameter.
This is not perfect protection against special chars that the shell may
interpret, but should help at least in case $name contains spaces.
2015-08-31 09:55:17 +00:00
intrigeri
dc1a19e6cb Linting. 2015-08-31 09:54:28 +00:00
Antoine Beaupré
5564b3fba3 fix install location of apt:🔑:plain 2015-08-26 23:27:58 -04:00
Antoine Beaupré
931076f854 fix typo 2015-06-11 10:32:40 -04:00
Antoine Beaupré
891aa0fbbe allow for binary keys that can be removed 2015-06-11 10:26:10 -04:00
Antoine Beaupré
33acc00e5c add apt::key resource to deploy arbitrary keys
the rationale of this is that isn't useful for third party modules,
because they cannot inject keys in there without some serious apt
class hijacking
2015-06-11 10:07:49 -04:00
Antoine Beaupré
5ea69cb039 allow possibility of disabling backports 2015-06-09 11:25:34 -04:00
Jerome Charaoui
d007a40333 Replace debian_*() parser functions with facts
* Removes dependency on lsb-release and/or Facter >1.7
    (values are based on $::lsbdistcodename, when available)
* Simplifies maintenance: only lib/facter/util/* require updates as new
  releases are made

Caveats:
* apt::codename is removed; to override debian_* facts, set the
  FACTER_debian_codename environment variable for puppet
* If tracking unstable, make sure lsb-release is installed, as other
  methods can't tell between testing and unstable
2015-05-11 12:01:35 -04:00
varac
a4d788d778 don't call Exec[refresh_apt] after deploying unattended-upgrades config
unattended-upgrades is run on a daily base by cron, no need to force
an `apt-get update` after changing this file.
2015-05-06 22:15:14 +02:00
Micah Anderson
a7cc68ed99 add $ensure_version parameter, to allow for overriding which version of unattended-upgrades is installed 2015-05-06 15:52:07 -04:00
Matt Taggart
3dac57374f the http redirector has a new official home 2015-04-28 11:59:46 -07:00
Matt Taggart
5532df22f1 invert the backports logic because squeeze and older were the exception and wheezy and newer the default 2015-04-28 11:57:23 -07:00
Gabriel Filion
6f6e725e60 Add parameter for blacklisting a list of packages.
This functionality was lost because we stopped using a source file for
the 50unattended-upgrades file that would previously let one override
the configuration per release or per host.
2015-04-17 16:43:26 -04:00
Gabriel Filion
d24ca3314f Parametrize unattended-upgrades mail recipient 2015-04-17 15:50:36 -04:00
Gabriel Filion
9192785c45 make it possible to opt out of MailOnlyOnError
This combines all files into one template. It should make maintenance
easier.
2015-04-17 15:50:36 -04:00
intrigeri
3bd6f73973 Add missing "include common::moduledir".
Without this, $common::moduledir::module_dir_path is empty.
2015-02-28 13:01:14 +00:00
Jerome Charaoui
8ed07cac2f Merge branch 'master' of git://git.puppet.immerda.ch/module-apt
Conflicts:
	templates/Debian/sources.list.erb
2015-02-20 16:15:02 -05:00
intrigeri
7c55bee06a Merge remote-tracking branch 'shared/master' into feature/squeeze-lts 2015-02-07 16:25:05 +00:00
intrigeri
85c7554c4b Add support for Squeeze LTS. 2015-02-07 16:12:55 +00:00
Gabriel Filion
7c68c19973 make it optional to end sources in ".list" 2014-12-06 00:52:59 -05:00
mh
9d56396a04 use the new style common module 2014-01-08 21:28:42 +01:00
mh
4bd4dd2542 use stdlib instead of the common module 2014-01-08 21:27:05 +01:00
intrigeri
f286b0ed86 Remove Lenny-related comment that was made obsolete a year ago by commit 822950. 2013-12-08 21:58:38 +00:00
Gabriel Filion
c99227ad55 Make custom_sources_list into a class paramter
and thus remove the last global variable.
2013-07-27 06:14:47 -04:00
Micah Anderson
1a72a99693 remove unnecessary override and accidentally merge issue 2013-06-27 11:58:39 -04:00
Micah Anderson
8f58a40ad8 Merge branch 'bug/fix_push' into leap
This gets us fixes for the unattended_upgrades in wheezy, as well as the custom_key_dir class parameter replacement of the global variable
Conflicts:
	manifests/unattended_upgrades.pp
2013-06-25 16:57:07 -04:00
varac
07266be255 fix unattended-upgrades dependency cycle 2013-06-25 15:55:22 -04:00
varac
9a3068016f using distribution sprecific files again 2013-06-25 15:54:31 -04:00
Silvio Rhatto
50b4bef761 Make custom_key_dir a class parameter and not a global variable
Conflicts:
	manifests/init.pp
2013-06-25 15:35:11 -04:00
Micah Anderson
f11e3d4753 remove unnecessary before dependency on the /etc/apt/preferences file in unattended_upgrades.pp 2013-06-25 11:31:22 -04:00
Micah Anderson
88bfe5fbab fix for the following: warning: Dynamic lookup of $custom_preferences at modules/apt/manifests/preferences_snippet.pp:16 is deprecated. For more information, see http://docs.puppetlabs.com/guides/scope_and_puppet.html. To see the change in behavior, use the --debug flag. 2013-06-20 15:32:51 -04:00
Micah Anderson
61a2f48948 Merge branch 'master' into leap 2013-05-26 17:04:05 -04:00
intrigeri
46c58b07bf Use the main Debian archive's URL as the default URL for backports on Wheezy.
The backports are now fully integrated with the main archive.

See:
https://labs.riseup.net/code/issues/4270
https://lists.debian.org/debian-devel-announce/2013/03/msg00007.html
2013-03-20 22:11:46 +01:00