Skip to content

Commit 0dc4729

Browse files
author
Ashley Penney
committed
Merge pull request puppetlabs#458 from stdietrich/pg_ident_doc_fix
Add correct documentation for pg_ident_rule type
2 parents f95c237 + 2c6640b commit 0dc4729

File tree

1 file changed

+40
-18
lines changed

1 file changed

+40
-18
lines changed

README.md

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -673,24 +673,6 @@ This would create a ruleset in `pg_hba.conf` similar to:
673673
# Order: 150
674674
host app app 200.1.2.0/24 md5
675675

676-
###Resource: postgresql::server::pg\_ident\_rule
677-
This defined type allows you to create user name maps for `pg_ident.conf`. For more details see the [PostgreSQL documentation](http://www.postgresql.org/docs/9.4/static/auth-username-maps.html).
678-
679-
For example:
680-
681-
postgresql::server::pg_ident_rule{ 'Map the SSL certificate of the backup server as a replication user':
682-
map_name => 'sslrepli',
683-
system_username => 'repli1.example.com',
684-
database_username => 'replication',
685-
}
686-
687-
This would create a user name map in `pg_ident.conf` similar to:
688-
689-
# Rule Name: Map the SSL certificate of the backup server as a replication user
690-
# Description: none
691-
# Order: 150
692-
sslrepli repli1.example.com replication
693-
694676
####`namevar`
695677
A unique identifier or short description for this rule. The namevar doesn't provide any functional usage, but it is stored in the comments of the produced `pg_hba.conf` so the originating resource can be identified.
696678

@@ -722,6 +704,46 @@ An order for placing the rule in `pg_hba.conf`. Defaults to `150`.
722704
This provides the target for the rule, and is generally an internal only property. Use with caution.
723705

724706

707+
###Resource: postgresql::server::pg\_ident\_rule
708+
This defined type allows you to create user name maps for `pg_ident.conf`. For more details see the [PostgreSQL documentation](http://www.postgresql.org/docs/9.4/static/auth-username-maps.html).
709+
710+
For example:
711+
712+
postgresql::server::pg_ident_rule{ 'Map the SSL certificate of the backup server as a replication user':
713+
map_name => 'sslrepli',
714+
system_username => 'repli1.example.com',
715+
database_username => 'replication',
716+
}
717+
718+
This would create a user name map in `pg_ident.conf` similar to:
719+
720+
# Rule Name: Map the SSL certificate of the backup server as a replication user
721+
# Description: none
722+
# Order: 150
723+
sslrepli repli1.example.com replication
724+
725+
####`namevar`
726+
A unique identifier or short description for this rule. The namevar doesn't provide any functional usage, but it is stored in the comments of the produced `pg_ident.conf` so the originating resource can be identified.
727+
728+
####`description`
729+
A longer description for this rule if required. Defaults to `none`. This description is placed in the comments above the rule in `pg_ident.conf`.
730+
731+
####`map_name`
732+
Name of the user map, that is used to refer to this mapping in `pg_hba.conf`.
733+
734+
####`system_username`
735+
Operating system user name, the user name used to connect to the database.
736+
737+
####`database_username`
738+
Database user name, the user name of the the database user. The `system_username` will be mapped to this user name.
739+
740+
####`order`
741+
An order for placing the mapping in pg_ident.conf. Defaults to 150.
742+
743+
####`target`
744+
This provides the target for the rule, and is generally an internal only property. Use with caution.
745+
746+
725747
###Resource: postgresql::server::role
726748
This resource creates a role or user in PostgreSQL.
727749

0 commit comments

Comments
 (0)