diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2016-04-12 17:07:01 -0400 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2016-04-12 17:07:01 -0400 |
commit | 7967d127716de50f63dca9bd137f43ab642770bf (patch) | |
tree | f8d4826c58fff02dd7e1e24bccbee2ba79ab4a54 /filter_plugins | |
parent | df44d99957b9d44bf9d221b224a46865c3224d2c (diff) | |
parent | 0879620498b1251f3a375b9a5657c16dd571906a (diff) | |
download | openshift-7967d127716de50f63dca9bd137f43ab642770bf.tar.gz openshift-7967d127716de50f63dca9bd137f43ab642770bf.tar.bz2 openshift-7967d127716de50f63dca9bd137f43ab642770bf.tar.xz openshift-7967d127716de50f63dca9bd137f43ab642770bf.zip |
Merge pull request #1718 from brenton/docker1
Containerized installs on RHEL were downgrading docker unnecessarily
Diffstat (limited to 'filter_plugins')
-rw-r--r-- | filter_plugins/oo_filters.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py index 127bd69cf..f6cc2edde 100644 --- a/filter_plugins/oo_filters.py +++ b/filter_plugins/oo_filters.py @@ -791,7 +791,7 @@ class FilterModule(object): return retval @staticmethod - def oo_image_tag_to_rpm_version(version): + def oo_image_tag_to_rpm_version(version, include_dash=False): """ Convert an image tag string to an RPM version if necessary Empty strings and strings that are already in rpm version format are ignored. @@ -802,7 +802,10 @@ class FilterModule(object): raise errors.AnsibleFilterError("|failed expects a string or unicode") if version.startswith("v"): - version = "-" + version.replace("v", "") + version = version.replace("v", "") + + if include_dash: + version = "-" + version return version |