win_domain – Ensures the existence of a Windows domain¶
Synopsis¶
- Ensure that the domain named by
dns_domain_name
exists and is reachable. - If the domain is not reachable, the domain is created in a new forest on the target Windows Server 2012R2+ host.
- This module may require subsequent use of the win_reboot action if changes are made.
Parameters¶
See Also¶
See also
- win_domain_controller – Manage domain controller/member server state for a Windows host
- The official documentation on the win_domain_controller module.
- win_domain_computer – Manage computers in Active Directory
- The official documentation on the win_domain_computer module.
- win_domain_group – Creates, modifies or removes domain groups
- The official documentation on the win_domain_group module.
- win_domain_membership – Manage domain/workgroup membership for a Windows host
- The official documentation on the win_domain_membership module.
- win_domain_user – Manages Windows Active Directory user accounts
- The official documentation on the win_domain_user module.
Examples¶
- name: Create new domain in a new forest on the target host
win_domain:
dns_domain_name: ansible.vagrant
safe_mode_password: password123!
- name: Create new Windows domain in a new forest with specific parameters
win_domain:
create_dns_delegation: no
database_path: C:\Windows\NTDS
dns_domain_name: ansible.vagrant
domain_mode: Win2012R2
domain_netbios_name: ANSIBLE
forest_mode: Win2012R2
safe_mode_password: password123!
sysvol_path: C:\Windows\SYSVOL
register: domain_install
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
reboot_required
boolean
|
always |
True if changes were made that require a reboot.
Sample:
True
|
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Core Team. [core]
Red Hat Support¶
More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.
Authors¶
- Matt Davis (@nitzmahone)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.