Jira (PUP-10985) `puppet facts diff` does not output facts that only exist in Facter 4

17 views
Skip to first unread message

Nick Walker (Jira)

unread,
Mar 25, 2021, 3:09:03 PM3/25/21
to puppe...@googlegroups.com
Nick Walker assigned an issue to Mihai Buzgau
 
Puppet / Task PUP-10985
`puppet facts diff` does not output facts that only exist in Facter 4
Change By: Nick Walker
Assignee: Mihai Buzgau
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Nick Walker (Jira)

unread,
Mar 25, 2021, 3:09:03 PM3/25/21
to puppe...@googlegroups.com
Nick Walker created an issue
Issue Type: Task Task
Assignee: Unassigned
Created: 2021/03/25 12:07 PM
Priority: Normal Normal
Reporter: Nick Walker

The Problem

Given the following facts

Given the following facts:
 
cat /opt/puppetlabs/facter/facts.d/foo.bar.txt
foo.bar=true
cat /opt/puppetlabs/facter/facts.d/c.d.json
{
  "c.d":
  {
    "foo": 4
  }
}
cat /opt/puppetlabs/facter/facts.d/bar.json
{
  "bar":
  {
    "e.f": 5
  }
}
cat /opt/puppetlabs/facter/facts.d/a.b.txt
a.b=3

you'll get output from `puppet facts diff` like this:

[root@master20198-latest-centos ~]# puppet facts diff | python -m json.tool
{
    "a.b": {
        "new_value": null,
        "old_value": "3"
    },
    "c.d.foo": {
        "new_value": null,
        "old_value": 4
    },
    "foo.bar": {
        "new_value": null,
        "old_value": "true"
    },
...
}

which does not show that there are new facts "a", "c" and "foo" in Facter 4.

Suggested Solution

ideally we show these new facts with the new_value set and the old_value as null.

Mihai Buzgau (Jira)

unread,
Mar 30, 2021, 9:47:03 AM3/30/21
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Mar 30, 2021, 9:47:03 AM3/30/21
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Mar 31, 2021, 4:32:02 AM3/31/21
to puppe...@googlegroups.com

Luchian Nemes (Jira)

unread,
Apr 2, 2021, 4:06:03 AM4/2/21
to puppe...@googlegroups.com
Luchian Nemes assigned an issue to Luchian Nemes
Change By: Luchian Nemes
Assignee: Mihai Buzgau Luchian Nemes
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Josh Cooper (Jira)

unread,
Apr 5, 2021, 1:23:04 PM4/5/21
to puppe...@googlegroups.com

Luchian Nemes (Jira)

unread,
Apr 9, 2021, 3:41:03 AM4/9/21
to puppe...@googlegroups.com
Luchian Nemes updated an issue
Change By: Luchian Nemes
Release Notes: Enhancement
Release Notes Summary: The `puppet facts diff` CLI command was improved by showing all differences between Facter 3 and Facter 4 (including facts available only in Facter 4), sorting output results in alphabetical order for better human readability, allowing users to remove certain facts from output (via the `--exclude <regex>` CLI option) and including a CLI option to see results in a fully structured form.

Claire Cadman (Jira)

unread,
Apr 13, 2021, 9:46:04 AM4/13/21
to puppe...@googlegroups.com

Molly Waggett (Jira)

unread,
Apr 14, 2021, 2:55:04 PM4/14/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages