Using Ansible Playbooks to Install oVirt 4.1 on centOS 7 (Linode)

21 May 2017

In my previous post, I played around how to install ovirt-engine on a remote VM.

Turns out we can automate the whole process using ansible playbooks!

Secondly, I have thought of shifting from digitalocean to linode. Why?

Well, first off. It’s not that I don’t like digitalocean. It’s just that the prices for the VMS that I provisioning, are getting too high for me.

For a 4GB VM with 2 cores and 60GB of SSD to spare with. I am getting some 4TB of network I/O. 4TB for me is generous. All this adds up to a damage of $40/month or roughly speaking, $0.060/hour.

If you compare this to that of Linode’s offerings. I am getting the same 4GB VM with 48GB SSD Storage. 2 CPU Cores and 3TB XFER. This costs $20/mo or (.03/hr)

That’s like half of what I was paying to digitalocean for my servers! But the ease of use for digitalocean is pretty good. The only reason that I see if I want to use digitalocean for my VM’s would be if I wanted low latency. As the closest datecenter to me for linode is in Singapore. While we digitalcoean has a datacenter around in bangalore.

Enough of me ranting around.

Show me the Code

The playbook is already up there on github which holds the ansible roles for quite a many things.

Having a quick look at them

I would be showing around the role ovirt-engine-setup in this post.

Provision your server and ssh into it.

I have created an entry on my /etc/hosts on my local dev box for the VM where I am going to install ovirt-engine.

$ cat /etc/hosts | grep gsoc would be the public IP of your server.

You have to change the hostname of your server. Will explaing the why in a bit.

$ ssh's password:
[root@ovirtlinode ~]# hostname
[root@ovirtlinode ~]# hostname
[root@ovirtlinode ~]#

Now from your local dev box

$ git clone
$ cd ovirt-ansible/
$ touch site.yml inventory

The contents of the file above should be in the lines of

$ cat inventory 
# Make sure that link to release rpm is working!!!
[engine] ansible_ssh_user=root ansible_ssh_pass=secretpassword
$ cat site.yml
- hosts: engine
- role: ovirt-common
- role: ovirt-engine-install-packages
- role: ovirt-engine-setup

A quick note on the variable ansible_ssh_pass=secretpassword. This is not adviced! Don’t do this as now obviously your ssh password is stored in a text file which can be read by anyone. And god forbid if you add this file to version control accidentally and push it.

Rule of thumb is to always use ssh keys to run playbooks!

After this, we need to check the ansible fact ansible_fqdn. This one is important, as the we will be accessing the Admin panel of ovirt-engine using the FQDN of this value. Otherwise our ansible playbook won’t work.

$ ansible -m setup -i inventory engine -a 'filter=ansible_fqdn' | SUCCESS => {
"ansible_facts": {
"ansible_fqdn": ""
"changed": false

Running the playbook, assuming you are on ovirt-ansible/ dir

$ ansible-playbook site.yml -i inventory -vvv

This might take a few minutes to get done. Get a coffee or read some xkcd while it does its thing.

You can now access the admin panel through the url

The url would obviously be different for you, citing the FQDN you decided to use during the installation process.


Originally published at on May 21, 2017.