diff --git a/ansible/roles/baremetal/tasks/post-install.yml b/ansible/roles/baremetal/tasks/post-install.yml index 55d31d836b92f8b4975703f7f64a9c5f81d1c937..1c23a49b70e32426901950745be9759c1d7cf66b 100644 --- a/ansible/roles/baremetal/tasks/post-install.yml +++ b/ansible/roles/baremetal/tasks/post-install.yml @@ -201,7 +201,11 @@ when: ansible_facts.distribution == "Ubuntu" - name: Remove apparmor profile for libvirt - command: apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd + shell: | + apparmor_parser -v -R /etc/apparmor.d/usr.sbin.libvirtd && \ + ln -vsf /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable + args: + executable: /bin/bash become: True when: - ansible_facts.distribution == "Ubuntu" diff --git a/releasenotes/notes/fix-apparmor-libvirt-profile-removal-01db6ca6dd66879f.yaml b/releasenotes/notes/fix-apparmor-libvirt-profile-removal-01db6ca6dd66879f.yaml new file mode 100644 index 0000000000000000000000000000000000000000..80d800e26d9423e6f62080839171616e3d5fc36b --- /dev/null +++ b/releasenotes/notes/fix-apparmor-libvirt-profile-removal-01db6ca6dd66879f.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixes the baremetal role to avoid an error "Unable to remove "libvirtd". + Now the symlink /etc/apparmor.d/disable/usr.sbin.libvirtd is created by + the role. + `LP#1960302 <https://bugs.launchpad.net/kolla-ansible/+bug/1960302>`__