Browse Source

Reset selinux context on /var/lib/origin/openshift.common.volumes

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1450167
Scott Dodson 8 years ago
parent
commit
0d4f8642e0
1 changed files with 6 additions and 0 deletions
  1. 6 0
      roles/openshift_node_upgrade/tasks/main.yml

+ 6 - 0
roles/openshift_node_upgrade/tasks/main.yml

@@ -127,6 +127,12 @@
   - openshift_disable_swap | default(true) | bool
   # End Disable Swap Block
 
+- name: Reset selinux context
+  command: restorecon -RF {{ openshift.common.data_dir }}/openshift.local.volumes
+  when:
+  - ansible_selinux is defined
+  - ansible_selinux.status == 'enabled'
+
 # Restart all services
 - include: restart.yml