Commit graph

297 commits

Author SHA1 Message Date
intrigeri
a18c940b01 Merge remote-tracking branch 'shared/master' into drop_lenny_squeeze_support 2016-07-01 12:28:51 +00:00
Jérôme Charaoui
328a6215a3 Take out comment referencing squeeze, see issue #14 2016-06-30 21:20:51 +02:00
Jérôme Charaoui
e55da5b7b8 Remove backports_url parameter.
For jessie and later releases, backports use debian_url.
2016-06-30 21:19:01 +02:00
Jérôme Charaoui
98b4be5570 Drop Debian lenny and squeeze support. 2016-06-29 21:49:21 +02:00
Jerome Charaoui
1a87e2f7d4 Merge branch 'bugfix/reboot-required-jessie' into 'master'
Bugfix/reboot required jessie

I've mistakenly marked !40 as merged :/

See merge request !46
2016-06-29 19:47:42 +00:00
LeLutin
6277c3ba14 Merge branch 'feature/8-make_dist-upgrade_timeout_configurable' into 'master'
apt::dist_upgrade: add a timeout parameter (#8).



See merge request !45
2016-06-29 19:35:11 +00:00
LeLutin
05c2603e5e Merge branch 'bugfix/drop-obsolete-code-and-global-variable-in-apt-cron' into 'master'
Drop apt::cron::download, and turn $apt_cron_hours into a class parameter for ap…

…t::cron::dist_upgrade.

I've introduced apt::cron::download, am not using it anymore, and have
never seen anyone else submit a bug or a merge request for it. Thus,
I feel pretty confident in dropping it.

And this allows me to trivially get rid of the $apt_cron_hours global
variable noticed by LeLutin in #13.

(I've mistakenly marked !44 as merged)

See merge request !47
2016-06-29 19:32:57 +00:00
Jérôme Charaoui
6c0c1f4a16 Remove redundant symlinks for the Debian apticron template, fixes #2 2016-06-29 20:55:59 +02:00
Jérôme Charaoui
e876cd25b5 Remove redundant symlinks for the Debian listchanges template, fixes #2 2016-06-29 20:55:59 +02:00
intrigeri
13cb9fb485 Move documentation to README, and expand a bit on it. 2016-06-29 18:49:23 +00:00
intrigeri
f035fd1621 Merge remote-tracking branch 'shared/master' into bugfix/drop-obsolete-code-and-global-variable-in-apt-cron 2016-06-29 18:42:02 +00:00
intrigeri
70118955f6 apt::reboot_required_notify: get rid of temporary variable. 2016-06-29 18:02:16 +00:00
intrigeri
89a024678e apt::reboot_required_notify::jessie: explicitly check that $apt::use_backports is true when running Jessie.
Otherwise, it would fail anyway when trying to install reboot-notifier,
but in a way less user-friendly.

Thanks to lavamind for the suggestion!
2016-06-29 17:54:16 +00:00
intrigeri
2ab9739d5a Merge remote-tracking branch 'shared/master' into bugfix/reboot-required-jessie 2016-06-29 17:48:14 +00:00
intrigeri
195ed5d31b apt::dist_upgrade: add a timeout parameter (#8). 2016-06-29 17:39:14 +00:00
intrigeri
5102b7863b Drop apt::cron::download, and turn $apt_cron_hours into a class parameter for apt::cron::dist_upgrade.
I've introduced apt::cron::download, am not using it anymore, and have
never seen anyone else submit a bug or a merge request for it. Thus,
I feel pretty confident in dropping it.

And this allows me to trivially get rid of the $apt_cron_hours global
variable noticed by LeLutin in #13.
2016-06-29 15:59:20 +00:00
Gabriel Filion
2bbfe8cab9 Fix some minor lint issues
This was shown by the testing that was added in merge request !34
2016-06-29 17:31:14 +02:00
intrigeri
a875536532 Merge remote-tracking branch 'lelutin-gitlab/backports_follow_debian_url' into shared-master 2016-06-29 14:53:57 +00:00
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
Gabriel Filion
0752201ce4 push logic behind apt::repos back in apt::params
The logic in specifying the default value for apt::repos is in the wrong
place: it should be in apt::params since this is exactly what this
latter class is for.

There's no special case that can involve making default the value follow
the value of another parameter so there's no point in having that logic
in the main class.
2016-06-27 15:41:19 +02:00
Gabriel Filion
770f8fb5da make backports_url follow debian_url by default
backports_url was already set to the same value than debian_url by
default, but it was set to the default value of debian_url. this meant
that when giving a url to the debian_url parameter to the apt class, the
backports_url would not follow and would still be using the default
value for debian_url.

with this change, when backports_url is not specified, but debian_url
is, then both of them take on the value given to the debian_url. of
course if backports_url is also given a value, then it keeps the value
given by the user.
2016-06-27 15:39:51 +02:00
intrigeri
e70a6712d3 apt::reboot_required_notify::jessie: manage APT pinning to fetch reboot-notifier from jessie-backports, when running on Jessie. 2016-03-16 14:26:52 +00:00
intrigeri
46b2f3d2e8 Merge remote-tracking branch 'shared/master' into bugfix/reboot-required-jessie 2016-03-16 14:23:08 +00: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
3630285006 reboot_required_notify: add initial support for Jessie and newer.
Note that reboot-notifier is only in stretch/sid at the moment,
so to use this one needs to configure APT pinning themselves
to make this package installable.
2015-08-31 20:03:40 +00:00
intrigeri
a82e3ae272 reboot_required_notify::wheezy: add an "ensure" parameter, defaulting to "present". 2015-08-31 19:56:16 +00:00
intrigeri
e2ea89aa7a reboot_required_notify: move all code to a ::wheezy class.
It doesn't work on Jessie and newer (#1).
2015-08-31 19:55:17 +00: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