<div dir="ltr">Hello,<div><br></div><div>I have a FreeIPA installation that is working very nicely, we already have configured many hosts and so far we are quite happy with it.</div><div><br></div><div>I was trying to connect Ansible to fetch hosts from FreeIPA using the freeipa.py script (<a href="https://github.com/ansible/ansible/blob/devel/contrib/inventory/freeipa.py">https://github.com/ansible/ansible/blob/devel/contrib/inventory/freeipa.py</a>)</div><div><br></div><div>Unfortunately when I run it, I get the following:</div><div><br></div><div><div><font face="monospace, monospace"><b>ipa: ERROR: cert validation failed for "CN=id1.prod.</b></font><b style="font-family:monospace,monospace">xxxxxxxx</b><font face="monospace, monospace"><b>.com,O=<a href="http://PROD.xxxxxxxx.COM">PROD.xxxxxxxx.COM</a>" ((SEC_ERROR_UNTRUSTED_ISSUER) Peer's certificate issuer has been marked as not trusted by the user.)</b></font></div><div><font face="monospace, monospace"><b>ipa: ERROR: cert validation failed for "CN=id2.prod.</b></font><b style="font-family:monospace,monospace">xxxxxxxx</b><font face="monospace, monospace"><b>.com,O=<a href="http://PROD.xxxxxxxx.COM">PROD.xxxxxxxx.COM</a>" ((SEC_ERROR_UNTRUSTED_ISSUER) Peer's certificate issuer has been marked as not trusted by the user.)</b></font></div><div><font face="monospace, monospace"><b>Traceback (most recent call last):</b></font></div><div><font face="monospace, monospace"><b>  File "./freeipa.py", line 82, in <module></b></font></div><div><font face="monospace, monospace"><b>    api = initialize()</b></font></div><div><font face="monospace, monospace"><b>  File "./freeipa.py", line 17, in initialize</b></font></div><div><font face="monospace, monospace"><b>    api.Backend.rpcclient.connect()</b></font></div><div><font face="monospace, monospace"><b>  File "/usr/lib/python2.7/dist-packages/ipalib/backend.py", line 66, in connect</b></font></div><div><font face="monospace, monospace"><b>    conn = self.create_connection(*args, **kw)</b></font></div><div><font face="monospace, monospace"><b>  File "/usr/lib/python2.7/dist-packages/ipalib/rpc.py", line 939, in create_connection</b></font></div><div><font face="monospace, monospace"><b>    error=', '.join(urls))</b></font></div><div><font face="monospace, monospace"><b>ipalib.errors.NetworkError: cannot connect to 'any of the configured servers': <a href="https://id1.prod">https://id1.prod</a>.</b></font><b style="font-family:monospace,monospace">xxxxxxxx</b><font face="monospace, monospace"><b>.com/ipa/json, <a href="https://id2.prod">https://id2.prod</a>.</b></font><b style="font-family:monospace,monospace">xxxxxxxx</b><font face="monospace, monospace"><b>.com/ipa/json</b></font></div></div><div><br></div><div><br></div><div>If I curl the URL, it works just fine ( I imported the CA Certificate in the system directory /etc/ssl/certs).</div><div><br></div><div>I have run `<font face="monospace, monospace">openssl s_client`</font> connect and downloaded the remote certificate locally, then I run:</div><div><br><div><font face="monospace, monospace"># openssl verify cert.pem </font></div><div><font face="monospace, monospace"># </font><font face="monospace, monospace"><b>id1.prod.</b></font><b style="font-family:monospace,monospace">xxxxxxxx</b><font face="monospace, monospace"><b>.com.pem</b></font><font face="monospace, monospace">: OK</font></div></div><div><br></div><div><br></div><div>Would you help me figure out what's going on?</div><div><br></div><div><br></div><div><div><br></div>-- <br><div class="gmail_signature">Alessandro De Maria<br><a href="mailto:alessandro.demaria@gmail.com" target="_blank">alessandro.demaria@gmail.com</a></div>
</div></div>