Jira (FACT-2387) Test Facter 3.x with custom facts that contain dots in name

24 views
Skip to first unread message

Bogdan Irimie (JIRA)

unread,
Feb 19, 2020, 6:16:04 AM2/19/20
to puppe...@googlegroups.com
Bogdan Irimie created an issue
 
Facter / Task FACT-2387
Test Facter 3.x with custom facts that contain dots in name
Issue Type: Task Task
Assignee: Unassigned
Created: 2020/02/19 3:15 AM
Priority: Normal Normal
Reporter: Bogdan Irimie
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Bogdan Irimie (JIRA)

unread,
Feb 21, 2020, 6:02:04 AM2/21/20
to puppe...@googlegroups.com

Bogdan Irimie (JIRA)

unread,
Feb 21, 2020, 6:08:04 AM2/21/20
to puppe...@googlegroups.com
Bogdan Irimie commented on Task FACT-2387
 
Re: Test Facter 3.x with custom facts that contain dots in name

If we write a custom fact with dots in names, we must use a string in Facter.add

Facter.add('my.custom.fact') do
  has_weight(10_000)
  setcode do
     'my_custom_fact'
  end
end

The result is

my.custom.fact => my_custom_fact

All examples in docs are with symbols as custom fact names (https://puppet.com/docs/facter/3.9/custom_facts.html)

Reply all
Reply to author
Forward
0 new messages