Validate EXAMPLES as YAML

This commit is contained in:
Matt Martz 2017-02-07 15:39:24 -06:00 committed by Toshio Kuratomi
commit 7c00346714
112 changed files with 441 additions and 381 deletions

View file

@ -137,12 +137,12 @@ EXAMPLES = '''
- name: Creates a new vApp in a VCA instance
vca_vapp:
vapp_name: tower
state=present
template_name='Ubuntu Server 12.04 LTS (amd64 20150127)'
vdc_name=VDC1
instance_id=<your instance id here>
username=<your username here>
password=<your password here>
state: present
template_name: 'Ubuntu Server 12.04 LTS (amd64 20150127)'
vdc_name: VDC1
instance_id: '<your instance id here>'
username: '<your username here>'
password: '<your password here>'
'''

View file

@ -64,14 +64,16 @@ extends_documentation_fragment: vmware.documentation
EXAMPLES = '''
# Example vmware_cluster command from Ansible Playbooks
- name: Create Cluster
local_action: >
vmware_cluster
hostname="{{ ansible_ssh_host }}" username=root password=vmware
datacenter_name="datacenter"
cluster_name="cluster"
enable_ha=True
enable_drs=True
enable_vsan=True
local_action:
module: vmware_cluster
hostname: "{{ ansible_ssh_host }}"
username: root
password: vmware
datacenter_name: "datacenter"
cluster_name: "cluster"
enable_ha: True
enable_drs: True
enable_vsan: True
'''
try:

View file

@ -65,10 +65,13 @@ extends_documentation_fragment: vmware.documentation
EXAMPLES = '''
# Example vmware_datacenter command from Ansible Playbooks
- name: Create Datacenter
local_action: >
vmware_datacenter
hostname="{{ ansible_ssh_host }}" username=root password=vmware
datacenter_name="datacenter" state=present
local_action:
module: vmware_datacenter
hostname: "{{ ansible_ssh_host }}"
username: root
password: vmware
datacenter_name: "datacenter"
state: present
'''
try:

View file

@ -65,7 +65,7 @@ extends_documentation_fragment: vmware.documentation
EXAMPLES = '''
- name: Create Management portgroup
local_action:
local_action:
module: vmware_dvs_portgroup
hostname: vcenter_ip_or_hostname
username: vcenter_username

View file

@ -68,7 +68,7 @@ extends_documentation_fragment: vmware.documentation
'''
EXAMPLES = '''
Example from Ansible playbook
# Example from Ansible playbook
- name: Add ESXi Host to VCSA
local_action:

View file

@ -64,7 +64,7 @@ extends_documentation_fragment: vmware.documentation
'''
EXAMPLES = '''
Example from Ansible playbook
# Example from Ansible playbook
- name: Migrate Management vmk
local_action:

View file

@ -60,7 +60,7 @@ extends_documentation_fragment: vmware.documentation
'''
EXAMPLES = '''
Example from Ansible playbook
# Example from Ansible playbook
- name: Add Management Network VM Portgroup
local_action:

View file

@ -45,10 +45,12 @@ extends_documentation_fragment: vmware.documentation
EXAMPLES = '''
# Example vmware_target_canonical_facts command from Ansible Playbooks
- name: Get Canonical name
local_action: >
vmware_target_canonical_facts
hostname="{{ ansible_ssh_host }}" username=root password=vmware
target_id=7
local_action:
module: vmware_target_canonical_facts
hostname: "{{ ansible_ssh_host }}"
username: root
password: vmware
target_id: 7
'''
try:

View file

@ -51,7 +51,7 @@ extends_documentation_fragment: vmware.documentation
'''
EXAMPLES = '''
Example from Ansible playbook
# Example from Ansible playbook
- name: Perform vMotion of VM
local_action:

View file

@ -65,7 +65,7 @@ extends_documentation_fragment: vmware.documentation
'''
EXAMPLES = '''
Example from Ansible playbook
# Example from Ansible playbook
- name: Add a VMware vSwitch
local_action:

View file

@ -153,6 +153,7 @@ requirements:
EXAMPLES = '''
---
# Create a new VM on an ESX server
# Returns changed = False when the VM already exists
# Returns changed = True and a adds ansible_facts from the new VM
@ -258,7 +259,7 @@ EXAMPLES = '''
guest: newvm001
vmware_guest_facts: yes
---
# Typical output of a vsphere_facts run on a guest
# If vmware tools is not installed, ipadresses with return None
@ -277,22 +278,22 @@ EXAMPLES = '''
hw_processor_count: 2
hw_product_uuid: "ef50bac8-2845-40ff-81d9-675315501dac"
hw_power_status will be one of the following values:
- POWERED ON
- POWERED OFF
- SUSPENDED
- POWERING ON
- POWERING OFF
- SUSPENDING
- RESETTING
- BLOCKED ON MSG
- REVERTING TO SNAPSHOT
- UNKNOWN
as seen in the VMPowerState-Class of PySphere: http://git.io/vlwOq
# hw_power_status will be one of the following values:
# - POWERED ON
# - POWERED OFF
# - SUSPENDED
# - POWERING ON
# - POWERING OFF
# - SUSPENDING
# - RESETTING
# - BLOCKED ON MSG
# - REVERTING TO SNAPSHOT
# - UNKNOWN
# as seen in the VMPowerState-Class of PySphere: http://git.io/vlwOq
---
# Remove a vm from vSphere
# The VM must be powered_off or you need to use force to force a shutdown
- vsphere_guest:
vcenter_hostname: vcenter.mydomain.local
username: myuser