summaryrefslogtreecommitdiffstats
path: root/playbooks/adhoc/upgrades/files
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2015-11-05 15:42:30 -0500
committerJason DeTiberus <jdetiber@redhat.com>2015-11-05 17:12:27 -0500
commite9680cc1020f9c54221993b3ae816b046d92bafc (patch)
tree52d21f36bfdd7edc21a0a888fe1cb26068c42e97 /playbooks/adhoc/upgrades/files
parenteb4cfd5702e675219ae0d36df667e0029b353921 (diff)
downloadopenshift-e9680cc1020f9c54221993b3ae816b046d92bafc.tar.gz
openshift-e9680cc1020f9c54221993b3ae816b046d92bafc.tar.bz2
openshift-e9680cc1020f9c54221993b3ae816b046d92bafc.tar.xz
openshift-e9680cc1020f9c54221993b3ae816b046d92bafc.zip
Additional upgrade enhancements
- rework the version checking - provide better safety if the apiLevel attributes are missing - ensure a list of api levels are present - remove a list of api levels - pylint fixes
Diffstat (limited to 'playbooks/adhoc/upgrades/files')
-rw-r--r--playbooks/adhoc/upgrades/files/versions.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/playbooks/adhoc/upgrades/files/versions.sh b/playbooks/adhoc/upgrades/files/versions.sh
new file mode 100644
index 000000000..01ea1d91a
--- /dev/null
+++ b/playbooks/adhoc/upgrades/files/versions.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+yum_installed=$(yum list installed "$@" | tail -n +2 | grep -v 'Installed Packages' | grep -v 'Red Hat Subscription Management' | awk '{ print $2 }' | tr '\n' ' ')
+yum_available=$(yum list available "$@" | tail -n +2 | grep -v 'Available Packages' | grep -v 'Red Hat Subscription Management' | grep -v 'el7ose' | awk '{ print $2 }' | tr '\n' ' ')
+
+echo "---"
+echo "curr_version: ${yum_installed}"
+echo "avail_version: ${yum_available}"