Details
Description
This problem is related to: https://projects.theforeman.org/issues/29649
When I run `facter ipa` on an ipa enabled host I get no output:
So when looking at the code:
if File.exist?('/etc/sssd/sssd.conf') && sssd = File.readlines('/etc/sssd/sssd.conf') |
sssd.each do |line| |
case line |
when /^ipa_domain/
|
Facter.add("ipa_domain") do |
has_weight 100 |
setcode do |
line.split("=")[1].strip |
end
|
end
|
when /^ipa_server/
|
Facter.add("ipa_server") do |
has_weight 100 |
setcode do |
line.split("=")[1].strip |
end
|
end
|
when /^auth_provider/
|
Facter.add("ipa_enrolled") do |
|
This code looks OK, but it doesn't find what it's looking for:
root@theforeman ~ # ag '(ipa_domain|ipa_server|auth_provider)' /etc/sssd/sssd.conf |sed -e 's|mycompany.com|example.com|g' |
auth_provider = ipa
|
ipa_domain = example.com
|
ipa_server = _srv_, gandalf.example.com, olorin.example.com, mithrandir.example.com
|
ipa_server_mode = false |
IMHO the regexes should have a space added, ipa_server_mode should not have been matched. But that is beside the point. What's going wrong here?