??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
ßUdac @` s8 d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d d
l Z y* d d l
m Z d d l m
Z
e Z Wn e k
r› e Z n Xd d
l m Z d „ Z d „ Z d „ Z d
d
d
d
d
d
d
d
d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z e d k r4e ƒ n d
S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bysG
---
module: ovirt
author:
- Vincent Van der Kussen (@vincentvdk)
short_description: oVirt/RHEV platform management
description:
- This module only supports oVirt/RHEV version 3. A newer module M(ovirt_vm) supports oVirt/RHV version 4.
- Allows you to create new instances, either from scratch or an image, in addition to deleting or stopping instances on the oVirt/RHEV platform.
version_added: "1.4"
options:
user:
description:
- The user to authenticate with.
required: true
url:
description:
- The url of the oVirt instance.
required: true
instance_name:
description:
- The name of the instance to use.
required: true
aliases: [ vmname ]
password:
description:
- Password of the user to authenticate with.
required: true
image:
description:
- The template to use for the instance.
resource_type:
description:
- Whether you want to deploy an image or create an instance from scratch.
choices: [ new, template ]
zone:
description:
- Deploy the image to this oVirt cluster.
instance_disksize:
description:
- Size of the instance's disk in GB.
aliases: [ vm_disksize]
instance_cpus:
description:
- The instance's number of CPUs.
default: 1
aliases: [ vmcpus ]
instance_nic:
description:
- The name of the network interface in oVirt/RHEV.
aliases: [ vmnic ]
instance_network:
description:
- The logical network the machine should belong to.
default: rhevm
aliases: [ vmnetwork ]
instance_mem:
description:
- The instance's amount of memory in MB.
aliases: [ vmmem ]
instance_type:
description:
- Define whether the instance is a server, desktop or high_performance.
- I(high_performance) is supported since Ansible 2.5 and oVirt/RHV 4.2.
choices: [ desktop, server, high_performance ]
default: server
aliases: [ vmtype ]
disk_alloc:
description:
- Define whether disk is thin or preallocated.
choices: [ preallocated, thin ]
default: thin
disk_int:
description:
- Interface type of the disk.
choices: [ ide, virtio ]
default: virtio
instance_os:
description:
- Type of Operating System.
aliases: [ vmos ]
instance_cores:
description:
- Define the instance's number of cores.
default: 1
aliases: [ vmcores ]
sdomain:
description:
- The Storage Domain where you want to create the instance's disk on.
region:
description:
- The oVirt/RHEV datacenter where you want to deploy to.
instance_dns:
description:
- Define the instance's Primary DNS server.
aliases: [ dns ]
version_added: "2.1"
instance_domain:
description:
- Define the instance's Domain.
aliases: [ domain ]
version_added: "2.1"
instance_hostname:
description:
- Define the instance's Hostname.
aliases: [ hostname ]
version_added: "2.1"
instance_ip:
description:
- Define the instance's IP.
aliases: [ ip ]
version_added: "2.1"
instance_netmask:
description:
- Define the instance's Netmask.
aliases: [ netmask ]
version_added: "2.1"
instance_rootpw:
description:
- Define the instance's Root password.
aliases: [ rootpw ]
version_added: "2.1"
instance_key:
description:
- Define the instance's Authorized key.
aliases: [ key ]
version_added: "2.1"
state:
description:
- Create, terminate or remove instances.
choices: [ absent, present, restarted, shutdown, started ]
default: present
requirements:
- ovirt-engine-sdk-python
sœ
- name: Basic example to provision from image
ovirt:
user: admin@internal
url: https://ovirt.example.com
instance_name: ansiblevm04
password: secret
image: centos_64
zone: cluster01
resource_type: template
- name: 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
- name: Stopping an existing instance
ovirt:
instance_name: testansible
state: stopped
user: admin@internal
password: secret
url: https://ovirt.example.com
- name: Start an existing instance
ovirt:
instance_name: testansible
state: started
user: admin@internal
password: secret
url: https://ovirt.example.com
- name: Start an instance with cloud init information
ovirt:
instance_name: testansible
state: started
user: admin@internal
password: secret
url: https://ovirt.example.com
hostname: testansible
domain: ansible.local
ip: 192.0.2.100
netmask: 255.255.255.0
gateway: 192.0.2.1
rootpw: bigsecret
N( t API( t params( t
AnsibleModulec C` sU t d | d | d | d t ƒ } y | j ƒ } Wn t k
rP t d ƒ ‚ n X| S( Nt urlt usernamet passwordt insecures! error connecting to the oVirt API( R t Truet testt Exception( R t userR
t apit value( ( sD /usr/lib/python2.7/site-packages/ansible/modules/cloud/misc/ovirt.pyt connã s !
c C` sÿ | d k r%t j d | d | j j d | ƒ d t j d | ƒ d | j j d d ƒ d d t | ƒ d
t j d t j d t | ƒ ƒ ƒ d | ƒ } t j d
d t | ƒ d t
d t
d |
d d d d d t j d | j j d |
ƒ g ƒ ƒ } t j
d | ƒ } t j d d d | d d ƒ } n%| d k rJt j d | d | j j d | ƒ d t j d | ƒ d | j j d d ƒ d d! t | ƒ d
t j d t j d t | ƒ ƒ ƒ d | ƒ } t j d
d# t | ƒ d t
d t d |
d d d d d t j d | j j d |
ƒ g ƒ ƒ } t j
d | ƒ } t j d | d | d d ƒ } n y | j j | ƒ Wn t k
r}t d ƒ ‚ n X| j j d | ƒ } y | j j | ƒ Wn t k
rÆt d ƒ ‚ n Xy | j j | ƒ Wn t k
rút d ƒ ‚ n Xd S($ Nt thint namet clustert ost type_t templatet Blankt memoryi t cput topologyt corest sizet wipe_after_deletet sparset interfacet Systemt formatt cowt storage_domainst storage_domaint nic1t networkt virtiot preallocatedt raws+ Error creating VM with specified parameterss Error attaching disks Error adding nici i i @i i i @( R t VMt clusterst gett OperatingSystemt templatest intt CPUt CpuTopologyt DiskR t StorageDomainst storagedomainst Networkt NICt Falset vmst addR t diskst nics( R t vmtypet vmnamet zonet vmdisk_sizet vmcpust vmnict vmnetworkt vmmemt vmdisk_alloct sdomaint vmcorest vmost
vmdisk_intt vmparamst vmdiskt network_nett nic_net1t vm( ( sD /usr/lib/python2.7/site-packages/ansible/modules/cloud/misc/ovirt.pyt create_vmî s<