| 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:
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? |