diff --git a/playbooks/demo_gpu_k8s.yml b/playbooks/demo_gpu_k8s.yml index 980bab6..485f8bf 100644 --- a/playbooks/demo_gpu_k8s.yml +++ b/playbooks/demo_gpu_k8s.yml @@ -1,6 +1,7 @@ - hosts: all become: true vars: + ops_host: "172.16.11.120" master_ips: - "172.16.11.120" node_ips: diff --git a/playbooks/roles/vhosts/gpu-k8s/tasks/install_cluster.yml b/playbooks/roles/vhosts/gpu-k8s/tasks/install_cluster.yml index e001dd4..6c5940e 100644 --- a/playbooks/roles/vhosts/gpu-k8s/tasks/install_cluster.yml +++ b/playbooks/roles/vhosts/gpu-k8s/tasks/install_cluster.yml @@ -1,3 +1,10 @@ +- name: Install sealos CLI + shell: | + curl -sL https://raw.githubusercontent.com/labring/sealos/main/scripts/install.sh | bash -s {{ sealos_version }} + args: + executable: /bin/bash + when: inventory_hostname == (ops_host | default(master_ips | first)) + - name: Run sealos to create Kubernetes cluster shell: | sealos run \ @@ -10,4 +17,4 @@ --cmd "{{ kubeadm_init_cmd }}" args: executable: /bin/bash - when: inventory_hostname == (master_ips | first) + when: inventory_hostname == (ops_host | default(master_ips | first))