Some checks reported errors
continuous-integration/drone/push Build encountered an error
43 lines
1 KiB
YAML
43 lines
1 KiB
YAML
---
|
|
- name: calico setup
|
|
block:
|
|
- name: Include vars
|
|
ansible.builtin.include_vars: "calico-files.yaml"
|
|
|
|
- name: calico install
|
|
kubernetes.core.k8s:
|
|
state: present
|
|
context: "{{ my_context }}"
|
|
merge_type: merge
|
|
resource_definition: "{{ lookup('template', item) | from_yaml }}"
|
|
with_items:
|
|
- "{{ calico_files }}"
|
|
register: calico_changed
|
|
|
|
- name: delete pods calicoctl
|
|
kubernetes.core.k8s:
|
|
state: absent
|
|
context: "{{ my_context }}"
|
|
kind: Pod
|
|
name: calicoctl
|
|
namespace: kube-system
|
|
# when:
|
|
# - calico_changed is changed
|
|
#
|
|
# - name: calicoctl install
|
|
# kubernetes.core.k8s:
|
|
# state: present
|
|
# context: "{{ my_context }}"
|
|
# apply: true
|
|
# resource_definition: "{{ lookup('file', item) | from_yaml }}"
|
|
# with_items:
|
|
# - "{{ calicoctl_files }}"
|
|
# when:
|
|
# - calico_changed is changed
|
|
|
|
|
|
when:
|
|
- kubernetes_network == "calico"
|
|
tags:
|
|
- calico
|
|
- k8s-network
|