From 477f04a7a9846579d2bc86d9c260d9849f593961 Mon Sep 17 00:00:00 2001 From: Brenton Leanhardt Date: Wed, 6 Apr 2016 10:42:12 -0400 Subject: Containerized installs on RHEL were downgrading docker unnecessarily --- filter_plugins/oo_filters.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'filter_plugins') 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 -- cgit v1.2.1