Check if libvirtd apparmor profiles exists before removal
TrivialFix Change-Id: Ifa6432f24d4eaa354b977b71a6dbcd5f5080e1b0
This commit is contained in:
parent
6417595b9f
commit
419e560d2b
@ -35,10 +35,17 @@
|
|||||||
become: True
|
become: True
|
||||||
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version < "15")
|
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version < "15")
|
||||||
|
|
||||||
|
- name: get stat of libvirtd apparmor profile
|
||||||
|
stat: path=/etc/apparmor.d/usr.sbin.libvirtd
|
||||||
|
register: apparmor_libvirtd_profile
|
||||||
|
when: ansible_distribution == "Ubuntu"
|
||||||
|
|
||||||
- name: remove apparmor profile for libvirt
|
- name: remove apparmor profile for libvirt
|
||||||
command: apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
|
command: apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
|
||||||
become: True
|
become: True
|
||||||
when: ansible_distribution == "Ubuntu"
|
when:
|
||||||
|
- ansible_distribution == "Ubuntu"
|
||||||
|
- apparmor_libvirtd_profile.stat.exists == True
|
||||||
|
|
||||||
- name: create docker group
|
- name: create docker group
|
||||||
group:
|
group:
|
||||||
|
Loading…
Reference in New Issue
Block a user