summaryrefslogtreecommitdiffstats
path: root/roles/openshift_cli/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_cli/tasks/main.yml')
-rw-r--r--roles/openshift_cli/tasks/main.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/roles/openshift_cli/tasks/main.yml b/roles/openshift_cli/tasks/main.yml
new file mode 100644
index 000000000..a6b6b1925
--- /dev/null
+++ b/roles/openshift_cli/tasks/main.yml
@@ -0,0 +1,33 @@
+---
+- openshift_facts:
+ role: common
+ local_facts:
+ deployment_type: "{{ openshift_deployment_type }}"
+ cli_image: "{{ osm_image | default(None) }}"
+
+- name: Install clients
+ action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-clients state=present"
+ when: not openshift.common.is_containerized | bool
+
+- name: Pull CLI Image
+ command: >
+ docker pull {{ openshift.common.cli_image }}
+ 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 \ No newline at end of file