Define ops_host in demo playbook
This commit is contained in:
parent
2fbdbe3c76
commit
49d0034fd4
@ -1,6 +1,7 @@
|
||||
- hosts: all
|
||||
become: true
|
||||
vars:
|
||||
ops_host: "172.16.11.120"
|
||||
master_ips:
|
||||
- "172.16.11.120"
|
||||
node_ips:
|
||||
|
||||
@ -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))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user