diff --git a/playbooks/cluster.yml b/playbooks/cluster.yml index f7ebfcf84..ea836b133 100644 --- a/playbooks/cluster.yml +++ b/playbooks/cluster.yml @@ -17,6 +17,9 @@ - { role: download, tags: download, when: "not skip_downloads" } - name: Install etcd + vars: + etcd_cluster_setup: true + etcd_events_cluster_setup: "{{ etcd_events_cluster_enabled }}" import_playbook: install_etcd.yml - name: Install Kubernetes nodes diff --git a/playbooks/install_etcd.yml b/playbooks/install_etcd.yml index 1f585119c..eaf21254d 100644 --- a/playbooks/install_etcd.yml +++ b/playbooks/install_etcd.yml @@ -23,7 +23,4 @@ - { role: kubespray-defaults } - role: etcd tags: etcd - vars: - etcd_cluster_setup: true - etcd_events_cluster_setup: "{{ etcd_events_cluster_enabled }}" when: etcd_deployment_type != "kubeadm" diff --git a/playbooks/scale.yml b/playbooks/scale.yml index ef0936607..374f31417 100644 --- a/playbooks/scale.yml +++ b/playbooks/scale.yml @@ -5,22 +5,11 @@ - name: Gather facts import_playbook: facts.yml -- name: Generate the etcd certificates beforehand - hosts: etcd:kube_control_plane - gather_facts: false - any_errors_fatal: "{{ any_errors_fatal | default(true) }}" - environment: "{{ proxy_disable_env }}" - roles: - - { role: kubespray-defaults } - - role: etcd - tags: etcd - vars: - etcd_cluster_setup: false - etcd_events_cluster_setup: false - when: - - etcd_deployment_type != "kubeadm" - - kube_network_plugin in ["calico", "flannel", "canal", "cilium"] or cilium_deploy_additionally | default(false) | bool - - kube_network_plugin != "calico" or calico_datastore == "etcd" +- name: Install etcd + vars: + etcd_cluster_setup: false + etcd_events_cluster_setup: false + import_playbook: install_etcd.yml - name: Download images to ansible host cache via first kube_control_plane node hosts: kube_control_plane[0] diff --git a/playbooks/upgrade_cluster.yml b/playbooks/upgrade_cluster.yml index 861c026f7..26f080939 100644 --- a/playbooks/upgrade_cluster.yml +++ b/playbooks/upgrade_cluster.yml @@ -36,6 +36,9 @@ - { role: container-engine, tags: "container-engine", when: deploy_container_engine } - name: Install etcd + vars: + etcd_cluster_setup: true + etcd_events_cluster_setup: "{{ etcd_events_cluster_enabled }}" import_playbook: install_etcd.yml - name: Handle upgrades to control plane components first to maintain backwards compat.