Commit Graph

25 Commits (aeb0245ebd0ab6c51da7132e5c03ab6eb76e03a2)

Author SHA1 Message Date
Felix Fontein 66a4000058
Adjust tests to new error messages for older docker-py versions. (#58253) 5 years ago
Felix Fontein 12d26eceb1 docker modules: make sure everything works with older docker-py versions (#55258)
* General test improvements.

* Adjust tests to older docker-py versions.

* docker_swarm_server_info: work around problems with older docker-py versions

* Bump minimal docker-py version for options network_filters and disk_usage.

* More general test improvements.

* Correct usage of docker_image.

* Put files into output directory.

* Speed up test.

* Remove old check.
6 years ago
Felix Fontein 14b3b3a95e openssl_certificate now has cryptography backend (#53924). (#54880) 6 years ago
Hannes Ljungberg e58f23b73e docker_swarm: Return UnlockKey (#54490)
* Return UnlockKey

* Add changelog fragment

* Add method to check if a parameter exists in diffs

* Add method to get swarm unlock key

* Add option unlock_key

* Only return unlock key when created or changed

* Rename difference check

* Extend unlock key example

* Assert that unlock_key is a string

* Fix docker_swarm_info authors

* Don’t silence APIErrors

* Test unlock_key on unlocked swarm

* Catch APIError when retrieving unlock key

* Better return value description

* Lint

* Fix UnlockKey return value documentation

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Get unlock key safely

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Return None on empty UnlockKey

* Assert swarm_unlock_key is undefined if unqueried

* Add documentation about swarm_info unlock_key

* Add change log fragment for unlock_key option

* Revert "Add change log fragment for unlock_key option"

This reverts commit e3cb2325b5.

* Use generator expression instead

* Restart docker more decisively

* Use systemctl kill

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Try to restart docker daemon
6 years ago
Hannes Ljungberg 833512b07c docker_swarm: Add support for default_addr_pool and subnet_size (#54642)
* Add support for default_addr_pool and subnet_size

* Add changelog fragment

* Document options only used on init / join
6 years ago
Matt Clay 55d9ee0cb2 Revert "Temporarily skip failing Docker tests on RHEL 7.6."
This reverts commit affde96fa8.
6 years ago
Matt Clay affde96fa8 Temporarily skip failing Docker tests on RHEL 7.6. 6 years ago
Felix Fontein 8d62794f91 docker: rename docker_*_facts -> docker_*_info (#54124)
* Rename docker_*_facts -> docker_*_info.

* Add changelog.

* Update scenario guide.
6 years ago
Felix Fontein 1323dca9e9 docker_*: enable RHEL8 tests (#53313) 6 years ago
Felix Fontein 8e26c2dfbe docker_swarm: support older docker-py versions (#53129)
* Decreasing docker_swarm requirements.

* Fixing docker-py / docker API version requirements, and some comments.

* Add changelog.

* Only send parameters specified by user to docker daemon.

* Extend labels test: not specifying == keep labels.

* Bump minimally required docker-py version for docker_node and docker_node_facts to 2.4.0.

* Prevent crashing when publish or healthcheck is not provided.

* Similarly to docker_swarm tests, only execute docker_node tests on real VMs and restart docker daemon when tests are done.
6 years ago
Felix Fontein 04bfec9dfe docker_swarm: more integration tests (#53035)
* Add more tests.

* Added tests for CA options.

* Don't run in docker-in-docker situations where docker daemon becoming instable is really dangerous. Also, restart docker daemon after tests.

* Only run CA tests when openssl_certificate can be run (which is not the case for RHEL7, see #34054).

* Add comment on why docker-based CI runs are skipped.
6 years ago
Felix Fontein 76e0e0080b Fix force when state==present. (#53003) 6 years ago
Felix Fontein e017d94766 docker_swarm: extend tests (part I) (#53005)
* Restructure tests.

* Allow tests to work when ansible_default_ipv4.address is undefined.
6 years ago
Felix Fontein bf3c291606 docker_swarm: add diff support (#52947)
* Add diff support to docker_swarm.

* Add changelog.

* Using diff mode for docker_swarm tests. This improves debugging, since the the module now outputs more information on *why* it did certain actions.
6 years ago
Felix Fontein a1ec307d43 docker_swarm: make labels work with older docker daemon versions (#52895)
* Make labels work with older docker daemon versions.

* Fix idempotence detection.

* Add changelog.
6 years ago
Felix Fontein 81d58cfef6 docker_swarm: hopefully fix debug CI problems, and fix check mode (#52825)
* Let's see some debug output.

* Also check LocalNodeState.

* Improve tests.

* Actually implement check mode.

* Add changelog.

* Add pretty-printing and more output.
6 years ago
Felix Fontein 495a426039 docker_swarm: fix minimal API version (#49691)
* Reduce minimally required docker API version to 1.25, with selective features requiring 1.30.

* Adjust test requirements.

* Forgot some imports.
6 years ago
Dave Bendit 73640a4190 [docker_network] Adding `scope` and `attachable` flags (#49562)
Incorporating the abandoned work from PRs #35288 and #45552. Also adding in
the version checking from `docker_container.py`, which should be abstracted
out to `docker_common.py`.
6 years ago
Felix Fontein 3bb41ccb8e docker_* tests: check API version (#48620)
* Check minimal API and docker-py versions for all docker_* tests.

* Improve docker_swarm creation/destruction for tests.

* Fail when conditions aren't met.

* Don't hardcode address for advertise_addr.
6 years ago
Matt Clay a41c0405a7
Add CI platform: rhel/8.0 (#48835) 6 years ago
Thierry Bouvet 87de2dde9f Fix advertise addr (#47608)
* Fix issue #46326

* Update example to create a default swarm
6 years ago
Matt Clay 339d22a2bd
Improve stability of Docker integration tests. (#46005) 6 years ago
Pilou 0f2d67b87f Docker integration tests: factorize setup (#42306)
* Factorize docker_secret & docker_swarm tests setup

* failure are only expected inside docker container

* docker_swarm: enable RHEL builds
6 years ago
Matt Clay 4e489d1be8
Update Shippable integration test groups. (#43118)
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.
6 years ago
Thierry BOUVET 8b9fe42c72 Add new module to create/update a docker swarm. (#38280)
* Add new module to create/update a docker swarm.

* Fix ansible-test sanity

* Fix requirements

* Fix requirements

* Add tag for author

* Test integration test.

* Fix main.yml

* Add linux arch

* Add template

* Fix test result

* Integration test to create/remove a swarm manager

* fix join test

* Downgrade docker-py

* fix rhel

* Fix review documentation.

* Fix whitespace

* Check docker installation.

* test docker install

* check

* Remove docker socket

* Fix docker install

* Fix sanity test

* Rebase

* Add docker_swarm maintainer

* Fix review

* Fix new version.

* Add docker default values

* Fix description.

* Reworked documentation

* Fix YAML error

* Rebase

* Fix example for update state.

* Fix idempotent states. Fix states: present/absent.

* Fix sanity

* Fix variables sanity

* Update example for absent state.

* fix sanity

* Wrap the contents of error message in to_native.


Co-authored by: Dag Wieers <dag@wieers.com>
6 years ago