c12s-kubespray/contrib/metallb/roles/provision/tasks/main.yml
2019-04-22 23:34:10 -07:00

16 lines
651 B
YAML

---
- 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:
kubectl: "{{bin_dir}}/kubectl"
filename: "{{ rendering.results | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
state: "{{ item.changed | ternary('latest','present') }}"
become: true
when:
- "inventory_hostname == groups['kube-master'][0]"