cookbook 'win_time', '= 1.1.0'
win_time (2) Versions 1.1.0 Follow1
Provides resources for configuring system time in Windows
cookbook 'win_time', '= 1.1.0', :supermarket
knife supermarket install win_time
knife supermarket download win_time
Windows Time Cookbook
Maintainer: OIT Systems Engineering (ua-oit-se@alaska.edu)
Purpose
The custom resources in this cookbook implement the mechanism for configuring the system time in Windows. For an example of a policy for how to configure time, see the se-win-baseline cookbook.
Requirements
Chef
This cookbook requires Chef 13+
Platforms
Supported Platform Families:
- Windows
Platforms validated via Test Kitchen:
- Windows Server 2016
- Windows Server 2012
- Windows Server 2008R2
- Windows 10
Notes:
- This is a low-level cookbook with precondition that Powershell 5.0 is installed
- Custom resources will not work with previous versions of Powershell
- Windows 2008 and 2012 require WMF update to install Powershell 5.0
- Powershell is not installed by this cookbook
Resources
This cookbook provides two resources for managing system time in Windows. See Set-TimeZone for details on configuring time zone in Windows.
time_client
A time_client provides a single action to configure the time server for NTP/Win32tm.
Actions
One action is provided.
-
set_server_name
- Post condition is that the named server is used for time queries.
Attributes
This resource has a two attributes.
-
name
- Thename_property
of the resource. Must be unique but otherwise ignored. -
server_url
- The URL of a time server, e.g.ntp.alaska.edu
.
time_zone
A time_zone provides a single action to set the time zone for the system clock.
Actions
One action is provided.
-
set_zone
- Post condition is that the named time zone is set on the system.
Attributes
This resource has a two attributes.
-
name
- Thename_property
of the resource. Must be unique but otherwise ignored. -
zone_name
- The name of the time zone to be configured. Must be a valid PowerShell time zone, e.g.Alaskan Standard Time
.
Recipes
win_time::default
This recipe configures possibly both time client behavior and timezone.
Attributes
Several attributes are provided for time.
Time zone attributes:
m
* node['win_time']['set_time_zone']
- Defaults to true
. Determines if time zone is set.
* node['win_time']['time_zone']
- Defaults to Alaskan Standard Time
. Valid options are Windows PowerShell time zones.
Time server attributes:
-
node['win_time']['set_time_server']
- Defaults totrue
. Determines if NTP/Win32tm servers are configured. -
node['win_time']['time_server_url']
- Defaults tontp.alaska.edu
. The URL of the time server to use for NTP/Win32tm queries.
Examples
time_client 'UA Time Server' do server_url 'ntp.alaska.edu' end time_zone 'Alaska Zone' do zone_name 'Alaskan Standard Time' end
Development
Development should follow GitHub Flow to foster some shared responsibility.
- Fork/branch the repository
- Make changes
- Fix all Rubocop (
rubocop
) and Foodcritic (foodcritic .
) offenses - Write smoke tests that reasonably cover the changes (
kitchen verify
) - Pass all smoke tests
- Submit a Pull Request using Github
- Wait for feedback and merge from a second developer
Requirements
For running tests in Test Kitchen a few dependencies must be installed.
- ChefDK
- Vagrant
- VirtualBox
- Install the dependency tree with
berks install
- Install the Vagrant WinRM plugin:
vagrant plugin install vagrant-winrm
Dependent cookbooks
windows >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Changelog for Windows DNS Cookbook
1.1.0
- Upgraded for Chef 14
- Added support for Windows 2008
1.0.0
- Initial public release
Collaborator Number Metric
1.1.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
1.1.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
1.1.0 passed this metric
No Binaries Metric
1.1.0 passed this metric
Testing File Metric
1.1.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
1.1.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
1.1.0 failed this metric
1.1.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
1.1.0 passed this metric
No Binaries Metric
1.1.0 passed this metric
Testing File Metric
1.1.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
1.1.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
1.1.0 passed this metric
1.1.0 passed this metric
Testing File Metric
1.1.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
1.1.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
1.1.0 failed this metric
1.1.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