Fix libvirt role
This commit is contained in:
parent
ca4e030293
commit
e79d25438f
3 changed files with 10 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
|||
when: ansible_facts['distribution'] == 'Archlinux'
|
||||
|
||||
- name: Add user to libvirt group
|
||||
become: true
|
||||
ansible.builtin.user:
|
||||
name: "{{ ansible_facts['env']['USER'] }}"
|
||||
append: true
|
||||
|
@ -37,6 +38,13 @@
|
|||
when: "'libvirt libvirt_guest' not in nsswitch_content"
|
||||
notify: Enable libvirtd service
|
||||
|
||||
- name: Create session pool dir
|
||||
ansible.builtin.file:
|
||||
path: "{{ pool_path }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
|
||||
- name: Define session pool
|
||||
community.libvirt.virt_pool:
|
||||
command: define
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<source>
|
||||
</source>
|
||||
<target>
|
||||
<path>/home/{{ ansible_facts['env']['USER'] }}/.local/libvirt/images</path>
|
||||
<path>{{ pool_path }}</path>
|
||||
<permissions>
|
||||
<mode>0711</mode>
|
||||
<owner>1000</owner>
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
pool_name: libvirt-pool
|
||||
pool_path: "{{ ansible_facts['env']['HOME'] }}/.local/libvirt/images"
|
||||
|
|
Loading…
Add table
Reference in a new issue