mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-11 11:27:39 -02:30
Rename ansible groups to use _ instead of - (#7552)
* rename ansible groups to use _ instead of -
k8s-cluster -> k8s_cluster
k8s-node -> k8s_node
calico-rr -> calico_rr
no-floating -> no_floating
Note: kube-node,k8s-cluster groups in upgrade CI
need clean-up after v2.16 is tagged
* ensure old groups are mapped to the new ones
This commit is contained in:
@@ -147,8 +147,8 @@ kube_log_level: 2
|
||||
kube_network_plugin: calico
|
||||
kube_network_plugin_multus: false
|
||||
|
||||
# Determines if calico-rr group exists
|
||||
peer_with_calico_rr: "{{ 'calico-rr' in groups and groups['calico-rr']|length > 0 }}"
|
||||
# Determines if calico_rr group exists
|
||||
peer_with_calico_rr: "{{ 'calico_rr' in groups and groups['calico_rr']|length > 0 }}"
|
||||
|
||||
# Choose data store type for calico: "etcd" or "kdd" (kubernetes datastore)
|
||||
calico_datastore: "kdd"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
tags: always
|
||||
include_tasks: fallback_ips_gather.yml
|
||||
when: hostvars[delegate_host_to_gather_facts].ansible_default_ipv4 is not defined
|
||||
loop: "{{ groups['k8s-cluster']|default([]) + groups['etcd']|default([]) + groups['calico-rr']|default([]) }}"
|
||||
loop: "{{ groups['k8s_cluster']|default([]) + groups['etcd']|default([]) + groups['calico_rr']|default([]) }}"
|
||||
loop_control:
|
||||
loop_var: delegate_host_to_gather_facts
|
||||
run_once: yes
|
||||
@@ -16,7 +16,7 @@
|
||||
set_fact:
|
||||
fallback_ips_base: |
|
||||
---
|
||||
{% for item in (groups['k8s-cluster']|default([]) + groups['etcd']|default([]) + groups['calico-rr']|default([]))|unique %}
|
||||
{% for item in (groups['k8s_cluster']|default([]) + groups['etcd']|default([]) + groups['calico_rr']|default([]))|unique %}
|
||||
{% set found = hostvars[item].get('ansible_default_ipv4') %}
|
||||
{{ item }}: "{{ found.get('address', '127.0.0.1') }}"
|
||||
{% endfor %}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
{%- if no_proxy_exclude_workers | default(false) -%}
|
||||
{% set cluster_or_master = 'kube_control_plane' %}
|
||||
{%- else -%}
|
||||
{% set cluster_or_master = 'k8s-cluster' %}
|
||||
{% set cluster_or_master = 'k8s_cluster' %}
|
||||
{%- endif -%}
|
||||
{%- for item in (groups[cluster_or_master] + groups['etcd']|default([]) + groups['calico-rr']|default([]))|unique -%}
|
||||
{%- for item in (groups[cluster_or_master] + groups['etcd']|default([]) + groups['calico_rr']|default([]))|unique -%}
|
||||
{{ hostvars[item]['access_ip'] | default(hostvars[item]['ip'] | default(fallback_ips[item])) }},
|
||||
{%- if item != hostvars[item].get('ansible_hostname', '') -%}
|
||||
{{ hostvars[item]['ansible_hostname'] }},
|
||||
|
||||
Reference in New Issue
Block a user