Skip to content

Commit

Permalink
Merge pull request #46 from stackhpc/apparmor
Browse files Browse the repository at this point in the history
Update libvirt QEMU apparmor profile template
  • Loading branch information
markgoddard committed Mar 22, 2021
2 parents 05a3470 + 7e98a6f commit a8ccd60
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
name: libvirtd
state: restarted
become: true

- name: reload libvirt qemu apparmor profile template
command: apparmor_parser -r /etc/apparmor.d/libvirt/TEMPLATE.qemu
become: true
11 changes: 11 additions & 0 deletions tasks/post-install-Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,14 @@
vars:
libvirt_env_path: "{{ '/etc/default/libvirt-bin' if libvirt_bin_stat.stat.exists else '/etc/default/libvirtd' }}"
tags: vars

- name: Configure libvirt QEMU apparmor profile template
lineinfile:
path: "/etc/apparmor.d/libvirt/TEMPLATE.qemu"
insertbefore: "^}"
line: " {{ item.path }}/** rwk,"
become: true
when: item.type == "dir"
loop: "{{ libvirt_host_pools | flatten(levels=1) }}"
notify:
- reload libvirt qemu apparmor profile template

0 comments on commit a8ccd60

Please sign in to comment.