summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/tasks/systemd_units.yml
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2016-06-08 16:59:54 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2017-02-10 10:53:43 +0100
commit595f0f307aeb78de499891f21b99057a6e6b17f0 (patch)
tree2e4179deabde8c08b8a403cd69ea654fcc18d326 /roles/openshift_node/tasks/systemd_units.yml
parentfc96d8d22f6c277b599e6e2fa4e9cc06814a9460 (diff)
downloadopenshift-595f0f307aeb78de499891f21b99057a6e6b17f0.tar.gz
openshift-595f0f307aeb78de499891f21b99057a6e6b17f0.tar.bz2
openshift-595f0f307aeb78de499891f21b99057a6e6b17f0.tar.xz
openshift-595f0f307aeb78de499891f21b99057a6e6b17f0.zip
atomic-openshift: install as a system container
Use use_system_containers=true in the inventory file alternatively you can select each component as: use_openvswitch_system_container=true use_node_system_container=true use_master_system_container=true system_images_registry holds the registry from where to fetch system containers. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'roles/openshift_node/tasks/systemd_units.yml')
-rw-r--r--roles/openshift_node/tasks/systemd_units.yml26
1 files changed, 22 insertions, 4 deletions
diff --git a/roles/openshift_node/tasks/systemd_units.yml b/roles/openshift_node/tasks/systemd_units.yml
index 5243a87fe..941fd1d28 100644
--- a/roles/openshift_node/tasks/systemd_units.yml
+++ b/roles/openshift_node/tasks/systemd_units.yml
@@ -7,14 +7,14 @@
docker pull {{ openshift.node.node_image }}:{{ openshift_image_tag }}
register: pull_result
changed_when: "'Downloaded newer image' in pull_result.stdout"
- when: openshift.common.is_containerized | bool
+ when: openshift.common.is_containerized | bool and not openshift.common.is_node_system_container | bool
- name: Pre-pull openvswitch image
command: >
docker pull {{ openshift.node.ovs_image }}:{{ openshift_image_tag }}
register: pull_result
changed_when: "'Downloaded newer image' in pull_result.stdout"
- when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | bool
+ when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | bool and not openshift.common.is_node_system_container | bool
- name: Install Node dependencies docker service file
template:
@@ -28,7 +28,9 @@
dest: "/etc/systemd/system/{{ openshift.common.service_type }}-node.service"
src: openshift.docker.node.service
register: install_node_result
- when: openshift.common.is_containerized | bool
+ when:
+ - openshift.common.is_containerized | bool
+ - not openshift.common.is_node_system_container | bool
- name: Create the openvswitch service env file
template:
@@ -39,6 +41,19 @@
notify:
- restart openvswitch
+- name: Install Node system container
+ include: node_system_container.yml
+ when:
+ - openshift.common.is_containerized | bool
+ - openshift.common.is_node_system_container | bool
+
+- name: Install OpenvSwitch system containers
+ include: openvswitch_system_container.yml
+ when:
+ - openshift.common.use_openshift_sdn | default(true) | bool
+ - openshift.common.is_containerized | bool
+ - openshift.common.is_openvswitch_system_container | bool
+
# May be a temporary workaround.
# https://bugzilla.redhat.com/show_bug.cgi?id=1331590
- name: Create OpenvSwitch service.d directory
@@ -58,7 +73,10 @@
template:
dest: "/etc/systemd/system/openvswitch.service"
src: openvswitch.docker.service
- when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | default(true) | bool
+ when:
+ - openshift.common.is_containerized | bool
+ - openshift.common.use_openshift_sdn | default(true) | bool
+ - not openshift.common.is_openvswitch_system_container | bool
notify:
- restart openvswitch