2018-09-04 20:17:23 +08:00
|
|
|
---
|
|
|
|
- name: "Kubernetes Apps | Lay Down MetalLB"
|
|
|
|
become: true
|
|
|
|
template: { src: "{{ item }}.j2", dest: "{{ kube_config_dir }}/{{ item }}" }
|
|
|
|
with_items: ["metallb.yml", "metallb-config.yml"]
|
|
|
|
register: "rendering"
|
|
|
|
when:
|
|
|
|
- "inventory_hostname == groups['kube-master'][0]"
|
|
|
|
- name: "Kubernetes Apps | Install and configure MetalLB"
|
|
|
|
kube:
|
2018-09-07 19:33:22 +08:00
|
|
|
kubectl: "{{bin_dir}}/kubectl"
|
2019-04-23 14:34:10 +08:00
|
|
|
filename: "{{ rendering.results | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
2018-09-04 20:17:23 +08:00
|
|
|
state: "{{ item.changed | ternary('latest','present') }}"
|
2019-03-18 09:15:09 +08:00
|
|
|
become: true
|
2018-09-04 20:17:23 +08:00
|
|
|
when:
|
|
|
|
- "inventory_hostname == groups['kube-master'][0]"
|