---
- name: Configure Calico networking.
  command: "{{ item }}"
  with_items:
    - kubectl apply -f {{ kubernetes_calico_manifest_file }}
  register: calico_result
  changed_when: "'created' in calico_result.stdout"
  when: kubernetes_pod_network.cni == 'calico'

- name: Configure Metric Server
  command: "{{ item }}"
  with_items:
    - kubectl apply -f {{ kubernetes_metric_server_file }}
  register: metric_server_result
  changed_when: "'created' in metric_server_result.stdout"
