diff options
author | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-05-11 10:49:27 -0400 |
---|---|---|
committer | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-05-11 12:01:35 -0400 |
commit | d007a403330c553d925b1b4888d93962a5f83f99 (patch) | |
tree | 005b4ef8a8fc558a6cb143b3252e8694eada215c /lib/facter/util | |
parent | 87bfb868d7625100086a26a81743f5adbabbb988 (diff) |
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
Diffstat (limited to 'lib/facter/util')
-rw-r--r-- | lib/facter/util/debian.rb | 18 | ||||
-rw-r--r-- | lib/facter/util/ubuntu.rb | 20 |
2 files changed, 38 insertions, 0 deletions
diff --git a/lib/facter/util/debian.rb b/lib/facter/util/debian.rb new file mode 100644 index 0000000..290c17b --- /dev/null +++ b/lib/facter/util/debian.rb @@ -0,0 +1,18 @@ +module Facter + module Util + module Debian + STABLE = 8 + CODENAMES = { + "5" => "lenny", + "6" => "squeeze", + "7" => "wheezy", + "8" => "jessie", + "9" => "stretch", + "10" => "buster", + } + LTS = [ + "squeeze", + ] + end + end +end diff --git a/lib/facter/util/ubuntu.rb b/lib/facter/util/ubuntu.rb new file mode 100644 index 0000000..1b2411a --- /dev/null +++ b/lib/facter/util/ubuntu.rb @@ -0,0 +1,20 @@ +module Facter + module Util + module Ubuntu + CODENAMES = [ + "lucid", + "maverick", + "natty", + "oneiric", + "precise", + "quantal", + "raring", + "saucy", + "trusty", + "utopic", + "vivid", + "wily", + ] + end + end +end |