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:
Matthew Mosesohn
2018-01-29 14:37:48 +03:00
committed by GitHub
parent f4180503c8
commit dc6a17e092
43 changed files with 117 additions and 117 deletions

View File

@@ -1,12 +1,12 @@
---
- include: sync_kube_master_certs.yml
- import_tasks: sync_kube_master_certs.yml
when: inventory_hostname in groups['kube-master']
- include: sync_kube_node_certs.yml
- import_tasks: sync_kube_node_certs.yml
when: inventory_hostname in groups['k8s-cluster']
# Issue admin certs to kube-master hosts
- include: ../../../vault/tasks/shared/issue_cert.yml
- include_tasks: ../../../vault/tasks/shared/issue_cert.yml
vars:
issue_cert_common_name: "admin"
issue_cert_copy_ca: "{{ item == kube_admin_certs_needed|first }}"
@@ -37,7 +37,7 @@
run_once: true
# Issue master components certs to kube-master hosts
- include: ../../../vault/tasks/shared/issue_cert.yml
- include_tasks: ../../../vault/tasks/shared/issue_cert.yml
vars:
issue_cert_common_name: "kubernetes"
issue_cert_alt_names: "{{ kube_cert_alt_names }}"
@@ -63,7 +63,7 @@
notify: set secret_changed
# Issue node certs to k8s-cluster nodes
- include: ../../../vault/tasks/shared/issue_cert.yml
- include_tasks: ../../../vault/tasks/shared/issue_cert.yml
vars:
# Need to strip out the 'node-' prefix from the cert name so it can be used
# with the node authorization plugin ( CN matches kubelet node name )
@@ -80,7 +80,7 @@
when: inventory_hostname in groups['k8s-cluster']
# Issue proxy certs to k8s-cluster nodes
- include: ../../../vault/tasks/shared/issue_cert.yml
- include_tasks: ../../../vault/tasks/shared/issue_cert.yml
vars:
issue_cert_common_name: "system:kube-proxy"
issue_cert_copy_ca: "{{ item == kube_proxy_certs_needed|first }}"