mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Backport of https://github.com/ansible-collections/community.docker/pull/76 to stable-1. (#1689)
This commit is contained in:
parent
65861d3482
commit
6f1e585da5
2 changed files with 5 additions and 1 deletions
|
@ -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).
|
|
@ -116,7 +116,9 @@ class Connection(ConnectionBase):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _sanitize_version(version):
|
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):
|
def _old_docker_version(self):
|
||||||
cmd_args = []
|
cmd_args = []
|
||||||
|
|
Loading…
Reference in a new issue