Skip to content

Commit

Permalink
Backport of ansible-collections/community.docker#76 to stable-1. (#1689)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Jan 27, 2021
1 parent 65861d3 commit 6f1e585
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- docker connection plugin - fix Docker version parsing, as some docker versions have a leading ``v`` in the output of the command ``docker version --format "{{.Server.Version}}"`` (https://github.com/ansible-collections/community.docker/pull/76).
4 changes: 3 additions & 1 deletion plugins/connection/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ def __init__(self, play_context, new_stdin, *args, **kwargs):

@staticmethod
def _sanitize_version(version):
return re.sub(u'[^0-9a-zA-Z.]', u'', version)
version = re.sub(u'[^0-9a-zA-Z.]', u'', version)
version = re.sub(u'^v', u'', version)
return version

def _old_docker_version(self):
cmd_args = []
Expand Down

0 comments on commit 6f1e585

Please sign in to comment.