Housekeeping; Add pause
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
38f8dd96e1
commit
5b5a137a56
22
playbook.yml
22
playbook.yml
@ -102,37 +102,37 @@
|
||||
|
||||
- block:
|
||||
|
||||
- name: \[Initial node\] Install K3s binary
|
||||
- name: Initial node -- Install K3s binary
|
||||
ansible.builtin.shell:
|
||||
cmd: "curl -sfL https://get.k3s.io | sh -s - server --cluster-init --disable local-storage,traefik --tls-san {{ cluster.virtualip | ansible.utils.ipaddr('address') }}"
|
||||
|
||||
- name: \[Initial node\] Retrieve token
|
||||
- name: Initial node -- Retrieve token
|
||||
ansible.builtin.slurp:
|
||||
src: /var/lib/rancher/k3s/server/token
|
||||
register: k3s_token
|
||||
|
||||
- name: \[Initial node\] Store token
|
||||
- name: Initial node -- Store token
|
||||
ansible.builtin.set_fact:
|
||||
clustertoken: "{{ k3s_token.content | b64decode | trim }}"
|
||||
|
||||
- block:
|
||||
|
||||
- name: \[Install 'kube-vip'\] Retrieve manifest for RBAC
|
||||
- name: Install 'kube-vip' -- Retrieve manifest for RBAC
|
||||
ansible.builtin.uri:
|
||||
url: https://kube-vip.io/manifests/rbac.yaml
|
||||
return_content: yes
|
||||
register: manifest_rbac
|
||||
|
||||
- name: \[Install 'kube-vip'\] Pull image
|
||||
- name: Install 'kube-vip' -- Pull image
|
||||
ansible.builtin.shell:
|
||||
cmd: ctr image pull ghcr.io/kube-vip/kube-vip:latest
|
||||
|
||||
- name: \[Install 'kube-vip'\] Generate manifest for daemonSet
|
||||
- name: Install 'kube-vip' -- Generate manifest for daemonSet
|
||||
ansible.builtin.shell:
|
||||
cmd: "ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:latest vip /kube-vip manifest daemonset --interface {{ ansible_default_ipv4.interface }} --address {{ cluster.virtualip | ansible.utils.ipaddr('address') }} --inCluster --taint --controlplane --services --arp --leaderElection"
|
||||
register: manifest_daemonset
|
||||
|
||||
- name: \[Install 'kube-vip'\] Inject manifest for installation
|
||||
- name: Install 'kube-vip' -- Inject manifest for installation
|
||||
ansible.builtin.template:
|
||||
src: kube-vip.j2
|
||||
dest: /var/lib/rancher/k3s/server/manifests/kube-vip.yml
|
||||
@ -141,7 +141,13 @@
|
||||
|
||||
- block:
|
||||
|
||||
- name: \[Additional nodes\] Install K3s binary
|
||||
- name: Wait for API to become available on virtual IP
|
||||
ansible.builtin.wait_for:
|
||||
host: "{{ cluster.virtualip | ansible.utils.ipaddr('address') }}"
|
||||
port: 6443
|
||||
timeout: 300
|
||||
|
||||
- name: Additional nodes -- Install K3s binary
|
||||
ansible.builtin.shell:
|
||||
cmd: "curl -sfL https://get.k3s.io | sh -s - server --disable local-storage,traefik"
|
||||
environment:
|
||||
|
@ -6,5 +6,4 @@ hv:
|
||||
folder: /DeSchakel/vm/Development
|
||||
cluster: Cluster.Legacy
|
||||
datastore: NAS01.RAID5
|
||||
isodatastore: ESX00.SSD03
|
||||
network: LAN
|
||||
|
Loading…
Reference in New Issue
Block a user