|
13 | 13 | $data_checksums = $postgresql::server::data_checksums
|
14 | 14 | $group = $postgresql::server::group
|
15 | 15 | $user = $postgresql::server::user
|
16 |
| - $psql_path = $postgresql::server::psql_path |
17 |
| - $port = $postgresql::server::port |
18 | 16 | $module_workdir = $postgresql::server::module_workdir
|
19 | 17 |
|
20 |
| - # Set the defaults for the postgresql_psql resource |
21 |
| - Postgresql_psql { |
22 |
| - psql_user => $user, |
23 |
| - psql_group => $group, |
24 |
| - psql_path => $psql_path, |
25 |
| - port => $port, |
26 |
| - cwd => $module_workdir, |
27 |
| - } |
28 |
| - |
29 | 18 | if $facts['os']['family'] == 'RedHat' and $facts['os']['selinux']['enabled'] == true {
|
30 | 19 | $seltype = 'postgresql_db_t'
|
31 | 20 | $logdir_type = 'postgresql_log_t'
|
|
147 | 136 | cwd => $module_workdir,
|
148 | 137 | }
|
149 | 138 | } elsif $encoding != undef {
|
150 |
| - # [workaround] |
151 |
| - # by default pg_createcluster encoding derived from locale |
152 |
| - # but it do does not work by installing postgresql via puppet because puppet |
153 |
| - # always override LANG to 'C' |
154 |
| - postgresql_psql { "Set template1 encoding to ${encoding}": |
155 |
| - command => "UPDATE pg_database |
156 |
| - SET datistemplate = FALSE |
157 |
| - WHERE datname = 'template1' |
158 |
| - ; |
159 |
| - UPDATE pg_database |
160 |
| - SET encoding = pg_char_to_encoding('${encoding}'), datistemplate = TRUE |
161 |
| - WHERE datname = 'template1'", |
162 |
| - unless => "SELECT datname FROM pg_database WHERE |
163 |
| - datname = 'template1' AND encoding = pg_char_to_encoding('${encoding}')", |
164 |
| - } |
| 139 | + include postgresql::server::late_initdb |
165 | 140 | }
|
166 | 141 | }
|
0 commit comments