Reply

Dynamic inventory only returning host

[ Edited ]
Authority
Posts: 15
149     0

I trying to deploy dynamic inventory using the infoblox.yaml and infoblox.py script and I'm getting the hosts listed.  What I need is a way to also get the extensible attributes associated with the host as those would be vars needed for my playbooks.  This is what my static inventory looks like for a single pair of F5 devices.

 

[ILBEL5003_4]
ILBEL5003.conn.site reboot_group=1
ILBEL5004.conn.site reboot_group=2

 

[ILBEL5003_4:vars]
dg_name=ILBEL5003-4_HA
enabled_vlans=Trans-VLAN6

 

So this didn't give me what I wanted so I tried to use the nios_inventory plugin.  This running in Ansible Tower and has yet to produce any hosts in the inventory.  Current error is 

Traceback (most recent call last):
File "/usr/bin/awx-manage", line 11, in <module>
load_entry_point('awx==3.8.3', 'console_scripts', 'awx-manage')()
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/__init__.py", line 154, in manage
execute_from_command_line(sys.argv)
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/management/commands/inventory_import.py", line 1142, in handle
raise exc
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/management/commands/inventory_import.py", line 1032, in handle
venv_path=venv_path, verbosity=self.verbosity).load()
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/management/commands/inventory_import.py", line 208, in load
return self.command_to_json(base_args + ['--list'])
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/management/commands/inventory_import.py", line 196, in command_to_json
data = json.loads(stdout)
File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 342, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 3)

 

I have found little to none in the way of documentation on this plugin and wondering if anyone is actually using Infoblox for dynamic inventory in Ansible Tower.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You