diff options
author | Michal Zegan <m.zegan@samsung.com> | 2019-05-28 17:16:47 +0200 |
---|---|---|
committer | Michal Zegan <m.zegan@samsung.com> | 2019-06-03 14:49:32 +0200 |
commit | 89e6314a29895247013929828817acbc4a1f6ea5 (patch) | |
tree | d74eec4c2e316d43c3fc0f29ce637b65f894f08d /ansible/roles/rke/templates | |
parent | 81a5673727746e4975ff77bde3503ac0319a95a4 (diff) |
Make rke to use new group structure
Rke playbook/role is modified to take advantage of the new group structure.
Namely, all members of kubernetes group are treated as cluster members
independent of their role.
The role itself is selected in cluster.yml.j2 template
based on actual membership in either kubernetes-node
or kubernetes-control-plane group.
Change-Id: I9a5bbfd090aff17018a610a01d6f88d848fc26c4
Issue-ID: OOM-1778
Signed-off-by: Michal Zegan <m.zegan@samsung.com>
Diffstat (limited to 'ansible/roles/rke/templates')
-rw-r--r-- | ansible/roles/rke/templates/cluster.yml.j2 | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ansible/roles/rke/templates/cluster.yml.j2 b/ansible/roles/rke/templates/cluster.yml.j2 index 64508e6f..f28cff80 100644 --- a/ansible/roles/rke/templates/cluster.yml.j2 +++ b/ansible/roles/rke/templates/cluster.yml.j2 @@ -1,7 +1,5 @@ nodes: -{# Note that we iterate through all nodes in relevant groups. -We check which groups they belong to exactly later to determine roles. #} -{% for node in groups['kubernetes'] | union(groups['kubernetes-control-plane']) %} +{% for node in groups['kubernetes'] %} - address: "{{ hostvars[node].cluster_ip }}" port: "22" internal_address: "{{ hostvars[node].cluster_ip }}" @@ -9,7 +7,7 @@ We check which groups they belong to exactly later to determine roles. #} {% if node in groups['kubernetes-control-plane'] %} - controlplane {% endif %} -{% if node in groups['kubernetes'] %} +{% if node in groups['kubernetes-node'] %} - worker - etcd {% endif %} |