Class: Ansible::Ruby::Modules::Virt

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/extras/cloud/misc/virt.rb

Overview

Manages virtual machines supported by I(libvirt).

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

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

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

Constructor Details

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

Instance Method Details

#command:create, ...

Returns in addition to state management, various non-idempotent commands are available. See examples.

Returns:

  • (:create, :status, :start, :stop, :pause, :unpause, :shutdown, :undefine, :destroy, :get_xml, :autostart, :freemem, :list_vms, :info, :nodeinfo, :virttype, :define, nil)

    in addition to state management, various non-idempotent commands are available. See examples



19
# File 'lib/ansible/ruby/modules/generated/extras/cloud/misc/virt.rb', line 19

attribute :command

#nameString

Returns name of the guest VM being managed. Note that VM must be previously defined with xml.

Returns:

  • (String)

    name of the guest VM being managed. Note that VM must be previously defined with xml.



11
# File 'lib/ansible/ruby/modules/generated/extras/cloud/misc/virt.rb', line 11

attribute :name

#state:running, ...

Returns Note that there may be some lag for state requests like C(shutdown) since these refer only to VM states. After starting a guest, it may not be immediately accessible.

Returns:

  • (:running, :shutdown, :destroyed, :paused, nil)

    Note that there may be some lag for state requests like C(shutdown) since these refer only to VM states. After starting a guest, it may not be immediately accessible.



15
# File 'lib/ansible/ruby/modules/generated/extras/cloud/misc/virt.rb', line 15

attribute :state

#uriString?

Returns libvirt connection uri.

Returns:

  • (String, nil)

    libvirt connection uri



23
# File 'lib/ansible/ruby/modules/generated/extras/cloud/misc/virt.rb', line 23

attribute :uri

#xmlString?

Returns XML document used with the define command.

Returns:

  • (String, nil)

    XML document used with the define command



27
# File 'lib/ansible/ruby/modules/generated/extras/cloud/misc/virt.rb', line 27

attribute :xml