# Sync GLPI with AWX

**URL:** <https://forum.ansible.com/t/sync-glpi-with-awx/33286>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [June 30, 2020, 2:05pm UTC](https://forum.ansible.com/t/sync-glpi-with-awx/33286 "2020-06-30T14:05:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dieye\_Pape\_Doudou](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@Dieye\_Pape\_Doudou](https://forum.ansible.com/u/Dieye_Pape_Doudou)\
**Post date:** [June 30, 2020, 2:05pm UTC](https://forum.ansible.com/t/sync-glpi-with-awx/33286/1 "2020-06-30T14:05:23Z")

</div>

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
