Skip to content

Commit c39cf58

Browse files
authored
Merge pull request #44 from mtb-xt/archlinuxify
Archlinux support, libvirt zfs pool support.
2 parents 6f4ab93 + 2c803f1 commit c39cf58

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Role Variables
8282
- `device`: `disk` or `cdrom`
8383
- `capacity`: volume capacity (can be suffixed with M,G,T or MB,GB,TB, etc) (required when type is `disk`)
8484
- `format`: options include `raw`, `qcow2`, `vmdk`. See `man virsh` for the
85-
full range. Default is `qcow2`
85+
full range. Default is `qcow2`.
8686
- `image`: (optional) a URL to an image with which the volume is initalised (full copy).
8787
- `backing_image`: (optional) name of the backing volume which is assumed to already be the same pool (copy-on-write).
8888
- `image` and `backing_image` are mutually exclusive options.

meta/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ galaxy_info:
1717
- name: Debian
1818
versions:
1919
- all
20+
- name: ArchLinux
21+
versions:
22+
- all
2023
galaxy_tags:
2124
- cloud
2225
- kvm

templates/vm.xml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
<source pool='{{ volume.pool }}' volume='{{ volume.name }}'/>
4040
{% endif %}
4141
{% if volume.target is undefined %}
42-
<target dev='vd{{ 'abcdefghijklmnopqrstuvwxyz'[loop.index - 1] }}'/>
42+
<target dev='vd{{ 'abcdefghijklmnopqrstuvwxyz'[loop.index - 1] }}' {% if volume.device | default(libvirt_volume_default_device) == 'cdrom' %}bus='sata'{% endif %}/>
4343
{% else %}
44-
<target dev='{{ volume.target }}' />
44+
<target dev='{{ volume.target }}' {% if volume.device | default(libvirt_volume_default_device) == 'cdrom' %}bus='sata'{% endif %}/>
4545
{% endif %}
4646
</disk>
4747
{% endfor %}

vars/Archlinux.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
# Who owns the serial console logs in console_log_path
3+
libvirt_vm_log_owner: root
4+
5+
# The environment passed to virt_volume.sh
6+
libvirt_vm_script_env_arch: {}
7+
8+
libvirt_vm_script_env: >-
9+
{{ libvirt_vm_script_env_arch | combine(libvirt_vm_virsh_default_env) }}
10+
11+
# Archlinux qemu comes with kvm support compiled in
12+
libvirt_vm_emulator: /usr/bin/qemu-system-x86_64

0 commit comments

Comments
 (0)