install.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ---
  2. - when:
  3. - not openshift.common.is_atomic | bool
  4. - r_openshift_excluder_install_ran is not defined
  5. block:
  6. - name: Install docker excluder - yum
  7. package:
  8. name: "{{ r_openshift_excluder_service_type }}-docker-excluder{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) + '*' }}"
  9. state: "{{ r_openshift_excluder_docker_package_state }}"
  10. when:
  11. - r_openshift_excluder_enable_docker_excluder | bool
  12. - ansible_pkg_mgr == "yum"
  13. register: result
  14. until: result | success
  15. # For DNF we do not need the "*" and if we add it, it causes an error because
  16. # it's not a valid pkg_spec
  17. #
  18. # https://bugzilla.redhat.com/show_bug.cgi?id=1199432
  19. - name: Install docker excluder - dnf
  20. package:
  21. name: "{{ r_openshift_excluder_service_type }}-docker-excluder{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) }}"
  22. state: "{{ r_openshift_excluder_docker_package_state }}"
  23. when:
  24. - r_openshift_excluder_enable_docker_excluder | bool
  25. - ansible_pkg_mgr == "dnf"
  26. register: result
  27. until: result | success
  28. - name: Install openshift excluder - yum
  29. package:
  30. name: "{{ r_openshift_excluder_service_type }}-excluder{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) + '*' }}"
  31. state: "{{ r_openshift_excluder_package_state }}"
  32. when:
  33. - r_openshift_excluder_enable_openshift_excluder | bool
  34. - ansible_pkg_mgr == "yum"
  35. register: result
  36. until: result | success
  37. # For DNF we do not need the "*" and if we add it, it causes an error because
  38. # it's not a valid pkg_spec
  39. #
  40. # https://bugzilla.redhat.com/show_bug.cgi?id=1199432
  41. - name: Install openshift excluder - dnf
  42. package:
  43. name: "{{ r_openshift_excluder_service_type }}-excluder{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) }}"
  44. state: "{{ r_openshift_excluder_package_state }}"
  45. when:
  46. - r_openshift_excluder_enable_openshift_excluder | bool
  47. - ansible_pkg_mgr == "dnf"
  48. register: result
  49. until: result | success
  50. - set_fact:
  51. r_openshift_excluder_install_ran: True