You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Facter.add(:rubypath) do
setcode 'which ruby'
end
Facter.add(:rubypath) do
confine osfamily: "Windows"
# Windows uses 'where' instead of 'which'
setcode 'where ruby'
end
to something like
Facter.add(:rubypath) do
setcode 'which ruby'
end
Facter.add(:rubypath) do
confine 'os' do |os_fact|
os_fact['family'] == "Windows"
end
# Windows uses 'where' instead of 'which'
setcode 'where ruby'
end
The text was updated successfully, but these errors were encountered:
One of the examples in https://www.puppet.com/docs/puppet/8/fact_overview.html#writing_facts_simple_resolutions-examples refers to osfamily, a legacy fact. The sample code should be changed from
to something like
The text was updated successfully, but these errors were encountered: