You are hereDebian, locales, and puppet
Debian, locales, and puppet
Having gotten sick and tired of receiving error messages like this:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").I decided to solve the problem once and for all. We use puppet to manage machines, so this should be - and is - straight forward.
/etc/puppet/modules/locales/files/locales.gen:
#
# /etc/locales.gen
#
# managed by puppet
#
en_US ISO-8859-1
en_US.ISO-8859-15 ISO-8859-15
en_US.UTF-8 UTF-8/etc/puppet/modules/locales/manifests/init.pp:
class locales {
package { "locales":
ensure => latest,
}
file { "/etc/locale.gen":
source => [
"puppet://$server/files/locales/host/locale.gen.$fqdn",
"puppet://$server/files/locales/host/locale.gen.$hostname",
"puppet://$server/files/locales/env/locale.gen.$environment",
"puppet://$server/files/locales/locale.gen",
"puppet://$server/locales/locale.gen",
],
owner => "root",
group => "root",
mode => 644,
require => Package[locales],
}
exec { "/usr/sbin/locale-gen":
subscribe => File["/etc/locale.gen"],
refreshonly => true,
require => Package[locales],
require => File["/etc/locale.gen"],
}
}Note that the code above permits server-specific, or environment specific files to override the default file found in the module. As well, the locale.gen will not get downloaded until AFTER the locales package has been installed, and locale-gen will not attempt to run until after the locale.gen file has been installed.
-jbn
Trackback URL for this post:
Buy fioricet.
from Buy fioricet full information amp low prices. on Wed, 03/10/2010 - 21:38Buy fioricet bloghoster. Buy fioricet online that ships to missouri. Buy fioricet. Buy fioricet full information amp low prices.
Lorcet vicodin online.
from Effects of vicodin. on Wed, 03/10/2010 - 01:01No prescription vicodin. Vicodin side effects. Vicodin.
Search results buy phentermine uk.
from Buy cheap phentermine mg tabs lowest prices. on Tue, 03/09/2010 - 21:16Buy phentermine. Buy cheap phentermine onli ne. Buy phentermine on line. Buy cheap phentermine. Where to buy phentermine without prescription.
Online consultation oxycodone.
from When someone does up nose oxycodone. on Tue, 03/09/2010 - 20:5860 mg oxycodone. Online pharmacy oxycodone. Oxycodone.
uebernachtung guenstig in giessen
from uebernachtung guenstig in giessen on Sun, 02/28/2010 - 20:04[...] Boeing officials say they are confident the 747 will retain a strong position worldwide, despite competition from McDonnell Douglas' MD-11 in 1990 and from Airbus Industrie's A340. Negotiation,recommend It provides an inside look at how the cigar...