1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/lib/ansible/modules/cloud
Andrew Pashkin 8342397427 Harden matching running containers by "command" in the Docker module
Before this patch:

  - Command was matched if 'Command' field of docker-py
    representation of Docker container ends with 'command' passed
    to Ansible docker module by user.
  - That can give false positives and false negatives.
  - For example:
      a) If 'command' was set up with more than one spaces,
         like 'command=sleep  123', it would be never matched again
         with a container(s) launched by this task.
         Because after launching, command would be normalized and
         appear, in docker-py API call, just as 'sleep 123' - with one
         space. This is false negative case.
      b) If 'entrypoint + command = command', for example
         'sleep + 123 = sleep 123', module would give false positive
         match.

This patch fixes it, by making matching more explicit - against
'Config'->Cmd' field of 'docker inspect' output, provided by docker-py
API and with proper normalization of user input by splitting it to
tokens with 'shlex.split()'.
2016-12-08 11:23:54 -05:00
..
amazon Update to ec2_vpc.py to: 1 allow interface ids and vpc peering connections as route targets 2 set state to "terminated" when VPC is removed 3 fix some comment typos 2016-12-08 11:23:54 -05:00
azure keep backwards compatibility 2016-12-08 11:23:39 -05:00
digital_ocean updated docs to denote retirement of v1 api and clarify when and why auth fields have changed 2016-12-08 11:23:49 -05:00
docker Harden matching running containers by "command" in the Docker module 2016-12-08 11:23:54 -05:00
google GCE libcloud 0.15 support and code cleanup * Code formatting (indentation and white space) fixes for improved PEP8 conformity. * Remove redundant backslashes inside parentheses. * Test for object identity should be 'is not None'. * Test for membership should be 'not in'. * Fit docstring to the PEP8 79 character limit. * Use forward compatible Python 2.6+ 'except .. as' syntax for exception handling. * Support libcloud > 0.15 'metadata' argument format. 2016-12-08 11:23:53 -05:00
linode Updating cloud modules with proper github author information 2016-12-08 11:23:07 -05:00
openstack Update root_volume variable 2016-12-08 11:23:53 -05:00
rackspace added version added to new rax_cdb choices 2016-12-08 11:23:40 -05:00
vmware vsphere_guest: support putting a guest into a nested folder 2016-12-08 11:23:53 -05:00
__init__.py package files 2016-12-08 11:22:22 -05:00