Forge Home

domain_membership

Module for managing AD domain membership of Windows systems.

114,105 downloads

90,032 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.1.2 (latest)
  • 1.1.1
  • 1.1.0 (deleted)
  • 1.0.2
  • 1.0.1
  • 1.0.0
  • 0.0.1
released Oct 5th 2016
This version is compatible with:

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'trlinkin-domain_membership', '1.1.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add trlinkin-domain_membership
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install trlinkin-domain_membership --version 1.1.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

trlinkin/domain_membership — version 1.1.2 Oct 5th 2016

domain_membership

Manage Active Directory domain membership with this module.

Parameters

  • domain - AD domain which the node should be a member of.
  • username - User with ability to join machines to a Domain.
  • password - Password for domain joining user.
  • machine_ou - [Optional] OU in the directory for the machine account to be created in.
  • resetpw - [Optional] Whether or not to force machine password reset if it becomes out of sync with the domain.
  • reboot - [Optional] Whether or not to reboot when the machine joins the domain. (reboot by default)
  • join_options - [Optional] A bit field for options to use when joining the domain. See http://msdn.microsoft.com/en-us/library/aa392154(v=vs.85).aspx Defaults to '1' (default domain join).
  • user_domain - [Optional] Domain of user account used to join machine, if different from domain machine will be joined to. If not specified, the value passed to the domain parameter will be used.

Usage

At the core, this module is invoking powershell to grab a Win32_ComputerSystem WMI object to call JoinDomainOrWorkgroup for the domain joining action. This method of domain joining is fully documented here.

To use the domain_membership class, you will need to pass three required parameters. The required parameters are domain, username, and password. See the parameter descriptions above for more information.

The method of domain joining is dictated by the join_option parameter. This parameter is expecting a bit mask to indicate the various options that will be used. The available options are described as part of the documentation linked above. The value is passed as an integer. By default, this module is using an integer value of '1' for the option. This translets simply to only using the "JOIN_DOMAIN" option which does not imply the creation of the machine account. To have at least a machine account created as part of the join, option '3' should be used. Overall, one should consult the MSDN document and determine the best combination of settings for their objective.

Example

class { 'domain_membership':
  domain       => 'puppet.example',
  username     => 'joinmember',
  password     => 'sUp3r_s3cR3t!',
  join_options => '3',
}

Contact

If you have questions or concerns about this module, email me at tom@puppetlabs.com

Changelog

Support

Please log tickets and issues at our Projects site