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

@ -112,6 +112,7 @@ EXAMPLES = r'''
esxi_username: '{{ esxi_username }}'
esxi_password: '{{ esxi_password }}'
state: present
delegate_to: localhost
- name: Add ESXi Host to vCenter under a specific folder
vmware_host:
@ -125,6 +126,7 @@ EXAMPLES = r'''
esxi_password: '{{ esxi_password }}'
state: present
add_connected: True
delegate_to: localhost
- name: Reconnect ESXi Host (with username/password set)
vmware_host:
@ -137,6 +139,7 @@ EXAMPLES = r'''
esxi_username: '{{ esxi_username }}'
esxi_password: '{{ esxi_password }}'
state: reconnect
delegate_to: localhost
- name: Reconnect ESXi Host (with default username/password)
vmware_host:
@ -147,6 +150,7 @@ EXAMPLES = r'''
cluster_name: cluster_name
esxi_hostname: '{{ esxi_hostname }}'
state: reconnect
delegate_to: localhost
- name: Add ESXi Host with SSL Thumbprint to vCenter
vmware_host:
@ -160,6 +164,7 @@ EXAMPLES = r'''
esxi_password: '{{ esxi_password }}'
esxi_ssl_thumbprint: "3C:A5:60:6F:7A:B7:C4:6C:48:28:3D:2F:A5:EC:A3:58:13:88:F6:DD"
state: present
delegate_to: localhost
'''
RETURN = r'''