ansible v2 (release 3.4.9)
This commit is contained in:
21
roles/agent_os_setting/tasks/04-k8s-master-yaml.yml
Normal file
21
roles/agent_os_setting/tasks/04-k8s-master-yaml.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
- name: Copy calico yaml
|
||||
template:
|
||||
src: calico.yaml.j2
|
||||
dest: /tmp/calico.yaml
|
||||
|
||||
- name: Copy metric server yaml
|
||||
template:
|
||||
src: components.yaml.j2
|
||||
dest: /tmp/components.yaml
|
||||
|
||||
- name: Configure Calico networking.
|
||||
command: kubectl apply -f /tmp/calico.yaml
|
||||
register: calico_result
|
||||
changed_when: "'created' in calico_result.stdout"
|
||||
when: kubernetes_pod_network.cni == 'calico'
|
||||
|
||||
- name: Configure Metric Server
|
||||
command: kubectl apply -f /tmp/components.yaml
|
||||
register: metric_server_result
|
||||
changed_when: "'created' in metric_server_result.stdout"
|
||||
Reference in New Issue
Block a user