Forge Home

windowstime

A module to manage time configuration in Windows

18,018 downloads

17,081 latest version

2.4 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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.4.3 (latest)
  • 0.4.1
  • 0.3.0
  • 0.2.0
released Dec 8th 2016
This version is compatible with:
  • Puppet Enterprise >=2016.1.0 <= 2016.4.0
  • Puppet >= 4.5.0 < 5.0.0

Start using this module

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

Add this module to your Puppetfile:

mod 'ncorrare-windowstime', '0.4.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add ncorrare-windowstime
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install ncorrare-windowstime --version 0.4.3

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

ncorrare/windowstime — version 0.4.3 Dec 8th 2016

windowstime

Table of Contents

  1. Description
  2. Setup - The basics of getting started with windowstime
  3. Development - Guide for contributing to the module

Description

This module configures NTP sync on Windows Servers. It's extremely useful on standalone instances not connected to AD. 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.

Setup

What windowstime affects

  • Alters the HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\NtpServer to the defined list (and flags) of NTP servers.
  • Configures the w32time service.
  • Does an initial resync.
  • If timezone is set, it will configure the system to the specified timezone.

Beginning with windowstime

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 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

Development

Regular rules apply, send a PR and I promise to look at it as soon as I can.