Commit graph

436 commits

Author SHA1 Message Date
bb1176d81d Modified comparison with empty string 2015-10-14 19:15:00 +02:00
Gabriel Filion
99fe7db721 Document the new config_template parameter
Also add an example for how to use the apt::unattended_upgrades class.
2015-10-09 17:22:31 -04: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
3dea5b8df7 Fix debian_codename fact when falling back to parsing /etc/debian_version 2015-10-09 17:12:31 -04:00
Jerome Charaoui
f8980538c1 Improve unattended-upgrades origin selectors
* On squeeze, use release fact instead of hardcoded release name
  * On wheezy, special-case because codename selector is not available
  * On jessie and up, start pulling in point-release updates. The
    codename selector ensures that we won't be upgrading to a new
    release automatically.
2015-10-09 16:39:19 -04:00
Jerome Charaoui
e4d777e5ec Fix merge conflict in README 2015-10-09 12:08:26 -04:00
Gabriel Filion
cc53ce119f Extraneous copy of license file
GPLv3 was already applied 3 years ago to this code base. See LICENSE
file.
2015-10-03 23:44:21 -04:00
intrigeri
cf4726e845 Merge remote-tracking branch 'shared/key' into shared-master (!17) 2015-09-14 22:51:07 +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
intrigeri
1e81ba185e Merge remote-tracking branch 'shared/key' into tmp 2015-08-31 09:51:45 +00:00
Antoine Beaupré
544796e050 document the .gpg extension requirement 2015-08-26 23:29:11 -04:00
Antoine Beaupré
5564b3fba3 fix install location of apt:🔑:plain 2015-08-26 23:27:58 -04:00
Antoine Beaupré
ae0570dee6 fix typo 2015-08-26 23:25:16 -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
Jerome Charaoui
58cfaa32f9 Merge branch 'volatile-backports' into 'master'
allow disabling backports (and volatile in ubuntu)

as the module stands now, there's no way to disable backports.

there are a few reasons why we want to allow this:

* "tools, not policy" - if Debian doesn't ship with backports enabled by default, why should we change that policy?
* too many sources.list entries can cause problems on `apt-get update`, which can run out of memory and require special config
* if the pinning fails, some packages may be updated by mistake
* even if pinning works, some may *want* to keep admins from installing anything from backports as a policy

this keeps backports installed by default (begrudgingly) however. it just allows disabling it.

it also allows disabling volatile in ubuntu, which wasn't possible before.

See merge request !16
2015-06-09 15:49:02 +00:00
Antoine Beaupré
d87876a16f also disable volatile on ubuntu if relevant 2015-06-09 11:35:41 -04:00
Antoine Beaupré
3da1db2707 also control backports on ubuntu 2015-06-09 11:34:51 -04:00
Antoine Beaupré
dbee5c9487 typo 2015-06-09 11:28:54 -04:00
Antoine Beaupré
5ea69cb039 allow possibility of disabling backports 2015-06-09 11:25:34 -04:00
Jerome Charaoui
3a7dd605e3 Fix bug with debian_nextcodename 2015-06-03 16:20:36 -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
Jerome Charaoui
87bfb868d7 Avoid unattended security upgrades from stable if running oldstable 2015-05-11 09:55:26 -04:00
Jerome Charaoui
ae4771b452 Adjusted sources.list template: LTS is now 'oldoldstable' 2015-05-07 18:37:24 -04:00
Jerome Charaoui
95a68805a0 Add upgrade notice about updated functions 2015-05-07 18:35:53 -04:00
Jerome Charaoui
07424069c2 Fix typos in unattended-upgrades template 2015-05-07 12:52:25 -04:00
Matt Taggart
a28c04239c Merge branch 'master' into 'master'
Fix 50unattended-upgrades template for squeeze, better pattern for later release

See merge request !12
2015-05-06 21:47:46 +00:00
Jerome Charaoui
90a51c3ef8 Fix 50unattended-upgrades template for squeeze, better pattern for later release 2015-05-06 17:14:53 -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
varac
9df32aacd6 Merge branch 'master' into 'master'
add $ensure_version parameter, to allow for overriding which version of unattend…

…ed-upgrades is installed

See merge request !11
2015-05-06 20:00:32 +00: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
Micah
d483ddbbf0 Merge branch 'master' into 'master'
Fix error in 50unattended-upgrades.erb syntax, remove lsb fact

See merge request !10
2015-05-06 17:58:37 +00:00
Jerome Charaoui
f1a53bcfa7 Fix error in 50unattended-upgrades.erb syntax, remove lsb fact 2015-05-06 13:40:29 -04:00
Micah Anderson
74db9ebf28 jessie has been released! 2015-05-06 10:41:47 -04:00
LeLutin
5a9e3a456e Merge branch 'master' into 'master'
updates for debian sources

There have been some recent changes in debian resulting in changes to sources

* jessie was released and very soon there will be a jessie-backports, so the backports logic needs to handle that
* the http.debian.net redirector has a new official url

See merge request !8
2015-04-28 22:25:51 +00: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
LeLutin
106413f957 Merge branch 'preferences_utopic_erb' into 'master'
+ preferences_utopic.erb

See merge request !6
2015-04-18 04:55:05 +00:00
LeLutin
8a5835797d Merge branch 'fix_ubuntu_backports_entry' into 'master'
fix duplicate <main> ubuntu backports entry

See merge request !7
2015-04-18 04:45:50 +00:00
Gabriel Filion
25af635994 Document unattended_upgrades class parameters 2015-04-17 16:45:35 -04: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
0389b11261 unattended-upgrades: use an @ prefix for template variables 2015-04-17 16:42:22 -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
varac
dc341e60ad fix duplicate <main> ubuntu backports entry 2015-03-31 11:50:05 +02:00
varac
21ac1a9bf4 + preferences_utopic.erb 2015-03-31 10:36:08 +02:00
Micah
bb12a296a0 Merge branch 'fix-usage-of-module_dir' into 'master'
Fix usage of module_dir

I didn't test enough functionality before merging https://gitlab.com/shared-puppet-modules-group/apt/merge_requests/4 apparently: anything that depends on module_dir is currently broken. Sorry!

See merge request !5
2015-02-28 16:07:45 +00:00