win_domain - Ensures the existence of a Windows domain.

New in version 2.3.

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.

Options

parameter required default choices comments
dns_domain_name
yes
the DNS name of the domain which should exist and be reachable or reside on the target Windows host
safe_mode_password
yes
safe mode password for the domain controller

Examples

# ensure the named domain is reachable from the target host; if not, create the domain in a new forest residing on the target host
- win_domain:
    dns_domain_name: ansible.vagrant
    safe_mode_password: password123!

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
reboot_required
True if changes were made that require a reboot.
always boolean True

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Maintenance Info

For more information about Red Hat’s this support of this module, please refer to this knowledge base article<https://access.redhat.com/articles/rhel-top-support-policies>

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/win_domain_module.html