You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
622 B

6 years ago
  1. ---
  2. - name: "Kubernetes Apps | Lay Down MetalLB"
  3. become: true
  4. template: { src: "{{ item }}.j2", dest: "{{ kube_config_dir }}/{{ item }}" }
  5. with_items: ["metallb.yml", "metallb-config.yml"]
  6. register: "rendering"
  7. when:
  8. - "inventory_hostname == groups['kube-master'][0]"
  9. - name: "Kubernetes Apps | Install and configure MetalLB"
  10. kube:
  11. name: "MetalLB"
  12. kubectl: "{{bin_dir}}/kubectl"
  13. filename: "{{ kube_config_dir }}/{{ item.item }}"
  14. state: "{{ item.changed | ternary('latest','present') }}"
  15. with_items: "{{ rendering.results }}"
  16. when:
  17. - "inventory_hostname == groups['kube-master'][0]"