diff options
author | heqnx <root@heqnx.com> | 2025-07-11 21:55:20 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-07-11 21:55:20 +0300 |
commit | 6ec2eb61a02f9e55ef5b8d22a5ca61ca53ca05e7 (patch) | |
tree | d975569e35991a02c73706ce81c0fc1f2e92405c /ansible/main.yaml | |
parent | 742fa0d51cd384ea3d856438861bb86738fdabb8 (diff) | |
download | ansible-active-directory-range-6ec2eb61a02f9e55ef5b8d22a5ca61ca53ca05e7.tar.gz ansible-active-directory-range-6ec2eb61a02f9e55ef5b8d22a5ca61ca53ca05e7.zip |
added initial setup for domain controller
Diffstat (limited to 'ansible/main.yaml')
-rw-r--r-- | ansible/main.yaml | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/ansible/main.yaml b/ansible/main.yaml new file mode 100644 index 0000000..cb46c17 --- /dev/null +++ b/ansible/main.yaml @@ -0,0 +1,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 }}" |