Hello, i have an issue when i try to synch GLPI API with AWX , using inventory Script.
error from the source : synchronization failed
Can someone help me please ? THANKS
RuntimeError: ansible-inventory failed (rc=1) with stdout:
30
stderr:
31
ansible-inventory 2.9.3
32
config file = /etc/ansible/ansible.cfg
33
configured module search path = [‘/var/lib/awx/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
34
ansible python module location = /usr/lib/python3.6/site-packages/ansible
35
executable location = /usr/bin/ansible-inventory
36
python version = 3.6.8 (default, Nov 21 2019, 19:31:34) [GCC 8.3.1 20190507 (Red Hat 8.3.1-4)]
37
Using /etc/ansible/ansible.cfg as config file
38
setting up inventory plugins
39
host_list declined parsing /tmp/awx_597_mkurx6t1/tmpjcrdkdhj as it did not pass its verify_file() method
40
auto declined parsing /tmp/awx_597_mkurx6t1/tmpjcrdkdhj as it did not pass its verify_file() method
41
toml declined parsing /tmp/awx_597_mkurx6t1/tmpjcrdkdhj as it did not pass its verify_file() method
42
[WARNING]: * Failed to parse /tmp/awx_597_mkurx6t1/tmpjcrdkdhj with script
43
plugin: Inventory script (/tmp/awx_597_mkurx6t1/tmpjcrdkdhj) had an execution
44
error: usage: tmpjcrdkdhj [-h] [–glpi-url GLPI_URL]
45
[–glpi-usertoken GLPI_USERTOKEN] [–glpi-apptoken
46
GLPI_APPTOKEN] [–config-file GROUPS_CONFIG_PATH] (–list |
47
–host HOST) tmpjcrdkdhj: error: the following arguments are required: --glpi-
48
url, --glpi-usertoken, --glpi-apptoken
49
50
File “/usr/lib/python3.6/site-packages/ansible/inventory/manager.py”, line 280, in parse_source
51
plugin.parse(self._inventory, self._loader, source, cache=cache)
52
File “/usr/lib/python3.6/site-packages/ansible/plugins/inventory/script.py”, line 161, in parse
53
raise AnsibleParserError(to_native(e))
54
55
[WARNING]: * Failed to parse /tmp/awx_597_mkurx6t1/tmpjcrdkdhj with yaml
56
plugin: Syntax Error while loading YAML. did not find expected <document
57
The error appears to be in ‘/tmp/awx_597_mkurx6t1/tmpjcrdkdhj’: line 4,
58
column 3, but may be elsewhere in the file depending on the exact syntax
59
problem. The offending line appears to be: “”"Ansible dynamic inventory for
60
GLPI REST API.“”" ^ here
61
62
File “/usr/lib/python3.6/site-packages/ansible/inventory/manager.py”, line 280, in parse_source
63
plugin.parse(self._inventory, self._loader, source, cache=cache)
64
File “/usr/lib/python3.6/site-packages/ansible/plugins/inventory/yaml.py”, line 105, in parse
65
raise AnsibleParserError(e)
66
67
[WARNING]: * Failed to parse /tmp/awx_597_mkurx6t1/tmpjcrdkdhj with ini
68
plugin: /tmp/awx_597_mkurx6t1/tmpjcrdkdhj:6: Expected key=value host variable
69
assignment, got: os
70
71
File “/usr/lib/python3.6/site-packages/ansible/inventory/manager.py”, line 280, in parse_source
72
plugin.parse(self._inventory, self._loader, source, cache=cache)
73
File “/usr/lib/python3.6/site-packages/ansible/plugins/inventory/ini.py”, line 138, in parse
74
raise AnsibleParserError(e)
75
76
[WARNING]: Unable to parse /tmp/awx_597_mkurx6t1/tmpjcrdkdhj as an inventory
77
source
78
79
ERROR! No inventory was parsed, please check your configuration and options