Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrlesmithjr/ansible-kvm
https://github.com/mrlesmithjr/ansible-kvm
ansible ansible-role kvm libvirt
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/mrlesmithjr/ansible-kvm
- Owner: mrlesmithjr
- License: mit
- Created: 2015-10-12T14:29:08.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-05-29T14:33:21.000Z (over 1 year ago)
- Last Synced: 2024-09-30T17:41:22.975Z (about 1 month ago)
- Topics: ansible, ansible-role, kvm, libvirt
- Language: Jinja
- Size: 128 KB
- Stars: 53
- Watchers: 8
- Forks: 51
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ansible-kvm
An [Ansible](https://www.ansible.com) role to install [KVM](https://www.linux-kvm.org/page/Main_Page)
## Requirements
Install [required](./requirements.yml) [Ansible](https://www.ansible.com) roles:
```bash
sudo ansible-galaxy install -r requirements.yml
```## Role Variables
[defaults/main.yml](defaults/main.yml)
## Dependencies
None
## Example Playbook
```yaml
- hosts: kvm_hosts
vars: {}
roles:
- role: ansible-kvm
tasks: []
```## Booting a VM from ISO
You can boot a defined VM up with an ISO by using the following example:
> NOTE: Defined in your vars. Also, ensure that the default
> `kvm_manage_vms: false` is changed to `kvm_manage_vms: true`.```yaml
kvm_manage_vms: true
kvm_vms:
- name: test_vm
autostart: true
# Define boot devices in order of preference
boot_devices:
- cdrom
- network
- hd
cdrom:
source: /path/to/iso
graphics: false
# Define disks in MB
disks:
- disk_driver: virtio
name: test_vm.1
size: 36864
memory: 512
network_interfaces:
- source: default
network_driver: virtio
portgroup: vlan-102
type: network
state: running
vcpu: 1
```## License
MIT
## Author Information
Larry Smith Jr.
- [@mrlesmithjr](https://www.twitter.com/mrlesmithjr)
- [EverythingShouldBeVirtual](http://everythingshouldbevirtual.com)
- [[email protected]](mailto:[email protected])