|
2 | 2 | #
|
3 | 3 | # Parameters:
|
4 | 4 | #
|
5 |
| -# [*postgres_password*] - postgres db user password. |
6 |
| -# [*ip_mask_postgres_user*] - ip mask for allowing remote access for postgres user; defaults to '127.0.0.1/32' |
7 |
| -# [*ip_mask_all_users*] - ip mask for allowing remote access for other users (besides postgres); |
8 |
| -# defaults to '127.0.0.1/32' |
9 |
| -# [*listen_addresses*] - what IP address(es) to listen on; comma-separated list of addresses; defaults to |
10 |
| -# 'localhost', '*' = all |
11 |
| -# [*pg_hba_conf_path*] - path to pg_hba.conf file |
12 |
| -# [*postgresql_conf_path*] - path to postgresql.conf file |
13 |
| -# [*manage_redhat_firewall*] - boolean indicating whether or not the module should open a port in the firewall on |
14 |
| -# redhat-based systems; this parameter is likely to change in future versions. Possible |
15 |
| -# changes include support for non-RedHat systems and finer-grained control over the |
16 |
| -# firewall rule (currently, it simply opens up the postgres port to all TCP connections). |
| 5 | +# [*postgres_password*] - postgres db user password. |
| 6 | +# [*ip_mask_deny_postgres_user*] - ip mask for denying remote access for postgres user; defaults to '0.0.0.0/0', |
| 7 | +# meaning that all TCP access for postgres user is denied. |
| 8 | +# [*ip_mask_allow_all_users*] - ip mask for allowing remote access for other users (besides postgres); |
| 9 | +# defaults to '127.0.0.1/32', meaning only allow connections from localhost |
| 10 | +# [*listen_addresses*] - what IP address(es) to listen on; comma-separated list of addresses; defaults to |
| 11 | +# 'localhost', '*' = all |
| 12 | +# [*pg_hba_conf_path*] - path to pg_hba.conf file |
| 13 | +# [*postgresql_conf_path*] - path to postgresql.conf file |
| 14 | +# [*manage_redhat_firewall*] - boolean indicating whether or not the module should open a port in the firewall on |
| 15 | +# redhat-based systems; this parameter is likely to change in future versions. Possible |
| 16 | +# changes include support for non-RedHat systems and finer-grained control over the |
| 17 | +# firewall rule (currently, it simply opens up the postgres port to all TCP connections). |
17 | 18 | #
|
18 | 19 | #
|
19 | 20 | # Actions:
|
|
23 | 24 | # Usage:
|
24 | 25 | #
|
25 | 26 | # class { 'postgresql::config':
|
26 |
| -# postgres_password => 'postgres', |
27 |
| -# ip_mask_other_user => '127.0.0.1/32', |
| 27 | +# postgres_password => 'postgres', |
| 28 | +# ip_mask_allow_all_users => '0.0.0.0/0', |
28 | 29 | # }
|
29 | 30 | #
|
30 | 31 | class postgresql::config(
|
31 |
| - $postgres_password = undef, |
32 |
| - $ip_mask_postgres_user = $postgresql::params::ip_mask_postgres_user, |
33 |
| - $ip_mask_all_users = $postgresql::params::ip_mask_all_users, |
34 |
| - $listen_addresses = $postgresql::params::listen_addresses, |
35 |
| - $pg_hba_conf_path = $postgresql::params::pg_hba_conf_path, |
36 |
| - $postgresql_conf_path = $postgresql::params::postgresql_conf_path, |
37 |
| - $manage_redhat_firewall = $postgresql::params::manage_redhat_firewall, |
| 32 | + $postgres_password = undef, |
| 33 | + $ip_mask_deny_postgres_user = $postgresql::params::ip_mask_postgres_user, |
| 34 | + $ip_mask_allow_all_users = $postgresql::params::ip_mask_all_users, |
| 35 | + $listen_addresses = $postgresql::params::listen_addresses, |
| 36 | + $pg_hba_conf_path = $postgresql::params::pg_hba_conf_path, |
| 37 | + $postgresql_conf_path = $postgresql::params::postgresql_conf_path, |
| 38 | + $manage_redhat_firewall = $postgresql::params::manage_redhat_firewall, |
38 | 39 | ) inherits postgresql::params {
|
39 | 40 |
|
40 | 41 | # Basically, all this class needs to handle is passing parameters on
|
41 | 42 | # to the "beforeservice" and "afterservice" classes, and ensure
|
42 | 43 | # the proper ordering.
|
43 | 44 |
|
44 | 45 | class { "postgresql::config::beforeservice":
|
45 |
| - ip_mask_postgres_user => $ip_mask_postgres_user, |
46 |
| - ip_mask_all_users => $ip_mask_all_users, |
47 |
| - listen_addresses => $listen_addresses, |
48 |
| - pg_hba_conf_path => $pg_hba_conf_path, |
49 |
| - postgresql_conf_path => $postgresql_conf_path, |
50 |
| - manage_redhat_firewall => $manage_redhat_firewall, |
| 46 | + ip_mask_deny_postgres_user => $ip_mask_deny_postgres_user, |
| 47 | + ip_mask_allow_all_users => $ip_mask_allow_all_users, |
| 48 | + listen_addresses => $listen_addresses, |
| 49 | + pg_hba_conf_path => $pg_hba_conf_path, |
| 50 | + postgresql_conf_path => $postgresql_conf_path, |
| 51 | + manage_redhat_firewall => $manage_redhat_firewall, |
51 | 52 | }
|
52 | 53 |
|
53 | 54 | class { "postgresql::config::afterservice":
|
|
0 commit comments