Fixup VMware module docs issues (#36409)

Fix various argspec vs documentation issue
This commit is contained in:
John R Barker 2018-02-21 15:20:42 +00:00 committed by GitHub
parent 9fced4f0a9
commit 5d0ed38e3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 137 additions and 215 deletions

View file

@ -29,7 +29,6 @@ options:
- The hostname of the vcenter server the module will connect to, to create the guest. - The hostname of the vcenter server the module will connect to, to create the guest.
required: true required: true
default: null default: null
aliases: []
validate_certs: validate_certs:
description: description:
- Validate SSL certs. Note, if running on python without SSLContext - Validate SSL certs. Note, if running on python without SSLContext
@ -39,7 +38,7 @@ options:
never validate on python <= 2.7.8. never validate on python <= 2.7.8.
required: false required: false
default: yes default: yes
choices: ['yes', 'no'] type: bool
version_added: 2.1 version_added: 2.1
guest: guest:
description: description:
@ -83,7 +82,7 @@ options:
- Specifies if the VM should be deployed from a template (mutually exclusive with 'state' parameter). No guest customization changes to hardware - Specifies if the VM should be deployed from a template (mutually exclusive with 'state' parameter). No guest customization changes to hardware
such as CPU, RAM, NICs or Disks can be applied when launching from template. such as CPU, RAM, NICs or Disks can be applied when launching from template.
default: no default: no
choices: ['yes', 'no'] type: bool
template_src: template_src:
version_added: "1.9" version_added: "1.9"
description: description:
@ -100,7 +99,7 @@ options:
- Specifies if the VM should be powered on after the clone. - Specifies if the VM should be powered on after the clone.
required: false required: false
default: yes default: yes
choices: ['yes', 'no'] type: bool
vm_disk: vm_disk:
description: description:
- A key, value list of disks and their sizes and which datastore to keep it in. - A key, value list of disks and their sizes and which datastore to keep it in.
@ -131,13 +130,13 @@ options:
vmware_guest_facts: vmware_guest_facts:
description: description:
- Gather facts from vCenter on a particular VM - Gather facts from vCenter on a particular VM
required: false type: bool
default: null default: null
force: force:
description: description:
- Boolean. Allows you to run commands which may alter the running state of a guest. Also used to reconfigure and destroy. - Boolean. Allows you to run commands which may alter the running state of a guest. Also used to reconfigure and destroy.
default: "no" default: "no"
choices: [ "yes", "no" ] type: bool
notes: notes:
- This module should run from a system that can access vSphere directly. - This module should run from a system that can access vSphere directly.

View file

@ -24,7 +24,7 @@ options:
purge_rules: purge_rules:
description: description:
- If set to true, it will delete all rules in the gateway that are not given as parameter to this module. - If set to true, it will delete all rules in the gateway that are not given as parameter to this module.
required: false type: bool
default: false default: false
nat_rules: nat_rules:
description: description:

View file

@ -120,6 +120,7 @@ options:
- The name of the virtual data center (VDC) where the vm should be created or contains the vAPP. - The name of the virtual data center (VDC) where the vm should be created or contains the vAPP.
required: false required: false
default: None default: None
extends_documentation_fragment: vca
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -56,6 +56,7 @@ options:
- This option is ignored, if C(parent_folder) is set. - This option is ignored, if C(parent_folder) is set.
default: vm default: vm
required: False required: False
choices: [ datastore, host, network, vm ]
state: state:
description: description:
- State of folder. - State of folder.

View file

@ -34,24 +34,13 @@ author: Dag Wieers (@dagwieers)
requirements: requirements:
- pyVmomi - pyVmomi
options: options:
hostname:
description:
- The hostname or IP address of the vSphere vCenter.
required: yes
username:
description:
- The username to log into the vSphere vCenter.
required: yes
aliases: [admin, user]
password:
description:
- The password to log into to the vSphere vCenter.
required: yes
aliases: [pass, pwd]
labels: labels:
description: description:
- The optional labels of the license key to manage in vSphere vCenter. - The optional labels of the license key to manage in vSphere vCenter.
- This is dictionary with key/value pair. - This is dictionary with key/value pair.
default: {
'source': 'ansible'
}
license: license:
description: description:
- The license key to manage in vSphere vCenter. - The license key to manage in vSphere vCenter.
@ -67,6 +56,7 @@ notes:
an evaluation license only. an evaluation license only.
- The evaluation license (00000-00000-00000-00000-00000) is not listed - The evaluation license (00000-00000-00000-00000-00000) is not listed
when unused. when unused.
extends_documentation_fragment: vmware.documentation
''' '''
EXAMPLES = r''' EXAMPLES = r'''
@ -204,5 +194,6 @@ def main():
module.exit_json(**result) module.exit_json(**result)
if __name__ == '__main__': if __name__ == '__main__':
main() main()

View file

@ -48,8 +48,9 @@ options:
state: state:
description: description:
- If the host should be present or absent attached to the vSwitch. - If the host should be present or absent attached to the vSwitch.
choices: [present, absent] choices: [ present, absent ]
required: True required: True
default: 'present'
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

View file

@ -62,6 +62,7 @@ options:
description: description:
- Determines if the portgroup should be present or not. - Determines if the portgroup should be present or not.
required: True required: True
type: bool
choices: choices:
- 'present' - 'present'
- 'absent' - 'absent'
@ -71,6 +72,7 @@ options:
- Indicates whether this is a VLAN trunk or not. - Indicates whether this is a VLAN trunk or not.
required: False required: False
default: False default: False
type: bool
version_added: '2.5' version_added: '2.5'
network_policy: network_policy:
description: description:
@ -81,6 +83,11 @@ options:
- '- C(mac_changes) (bool): indicates whether mac changes are allowed. (default: false)' - '- C(mac_changes) (bool): indicates whether mac changes are allowed. (default: false)'
required: False required: False
version_added: '2.5' version_added: '2.5'
default: {
promiscuous: False,
forged_transmits: False,
mac_changes: False,
}
teaming_policy: teaming_policy:
description: description:
- Dictionary which configures the different teaming values for portgroup. - Dictionary which configures the different teaming values for portgroup.
@ -92,6 +99,12 @@ options:
- '- C(rolling_order) (bool): Indicate whether or not to use a rolling policy when restoring links. (default: False)' - '- C(rolling_order) (bool): Indicate whether or not to use a rolling policy when restoring links. (default: False)'
required: False required: False
version_added: '2.5' version_added: '2.5'
default: {
'notify_switches': True,
'load_balance_policy': 'loadbalance_srcid',
'inbound_policy': False,
'rolling_order': False
}
port_policy: port_policy:
description: description:
- Dictionary which configures the advanced policy settings for the portgroup. - Dictionary which configures the advanced policy settings for the portgroup.
@ -109,6 +122,20 @@ options:
- '- C(vlan_override) (bool): indicates if the vlan can be changed per port. (default: false)' - '- C(vlan_override) (bool): indicates if the vlan can be changed per port. (default: false)'
required: False required: False
version_added: '2.5' version_added: '2.5'
default: {
'traffic_filter_override': False,
'network_rp_override': False,
'live_port_move': False,
'security_override': False,
'vendor_config_override': False,
'port_config_reset_at_disconnect': True,
'uplink_teaming_override': False,
'block_override': True,
'shaping_override': False,
'vlan_override': False,
'ipfix_override': False
}
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

View file

@ -61,6 +61,7 @@ options:
- If this value is not set, VM is created without using a template. - If this value is not set, VM is created without using a template.
- If the VM exists already this setting will be ignored. - If the VM exists already this setting will be ignored.
- This parameter is case sensitive. - This parameter is case sensitive.
aliases: [ 'template_src' ]
is_template: is_template:
description: description:
- Flag the instance as a template. - Flag the instance as a template.

View file

@ -76,7 +76,7 @@ options:
required: True required: True
directory: directory:
description: description:
- Create or delete directory - Create or delete directory.
- 'Valid attributes are:' - 'Valid attributes are:'
- ' path: directory path to create or remove' - ' path: directory path to create or remove'
- ' operation: Valid values are create, delete' - ' operation: Valid values are create, delete'
@ -84,20 +84,22 @@ options:
required: False required: False
copy: copy:
description: description:
- Copy file to vm networkless - Copy file to vm without requiring network.
- 'Valid attributes are:' - 'Valid attributes are:'
- ' src: file source absolute or relative' - ' src: file source absolute or relative'
- ' dest: file destination, path must be exist' - ' dest: file destination, path must be exist'
- ' overwrite: False or True (not required, default False)' - ' overwrite: False or True (not required, default False)'
required: False required: False
file: fetch:
description: description:
- Get file from vm networkless - Get file from virtual machine without requiring network.
- 'Valid attributes are:' - 'Valid attributes are:'
- ' src: The file on the remote system to fetch. This I(must) be a file, not a directory' - ' src: The file on the remote system to fetch. This I(must) be a file, not a directory'
- ' dest: file destination on localhost, path must be exist' - ' dest: file destination on localhost, path must be exist'
required: False required: False
version_added: 2.5
extends_documentation_fragment: vmware.documentation
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -28,7 +28,8 @@ options:
state: state:
description: description:
- Set the state of the virtual machine. - Set the state of the virtual machine.
choices: [ powered-off, powered-on, reboot-guest, restarted, shutdown-guest, suspended ] choices: [ powered-off, powered-on, reboot-guest, restarted, shutdown-guest, suspended, present]
default: present
name: name:
description: description:
- Name of the virtual machine to work with. - Name of the virtual machine to work with.
@ -64,6 +65,13 @@ options:
- Date and time in string format at which specificed task needs to be performed. - Date and time in string format at which specificed task needs to be performed.
- "The required format for date and time - 'dd/mm/yyyy hh:mm'." - "The required format for date and time - 'dd/mm/yyyy hh:mm'."
- Scheduling task requires vCenter server. A standalone ESXi server does not support this option. - Scheduling task requires vCenter server. A standalone ESXi server does not support this option.
force:
description:
- Ignore warnings and complete the actions.
- This parameter is useful while forcing virtual machine state.
default: False
type: bool
version_added: 2.5
state_change_timeout: state_change_timeout:
description: description:
- If the C(state) is set to C(shutdown-guest), by default the module will return immediately after sending the shutdown signal. - If the C(state) is set to C(shutdown-guest), by default the module will return immediately after sending the shutdown signal.
@ -130,7 +138,7 @@ def main():
argument_spec = vmware_argument_spec() argument_spec = vmware_argument_spec()
argument_spec.update( argument_spec.update(
state=dict(type='str', default='present', state=dict(type='str', default='present',
choices=['powered-off', 'powered-on', 'reboot-guest', 'restarted', 'shutdown-guest', 'suspended']), choices=['present', 'powered-off', 'powered-on', 'reboot-guest', 'restarted', 'shutdown-guest', 'suspended']),
name=dict(type='str'), name=dict(type='str'),
name_match=dict(type='str', choices=['first', 'last'], default='first'), name_match=dict(type='str', choices=['first', 'last'], default='first'),
uuid=dict(type='str'), uuid=dict(type='str'),
@ -202,7 +210,7 @@ def main():
"given are invalid: %s" % (module.params.get('state'), "given are invalid: %s" % (module.params.get('state'),
to_native(e.msg))) to_native(e.msg)))
else: else:
result = set_vm_power_state(pyv.content, vm, module.params['state'], module.params['force'], module.params['state_change_timeout']) result = set_vm_power_state(pyv.content, vm, module.params['state'], module.params['force'])
else: else:
module.fail_json(msg="Unable to set power state for non-existing virtual machine : '%s'" % (module.params.get('uuid') or module.params.get('name'))) module.fail_json(msg="Unable to set power state for non-existing virtual machine : '%s'" % (module.params.get('uuid') or module.params.get('name')))

View file

@ -34,6 +34,7 @@ options:
- Manage snapshots attached to a specific virtual machine. - Manage snapshots attached to a specific virtual machine.
required: True required: True
choices: ['present', 'absent', 'revert', 'remove_all'] choices: ['present', 'absent', 'revert', 'remove_all']
default: 'present'
name: name:
description: description:
- Name of the VM to work with - Name of the VM to work with
@ -75,6 +76,7 @@ options:
description: description:
description: description:
- Define an arbitrary description to attach to snapshot. - Define an arbitrary description to attach to snapshot.
default: ''
quiesce: quiesce:
description: description:
- If set to C(true) and virtual machine is powered on, it will quiesce the - If set to C(true) and virtual machine is powered on, it will quiesce the
@ -86,6 +88,8 @@ options:
this flag is set to C(false). this flag is set to C(false).
required: False required: False
version_added: "2.4" version_added: "2.4"
type: bool
default: False
memory_dump: memory_dump:
description: description:
- If set to C(true), memory dump of virtual machine is also included in snapshot. - If set to C(true), memory dump of virtual machine is also included in snapshot.
@ -94,12 +98,16 @@ options:
this flag is set to C(false). this flag is set to C(false).
required: False required: False
version_added: "2.4" version_added: "2.4"
type: bool
default: False
remove_children: remove_children:
description: description:
- If set to C(true) and state is set to C(absent), then entire snapshot subtree is set - If set to C(true) and state is set to C(absent), then entire snapshot subtree is set
for removal. for removal.
required: False required: False
version_added: "2.4" version_added: "2.4"
type: bool
default: False
new_snapshot_name: new_snapshot_name:
description: description:
- Value to rename the existing snapshot to - Value to rename the existing snapshot to

View file

@ -137,7 +137,7 @@ def main():
argument_spec = vmware_argument_spec() argument_spec = vmware_argument_spec()
argument_spec.update( argument_spec.update(
name=dict(type='str'), name=dict(type='str'),
name_match=dict(type='str', default='first'), name_match=dict(type='str', default='first', choices=['first', 'last']),
folder=dict(type='str'), folder=dict(type='str'),
uuid=dict(type='str'), uuid=dict(type='str'),
) )

View file

@ -77,6 +77,7 @@ options:
- "Use following command to get hostsystem's certificate's thumbprint - " - "Use following command to get hostsystem's certificate's thumbprint - "
- "# openssl x509 -in /etc/vmware/ssl/rui.crt -fingerprint -sha1 -noout" - "# openssl x509 -in /etc/vmware/ssl/rui.crt -fingerprint -sha1 -noout"
version_added: 2.5 version_added: 2.5
default: ''
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

View file

@ -45,6 +45,7 @@ options:
- If set to C(present), then will set given acceptance level. - If set to C(present), then will set given acceptance level.
choices: [ list, present ] choices: [ list, present ]
required: False required: False
default: 'list'
acceptance_level: acceptance_level:
description: description:
- Name of acceptance level. - Name of acceptance level.

View file

@ -42,6 +42,7 @@ options:
description: description:
- A dictionary of advance configuration parameter. - A dictionary of advance configuration parameter.
- Invalid configuration parameters are ignored. - Invalid configuration parameters are ignored.
default: {}
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

View file

@ -41,6 +41,7 @@ options:
description: description:
- Type of the datastore to configure (nfs/vmfs). - Type of the datastore to configure (nfs/vmfs).
required: true required: true
choices: [ 'nfs', 'vmfs' ]
nfs_server: nfs_server:
description: description:
- NFS host serving nfs datastore. - NFS host serving nfs datastore.
@ -54,6 +55,7 @@ options:
- ReadOnly or ReadWrite mount. - ReadOnly or ReadWrite mount.
- Unused if datastore type is not set to C(nfs) and state is not set to C(present). - Unused if datastore type is not set to C(nfs) and state is not set to C(present).
default: False default: False
type: bool
vmfs_device_name: vmfs_device_name:
description: description:
- Name of the device to be used as VMFS datastore. - Name of the device to be used as VMFS datastore.

View file

@ -44,6 +44,7 @@ options:
- Each member of list is rule set name and state to be set the rule. - Each member of list is rule set name and state to be set the rule.
- Both rule name and rule state are required parameters. - Both rule name and rule state are required parameters.
- Please see examples for more information. - Please see examples for more information.
default: []
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

View file

@ -46,12 +46,14 @@ options:
- "State value 'start' and 'present' has same effect." - "State value 'start' and 'present' has same effect."
- "State value 'stop' and 'absent' has same effect." - "State value 'stop' and 'absent' has same effect."
choices: [ absent, present, restart, start, stop ] choices: [ absent, present, restart, start, stop ]
default: 'start'
service_policy: service_policy:
description: description:
- Set of valid service policy strings. - Set of valid service policy strings.
- If set C(on), then service should be started when the host starts up. - If set C(on), then service should be started when the host starts up.
- If set C(automatic), then service should run if and only if it has open firewall ports. - If set C(automatic), then service should run if and only if it has open firewall ports.
- If set C(off), then Service should not be started when the host starts up. - If set C(off), then Service should not be started when the host starts up.
choices: [ 'automatic', 'off', 'on' ]
service_name: service_name:
description: description:
- Name of Service to be managed. This is brief identifier for the service, for example, ntpd, vxsyslogd etc. - Name of Service to be managed. This is brief identifier for the service, for example, ntpd, vxsyslogd etc.

View file

@ -37,6 +37,7 @@ options:
description: description:
- The list of privileges that role needs to have. - The list of privileges that role needs to have.
- Please see U(https://docs.vmware.com/en/VMware-vSphere/6.0/com.vmware.vsphere.security.doc/GUID-ED56F3C4-77D0-49E3-88B6-B99B8B437B62.html) - Please see U(https://docs.vmware.com/en/VMware-vSphere/6.0/com.vmware.vsphere.security.doc/GUID-ED56F3C4-77D0-49E3-88B6-B99B8B437B62.html)
default: []
state: state:
description: description:
- Indicate desired state of the role. - Indicate desired state of the role.
@ -47,6 +48,7 @@ options:
description: description:
- If set to C(False) then prevents the role from being removed if any permissions are using it. - If set to C(False) then prevents the role from being removed if any permissions are using it.
default: False default: False
type: bool
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''
@ -273,5 +275,6 @@ def main():
vmware_local_role_manager = VMwareLocalRoleManager(module) vmware_local_role_manager = VMwareLocalRoleManager(module)
vmware_local_role_manager.process_state() vmware_local_role_manager.process_state()
if __name__ == '__main__': if __name__ == '__main__':
main() main()

View file

@ -36,7 +36,7 @@ options:
description: description:
- Name of the host as defined in vCenter. - Name of the host as defined in vCenter.
required: True required: True
vsan_mode: vsan:
description: description:
- Specify which VSAN compliant mode to enter. - Specify which VSAN compliant mode to enter.
choices: choices:
@ -44,14 +44,13 @@ options:
- 'evacuateAllData' - 'evacuateAllData'
- 'noAction' - 'noAction'
required: False required: False
aliases: [ 'vsan_mode' ]
evacuate: evacuate:
description: description:
- If True, evacuate all powered off VMs. - If set to C(True), evacuate all powered off VMs.
choices:
- True
- False
default: False default: False
required: False required: False
type: bool
timeout: timeout:
description: description:
- Specify a timeout for the operation. - Specify a timeout for the operation.
@ -173,9 +172,11 @@ class VmwareMaintenanceMgr(PyVmomi):
def main(): def main():
spec = vmware_argument_spec() spec = vmware_argument_spec()
spec.update(dict(esxi_hostname=dict(type='str', required=True), spec.update(dict(esxi_hostname=dict(type='str', required=True),
vsan=dict(type='str', choices=['ensureObjectAccessibility', vsan=dict(type='str',
'evacuateAllData', choices=['ensureObjectAccessibility',
'noAction'] 'evacuateAllData',
'noAction'],
aliases=['vsan_mode'],
), ),
evacuate=dict(type='bool', default=False), evacuate=dict(type='bool', default=False),
timeout=dict(default=0, type='int'), timeout=dict(default=0, type='int'),

View file

@ -58,6 +58,11 @@ options:
- '- C(mac_changes) (bool): indicates whether mac changes are allowed. (default: false)' - '- C(mac_changes) (bool): indicates whether mac changes are allowed. (default: false)'
required: False required: False
version_added: "2.2" version_added: "2.2"
default: {
mac_changes: false,
promiscuous_mode: false,
forged_transmits: false,
}
cluster_name: cluster_name:
description: description:
- Name of cluster name for host membership. - Name of cluster name for host membership.
@ -77,6 +82,7 @@ options:
- 'present' - 'present'
- 'absent' - 'absent'
version_added: '2.5' version_added: '2.5'
default: present
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

View file

@ -38,22 +38,11 @@ options:
description: description:
- Resource pool name to manage. - Resource pool name to manage.
required: True required: True
hostname:
description:
- ESXi hostname to manage.
required: True
username:
description:
- ESXi username.
required: True
password:
description:
- ESXi password.
required: True
cpu_expandable_reservations: cpu_expandable_reservations:
description: description:
- In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value. - In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value.
default: True default: True
type: bool
cpu_reservation: cpu_reservation:
description: description:
- Amount of resource that is guaranteed available to the virtual machine or resource pool. - Amount of resource that is guaranteed available to the virtual machine or resource pool.
@ -61,7 +50,8 @@ options:
cpu_limit: cpu_limit:
description: description:
- The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources. - The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources.
default: -1 (No limit) - The default value -1 indicates no limit.
default: -1
cpu_shares: cpu_shares:
description: description:
- Memory shares are used in case of resource contention. - Memory shares are used in case of resource contention.
@ -70,11 +60,12 @@ options:
- custom - custom
- low - low
- normal - normal
default: Normal default: normal
mem_expandable_reservations: mem_expandable_reservations:
description: description:
- In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value. - In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value.
default: True default: True
type: bool
mem_reservation: mem_reservation:
description: description:
- Amount of resource that is guaranteed available to the virtual machine or resource pool. - Amount of resource that is guaranteed available to the virtual machine or resource pool.
@ -82,7 +73,8 @@ options:
mem_limit: mem_limit:
description: description:
- The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources. - The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources.
default: -1 (No limit) - The default value -1 indicates no limit.
default: -1
mem_shares: mem_shares:
description: description:
- Memory shares are used in case of resource contention. - Memory shares are used in case of resource contention.
@ -91,7 +83,7 @@ options:
- custom - custom
- low - low
- normal - normal
default: Normal default: normal
state: state:
description: description:
- Add or remove the resource pool - Add or remove the resource pool
@ -294,14 +286,14 @@ def main():
resource_pool=dict(required=True, type='str'), resource_pool=dict(required=True, type='str'),
mem_shares=dict(type='str', default="normal", choices=[ mem_shares=dict(type='str', default="normal", choices=[
'high', 'custom', 'normal', 'low']), 'high', 'custom', 'normal', 'low']),
mem_limit=dict(type='int', default="-1"), mem_limit=dict(type='int', default=-1),
mem_reservation=dict(type='int', default="0"), mem_reservation=dict(type='int', default=0),
mem_expandable_reservations=dict( mem_expandable_reservations=dict(
type='bool', default="True"), type='bool', default="True"),
cpu_shares=dict(type='str', default="normal", choices=[ cpu_shares=dict(type='str', default="normal", choices=[
'high', 'custom', 'normal', 'low']), 'high', 'custom', 'normal', 'low']),
cpu_limit=dict(type='int', default="-1"), cpu_limit=dict(type='int', default=-1),
cpu_reservation=dict(type='int', default="0"), cpu_reservation=dict(type='int', default=0),
cpu_expandable_reservations=dict( cpu_expandable_reservations=dict(
type='bool', default="True"), type='bool', default="True"),
state=dict(default='present', choices=['present', 'absent'], type='str'))) state=dict(default='present', choices=['present', 'absent'], type='str')))

View file

@ -85,6 +85,7 @@ options:
vm_shell_args: vm_shell_args:
description: description:
- The argument to the program. - The argument to the program.
default: " "
vm_shell_env: vm_shell_env:
description: description:
- Comma separated list of environment variable, specified in the guest OS notation. - Comma separated list of environment variable, specified in the guest OS notation.

View file

@ -46,17 +46,20 @@ options:
- If set to C(True), the DRS rule will be enabled. - If set to C(True), the DRS rule will be enabled.
- Effective only if C(state) is set to C(present). - Effective only if C(state) is set to C(present).
default: False default: False
type: bool
mandatory: mandatory:
description: description:
- If set to C(True), the DRS rule will be mandatory. - If set to C(True), the DRS rule will be mandatory.
- Effective only if C(state) is set to C(present). - Effective only if C(state) is set to C(present).
default: False default: False
type: bool
affinity_rule: affinity_rule:
description: description:
- If set to C(True), the DRS rule will be an Affinity rule. - If set to C(True), the DRS rule will be an Affinity rule.
- If set to C(False), the DRS rule will be an Anti-Affinity rule. - If set to C(False), the DRS rule will be an Anti-Affinity rule.
- Effective only if C(state) is set to C(present). - Effective only if C(state) is set to C(present).
default: False default: True
type: bool
state: state:
description: description:
- If set to C(present), then the DRS rule is created if not present. - If set to C(present), then the DRS rule is created if not present.
@ -64,6 +67,7 @@ options:
- If set to C(absent), then the DRS rule is deleted if present. - If set to C(absent), then the DRS rule is deleted if present.
required: False required: False
default: present default: present
choices: [ present, absent ]
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

View file

@ -63,12 +63,13 @@ options:
- The Subnet Mask for the VMKernel interface. - The Subnet Mask for the VMKernel interface.
- Use C(network) parameter with C(subnet_mask) instead. - Use C(network) parameter with C(subnet_mask) instead.
- Deprecated option, will be removed in version 2.9. - Deprecated option, will be removed in version 2.9.
vland_id: vlan_id:
description: description:
- The VLAN ID for the VMKernel interface. - The VLAN ID for the VMKernel interface.
- Required parameter only if C(state) is set to C(present). - Required parameter only if C(state) is set to C(present).
- Optional parameter from version 2.5 and onwards. - Optional parameter from version 2.5 and onwards.
required: False required: False
version_added: 2.0
mtu: mtu:
description: description:
- The MTU for the VMKernel interface. - The MTU for the VMKernel interface.
@ -79,18 +80,22 @@ options:
description: description:
- Enable the VMKernel interface for VSAN traffic. - Enable the VMKernel interface for VSAN traffic.
required: False required: False
type: bool
enable_vmotion: enable_vmotion:
description: description:
- Enable the VMKernel interface for vMotion traffic. - Enable the VMKernel interface for vMotion traffic.
required: False required: False
type: bool
enable_mgmt: enable_mgmt:
description: description:
- Enable the VMKernel interface for Management traffic. - Enable the VMKernel interface for Management traffic.
required: False required: False
type: bool
enable_ft: enable_ft:
description: description:
- Enable the VMKernel interface for Fault Tolerance traffic. - Enable the VMKernel interface for Fault Tolerance traffic.
required: False required: False
type: bool
state: state:
description: description:
- If set to C(present), VMKernel is created with the given specifications. - If set to C(present), VMKernel is created with the given specifications.

View file

@ -47,6 +47,7 @@ options:
mtu: mtu:
description: description:
- MTU to configure on vSwitch. - MTU to configure on vSwitch.
default: 1500
state: state:
description: description:
- Add or remove the switch. - Add or remove the switch.

View file

@ -26,10 +26,12 @@ options:
description: description:
- The vCenter server on which the datastore is available. - The vCenter server on which the datastore is available.
required: true required: true
aliases: ['hostname']
login: login:
description: description:
- The login name to authenticate on the vCenter server. - The login name to authenticate on the vCenter server.
required: true required: true
aliases: ['username']
password: password:
description: description:
- The password to authenticate on the vCenter server. - The password to authenticate on the vCenter server.
@ -55,7 +57,7 @@ options:
- If C(no), SSL certificates will not be validated. This should only be - If C(no), SSL certificates will not be validated. This should only be
set to C(no) when no other option exists. set to C(no) when no other option exists.
default: 'yes' default: 'yes'
choices: ['yes', 'no'] type: bool
notes: notes:
- "This module ought to be run from a system that can access vCenter directly and has the file to transfer. - "This module ought to be run from a system that can access vCenter directly and has the file to transfer.

View file

@ -56,7 +56,7 @@ options:
autostart: autostart:
description: description:
- Whether the app should restart with an autostart.cgi script - Whether the app should restart with an autostart.cgi script
required: false type: bool
default: "no" default: "no"
extra_info: extra_info:
@ -68,7 +68,7 @@ options:
port_open: port_open:
description: description:
- IF the port should be opened - IF the port should be opened
required: false type: bool
default: false default: false
login_name: login_name:
@ -91,12 +91,12 @@ options:
EXAMPLES = ''' EXAMPLES = '''
- name: Create a test app - name: Create a test app
webfaction_app: webfaction_app:
name="my_wsgi_app1" name: "my_wsgi_app1"
state=present state: present
type=mod_wsgi35-python27 type: mod_wsgi35-python27
login_name={{webfaction_user}} login_name: "{{webfaction_user}}"
login_password={{webfaction_passwd}} login_password: "{{webfaction_passwd}}"
machine={{webfaction_machine}} machine: "{{webfaction_machine}}"
''' '''
import xmlrpclib import xmlrpclib

View file

@ -106,7 +106,7 @@ def main():
name=dict(required=True), name=dict(required=True),
state=dict(required=False, choices=['present', 'absent'], default='present'), state=dict(required=False, choices=['present', 'absent'], default='present'),
# You can specify an IP address or hostname. # You can specify an IP address or hostname.
type=dict(required=True), type=dict(required=True, choices=['mysql', 'postgresql']),
password=dict(required=False, default=None, no_log=True), password=dict(required=False, default=None, no_log=True),
login_name=dict(required=True), login_name=dict(required=True),
login_password=dict(required=True, no_log=True), login_password=dict(required=True, no_log=True),

View file

@ -53,10 +53,7 @@ options:
https: https:
description: description:
- Whether or not to use HTTPS - Whether or not to use HTTPS
required: false type: bool
choices:
- true
- false
default: 'false' default: 'false'
site_apps: site_apps:

View file

@ -35,7 +35,7 @@ options:
autoconnect: autoconnect:
required: False required: False
default: "yes" default: "yes"
choices: [ "yes", "no" ] type: bool
description: description:
- Whether the connection should start on boot. - Whether the connection should start on boot.
- Whether the connection profile can be automatically activated - Whether the connection profile can be automatically activated
@ -151,7 +151,7 @@ options:
description: description:
- This is only used with bond - ARP IP target - This is only used with bond - ARP IP target
stp: stp:
required: False type: bool
default: None default: None
description: description:
- This is only used with bridge and controls whether Spanning Tree Protocol (STP) is enabled for this bridge - This is only used with bridge and controls whether Spanning Tree Protocol (STP) is enabled for this bridge

View file

@ -67,7 +67,7 @@ options:
verify_certs: verify_certs:
description: description:
- If the certificates of the authentication is to be verified. - If the certificates of the authentication is to be verified.
required: false type: bool
default: True default: True
vdc_name: vdc_name:
description: description:

View file

@ -38,9 +38,8 @@ options:
description: description:
- Allows connection when SSL certificates are not valid. Set to - Allows connection when SSL certificates are not valid. Set to
false when certificates are not trusted. false when certificates are not trusted.
required: False
default: 'True' default: 'True'
choices: ['True', 'False'] type: bool
port: port:
description: description:
- The port number of the vSphere vCenter or ESXi server. - The port number of the vSphere vCenter or ESXi server.

View file

@ -1175,148 +1175,14 @@ lib/ansible/modules/cloud/univention/udm_user.py E324
lib/ansible/modules/cloud/univention/udm_user.py E325 lib/ansible/modules/cloud/univention/udm_user.py E325
lib/ansible/modules/cloud/univention/udm_user.py E326 lib/ansible/modules/cloud/univention/udm_user.py E326
lib/ansible/modules/cloud/vmware/_vsphere_guest.py E324 lib/ansible/modules/cloud/vmware/_vsphere_guest.py E324
lib/ansible/modules/cloud/vmware/_vsphere_guest.py E325
lib/ansible/modules/cloud/vmware/_vsphere_guest.py E326
lib/ansible/modules/cloud/vmware/vca_fw.py E322 lib/ansible/modules/cloud/vmware/vca_fw.py E322
lib/ansible/modules/cloud/vmware/vca_fw.py E325
lib/ansible/modules/cloud/vmware/vca_nat.py E322 lib/ansible/modules/cloud/vmware/vca_nat.py E322
lib/ansible/modules/cloud/vmware/vca_nat.py E324 lib/ansible/modules/cloud/vmware/vca_nat.py E324
lib/ansible/modules/cloud/vmware/vca_nat.py E325
lib/ansible/modules/cloud/vmware/vca_vapp.py E322 lib/ansible/modules/cloud/vmware/vca_vapp.py E322
lib/ansible/modules/cloud/vmware/vca_vapp.py E324 lib/ansible/modules/cloud/vmware/vca_vapp.py E324
lib/ansible/modules/cloud/vmware/vca_vapp.py E325
lib/ansible/modules/cloud/vmware/vcenter_folder.py E325
lib/ansible/modules/cloud/vmware/vcenter_folder.py E326
lib/ansible/modules/cloud/vmware/vcenter_license.py E322
lib/ansible/modules/cloud/vmware/vcenter_license.py E324
lib/ansible/modules/cloud/vmware/vcenter_license.py E325
lib/ansible/modules/cloud/vmware/vmware_cfg_backup.py E325
lib/ansible/modules/cloud/vmware/vmware_cfg_backup.py E326
lib/ansible/modules/cloud/vmware/vmware_cluster.py E325
lib/ansible/modules/cloud/vmware/vmware_cluster.py E326
lib/ansible/modules/cloud/vmware/vmware_datacenter.py E325
lib/ansible/modules/cloud/vmware/vmware_datacenter.py E326
lib/ansible/modules/cloud/vmware/vmware_datastore_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_datastore_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_dns_config.py E325
lib/ansible/modules/cloud/vmware/vmware_dns_config.py E326
lib/ansible/modules/cloud/vmware/vmware_drs_rule_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_drs_rule_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_dvs_host.py E324
lib/ansible/modules/cloud/vmware/vmware_dvs_host.py E325
lib/ansible/modules/cloud/vmware/vmware_dvs_host.py E326
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup.py E324
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup.py E325
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup.py E326
lib/ansible/modules/cloud/vmware/vmware_dvswitch.py E325
lib/ansible/modules/cloud/vmware/vmware_dvswitch.py E326
lib/ansible/modules/cloud/vmware/vmware_guest.py E322 lib/ansible/modules/cloud/vmware/vmware_guest.py E322
lib/ansible/modules/cloud/vmware/vmware_guest.py E324 lib/ansible/modules/cloud/vmware/vmware_guest.py E324
lib/ansible/modules/cloud/vmware/vmware_guest.py E325
lib/ansible/modules/cloud/vmware/vmware_guest.py E326
lib/ansible/modules/cloud/vmware/vmware_guest_disk_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_guest_disk_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_guest_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_guest_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py E322
lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py E323
lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py E324
lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py E325
lib/ansible/modules/cloud/vmware/vmware_guest_find.py E325
lib/ansible/modules/cloud/vmware/vmware_guest_find.py E326
lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py E322
lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py E324
lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py E325
lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py E326
lib/ansible/modules/cloud/vmware/vmware_guest_snapshot.py E324
lib/ansible/modules/cloud/vmware/vmware_guest_snapshot.py E325
lib/ansible/modules/cloud/vmware/vmware_guest_snapshot.py E326
lib/ansible/modules/cloud/vmware/vmware_guest_snapshot_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_guest_snapshot_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_guest_tools_wait.py E325
lib/ansible/modules/cloud/vmware/vmware_guest_tools_wait.py E326
lib/ansible/modules/cloud/vmware/vmware_host.py E324
lib/ansible/modules/cloud/vmware/vmware_host.py E325
lib/ansible/modules/cloud/vmware/vmware_host.py E326
lib/ansible/modules/cloud/vmware/vmware_host_acceptance.py E324
lib/ansible/modules/cloud/vmware/vmware_host_acceptance.py E325
lib/ansible/modules/cloud/vmware/vmware_host_acceptance.py E326
lib/ansible/modules/cloud/vmware/vmware_host_config_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_host_config_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_host_config_manager.py E324
lib/ansible/modules/cloud/vmware/vmware_host_config_manager.py E325
lib/ansible/modules/cloud/vmware/vmware_host_config_manager.py E326
lib/ansible/modules/cloud/vmware/vmware_host_datastore.py E325
lib/ansible/modules/cloud/vmware/vmware_host_datastore.py E326
lib/ansible/modules/cloud/vmware/vmware_host_dns_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_host_dns_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_host_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_host_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_host_firewall_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_host_firewall_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_host_firewall_manager.py E324
lib/ansible/modules/cloud/vmware/vmware_host_firewall_manager.py E325
lib/ansible/modules/cloud/vmware/vmware_host_firewall_manager.py E326
lib/ansible/modules/cloud/vmware/vmware_host_lockdown.py E325
lib/ansible/modules/cloud/vmware/vmware_host_lockdown.py E326
lib/ansible/modules/cloud/vmware/vmware_host_ntp.py E325
lib/ansible/modules/cloud/vmware/vmware_host_ntp.py E326
lib/ansible/modules/cloud/vmware/vmware_host_package_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_host_package_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_host_service_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_host_service_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_host_service_manager.py E324
lib/ansible/modules/cloud/vmware/vmware_host_service_manager.py E325
lib/ansible/modules/cloud/vmware/vmware_host_service_manager.py E326
lib/ansible/modules/cloud/vmware/vmware_host_vmnic_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_host_vmnic_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_local_role_manager.py E324
lib/ansible/modules/cloud/vmware/vmware_local_role_manager.py E325
lib/ansible/modules/cloud/vmware/vmware_local_role_manager.py E326
lib/ansible/modules/cloud/vmware/vmware_local_user_manager.py E325
lib/ansible/modules/cloud/vmware/vmware_local_user_manager.py E326
lib/ansible/modules/cloud/vmware/vmware_maintenancemode.py E322
lib/ansible/modules/cloud/vmware/vmware_maintenancemode.py E323
lib/ansible/modules/cloud/vmware/vmware_maintenancemode.py E325
lib/ansible/modules/cloud/vmware/vmware_maintenancemode.py E326
lib/ansible/modules/cloud/vmware/vmware_migrate_vmk.py E325
lib/ansible/modules/cloud/vmware/vmware_migrate_vmk.py E326
lib/ansible/modules/cloud/vmware/vmware_portgroup.py E324
lib/ansible/modules/cloud/vmware/vmware_portgroup.py E325
lib/ansible/modules/cloud/vmware/vmware_portgroup.py E326
lib/ansible/modules/cloud/vmware/vmware_resource_pool.py E324
lib/ansible/modules/cloud/vmware/vmware_resource_pool.py E325
lib/ansible/modules/cloud/vmware/vmware_resource_pool.py E326
lib/ansible/modules/cloud/vmware/vmware_target_canonical_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_target_canonical_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_vm_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_vm_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_vm_shell.py E324
lib/ansible/modules/cloud/vmware/vmware_vm_shell.py E325
lib/ansible/modules/cloud/vmware/vmware_vm_shell.py E326
lib/ansible/modules/cloud/vmware/vmware_vm_vm_drs_rule.py E324
lib/ansible/modules/cloud/vmware/vmware_vm_vm_drs_rule.py E325
lib/ansible/modules/cloud/vmware/vmware_vm_vm_drs_rule.py E326
lib/ansible/modules/cloud/vmware/vmware_vm_vss_dvs_migrate.py E325
lib/ansible/modules/cloud/vmware/vmware_vm_vss_dvs_migrate.py E326
lib/ansible/modules/cloud/vmware/vmware_vmkernel.py E322
lib/ansible/modules/cloud/vmware/vmware_vmkernel.py E323
lib/ansible/modules/cloud/vmware/vmware_vmkernel.py E325
lib/ansible/modules/cloud/vmware/vmware_vmkernel.py E326
lib/ansible/modules/cloud/vmware/vmware_vmkernel_facts.py E325
lib/ansible/modules/cloud/vmware/vmware_vmkernel_facts.py E326
lib/ansible/modules/cloud/vmware/vmware_vmkernel_ip_config.py E325
lib/ansible/modules/cloud/vmware/vmware_vmkernel_ip_config.py E326
lib/ansible/modules/cloud/vmware/vmware_vmotion.py E325
lib/ansible/modules/cloud/vmware/vmware_vmotion.py E326
lib/ansible/modules/cloud/vmware/vmware_vsan_cluster.py E325
lib/ansible/modules/cloud/vmware/vmware_vsan_cluster.py E326
lib/ansible/modules/cloud/vmware/vmware_vswitch.py E324
lib/ansible/modules/cloud/vmware/vmware_vswitch.py E325
lib/ansible/modules/cloud/vmware/vmware_vswitch.py E326
lib/ansible/modules/cloud/vmware/vsphere_copy.py E322 lib/ansible/modules/cloud/vmware/vsphere_copy.py E322
lib/ansible/modules/cloud/vmware/vsphere_copy.py E325
lib/ansible/modules/cloud/vmware/vsphere_copy.py E326
lib/ansible/modules/cloud/vultr/vr_account_facts.py E324 lib/ansible/modules/cloud/vultr/vr_account_facts.py E324
lib/ansible/modules/cloud/vultr/vr_dns_domain.py E323 lib/ansible/modules/cloud/vultr/vr_dns_domain.py E323
lib/ansible/modules/cloud/vultr/vr_dns_domain.py E324 lib/ansible/modules/cloud/vultr/vr_dns_domain.py E324
@ -1624,8 +1490,6 @@ lib/ansible/modules/net_tools/ldap/ldap_entry.py E324
lib/ansible/modules/net_tools/ldap/ldap_entry.py E325 lib/ansible/modules/net_tools/ldap/ldap_entry.py E325
lib/ansible/modules/net_tools/ldap/ldap_entry.py E326 lib/ansible/modules/net_tools/ldap/ldap_entry.py E326
lib/ansible/modules/net_tools/nmcli.py E324 lib/ansible/modules/net_tools/nmcli.py E324
lib/ansible/modules/net_tools/nmcli.py E325
lib/ansible/modules/net_tools/nmcli.py E326
lib/ansible/modules/net_tools/nsupdate.py E324 lib/ansible/modules/net_tools/nsupdate.py E324
lib/ansible/modules/net_tools/omapi_host.py E317 lib/ansible/modules/net_tools/omapi_host.py E317
lib/ansible/modules/net_tools/omapi_host.py E322 lib/ansible/modules/net_tools/omapi_host.py E322