Merge pull request #121 from dalen/stylefixes

fix lots of style issues
This commit is contained in:
Ken Barber 2013-02-15 09:07:30 -08:00
commit a33d845881
8 changed files with 45 additions and 45 deletions

View file

@ -22,7 +22,7 @@ class postgresql::client (
package { 'postgresql-client':
ensure => $package_ensure,
name => $package_name,
tag => 'postgresql',
tag => 'postgresql',
}
}

View file

@ -62,29 +62,29 @@ class postgresql::config::beforeservice(
# Lets setup the base rules
postgresql::pg_hba_rule { 'local access as postgres user':
type => 'local',
type => 'local',
auth_method => 'ident',
auth_option => $postgresql::params::version ? {
'8.1' => 'sameuser',
'8.1' => 'sameuser',
default => undef,
},
order => '001',
order => '001',
}
postgresql::pg_hba_rule { 'local access to database with same name':
type => 'local',
type => 'local',
auth_method => 'ident',
auth_option => $postgresql::params::version ? {
'8.1' => 'sameuser',
'8.1' => 'sameuser',
default => undef,
},
order => '002',
order => '002',
}
postgresql::pg_hba_rule { 'deny access to postgresql user':
type => 'host',
user => 'postgres',
address => $ip_mask_deny_postgres_user,
type => 'host',
user => 'postgres',
address => $ip_mask_deny_postgres_user,
auth_method => 'reject',
order => '003',
order => '003',
}
# ipv4acls are passed as an array of rule strings, here we transform them into
@ -93,16 +93,16 @@ class postgresql::config::beforeservice(
create_resources('postgresql::pg_hba_rule', $ipv4acl_resources)
postgresql::pg_hba_rule { 'allow access to all users':
type => 'host',
address => $ip_mask_allow_all_users,
type => 'host',
address => $ip_mask_allow_all_users,
auth_method => 'md5',
order => '100',
order => '100',
}
postgresql::pg_hba_rule { 'allow access to ipv6 localhost':
type => 'host',
address => '::1/128',
type => 'host',
address => '::1/128',
auth_method => 'md5',
order => '101',
order => '101',
}
# ipv6acls are passed as an array of rule strings, here we transform them into

View file

@ -58,9 +58,9 @@ define postgresql::database(
exec { $createdb_command :
refreshonly => true,
user => 'postgres',
cwd => $postgresql::params::datadir,
logoutput => on_failure,
user => 'postgres',
cwd => $postgresql::params::datadir,
logoutput => on_failure,
} ~>
# This will prevent users from connecting to the database unless they've been

View file

@ -1,5 +1,5 @@
class postgresql::package_source::yum_postgresql_org(
$version
$version
) {
$version_parts = split($version, '[.]')

View file

@ -48,19 +48,19 @@ class postgresql::params(
if ($manage_package_repo) {
case $::osfamily {
'RedHat': {
$rh_pkg_source = pick($package_source, 'yum.postgresql.org')
$rh_pkg_source = pick($package_source, 'yum.postgresql.org')
case $rh_pkg_source {
'yum.postgresql.org': {
class { 'postgresql::package_source::yum_postgresql_org':
version => $version
}
}
case $rh_pkg_source {
'yum.postgresql.org': {
class { 'postgresql::package_source::yum_postgresql_org':
version => $version
}
}
default: {
fail("Unsupported package source '${rh_pkg_source}' for ${::osfamily} OS family. Currently the only supported source is 'yum.postgresql.org'")
}
}
default: {
fail("Unsupported package source '${rh_pkg_source}' for ${::osfamily} OS family. Currently the only supported source is 'yum.postgresql.org'")
}
}
}
'Debian': {
@ -135,12 +135,12 @@ class postgresql::params(
}
'Ubuntu': {
# thanks, ubuntu
if($::lsbmajdistrelease == '10' and !$manage_package_repo) {
$service_name = "postgresql-${version}"
} else {
$service_name = 'postgresql'
}
# thanks, ubuntu
if($::lsbmajdistrelease == '10' and !$manage_package_repo) {
$service_name = "postgresql-${version}"
} else {
$service_name = 'postgresql'
}
}
}

View file

@ -11,8 +11,8 @@ define postgresql::pg_hba(
concat { $target:
owner => $owner,
group => $group,
mode => '0640',
warn => true,
mode => '0640',
warn => true,
}
}

View file

@ -29,11 +29,11 @@ define postgresql::pg_hba_rule(
# Create a rule fragment
$fragname = "pg_hba_rule_${name}"
concat::fragment { $fragname:
target => $target,
target => $target,
content => template('postgresql/pg_hba_rule.conf'),
order => $order,
owner => $::id,
mode => '0600',
order => $order,
owner => $::id,
mode => '0600',
}
Class['concat::setup']->

View file

@ -54,7 +54,7 @@ class postgresql::server (
include postgresql::initdb
Package['postgresql-server'] -> Class['postgresql::initdb'] -> Class['postgresql::config'] -> Service['postgresqld']
}
}
else {
Package['postgresql-server'] -> Class['postgresql::config'] -> Service['postgresqld']
}