Skip to content

(#22604) Ohai facts terminus#1911

Closed
dalen wants to merge 1 commit intopuppetlabs:masterfrom
dalen:ohai_facts_terminus
Closed

(#22604) Ohai facts terminus#1911
dalen wants to merge 1 commit intopuppetlabs:masterfrom
dalen:ohai_facts_terminus

Conversation

@dalen
Copy link
Contributor

@dalen dalen commented Sep 18, 2013

Ohai supports a lot of stuff Facter doesn't. This patch adds support for
fetching facts from ohai instead.

Ohai supports a lot of stuff Facter doesn't. This patch adds support for
fetching facts from ohai instead.
@puppetcla
Copy link

CLA signed by all contributors.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this probably belongs in group extra.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can move that. Wasn't entirely sure what all the different groups were for.

@adrienthebo
Copy link
Contributor

In theory, couldn't this and GH-1912 done much more easily with a custom fact?

require 'ohai'

o = Ohai::System.new
o.all_plugins
o.data.each_pair do |k, v|
  Facter.add(k) { setcode { v } }
end

@ahpook
Copy link
Contributor

ahpook commented Sep 19, 2013

I'd like to see this in a module rather than merged into core, and I'd also like to understand what facter should do that it doesn't currently (aside from nested data structures, about which I'm painfully aware).

@dalen
Copy link
Contributor Author

dalen commented Sep 19, 2013

Nested data structures & facts amending each other mainly. Then even if facter does nested data structures all the existing facts still have to be converted to a decent structure (which ohai already has in place).

Inventing our own structure for it seems a little bit like reinventing the wheel tbh and both communities would probably benefit in the long run by sharing this component.

@grimradical
Copy link
Member

While I 1000% sympathize with the motivations here, I agree with @ahpook that this is better introduced in a module at first.

If there are limitations that prevent this from working as a module, though, we should definitely fix those!

@grimradical grimradical closed this Oct 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants