ansible-role-k3s/tasks
Yajo 4b42a9bf49 fix: restore clustering feature
For some weird reason, string booleans were set on `k3s_control_node` and `k3s_primary_control_node`, making their behavior non-obvious (for python `bool("false") == True`).

This fixes that problem, and BTW restores the ability to create clusters, which got lost with this bug.

After running the role against a cluster, see:

```sh
❯ ansible -i inventories/testing.yaml k8s_node -m command -ba 'kubectl get node'
vm0 | CHANGED | rc=0 >>
NAME   STATUS   ROLES                       AGE     VERSION
vm0    Ready    control-plane,etcd,master   9m19s   v1.21.2+k3s1
vm2 | CHANGED | rc=0 >>
NAME   STATUS   ROLES                       AGE     VERSION
vm2    Ready    control-plane,etcd,master   9m22s   v1.21.2+k3s1
vm1 | CHANGED | rc=0 >>
NAME   STATUS   ROLES                       AGE     VERSION
vm1    Ready    control-plane,etcd,master   9m22s   v1.21.2+k3s1
```

Now, after the patch:

```sh
❯ ansible -i inventories/testing.yaml k8s_node -m command -ba 'kubectl get node'
vm0 | CHANGED | rc=0 >>
NAME   STATUS   ROLES                       AGE    VERSION
vm0    Ready    control-plane,etcd,master   2m2s   v1.21.2+k3s1
vm1    Ready    control-plane,etcd,master   58s    v1.21.2+k3s1
vm2    Ready    control-plane,etcd,master   80s    v1.21.2+k3s1
vm1 | CHANGED | rc=0 >>
NAME   STATUS   ROLES                       AGE    VERSION
vm0    Ready    control-plane,etcd,master   2m2s   v1.21.2+k3s1
vm1    Ready    control-plane,etcd,master   58s    v1.21.2+k3s1
vm2    Ready    control-plane,etcd,master   80s    v1.21.2+k3s1
vm2 | CHANGED | rc=0 >>
NAME   STATUS   ROLES                       AGE    VERSION
vm0    Ready    control-plane,etcd,master   2m2s   v1.21.2+k3s1
vm1    Ready    control-plane,etcd,master   58s    v1.21.2+k3s1
vm2    Ready    control-plane,etcd,master   80s    v1.21.2+k3s1
```

@Tecnativa TT2541
2021-07-21 12:37:17 +00:00
..
build fix: restore clustering feature 2021-07-21 12:37:17 +00:00
operate Pre-documentation work 2021-02-16 16:53:49 +00:00
teardown fixed kubectl_get_nodes_result.stdout error 2021-04-30 14:31:33 +08:00
validate Update test sequence for check mode, fixed check mode on cgroup test 2021-04-18 20:39:06 +01:00
main.yml moving to file-based config 2020-10-19 20:26:12 +01:00
state-downloaded.yml Added new state "downloaded" - improved getting latest version 2019-12-28 15:50:17 +00:00
state-installed.yml feat: add support for specifying URLs in templates 2021-05-26 18:07:22 -04:00
state-restarted.yml Moved to file based config, pre-FQCN, pre-update to documentation 2020-10-22 19:26:15 +01:00
state-started.yml Build-operate workflow trial - allow for stop-starting cluster. 2019-12-20 19:41:20 +00:00
state-stopped.yml Build-operate workflow trial - allow for stop-starting cluster. 2019-12-20 19:41:20 +00:00
state-uninstalled.yml Pre-documentation work 2021-02-16 16:53:49 +00:00
state-validated.yml moving to file-based config 2020-10-19 20:26:12 +01:00