Skip to content

Commit a8ccd60

Browse files
authored
Merge pull request #46 from stackhpc/apparmor
Update libvirt QEMU apparmor profile template
2 parents 05a3470 + 7e98a6f commit a8ccd60

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

handlers/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@
55
name: libvirtd
66
state: restarted
77
become: true
8+
9+
- name: reload libvirt qemu apparmor profile template
10+
command: apparmor_parser -r /etc/apparmor.d/libvirt/TEMPLATE.qemu
11+
become: true

tasks/post-install-Debian.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,14 @@
2525
vars:
2626
libvirt_env_path: "{{ '/etc/default/libvirt-bin' if libvirt_bin_stat.stat.exists else '/etc/default/libvirtd' }}"
2727
tags: vars
28+
29+
- name: Configure libvirt QEMU apparmor profile template
30+
lineinfile:
31+
path: "/etc/apparmor.d/libvirt/TEMPLATE.qemu"
32+
insertbefore: "^}"
33+
line: " {{ item.path }}/** rwk,"
34+
become: true
35+
when: item.type == "dir"
36+
loop: "{{ libvirt_host_pools | flatten(levels=1) }}"
37+
notify:
38+
- reload libvirt qemu apparmor profile template

0 commit comments

Comments
 (0)