aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorChristian Berendt <berendt@betacloud-solutions.de>2016-09-12 19:13:29 +0200
committerChristian Berendt <berendt@betacloud-solutions.de>2016-09-12 19:13:29 +0200
commit419e560d2b46bffb8659ed3b70eb49efa6a238c4 (patch)
tree9977c37415e05cb19833667b825212fb39050f34 /ansible
parent6417595b9f822c44a86bf1ac905f9ac19344000d (diff)
downloadkolla-419e560d2b46bffb8659ed3b70eb49efa6a238c4.tar.gz
kolla-419e560d2b46bffb8659ed3b70eb49efa6a238c4.zip
Check if libvirtd apparmor profiles exists before removal
TrivialFix Change-Id: Ifa6432f24d4eaa354b977b71a6dbcd5f5080e1b0
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/baremetal/tasks/post-install.yml9
1 files changed, 8 insertions, 1 deletions
diff --git a/ansible/roles/baremetal/tasks/post-install.yml b/ansible/roles/baremetal/tasks/post-install.yml
index 1fa91be1f..b5b88cae9 100644
--- a/ansible/roles/baremetal/tasks/post-install.yml
+++ b/ansible/roles/baremetal/tasks/post-install.yml
@@ -35,10 +35,17 @@
become: True
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
command: apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
become: True
- when: ansible_distribution == "Ubuntu"
+ when:
+ - ansible_distribution == "Ubuntu"
+ - apparmor_libvirtd_profile.stat.exists == True
- name: create docker group
group: