Fix all VMware examples to use delegate_to (#43426)

Some users have problems using the VMware modules because they use the
vCenter as target, and Ansible uses SSH to connect to the targets.

Eventually we need to update the VMware guide to explain how the modules
work, but the first fix is to update the examples.

(We should backport to v2.6 and v2.5 too)
This commit is contained in:
Dag Wieers 2018-08-01 05:40:57 +02:00 committed by Abhijeet Kasurde
parent e96f90b440
commit e2cac8cc93
56 changed files with 161 additions and 67 deletions

View file

@ -51,29 +51,29 @@ extends_documentation_fragment: vmware.documentation
EXAMPLES = '''
- name: Get Canonical name of particular target on particular ESXi host system
local_action:
module: vmware_target_canonical_facts
vmware_target_canonical_facts:
hostname: vcenter_hostname
username: vcenter_user
password: vcenter_pass
target_id: 7
esxi_hostname: esxi_hostname
delegate_to: localhost
- name: Get Canonical name of all target on particular ESXi host system
local_action:
module: vmware_target_canonical_facts
vmware_target_canonical_facts:
hostname: vcenter_hostname
username: vcenter_user
password: vcenter_pass
esxi_hostname: esxi_hostname
delegate_to: localhost
- name: Get Canonical name of all ESXi hostname on particular Cluster
local_action:
module: vmware_target_canonical_facts
vmware_target_canonical_facts:
hostname: vcenter_hostname
username: vcenter_user
password: vcenter_pass
cluster_name: cluster_name
delegate_to: localhost
'''
RETURN = r"""