Jira (FACT-2588) ipa_facts : does not extract info from sssd.conf

3 views
Skip to first unread message

Han Boetes (Jira)

unread,
Apr 28, 2020, 3:55:04 PM4/28/20
to puppe...@googlegroups.com
Han Boetes created an issue
 
Facter / Bug FACT-2588
ipa_facts : does not extract info from sssd.conf
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/04/28 12:54 PM
Environment:

                                                                                                                                   

Priority: Normal Normal
Reporter: Han Boetes

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?

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Ben Ford (Jira)

unread,
Apr 28, 2020, 4:11:03 PM4/28/20
to puppe...@googlegroups.com
Ben Ford commented on Bug FACT-2588
 
Re: ipa_facts : does not extract info from sssd.conf

This appears to be a part of the joshuabaird/ipaclient module. Filing or contributing a pull request there will probably be your best bet at getting this fixed.

Good luck!

Reply all
Reply to author
Forward
0 new messages