From dec97381bc3b1ac2b8760255c837994310286d36 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 27 Feb 2019 10:11:45 +0100 Subject: [PATCH] docker_swarm: fix ca_force_rotate idempotency (#53039) * Fix ca_force_rotate idempotency. * Add changelog. --- changelogs/fragments/53039-docker_swarm-ca_force_rotate.yml | 2 ++ lib/ansible/modules/cloud/docker/docker_swarm.py | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 changelogs/fragments/53039-docker_swarm-ca_force_rotate.yml diff --git a/changelogs/fragments/53039-docker_swarm-ca_force_rotate.yml b/changelogs/fragments/53039-docker_swarm-ca_force_rotate.yml new file mode 100644 index 0000000000..050be458f5 --- /dev/null +++ b/changelogs/fragments/53039-docker_swarm-ca_force_rotate.yml @@ -0,0 +1,2 @@ +bugfixes: +- "docker_swarm - fixes idempotency for the ``ca_force_rotate`` option." diff --git a/lib/ansible/modules/cloud/docker/docker_swarm.py b/lib/ansible/modules/cloud/docker/docker_swarm.py index 6687aa86bb..12638269cc 100644 --- a/lib/ansible/modules/cloud/docker/docker_swarm.py +++ b/lib/ansible/modules/cloud/docker/docker_swarm.py @@ -297,6 +297,8 @@ class TaskParameters(DockerBaseClass): ca_config = spec.get('CAConfig') or dict() if self.node_cert_expiry is None: self.node_cert_expiry = ca_config.get('NodeCertExpiry') + if self.ca_force_rotate is None: + self.ca_force_rotate = ca_config.get('ForceRotate') dispatcher = spec.get('Dispatcher') or dict() if self.dispatcher_heartbeat_period is None: