From be21140384403219dd1dc834364c1d246a5ec2ab Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Mon, 10 Dec 2018 23:57:39 +0530 Subject: [PATCH] VMware: update docs and return docs for vmware_host_service_facts (#49736) Follow up of 45155 Signed-off-by: Abhijeet Kasurde --- ...45155-vmware_host_service_facts-update_docs.yaml | 2 ++ .../cloud/vmware/vmware_host_service_facts.py | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/45155-vmware_host_service_facts-update_docs.yaml diff --git a/changelogs/fragments/45155-vmware_host_service_facts-update_docs.yaml b/changelogs/fragments/45155-vmware_host_service_facts-update_docs.yaml new file mode 100644 index 00000000000..e247fab19d6 --- /dev/null +++ b/changelogs/fragments/45155-vmware_host_service_facts-update_docs.yaml @@ -0,0 +1,2 @@ +minor_changes: +- Update docs and return section of vmware_host_service_facts module. diff --git a/lib/ansible/modules/cloud/vmware/vmware_host_service_facts.py b/lib/ansible/modules/cloud/vmware/vmware_host_service_facts.py index d200d5f5305..6e7a5e01737 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_host_service_facts.py +++ b/lib/ansible/modules/cloud/vmware/vmware_host_service_facts.py @@ -24,6 +24,7 @@ author: - Abhijeet Kasurde (@Akasurde) notes: - Tested on vSphere 6.5 +- If source package name is not available then fact is populated as null. requirements: - python >= 2.6 - PyVmomi @@ -75,7 +76,9 @@ host_service_facts: "policy": "on", "required": false, "running": true, - "uninstallable": false + "uninstallable": false, + "source_package_name": "esx-base", + "source_package_desc": "This VIB contains all of the base functionality of vSphere ESXi." }, { "key": "TSM", @@ -83,7 +86,9 @@ host_service_facts: "policy": "off", "required": false, "running": false, - "uninstallable": false + "uninstallable": false, + "source_package_name": "esx-base", + "source_package_desc": "This VIB contains all of the base functionality of vSphere ESXi." }, ] } @@ -116,8 +121,8 @@ class VmwareServiceManager(PyVmomi): uninstallable=service.uninstallable, running=service.running, policy=service.policy, - source_package_name=service.sourcePackage.sourcePackageName if service.sourcePackage else 'NA', - source_package_desc=service.sourcePackage.description if service.sourcePackage else 'NA', + source_package_name=service.sourcePackage.sourcePackageName if service.sourcePackage else None, + source_package_desc=service.sourcePackage.description if service.sourcePackage else None, ) ) hosts_facts[host.name] = host_service_facts