Last active
August 29, 2015 13:57
-
-
Save andredumas/9612907 to your computer and use it in GitHub Desktop.
Online note of a manifest I regularly use to set date, time and timezone information on ubuntu hosts. Works on vagrant box precise64 (http://files.vagrantup.com/precise64.box) and AWS EC2 Ubuntu instances.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure you apt-get update before applying this. | |
package { "language-pack-en": | |
ensure => latest | |
} | |
package { "tzdata": | |
ensure => latest | |
} | |
file { "/etc/localtime": | |
ensure => "/usr/share/zoneinfo/Australia/Melbourne", | |
require => Package["tzdata"] | |
} | |
file { "/etc/timezone": | |
content => "Australia/Melbourne\n", | |
require => Package["tzdata"] | |
} | |
exec { "/usr/sbin/dpkg-reconfigure --frontend noninteractive tzdata": | |
require => File["/etc/timezone"], | |
refreshonly => true, | |
subscribe => [ Package["tzdata"], File["/etc/timezone"] ] | |
} | |
exec { "/usr/sbin/locale-gen en_AU.UTF-8": | |
refreshonly => true, | |
require => Package["language-pack-en"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment