aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mageia.org>2010-11-06 07:22:44 +0000
committerOlivier Thauvin <nanardon@mageia.org>2010-11-06 07:22:44 +0000
commit73649a0bada240fdecd8c79b72ade755d6e82596 (patch)
tree1134323608ed8f4c324d7ffcd460ccd742218d43
parent1028a26a9bed309e8f1b7e8df1d469251354350b (diff)
downloadpuppet-73649a0bada240fdecd8c79b72ade755d6e82596.tar
puppet-73649a0bada240fdecd8c79b72ade755d6e82596.tar.gz
puppet-73649a0bada240fdecd8c79b72ade755d6e82596.tar.bz2
puppet-73649a0bada240fdecd8c79b72ade755d6e82596.tar.xz
puppet-73649a0bada240fdecd8c79b72ade755d6e82596.zip
- manage pg_ident.conf for postgresql
-rw-r--r--modules/postgresql/manifests/init.pp10
-rw-r--r--modules/postgresql/templates/pg_ident.conf42
2 files changed, 52 insertions, 0 deletions
diff --git a/modules/postgresql/manifests/init.pp b/modules/postgresql/manifests/init.pp
index 66181a3f..0bee7b72 100644
--- a/modules/postgresql/manifests/init.pp
+++ b/modules/postgresql/manifests/init.pp
@@ -37,4 +37,14 @@ class postgresql {
require => Package["postgresql9.0-server"],
notify => [Service["postgresql"]]
}
+
+ file { '/var/lib/pgsql/data/pg_ident.conf':
+ ensure => present,
+ owner => postgres,
+ group => postgres,
+ mode => 600,
+ content => template("postgresql/pg_ident.conf"),
+ require => Package["postgresql9.0-server"],
+ notify => [Service["postgresql"]]
+ }
}
diff --git a/modules/postgresql/templates/pg_ident.conf b/modules/postgresql/templates/pg_ident.conf
new file mode 100644
index 00000000..a5870e64
--- /dev/null
+++ b/modules/postgresql/templates/pg_ident.conf
@@ -0,0 +1,42 @@
+# PostgreSQL User Name Maps
+# =========================
+#
+# Refer to the PostgreSQL documentation, chapter "Client
+# Authentication" for a complete description. A short synopsis
+# follows.
+#
+# This file controls PostgreSQL user name mapping. It maps external
+# user names to their corresponding PostgreSQL user names. Records
+# are of the form:
+#
+# MAPNAME SYSTEM-USERNAME PG-USERNAME
+#
+# (The uppercase quantities must be replaced by actual values.)
+#
+# MAPNAME is the (otherwise freely chosen) map name that was used in
+# pg_hba.conf. SYSTEM-USERNAME is the detected user name of the
+# client. PG-USERNAME is the requested PostgreSQL user name. The
+# existence of a record specifies that SYSTEM-USERNAME may connect as
+# PG-USERNAME.
+#
+# If SYSTEM-USERNAME starts with a slash (/), it will be treated as a
+# regular expression. Optionally this can contain a capture (a
+# parenthesized subexpression). The substring matching the capture
+# will be substituted for \1 (backslash-one) if present in
+# PG-USERNAME.
+#
+# Multiple maps may be specified in this file and used by pg_hba.conf.
+#
+# No map names are defined in the default configuration. If all
+# system user names and PostgreSQL user names are the same, you don't
+# need anything in this file.
+#
+# This file is read on server startup and when the postmaster receives
+# a SIGHUP signal. If you edit the file on a running system, you have
+# to SIGHUP the postmaster for the changes to take effect. You can
+# use "pg_ctl reload" to do that.
+
+# Put your actual configuration here
+# ----------------------------------
+
+# MAPNAME SYSTEM-USERNAME PG-USERNAME