Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding the os::distro fact #36

Closed
chrisowensboston opened this issue Mar 13, 2017 · 7 comments
Closed

Consider adding the os::distro fact #36

chrisowensboston opened this issue Mar 13, 2017 · 7 comments

Comments

@chrisowensboston
Copy link

Consider adding the os::distro fact. I run into puppet manifests that use codename to select templates, for example.

If you are interested I'll do this and submit a PR

@mcanevet
Copy link
Member

I don't understand this request. It looks like this fact is already present : https://github.com/camptocamp/facterdb/blob/master/facts/3.3/debian-8-x86_64.facts#L209-L220

@chrisowensboston
Copy link
Author

It is present for some OS and not for others. I noticed it missing for CentOS 6 and 7 and Redhat 6 and 7.

When I run Facter on a CentOS 6 machine, I get this:

os => {
  architecture => "x86_64",
  distro => {
    codename => "Final",
    description => "CentOS release 6.8 (Final)",
    id => "CentOS",
    release => {
      full => "6.8",
      major => "6",
      minor => "8"
    },
    specification => ":base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch"
  },
  family => "RedHat",
  hardware => "x86_64",
  name => "CentOS",
  release => {
    full => "6.8",
    major => "6",
    minor => "8"
  },
  selinux => {
    config_mode => "enforcing",
    current_mode => "enforcing",
    enabled => true,
    enforced => true,
    policy_version => "24"
  }
}

@mcanevet
Copy link
Member

Maybe this fact requires lsb-core which is not installed by default on RHEL.

@chrisowensboston
Copy link
Author

chrisowensboston commented Mar 14, 2017 via email

@kenyon
Copy link
Member

kenyon commented May 4, 2019

Yes, the os.distro fact comes from lsb_release, so the package containing that program needs to be installed (redhat-lsb-core on Fedora and derivatives, lsb-release on Debian and derivatives).

@mcanevet
Copy link
Member

mcanevet commented May 4, 2019

I think this project should not supports facts that are not available by default.
I think there are standard facts that could be used instead of os::distro.

@rodjek
Copy link
Member

rodjek commented Jul 15, 2019

I agree with @mcanevet that the facterdb factsets should represent the facts that are available on a system by default, otherwise they're not accurate representations.

@rodjek rodjek closed this as completed Jul 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants