Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F34627677
overriding a built in facter fact
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
jbond
Sep 1 2021, 11:18 AM
2021-09-01 11:18:31 (UTC+0)
Size
302 B
Referenced Files
None
Subscribers
None
overriding a built in facter fact
View Options
require 'facter'
# copy the networking fact
networking = Facter.fact(:networking).value
# Clear the current fact if we dont do this the built in is always prefered
Facter[:networking].flush
Facter.add(:networking) do
has_weight 100
setcode do
networking['foo'] = 'bar'
networking
end
end
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9171597
Default Alt Text
overriding a built in facter fact (302 B)
Attached To
Mode
P17122 overriding a built in facter fact
Attached
Detach File
Event Timeline
Log In to Comment