diff --git a/changelogs/fragments/nios_inventory-var_fix.yml b/changelogs/fragments/nios_inventory-var_fix.yml new file mode 100644 index 00000000..b47a6195 --- /dev/null +++ b/changelogs/fragments/nios_inventory-var_fix.yml @@ -0,0 +1,2 @@ +minor_changes: + - nios_inventory.py - added 'ipv4addrs' inventory variable diff --git a/plugins/inventory/nios_inventory.py b/plugins/inventory/nios_inventory.py index f23c0273..186b4c71 100644 --- a/plugins/inventory/nios_inventory.py +++ b/plugins/inventory/nios_inventory.py @@ -102,6 +102,7 @@ def parse(self, inventory, loader, path, cache=True): # Plugin interface (2) self.inventory.add_child(group_name, host_name) self.inventory.set_variable(host_name, 'view', host['view']) + self.inventory.set_variable(host_name, 'ipv4addrs', host['ipv4addrs']) for key, value in iteritems(flatten_extattrs(host['extattrs'])): self.inventory.set_variable(host_name, key, value)