aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorThomas Backlund <tmb@mageia.org>2015-10-20 11:13:37 +0300
committerThomas Backlund <tmb@mageia.org>2015-10-20 11:13:37 +0300
commit1428ce45c5c1c0a880a08dfc692463a3538afaf8 (patch)
treea4186373e1165aba69c4e7bd5021b325efcd2125 /modules
parent50cfe0d1d1a1ce2ec1900a9ba016e9d7f72a7025 (diff)
downloadpuppet-1428ce45c5c1c0a880a08dfc692463a3538afaf8.tar
puppet-1428ce45c5c1c0a880a08dfc692463a3538afaf8.tar.gz
puppet-1428ce45c5c1c0a880a08dfc692463a3538afaf8.tar.bz2
puppet-1428ce45c5c1c0a880a08dfc692463a3538afaf8.tar.xz
puppet-1428ce45c5c1c0a880a08dfc692463a3538afaf8.zip
lint fixes for postgresql
Diffstat (limited to 'modules')
-rw-r--r--modules/postgresql/manifests/database.pp4
-rw-r--r--modules/postgresql/manifests/database_callback.pp2
-rw-r--r--modules/postgresql/manifests/hba_entry.pp2
-rw-r--r--modules/postgresql/manifests/server.pp8
-rw-r--r--modules/postgresql/manifests/user.pp8
5 files changed, 12 insertions, 12 deletions
diff --git a/modules/postgresql/manifests/database.pp b/modules/postgresql/manifests/database.pp
index 82670b5e..822dc5ee 100644
--- a/modules/postgresql/manifests/database.pp
+++ b/modules/postgresql/manifests/database.pp
@@ -3,9 +3,9 @@ define postgresql::database($description = '',
$user = 'postgres',
$callback_notify = '') {
- exec { "createdb -O $user -U postgres $name '$description'":
+ exec { "createdb -O ${user} -U postgres ${name} '${description}'":
user => 'root',
- unless => "psql -A -t -U postgres -l | grep '^$name|'",
+ unless => "psql -A -t -U postgres -l | grep '^${name}|'",
require => Service['postgresql'],
}
diff --git a/modules/postgresql/manifests/database_callback.pp b/modules/postgresql/manifests/database_callback.pp
index 8d4b217c..0ab1771f 100644
--- a/modules/postgresql/manifests/database_callback.pp
+++ b/modules/postgresql/manifests/database_callback.pp
@@ -1,7 +1,7 @@
define postgresql::database_callback($callback_notify = '') {
# dummy declaration, so we can trigger the notify
if $callback_notify {
- exec { "callback $name":
+ exec { "callback ${name}":
command => '/bin/true',
notify => $callback_notify,
}
diff --git a/modules/postgresql/manifests/hba_entry.pp b/modules/postgresql/manifests/hba_entry.pp
index bc8afcc3..595fd33c 100644
--- a/modules/postgresql/manifests/hba_entry.pp
+++ b/modules/postgresql/manifests/hba_entry.pp
@@ -1,5 +1,5 @@
# == Define: postgresql::hba_entry
-#
+#
# Set a new entry to pg_hba.conf file
#
# === Parameters
diff --git a/modules/postgresql/manifests/server.pp b/modules/postgresql/manifests/server.pp
index 85f5dda5..29fa30d0 100644
--- a/modules/postgresql/manifests/server.pp
+++ b/modules/postgresql/manifests/server.pp
@@ -37,11 +37,11 @@ class postgresql::server {
@postgresql::pg_hba { $postgresql::var::hba_file: }
postgresql::hba_entry { 'allow_local_ipv4':
- type => 'host',
+ type => 'host',
database => 'all',
- user => 'all',
- address => '127.0.0.1/32',
- method => 'md5',
+ user => 'all',
+ address => '127.0.0.1/32',
+ method => 'md5',
}
postgresql::config {
diff --git a/modules/postgresql/manifests/user.pp b/modules/postgresql/manifests/user.pp
index b70dd122..5b73b243 100644
--- a/modules/postgresql/manifests/user.pp
+++ b/modules/postgresql/manifests/user.pp
@@ -1,13 +1,13 @@
# TODO convert to a regular type, so we can later change password
# without erasing the current user
define postgresql::user($password) {
- $sql = "CREATE ROLE $name ENCRYPTED PASSWORD '\$pass' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;"
+ $sql = "CREATE ROLE ${name} ENCRYPTED PASSWORD '\${pass}' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;"
- exec { "psql -U postgres -c \"$sql\" ":
+ exec { "psql -U postgres -c \"${sql}\" ":
user => 'root',
# do not leak the password on commandline
- environment => "pass=$password",
- unless => "psql -A -t -U postgres -c '\\du $name' | grep '$name'",
+ environment => "pass=${password}",
+ unless => "psql -A -t -U postgres -c '\\du ${name}' | grep '${name}'",
require => Service['postgresql'],
}
}