Class: Ansible::Ruby::Modules::Vsphere_guest

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb

Overview

Create/delete/reconfigure a guest VM through VMware vSphere. This module has a dependency on pysphere >= 1.7

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#clusterObject?

Returns The name of the cluster to create the VM in. By default this is derived from the host you tell the module to build the guest on.

Returns:

  • (Object, nil)

    The name of the cluster to create the VM in. By default this is derived from the host you tell the module to build the guest on.



35
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 35

attribute :cluster

#esxiHash?

Returns Dictionary which includes datacenter and hostname on which the VM should be created. For standalone ESXi hosts, ha-datacenter should be used as the datacenter name.

Returns:

  • (Hash, nil)

    Dictionary which includes datacenter and hostname on which the VM should be created. For standalone ESXi hosts, ha-datacenter should be used as the datacenter name



38
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 38

attribute :esxi

#force:yes, ...

Returns Boolean. Allows you to run commands which may alter the running state of a guest. Also used to reconfigure and destroy.

Returns:

  • (:yes, :no, nil)

    Boolean. Allows you to run commands which may alter the running state of a guest. Also used to reconfigure and destroy.



83
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 83

attribute :force

#from_template:yes, ...

Returns 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.

Returns:

  • (:yes, :no, nil)

    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.



46
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 46

attribute :from_template

#guestString

Returns The virtual server name you wish to manage.

Returns:

  • (String)

    The virtual server name you wish to manage.



20
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 20

attribute :guest

#passwordString

Returns Password of the user to connect to vcenter as.

Returns:

  • (String)

    Password of the user to connect to vcenter as.



28
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 28

attribute :password

#power_on_after_clone:yes, ...

Returns Specifies if the VM should be powered on after the clone.

Returns:

  • (:yes, :no, nil)

    Specifies if the VM should be powered on after the clone.



56
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 56

attribute :power_on_after_clone

#resource_poolObject?

Returns The name of the resource_pool to create the VM in.

Returns:

  • (Object, nil)

    The name of the resource_pool to create the VM in.



32
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 32

attribute :resource_pool

#snapshot_to_cloneObject?

Returns A string that when specified, will create a linked clone copy of the VM. Snapshot must already be taken in vCenter.

Returns:

  • (Object, nil)

    A string that when specified, will create a linked clone copy of the VM. Snapshot must already be taken in vCenter.



53
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 53

attribute :snapshot_to_clone

#state:present, ...

Returns Indicate desired state of the vm. ‘reconfigured’ only applies changes to ‘vm_cdrom’, ‘memory_mb’, and ‘num_cpus’ in vm_hardware parameter. The ‘memory_mb’ and ‘num_cpus’ changes are applied to powered-on vms when hot-plugging is enabled for the guest.

Returns:

  • (:present, :powered_off, :absent, :powered_on, :restarted, :reconfigured, :reboot_guest, :poweroff_guest, nil)

    Indicate desired state of the vm. ‘reconfigured’ only applies changes to ‘vm_cdrom’, ‘memory_mb’, and ‘num_cpus’ in vm_hardware parameter. The ‘memory_mb’ and ‘num_cpus’ changes are applied to powered-on vms when hot-plugging is enabled for the guest.



42
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 42

attribute :state

#template_srcObject?

Returns Name of the source template to deploy from.

Returns:

  • (Object, nil)

    Name of the source template to deploy from



50
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 50

attribute :template_src

#usernameString

Returns Username to connect to vcenter as.

Returns:

  • (String)

    Username to connect to vcenter as.



24
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 24

attribute :username

#validate_certs:yes, ...

Returns Validate SSL certs. Note, if running on python without SSLContext support (typically, python < 2.7.9) you will have to set this to C(no) as pysphere does not support validating certificates on older python. Prior to 2.1, this module would always validate on python >= 2.7.9 and never validate on python <= 2.7.8.

Returns:

  • (:yes, :no, nil)

    Validate SSL certs. Note, if running on python without SSLContext support (typically, python < 2.7.9) you will have to set this to C(no) as pysphere does not support validating certificates on older python. Prior to 2.1, this module would always validate on python >= 2.7.9 and never validate on python <= 2.7.8.



16
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 16

attribute :validate_certs

#vcenter_hostnameString

Returns The hostname of the vcenter server the module will connect to, to create the guest.

Returns:

  • (String)

    The hostname of the vcenter server the module will connect to, to create the guest.



12
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 12

attribute :vcenter_hostname

#vm_diskHash?

Returns A key, value list of disks and their sizes and which datastore to keep it in.

Returns:

  • (Hash, nil)

    A key, value list of disks and their sizes and which datastore to keep it in.



60
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 60

attribute :vm_disk

#vm_extra_configHash?

Returns A key, value pair of any extra values you want set or changed in the vmx file of the VM. Useful to set advanced options on the VM.

Returns:

  • (Hash, nil)

    A key, value pair of any extra values you want set or changed in the vmx file of the VM. Useful to set advanced options on the VM.



72
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 72

attribute :vm_extra_config

#vm_hardwareHash?

Returns A key, value list of VM config settings. Must include [‘memory_mb’, ‘num_cpus’, ‘osid’, ‘scsi’].

Returns:

  • (Hash, nil)

    A key, value list of VM config settings. Must include [‘memory_mb’, ‘num_cpus’, ‘osid’, ‘scsi’].



64
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 64

attribute :vm_hardware

#vm_hw_versionObject?

Returns Desired hardware version identifier (for example, “vmx-08” for vms that needs to be managed with vSphere Client). Note that changing hardware version of existing vm is not supported.

Returns:

  • (Object, nil)

    Desired hardware version identifier (for example, “vmx-08” for vms that needs to be managed with vSphere Client). Note that changing hardware version of existing vm is not supported.



76
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 76

attribute :vm_hw_version

#vm_nicHash?

Returns A key, value list of nics, their types and what network to put them on.,Optionaly with their MAC address.

Returns:

  • (Hash, nil)

    A key, value list of nics, their types and what network to put them on.,Optionaly with their MAC address.



68
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 68

attribute :vm_nic

#vmware_guest_factsSymbol?

Returns Gather facts from vCenter on a particular VM.

Returns:

  • (Symbol, nil)

    Gather facts from vCenter on a particular VM



79
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 79

attribute :vmware_guest_facts