Is there a ways to join Docker SwarmKit cluster with predefined token? By default, swarmkit nodes must provide the token defined by swarmkit master. But this does not play nice with scripting (like ansible).
How to generate token up-front?
As far as I know there is now way to get these tokes up-front. But you can get them with the comand docker swarm join-token -q worker
or manager. This comand prints just the token wich could be written in a file or stored elswhere.