Skip to content
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

Merged
merged 1 commit into from
Jan 29, 2018

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Jan 19, 2018

Inspired by #616 and modern puppet tooling

@ekohl
Copy link
Member Author

ekohl commented Jan 19, 2018

This has decent test coverage but I still want to test this on an actual system.

@ekohl ekohl mentioned this pull request Jan 26, 2018
@@ -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)
Copy link
Member

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'

@ekohl
Copy link
Member Author

ekohl commented Jan 28, 2018

Updated to properly handle nil values and be somewhat more generic.

@ekohl
Copy link
Member Author

ekohl commented Jan 29, 2018

One more update that's tested on an actually subscribed system and fixed one more issue where value was not present.

@stbenjam
Copy link
Member

Ok, looks good and seems to work for me now

@ekohl ekohl merged commit b0f88ed into theforeman:master Jan 29, 2018
@ekohl ekohl deleted the structured-facts branch January 29, 2018 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants