unistra / ansible-collection-glpi

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

GLPI application token not provide - when using glpi_username and glpi_password #5

Closed danaelg closed 1 year ago

danaelg commented 1 year ago

Hello,

When we want to use glpi_username and glpi_password instead of glpi_apptoken and glpi_usertoken we get the following error :

[WARNING]:  * Failed to parse /home/vagrant/inventory_glpi.yml with ansible_collections.unistra.glpi.plugins.inventory.inv plugin: GLPI application token not provided

Here is my config file :

---

plugin: unistra.glpi.inv

glpi_url: https://example.org/apirest.php
glpi_verify_certs: false
glpi_username: dgiordana
glpi_password: "obviouslynotmypassword"

queries:
   [...]
danaelg commented 1 year ago

My bad, this is the glpi_usertoken that can be replaced by glpi_usertoken and glpi_password. glpi_apptoken is always required and must be created in GLPI.