Documentation

ovirt - oVirt/RHEV platform management

New in version 1.4.

Synopsis

allows you to create new instances, either from scratch or an image, in addition to deleting or stopping instances on the oVirt/RHEV platform

Requirements (on host that executes module)

  • python >= 2.6
  • ovirt-engine-sdk-python

Options

parameter required default choices comments
disk_alloc
no thin
  • thin
  • preallocated
define if disk is thin or preallocated
disk_int
no virtio
  • virtio
  • ide
interface type of the disk
image
no
    template to use for the instance
    instance_cores
    no 1
      define the instance's number of cores

      aliases: vmcores
      instance_cpus
      no 1
        the instance's number of cpu's

        aliases: vmcpus
        instance_disksize
        no
          size of the instance's disk in GB

          aliases: vm_disksize
          instance_mem
          no
            the instance's amount of memory in MB

            aliases: vmmem
            instance_name
            yes
              the name of the instance to use

              aliases: vmname
              instance_network
              no rhevm
                the logical network the machine should belong to

                aliases: vmnetwork
                instance_nic
                no
                  name of the network interface in oVirt/RHEV

                  aliases: vmnic
                  instance_os
                  no
                    type of Operating System

                    aliases: vmos
                    instance_type
                    no server
                    • server
                    • desktop
                    define if the instance is a server or desktop

                    aliases: vmtype
                    password
                    yes
                      password of the user to authenticate with
                      region
                      no
                        the oVirt/RHEV datacenter where you want to deploy to
                        resource_type
                        no
                        • new
                        • template
                        whether you want to deploy an image or create an instance from scratch.
                        sdomain
                        no
                          the Storage Domain where you want to create the instance's disk on.
                          state
                          no present
                          • present
                          • absent
                          • shutdown
                          • started
                          • restarted
                          create, terminate or remove instances
                          url
                          yes
                            the url of the oVirt instance
                            user
                            yes
                              the user to authenticate with
                              zone
                              no
                                deploy the image to this oVirt cluster

                                Examples

                                # Basic example provisioning from image.
                                
                                ovirt:
                                    user: admin@internal
                                    url: https://ovirt.example.com
                                    instance_name: ansiblevm04
                                    password: secret
                                    image: centos_64
                                    zone: cluster01
                                    resource_type: template"
                                
                                # Full example to create new instance from scratch
                                ovirt:
                                    instance_name: testansible
                                    resource_type: new
                                    instance_type: server
                                    user: admin@internal
                                    password: secret
                                    url: https://ovirt.example.com
                                    instance_disksize: 10
                                    zone: cluster01
                                    region: datacenter1
                                    instance_cpus: 1
                                    instance_nic: nic1
                                    instance_network: rhevm
                                    instance_mem: 1000
                                    disk_alloc: thin
                                    sdomain: FIBER01
                                    instance_cores: 1
                                    instance_os: rhel_6x64
                                    disk_int: virtio"
                                
                                # stopping an instance
                                ovirt:
                                    instance_name: testansible
                                    state: stopped
                                    user: admin@internal
                                    password: secret
                                    url: https://ovirt.example.com
                                
                                # starting an instance
                                ovirt:
                                    instance_name: testansible
                                    state: started
                                    user: admin@internal
                                    password: secret
                                    url: https://ovirt.example.com
                                

                                This is an Extras Module

                                For more information on what this means please read Extras Modules

                                For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.