From 4ad23f000d8feadff01c8ef1b682db27336f0248 Mon Sep 17 00:00:00 2001 From: Mike Morency Date: Tue, 17 Dec 2024 08:58:15 -0500 Subject: [PATCH] spelling fixes --- plugins/inventory/esxi_hosts.py | 10 +++++----- .../targets/vmware_inventory_esxi_hosts/tasks/main.yml | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/inventory/esxi_hosts.py b/plugins/inventory/esxi_hosts.py index 17c5cb3b..28b6ab6a 100644 --- a/plugins/inventory/esxi_hosts.py +++ b/plugins/inventory/esxi_hosts.py @@ -43,9 +43,9 @@ default: ['name'] properties: description: - - Specify a list of VMware schema properties associated with the ESXi hostsystem to collectio and return as hostvars. + - Specify a list of VMware schema properties associated with the ESXi hostsystem to collect and return as hostvars. - Each value in the list can be a path to a specific property in hostsystem object or a path to a collection of hostsystem objects. - - Please make sure that if you use a property in another parameter that is is included in this option. + - Please make sure that if you use a property in another parameter that it is included in this option. - Some properties are always returned, such as name, customValue, and summary.runtime.powerState - Use V(all) to return all properties available for the ESXi host. type: list @@ -173,7 +173,7 @@ def __init__(self): @classmethod def create_from_cache(cls, inventory_hostname, host_properties): """ - Create the class from the inventory cache. We dont want to refresh the data or make any calls to vCenter. + Create the class from the inventory cache. We don't want to refresh the data or make any calls to vCenter. Properties are populated from whatever we had previously cached. """ host = cls() @@ -286,7 +286,7 @@ def parse(self, inventory, loader, path, cache=True): def parse_properties_param(self): """ The properties option can be a variety of inputs from the user and we need to - manipulate it into a list of props that can be used later. + manipulate it into a list of properties that can be used later. Returns: A list of property names that should be returned in the inventory. An empty list means all properties should be collected @@ -357,7 +357,7 @@ def __update_inventory(self, esxi_host): def set_inventory_hostname(self, esxi_host): """ The user can specify a list of jinja templates, and the first valid template should be used for the - host's inventory hostname. The inventory hostname is mostly for decrative purposes since the + host's inventory hostname. The inventory hostname is mostly for decorative purposes since the ansible_host value takes precedence when trying to connect. """ hostname = None diff --git a/tests/integration/targets/vmware_inventory_esxi_hosts/tasks/main.yml b/tests/integration/targets/vmware_inventory_esxi_hosts/tasks/main.yml index 32f00c95..74b8f689 100644 --- a/tests/integration/targets/vmware_inventory_esxi_hosts/tasks/main.yml +++ b/tests/integration/targets/vmware_inventory_esxi_hosts/tasks/main.yml @@ -8,6 +8,10 @@ ansible.builtin.command: ansible-inventory -i "{{ role_path }}/files/test.esxi_hosts.yml" --list register: _inventory_out + - name: Debug Inventory Output + ansible.builtin.debug: + var: _inventory_out + - name: Parse Inventory Results as JSON ansible.builtin.set_fact: inventory_results: "{{ _inventory_out.stdout | from_json }}"