Commit graph

233 commits

Author SHA1 Message Date
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
intrigeri
5ec8ffb4ef Move apt class parameters to a ::params class.
This brings no behaviour change yet, but will allow to set class parameters'
default value depending on system facts.
2013-03-20 22:09:29 +01:00
varac
6bf7a6ab5d Revert "deploy /etc/apt/preferences before File['apt_config']"
This reverts commit 7e8113b3fc.

see https://leap.se/code/issues/1990 for the miserious details.
2013-03-15 20:46:29 +01:00
varac
7e8113b3fc deploy /etc/apt/preferences before File['apt_config'] 2013-03-14 22:19:33 +01:00
varac
c8a28eb80e apt keys: always deploy before Exec[refresh_apt], also with $custom_preferences 2013-03-14 20:01:35 +01:00
varac
f0a107ffee fix #4249: Ubuntu: wrong sources.list entries 2013-03-05 09:39:23 +01:00
intrigeri
d51e2af9d4 Don't check for a package priority to be set when removing an APT preferences snippet.
The problem I'm facing is that the sanity checks prevent one from
using a simple:

  apt::preferences_snippet { "bla": ensure => absent }

So, first set a default value for the `priority' parameter, so
that it's not required anymore. Second, add a sanity check to
error out when priority is not set, to get the safe old behaviour.

Then, wrap all sanity checks about arguments within
a "if $ensure == 'present'" block.
2013-02-16 14:58:43 -05: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
14670466be Don't check for source / content to be set when removing an APT source.
Else, the sanity checks prevent one from using a simple
  apt::sources_list { "sid.list": ensure => absent }
2013-01-08 18:13:23 +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
intrigeri
1fe1fe66c3 Fix overzealous linting.
We do want to see \n expanded in this string.
2013-01-03 19:57:44 +01: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
intrigeri
17f67d9fac Simplify codename handling.
Have the codename class parameter default to $::lsbdistcodename, and derive
$release from it.
2013-01-02 16:54:03 +01:00
intrigeri
09710a29b1 Remove duplicated settings, resulting from wrong merge. 2013-01-02 16:40:26 +01:00
intrigeri
517040bb2e Merge remote-tracking branch 'riseup/immerda_27_readme' into shared
Conflicts:
	README
	manifests/cron/dist_upgrade.pp
	manifests/cron/download.pp
	manifests/init.pp
	manifests/preferences.pp
2013-01-02 16:14:06 +01:00
Gabriel Filion
cda713fcf6 Merge branch 'master' into issue_3953 2013-01-02 07:32:12 -05:00
intrigeri
37e5594770 Merge remote-tracking branch 'riseup/feature/http_debian_net' 2012-12-30 13:59:08 +01:00
intrigeri
8e5ce0b397 Merge remote-tracking branch 'riseup/feature/unknown_lsbdistcodename' 2012-12-30 13:58:59 +01:00
nadir
37e40416d2 exec{'apt_dist-upgrade'} just requires Exec['apt_updated'] if apt::disable_update if false 2012-12-19 18:30:29 +01:00
Micah Anderson
7de392c40e On a sid system, $lsbdistcodename is reports 'n/a', this doesn't work because the module
looks for a template based on the $lsbdistcodename, so you get this error:

      Could not find template 'apt/Debian/preferences_n/a.erb'

The slash in 'n/a' appears to be a path (confusing!)

So I've set an error message when 'n/a' is encountered, encouraging the user to set the $lsbdistcodename.

I was not confident in the idea of pointing any occurrence of 'n/a' to the sid
templates, as I could imagine a case where this might occur on a non-sid system
where the lsbdistcodename isn't properly detected
2012-12-18 16:45:38 -05:00
Micah Anderson
e66823269e switch default $debian_url to use http.debian.net which is more accurate and up-to-date than cdn.debian.net 2012-12-18 16:41:10 -05:00
nadir
3a473dafd5 comparing variabled should use double quotes (interestingly, it does work with only one too) 2012-12-18 22:31:00 +01:00
nadir
4204847fdd added $apt_disable_update to disable "apt-get update" during puppetruns 2012-12-18 22:26:45 +01:00
Micah Anderson
07a031f205 fix for $lsbdistcodename regression introduced by ac166366d7
What happened here was the $codename = $::lsbdistcodename was removed from
init.pp and replaced with just $::lsbdistcodename whereever $codename was
used. Then in the sources.list.erb and preferences files things were changed
like this:

<pre>+### Debian current: <%= codename = scope.lookupvar('::lsbdistcodename') %>
...
-deb <%= debian_url %> <%= codename %> <%= repos %>
...
+deb <%= debian_url=scope.lookupvar('apt::debian_url') %> <%= codename %> <%= repos=scope.lookupvar('apt::repos') %>
</pre>

This meant that the codename was always set to lsbdistcodename, and you because
in newer puppet versions you cannot assign a value to a top-level facter
variable, it is not possible to change this.

Because we cannot change $lsbdistcodename, we have to fix this by allowing the
user to pass a different, non-top-level scoped variable to the class as a
parameter, which defaults to $::lsbdistcodename, so that upgrades can be
triggered.

This is documented in the README in an upgrade notice
2012-12-05 13:46:23 -05:00
Gabriel Filion
9d7b48e37c Define an alias when enforcing absence of /etc/apt/preferences
This ensures that resources that set a dependecy on the
"File['apt_config']" file, as mentioned in the README, can always
resolve.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2012-09-20 04:00:38 -04:00
Gabriel Filion
8229505ecb Make apt::preferences_snippet place files in /etc/apt/preferences.d
Since Debian Squeeze, apt supports a .d directory for preferences
(pinning). Simplify management by just placing files inside this .d
directory.

This removes the need for concat and concat::fragment resources, so
removes the dependency on the concat module. It also removes the need
for a moduledir that was needed for the concat module magic, so we also
get rid of the dependency on the common module.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2012-09-20 03:55:58 -04:00
Gabriel Filion
978378623d Stop using config_file from the common module
This define doesn't add much of a shortcut and imposes a dependency on
the "common" module. We'll be better off with the small repetition but
less tightly coupled modules.

Sadly, the "common" module is still required, but that is going to be
the focus of the commit that follows this one.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2012-09-20 02:54:26 -04:00
Micah Anderson
b528cd0005 parameterize the apt::proxy_client class 2012-08-22 10:55:25 -04:00
mh
0c2f31b5d5 Merge remote-tracking branch 'shared/master'
Conflicts:
	README
	manifests/dist_upgrade/initiator.pp
	manifests/init.pp
	manifests/preseeded_package.pp
	manifests/unattended_upgrades.pp
2012-08-16 09:35:21 +02:00
intrigeri
02bd326994 Make apt::preferences_snippet support Puppet < 2.7 again, when the 'package' parameter is not set.
Details:
  https://labs.riseup.net/code/issues/3467
  https://labs.riseup.net/code/issues/3468
2012-06-18 22:57:13 +02:00
mh
5d75c10a4d fix relations and finally get rid off config_file 2012-06-18 17:10:40 -03:00
mh
d47addd2ed get rid off config_file wrapper 2012-06-18 11:41:04 -03:00
mh
0e016e968d migrate away from hiera stuff 2012-06-14 10:07:29 -03:00
intrigeri
2e4d22ddd9 Allow passing arbitrary Pin value to apt::preferences_snippet.
Closes: Redmine#3467.
2012-06-08 18:30:23 +02:00
intrigeri
13a0b4484f Support multiple APT preferences snippets for the same package name pattern.
This is implemented by adding a "package" parameter to apt::preferences_snippet,
so that define names can be kept unique while the package names are
not necessarily.

Closes: Redmine#3468.
2012-06-08 18:18:50 +02:00
mh
ac166366d7 refactor things for >2.7 2012-06-08 12:16:46 -03: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