* Restrict to old enough paramiko on RHEL 8 or other systems using Python 3.6. (#563)
(cherry picked from commit c0d9ca67c4)
* Make sure paramiko is installed on localhost as well.
* Revert "Make sure paramiko is installed on localhost as well."
This reverts commit f36406c2db.
* Fix check.
* ...
Co-authored-by: Felix Fontein <felix@fontein.de>
* Cache has already been updated a few lines before.
* When skipping Docker cleanup, create flag to avoid the expensive part of the setup (including package manager cache update) to be run again.
(cherry picked from commit 134d32cae6)
* Do not crash when plugin doesn't exist.
* Improve style.
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
(cherry picked from commit c7cbec0163)
* Make current_container_facts work with newer Docker versions and latest ansible-test container changes (#510)
* Add more debug output.
* Add basic integration test.
* Split into lines.
* Fix docker detection, add podman detection.
ci_complete
* Improve regular expression.
* Document that this module is trying its best, but might not be perfect.
* Update comment.
(cherry picked from commit c2d84efccb)
* Remove new feature (podman support).
* Try to fix tests on Ubuntu 22.04.
* Let Ansible handle the apt repo install.
(cherry picked from commit f6d4cad46e)
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add image_label_mismatch to docker_container
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Test image_label_mismatch error message
* Add change fragment for image_label_mismatch
* Break long line in docker_container.py for pep-8 compliance
* pep8 compliance
* Update changelogs/fragments/370-add-image-label-mismatch.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix: add expected_labels to parameters_map in docker_container
* Apply suggestions from code review
* Apply suggestions from code review
* Update tests/integration/targets/docker_container/tasks/tests/options.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add RHEL 9.0 to CI.
* Add RHEL 9 specific files.
* Add Ubuntu 22.04 and Fedora 36 to CI.
* Another try.
* Adjust kernel memory tests.
* Add more details.
* RHEL 9 doesn't support setting memory swappiness.
* Fix docker_swarm_service tests.
The 'less' case should always have been changed, but it probably was always skipped
due to a too old Docker SDK for Python or a too old Docker daemon.
* More checks / improve checks.
* Run some tests with the latest PyPi version of Docker SDK for Python.
* Use new enough Python so we can actually install the latest Docker SDK for Python.
* Ansibilize
* Fix test.
* Fix two stupid errors by myself.
* template_driver integration tests
* adding comment
* naming swarm default
* Apply suggestions from code review
* Only run tests for new enough Docker SDK for Python and Docker API version.
Co-authored-by: Sasha Jenner <sasha.jenner@cba.com.au>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Try adding EE support.
* Use GHA instead of AZP for EE tests.
* Update changelog fragment, extend tests.
* Disable current_container_facts test.
* Increase verbosity.
* 2.9 compatibility.
* Use docker instead of podman for building EE and running tests in it.
* Output some more information (helpful for debugging).
* Fix GHA handling for current_container_facts.
* Try to fix permissions.
* fix config docs and update to use config system
wean off play_context which did not have the correct data in all cases
* moar fixes
* Update plugins/connection/docker.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* updated for backwards compat
* badmergeresolution
* makeitworks
* attempt to fix unit test
* mocking it# No more than 50 chars. #### 50 chars is here: #
* Update plugins/connection/docker.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/connection/docker.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/connection/docker.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/connection/docker.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/connection/docker.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/connection/docker.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* nomock
* remove bad paste
* properly load connection to initialize config
* initizlie docker args
* Fix bugs.
* Call _set_conn_data() when needed.
* Cache result of _get_docker_remote_user() now that it is called multiple times per task.
* Fix unit tests.
* list.clear() is Python 3...
* Add changelog.
* Call _set_conn_data() also in _connect().
Co-authored-by: Felix Fontein <felix@fontein.de>
* Implement `cap_add` and `cap_drop` handling for `docker_swarm_service`
* Fix typos in changelog fragment
* Add missing `version_added` docstrings to `docker_swarm_service`
* Check api version too in `docker_swarm_service` capability tests
* Fix API version checking in tests for docker_swarm_service
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add `cap_add` and `cap_drop` to sample output for `docker_swarm_service`
* Use proper diff checking for `docker_swarm_service` capabilities
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add parameters for rolling updates to `docker_secret`
* Extract `remove_secrets` to its own function in `docker_secret`
* Store existing secrets in a list instead of a single secret
With this change `docker_secret` now supports the case where we store
multiple versions of a secret with the `_v123` postfix.
`absent` state implicitly handles removing these this way.
* When using `rolling_versions` don't automatically remove current secret
To make rolling updates actually work instead of failing on trying to
remove a secret that is attached to a service, use the
`versions_to_keep` parameter to remove old versions of the secret after
creating the new one. This way the secret with the new data is created
with a different name and can be attached to the service by its ID
without having to delete the previous one first which would fail if it
is already attached to a service.
* Add version numbers to newly created secrets
Attach the incremental version number to the secret name as a `_v123`
postfix where `123` is replaced with an incremental counter starting
from 1.
A label with the numeric version is also attached to the secret to ease
calculating the new version number upon change with the name
`ansible_version`.
* Return `secret_name` for docker secrets as well
* Add integration test for rolling secrets
* Update `docker_secret` documentation as per review comments
* Correctly return `docker_secret` version number as int
* Use template string for naming `docker_secrets` instead of concatenation
* Return the correct secret name on deletion failure
* Simplify `docker_secret` creation
* Add missing comma for `docker_secret` schema
* Only remove old docker secrets if `rolling_versions` is set
* Add check in `docker_secret` version parsing to handle NaNs
* Add newly created `docker_secret` to internal secret list to avoid additional deletions
* Add changelog fragment for `docker_secret` `rolling_versions` feature
* Update changelogs/fragments/270-rolling-secrets.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove docker_login's email option.
* container_default_behavior now has default value no_defaults.
* Disallow 'all' next to other ports. Deprecate 'all' in favor of publish_all_ports.
* Change default for network_mode.
* Add changelog fragment.
* Fix tests.
* Next expected release is 2.0.0.