diff --git a/plugins/module_utils/setup.py b/plugins/module_utils/setup.py index 71798e8..32d9aa5 100644 --- a/plugins/module_utils/setup.py +++ b/plugins/module_utils/setup.py @@ -28,9 +28,9 @@ def get_tn_version(): # product_name is a string like "TrueNAS". # product_type is a string like "CORE". # product_version is a string like "TrueNAS-13.0-U5", or "TrueNAS-SCALE-22.12.3.1" - product_name = mw.call("system.product_name", output='str') - product_type = mw.call("system.product_type", output='str') sys_version = mw.call("system.version", output='str') + product_name = sys_version.split("-")[0] + product_type = mw.call("system.product_type", output='str') except Exception: raise