Ask Your Question

Puppet 4 facts hierarchies?

asked 2017-09-07 15:56:02 -0500

deric gravatar image

I have a node with Debian 9 and system Puppet 4.8.2 which has following hierarchy:

operatingsystem: Debian
operatingsystemmajrelease: '9'
operatingsystemrelease: '9.1'
  name: Debian
  family: Debian
    major: '9'
    minor: '1'
    full: '9.1'
    distcodename: stretch
    distid: Debian
    distdescription: Debian GNU/Linux 9.1 (stretch)
    distrelease: '9.1'
    majdistrelease: '9'
    minordistrelease: '1'
osfamily: Debian

but another node with Puppet 4.10.6 (from Puppetlabs apt repo) has this facts hierarchy:

  architecture: amd64
    codename: jessie
    description: Debian GNU/Linux 8.9 (jessie)
    id: Debian
      full: "8.9"
      major: "8"
      minor: "9"
  family: Debian
  hardware: x86_64
  name: Debian
    full: "8.9"
    major: "8"
    minor: "9"

The question is what is the reasoning for introducing new facts hierarchies when EVEN TWO minor Puppet releases for the same OS have different facts hierarchies?

How am I supposed to get variable that used to have name $::lsbdistcodename when on one machine it is $facts['os']['distro']['codename'] and on the other $facts['os']['lsb']['distcodename']? Why even bother with introducing something completely new which makes things much more complicated than before?

edit retag flag offensive close merge delete


I'm already utilizing branches (selectors) to work with multiple facter versions. If at some intermediate step while accessing the “modern” fact a value's `undef`, I fall back to the “legacy” fact. I like the modern facts, though. NB It's difficult to find common structure among OS version numbering

Kai Burghardt gravatar imageKai Burghardt ( 2017-09-07 18:11:24 -0500 )edit

Yeah, I like the new hierarchy too, it would just make much more sense do design facts in a consistent way.

deric gravatar imagederic ( 2017-09-13 08:03:49 -0500 )edit

2 Answers

Sort by » oldest newest most voted

answered 2017-09-15 05:32:18 -0500

deric gravatar image

The main problem turned out to be difference between puppet package in Debian, that depends on facter 2.4.6.

While puppet-agent 4.10.x from puppetlabs ships with facter 3.6.7.

At the time, when I was installing puppet on Debian 9, there was no official package available. Now there's official stretch package available:


(though, it's not really documented yet)

edit flag offensive delete link more

answered 2017-09-08 05:53:03 -0500

fvoges gravatar image

Do you have the LSB tools packages installed? The lsb facts are only available when the necessary tools are present and they are not installed by default in many distros.

edit flag offensive delete link more


I'm installing `lsb-release` in Debian before installing Puppet. Yeah, you're right it's not installed by default. Anyway it doesn't explain absence of `$facts['os']['distro']['codename']`.

deric gravatar imagederic ( 2017-09-13 07:59:05 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-09-07 15:56:02 -0500

Seen: 172 times

Last updated: Sep 15