Commit Graph

356 Commits

Author SHA1 Message Date
Romain Lalaut 43cbe3095b docker.py: allow docker versions beginning with 'v' (#76)
* docker.py: allow docker versions with a leading 'v'

* Update changelogs/fragments/76-leading-v-support-in-docker-version.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-27 14:16:35 +00:00
Felix Fontein a298906dbe Next expected release is 1.3.0. 2021-01-25 18:31:12 +01:00
Felix Fontein 4df5a7468a Release 1.2.0 1.2.0 2021-01-25 17:58:21 +01:00
Felix Fontein fa18833c10 Add release summary. 2021-01-25 17:14:05 +01:00
Felix Fontein 8702713ac3 docker_image: do not crash in load_image for docker-py < 2.5.0. (#73)
* Avoid crash for docker-py < 2.5.0.

* Add warnings when load_image does not return a generator.

* Add test.

* Update plugins/modules/docker_image.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2021-01-25 15:17:04 +01:00
Felix Fontein c1e6c2e699 Fix IPv6 zone handling (#66)
* Support IPv6 zones (RFC 4007).

* Add changelog fragment.

* Remove change for docker_network.

* Add IPv6 zone test.

It looks like an arbitrary zone name works. If Docker daemon ever starts
validating it (against what?) we either have to try to fix this test by
a valid value, or remove it again.
2021-01-25 15:16:35 +01:00
Felix Fontein 9a1018f479 Add Ubuntu 20.04 to CI. (#75) 2021-01-22 20:43:21 +00:00
Felix Fontein 2ad8a0812a Fix changelog fragment. 2021-01-22 07:58:40 +01:00
Felix Fontein 6adb148675 Add default_host_ip option. (#71) 2021-01-20 23:53:23 +01:00
Felix Fontein 5072b7d1c3 Remove shippable config. 2021-01-12 21:42:34 +01:00
Felix Fontein 477e781054 Next release is expected to be 1.2.0. 2021-01-03 13:44:29 +01:00
Felix Fontein 9fa08824e2 Release 1.1.0. 1.1.0 2021-01-03 13:43:34 +01:00
Felix Fontein 04f5c7e0c9 Add 1.1.0 release summary. 2021-01-03 13:43:04 +01:00
Felix Fontein c7a3d9f057 docker_container: cgroup_parent (#59)
* Document that the Docker SDK for Python is used by the module.

* Allow to specify cgroup_parent for container.
2021-01-03 13:30:09 +01:00
Felix Fontein e4b747d788 docker_container: return status also when 0 for non-detached containers (#58)
* Return status also when 0.

* Fix PR number.
2021-01-02 18:53:25 +01:00
Felix Fontein 9b131399ce Docker inventory plugin (#61)
* Began with docker inventory plugin.

* Linting.

* Improve plugin, add basic unit tests.

* Linting.

* Add integration test.

* Adjust tests to case that there are more containers.

* There can be stopped containers.

ci_coverage

* docker -> docker_containers
2020-12-30 08:44:24 +01:00
Felix Fontein 2a0fb7d3ed Refactor docker_image line extraction code. (#62) 2020-12-28 15:16:35 +01:00
Felix Fontein a11f24c3a9 Fix docker_api connection: do not initialize client too early (#63)
* Fix docker_api connection: do not initialize client too early

* Make sure connection plugin tests are also run with Ansible 2.9 and 2.10.
2020-12-27 16:13:40 +01:00
Felix Fontein 5eef093e99 Check output of load_image and react upon. (#55) 2020-12-27 15:04:38 +01:00
Felix Fontein 1277942a4e Deprecate current behavior when specifying all with other port mappings. (#60) 2020-12-26 18:20:52 +01:00
Felix Fontein 117f132213 docker_image: always push, also when tagging is not necessary (#53)
* Always push, also when tagging is not necessary.

* Add tests.

* Fix tests.
2020-12-26 18:20:28 +01:00
Felix Fontein d40c2409d3 docker_image: allow to specify build platform (#54)
* Allow to specify build platform.

* Add basic tests.
2020-12-25 19:01:37 +01:00
Felix Fontein 5fa53e2eeb Improve tests: don't install daemon when running inside a container (#56)
* If running inside a container, only install docker CLI, not docker daemon.

ci_complete

* Fix OpenSUSE.
2020-12-23 13:36:40 +01:00
Felix Fontein a1a7692e74 Remove Shippable badge. 2020-12-18 17:24:14 +01:00
John R Barker c549e7a1cd AZP Coverage support for Ansible 2.9 (#51)
Pull in latest changes from shippable-migration-tool
ci_complete ci_coverage
2020-12-16 11:42:20 +00:00
Felix Fontein 8bd33b06c4 docker_api connection plugin (#40)
* Add basic docker_api connection test.

* Split AnsibleDockerClient into module-independent and module-specific part.

* Mention new connection plugin.

* Fix tests.

* Add first version of docker_api connection plugin.

* Linting.

* Fix references.

* Improve connection tests.

* Fix put_file for all Python versions.

* Fix fetch_file.

* Linting.

* Update plugins/connection/docker_api.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* Move potential common code to module_utils / plugin_utils.

* Move socket_handler to plugin_utils.

* Fix typo.

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-12-15 20:07:55 +00:00
Felix Fontein ebafa17b02 [WIP] Fix CI (#50)
* Centralize location of images for runme.sh tests.

* Switch images.

* Fix sanity.

* Fix image names.

* Fix tag chaos.

* One more.
2020-12-15 13:57:38 +01:00
Felix Fontein fe2d52ff29 Fix AZP tests, add current_container_facts module (#48)
* Add new facts module for determining whether the module is running inside a container or not.

* Add containers to main network.

* Fix running tests locally with newer docker.

* Simplify setup_openssl to only install cryptography.

* Add alias in network.

* Make sure to upgrade cryptography to something more sensible on Ubuntu 16.04.

* Don't jump through hoops for bridge.

* Try to use other IPv4 nets.

* Improve module docs.
2020-12-13 08:06:16 +00:00
Felix Fontein 4cc4766ddb Next expected release is 1.1.0. 2020-12-11 21:28:15 +01:00
Felix Fontein 7dd28ecdfe Release 1.0.1. 1.0.1 2020-12-11 21:27:28 +01:00
Felix Fontein 2bf46c2eb2 Fix docker_image test. (#47)
ci_complete
2020-12-11 21:12:48 +01:00
Felix Fontein ab9fb3f604 Prepare 1.0.1 release. 2020-12-11 20:41:04 +01:00
John Barker 04c0b726ea AZP: Install ansible-test for coverage 2020-12-11 15:35:08 +00:00
John R Barker 4287618d3a AZP: fedora32 doesn't exist on Ansible 2.9 2020-12-11 13:55:04 +00:00
John R Barker 3955955b37 Remove PATH hack (#44)
* Remove PATH hack

azure-pipelines-test-container:1.7.1 contains a proper fix for ensuring
PATH contains the location of pip installed binaries so we can remove
the hack.

* Correct RHEL groups
2020-12-11 13:54:14 +00:00
John R Barker af05acdc3b README.md: Correct AZP Badge link 2020-12-11 13:19:01 +00:00
John R Barker 3de2cb6982 Correct stage name 2020-12-10 19:28:53 +00:00
John Barker 7e63c3ae4d Initial Azure Pipelines 2020-12-10 18:08:22 +00:00
Felix Fontein 518e99411a Fix capabilities validation for device_requests. (#43) 2020-12-08 13:31:17 +01:00
Felix Fontein 65ab240e2b Try to make connection test work with coverage (#39)
* Try to make connection test work with coverage.

ci_coverage

* Don't run test inside containers.

ci_coverage

* Empty commit to run without coverage.
2020-11-24 17:29:02 +01:00
Felix Fontein 219c6b3a85 Improve and fix tests (#36)
* Parameterize test images.

* Use different images, similar to ansible/ansible#72698.
2020-11-23 21:48:46 +01:00
Felix Fontein 1fa2c3b77d By default, no longer do cleanup of setup_docker. (#38)
Cleanup means purging the docker daemon. This was necessary when the
docker tests were run as part of ansible/ansible and community.general
CI, but in the community.docker CI the problematic runs are on their
own CI node.

ci_complete
2020-11-22 22:18:48 +01:00
Felix Fontein c0bd1becea Add docker connection tests (#37)
* Add docker connection tests.

* Make it easier to switch image.
2020-11-22 22:03:16 +01:00
Felix Fontein 68952f9d1d Bump version. 2020-11-17 08:05:31 +01:00
Felix Fontein 517eba3fdd Release 1.0.0. 1.0.0 2020-11-17 08:05:06 +01:00
Felix Fontein 9b0a3a02eb Prepare 1.0.0 release. 2020-11-17 07:49:53 +01:00
Felix Fontein bc0e0c3049 Adjust version_added, re-place tests. (#34) 2020-11-15 17:21:50 +01:00
Raghu Siddarth Udiyar ea8c107625 Add docker build output to task result (#805)
The build output is only added during failures, but its useful to
have this available during normal task execution as well.
2020-11-15 16:57:05 +01:00
Felix Fontein 18ef0bae0b Added file I forgot to add to community.general. (#33) 2020-11-14 18:14:23 +01:00
Aram Akhavan 22ba76b4e9 Add a warning when ansible_key label is not found on a secret. (#31)
* add a warning when ansible_label is not found on a secret. addresses #30

* Update changelogs/fragments/31-docker-secret.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-09 08:31:55 +01:00