unistra / ansible-collection-glpi

Ansible dynamic inventory for GLPI.
GNU General Public License v3.0
9 stars 5 forks source link

Add parameter to force `verify_certs=False` on GLPI() #4

Closed mathieumd closed 2 years ago

mathieumd commented 2 years ago

One of our GLPI is internal only, and we set it up with a self-signed TLS certificate.

It would be nice if you could add a configuration parameter glpi_verify_certs to disable certificate checking.

For now, I modified ansible_collections/unistra/glpi/plugins/inventory/inv.py at line 103 to add , verify_certs=False:

            self.glpi = GLPI(url=str(glpi_url), apptoken=str(glpi_apptoken), auth=str(glpi_auth), verify_certs=False)
fmenabe commented 2 years ago

I added the parameters to disable certificate checking (glpi_verify_certs) and to manage how authentication parameters are passed to the API (glpi_use_headers; cf unistra/python-glpi-api#5).

mathieumd commented 2 years ago

Thank you!!