From 5f743c4fdc91c6375e33c7e639db942154c091e4 Mon Sep 17 00:00:00 2001 From: Michal Svab Date: Fri, 22 May 2015 16:17:26 +0100 Subject: [PATCH] maven_artifact: check whether snapshot is the latest snapshot --- .../modules/extras/packaging/language/maven_artifact.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/packaging/language/maven_artifact.py b/lib/ansible/modules/extras/packaging/language/maven_artifact.py index dd19b67a5bf..3c5e90686f7 100644 --- a/lib/ansible/modules/extras/packaging/language/maven_artifact.py +++ b/lib/ansible/modules/extras/packaging/language/maven_artifact.py @@ -332,7 +332,10 @@ def main(): if os.path.isdir(dest): dest = dest + "/" + artifact_id + "-" + version + "." + extension if os.path.lexists(dest): - prev_state = "present" + if not artifact.is_snapshot(): + prev_state = "present" + elif downloader.verify_md5(dest, downloader.find_uri_for_artifact(artifact) + '.md5'): + prev_state = "present" else: path = os.path.dirname(dest) if not os.path.exists(path):