mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-27 05:43:09 +00:00
adding fix for packet_net.py (#891)
* adding fix for packet_net.py * adding changelog fragment * squashing to fix cascading notifications Apply suggestions from code review thanks felixfontein for working with me! Co-authored-by: Felix Fontein <felix@fontein.de> adding suggestions from code review (accessing dict in a better way) modified packet_net fragment to accurate description Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -346,9 +346,9 @@ class PacketInventory(object):
|
||||
|
||||
# Inventory: Group by OS
|
||||
if self.group_by_operating_system:
|
||||
self.push(self.inventory, device.operating_system['slug'], dest)
|
||||
self.push(self.inventory, device.operating_system.slug, dest)
|
||||
if self.nested_groups:
|
||||
self.push_group(self.inventory, 'operating_systems', device.operating_system['slug'])
|
||||
self.push_group(self.inventory, 'operating_systems', device.operating_system.slug)
|
||||
|
||||
# Inventory: Group by plan type
|
||||
if self.group_by_plan_type:
|
||||
@@ -395,7 +395,7 @@ class PacketInventory(object):
|
||||
elif key == 'packet_facility':
|
||||
device_vars[key] = value['code']
|
||||
elif key == 'packet_operating_system':
|
||||
device_vars[key] = value['slug']
|
||||
device_vars[key] = value.slug
|
||||
elif key == 'packet_plan':
|
||||
device_vars[key] = value['slug']
|
||||
elif key == 'packet_tags':
|
||||
|
||||
Reference in New Issue
Block a user