cookbook 'ad-join', '= 4.0.1'
ad-join
(25) Versions
4.0.1
-
Follow36
Joins windows computers to Active Directory (LDAP) Domain
cookbook 'ad-join', '= 4.0.1', :supermarket
knife supermarket install ad-join
knife supermarket download ad-join
ad-join Cookbook
This is a library cookbook that will join a windows computer to a windows AD domain
Requirements
Chef >= 12.5.1
This leverages custom resources so it will not work on chef versions older than 12.5.1
Tested on:
Windows 2012R2
Usage
This cookbook is a library cookbook and is intended to be used by your own wrapper cookbook. See the [recipes directory](./recipes) for examples.
It contains a custom resource named domain_join
that takes 4 properties
- domain
- domain_user
- domain_password
- ou
domain_join 'foobar' do domain 'example.com' domain_user 'binduser' domain_password 'correct-horse-battery-staple' ou 'OU=US,OU=West,OU=Web,DC=example,DC=com' end
The ou must be formatted with OU=
before each organizational unit and DC=
before each domain component. see [recipes/example_complex.rb](./recipes/example_complex.rb) for an example of how to derive the OU from attributes.
Behind the scenes
If you bootstrapped the node with the name option; e.g.
knife bootstrap -N us-web01
Then that is the name that will be used to join the domain (not the hostname since windows randomly generates it on first boot)
The cookbook creates a windows scheduled task that runs chef as soon as the VM is started. The scheduled task is deleted after all the reboots.
The cookbook will restart windows twice since some group policy objects (like the time zone) are not applied on first boot. You can change this behavior by changing the following attribute to false.
default['ad-join']['windows']['double_reboot'] = true
License and Authors
Authors:
Volodymyr Babchynskyy vbabch@softserveinc.com
Spencer Owen sowen@netdocuments.com
Dependent cookbooks
windows >= 1.36.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
4.0.1
Fixes attribute name for double reboot
4.0.0
Created new git repo for public release on github
3.0.2
Create breadcrumb only if missing
3.0.1
Fixes OU not having quotes
3.0.0
Complete rewrite to make it a library cookbook
2.0.2
More verbose logging in scheduled task
2.0.1
Reduces timeout to 30 seconds
1.0.0
general cleanup, removed private domain name and so on, prepared for public release
0.9.0
removed private usernames and passwords
0.8.1
rubocop convention alerts accepted
0.8.0
changed databag name
0.6.1
rubocop check for line length now is 120 symbols
0.6.0
rubocop and foodcritic inspections added
0.5.1
icon added
0.5.0
tests added
0.4.0
Added possibility to run it on teamcity CI
0.3.0
Fixed, directory server is unavailable issue, code commented for future use
0.2.0
Passwords moved into databag
0.1.1
added ohai reload for new fqdn resolution in chef
0.1.0
Initial release of ad-join
Foodcritic Metric
4.0.1 passed this metric
4.0.1 passed this metric