-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.yaml
More file actions
31 lines (31 loc) · 1.31 KB
/
install.yaml
File metadata and controls
31 lines (31 loc) · 1.31 KB
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
- name: Load Python path override
hosts: localhost
tasks:
- set_fact:
ansible_python_interpreter: "{{ lookup('ansible.builtin.env', 'ANSIBLE_PYTHON_INTERPRETER') }}"
- name: Create VM and install Windows
hosts: localhost
roles:
- role: create-vm
# If using a non-libvirt connection, assume that Windows is already installed
when: hostvars['sble-addc'].ansible_connection == 'community.libvirt.libvirt_qemu'
- name: Wait for VM to install and boot
hosts: sble-addc
gather_facts: false
tasks:
- name: |
Wait for VM to install and boot.
Make sure to connect to the VM (via virt-manager, virt-viewer, or similar) and follow the prompts (press any key to boot from DVD).
This will take a while.. if it times out, restart the playbook but leave the VM running to resume.
It is normal to see a bunch of QEMU guest agent errors in the Ansible output while waiting.
ansible.builtin.wait_for_connection:
# When using a preinstalled Windows, assume that any such initialization is already done.
when: hostvars['sble-addc'].ansible_connection == 'community.libvirt.libvirt_qemu'
- name: Install AD and initialize domain controller
hosts: sble-addc
roles:
- role: ad-dc
- name: Connect Kubernetes To AD
hosts: localhost
roles:
- role: connect-k8s