|
66 | 66 | port => $config_settings['port'], |
67 | 67 | user => $instance_user, |
68 | 68 | } |
| 69 | + postgresql::server::instance::reload { $instance_name: |
| 70 | + service_status => $service_settings['service_status'], |
| 71 | + service_reload => "systemctl reload ${service_settings['service_name']}.service", |
| 72 | + } |
69 | 73 | postgresql::server::instance::passwd { $instance_name: |
70 | 74 | * => $passwd_settings, |
71 | 75 | } |
|
84 | 88 | $value = $settings['value'] |
85 | 89 | $comment = $settings['comment'] |
86 | 90 | postgresql::server::config_entry { "${entry}_${$instance_name}": |
87 | | - ensure => bool2str($value =~ Undef, 'absent', 'present'), |
88 | | - key => $entry, |
89 | | - value => $value, |
90 | | - comment => $comment, |
91 | | - path => $config_settings['postgresql_conf_path'], |
| 91 | + ensure => bool2str($value =~ Undef, 'absent', 'present'), |
| 92 | + key => $entry, |
| 93 | + value => $value, |
| 94 | + comment => $comment, |
| 95 | + path => $config_settings['postgresql_conf_path'], |
| 96 | + instance_name => $instance_name, |
92 | 97 | } |
93 | 98 | } |
94 | 99 | $pg_hba_rules.each |String[1] $rule_name, Postgresql::Pg_hba_rule $rule| { |
|
108 | 113 | } |
109 | 114 | $databases.each |$database, $database_details| { |
110 | 115 | postgresql::server::database { $database: |
111 | | - * => $database_details, |
112 | | - user => $instance_user, |
113 | | - group => $instance_group, |
114 | | - port => $config_settings['port'], |
| 116 | + * => $database_details, |
| 117 | + user => $instance_user, |
| 118 | + group => $instance_group, |
| 119 | + port => $config_settings['port'], |
| 120 | + instance => $instance_name, |
115 | 121 | } |
116 | 122 | } |
117 | 123 | $database_grants.each |$db_grant_title, $dbgrants| { |
|
120 | 126 | psql_user => $instance_user, |
121 | 127 | psql_group => $instance_group, |
122 | 128 | port => $config_settings['port'], |
| 129 | + instance => $instance_name, |
123 | 130 | } |
124 | 131 | } |
125 | 132 | $table_grants.each |$table_grant_title, $tgrants| { |
126 | 133 | postgresql::server::table_grant { $table_grant_title: |
127 | 134 | * => $tgrants, |
128 | 135 | psql_user => $instance_user, |
129 | 136 | port => $config_settings['port'], |
| 137 | + instance => $instance_name, |
130 | 138 | } |
131 | 139 | } |
132 | 140 | } |
0 commit comments