main.yml 923 B

12345678910111213141516171819202122232425262728293031323334
  1. ---
  2. - debug: var=openshift_version
  3. - debug: var=openshift.common
  4. - name: Install clients
  5. action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-clients state=present"
  6. when: not openshift.common.is_containerized | bool
  7. - name: Pull CLI Image
  8. command: >
  9. docker pull {{ openshift.common.cli_image }}:{{ openshift_image_tag }}
  10. when: openshift.common.is_containerized | bool
  11. - name: Create /usr/local/bin/openshift cli wrapper
  12. template:
  13. src: openshift.j2
  14. dest: /usr/local/bin/openshift
  15. mode: 0755
  16. when: openshift.common.is_containerized | bool
  17. - name: Create client symlinks
  18. file:
  19. path: "{{ item }}"
  20. state: link
  21. src: /usr/local/bin/openshift
  22. with_items:
  23. - /usr/local/bin/oadm
  24. - /usr/local/bin/oc
  25. - /usr/local/bin/kubectl
  26. when: openshift.common.is_containerized | bool
  27. - name: Reload facts to pick up installed OpenShift version
  28. openshift_facts: