Version information
This version is compatible with:
- Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.8 < 6.0.0
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'kogitoapp-timezone', '2.1.1'
Learn more about managing modules with a PuppetfileDocumentation
puppet-timezone
Description
A Puppet module for managing timezone settings. This module allows you to install and configure timezone settings using operating system specific facilities with just a single parameter.
Setup
What timezone affects
- Locale timezone configuration file. For all supported systems this is
/etc/localtime
. - The timezone configuration file. Depending on the operating system this can
be:
/etc/timezone
for the Debian/Ubuntu operating system family,/etc/sysconfig/clock
for CentOS/RedHat operating system family below version 7,
- For Debian/Ubuntu, CentOS/RedHat operating system families it will
install the
tzdata
package. puppet-timezone
depends on
Beginning with timezone
The simplest use case is to rely on the Coordinated Universal Timezone. This can be done by simply including the class:
include ::timezone
Most of the time though you will be provisioning in specific regions of the world and thus may want to pass a timezone:
class { '::timezone':
timezone => 'Europe/Berlin',
}
A list of valid timezone strings is available on Wikipedia.
Usage
In addition to configuring the timezone you can also modify and customize related settings such as if the hardware clock is set to UTC, or inject your own zone information or even package.
class { '::timezone':
timezone => 'Europe/Berlin',
package_ensure => 'present',
manage_package => true,
}
Reference
Class: timezone
class { 'timezone':
timezone => 'Etc/UTC',
hw_utc => true,
package_ensure => 'present',
package_name => 'tzdata',
package_provider => 'apt',
package_install_options => [],
manage_package => true,
zoneinfo_dir => '/usr/share/zoneinfo',
localtime_file => '/etc/localtime',
localtime_file_type => 'file',
timezone_file => '/etc/timezone',
timezone_file_template => 'timezone/debian-timezone.erb',
timezone_file_comments => false,
timezone_update => false,
}
Class: timezone::install
class { 'timezone::install':
package_ensure => 'present',
package_name => 'tzdata',
package_provider => 'apt',
package_install_options => [],
manage_package => true,
timezone => 'Etc/UTC',
}
Class: timezone::config
class { 'timezone::config':
timezone => 'Europe/Berlin',
hw_utc => true,
package_ensure => 'present',
zoneinfo_dir => '/usr/share/zoneinfo',
localtime_file => '/etc/localtime',
localtime_file_type => 'file',
timezone_file => '/etc/timezone',
timezone_file_template => 'timezone/debian-timezone.erb',
timezone_file_comments => false,
timezone_update => false,
}
Limitations
See metadata.json for supported platforms
Development
Running tests
This project contains tests for rspec-puppet.
Quickstart:
gem install bundler
bundle install
bundle exec rake test
When submitting pull requests, please make sure that module documentation, test cases and syntax checks pass.
Changelog
All notable changes to this project will be documented in this file.
Release 2.1.1 (2017-11-15)
With this release, ownership of this module is transfered to Kogito UG, a DevOps / Infrastructure services business in Berlin, Germany.
Features
- Upgrade default Minio installation to a more recent version
- Base URL for Minio downloads can now be pointed to a custom location
- Converted module to be Puppet Development Kit compatible
- Added support for Debian 9 (Stretch)
- Updated Puppet requirements to be in line with PE lifecycle
- API:
sorted_json(...)
function has been converted to a Puppet 4 style function and renamed toto_sorted_json(...)
Release 2.1.0 (2017-07-13)
Features
- Allow usage for newer versions of
puppet-apt
andpuppet-yum
Release 2.0.5 (2017-05-02)
Bugfixes
- Updated Travis CI configuration
Release 2.0.4 (2017-05-02)
Bugfixes
- Removed
data_provider
from module metadata
Release 2.0.3 (2017-04-23)
Bugfixes
- Fixed acceptance test
Release 2.0.2 (2017-04-23)
Bugfixes
- Fixed tests RedHat OS family
- Fixed rubocop issue
Release 2.0.1 (2017-04-18)
Bugfixes
- Switch to git over HTTPS for test fixtures
- Added
locales
package for testing Ubuntu 16.04
Release 2.0.0 (2017-04-18)
Features
- Replaced
timezone::params
with Hiera data - Updated Beaker node sets
Release 1.2.0 (2017-04-05)
This release prepares the module for switching over to Hiera data instead of the
old way of timezone::params
.
Features
- Upgrade
stm-debconf
to 2.0.0 - Updated
rake test
to run all checks - Resolved Rubocop warnings
- Updated Travis build to use Ruby 2.3/2.4 only
Release 1.1.5 (2017-03-23)
Bugfixes
- Removed unsupported "pe" version requirement
Release 1.1.4 (2017-03-23)
Bugfixes
- Fixed deprecation warning about
data_provider
.
Release 1.1.3 (2017-02-15)
Bugfixes
- Fixed Rubocop offenses. Sorry, we offended you!
- use
YAML.safe_load
instead ofYAML.load
- use
Security/Eval
instead ofLint/Eval
check
- use
- Fixed specs to avoid nested groups.
- Added missing note about using
rubocop
to README.
Release 1.1.2 (2017-02-15)
Bugfixes
- Fixed Rubocop configuration
- Fixed wrong version in module metadata
Release 1.1.1 (2017-02-15)
Features
- Upgrade puppet-yum to version 1.0.0
Release 1.1.0 (2016-12-28)
Features
- Integrate stm-debconf for Debian operating system family. This fixes #1.
- Use file or link resources for
localtime
as expected on targetosfamily
. This fixes #2.
Release 1.0.5 (2016-12-28)
Features
- Removed DEBUG mode for Beaker builds.
- Removed Ruby 2.4.0 build from Travis.
- Added required Puppet Open Source and Puppet Enterprise versions. Rule of thumb: if it supports Puppet 4.0 language features, it has to run.
Release 1.0.4 (2016-12-27)
Features
- Send code coverage reports to Coveralls.
Release 1.0.3 (2016-12-27)
Bugfixes
- Ignore
vendor
directory when creating release packages for Puppet Forge
Release 1.0.2 (2016-12-27)
Bugfixes
- Fixed Puppet Forge configuration to enable automated builds
Release 1.0.1 (2016-12-27)
Features
- Test release for automated builds via Travis CI
Release 1.0.0 (2016-12-26)
Initial release of timezone settings module. Hello, World!
Dependencies
- puppetlabs-stdlib (>= 4.14.0 < 5.0.0)
- puppetlabs-apt (>= 2.3.0 < 5.0.0)
- stm-debconf (>= 2.0.0 < 3.0.0)
Copyright (c) 2016-2017 Kogito UG <https://kogitoapp.com/> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.