- Description
- Setup - The basics of getting started with windowstime
- Development - Guide for contributing to the module
Fork of ncorrare's original module which appears to have been abandoned sometime in 2018. If author would like to resume, please notify.
This module configures NTP sync on Windows Servers. It's extremely useful on standalone instances not connected to AD, but can also be modified to sync from the AD domain where required by changing the syncflag setting from 'local' to 'domain'. It switches the W32time Service from triggered to running, so it's constantly verifying and syncing the clock. It can also configure the systems in the correct timezone.
- Alters the HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\NtpServer to the defined list (and flags) of NTP servers.
- Alters HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type to NTP or NT5DS depending on syncflag setting (default: NTP)
- Configures the w32time service.
- Does an initial resync.
- If timezone is set, it will configure the system to the specified timezone.
You can just include the class to configure the server to sane defaults:
include ::windowstime
Or configure your own NTP servers:
class { 'windowstime':
servers => { 'pool.ntp.org' => '0x01',
'time.windows.com' => '0x01',
}
}
Or configure your NTP servers and the syncflag:
class { 'windowstime':
servers => { 'pool.ntp.org' => '0x01',
'time.windows.com' => '0x02',
},
syncflag => 'local',
}
Or configure your NTP servers and the timezone:
class { 'windowstime':
servers => { 'pool.ntp.org' => '0x01',
'time.windows.com' => '0x01',
},
timezone => 'Greenwich Standard Time',
}
Timezone values are validated to parameters accepted from the tzutil command. You can check the full list on data/common.yaml.
Please ensure that servers have the correct flag:
- 0x01 SpecialInterval
- 0x02 UseAsFallbackOnly
- 0x04 SymmatricActive
- 0x08 Client
Regular rules apply, send a PR and I promise to look at it as soon as I can.