From 9992aececab89320904db436d73766d099841873 Mon Sep 17 00:00:00 2001 From: Klaus Franke Date: Sun, 16 Nov 2025 18:23:52 +0100 Subject: [PATCH 1/2] Issue #86179 Setup module does not return hw-info on AIX VIO servers Fix code failing with indexerr as number of fields is lower as expected --- lib/ansible/module_utils/facts/hardware/aix.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/module_utils/facts/hardware/aix.py b/lib/ansible/module_utils/facts/hardware/aix.py index d359e06b707..58d649a518a 100644 --- a/lib/ansible/module_utils/facts/hardware/aix.py +++ b/lib/ansible/module_utils/facts/hardware/aix.py @@ -236,6 +236,9 @@ class AIXHardware(Hardware): fields = line.split() if len(fields) != 0 and fields[0] != 'node' and fields[0][0] != '-' and re.match('^/.*|^[a-zA-Z].*|^[0-9].*', fields[0]): if re.match('^/', fields[0]): + # AIX VIO SSP mounts match above regexes, but show only 6 fields. we fix this by adding one empty field + if len(fields) < 7: + fields.append("") # normal mount mount = fields[1] mount_info = {'mount': mount, From 4a0eda4b0a3fe7b5549d928b536c8436a26d8377 Mon Sep 17 00:00:00 2001 From: Klaus Franke Date: Sun, 16 Nov 2025 18:24:27 +0100 Subject: [PATCH 2/2] Issue #86179 Setup module does not return hw-info on AIX VIO servers Fix code failing with AttributeError as this error was not catched by an except. Reason for the error is, thas the os class on AIX does not have a geloadavg method --- lib/ansible/module_utils/facts/system/loadavg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/facts/system/loadavg.py b/lib/ansible/module_utils/facts/system/loadavg.py index 3433c06ee34..f4a1fbde25a 100644 --- a/lib/ansible/module_utils/facts/system/loadavg.py +++ b/lib/ansible/module_utils/facts/system/loadavg.py @@ -23,7 +23,7 @@ class LoadAvgFactCollector(BaseFactCollector): '5m': loadavg[1], '15m': loadavg[2] } - except OSError: + except (OSError, AttributeError): pass return facts