-
Notifications
You must be signed in to change notification settings - Fork 271
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
Convert ipa and sssd facts to structured facts #618
Conversation
This has decent test coverage but I still want to test this on an actual system. |
001fc39
to
38f2df0
Compare
lib/facter/util/sssd.rb
Outdated
@@ -16,7 +16,7 @@ def self.ipa_value(path) | |||
end | |||
|
|||
def self.sssd_value(path) | |||
aug_value('Sssd.lns', '/etc/sssd/sssd.conf', path) | |||
aug_value('Sssd.lns', '/etc/sssd/sssd.conf', path).split(',').map(&:strip) |
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.
Get an error here when there's no value in sssd.conf, e.g. I don't have target[.="ifp"]/user_attributes
.
Facter: error while resolving custom fact "sssd": undefined method `split' for nil:NilClass
backtrace:
/usr/share/foreman-installer/modules/foreman/lib/facter/util/sssd.rb:19:in `sssd_value'
38f2df0
to
711792a
Compare
Updated to properly handle nil values and be somewhat more generic. |
711792a
to
b0f88ed
Compare
One more update that's tested on an actually subscribed system and fixed one more issue where value was not present. |
Ok, looks good and seems to work for me now |
Inspired by #616 and modern puppet tooling