|
| 1 | +# virt-tasks - Ansible tasks for Linux KVM development |
| 2 | + |
| 3 | +Virtualization engineers often need to create specific environments for |
| 4 | +development and testing. Setting up specific software stacks including the host |
| 5 | +kernel, QEMU, libvirt, guest operating system, and guest applications can be |
| 6 | +tedious and time-consuming. |
| 7 | + |
| 8 | +virt-tasks is a collection of reusable Ansible tasks for common operations. Each |
| 9 | +task is documented and takes input `vars` that control its behavior. For |
| 10 | +example, the following playbook uses virt-tasks to create a Fedora 33 disk |
| 11 | +image: |
| 12 | + |
| 13 | +```yaml |
| 14 | +- remote_user: root |
| 15 | + hosts: kvm_hosts |
| 16 | + tasks: |
| 17 | + - name: install Fedora 33 disk image |
| 18 | + include_tasks: virt-tasks/tasks/virt-builder-create-image.yml |
| 19 | + vars: |
| 20 | + - os_version: fedora-33 |
| 21 | + - size: 32G |
| 22 | + - output: /var/lib/libvirt/images/fedora-33.img |
| 23 | + - format: raw |
| 24 | +``` |
| 25 | +
|
| 26 | +To see the available tasks, look in the `tasks/` directory. Each task includes |
| 27 | +documentation at the top of the file. |
| 28 | + |
| 29 | +## Status |
| 30 | + |
| 31 | +I am gradually adding reusable tasks as I need them in my day-to-day work. At |
| 32 | +the moment virt-tasks only offers a limited set of tasks. |
| 33 | + |
| 34 | +Tasks may be removed, renamed, or changed in incompatible ways, but a |
| 35 | +virt-tasks release will be published so your existing playbooks will not break. |
| 36 | + |
| 37 | +## Contributing |
| 38 | + |
| 39 | +Issues - Please create a GitLab Issue. |
| 40 | +Code - Please raise a GitLab Merge Request. |
| 41 | + |
| 42 | +## License |
| 43 | + |
| 44 | +virt-tasks is licensed under the GNU General Public License 3.0 or any later |
| 45 | +version. |
| 46 | + |
| 47 | +For questions about virt-tasks, please email Stefan Hajnoczi \<[email protected]\>. |
0 commit comments