main.yml 841 B

123456789101112131415161718192021222324252627282930
  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 }}:v{{ openshift_version }}
  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