k3s-io / k3s-ansible

Apache License 2.0
2.09k stars 824 forks source link

Make k3s_server role idempotent #347

Closed peterklijn closed 4 months ago

peterklijn commented 4 months ago

Changes

Introduce copy of k3s.yaml file to detect changes and skip control node changes. It's a bit of a workaround, but I consider it a pragmatic solution to prevent Ansible from always reporting 4 changes, the k3s.yaml file is different from the ~/.kube/config.new file due to the changes the next 3 tasks make to it.

Before

Screenshot 2024-07-13 at 15 34 03

After

Screenshot 2024-07-13 at 15 34 14

(192.168.64.9 is the first server)

Linked Issues