-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(FACT-2740) Add Gce fact #2035
(FACT-2740) Add Gce fact #2035
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙋🏻♀️
def call_the_resolver | ||
bios_vendor = Facter::Resolvers::Linux::DmiBios.resolve(:bios_vendor) | ||
|
||
fact_value = bios_vendor&.include?('Google') ? Facter::Resolvers::Gce.resolve(:metadata) : nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this reads like it should be a general Unix fact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it is, because Linux is the root facts platform for Debian, Rhel and Sles flavors. This relation is exemplified in lib/facter/os_hierarchy.json. I know it's confusing with the way facts files are structured now, but we'll move all the common ones into the Linux facts folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, what i meant is: this looks like it would work the same for Solaris and FreeBSD, without a change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't add this fact on Solaris and FreeBSD because the virtual fact is not yet implemented on them. So, I'm not sure if it would work as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aye,
see also #2033 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And also I want to add that the DmiBios fact for Linux doesn't work on Solaris.
CLA signed by all contributors. |
f86e31b
to
e67b104
Compare
e67b104
to
bfd0b64
Compare
Added Gce fact for Windows and Linux platforms