blob: 873229b34286048c2b42ed531fcd79c34b3dd7b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
---
# It's important that we don't explicitly pull this image here. Otherwise we
# could result in upgrading a preinstalled environment. We'll have to set
# openshift_image_tag correctly for upgrades.
- name: Set version when containerized
command: >
docker run --rm {{ openshift.common.cli_image }} version
register: cli_image_version
when: openshift.common.is_containerized is defined and openshift.common.is_containerized | bool and openshift_image_tag is not defined
- set_fact:
l_image_tag: "{{ cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0:2] | join('-') if openshift.common.deployment_type == 'origin' else
cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0] }}"
when: openshift.common.is_containerized is defined and openshift.common.is_containerized | bool and openshift_image_tag is not defined
- set_fact:
l_image_tag: "{{ openshift_image_tag }}"
when: openshift.common.is_containerized is defined and openshift.common.is_containerized | bool and openshift_image_tag is defined
- name: Set post docker install facts
openshift_facts:
role: "{{ item.role }}"
local_facts: "{{ item.local_facts }}"
with_items:
- role: docker
local_facts:
openshift_image_tag: "{{ l_image_tag }}"
openshift_version: "{{ l_image_tag.split('-')[0] if l_image_tag is defined else '' | oo_image_tag_to_rpm_version }}"
when: openshift.common.is_containerized is defined and openshift.common.is_containerized | bool
|