From 304e63d76e725e8e277fe208d26fb45ca2ff903d Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Tue, 3 Oct 2023 11:54:14 -0700 Subject: [PATCH] Add family fallback for Amzn to register as RedHat (#81755) * Add family fallback for Amzn to register as RedHat Fixes: #80882 Signed-off-by: Abhijeet Kasurde --- changelogs/fragments/80882-Amazon-os-family-compat.yaml | 2 ++ lib/ansible/module_utils/facts/system/distribution.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/80882-Amazon-os-family-compat.yaml diff --git a/changelogs/fragments/80882-Amazon-os-family-compat.yaml b/changelogs/fragments/80882-Amazon-os-family-compat.yaml new file mode 100644 index 00000000000..cb838736550 --- /dev/null +++ b/changelogs/fragments/80882-Amazon-os-family-compat.yaml @@ -0,0 +1,2 @@ +bugfixes: +- Interpreter discovery - Add ``Amzn`` to ``OS_FAMILY_MAP`` for correct family fallback for interpreter discovery (https://github.com/ansible/ansible/issues/80882). diff --git a/lib/ansible/module_utils/facts/system/distribution.py b/lib/ansible/module_utils/facts/system/distribution.py index 6feece2a47e..7cb729d14e0 100644 --- a/lib/ansible/module_utils/facts/system/distribution.py +++ b/lib/ansible/module_utils/facts/system/distribution.py @@ -511,7 +511,7 @@ class Distribution(object): # keep keys in sync with Conditionals page of docs OS_FAMILY_MAP = {'RedHat': ['RedHat', 'RHEL', 'Fedora', 'CentOS', 'Scientific', 'SLC', 'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS', - 'OEL', 'Amazon', 'Virtuozzo', 'XenServer', 'Alibaba', + 'OEL', 'Amazon', 'Amzn', 'Virtuozzo', 'XenServer', 'Alibaba', 'EulerOS', 'openEuler', 'AlmaLinux', 'Rocky', 'TencentOS', 'EuroLinux', 'Kylin Linux Advanced Server'], 'Debian': ['Debian', 'Ubuntu', 'Raspbian', 'Neon', 'KDE neon',