main.yml 778 B

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