blob: 8d7686ffd824fdca370d812a31eba02348de6f18 (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
---
- openshift_facts:
role: common
local_facts:
deployment_type: "{{ openshift_deployment_type }}"
- name: Install clients
yum: pkg={{ openshift.common.service_type }}-clients state=installed
when: not openshift.common.is_containerized | bool
- name: List Docker images
command: >
docker images
register: docker_images
- name: Pull CLI Image
command: >
docker pull {{ openshift.common.cli_image }}
when: openshift.common.is_containerized | bool and openshift.common.cli_image not in docker_images.stdout
- name: Wait for CLI image
command: >
docker images
register: docker_images
until: openshift.common.cli_image in docker_images.stdout
retries: 30
delay: 10
changed_when: false
when: openshift.common.is_containerized | bool
- name: Create /usr/local/bin/openshift cli wrapper
template:
src: openshift.j2
dest: /usr/local/bin/openshift
mode: 0755
when: openshift.common.is_containerized | bool
- name: Create client symlinks
file:
path: "{{ item }}"
state: link
src: /usr/local/bin/openshift
with_items:
- /usr/local/bin/oadm
- /usr/local/bin/oc
- /usr/local/bin/kubectl
when: openshift.common.is_containerized | bool
|