Initial setup 'kube-virt'
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
fcf3353502
commit
c6a0490af7
12
playbook.yml
12
playbook.yml
@ -116,6 +116,18 @@
|
|||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
cluster: "{{ cluster | combine( { 'token': ( k3s_token.content | b64decode | trim ) } ) }}"
|
cluster: "{{ cluster | combine( { 'token': ( k3s_token.content | b64decode | trim ) } ) }}"
|
||||||
|
|
||||||
|
- name: Pull 'kube-vip' image
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: ctr image pull ghcr.io/kube-vip/kube-vip:latest
|
||||||
|
|
||||||
|
- name: 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_interfaces | difference(['lo']) }} --address {{ cluster.virtualip | ansible.utils.ipaddr('address') }} --inCluster --taint --controlplane --services --arp --leaderElection"
|
||||||
|
register: manifest
|
||||||
|
|
||||||
|
- ansible.builtin.debug:
|
||||||
|
var: manifest
|
||||||
|
|
||||||
when: inventory_hostname == ansible_play_hosts[0]
|
when: inventory_hostname == ansible_play_hosts[0]
|
||||||
|
|
||||||
- name: Additional nodes
|
- name: Additional nodes
|
||||||
|
Loading…
Reference in New Issue
Block a user