[PR #11115/58bb1e7c backport][stable-12] fix ruff case B007 (#11131)

fix ruff case B007 (#11115)

* fix ruff case B007

* rollback inventory/iocage

* re-do the fix in inventory/iocage

* add cases in tests/unit/plugins

* rollback plugins/module_utils/memset.py

* rollback extraneous changes in plugins/modules/xcc_redfish_command.py

* add changelog frag

(cherry picked from commit 58bb1e7c04)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot]
2025-11-12 21:58:36 +01:00
committed by GitHub
parent 42997e2d28
commit b72e38c909
32 changed files with 90 additions and 73 deletions

View File

@@ -373,7 +373,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
ip_address_first = None
ipv6_address = None
ipv6_address_first = None
for iname, ivalue in interfaces.items():
for ivalue in interfaces.values():
# Set to first interface or management interface if defined or hostname matches dns_name
if ivalue["ip_address"] != "":
if ip_address_first is None:

View File

@@ -292,7 +292,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
self.get_jails(t_stdout, results)
if get_properties:
for hostname, host_vars in results["_meta"]["hostvars"].items():
for hostname in results["_meta"]["hostvars"]:
cmd_get_properties = cmd.copy()
cmd_get_properties.append(self.IOCAGE)
cmd_get_properties.append("get")
@@ -335,7 +335,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
except Exception as e:
raise AnsibleError(f"Failed to get pool: {e}") from e
for hostname, host_vars in results["_meta"]["hostvars"].items():
for hostname in results["_meta"]["hostvars"]:
iocage_hooks = []
for hook in hooks_results:
path = f"/{iocage_pool}/iocage/jails/{hostname}/root{hook}"