cookbook 'windows_home', '~> 2.0.0'
windows_home (3) Versions 2.0.0 Follow6
Generates user's home directory
cookbook 'windows_home', '~> 2.0.0', :supermarket
knife supermarket install windows_home
knife supermarket download windows_home
Windows Home Cookbook
Windows Home generates user's home directory (e.g. C:\Users\${username}). This is useful for
when you need access to directories like Documents or AppData after creating a user.
Tested on Amazon Windows Server 2012 R2 AMI.
Requirements
- Chef 11.6.0 or higher
- Windows Server 2008 R2 or higher due to its API usage
Platforms
- Windows
Usage
Include windows_home
as a dependency to use resource.
windows_home
Generates user's home directory (e.g. C:\Users\${username}).
Note the user will have to be created before calling windows_home. If you are not able to create a file
under home directory, then make sure you have the appropriate group permissions.
Actions
-
create
- Creates and populates the user's home directory.
Attributes
-
username
- Username of account to create and populate home directory for. Defaults to name of the resource block. -
password
- The password of the user (required). -
confidential
- Ensure that sensitive resource data is not logged by the chef-client. Default:true
.
Example
user 'newuser' do password 'N3wPassW0Rd' end group 'Administrators' do members ['newuser'] append true action :modify end windows_home 'newuser' do password 'N3wPassW0Rd' end
ChefSpec Matchers
The Chrome cookbook includes a custom ChefSpec matcher you can use to test your
own cookbooks.
Example Matcher Usage
expect(chef_run).to create_windows_home('username').with( password: 'N3wPassW0Rd' )
Windows Home Cookbook Matcher
- create_windows_home(username)
Getting Help
- Ask specific questions on Stack Overflow.
- Report bugs and discuss potential features in Github issues.
Contributing
Please refer to CONTRIBUTING.
License
MIT - see the accompanying LICENSE file for
details.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
Changelog
2.0.0 - 2017-03-17
- Rename sensitive attribute to confidential to be Chef 13 compatible
1.1.0 - 2017-01-02
- Add sensitive attribute
- Use use_inline_resources
1.0.0 - 2015-03-28
- Initial release (ported over from windows_desktop)
Collaborator Number Metric
2.0.0 failed this metric
Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
2.0.0 failed this metric
FC066: Ensure chef_version is set in metadata: windows_home/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
2.0.0 passed this metric
Testing File Metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.0.0 failed this metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
2.0.0 failed this metric
FC066: Ensure chef_version is set in metadata: windows_home/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
2.0.0 passed this metric
Testing File Metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.0.0 failed this metric
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
2.0.0 passed this metric
Testing File Metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.0.0 failed this metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number