Commit graph

211 commits

Author SHA1 Message Date
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
mh
bdc2446671 Merge remote-tracking branch 'shared/master'
Conflicts:
	README
2012-04-15 13:19:45 +02:00
mh
56efade862 use correct references for new concat usage 2012-04-11 11:35:31 +02:00
mh
5173c71715 use the correct name 2012-04-11 11:35:31 +02:00
mh
8996d83489 migrate concatenated_file to the concat module 2012-04-11 11:35:31 +02:00
Gabriel Filion
a835369958 Force an apt-get update when changing an apt::sources_list
sources_list doesn't currently force puppet to run 'apt-get update'
after creating/modifying/removing files in sources.list.d.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2012-04-09 01:39:29 -04:00
Gabriel Filion
4d0ddd0057 Refactor: manage .d directories when using sources_list and apt_conf
The .d directories are only managed by the main 'apt' class. However,
both 'sources_list' and 'apt_conf' defines depend on those directories.
So in practice, the defines have an implicit need for those directories
to be somehow managed.

Let's turn this into an explicit relation, and include the directories
in the defines.

This makes it possible to use both defines without having to include the
main 'apt' class. (maybe when using puppet apply?)

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2012-04-09 01:38:30 -04:00
mh
7727549c02 use correct references for new concat usage 2011-08-05 11:22:05 +02:00
mh
2b7cfe52f7 use the correct name 2011-08-05 11:12:29 +02:00
mh
e99f7c8672 migrate concatenated_file to the concat module 2011-08-05 10:57:13 +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
intrigeri
d0f7e98ec5 Revert "apt::custom_sources_template to deploy custom sources.list.d/xyz.list"
This reverts commit 3c0499b78d.
This was already provided by sources_list.pp.
2011-04-25 22:50:53 +02:00
root
5964e90e33 Possibility to delpoy release related config file 2011-04-02 11:16:43 +00:00
root
63c7b5a643 Merge branch 'master' of git://labs.riseup.net/shared-apt 2011-04-02 07:53:38 +00:00
intrigeri
14cd91de33 apt::cron::dist-upgrade: silently keep old version of conffiles.
This makes this class' behaviour consistent with the apt::dist_upgrade one
and prevents stalled upgrades due to dpkg asking questions to a dumb robot.
2011-02-18 22:41:36 +01:00
root
13033f7d81 Merge branch 'master' of git://labs.riseup.net/shared-apt 2011-02-16 13:23:54 +00:00
varac
75f988242a preferences.pp for ubuntu maverick 2011-01-23 23:33:06 +01:00
nadir
3c0499b78d apt::custom_sources_template to deploy custom sources.list.d/xyz.list 2011-01-09 22:57:18 +01:00
intrigeri
d76f922dfb Make sources snippets world-readable.
Not doing this breaks big parts of functionality, such as aptitude why.
2011-01-08 19:39:10 +01:00
Micah Anderson
c5dc8ff5fc add -q to the apt-get invocation in upgrade_package.pp, also switch to using -y instead of --force-yes. this way we are acting in the same way as the dist_upgrade class 2010-12-18 15:47:11 -05:00
Micah Anderson
5fdadb955d switch aptitude to apt-get, since aptitude will sometimes automatically do things that are unrelated to the task at hand, such as deinstalling automatically installed packages, which can be undesirable behavior 2010-12-18 14:01:11 -05:00
intrigeri
575e4ab9cc Fix apt::upgrade_package when used multiple times. 2010-12-16 18:14:23 +01:00
intrigeri
bbe2c8aee9 New class: apt::dist_upgrade::initiator.
This implements the "update initiator" pattern suggested by
http://projects.puppetlabs.com/projects/puppet/wiki/Debian_Patterns.

This feature is useful when one does not want to setup a fully automated upgrade
process but still needs a way to manually trigger full upgrades of any number of
systems at scheduled times.
2010-12-16 13:03:08 +01:00