Class: Ansible::Ruby::Modules::Vmware_host

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

Overview

This module can be used to add / remove / reconnect an ESXi host to / from vCenter.

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

#add_connectedBoolean?

Returns If set to C(True), then the host should be connected as soon as it is added.,This parameter is ignored if state is set to a value other than C(present).

Returns:

  • (Boolean, nil)

    If set to C(True), then the host should be connected as soon as it is added.,This parameter is ignored if state is set to a value other than C(present).



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

attribute :add_connected

#cluster_nameString?

Returns Name of the cluster to add the host.,If C(folder) is not set, then this parameter is required.,Aliases added in version 2.6.

Returns:

  • (String, nil)

    Name of the cluster to add the host.,If C(folder) is not set, then this parameter is required.,Aliases added in version 2.6.



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

attribute :cluster_name

#datacenter_nameString

Returns Name of the datacenter to add the host.,Aliases added in version 2.6.

Returns:

  • (String)

    Name of the datacenter to add the host.,Aliases added in version 2.6.



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

attribute :datacenter_name

#esxi_hostnameString

Returns ESXi hostname to manage.

Returns:

  • (String)

    ESXi hostname to manage.



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

attribute :esxi_hostname

#esxi_passwordString?

Returns ESXi password.,Required for adding a host.,Optional for reconnect.,Unused for removing.,No longer a required parameter from version 2.5.

Returns:

  • (String, nil)

    ESXi password.,Required for adding a host.,Optional for reconnect.,Unused for removing.,No longer a required parameter from version 2.5.



36
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vmware_host.rb', line 36

attribute :esxi_password

#esxi_ssl_thumbprintString?

Returns Specifying the hostsystem certificate’s thumbprint.,Use following command to get hostsystem certificate’s thumbprint - ,# openssl x509 -in /etc/vmware/ssl/rui.crt -fingerprint -sha1 -noout.

Returns:

  • (String, nil)

    Specifying the hostsystem certificate’s thumbprint.,Use following command to get hostsystem certificate’s thumbprint - ,# openssl x509 -in /etc/vmware/ssl/rui.crt -fingerprint -sha1 -noout



44
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vmware_host.rb', line 44

attribute :esxi_ssl_thumbprint

#esxi_usernameString?

Returns ESXi username.,Required for adding a host.,Optional for reconnect.,Unused for removing.,No longer a required parameter from version 2.5.

Returns:

  • (String, nil)

    ESXi username.,Required for adding a host.,Optional for reconnect.,Unused for removing.,No longer a required parameter from version 2.5.



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

attribute :esxi_username

#folderString?

Returns Name of the folder under which host to add.,If C(cluster_name) is not set, then this parameter is required.,For example, if there is a datacenter ‘dc1’ under folder called ‘Site1’ then, this value will be ‘/Site1/dc1/host’.,Here ‘host’ is an invisible folder under VMware Web Client.,Another example, if there is a nested folder structure like ‘/myhosts/india/pune’ under datacenter ‘dc2’, then C(folder) value will be ‘/dc2/host/myhosts/india/pune’.,Other Examples: , - ‘/Site2/dc2/Asia-Cluster/host’, - ‘/dc3/Asia-Cluster/host’.

Returns:

  • (String, nil)

    Name of the folder under which host to add.,If C(cluster_name) is not set, then this parameter is required.,For example, if there is a datacenter ‘dc1’ under folder called ‘Site1’ then, this value will be ‘/Site1/dc1/host’.,Here ‘host’ is an invisible folder under VMware Web Client.,Another example, if there is a nested folder structure like ‘/myhosts/india/pune’ under datacenter ‘dc2’, then C(folder) value will be ‘/dc2/host/myhosts/india/pune’.,Other Examples: , - ‘/Site2/dc2/Asia-Cluster/host’, - ‘/dc3/Asia-Cluster/host’



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

attribute :folder

#state:present, ...

Returns If set to C(present), then add the host if host is absent.,If set to C(present), then do nothing if host already exists.,If set to C(absent), then remove the host if host is present.,If set to C(absent), then do nothing if host already does not exists.,If set to C(add_or_reconnect), then add the host if it’s absent else reconnect it.,If set to C(reconnect), then reconnect the host if it’s present else fail.

Returns:

  • (:present, :absent, :add_or_reconnect, :reconnect, nil)

    If set to C(present), then add the host if host is absent.,If set to C(present), then do nothing if host already exists.,If set to C(absent), then remove the host if host is present.,If set to C(absent), then do nothing if host already does not exists.,If set to C(add_or_reconnect), then add the host if it’s absent else reconnect it.,If set to C(reconnect), then reconnect the host if it’s present else fail.



40
# File 'lib/ansible/ruby/modules/generated/cloud/vmware/vmware_host.rb', line 40

attribute :state