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.

25 lines
826 B

  1. ---
  2. - name: Snapshot Controller | Generate Manifests
  3. template:
  4. src: "{{ item.file }}.j2"
  5. dest: "{{ kube_config_dir }}/{{ item.file }}"
  6. with_items:
  7. - {name: rbac-snapshot-controller, file: rbac-snapshot-controller.yml}
  8. - {name: snapshot-controller, file: snapshot-controller.yml}
  9. register: snapshot_controller_manifests
  10. when: inventory_hostname == groups['kube-master'][0]
  11. tags: snapshot-controller
  12. - name: Snapshot Controller | Apply Manifests
  13. kube:
  14. kubectl: "{{ bin_dir }}/kubectl"
  15. filename: "{{ kube_config_dir }}/{{ item.item.file }}"
  16. state: "latest"
  17. with_items:
  18. - "{{ snapshot_controller_manifests.results }}"
  19. when:
  20. - inventory_hostname == groups['kube-master'][0]
  21. - not item is skipped
  22. loop_control:
  23. label: "{{ item.item.file }}"
  24. tags: snapshot-controller