set_version_rpm.yml 699 B

123456789101112131415161718
  1. ---
  2. - name: Set rpm version to configure if openshift_pkg_version specified
  3. set_fact:
  4. # Expects a leading "-" in inventory, strip it off here, and remove trailing release,
  5. openshift_version: "{{ openshift_pkg_version[1:].split('-')[0] }}"
  6. when: openshift_pkg_version is defined and openshift_version is not defined
  7. - name: Gather common package version
  8. command: >
  9. {{ repoquery_cmd }} --qf '%{version}' "{{ openshift.common.service_type}}"
  10. register: common_version
  11. failed_when: false
  12. changed_when: false
  13. when: openshift_version is not defined
  14. - set_fact:
  15. openshift_version: "{{ common_version.stdout | default('0.0', True) }}"
  16. when: openshift_version is not defined