forked from k3s-io/k3s-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
provision_nodes.yml
27 lines (25 loc) · 921 Bytes
/
provision_nodes.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
- hosts: localhost
gather_facts: no
# ignore_unreachable: yes
tasks:
- name: Include provision_node role for k3s_cluster
include_role:
role: vm/provision
vars:
provision_node: "{{ hostvars[item] }}"
loop: "{{ groups['k3s_cluster'] + groups['loadbalancer'] }}"
when: limit is undefined or item in limit
- name: Wait for vmware tools to be available and verify ip is correct
community.vmware.vmware_guest_tools_wait:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
name: "{{ item }}"
folder: "{{ vcenter_path }}"
datacenter: "{{ vcenter_datacenter }}"
validate_certs: no
delegate_to: localhost
register: facts
until: facts.instance.ipv4 in hostvars[item].ip
loop: "{{ groups['k3s_cluster'] + groups['loadbalancer'] }}"