---
- name: Hybridnet | Synchronize Hybridnet Helm chart package to remote node
  copy:
    src: >-
      {{ .binary_dir }}/cni/hybridnet-{{ .cni.hybridnet_version }}.tgz
    dest: >-
      /etc/kubernetes/cni/hybridnet-{{ .cni.hybridnet_version }}.tgz

- name: Hybridnet | Generate Hybridnet custom values file
  copy:
    content: |
      {{ .cni.hybridnet.values }}
    dest: /etc/kubernetes/cni/hybridnet-values.yaml

# Reference: https://artifacthub.io/packages/helm/hybridnet/hybridnet
- name: Hybridnet | Install Hybridnet using Helm
  command: |
    helm upgrade --install --namespace kube-system hybridnet /etc/kubernetes/cni/hybridnet-{{ .cni.hybridnet_version }}.tgz -f /etc/kubernetes/cni/hybridnet-values.yaml
