## # This playbook creates a vm from a cloud image, using ansible and libvirt. # # It is mainly forked from here: https://github.com/SkullTech/scripts/blob/master/create-vm.yml # ## --- - name: Create a VM using a cloud image hosts: twice vars_prompt: - name: vmname prompt: Name of the VM private: no - name: hdd prompt: Disk capacity private: no default: 10G - name: ram prompt: "RAM" private: no default: 2048 - name: vcpus prompt: Num. of CPUs private: no default: 1 become: false gather_subset: ['!all'] roles: - create-vm