Commit graph

35 commits

Author SHA1 Message Date
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
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
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
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
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
varac
f16a0727dc Install unattended-upgrades after Exec[refresh_apt]
Before, including apt::unattended_upgrades on a host without
the unattended-upgrades package would fail on the first run,
because the module tries to install the package before apt is
finally configured.
This commit does:

- introduce the option $refresh_apt for apt::apt_conf
  (Defaults to true). Can be used to not trigger Exec['refresh_apt']
- install the unattended-upgrades package after a final
  Exec['refresh_apt']. To not run into a loop, it calls
  Apt_conf['50unattended-upgrades'] with the option
  refresh_apt => false, which is also not needed for the configuration
2013-02-01 15:52:29 +01:00
intrigeri
354283d54e Merge remote-tracking branch 'leap/feature/unattended_upgrades' into review
Conflicts:
	files/lenny/50unattended-upgrades
2013-01-08 14:05:49 +01:00
Micah Anderson
2fe3df225c replace a missed Concat reference change with File['apt_config'] 2013-01-03 14:55:55 -05:00
Gabriel Filion
ded81d8edc Apply code style corrections from puppet-lint
Signed-off-by: Gabriel Filion <lelutin@gmail.com>

+ more linting by intrigeri.

Conflicts:
	manifests/apticron.pp
	manifests/cron/dist_upgrade.pp
	manifests/cron/download.pp
	manifests/dist_upgrade/initiator.pp
	manifests/init.pp
	manifests/listchanges.pp
	manifests/preferences.pp
	manifests/preseeded_package.pp
	manifests/proxy_client.pp
	manifests/unattended_upgrades.pp
	manifests/update.pp
2013-01-02 17:28:59 +01:00
mh
0cb3cd816e Migrate - in class names to _
In newer puppet releases the old way to name class/modules with a -,
won't anymore be supported.

Conflicts:

	manifests/unattended_upgrades.pp
2012-06-08 15:07:48 +02: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
56efade862 use correct references for new concat usage 2012-04-11 11:35:31 +02:00
mh
7727549c02 use correct references for new concat usage 2011-08-05 11:22:05 +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
root
5964e90e33 Possibility to delpoy release related config file 2011-04-02 11:16:43 +00:00
Micah Anderson
e15283b781 format standardization 2010-12-07 13:18:41 -05:00
Gabriel Filion
4ebb7d463e Fix apt::preferences::absent
Currently, setting the $custom_preferences variable to false fails
because of the /etc/apt/preferences concatenated_file being re-defined.

Fix this by setting dependencies on the resource only when we expect to
create the /etc/apt/preferences file. Also, since there is no "ensure"
parameter to concatenated_file, use a simple file resource to ensure
that it is removed.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 14:15:12 -04:00
Gabriel Filion
27d5808299 rename things for easier understanding
remove the use of _snippet in names (except for preferences_snippet) so
that they represent directly a resource name.

rename custom_sources_template to sources_list.

modify sources_list to make it more flexible (gives the opportunity to
provide sources or content). this changes its behaviour in that the name
is now the name of the file in sources.list.d

rename proxy-client to proxy_client to use the same standard for its
name as the other classes.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 01:44:04 -04:00
Gabriel Filion
ac76a5d52d Add apt_conf_snippet and use it where possible
With the new define, it's easy to add an apt.conf snippet in apt.conf.d
It accepts either 'sources' to get a static file or 'content' to define
content inline or with the help of a template.

Put it to use where we create files in apt.conf.d

Finally, fix the dependancy to the apt_config file (however, I don't see
the need for this dependancy)

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-24 09:17:09 -04:00
nadir
851d20a7b6 merged with immerda/master 2010-10-22 19:17:57 +02:00
mh
4d28e6668f introduce preferences snippet
Now, we have the possibility to externally add snippes, so that
we can preferences for packages that are for example only in backports
or unstable.
2010-10-17 13:58:59 +02:00
nadir
9fa9bfd9d8 added possibility to have a custom 50unattended-upgrades 2010-10-09 13:39:39 +02:00
mh
dd36612e50 refer to correct resource 2010-08-14 13:56:31 +02:00
mh
ae4c5a6374 fix typo 2009-10-30 23:15:46 +01:00
mh
211ea52187 don't require anything 2009-10-30 23:07:12 +01:00
mh
0daa30f435 fix another typo 2009-10-30 21:15:21 +01:00
mh
1874479b3b fixing a string issue and tell it to install the package 2009-10-30 20:51:31 +01:00
mh
84f7ca7641 introduce a class to manage unattended-upgrades 2009-10-30 20:35:30 +01:00