Browse Source

Package pre-downloads should cause failure if required packages can not be found

Tim Bielawa 6 years ago
parent
commit
bba8856f37
1 changed files with 2 additions and 0 deletions
  1. 2 0
      roles/openshift_node/tasks/upgrade/rpm_upgrade.yml

+ 2 - 0
roles/openshift_node/tasks/upgrade/rpm_upgrade.yml

@@ -10,6 +10,8 @@
   command: "{{ ansible_pkg_mgr }} install -y --downloadonly {{ openshift_node_upgrade_rpm_list | join(' ')}}"
   register: result
   until: result is succeeded
+  failed_when:
+    - result.stdout is search(".*No package .* available.*") or result is failed
   vars:
     openshift_node_upgrade_rpm_list:
       - "{{ openshift_service_type }}-node{{ openshift_pkg_version | default('') }}"