summaryrefslogtreecommitdiffstats
path: root/roles/openshift_cli/tasks
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2016-07-18 12:45:35 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2016-07-21 12:06:33 -0300
commitca7767eab6674737a117a09f7f456b7918cffecf (patch)
treea61dd4214796431eff590a93a7e6211b515c7fe1 /roles/openshift_cli/tasks
parent3a71ccde5c1a0324648516f761515c09bc461be3 (diff)
downloadopenshift-ca7767eab6674737a117a09f7f456b7918cffecf.tar.gz
openshift-ca7767eab6674737a117a09f7f456b7918cffecf.tar.bz2
openshift-ca7767eab6674737a117a09f7f456b7918cffecf.tar.xz
openshift-ca7767eab6674737a117a09f7f456b7918cffecf.zip
Copy openshift binaries instead of using wrapper script.
For containerized masters, we previously create a wrapper script to run the docker CLI image and clean up afterward, but this approach is much slower than having the binary on the native system. Instead we now use an ansible module to handle the logic of syncing the various OpenShift binaries and symlinks for client tools out onto the host. The module will correctly report changed if modifications were needed. Substantial speed improvement for containerized installs which requires many openshift/oc commands.
Diffstat (limited to 'roles/openshift_cli/tasks')
-rw-r--r--roles/openshift_cli/tasks/main.yml20
1 files changed, 4 insertions, 16 deletions
diff --git a/roles/openshift_cli/tasks/main.yml b/roles/openshift_cli/tasks/main.yml
index 509b8bc8a..11c73b25c 100644
--- a/roles/openshift_cli/tasks/main.yml
+++ b/roles/openshift_cli/tasks/main.yml
@@ -10,22 +10,10 @@
changed_when: "'Downloaded newer image' in pull_result.stdout"
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
+- name: Copy client binaries/symlinks out of CLI image for use on the host
+ openshift_container_binary_sync:
+ image: "{{ openshift.common.cli_image }}"
+ tag: "{{ openshift_image_tag }}"
when: openshift.common.is_containerized | bool
- name: Reload facts to pick up installed OpenShift version