Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-1743

Environment variable override for structured facts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: CLI
    • Labels:
    • Environment:

      Bash for Windows, Windows 10, Puppet 5.1.0, Facter 3.8.0 (commit 89d6aed5d7847bacb3cc8547b00fefbf9771b202)

    • Template:
    • Team:
      Platform OS
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      I've found that within Docker containers, Facter incorrectly reports the operating system (Debian in an Ubuntu container) from the `os.name` and legacy `operatingsystem` facts.

      In order to combat this, I've been using environment variables such as `FACTER_operatingsystem='Ubuntu' facter operatingsystem` so that Puppet can correctly determine the OS in the manifests.

      However, as far as I'm aware, there is no way to override the structured facts using an environment variable, such as `FACTER_os_name` or `FACTER_osname` - this is an issue as throughout my Puppet manifests I've switched to using the modern, structured facts rather than the legacy ones and as such I cannot override the fact value that is being incorrectly reported.

      Are there any solutions to this I am unaware of or is it a bug?

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            dtw David Wood
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support