community.docker/tests/integration/targets
András Maróy b481fa4801
Add support for rotating docker secrets (#293)
* 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>
2022-02-12 08:29:49 +01:00
..
connection Initial cleanup. 2020-10-30 07:05:51 +01:00
connection_docker docker_api connection plugin (#40) 2020-12-15 20:07:55 +00:00
connection_docker_api docker_api connection plugin (#40) 2020-12-15 20:07:55 +00:00
connection_nsenter Improve CI (#198) 2021-09-08 09:43:35 +02:00
connection_posix Initial cleanup. 2020-10-30 07:05:51 +01:00
docker_compose Initial commit (#208) 2021-09-17 17:00:14 -04:00
docker_config docker_config and docker_secret: add data_src option (#203) 2021-09-12 09:42:03 +02:00
docker_container Fix CI (docker_container tests fail because of missing ipaddress) (#218) 2021-10-07 13:15:51 +02:00
docker_container_exec docker_container_exec: allow to specify environment (#254) 2021-12-22 16:56:22 +00:00
docker_container_info Improve CI (#198) 2021-09-08 09:43:35 +02:00
docker_host_info Improve CI (#198) 2021-09-08 09:43:35 +02:00
docker_image Improve CI (#198) 2021-09-08 09:43:35 +02:00
docker_image_info [WIP] Fix CI (#50) 2020-12-15 13:57:38 +01:00
docker_image_load Improve CI (#198) 2021-09-08 09:43:35 +02:00
docker_login Make sure we are logged out. (#112) 2021-03-26 21:37:54 +01:00
docker_network docker_network: improve test failure debugging (#201) 2021-09-10 22:10:35 +02:00
docker_network_info Improve CI (#198) 2021-09-08 09:43:35 +02:00
docker_node Initial cleanup. 2020-10-30 07:05:51 +01:00
docker_node_info Initial cleanup. 2020-10-30 07:05:51 +01:00
docker_plugin docker_plugin - adding alias option and general cleanup (#161) 2021-06-25 21:45:53 +02:00
docker_prune Improve and fix tests (#36) 2020-11-23 21:48:46 +01:00
docker_secret Add support for rotating docker secrets (#293) 2022-02-12 08:29:49 +01:00
docker_stack Improve CI (#198) 2021-09-08 09:43:35 +02:00
docker_stack_info Improve CI (#198) 2021-09-08 09:43:35 +02:00
docker_stack_task_info Improve CI (#198) 2021-09-08 09:43:35 +02:00
docker_swarm Fix wrong FQCNs. (#225) 2021-10-17 16:04:48 +02:00
docker_swarm_info Initial cleanup. 2020-10-30 07:05:51 +01:00
docker_swarm_service Add support for rotating docker secrets (#293) 2022-02-12 08:29:49 +01:00
docker_swarm_service_info Improve CI (#198) 2021-09-08 09:43:35 +02:00
docker_volume Improve CI (#198) 2021-09-08 09:43:35 +02:00
docker_volume_info Improve CI (#198) 2021-09-08 09:43:35 +02:00
generic_ssh_connection Improve CI (#198) 2021-09-08 09:43:35 +02:00
inventory_docker_containers Improve CI (#198) 2021-09-08 09:43:35 +02:00
inventory_docker_machine [WIP] Fix CI (#50) 2020-12-15 13:57:38 +01:00
inventory_docker_swarm Initial cleanup. 2020-10-30 07:05:51 +01:00
setup_docker Explicitly install iptables. (#227) 2021-11-03 21:50:10 +01:00
setup_docker_compose docker_compose - Adding profiles option. (#167) 2021-06-28 20:54:54 +02:00
setup_docker_registry Fix wrong FQCNs. (#225) 2021-10-17 16:04:48 +02:00
setup_epel/tasks Initial cleanup. 2020-10-30 07:05:51 +01:00
setup_openssl Fix AZP tests, add current_container_facts module (#48) 2020-12-13 08:06:16 +00:00
setup_paramiko Add use_ssh_client flag (#114) 2021-04-02 10:14:09 +02:00
setup_pkg_mgr/tasks Try to fix CentOS 8 in CI - at least a bit. (#287) 2022-01-31 20:56:31 +01:00
setup_remote_constraints Initial cleanup. 2020-10-30 07:05:51 +01:00
setup_remote_tmp_dir Initial cleanup. 2020-10-30 07:05:51 +01:00