mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
Use include/import tasks (#2192)
import_tasks will consume far less memory, so it should be used whenever it is compatible.
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
---
|
||||
- include: check_certs.yml
|
||||
- include_tasks: check_certs.yml
|
||||
when: cert_management == "script"
|
||||
tags:
|
||||
- etcd-secrets
|
||||
- facts
|
||||
|
||||
- include: "gen_certs_{{ cert_management }}.yml"
|
||||
- include_tasks: "gen_certs_{{ cert_management }}.yml"
|
||||
tags:
|
||||
- etcd-secrets
|
||||
|
||||
- include: upd_ca_trust.yml
|
||||
- include_tasks: upd_ca_trust.yml
|
||||
tags:
|
||||
- etcd-secrets
|
||||
|
||||
@@ -24,18 +24,18 @@
|
||||
etcd_client_cert_serial: "{{ etcd_client_cert_serial_result.stdout }}"
|
||||
when: inventory_hostname in groups['k8s-cluster']|union(groups['etcd'])|union(groups['calico-rr']|default([]))|unique|sort
|
||||
|
||||
- include: "install_{{ etcd_deployment_type }}.yml"
|
||||
- include_tasks: "install_{{ etcd_deployment_type }}.yml"
|
||||
when: is_etcd_master
|
||||
tags:
|
||||
- upgrade
|
||||
|
||||
- include: set_cluster_health.yml
|
||||
- import_tasks: set_cluster_health.yml
|
||||
when: is_etcd_master and etcd_cluster_setup
|
||||
|
||||
- include: configure.yml
|
||||
- import_tasks: configure.yml
|
||||
when: is_etcd_master and etcd_cluster_setup
|
||||
|
||||
- include: refresh_config.yml
|
||||
- import_tasks: refresh_config.yml
|
||||
when: is_etcd_master and etcd_cluster_setup
|
||||
|
||||
- name: Restart etcd if certs changed
|
||||
@@ -56,8 +56,8 @@
|
||||
# After etcd cluster is assembled, make sure that
|
||||
# initial state of the cluster is in `existing`
|
||||
# state insted of `new`.
|
||||
- include: set_cluster_health.yml
|
||||
- import_tasks: set_cluster_health.yml
|
||||
when: is_etcd_master and etcd_cluster_setup
|
||||
|
||||
- include: refresh_config.yml
|
||||
- import_tasks: refresh_config.yml
|
||||
when: is_etcd_master and etcd_cluster_setup
|
||||
|
||||
Reference in New Issue
Block a user