diff --git a/README.md b/README.md index c29fa0b..1f72069 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ This is a copy of `defaults/main.yml` ```yaml --- # The node type - server or agent -rke2_type: server +rke2_type: "{{ 'server' if inventory_hostname in groups[rke2_servers_group_name] else 'agent' if inventory_hostname in groups[rke2_agents_group_name] }}" # Deploy the control plane in HA mode rke2_ha_mode: false @@ -349,14 +349,14 @@ The RKE2 Kubernetes master/server nodes must belong to `masters` group and worke ```ini [masters] -master-01 ansible_host=192.168.123.1 rke2_type=server -master-02 ansible_host=192.168.123.2 rke2_type=server -master-03 ansible_host=192.168.123.3 rke2_type=server +master-01 ansible_host=192.168.123.1 +master-02 ansible_host=192.168.123.2 +master-03 ansible_host=192.168.123.3 [workers] -worker-01 ansible_host=192.168.123.11 rke2_type=agent -worker-02 ansible_host=192.168.123.12 rke2_type=agent -worker-03 ansible_host=192.168.123.13 rke2_type=agent +worker-01 ansible_host=192.168.123.11 +worker-02 ansible_host=192.168.123.12 +worker-03 ansible_host=192.168.123.13 [k8s_cluster:children] masters diff --git a/defaults/main.yml b/defaults/main.yml index bb19979..9cbaf47 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,6 +1,6 @@ --- # The node type - server or agent -rke2_type: server +rke2_type: "{{ 'server' if inventory_hostname in groups[rke2_servers_group_name] else 'agent' if inventory_hostname in groups[rke2_agents_group_name] }}" # Deploy the control plane in HA mode rke2_ha_mode: false