blob: cb46c17fd53b5d48a7409c2ef881a3cd86a7e9c1 (
plain)
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
36
37
38
39
40
41
42
43
44
45
|
- name: deploy active directory range on proxmox
hosts: localhost
gather_facts: no
tasks:
- name: deploy main domain vm on proxmox
include_role:
name: proxmox_vm
vars:
template: "{{ windows_server_template_name }}"
id: "{{ windows_server_template_id }}"
vm: "{{ main_dc01_hostname }}"
newid: "{{ main_dc01_vmid }}"
vmid: "{{ main_dc01_vmid }}"
ip: "{{ main_dc01_ip_address }}"
gateway: "{{ network_gateway }}"
dns: "8.8.8.8"
hostname: "{{ main_dc01_hostname }}"
domain: "{{ main_domain_name }}"
fqdn: "{{ main_dc01_hostname }}.{{ main_domain_name }}"
- name: add windows vm to in-memory inventory
add_host:
name: "{{ main_dc01_hostname }}.{{ main_domain_name }}"
ansible_host: "{{ main_dc01_ip_address }}"
ansible_connection: "{{ win_connector }}"
ansible_user: "{{ default_win_username }}"
ansible_password: "{{ default_win_password }}"
ansible_port: "{{ win_port }}"
ansible_winrm_transport: basic
ansible_winrm_server_cert_validation: ignore
changed_when: false
- name: configure windows domain controller
hosts: "{{ main_dc01_hostname }}.{{ main_domain_name }}"
gather_facts: no
vars_files:
- group_vars/all/connectors.yaml
- group_vars/all/main.yaml
tasks:
- name: configure windows dc
include_role:
name: dc01
vars:
hostname: "{{ main_dc01_hostname }}"
domain_name: "{{ main_domain_name }}"
|