Ctrl K
ComunidadGuías…

setup_cluster.yml

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
# code: language=ansible

---
- name: Setup cluster
  any_errors_fatal: true
  hosts:
    - k3s_cluster
    - headscale
  environment:
    KUBECONFIG: /etc/rancher/k3s/k3s.yaml
  roles:
    - name: Global handlers
      role: common

    - name: Prepare hosts and controller state
      role: prepare

    - name: Setup system
      role: system_setup
      when:
        - not (skip_system_setup or manifest_only_setup)

    - name: Setup ZFS
      role: zfs
      when:
        - not (skip_zfs_setup or manifest_only_setup)

    - name: Create a VPN mesh network
      role: vpn
      when:
        - not (skip_vpn_setup or manifest_only_setup)

    - name: Deploy Kubernetes cluster
      role: kubernetes_cluster
      when:
        - not (skip_k8s_setup or manifest_only_setup)
        - "'k3s_cluster' in group_names"

    - name: Deploy Kubernetes applications
      role: kubernetes_apps
      when:
        - "'k3s_cluster' in group_names"