mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 20:31:27 -07:00
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:
parent
e96f90b440
commit
e2cac8cc93
56 changed files with 161 additions and 67 deletions
|
@ -43,15 +43,14 @@ extends_documentation_fragment: vmware.documentation
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Example vmware_datacenter command from Ansible Playbooks
|
||||
- name: Create Datacenter
|
||||
local_action:
|
||||
module: vmware_datacenter
|
||||
vmware_datacenter:
|
||||
hostname: "{{ ansible_ssh_host }}"
|
||||
username: root
|
||||
password: vmware
|
||||
datacenter_name: "datacenter"
|
||||
state: present
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Delete Datacenter
|
||||
vmware_datacenter:
|
||||
|
@ -60,6 +59,7 @@ EXAMPLES = '''
|
|||
password: pass
|
||||
datacenter_name: DC2
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
register: datacenter_delete_result
|
||||
'''
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue