Loading data/common.yaml +3 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,9 @@ # really generic defaults --- base::timezone: PST8PDT base::locale: en_US.UTF-8 base::lang: en_US base::charset: UTF-8 base::locale: "%{base::lang}.%{base::charset}" base::packages::docker_package: docker base::packages::install: - bash Loading manifests/init.pp +30 −11 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ class base ( $timezone, $locale, $lang, $charset, $sources, $package_type ) { Loading Loading @@ -78,6 +80,7 @@ class base ( source => "puppet:///modules/${module_name}/etc/default/locale", } if ($::osfamily == 'Debian') { file { '/etc/locale.gen': ensure => file, owner => 'root', Loading @@ -91,5 +94,21 @@ class base ( subscribe => File['/etc/locale.gen'], refreshonly => true, } } if ($::osfamily == 'RedHat') { file { '/etc/locale.conf': ensure => file, owner => 'root', group => 'root', mode => '0444', content => "LANG=\"${locale}\"", } exec { 'locale-def': command => "/usr/bin/localedef -v -c -i ${lang} -f ${charset} ${locale}", subscribe => File['/etc/locale.conf'], refreshonly => true, } } } Loading
data/common.yaml +3 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,9 @@ # really generic defaults --- base::timezone: PST8PDT base::locale: en_US.UTF-8 base::lang: en_US base::charset: UTF-8 base::locale: "%{base::lang}.%{base::charset}" base::packages::docker_package: docker base::packages::install: - bash Loading
manifests/init.pp +30 −11 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ class base ( $timezone, $locale, $lang, $charset, $sources, $package_type ) { Loading Loading @@ -78,6 +80,7 @@ class base ( source => "puppet:///modules/${module_name}/etc/default/locale", } if ($::osfamily == 'Debian') { file { '/etc/locale.gen': ensure => file, owner => 'root', Loading @@ -91,5 +94,21 @@ class base ( subscribe => File['/etc/locale.gen'], refreshonly => true, } } if ($::osfamily == 'RedHat') { file { '/etc/locale.conf': ensure => file, owner => 'root', group => 'root', mode => '0444', content => "LANG=\"${locale}\"", } exec { 'locale-def': command => "/usr/bin/localedef -v -c -i ${lang} -f ${charset} ${locale}", subscribe => File['/etc/locale.conf'], refreshonly => true, } } }