Closed lutfisan closed 4 years ago
You’re looking for “hostsfile” in the config, not “host_file”
You’re looking for “hostsfile” in the config, not “host_file”
I change host_file to hostsfile but still not work
nr = InitNornir(
core={"num_workers": 20},
inventory={
"plugin": "nornir.plugins.inventory.ansible.AnsibleInventory",
"options": {
"hostsfile": "tmp"
}
}
)
print(nr.inventory.groups)
print(nr.inventory.hosts)
copy/pasted your inventory to that tmp
file above and works as expected w/ nornir 2.3.0:
{'192.168.32.1': Host: 192.168.32.1, '192.168.32.104': Host: 192.168.32.104, '192.168.32.105': Host: 192.168.32.105, '192.168.246.229': Host: 192.168.246.229, '192.168.247.139': Host: 192.168.247.139, '192.168.247.77': Host: 192.168.247.77, '192.168.0.1': Host: 192.168.0.1, '192.168.0.10': Host: 192.168.0.10, '192.168.0.11': Host: 192.168.0.11}```
I am closing this issue as this is not an issue related to nornir. For support I'd suggest you to head to https://nornir.discourse.group
my inventory/hosts: