Skip to content

Commit

Permalink
Merge pull request #261 from simonfelding/rke2_type-can-be-inferred
Browse files Browse the repository at this point in the history
rke2_type is inferred by what group the host is in.
  • Loading branch information
MonolithProjects authored Oct 31, 2024
2 parents 671cc67 + 361a3be commit e334c67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -353,14 +353,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
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit e334c67

Please sign in to comment.