From c1c6e9f008eb9dd948a22ff19757a7cbeac93613 Mon Sep 17 00:00:00 2001 From: aperigault Date: Tue, 27 Aug 2019 18:57:44 +0200 Subject: [PATCH] Add kernel version in ansible facts (#40069) --- lib/ansible/module_utils/facts/system/platform.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/module_utils/facts/system/platform.py b/lib/ansible/module_utils/facts/system/platform.py index 5d503d0d29f..beac7ccbe30 100644 --- a/lib/ansible/module_utils/facts/system/platform.py +++ b/lib/ansible/module_utils/facts/system/platform.py @@ -33,6 +33,7 @@ class PlatformFactCollector(BaseFactCollector): name = 'platform' _fact_ids = set(['system', 'kernel', + 'kernel_version', 'machine', 'python_version', 'architecture', @@ -43,6 +44,7 @@ class PlatformFactCollector(BaseFactCollector): # platform.system() can be Linux, Darwin, Java, or Windows platform_facts['system'] = platform.system() platform_facts['kernel'] = platform.release() + platform_facts['kernel_version'] = platform.version() platform_facts['machine'] = platform.machine() platform_facts['python_version'] = platform.python_version()