File tree Expand file tree Collapse file tree 8 files changed +47
-47
lines changed Expand file tree Collapse file tree 8 files changed +47
-47
lines changed Original file line number Diff line number Diff line change 2222 package { 'postgresql-client' :
2323 ensure => $package_ensure ,
2424 name => $package_name ,
25- tag => ' postgresql' ,
25+ tag => ' postgresql' ,
2626 }
2727
2828}
Original file line number Diff line number Diff line change 6262
6363 # Lets setup the base rules
6464 postgresql::pg_hba_rule { 'local access as postgres user' :
65- type => ' local' ,
65+ type => ' local' ,
6666 auth_method => ' ident' ,
6767 auth_option => $postgresql::params::version ? {
68- ' 8.1' => ' sameuser' ,
68+ ' 8.1' => ' sameuser' ,
6969 default => undef ,
7070 },
71- order => ' 001' ,
71+ order => ' 001' ,
7272 }
7373 postgresql::pg_hba_rule { 'local access to database with same name' :
74- type => ' local' ,
74+ type => ' local' ,
7575 auth_method => ' ident' ,
7676 auth_option => $postgresql::params::version ? {
77- ' 8.1' => ' sameuser' ,
77+ ' 8.1' => ' sameuser' ,
7878 default => undef ,
7979 },
80- order => ' 002' ,
80+ order => ' 002' ,
8181 }
8282 postgresql::pg_hba_rule { 'deny access to postgresql user' :
83- type => ' host' ,
84- user => ' postgres' ,
85- address => $ip_mask_deny_postgres_user ,
83+ type => ' host' ,
84+ user => ' postgres' ,
85+ address => $ip_mask_deny_postgres_user ,
8686 auth_method => ' reject' ,
87- order => ' 003' ,
87+ order => ' 003' ,
8888 }
8989
9090 # ipv4acls are passed as an array of rule strings, here we transform them into
9393 create_resources(' postgresql::pg_hba_rule' , $ipv4acl_resources )
9494
9595 postgresql::pg_hba_rule { 'allow access to all users' :
96- type => ' host' ,
97- address => $ip_mask_allow_all_users ,
96+ type => ' host' ,
97+ address => $ip_mask_allow_all_users ,
9898 auth_method => ' md5' ,
99- order => ' 100' ,
99+ order => ' 100' ,
100100 }
101101 postgresql::pg_hba_rule { 'allow access to ipv6 localhost' :
102- type => ' host' ,
103- address => ' ::1/128' ,
102+ type => ' host' ,
103+ address => ' ::1/128' ,
104104 auth_method => ' md5' ,
105- order => ' 101' ,
105+ order => ' 101' ,
106106 }
107107
108108 # ipv6acls are passed as an array of rule strings, here we transform them into
Original file line number Diff line number Diff line change 5858
5959 exec { $createdb_command :
6060 refreshonly => true ,
61- user => ' postgres' ,
62- cwd => $postgresql::params::datadir ,
63- logoutput => on_failure,
61+ user => ' postgres' ,
62+ cwd => $postgresql::params::datadir ,
63+ logoutput => on_failure,
6464 } ~>
6565
6666 # This will prevent users from connecting to the database unless they've been
Original file line number Diff line number Diff line change 11class postgresql::package_source::yum_postgresql_org (
2- $version
2+ $version
33) {
44
55 $version_parts = split($version , ' [.]' )
Original file line number Diff line number Diff line change 4848 if ($manage_package_repo ) {
4949 case $::osfamily {
5050 ' RedHat' : {
51- $rh_pkg_source = pick($package_source , ' yum.postgresql.org' )
52-
53- case $rh_pkg_source {
54- ' yum.postgresql.org' : {
55- class { 'postgresql::package_source::yum_postgresql_org' :
56- version => $version
57- }
58- }
59-
60- default: {
61- fail(" Unsupported package source '${rh_pkg_source} ' for ${::osfamily} OS family. Currently the only supported source is 'yum.postgresql.org'" )
62- }
63- }
51+ $rh_pkg_source = pick($package_source , ' yum.postgresql.org' )
52+
53+ case $rh_pkg_source {
54+ ' yum.postgresql.org' : {
55+ class { 'postgresql::package_source::yum_postgresql_org' :
56+ version => $version
57+ }
58+ }
59+
60+ default: {
61+ fail(" Unsupported package source '${rh_pkg_source} ' for ${::osfamily} OS family. Currently the only supported source is 'yum.postgresql.org'" )
62+ }
63+ }
6464 }
6565
6666 ' Debian' : {
135135 }
136136
137137 ' Ubuntu' : {
138- # thanks, ubuntu
139- if ($::lsbmajdistrelease == ' 10' and !$manage_package_repo ) {
140- $service_name = " postgresql-${version} "
141- } else {
142- $service_name = ' postgresql'
143- }
138+ # thanks, ubuntu
139+ if ($::lsbmajdistrelease == ' 10' and !$manage_package_repo ) {
140+ $service_name = " postgresql-${version} "
141+ } else {
142+ $service_name = ' postgresql'
143+ }
144144 }
145145 }
146146
Original file line number Diff line number Diff line change 1111 concat { $target:
1212 owner => $owner ,
1313 group => $group ,
14- mode => ' 0640' ,
15- warn => true ,
14+ mode => ' 0640' ,
15+ warn => true ,
1616 }
1717
1818}
Original file line number Diff line number Diff line change 2929 # Create a rule fragment
3030 $fragname = " pg_hba_rule_${name} "
3131 concat::fragment { $fragname:
32- target => $target ,
32+ target => $target ,
3333 content => template (' postgresql/pg_hba_rule.conf' ),
34- order => $order ,
35- owner => $::id ,
36- mode => ' 0600' ,
34+ order => $order ,
35+ owner => $::id ,
36+ mode => ' 0600' ,
3737 }
3838
3939 Class[' concat::setup' ]->
Original file line number Diff line number Diff line change 5454 include postgresql::initdb
5555
5656 Package[' postgresql-server' ] -> Class[' postgresql::initdb' ] -> Class[' postgresql::config' ] -> Service[' postgresqld' ]
57- }
57+ }
5858 else {
5959 Package[' postgresql-server' ] -> Class[' postgresql::config' ] -> Service[' postgresqld' ]
6060 }
You can’t perform that action at this time.
0 commit comments