Skip to content

Commit 2c6640b

Browse files
committed
Add correct documentation for pg_ident_rule type
1 parent 38929e3 commit 2c6640b

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
@@ -676,24 +676,6 @@ This would create a ruleset in `pg_hba.conf` similar to:
676676
# Order: 150
677677
host app app 200.1.2.0/24 md5
678678

679-
###Resource: postgresql::server::pg\_ident\_rule
680-
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).
681-
682-
For example:
683-
684-
postgresql::server::pg_ident_rule{ 'Map the SSL certificate of the backup server as a replication user':
685-
map_name => 'sslrepli',
686-
system_username => 'repli1.example.com',
687-
database_username => 'replication',
688-
}
689-
690-
This would create a user name map in `pg_ident.conf` similar to:
691-
692-
# Rule Name: Map the SSL certificate of the backup server as a replication user
693-
# Description: none
694-
# Order: 150
695-
sslrepli repli1.example.com replication
696-
697679
####`namevar`
698680
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.
699681

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

727709

710+
###Resource: postgresql::server::pg\_ident\_rule
711+
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).
712+
713+
For example:
714+
715+
postgresql::server::pg_ident_rule{ 'Map the SSL certificate of the backup server as a replication user':
716+
map_name => 'sslrepli',
717+
system_username => 'repli1.example.com',
718+
database_username => 'replication',
719+
}
720+
721+
This would create a user name map in `pg_ident.conf` similar to:
722+
723+
# Rule Name: Map the SSL certificate of the backup server as a replication user
724+
# Description: none
725+
# Order: 150
726+
sslrepli repli1.example.com replication
727+
728+
####`namevar`
729+
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.
730+
731+
####`description`
732+
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`.
733+
734+
####`map_name`
735+
Name of the user map, that is used to refer to this mapping in `pg_hba.conf`.
736+
737+
####`system_username`
738+
Operating system user name, the user name used to connect to the database.
739+
740+
####`database_username`
741+
Database user name, the user name of the the database user. The `system_username` will be mapped to this user name.
742+
743+
####`order`
744+
An order for placing the mapping in pg_ident.conf. Defaults to 150.
745+
746+
####`target`
747+
This provides the target for the rule, and is generally an internal only property. Use with caution.
748+
749+
728750
###Resource: postgresql::server::role
729751
This resource creates a role or user in PostgreSQL.
730752

0 commit comments

Comments
 (0)