Skip to content

Instantly share code, notes, and snippets.

@kun432
Created June 10, 2014 08:21
Show Gist options
  • Save kun432/71ab5f670a3d7575c605 to your computer and use it in GitHub Desktop.
Save kun432/71ab5f670a3d7575c605 to your computer and use it in GitHub Desktop.
chef-locale-cookbook added support for ubuntu
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