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

Inconsistent values coming from facter-ng output

    XMLWordPrintable

Details

    • Night's Watch
    • 2
    • NW - 2021-10-20
    • Needs Assessment
    • 46021
    • 1
    • Bug Fix
    • Fix facter 4 output for yaml external facts when the fact value is false
    • Needs Assessment

    Description

      Facter & Facter-ng version:

      [root@pepm facts.d]# /opt/puppetlabs/puppet/bin/facter --version
      3.14.18 (commit 92e6f64d36589c8a537d4a4d5c574c872c3aa329) 

      [root@pepm facts.d]# /opt/puppetlabs/puppet/bin/facter-ng --version
      4.2.1 

       

      The output of the Puppet command shows the inconsistent value and the result for the boolean value `false` showing as empty string.

      Below are the steps to reproduce and the output:

       1) Created an external fact:

      [root@pepm facts.d]# cat /etc/facter/facts.d/build_information.yaml
      ---
      key1: true
      key2: false 

       2) Output of the Puppet command shows the empty result boolean value `false`

      [root@pepm facts.d]# puppet facts show --facterng key1 key2
      2021-10-05 05:45:07.491417 WARN  puppetlabs.facter - locale environment variables were bad; continuing with LANG=C LC_ALL=C
      {
        "key1": true,
        "key2": ""
      }
       
      [root@pepm facts.d]# puppet facts show key1 key2
      2021-10-05 05:45:24.325235 WARN  puppetlabs.facter - locale environment variables were bad; continuing with LANG=C LC_ALL=C
      {
        "key1": true,
        "key2": false
      }

       

      Attachments

        Issue Links

          Activity

            People

              victor.bobosila Victor Bobosila
              selvakumar.subburaj Selvakumar Azhagarsami
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support