Forge Home

winad

Puppet Module to install Windows Active Directory components like organizantional unit, group, users etc.

7,730 downloads

7,288 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.

Version information

  • 0.1.2 (latest)
  • 0.1.1
  • 0.1.0 (deleted)
released Feb 17th 2016
This version is compatible with:
  • Windows

Start using this module

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

Add this module to your Puppetfile:

mod 'shoneslab-winad', '0.1.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add shoneslab-winad
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install shoneslab-winad --version 0.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

shoneslab/winad — version 0.1.2 Feb 17th 2016

winad

Build Status Windows Build Status Coverage Status Puppet Forge

Table of Contents

  1. Overview
  2. Description
  3. Setup - The basics of getting started with winad
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

The winad module manages Windows Active Directory tasks to create Organizanation Unit, Groups and Users.

Description

Puppet Module manages Windows Active Directory components such as Organizanation Unit, Groups and Users.

Setup

Setup Requirements

This module expects the puppetlabs-powershell module installed on the system

puppet module install puppetlabs-powershell

Finally, install the module with

puppet module install shoneslab-winad

Beginning with winad

The winad module allows you to manage windows system using the Puppet DSL. To create an organizational unit (OU), use the winad_ou type. The following code sets up a very basic organizantional unit.

winad_ou { 'TestOU':
    ensure      => present,
    path        => 'DC=shoneslab,DC=win,DC=com',
    city        => 'Atlanta',
    state       => 'GA',
    postalcode  => '30329',
    country     => 'US',
} 

Usage

###Installing Windows Feature - Net Framework Core:

 winad_features { 'net_framework_core':
    ensure      => present,
 } 

###Installing Windows Feature - AD Domain Services:

 winad_features { 'ad_domain_services':
    ensure      => present,
 } 

###Creating Windows AD Organizational Unit:

winad_ou { 'TestOU':
    ensure      => present,
    path        => 'DC=shoneslab,DC=win,DC=com',
    city        => 'Atlanta',
    state       => 'GA',
    postalcode  => '30329',
    country     => 'US',
} 

###Creating Windows AD Group:

winad_group { 'PrivUserGroup1':
    ensure          => present,
    path            => 'OU=TestOU,DC=shoneslab,DC=win,DC=com',
    group_scope     => 'DomainLocal',
    group_category  => 'Security',
}

###Creating Windows AD User:

winad_user { 'PuppetUser01':
    ensure                      => absent,
    path                        => 'CN=Users,DC=shoneslab,DC=win,DC=com',
    password_never_expires      => true,
    password                    => 'V@grant@123',
    enabled                     => true,
    type                        => 'User',
}

Reference

Types

  • winad_ou: Creates an Organizational Unit(OU).
  • winad_group: Creates a Group.
  • winad_user: Creates a User.

###Parameters

####Type: winad_ou

#####ensure Specifies the basic state of the resource. Valid values are 'present', 'absent'.

#####name Specifies the name of the organizational unit.

#####desc Specifies the description of the organizational unit.

#####path Specifies the X.500 path of the Organizational Unit (OU) or container where the new object is created.

#####street_address Specifies the organizational unit's street address.

#####city Specifies the organizational unit's state or province.

#####country Specifies the country or region code for the user's language of choice.

#####postalcode Specifies the user's postal code or zip code.

####Type: winad_group

#####ensure Specifies the basic state of the resource. Valid values are 'present', 'absent'.

#####name Specifies the name of the AD group.

#####desc Specifies the description of the AD group.

#####group_scope Specifies the group scope of the group. Valid values are "DomainLocal", "Global", "Universal".

#####group_category Specifies the category of the group. Valid values are "Distribution", "Security"

####Type: winad_user

#####ensure Specifies the basic state of the resource. Valid values are 'present', 'absent'.

#####name Specifies the users name.

#####desc Specifies the description of the user.

#####path Specifies the X.500 path of the Organizational Unit (OU) or container where the new object is created.

#####password_never_expires Specifies whether the password of an account can expire.

#####password Specifies a new password value for an account.

#####enabled Specifies if an account is enabled. An enabled account requires a password.

Limitations

Currently, the winad module is tested on the following windows operating system versions:

  • Windows 2012 R2

Other windows versions might be compatible, but are not being actively tested.

Development

TODO - Precheck required for OU, Group and Users. Throws error if the forest/Domain Controller/AD is not configured.

TODO - Incorporate more attributes to the types

TODO - Update Features

TODO - Need to test on versions other than Win2012R2

TODO - Acceptance Testing Scripts

TODO - Documentation