aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorSamYaple <sam@yaple.net>2016-01-01 02:49:02 +0000
committerSamYaple <sam@yaple.net>2016-01-03 16:48:52 +0000
commitb32df7300c80dcf2255d3b0bc3915695a64709c3 (patch)
treee307a53292ac386c9e22fde10ddf1d493bf03d6b /ansible
parent912ecd0dfc5be0eb152d33b375ce13c9df126f02 (diff)
downloadkolla-b32df7300c80dcf2255d3b0bc3915695a64709c3.tar.gz
kolla-b32df7300c80dcf2255d3b0bc3915695a64709c3.zip
Support v1 and v2 registry - kolla_docker
Change-Id: I452c9c507c51b68f7515b9295b05e98a39554531 Partially-Implements: blueprint kolla-docker-module
Diffstat (limited to 'ansible')
-rw-r--r--ansible/library/kolla_docker.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/ansible/library/kolla_docker.py b/ansible/library/kolla_docker.py
index b2006b435..13870eaee 100644
--- a/ansible/library/kolla_docker.py
+++ b/ansible/library/kolla_docker.py
@@ -217,9 +217,14 @@ class DockerWorker(object):
)
]
- if "Downloaded newer image for" in status[-1].get('status'):
+ # NOTE(SamYaple): This allows us to use v1 and v2 docker registries.
+ # Eventually docker will stop supporting v1 registries and when
+ # that happens we can remove this.
+ search = -2 if 'legacy registry' in status[-1].get('status') else -1
+
+ if "Downloaded newer image for" in status[search].get('status'):
self.changed = True
- elif "Image is up to date for" in status[-1].get('status'):
+ elif "Image is up to date for" in status[search].get('status'):
# No new layer was pulled, no change
pass
else: