Class: Ansible::Ruby::Modules::Vsphere_guest
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Vsphere_guest
- 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
-
#cluster ⇒ Object?
The name of the cluster to create the VM in.
-
#esxi ⇒ Hash?
Dictionary which includes datacenter and hostname on which the VM should be created.
-
#force ⇒ :yes, ...
Boolean.
-
#from_template ⇒ :yes, ...
Specifies if the VM should be deployed from a template (mutually exclusive with ‘state’ parameter).
-
#guest ⇒ String
The virtual server name you wish to manage.
-
#password ⇒ String
Password of the user to connect to vcenter as.
-
#power_on_after_clone ⇒ :yes, ...
Specifies if the VM should be powered on after the clone.
-
#resource_pool ⇒ Object?
The name of the resource_pool to create the VM in.
-
#snapshot_to_clone ⇒ Object?
A string that when specified, will create a linked clone copy of the VM.
-
#state ⇒ :present, ...
Indicate desired state of the vm.
-
#template_src ⇒ Object?
Name of the source template to deploy from.
-
#username ⇒ String
Username to connect to vcenter as.
-
#validate_certs ⇒ :yes, ...
Validate SSL certs.
-
#vcenter_hostname ⇒ String
The hostname of the vcenter server the module will connect to, to create the guest.
-
#vm_disk ⇒ Hash?
A key, value list of disks and their sizes and which datastore to keep it in.
-
#vm_extra_config ⇒ Hash?
A key, value pair of any extra values you want set or changed in the vmx file of the VM.
-
#vm_hardware ⇒ Hash?
A key, value list of VM config settings.
-
#vm_hw_version ⇒ Object?
Desired hardware version identifier (for example, “vmx-08” for vms that needs to be managed with vSphere Client).
-
#vm_nic ⇒ Hash?
A key, value list of nics, their types and what network to put them on.,Optionaly with their MAC address.
-
#vmware_guest_facts ⇒ Symbol?
Gather facts from vCenter on a particular VM.
Methods inherited from Base
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
#cluster ⇒ Object?
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.
35 |
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 35 attribute :cluster |
#esxi ⇒ Hash?
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.
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.
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.
46 |
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 46 attribute :from_template |
#guest ⇒ String
Returns The virtual server name you wish to manage.
20 |
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 20 attribute :guest |
#password ⇒ String
Returns 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.
56 |
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 56 attribute :power_on_after_clone |
#resource_pool ⇒ Object?
Returns 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_clone ⇒ Object?
Returns 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.
42 |
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 42 attribute :state |
#template_src ⇒ Object?
Returns 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 |
#username ⇒ String
Returns 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.
16 |
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 16 attribute :validate_certs |
#vcenter_hostname ⇒ String
Returns 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_disk ⇒ Hash?
Returns 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_config ⇒ Hash?
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.
72 |
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 72 attribute :vm_extra_config |
#vm_hardware ⇒ Hash?
Returns 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_version ⇒ Object?
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.
76 |
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vsphere_guest.rb', line 76 attribute :vm_hw_version |
#vm_nic ⇒ Hash?
Returns 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_facts ⇒ Symbol?
Returns 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 |