Project

General

Profile

Actions

Bug #25483

closed

Custom boolean facts with false value are not imported

Added by Marek Hulán over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Facts
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1650127

Description of problem:
Custome Boolean Puppet facts with value False are not on the WebUI, Hammer output or with REST API. Only facts with value True are shown/stored.

Version-Release number of selected component (if applicable):
Satellite 6.4
Puppet 5

How reproducible:
Always

Steps to Reproduce:
In /opt/puppetlabs/puppet/cache/lib/facter

  1. cat temp.rb
    require 'facter'

Facter.add("always_true") do
confine :kernel => "Linux"
setcode do
true
end
end

Facter.add("always_false") do
confine :kernel => "Linux"
setcode do
false
end
end

Actual results:
- False value is not displayed
  1. hammer fact list --search "name=always_true"
    ----------------------|-------------|------
    HOST | FACT | VALUE
    ----------------------|-------------|------
    lvmpig03 | always_true | true
    ----------------------|-------------|------
Expected results:
- False value should be displayed
  1. hammer fact list --search "name=always_false"
    ----------------------|-------------|------
    HOST | FACT | VALUE
    ----------------------|-------------|------
    lvmpig03 | always_false | false
    lvmpig03 | always_true | true
    ----------------------|-------------|------

Related issues 2 (0 open2 closed)

Has duplicate Foreman - Bug #25949: Boolean false facts do not show up in the web UIDuplicateActions
Has duplicate Foreman - Bug #23960: Foreman - "fips_enabled" Puppet Fact is not Parsed CorrectlyDuplicateActions
Actions

Also available in: Atom PDF