simple ansible role, which installs libvirt on a server and can create vms
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Carl Suckfuell 421b6e79b9 set the autostart on all new vms 3 months ago
group_vars add the current state of the vmsetup 3 months ago
host_vars/vmserver add the current state of the vmsetup 3 months ago
roles set the autostart on all new vms 3 months ago
.gitignore gitignore was ignored :D. but we want to ingnore a future vault_pass 3 months ago
Readme.md add the current state of the vmsetup 3 months ago
ansible.cfg add the current state of the vmsetup 3 months ago
create-vm.yml get it actually working, with the correct cloudimage and stuff ;P 3 months ago
hosts add the current state of the vmsetup 3 months ago
setup-libvirt.yml add the current state of the vmsetup 3 months ago

Readme.md

VM setup

This repo uses ansible to make the git setup (and potential further service deployments) comprehensible for future maintenance.

It is a basic ansible repo with to main roles:

  • libvirt for vm creation

Other services could be added as further roles.

The playbooks

Ansible uses playbooks, to configure the hardware as wished. The roles should be indempotent and could be run arbitraryly often.

The libvirt setup

The role installs libvirt on the vmhost and uses virt-install and debian cloud images to create the vms.

Run it with

ansible-playbook -D create-vm.yml

It asks the user a few questions and create a new entry for the new vm in this repository. Please push it to master afterwards.

Vaults

Sensible information is encrypted and stored inside a so called vault. One example is roles/git/vars/vault It is decrypted on the fly, when using a playbook. To be able to decrypt the vault, you need a password file called vault_pass which has to be copied manually into the repo. It is explicitly excluded from git. Ask Carl for vault_pass.

Use ansible-vault to mess around with the vault files manually.