c12s-kubespray/contrib/metallb/roles/provision/tasks/main.yml
Sascha Marcel Schmidt 97aa87612a
use bin_dir
2018-09-11 16:27:17 +02:00

17 lines
618 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:
name: "MetalLB"
filename: "{{ kube_config_dir }}/metallb.yml"
kubectl: "{{bin_dir}}/kubectl"
state: "{{ item.changed | ternary('latest','present') }}"
with_items: "{{ rendering.results }}"
when:
- "inventory_hostname == groups['kube-master'][0]"