mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-16 11:58:43 +00:00
* 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> |
||
|---|---|---|
| .. | ||
| connection | ||
| connection_docker | ||
| connection_docker_api | ||
| connection_nsenter | ||
| connection_posix | ||
| docker_compose | ||
| docker_config | ||
| docker_container | ||
| docker_container_exec | ||
| docker_container_info | ||
| docker_host_info | ||
| docker_image | ||
| docker_image_info | ||
| docker_image_load | ||
| docker_login | ||
| docker_network | ||
| docker_network_info | ||
| docker_node | ||
| docker_node_info | ||
| docker_plugin | ||
| docker_prune | ||
| docker_secret | ||
| docker_stack | ||
| docker_stack_info | ||
| docker_stack_task_info | ||
| docker_swarm | ||
| docker_swarm_info | ||
| docker_swarm_service | ||
| docker_swarm_service_info | ||
| docker_volume | ||
| docker_volume_info | ||
| generic_ssh_connection | ||
| inventory_docker_containers | ||
| inventory_docker_machine | ||
| inventory_docker_swarm | ||
| setup_docker | ||
| setup_docker_compose | ||
| setup_docker_registry | ||
| setup_epel/tasks | ||
| setup_openssl | ||
| setup_paramiko | ||
| setup_pkg_mgr/tasks | ||
| setup_remote_constraints | ||
| setup_remote_tmp_dir | ||