Created
June 10, 2014 08:21
-
-
Save kun432/71ab5f670a3d7575c605 to your computer and use it in GitHub Desktop.
chef-locale-cookbook added support for ubuntu
This file contains 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
if platform?("ubuntu", "debian") | |
package "locales" do | |
action :install | |
end | |
if platform?("ubuntu") | |
[lang,lc_all].each do |l| | |
if /^(C|POSIX|)$/i !~ l | |
langcode = l.slice(0,2) | |
package "language-pack-#{langcode}" do | |
action :install | |
end | |
end | |
end | |
end | |
execute "Update locale" do | |
command "update-locale LANG=#{lang} LC_ALL=#{lc_all}" | |
not_if { Locale.up_to_date?("/etc/default/locale", lang, lc_all) } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment