k3s-io/k3s-ansible

Support of multiple cluster?

SamLue opened this issue · 2 comments

Is it possible to manage multiple k3s cluster?

If I define the following inventory:
cluster1: children: server: hosts: 192.168.1.1 vars: k3s_version: v1.29.0+k3s1 token: ### ... cluster2: children: server: hosts: 192.168.1.2 192.168.1.3 vars: k3s_version: v1.29.0+k3s1 token: ### ...

In var groups['server'] all servers of all cluster-definitions are listed and not only the server from this specific cluster.
Do I use it in a wrong way? Or is the management of muiltiple clusters nor supported yet?

Here is a link to the inventory.yaml with correct format:
https://pastebin.com/raw/sTq5hZzC

At the moment my workaround I see is to use different inventory-files. But that's not the best choice in my use case.

Management of different clusters within a single inventory is not supported. The intention is only to quickly setup 1 cluster. Having multiple inventory files would be the intended way to manage multiple clusters.