2022-11-26 15:19:16 +08:00
|
|
|
- block:
|
|
|
|
- name: 准备dnscache的部署文件
|
|
|
|
template: src=dns/nodelocaldns-ipvs.yaml.j2 dest={{ cluster_dir }}/yml/nodelocaldns.yaml
|
|
|
|
when: "PROXY_MODE == 'ipvs'"
|
2021-01-13 21:27:18 +08:00
|
|
|
|
2022-11-26 15:19:16 +08:00
|
|
|
- name: 准备dnscache的部署文件
|
|
|
|
template: src=dns/nodelocaldns-iptables.yaml.j2 dest={{ cluster_dir }}/yml/nodelocaldns.yaml
|
|
|
|
when: "PROXY_MODE == 'iptables'"
|
2021-01-13 21:27:18 +08:00
|
|
|
|
2022-11-27 20:42:58 +08:00
|
|
|
- name: 删除dnscache部署
|
|
|
|
shell: "{{ base_dir }}/bin/kubectl delete -f {{ cluster_dir }}/yml/nodelocaldns.yaml || echo true; sleep 3"
|
|
|
|
tags: force_change_certs
|
|
|
|
when: 'CHANGE_CA|bool'
|
|
|
|
|
2022-11-26 15:19:16 +08:00
|
|
|
- name: 创建dnscache部署
|
|
|
|
shell: "{{ base_dir }}/bin/kubectl apply -f {{ cluster_dir }}/yml/nodelocaldns.yaml"
|
2022-11-27 20:42:58 +08:00
|
|
|
tags: force_change_certs
|
2022-11-26 15:19:16 +08:00
|
|
|
when: 'ENABLE_LOCAL_DNS_CACHE|bool'
|