Puppet Class: profile::locales::all

Defined in:
modules/profile/manifests/locales/all.pp

Overview



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'modules/profile/manifests/locales/all.pp', line 7

class profile::locales::all {

    package { 'locales':
        ensure => present,
    }

    exec { 'locale-gen':
        command     => '/usr/sbin/locale-gen --purge',
        refreshonly => true,
        require     => Package['locales'],
    }
    # Debian ships a locales-all package which has all locales pre-generated.
    # Ubuntu doesn't, so we're forced to generate them locally every time :(
    # lint:ignore:case_without_default
    case $::operatingsystem {
    # lint:endignore
        'Debian': {
            package { 'locales-all':
                ensure => present,
            }
        }
        'Ubuntu': {
            file { '/var/lib/locales/supported.d/all':
                ensure => link,
                source => '/usr/share/i18n/SUPPORTED',
                notify => Exec['locale-gen'],
            }
        }
    }
}