rotate_swarm_join_token
Rotate the worker or manager join token for Docker Swarm, invalidating the old token immediately to prevent unauthorized joins. Returns the new tokens.
Instructions
Rotate the worker and/or manager join token, then return the fresh tokens.
Rotating invalidates the old token immediately — nodes that have already joined are unaffected,
but any pending invitations using the old token will fail. At least one of rotate_worker /
rotate_manager must be True. Wraps swarm.update(rotate_*_token=...) and re-reads the tokens so
the caller gets the new value in one step.
args: rotate_worker - Rotate the worker join token rotate_manager - Rotate the manager join token returns: dict - {"Worker": , "Manager": } after rotation
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rotate_worker | No | ||
| rotate_manager | No |