# Foreman inventory certificate verify failed

**URL:** <https://forum.ansible.com/t/foreman-inventory-certificate-verify-failed/36190>\
**Category:** AWX Project\
**Tags:** awx, ee\
**Created:** [January 11, 2022, 3:29pm UTC](https://forum.ansible.com/t/foreman-inventory-certificate-verify-failed/36190 "2022-01-11T15:29:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rob\_B](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rob_b/32/4803_2.png) [@Rob\_B](https://forum.ansible.com/u/Rob_B)\
**Post date:** [January 11, 2022, 3:29pm UTC](https://forum.ansible.com/t/foreman-inventory-certificate-verify-failed/36190/1 "2022-01-11T15:29:41Z")

</div>

Hi,

I’m trying out AWX 19.5.0 with a view to migrate from 17.1.0 but i’ve hit an issue syncing our Foreman as an inventory source.

With v17.1.0, the inventory sync shows a warning about unverified HTTPS request but is able to continue to sync.  
v19.5.0 though shows a certificate warning but fails (sync job output below).

_ansible-inventory [core 2.11.7.post0]_  
_config file = None_  
_configured module search path = [‘/home/runner/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]_  
_ansible python module location = /usr/local/lib/python3.8/site-packages/ansible_  
_ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections:/usr/share/automation-controller/collections_  
_executable location = /usr/local/bin/ansible-inventory_  
_python version = 3.8.8 (default, Aug 25 2021, 16:13:02) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]_  
_jinja version = 2.10.3_  
_libyaml = True_  
_No config file found; using defaults_  
_[WARNING]: \* Failed to parse /runner/inventory/foreman.yml with auto plugin:_  
_HTTPSConnectionPool(host=‘[ukwdr-foreman1.iongroup.net](http://ukwdr-foreman1.iongroup.net)’, port=443): Max retries_  
_exceeded with url: /api/v2/status?page=1&per\_page=250 (Caused by_  
_SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE\_VERIFY\_FAILED]_  
_certificate verify failed: self signed certificate in certificate chain_  
_(\_ssl.c:1125)')))_  
_File “/usr/local/lib/python3.8/site-packages/ansible/inventory/manager.py”, line 290, in parse\_source_  
_plugin.parse(self.\_inventory, self.\_loader, source, cache=cache)_  
_File “/usr/local/lib/python3.8/site-packages/ansible/plugins/inventory/auto.py”, line 58, in parse_  
_plugin.parse(inventory, loader, path, cache=cache)_  
_File “/usr/share/ansible/collections/ansible\_collections/theforeman/foreman/plugins/inventory/foreman.py”, line 650, in parse_  
_self.\_populate()_  
_File “/usr/share/ansible/collections/ansible\_collections/theforeman/foreman/plugins/inventory/foreman.py”, line 403, in \_populate_  
_if self.\_use\_inventory\_report():_  
_File “/usr/share/ansible/collections/ansible\_collections/theforeman/foreman/plugins/inventory/foreman.py”, line 366, in \_use\_inventory\_report_  
_result = self.\_get\_json(status\_url)_  
_File “/usr/share/ansible/collections/ansible\_collections/theforeman/foreman/plugins/inventory/foreman.py”, line 243, in \_get\_json_  
_ret = s.get(url, params=params, verify=self.get\_option(‘validate\_certs’))_  
_File “/usr/lib/python3.8/site-packages/requests/sessions.py”, line 546, in get_  
_return self.request(‘GET’, url, \*\*kwargs)_  
_File “/usr/lib/python3.8/site-packages/requests/sessions.py”, line 533, in request_  
_resp = self.send(prep, \*\*send\_kwargs)_  
_File “/usr/lib/python3.8/site-packages/requests/sessions.py”, line 668, in send_  
_history = [resp for resp in gen] if allow\_redirects else []_  
_File “/usr/lib/python3.8/site-packages/requests/sessions.py”, line 668, in_   
_history = [resp for resp in gen] if allow\_redirects else []_  
_File “/usr/lib/python3.8/site-packages/requests/sessions.py”, line 239, in resolve\_redirects_  
_resp = self.send(_  
_File “/usr/lib/python3.8/site-packages/requests/sessions.py”, line 646, in send_  
_r = adapter.send(request, \*\*kwargs)_  
_File “/usr/lib/python3.8/site-packages/requests/adapters.py”, line 514, in send_  
_raise SSLError(e, request=request)_  
_[WARNING]: Unable to parse /runner/inventory/foreman.yml as an inventory source_  
_ERROR! No inventory was parsed, please check your configuration and options._

How can I set ‘validate\_certs: False’, or better still, include the correct certs?

As a test I have logged on to the ‘ee’ container, created a foreman.yml config file including ‘validate\_certs: False’ and was able to run ansible-inventory successfully.  
But its not obvious how I can set this to work via the AWX GUI?

Let me know if you need any more info and thanks in advance for any help.

Rob

---

<div class="post-metadata">

**Author:** ![Rob\_B](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rob_b/32/4803_2.png) [@Rob\_B](https://forum.ansible.com/u/Rob_B)\
**Post date:** [January 14, 2022, 4:46pm UTC](https://forum.ansible.com/t/foreman-inventory-certificate-verify-failed/36190/2 "2022-01-14T16:46:50Z")

</div>

In case anyone else gets stuck with this - using the ‘AWX EE 0.5.0’ Execution Environment for the inventory source allows the sync to complete with the ssl warnings.  
I’ll try building a custom EE including the required certs.

---

<div class="post-metadata">

**Author:** ![Seth\_Foster](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@Seth\_Foster](https://forum.ansible.com/u/Seth_Foster)\
**Post date:** [January 19, 2022, 8:59pm UTC](https://forum.ansible.com/t/foreman-inventory-certificate-verify-failed/36190/3 "2022-01-19T20:59:00Z")

</div>

Hi,

This appears to not be supported yet through the UI – please open an AWX feature issue describing this particular issue. Thanks!

Seth

---

<div class="post-metadata">

**Author:** ![kdelee](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kdelee/32/193_2.png) [@kdelee](https://forum.ansible.com/u/kdelee)\
**Post date:** [January 21, 2022, 6:05pm UTC](https://forum.ansible.com/t/foreman-inventory-certificate-verify-failed/36190/4 "2022-01-21T18:05:32Z")

</div>

Looks like you can set `validate_certs: False` in the source vars of the inventory source itself  
[https://docs.ansible.com/ansible-tower/latest/html/installandreference/inventory\_plugins\_templates.html#red-hat-satellite-6](https://docs.ansible.com/ansible-tower/latest/html/installandreference/inventory_plugins_templates.html#red-hat-satellite-6)
