Commit graph

6 commits

Author SHA1 Message Date
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
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
mh
ac166366d7 refactor things for >2.7 2012-06-08 12:16:46 -03:00
intrigeri
4e6f65b0d5 Add empty line at the end of preferences templates.
... else the first block added by apt::preferences_snippet is in the same
paragraph as the last block provided by the template.
2011-05-07 18:15:02 +02:00
varac
44c6d6aa8f updated Ubuntu preferences to include security + updates 2011-01-29 13:27:03 +01:00
varac
75f988242a preferences.pp for ubuntu maverick 2011-01-23 23:33:06 +01:00