mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 15:07:21 +00:00
dns server changes
This commit is contained in:
1 parent
2747532497
commit
aa85cbbdb1
1 file changed
+13
-1
@@ -70,6 +70,9 @@
|
|||||||
pause:
|
pause:
|
||||||
seconds: 30
|
seconds: 30
|
||||||
|
|
||||||
|
- name: flush DNS cache
|
||||||
|
win_shell: ipconfig /flushdns
|
||||||
|
|
||||||
- name: Promote DC02 to domain controller
|
- name: Promote DC02 to domain controller
|
||||||
win_domain_controller:
|
win_domain_controller:
|
||||||
dns_domain_name: "{{ win_project }}.loc"
|
dns_domain_name: "{{ win_project }}.loc"
|
||||||
@@ -92,6 +95,15 @@
|
|||||||
safe_mode_password: "{{ safemode_password }}"
|
safe_mode_password: "{{ safemode_password }}"
|
||||||
state: domain_controller
|
state: domain_controller
|
||||||
register: dc02_promotion
|
register: dc02_promotion
|
||||||
|
|
||||||
|
- name: Setting DNS Servers (Secondary DC)
|
||||||
|
vars:
|
||||||
|
dc01_dns: "{{ os_project }}-{{ win_project }}-dc01"
|
||||||
|
win_dns_client:
|
||||||
|
adapter_names: "*"
|
||||||
|
dns_servers:
|
||||||
|
- "127.0.0.1"
|
||||||
|
- "{{ hostvars[dc01_dns].ansible_host }}"
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Rebooting DC02 post promotion to domain controller
|
- name: Rebooting DC02 post promotion to domain controller
|
||||||
@@ -108,4 +120,4 @@
|
|||||||
src: policy_templates/PolicyDefinitions
|
src: policy_templates/PolicyDefinitions
|
||||||
dest: "C:\\Windows\\SYSVOL\\sysvol\\{{ win_project }}.loc\\policies\\"
|
dest: "C:\\Windows\\SYSVOL\\sysvol\\{{ win_project }}.loc\\policies\\"
|
||||||
force: true
|
force: true
|
||||||
|
|
||||||
Reference in new issue
Block a user