summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-11-06 15:04:01 -0800
committerGitHub <noreply@github.com>2017-11-06 15:04:01 -0800
commitf6068e5ce99c91d0f6fb7f1a1bfc3b82dc9776af (patch)
tree98fc732a50193d1117b8b25edcabbd617e29609d /roles
parentbad24df56bfc7354d143a4b056bf7741688de03b (diff)
parent4688af8ab051b7ff0ad478e3bea101890703e989 (diff)
downloadopenshift-f6068e5ce99c91d0f6fb7f1a1bfc3b82dc9776af.tar.gz
openshift-f6068e5ce99c91d0f6fb7f1a1bfc3b82dc9776af.tar.bz2
openshift-f6068e5ce99c91d0f6fb7f1a1bfc3b82dc9776af.tar.xz
openshift-f6068e5ce99c91d0f6fb7f1a1bfc3b82dc9776af.zip
Merge pull request #6030 from giuseppe/fix-selinux-docker-too
Automatic merge from submit-queue. container-engine: ensure /var/lib/containers/ is properly labelled we were doing it only when CRI-O is installed. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1509880 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'roles')
-rw-r--r--roles/docker/tasks/main.yml9
-rw-r--r--roles/docker/tasks/systemcontainer_crio.yml4
2 files changed, 9 insertions, 4 deletions
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index c5a18a12c..3c814d8d8 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -25,6 +25,15 @@
- not l_use_system_container
- not l_use_crio_only
+- name: Ensure /var/lib/containers exists
+ file:
+ path: /var/lib/containers
+ state: directory
+
+- name: Fix SELinux Permissions on /var/lib/containers
+ command: "restorecon -R /var/lib/containers/"
+ changed_when: false
+
- name: Use System Container Docker if Requested
include: systemcontainer_docker.yml
when:
diff --git a/roles/docker/tasks/systemcontainer_crio.yml b/roles/docker/tasks/systemcontainer_crio.yml
index 67ede0d21..1e2d64293 100644
--- a/roles/docker/tasks/systemcontainer_crio.yml
+++ b/roles/docker/tasks/systemcontainer_crio.yml
@@ -170,10 +170,6 @@
dest: /etc/cni/net.d/openshift-sdn.conf
src: 80-openshift-sdn.conf.j2
-- name: Fix SELinux Permissions on /var/lib/containers
- command: "restorecon -R /var/lib/containers/"
- changed_when: false
-
- name: Start the CRI-O service
systemd:
name: "cri-o"