summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_node/tasks')
-rw-r--r--roles/openshift_node/tasks/main.yml13
-rw-r--r--roles/openshift_node/tasks/openvswitch_system_container.yml13
2 files changed, 22 insertions, 4 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index 87b1f6537..ca4fef360 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -2,9 +2,9 @@
# TODO: allow for overriding default ports where possible
- fail:
msg: "SELinux is disabled, This deployment type requires that SELinux is enabled."
- when: >
- (not ansible_selinux or ansible_selinux.status != 'enabled') and
- deployment_type in ['enterprise', 'online', 'atomic-enterprise', 'openshift-enterprise']
+ when:
+ - (not ansible_selinux or ansible_selinux.status != 'enabled') and deployment_type in ['enterprise', 'online', 'atomic-enterprise', 'openshift-enterprise']
+ - not openshift_docker_use_crio | default(false)
# https://docs.openshift.com/container-platform/3.4/admin_guide/overcommit.html#disabling-swap-memory
- name: Check for swap usage
@@ -66,6 +66,13 @@
- openshift.common.use_openshift_sdn | default(true) | bool
- not openshift.common.is_containerized | bool
+- name: Restart cri-o
+ systemd:
+ name: cri-o
+ enabled: yes
+ state: restarted
+ when: openshift_docker_use_crio | default(false)
+
- name: Install conntrack-tools package
package:
name: "conntrack-tools"
diff --git a/roles/openshift_node/tasks/openvswitch_system_container.yml b/roles/openshift_node/tasks/openvswitch_system_container.yml
index 34c2334d8..dc1df9185 100644
--- a/roles/openshift_node/tasks/openvswitch_system_container.yml
+++ b/roles/openshift_node/tasks/openvswitch_system_container.yml
@@ -1,4 +1,15 @@
---
+- set_fact:
+ l_use_crio: "{{ openshift_docker_use_crio | default(false) }}"
+
+- set_fact:
+ l_service_name: "cri-o"
+ when: l_use_crio
+
+- set_fact:
+ l_service_name: "{{ openshift.docker.service_name }}"
+ when: not l_use_crio
+
- name: Pre-pull OpenVSwitch system container image
command: >
atomic pull --storage=ostree {{ 'docker:' if openshift.common.system_images_registry == 'docker' else openshift.common.system_images_registry + '/' }}{{ openshift.node.ovs_system_image }}:{{ openshift_image_tag }}
@@ -11,4 +22,4 @@
image: "{{ 'docker:' if openshift.common.system_images_registry == 'docker' else openshift.common.system_images_registry + '/' }}{{ openshift.node.ovs_system_image }}:{{ openshift_image_tag }}"
state: latest
values:
- - "DOCKER_SERVICE={{ openshift.docker.service_name }}.service"
+ - "DOCKER_SERVICE={{ l_service_name }}"