diff options
author | Rich Wareham <rjw57@users.noreply.github.com> | 2019-01-14 11:00:34 +0000 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2019-01-14 12:38:05 -0800 |
commit | 776dadc5a382fa0369b700e1ae5488fca2829a48 (patch) | |
tree | 9cf91551ced68fa16c2d22001d0a7f49e0505ed9 /changelogs | |
parent | 11c1580b23e68a1ca7f6accb9aff0e36d5f6c348 (diff) | |
download | ansible-776dadc5a382fa0369b700e1ae5488fca2829a48.tar.gz |
docker_swarm_service: use exact name match when finding services (#50665)
* docker_swarm_service: use exact name match when finding services
The Docker API's filtering support allows filtering for substring
matches which means that when we filter the list of running services we
may accidentally match a service called "foobar" when looking for a
service named "foo".
Fix this by filtering the list of services returned from the Docker API
so that name matches are exact. It is still worth passing the filter
parameter to the Docker API because it reduces the number of results
passed back which may be important for remote Docker connections.
Closes 50654.
* add changelog fragment for #50654
(cherry picked from commit fd32760d7a1c42573e09055b822f0958f60a3874)
Diffstat (limited to 'changelogs')
-rw-r--r-- | changelogs/fragments/50654-docker-swarm-service-docker-api-fix.yaml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/changelogs/fragments/50654-docker-swarm-service-docker-api-fix.yaml b/changelogs/fragments/50654-docker-swarm-service-docker-api-fix.yaml new file mode 100644 index 0000000000..3664fe8b92 --- /dev/null +++ b/changelogs/fragments/50654-docker-swarm-service-docker-api-fix.yaml @@ -0,0 +1,2 @@ +bugfixes: + - "docker_swarm_service - fix use of Docker API so that services are not detected as present if there is an existing service whose name is a substring of the desired service" |