-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprovision_infra_vmware.yml
35 lines (32 loc) · 1.06 KB
/
provision_infra_vmware.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
28
29
30
31
32
33
34
35
---
- name: provision hosts on vmware
hosts: localhost
gather_facts: false
become: false
vars_files:
- node-config/node-vmware.yml
roles:
- ansible-role-vmware
post_tasks:
- name: add hosts to winpe group
ansible.builtin.add_host:
name: "{{ item.item.name }}"
ansible_host: "{{ item.item.networks[0].ip | default(item.instance.guest.ipAddress) }}"
ansible_port: "{{ item.item.ansible_port | default(ansible_port) | default('5986') }}"
groups: tag_role_wadk,tag_app_winpe
loop: "{{ guest_ip_address.results }}"
when: ('winwaik' in item.invocation.module_args.name)
changed_when: false
tags:
- addhost
- name: wait for systems to be available
ansible.builtin.wait_for_connection:
delay: 10
timeout: 300
vars:
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_transport: credssp
ansible_winrm_server_cert_validation: ignore
delegate_to: "{{ hostvars[item].ansible_host }}"
loop: "{{ groups.tag_role_wadk }}"