Skip to content

Commit 2156bd3

Browse files
author
Will Miller
committed
Add default console log and iamge cache paths
1 parent 10f7947 commit 2156bd3

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ be preconfigured with libvirt/KVM.
1212
Role Variables
1313
--------------
1414

15+
- `libvirt_vm_default_console_log_dir`: The default directory in which to store
16+
VM console logs, if a VM-specific log file path is not given. Default is
17+
"/var/log/libvirt/qemu/".
18+
19+
- `libvirt_image_cache_path`: The directory in which to cache downloaded
20+
images. Default is "/tmp/".
21+
1522
- `libvirt_vm_engine`: virtualisation engine. If not set, the role will attempt
1623
to auto-detect the optimal engine to use.
1724

@@ -33,10 +40,10 @@ Role Variables
3340
- `vcpus`: the number of VCPU cores to assign to the VM.
3441

3542
- `machine`: Virtual machine type. Default is `None` if
36-
`engine` is `kvm`, otherwise `pc-1.0`.
43+
`libvirt_vm_engine` is `kvm`, otherwise `pc-1.0`.
3744

38-
- `cpu_mode`: Virtual machine CPU mode. Default is
39-
`host-passthrough` if `engine` is `kvm`, otherwise `host-model`.
45+
- `cpu_mode`: Virtual machine CPU mode. Default is `host-passthrough` if
46+
`libvirt_vm_engine` is `kvm`, otherwise `host-model`.
4047

4148
- `volumes`: a list of volumes to attach to the VM. Each volume is
4249
defined with the following dict:
@@ -54,9 +61,7 @@ Role Variables
5461
- `network`: Name of the network to which an interface should be attached.
5562

5663
- `console_log_path`: Path to console log file. Default is
57-
`/var/log/libvirt/qemu/{{ libvirt_vm_name }}-console.log`.
58-
59-
- `image_cache_path`: path to cache downloaded images.
64+
`{{ libvirt_vm_default_console_log_dir }}/{{ name }}-console.log`.
6065

6166

6267
N.B. the following variables are deprecated: `libvirt_vm_state`,

defaults/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
---
22

3+
# The default directory in which to store VM console logs, if a VM-specific log
4+
# file path is not given.
5+
libvirt_vm_default_console_log_dir: "/var/log/libvirt/qemu/"
6+
37
# Path to cache downloaded images.
4-
libvirt_image_cache_path:
8+
libvirt_image_cache_path: "/tmp/"
59

610
# CPU architecture.
711
libvirt_vm_arch: x86_64

0 commit comments

Comments
 (0)