postgresql::client
: Installs PostgreSQL client software. Set the following parameters if you have a custom version you would like to install.postgresql::globals
: Class for setting cross-class global overrides.postgresql::lib::devel
: This class installs postgresql development libraries.postgresql::lib::docs
: Installs PostgreSQL bindings for Postgres-Docs. Set the following parameters if you have a custom version you would like to install.postgresql::lib::java
: This class installs the postgresql jdbc connector.postgresql::lib::perl
: This class installs the perl libs for postgresql.postgresql::lib::python
: This class installs the python libs for postgresql.postgresql::server
: This installs a PostgreSQL serverpostgresql::server::contrib
: Install the contrib postgresql packaging.postgresql::server::plperl
: This class installs the PL/Perl procedural language for postgresql.postgresql::server::plpython
: This class installs the PL/Python procedural language for postgresql.postgresql::server::postgis
: Install the postgis postgresql packaging.
postgresql::backup::pg_dump
: "Provider" for pg_dump backuppostgresql::dnfmodule
: Manage the DNF modulepostgresql::params
postgresql::repo
postgresql::repo::apt_postgresql_org
postgresql::repo::yum_postgresql_org
postgresql::server::config
postgresql::server::initdb
postgresql::server::install
postgresql::server::late_initdb
: Manage the default encoding when database initialization is managed by the packagepostgresql::server::passwd
postgresql::server::reload
postgresql::server::service
postgresql::server::config_entry
: Manage a postgresql.conf entry.postgresql::server::database
: Define for creating a database.postgresql::server::database_grant
: Manage a database grant.postgresql::server::db
: Define for conveniently creating a role, database and assigning the correct permissions.postgresql::server::default_privileges
: Manage a database defaults privileges. Only works with PostgreSQL version 9.6 and above.postgresql::server::extension
: Activate an extension on a postgresql database.postgresql::server::grant
: Define for granting permissions to roles.postgresql::server::grant_role
: Define for granting membership to a role.postgresql::server::instance::config
: Manages the config for a postgresql::server instancepostgresql::server::instance::initdb
: Manages initdb feature for a postgresql::server instancepostgresql::server::instance::late_initdb
: Manage the default encoding when database initialization is managed by the packagepostgresql::server::instance::passwd
: Overrides the default PostgreSQL superuserpostgresql::server::instance::reload
: Overrides the default reload or status command for your PostgreSQL servicepostgresql::server::instance::service
: Manages the service for the postgres main instance (default) or additional instancespostgresql::server::pg_hba_rule
: This resource manages an individual rule that applies to the file defined in target.postgresql::server::pg_ident_rule
: This resource manages an individual rule that applies to the file defined in target.postgresql::server::reassign_owned_by
: Define for reassigning the ownership of objects within a database.postgresql::server::recovery
: This resource manages the parameters that applies to the recovery.conf template.postgresql::server::role
: Define for creating a database role.postgresql::server::schema
: Create a new schema.postgresql::server::table_grant
: This resource wraps the grant resource to manage table grants specifically.postgresql::server::tablespace
: This module creates tablespace.
postgresql::server::instance::systemd
: This define handles systemd drop-in files for the postgres main instance (default) or additional instances
postgresql_conf
: This type allows puppet to manage postgresql.conf parameters.postgresql_conn_validator
: Verify if a connection can be successfully establishedpostgresql_psql
: An arbitrary tag for your own reference; the name of the message.postgresql_replication_slot
: Manages Postgresql replication slots.
postgresql::default
: This function pull default values from theparams
class orglobals
class if the value is not present inparams
.postgresql::postgresql_escape
: This function escapes a string using Dollar Quoting using a randomly generated tag if required.postgresql::postgresql_password
: This function returns the postgresql password hash from the clear text username / passwordpostgresql::prepend_sql_password
: This function exists for usage of a role password that is a deferred functionpostgresql_escape
: DEPRECATED. Use the namespaced functionpostgresql::postgresql_escape
instead.postgresql_password
: DEPRECATED. Use the namespaced functionpostgresql::postgresql_password
instead.
postgresql::postgresql_acls_to_resources_hash
: This internal function translates the ipv(4|6)acls format into a resource suitable for create_resources.
Postgresql::Pg_hba_rule
: type for all parameters in the postgresql::server::hba_rule defined resourcePostgresql::Pg_hba_rule_address
: Supported address typesPostgresql::Pg_hba_rule_type
: enum for all different types for the pg_hba_confPostgresql::Pg_hba_rules
: validates a hash of entries for postgresql::server::pg_hab_confPostgresql::Pg_password_encryption
: the supported password_encryption
sql
: Allows you to execute arbitary SQL
Installs PostgreSQL client software. Set the following parameters if you have a custom version you would like to install.
- Note Make sure to add any necessary yum or apt repositories if specifying a custom version.
The following parameters are available in the postgresql::client
class:
Data type: Enum['file', 'absent']
Ensure the connection validation script is present
Default value: 'file'
Data type: Stdlib::Absolutepath
Optional. Absolute path for the postgresql connection validation script.
Default value: $postgresql::params::validcon_script_path
Data type: String[1]
Sets the name of the PostgreSQL client package.
Default value: $postgresql::params::client_package_name
Data type: Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]
Ensure the client package is installed
Default value: 'present'
Class for setting cross-class global overrides.
- Note Most server-specific defaults should be overridden in the postgresql::server class. This class should be used only if you are using a non-standard OS, or if you are changing elements that can only be changed here, such as version or manage_package_repo.
The following parameters are available in the postgresql::globals
class:
client_package_name
server_package_name
contrib_package_name
devel_package_name
java_package_name
docs_package_name
perl_package_name
plperl_package_name
plpython_package_name
python_package_name
postgis_package_name
service_name
service_provider
service_status
default_database
validcon_script_path
initdb_path
psql_path
pg_hba_conf_path
pg_ident_conf_path
postgresql_conf_path
postgresql_conf_mode
recovery_conf_path
default_connect_settings
pg_hba_conf_defaults
datadir
confdir
bindir
xlogdir
logdir
log_line_prefix
user
group
version
postgis_version
repo_proxy
repo_baseurl
yum_repo_commonurl
needs_initdb
encoding
locale
data_checksums
timezone
manage_pg_hba_conf
manage_pg_ident_conf
manage_recovery_conf
manage_postgresql_conf_perms
manage_selinux
manage_datadir
manage_logdir
manage_xlogdir
manage_package_repo
manage_dnf_module
module_workdir
Data type: Optional[String[1]]
Overrides the default PostgreSQL client package name.
Default value: undef
Data type: Optional[String[1]]
Overrides the default PostgreSQL server package name.
Default value: undef
Data type: Optional[String[1]]
Overrides the default PostgreSQL contrib package name.
Default value: undef
Data type: Optional[String[1]]
Overrides the default PostgreSQL devel package name.
Default value: undef
Data type: Optional[String[1]]
Overrides the default PostgreSQL java package name.
Default value: undef
Data type: Optional[String[1]]
Overrides the default PostgreSQL docs package name.
Default value: undef
Data type: Optional[String[1]]
Overrides the default PostgreSQL Perl package name.
Default value: undef
Data type: Optional[String[1]]
Overrides the default PostgreSQL PL/Perl package name.
Default value: undef
Data type: Optional[String[1]]
Overrides the default PostgreSQL PL/Python package name.
Default value: undef
Data type: Optional[String[1]]
Overrides the default PostgreSQL Python package name.
Default value: undef
Data type: Optional[String[1]]
Overrides the default PostgreSQL PostGIS package name.
Default value: undef
Data type: Optional[String[1]]
Overrides the default PostgreSQL service name.
Default value: undef
Data type: Optional[String[1]]
Overrides the default PostgreSQL service provider.
Default value: undef
Data type: Optional[String[1]]
Overrides the default status check command for your PostgreSQL service.
Default value: undef
Data type: Optional[String[1]]
Specifies the name of the default database to connect with.
Default value: undef
Data type: Optional[String[1]]
Scipt path for the connection validation check.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Path to the initdb command.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Sets the path to the psql command.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Specifies the path to your pg_hba.conf file.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Specifies the path to your pg_ident.conf file.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Sets the path to your postgresql.conf file.
Default value: undef
Data type: Optional[Stdlib::Filemode]
Sets the mode of your postgresql.conf file. Only relevant if manage_postgresql_conf_perms is true.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Path to your recovery.conf file.
Default value: undef
Data type: Hash
Default connection settings.
Default value: {}
Data type: Optional[Boolean]
Disables the defaults supplied with the module for pg_hba.conf if set to false.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Overrides the default PostgreSQL data directory for the target platform. Changing the datadir after installation causes the server to come to a full stop before making the change. For Red Hat systems, the data directory must be labeled appropriately for SELinux. On Ubuntu, you must explicitly set needs_initdb = true to allow Puppet to initialize the database in the new datadir (needs_initdb defaults to true on other systems). Warning! If datadir is changed from the default, Puppet does not manage purging of the original data directory, which causes it to fail if the data directory is changed back to the original
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Overrides the default PostgreSQL configuration directory for the target platform.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Overrides the default PostgreSQL binaries directory for the target platform.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Overrides the default PostgreSQL xlog directory.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Overrides the default PostgreSQL log directory.
Default value: undef
Data type: Optional[String[1]]
Overrides the default PostgreSQL log prefix.
Default value: undef
Data type: Optional[String[1]]
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: undef
Data type: Optional[String[1]]
Overrides the default postgres user group to be used for related files in the file system.
Default value: undef
Data type: Optional[String[1]]
The version of PostgreSQL to install and manage.
Default value: undef
Data type: Optional[String[1]]
Defines the version of PostGIS to install, if you install PostGIS.
Default value: undef
Data type: Optional[String[1]]
Sets the proxy option for the official PostgreSQL yum-repositories only.
Default value: undef
Data type: Optional[String[1]]
Sets the baseurl for the PostgreSQL repository. Useful if you host your own mirror of the repository.
Default value: undef
Data type: Optional[String[1]]
Sets the url for the PostgreSQL common Yum repository. Useful if you host your own mirror of the YUM repository.
Default value: undef
Data type: Optional[Boolean]
Explicitly calls the initdb operation after the server package is installed and before the PostgreSQL service is started.
Default value: undef
Data type: Optional[String[1]]
Sets the default encoding for all databases created with this module. On certain operating systems, this is also used during the template1 initialization, so it becomes a default outside of the module as well.
Default value: undef
Data type: Optional[String[1]]
Sets the default database locale for all databases created with this module. On certain operating systems, this is also used during the template1 initialization, so it becomes a default outside of the module as well. On Debian, you'll need to ensure that the 'locales-all' package is installed for full functionality of PostgreSQL.
Default value: undef
Data type: Optional[Boolean]
Use checksums on data pages to help detect corruption by the I/O system that would otherwise be silent. Warning: This option is used during initialization by initdb, and cannot be changed later.
Default value: undef
Data type: Optional[String[1]]
Sets the default timezone of the postgresql server. The postgresql built-in default is taking the systems timezone information.
Default value: undef
Data type: Optional[Boolean]
Allow Puppet to manage the pg_hba.conf file.
Default value: undef
Data type: Optional[Boolean]
Allow Puppet to manage the pg_ident.conf file.
Default value: undef
Data type: Optional[Boolean]
Allow Puppet to manage the recovery.conf file.
Default value: undef
Data type: Optional[Boolean]
Whether to manage the postgresql conf file permissions. This means owner, group and mode. Contents are not managed but should be managed through postgresql::server::config_entry.
Default value: undef
Data type: Optional[Boolean]
Allows Puppet to manage the appropriate configuration file for selinux.
Default value: undef
Data type: Optional[Boolean]
Set to false if you have file{ $datadir: } already defined
Default value: undef
Data type: Optional[Boolean]
Set to false if you have file{ $logdir: } already defined
Default value: undef
Data type: Optional[Boolean]
Set to false if you have file{ $xlogdir: } already defined
Default value: undef
Data type: Optional[Boolean]
Sets up official PostgreSQL repositories on your host if set to true.
Default value: undef
Data type: Boolean
Manage the DNF module. This only makes sense on distributions that use DNF package manager, such as EL8 or Fedora. It also requires Puppet 5.5.20+ or Puppet 6.15.0+ since they ship the dnfmodule provider.
Default value: false
Data type: Optional[Stdlib::Absolutepath]
Specifies working directory under which the psql command should be executed. May need to specify if '/tmp' is on volume mounted with noexec option.
Default value: undef
This class installs postgresql development libraries.
The following parameters are available in the postgresql::lib::devel
class:
Data type: String
Override devel package name
Default value: $postgresql::params::devel_package_name
Data type: Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]
Ensure the development libraries are installed
Default value: 'present'
Data type: Boolean
If the bin directory used by the PostgreSQL page is not /usr/bin or /usr/local/bin, symlinks pg_config from the package's bin dir into usr/bin (not applicable to Debian systems). Set to false to disable this behavior.
Default value: $postgresql::params::link_pg_config
Installs PostgreSQL bindings for Postgres-Docs. Set the following parameters if you have a custom version you would like to install.
- Note Make sure to add any necessary yum or apt repositories if specifying a custom version.
The following parameters are available in the postgresql::lib::docs
class:
Data type: String
Specifies the name of the PostgreSQL docs package.
Default value: $postgresql::params::docs_package_name
Data type: Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]
Whether the PostgreSQL docs package resource should be present.
Default value: 'present'
This class installs the postgresql jdbc connector.
- Note Make sure to add any necessary yum or apt repositories if specifying a custom version.
The following parameters are available in the postgresql::lib::java
class:
Data type: String
Specifies the name of the PostgreSQL java package.
Default value: $postgresql::params::java_package_name
Data type: Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]
Specifies whether the package is present.
Default value: 'present'
This class installs the perl libs for postgresql.
The following parameters are available in the postgresql::lib::perl
class:
Data type: String
Specifies the name of the PostgreSQL perl package to install.
Default value: $postgresql::params::perl_package_name
Data type: Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]
Ensure the perl libs for postgresql are installed.
Default value: 'present'
This class installs the python libs for postgresql.
The following parameters are available in the postgresql::lib::python
class:
Data type: String[1]
The name of the PostgreSQL Python package.
Default value: $postgresql::params::python_package_name
Data type: Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]
Ensure the python libs for postgresql are installed.
Default value: 'present'
This installs a PostgreSQL server
The following parameters are available in the postgresql::server
class:
postgres_password
package_name
package_ensure
plperl_package_name
plpython_package_name
service_ensure
service_enable
service_manage
service_name
service_restart_on_change
service_provider
service_reload
service_status
default_database
default_connect_settings
listen_addresses
port
ip_mask_deny_postgres_user
ip_mask_allow_all_users
ipv4acls
ipv6acls
initdb_path
psql_path
pg_hba_conf_path
pg_ident_conf_path
postgresql_conf_path
postgresql_conf_mode
recovery_conf_path
datadir
xlogdir
logdir
log_line_prefix
pg_hba_conf_defaults
user
group
needs_initdb
encoding
locale
data_checksums
timezone
manage_pg_hba_conf
manage_pg_ident_conf
manage_recovery_conf
manage_postgresql_conf_perms
manage_selinux
module_workdir
manage_datadir
manage_logdir
manage_xlogdir
password_encryption
pg_hba_auth_password_encryption
roles
config_entries
pg_hba_rules
backup_enable
backup_options
backup_provider
extra_systemd_config
auth_host
auth_local
lc_messages
username
Data type: Optional[Variant[String[1], Sensitive[String[1]], Integer]]
Sets the password for the postgres user to your specified value. By default, this setting uses the superuser account in the Postgres database, with a user called postgres and no password.
Default value: undef
Data type: String[1]
Specifies the name of the package to use for installing the server software.
Default value: $postgresql::params::server_package_name
Data type: Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]
Passes a value through to the package resource when creating the server instance.
Default value: $postgresql::params::package_ensure
Data type: Optional[String[1]]
Sets the default package name for the PL/Perl extension.
Default value: $postgresql::params::plperl_package_name
Data type: Optional[String[1]]
Sets the default package name for the PL/Python extension.
Default value: $postgresql::params::plpython_package_name
Data type: Variant[Enum['running', 'stopped'], Boolean]
Ensure service is installed
Default value: $postgresql::params::service_ensure
Data type: Boolean
Enable the PostgreSQL service
Default value: $postgresql::params::service_enable
Data type: Boolean
Defines whether or not Puppet should manage the service.
Default value: $postgresql::params::service_manage
Data type: String[1]
Overrides the default PostgreSQL service name.
Default value: $postgresql::params::service_name
Data type: Boolean
Overrides the default behavior to restart your PostgreSQL service when a config entry has been changed that requires a service restart to become active.
Default value: $postgresql::params::service_restart_on_change
Data type: Optional[String[1]]
Overrides the default PostgreSQL service provider.
Default value: $postgresql::params::service_provider
Data type: String[1]
Overrides the default reload command for your PostgreSQL service.
Default value: $postgresql::params::service_reload
Data type: Optional[String[1]]
Overrides the default status check command for your PostgreSQL service.
Default value: $postgresql::params::service_status
Data type: String[1]
Specifies the name of the default database to connect with. On most systems this is 'postgres'.
Default value: $postgresql::params::default_database
Data type: Hash
Specifies a hash of environment variables used when connecting to a remote server. Becomes the default for other defined types, such as postgresql::server::role.
Default value: $postgresql::globals::default_connect_settings
Data type: Optional[Variant[String[1], Array[String[1]]]]
Address list on which the PostgreSQL service will listen
Default value: $postgresql::params::listen_addresses
Data type: Stdlib::Port
Specifies the port for the PostgreSQL server to listen on. Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems, changing the port causes the server to come to a full stop before being able to make the change. Default value: 5432. Meaning the Postgres server listens on TCP port 5432.
Default value: $postgresql::params::port
Data type: String[1]
Specifies the IP mask from which remote connections should be denied for the postgres superuser. Default value: '0.0.0.0/0', which denies any remote connection.
Default value: $postgresql::params::ip_mask_deny_postgres_user
Data type: String[1]
Overrides PostgreSQL defaults for remote connections. By default, PostgreSQL does not allow database user accounts to connect via TCP from remote machines. If you'd like to allow this, you can override this setting. Set to '0.0.0.0/0' to allow database users to connect from any remote machine, or '192.168.0.0/1' to allow connections from any machine on your local '192.168' subnet. Default value: '127.0.0.1/32'.
Default value: $postgresql::params::ip_mask_allow_all_users
Data type: Array[String[1]]
Lists strings for access control for connection method, users, databases, IPv4 addresses;
Default value: $postgresql::params::ipv4acls
Data type: Array[String[1]]
Lists strings for access control for connection method, users, databases, IPv6 addresses.
Default value: $postgresql::params::ipv6acls
Data type: Stdlib::Absolutepath
Specifies the path to the initdb command.
Default value: $postgresql::params::initdb_path
Data type: Stdlib::Absolutepath
Specifies the path to the psql command.
Default value: $postgresql::params::psql_path
Data type: Stdlib::Absolutepath
Specifies the path to your pg_hba.conf file.
Default value: $postgresql::params::pg_hba_conf_path
Data type: Stdlib::Absolutepath
Specifies the path to your pg_ident.conf file.
Default value: $postgresql::params::pg_ident_conf_path
Data type: Stdlib::Absolutepath
Specifies the path to your postgresql.conf file.
Default value: $postgresql::params::postgresql_conf_path
Data type: Optional[Stdlib::Filemode]
Sets the mode of your postgresql.conf file. Only relevant if manage_postgresql_conf_perms is true.
Default value: $postgresql::params::postgresql_conf_mode
Data type: Stdlib::Absolutepath
Specifies the path to your recovery.conf file.
Default value: $postgresql::params::recovery_conf_path
Data type: Stdlib::Absolutepath
PostgreSQL data directory
Default value: $postgresql::params::datadir
Data type: Optional[Stdlib::Absolutepath]
PostgreSQL xlog directory
Default value: $postgresql::params::xlogdir
Data type: Optional[Stdlib::Absolutepath]
PostgreSQL log directory
Default value: $postgresql::params::logdir
Data type: Optional[String[1]]
PostgreSQL log line prefix
Default value: $postgresql::params::log_line_prefix
Data type: Boolean
If false, disables the defaults supplied with the module for pg_hba.conf. This is useful if you disagree with the defaults and wish to override them yourself. Be sure that your changes of course align with the rest of the module, as some access is required to perform basic psql operations for example.
Default value: $postgresql::params::pg_hba_conf_defaults
Data type: String[1]
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: $postgresql::params::user
Data type: String[1]
Overrides the default postgres user group to be used for related files in the file system.
Default value: $postgresql::params::group
Data type: Boolean
Explicitly calls the initdb operation after server package is installed, and before the PostgreSQL service is started.
Default value: $postgresql::params::needs_initdb
Data type: Optional[String[1]]
Sets the default encoding for all databases created with this module. On certain operating systems this is also used during the template1 initialization, so it becomes a default outside of the module as well.
Default value: $postgresql::params::encoding
Data type: Optional[String[1]]
Sets the default database locale for all databases created with this module. On certain operating systems this is used during the template1 initialization as well, so it becomes a default outside of the module.
Default value: $postgresql::params::locale
Data type: Optional[Boolean]
Use checksums on data pages to help detect corruption by the I/O system that would otherwise be silent. Warning: This option is used during initialization by initdb, and cannot be changed later. If set, checksums are calculated for all objects, in all databases.
Default value: $postgresql::params::data_checksums
Data type: Optional[String[1]]
Set timezone for the PostgreSQL instance
Default value: $postgresql::params::timezone
Data type: Boolean
Boolean. Whether to manage the pg_hba.conf.
Default value: $postgresql::params::manage_pg_hba_conf
Data type: Boolean
Boolean. Overwrites the pg_ident.conf file.
Default value: $postgresql::params::manage_pg_ident_conf
Data type: Boolean
Boolean. Specifies whether or not manage the recovery.conf.
Default value: $postgresql::params::manage_recovery_conf
Data type: Boolean
Whether to manage the postgresql conf file permissions. This means owner, group and mode. Contents are not managed but should be managed through postgresql::server::config_entry.
Default value: $postgresql::params::manage_postgresql_conf_perms
Data type: Boolean
Specifies whether or not manage the conf file for selinux.
Default value: $postgresql::params::manage_selinux
Data type: Stdlib::Absolutepath
Working directory for the PostgreSQL module
Default value: $postgresql::params::module_workdir
Data type: Boolean
Set to false if you have file{ $datadir: } already defined
Default value: $postgresql::params::manage_datadir
Data type: Boolean
Set to false if you have file{ $logdir: } already defined
Default value: $postgresql::params::manage_logdir
Data type: Boolean
Set to false if you have file{ $xlogdir: } already defined
Default value: $postgresql::params::manage_xlogdir
Data type: Postgresql::Pg_password_encryption
Specify the type of encryption set for the password.
Default value: $postgresql::params::password_encryption
Data type: Optional[Postgresql::Pg_password_encryption]
Specify the type of encryption set for the password in pg_hba_conf, this value is usefull if you want to start enforcing scram-sha-256, but give users transition time.
Default value: undef
Data type: Hash[String, Hash]
Specifies a hash from which to generate postgresql::server::role resources.
Default value: {}
Data type: Hash[String, Any]
Specifies a hash from which to generate postgresql::server::config_entry resources.
Default value: {}
Data type: Postgresql::Pg_hba_rules
Specifies a hash from which to generate postgresql::server::pg_hba_rule resources.
Default value: {}
Data type: Boolean
Whether a backup job should be enabled.
Default value: $postgresql::params::backup_enable
Data type: Hash
A hash of options that should be passed through to the backup provider.
Default value: {}
Data type: Enum['pg_dump']
Specifies the backup provider to use.
Default value: $postgresql::params::backup_provider
Data type: Optional[String]
Adds extra config to systemd config file, can for instance be used to add extra openfiles. This can be a multi line string
Default value: $postgresql::params::extra_systemd_config
Data type: Optional[String[1]]
auth method used by default for host authorization
Default value: undef
Data type: Optional[String[1]]
auth method used by default for local authorization
Default value: undef
Data type: Optional[String[1]]
locale used for logging and system messages
Default value: undef
Data type: Optional[String[1]]
username of user running the postgres instance
Default value: undef
Install the contrib postgresql packaging.
The following parameters are available in the postgresql::server::contrib
class:
Data type: Optional[String[1]]
The name of the PostgreSQL contrib package.
Default value: $postgresql::params::contrib_package_name
Data type: Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]
Ensure the contrib package is installed.
Default value: 'present'
This class installs the PL/Perl procedural language for postgresql.
The following parameters are available in the postgresql::server::plperl
class:
Data type: Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]
The ensure parameter passed on to PostgreSQL PL/Perl package resource.
Default value: 'present'
Data type: Optional[String[1]]
The name of the PostgreSQL PL/Perl package.
Default value: $postgresql::server::plperl_package_name
This class installs the PL/Python procedural language for postgresql.
The following parameters are available in the postgresql::server::plpython
class:
Data type: Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]
Specifies whether the package is present.
Default value: 'present'
Data type: Optional[String[1]]
Specifies the name of the postgresql PL/Python package.
Default value: $postgresql::server::plpython_package_name
Install the postgis postgresql packaging.
The following parameters are available in the postgresql::server::postgis
class:
Data type: String
Sets the package name.
Default value: $postgresql::params::postgis_package_name
Data type: Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]
Specifies if the package is present or not.
Default value: 'present'
Manage a postgresql.conf entry.
The following parameters are available in the postgresql::server::config_entry
defined type:
Data type: Enum['present', 'absent']
Removes an entry if set to 'absent'.
Default value: 'present'
Data type: String[1]
Defines the key/name for the setting. Defaults to $name
Default value: $name
Data type: Optional[Variant[String[1], Numeric, Array[String[1]]]]
Defines the value for the setting.
Default value: undef
Data type: Stdlib::Absolutepath
Path for postgresql.conf
Default value: $postgresql::server::postgresql_conf_path
Define for creating a database.
The following parameters are available in the postgresql::server::database
defined type:
comment
dbname
owner
tablespace
template
encoding
locale
istemplate
connect_settings
psql_path
default_db
user
group
port
Data type: Optional[String[1]]
Sets a comment on the database.
Default value: undef
Data type: String[1]
Sets the name of the database.
Default value: $title
Data type: Optional[String[1]]
Sets name of the database owner.
Default value: undef
Data type: Optional[String[1]]
Sets tablespace for where to create this database.
Default value: undef
Data type: String[1]
Specifies the name of the template database from which to build this database. Default value: 'template0'.
Default value: 'template0'
Data type: Optional[String[1]]
Overrides the character set during creation of the database.
Default value: $postgresql::server::encoding
Data type: Optional[String[1]]
Overrides the locale during creation of the database.
Default value: $postgresql::server::locale
Data type: Boolean
Defines the database as a template if set to true.
Default value: false
Data type: Hash
Specifies a hash of environment variables used when connecting to a remote server.
Default value: $postgresql::server::default_connect_settings
Data type: Stdlib::Absolutepath
Specifies the path to the psql command.
Default value: $postgresql::server::psql_path
Data type: String[1]
Specifies the name of the default database to connect with. On most systems this is 'postgres'.
Default value: $postgresql::server::default_database
Data type: String[1]
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: $postgresql::server::user
Data type: String[1]
Overrides the default postgres user group to be used for related files in the file system.
Default value: $postgresql::server::group
Data type: Stdlib::Port
Specifies the port for the PostgreSQL server to listen on.
Default value: $postgresql::server::port
Manage a database grant.
The following parameters are available in the postgresql::server::database_grant
defined type:
Data type: Enum['ALL', 'CREATE', 'CONNECT', 'TEMPORARY', 'TEMP', 'all', 'create', 'connect', 'temporary', 'temp']
Specifies comma-separated list of privileges to grant. Valid options: 'ALL', 'CREATE', 'CONNECT', 'TEMPORARY', 'TEMP'.
Data type: String[1]
Specifies the database to which you are granting access.
Data type: String[1]
Specifies the role or user whom you are granting access to.
Data type: Optional[Enum['present', 'absent']]
Specifies whether to grant or revoke the privilege. Revoke or 'absent' works only in PostgreSQL version 9.1.24 or later.
Default value: undef
Data type: Optional[String[1]]
Defines the database to execute the grant against. This should not ordinarily be changed from the default
Default value: undef
Data type: String[1]
Specifies the OS user for running psql. Default value: The default user for the module, usually 'postgres'.
Default value: $postgresql::server::user
Data type: String[1]
Overrides the default postgres user group to be used for related files in the file system.
Default value: $postgresql::server::group
Data type: Hash
Specifies a hash of environment variables used when connecting to a remote server.
Default value: $postgresql::server::default_connect_settings
Data type: Stdlib::Port
Port to use when connecting.
Default value: $postgresql::server::port
Define for conveniently creating a role, database and assigning the correct permissions.
The following parameters are available in the postgresql::server::db
defined type:
user
password
comment
dbname
encoding
locale
grant
tablespace
template
istemplate
owner
port
psql_user
psql_group
Data type: String[1]
User to assign access to the database upon creation (will be created if not defined elsewhere). Mandatory.
Data type: Optional[Variant[String, Sensitive[String]]]
Sets the password for the created user (if a user is created).
Default value: undef
Data type: Optional[String[1]]
Defines a comment to be stored about the database using the PostgreSQL COMMENT command.
Default value: undef
Data type: String[1]
Sets the name of the database to be created.
Default value: $title
Data type: Optional[String[1]]
Overrides the character set during creation of the database.
Default value: $postgresql::server::encoding
Data type: Optional[String[1]]
Overrides the locale during creation of the database.
Default value: $postgresql::server::locale
Data type: Variant[String[1], Array[String[1]]]
Specifies the permissions to grant during creation. Default value: 'ALL'.
Default value: 'ALL'
Data type: Optional[String[1]]
Defines the name of the tablespace to allocate the created database to.
Default value: undef
Data type: String[1]
Specifies the name of the template database from which to build this database. Defaults value: template0.
Default value: 'template0'
Data type: Boolean
Specifies that the database is a template, if set to true.
Default value: false
Data type: Optional[String[1]]
Sets a user as the owner of the database.
Default value: undef
Data type: Optional[Stdlib::Port]
Specifies the port where the PostgreSQL server is listening on.
Default value: undef
Data type: String[1]
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: $postgresql::server::user
Data type: String[1]
Overrides the default PostgreSQL user group to be used for related files in the file system.
Default value: $postgresql::server::group
Manage a database defaults privileges. Only works with PostgreSQL version 9.6 and above.
The following parameters are available in the postgresql::server::default_privileges
defined type:
target_role
ensure
role
db
object_type
privilege
schema
psql_db
psql_user
psql_path
port
connect_settings
group
Data type: Optional[String]
Target role whose created objects will receive the default privileges. Defaults to the current user.
Default value: undef
Data type: Enum['present', 'absent']
Specifies whether to grant or revoke the privilege.
Default value: 'present'
Data type: String
Specifies the role or user whom you are granting access to.
Data type: String
Specifies the database to which you are granting access.
Data type:
Pattern[
/(?i:^FUNCTIONS$)/,
/(?i:^ROUTINES$)/,
/(?i:^SEQUENCES$)/,
/(?i:^TABLES$)/,
/(?i:^TYPES$)/,
/(?i:^SCHEMAS$)/
]
Specify target object type: 'FUNCTIONS', 'ROUTINES', 'SEQUENCES', 'TABLES', 'TYPES'.
Data type: String
Specifies comma-separated list of privileges to grant. Valid options: depends on object type.
Data type: String
Target schema. Defaults to 'public'. Can be set to '' to apply to all schemas.
Default value: 'public'
Data type: String
Defines the database to execute the grant against. This should not ordinarily be changed from the default.
Default value: $postgresql::server::default_database
Data type: String
Specifies the OS user for running psql. Default value: The default user for the module, usually 'postgres'.
Default value: $postgresql::server::user
Data type: Stdlib::Absolutepath
Specifies the OS user for running psql. Default value: The default user for the module, usually 'postgres'.
Default value: $postgresql::server::psql_path
Data type: Stdlib::Port
Specifies the port to access the server. Default value: The default user for the module, usually '5432'.
Default value: $postgresql::server::port
Data type: Hash
Specifies a hash of environment variables used when connecting to a remote server.
Default value: $postgresql::server::default_connect_settings
Data type: String
Specifies the user group to which the privileges will be granted.
Default value: $postgresql::server::group
Activate an extension on a postgresql database.
The following parameters are available in the postgresql::server::extension
defined type:
database
extension
schema
version
ensure
package_name
package_ensure
port
connect_settings
database_resource_name
psql_path
user
group
Data type: String[1]
Specifies the database on which to activate the extension.
Data type: String[1]
Specifies the extension to activate. If left blank, uses the name of the resource.
Default value: $name
Data type: Optional[String[1]]
Specifies the schema on which to activate the extension.
Default value: undef
Data type: Optional[String[1]]
Specifies the version of the extension which the database uses. When an extension package is updated, this does not automatically change the effective version in each database. This needs be updated using the PostgreSQL-specific SQL ALTER EXTENSION... version may be set to latest, in which case the SQL ALTER EXTENSION "extension" UPDATE is applied to this database (only). version may be set to a specific version, in which case the extension is updated using ALTER EXTENSION "extension" UPDATE TO 'version' eg. If extension is set to postgis and version is set to 2.3.3, this will apply the SQL ALTER EXTENSION "postgis" UPDATE TO '2.3.3' to this database only. version may be omitted, in which case no ALTER EXTENSION... SQL is applied, and the version will be left unchanged.
Default value: undef
Data type: Enum['present', 'absent']
Specifies whether to activate or deactivate the extension. Valid options: 'present' or 'absent'.
Default value: 'present'
Data type: Optional[String[1]]
Specifies a package to install prior to activating the extension.
Default value: undef
Data type: Optional[Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]]
Overrides default package deletion behavior. By default, the package specified with package_name is installed when the extension is activated and removed when the extension is deactivated. To override this behavior, set the ensure value for the package.
Default value: undef
Data type: Stdlib::Port
Port to use when connecting.
Default value: postgresql::default('port')
Data type: Hash
Specifies a hash of environment variables used when connecting to a remote server.
Default value: postgresql::default('default_connect_settings')
Data type: String[1]
Specifies the resource name of the DB being managed. Defaults to the parameter $database, if left blank.
Default value: $database
Data type: Stdlib::Absolutepath
Specifies the path to the psql command.
Default value: postgresql::default('psql_path')
Data type: String[1]
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: postgresql::default('user')
Data type: String[1]
Overrides the default postgres user group to be used for related files in the file system.
Default value: postgresql::default('group')
Define for granting permissions to roles.
The following parameters are available in the postgresql::server::grant
defined type:
role
db
privilege
object_type
object_name
object_arguments
psql_db
psql_user
port
onlyif_exists
connect_settings
ensure
group
psql_path
Data type: String
Specifies the role or user whom you are granting access to.
Data type: String
Specifies the database to which you are granting access.
Data type: String
Specifies the privilege to grant. Valid options: 'ALL', 'ALL PRIVILEGES' or 'object_type' dependent string.
Default value: ''
Data type:
Pattern[#/(?i:^COLUMN$)/,
/(?i:^ALL SEQUENCES IN SCHEMA$)/,
/(?i:^ALL TABLES IN SCHEMA$)/,
/(?i:^DATABASE$)/,
#/(?i:^FOREIGN DATA WRAPPER$)/,
#/(?i:^FOREIGN SERVER$)/,
/(?i:^FUNCTION$)/,
/(?i:^LANGUAGE$)/,
#/(?i:^PROCEDURAL LANGUAGE$)/,
/(?i:^TABLE$)/,
#/(?i:^TABLESPACE$)/,
/(?i:^SCHEMA$)/,
/(?i:^SEQUENCE$)/
#/(?i:^VIEW$)/
]
Specifies the type of object to which you are granting privileges. Valid options: 'DATABASE', 'SCHEMA', 'SEQUENCE', 'ALL SEQUENCES IN SCHEMA', 'TABLE' or 'ALL TABLES IN SCHEMA'.
Default value: 'database'
Data type: Optional[Variant[Array[String,2,2],String[1]]]
Specifies name of object_type to which to grant access, can be either a string or a two element array. String: 'object_name' Array: ['schema_name', 'object_name']
Default value: undef
Data type: Array[String[1],0]
Specifies any arguments to be passed alongisde the access grant.
Default value: []
Data type: String
Specifies the database to execute the grant against. This should not ordinarily be changed from the default
Default value: $postgresql::server::default_database
Data type: String
Sets the OS user to run psql.
Default value: $postgresql::server::user
Data type: Stdlib::Port
Port to use when connecting.
Default value: $postgresql::server::port
Data type: Boolean
Create grant only if doesn't exist
Default value: false
Data type: Hash
Specifies a hash of environment variables used when connecting to a remote server.
Default value: $postgresql::server::default_connect_settings
Data type: Enum['present', 'absent']
Specifies whether to grant or revoke the privilege. Default is to grant the privilege. Valid values: 'present', 'absent'.
Default value: 'present'
Data type: String
Sets the OS group to run psql
Default value: $postgresql::server::group
Data type: Stdlib::Absolutepath
Sets the path to psql command
Default value: $postgresql::server::psql_path
Define for granting membership to a role.
The following parameters are available in the postgresql::server::grant_role
defined type:
Data type: String[1]
Specifies the group role to which you are assigning a role.
Data type: String[1]
Specifies the role you want to assign to a group. If left blank, uses the name of the resource.
Default value: $name
Data type: Enum['present', 'absent']
Specifies whether to grant or revoke the membership. Valid options: 'present' or 'absent'.
Default value: 'present'
Data type: String[1]
Specifies the database to execute the grant against. This should not ordinarily be changed from the default
Default value: $postgresql::server::default_database
Data type: String[1]
Sets the OS user to run psql.
Default value: $postgresql::server::user
Data type: Stdlib::Port
Port to use when connecting.
Default value: $postgresql::server::port
Data type: Hash
Specifies a hash of environment variables used when connecting to a remote server.
Default value: $postgresql::server::default_connect_settings
Manages the config for a postgresql::server instance
The following parameters are available in the postgresql::server::instance::config
defined type:
ip_mask_deny_postgres_user
ip_mask_allow_all_users
listen_addresses
port
ipv4acls
ipv6acls
pg_hba_conf_path
pg_ident_conf_path
postgresql_conf_path
postgresql_conf_mode
recovery_conf_path
pg_hba_conf_defaults
user
group
version
manage_pg_hba_conf
manage_pg_ident_conf
manage_recovery_conf
manage_postgresql_conf_perms
datadir
logdir
service_name
service_enable
log_line_prefix
timezone
password_encryption
pg_hba_auth_password_encryption
extra_systemd_config
manage_selinux
Data type: String[1]
Specifies the IP mask from which remote connections should be denied for the postgres superuser. Default value: '0.0.0.0/0', which denies any remote connection.
Default value: $postgresql::server::ip_mask_deny_postgres_user
Data type: String[1]
Overrides PostgreSQL defaults for remote connections. By default, PostgreSQL does not allow database user accounts to connect via TCP from remote machines. If you'd like to allow this, you can override this setting. Set to '0.0.0.0/0' to allow database users to connect from any remote machine, or '192.168.0.0/1' to allow connections from any machine on your local '192.168' subnet. Default value: '127.0.0.1/32'.
Default value: $postgresql::server::ip_mask_allow_all_users
Data type: Optional[Variant[String[1], Array[String[1]]]]
Address list on which the PostgreSQL service will listen
Default value: $postgresql::server::listen_addresses
Data type: Stdlib::Port
Specifies the port for the PostgreSQL server to listen on. Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems, changing the port causes the server to come to a full stop before being able to make the change. Default value: 5432. Meaning the Postgres server listens on TCP port 5432.
Default value: $postgresql::server::port
Data type: Array[String[1]]
Lists strings for access control for connection method, users, databases, IPv4 addresses.
Default value: $postgresql::server::ipv4acls
Data type: Array[String[1]]
Lists strings for access control for connection method, users, databases, IPv6 addresses.
Default value: $postgresql::server::ipv6acls
Data type: Stdlib::Absolutepath
Specifies the path to your pg_hba.conf file.
Default value: $postgresql::server::pg_hba_conf_path
Data type: Stdlib::Absolutepath
Specifies the path to your pg_ident.conf file.
Default value: $postgresql::server::pg_ident_conf_path
Data type: Stdlib::Absolutepath
Specifies the path to your postgresql.conf file.
Default value: $postgresql::server::postgresql_conf_path
Data type: Optional[Stdlib::Filemode]
Sets the mode of your postgresql.conf file. Only relevant if manage_postgresql_conf_perms is true.
Default value: $postgresql::server::postgresql_conf_mode
Data type: Stdlib::Absolutepath
Specifies the path to your recovery.conf file.
Default value: $postgresql::server::recovery_conf_path
Data type: Boolean
If false, disables the defaults supplied with the module for pg_hba.conf. This is useful if you disagree with the defaults and wish to override them yourself. Be sure that your changes of course align with the rest of the module, as some access is required to perform basic psql operations for example.
Default value: $postgresql::server::pg_hba_conf_defaults
Data type: String[1]
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: $postgresql::server::user
Data type: String[1]
Overrides the default postgres user group to be used for related files in the file system.
Default value: $postgresql::server::group
Data type: Optional[String[1]]
Sets PostgreSQL version
Default value: $postgresql::server::_version
Data type: Boolean
Boolean. Whether to manage the pg_hba.conf.
Default value: $postgresql::server::manage_pg_hba_conf
Data type: Boolean
Boolean. Overwrites the pg_ident.conf file.
Default value: $postgresql::server::manage_pg_ident_conf
Data type: Boolean
Boolean. Specifies whether or not manage the recovery.conf.
Default value: $postgresql::server::manage_recovery_conf
Data type: Boolean
Whether to manage the postgresql conf file permissions. This means owner, group and mode. Contents are not managed but should be managed through postgresql::server::config_entry.
Default value: $postgresql::server::manage_postgresql_conf_perms
Data type: Stdlib::Absolutepath
PostgreSQL data directory
Default value: $postgresql::server::datadir
Data type: Optional[Stdlib::Absolutepath]
PostgreSQL log directory
Default value: $postgresql::server::logdir
Data type: String[1]
Overrides the default PostgreSQL service name.
Default value: $postgresql::server::service_name
Data type: Boolean
Enable the PostgreSQL service
Default value: $postgresql::server::service_enable
Data type: Optional[String[1]]
PostgreSQL log line prefix
Default value: $postgresql::server::log_line_prefix
Data type: Optional[String[1]]
Set timezone for the PostgreSQL instance
Default value: $postgresql::server::timezone
Data type: Postgresql::Pg_password_encryption
Specify the type of encryption set for the password.
Default value: $postgresql::server::password_encryption
Data type: Optional[Postgresql::Pg_password_encryption]
Specify the type of encryption set for the password in pg_hba_conf, this value is usefull if you want to start enforcing scram-sha-256, but give users transition time.
Default value: $postgresql::server::pg_hba_auth_password_encryption
Data type: Optional[String]
Adds extra config to systemd config file, can for instance be used to add extra openfiles. This can be a multi line string
Default value: $postgresql::server::extra_systemd_config
Data type: Boolean
Specifies whether or not manage the conf file for selinux.
Default value: $postgresql::server::manage_selinux
Manages initdb feature for a postgresql::server instance
The following parameters are available in the postgresql::server::instance::initdb
defined type:
auth_host
auth_local
data_checksums
datadir
encoding
group
initdb_path
lc_messages
locale
logdir
manage_datadir
manage_logdir
manage_xlogdir
module_workdir
needs_initdb
user
username
xlogdir
port
psql_path
Data type: Optional[String[1]]
auth method used by default for host authorization
Default value: $postgresql::server::auth_host
Data type: Optional[String[1]]
auth method used by default for local authorization
Default value: $postgresql::server::auth_local
Data type: Optional[Boolean]
Boolean. Use checksums on data pages to help detect corruption by the I/O system that would otherwise be silent.
Default value: $postgresql::server::data_checksums
Data type: Stdlib::Absolutepath
PostgreSQL data directory
Default value: $postgresql::server::datadir
Data type: Optional[String[1]]
Sets the default encoding for all databases created with this module. On certain operating systems this is also used during the template1 initialization, so it becomes a default outside of the module as well.
Default value: $postgresql::server::encoding
Data type: String[1]
Overrides the default postgres user group to be used for related files in the file system.
Default value: $postgresql::server::group
Data type: Stdlib::Absolutepath
Specifies the path to the initdb command.
Default value: $postgresql::server::initdb_path
Data type: Optional[String[1]]
locale used for logging and system messages
Default value: $postgresql::server::lc_messages
Data type: Optional[String[1]]
Sets the default database locale for all databases created with this module. On certain operating systems this is used during the template1 initialization as well, so it becomes a default outside of the module. Warning: This option is used during initialization by initdb, and cannot be changed later. If set, checksums are calculated for all objects, in all databases.
Default value: $postgresql::server::locale
Data type: Optional[Stdlib::Absolutepath]
PostgreSQL log directory
Default value: $postgresql::server::logdir
Data type: Boolean
Set to false if you have file{ $datadir: } already defined
Default value: $postgresql::server::manage_datadir
Data type: Boolean
Set to false if you have file{ $logdir: } already defined
Default value: $postgresql::server::manage_logdir
Data type: Boolean
Set to false if you have file{ $xlogdir: } already defined
Default value: $postgresql::server::manage_xlogdir
Data type: Stdlib::Absolutepath
Working directory for the PostgreSQL module
Default value: $postgresql::server::module_workdir
Data type: Boolean
Explicitly calls the initdb operation after server package is installed and before the PostgreSQL service is started.
Default value: $postgresql::server::needs_initdb
Data type: String[1]
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: $postgresql::server::user
Data type: Optional[String[1]]
username of user running the postgres instance
Default value: $postgresql::server::username
Data type: Optional[Stdlib::Absolutepath]
PostgreSQL xlog/WAL directory
Default value: $postgresql::server::xlogdir
Data type: Stdlib::Port
Specifies the port for the PostgreSQL server to listen on. Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems, changing the port causes the server to come to a full stop before being able to make the change.
Default value: $postgresql::server::port
Data type: Stdlib::Absolutepath
Specifies the path to the psql command.
Default value: $postgresql::server::psql_path
Manage the default encoding when database initialization is managed by the package
The following parameters are available in the postgresql::server::instance::late_initdb
defined type:
Data type: Optional[String[1]]
Sets the default encoding for all databases created with this module. On certain operating systems this is also used during the template1 initialization, so it becomes a default outside of the module as well.
Default value: $postgresql::server::encoding
Data type: String[1]
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: $postgresql::server::user
Data type: String[1]
Overrides the default postgres user group to be used for related files in the file system.
Default value: $postgresql::server::group
Data type: Stdlib::Absolutepath
Specifies the path to the psql command.
Default value: $postgresql::server::psql_path
Data type: Stdlib::Port
Specifies the port for the PostgreSQL server to listen on. Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems, changing the port causes the server to come to a full stop before being able to make the change.
Default value: $postgresql::server::port
Data type: Stdlib::Absolutepath
Working directory for the PostgreSQL module
Default value: $postgresql::server::module_workdir
Overrides the default PostgreSQL superuser
The following parameters are available in the postgresql::server::instance::passwd
defined type:
Data type: String[1]
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: $postgresql::server::user
Data type: String[1]
Overrides the default postgres user group to be used for related files in the file system. Default value: 5432. Meaning the Postgres server listens on TCP port 5432.
Default value: $postgresql::server::group
Data type: Stdlib::Absolutepath
Specifies the path to the psql command.
Default value: $postgresql::server::psql_path
Data type: Stdlib::Port
Specifies the port for the PostgreSQL server to listen on. Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems, changing the port causes the server to come to a full stop before being able to make the change.
Default value: $postgresql::server::port
Data type: String[1]
Specifies the name of the database to connect with. On most systems this is 'postgres'.
Default value: $postgresql::server::default_database
Data type: Stdlib::Absolutepath
Working directory for the PostgreSQL module
Default value: $postgresql::server::module_workdir
Data type: Optional[Variant[String[1], Sensitive[String[1]], Integer]]
Sets the password for the postgres user to your specified value. By default, this setting uses the superuser account in the Postgres database, with a user called postgres and no password.
Default value: $postgresql::server::postgres_password
Overrides the default reload or status command for your PostgreSQL service
The following parameters are available in the postgresql::server::instance::reload
defined type:
Data type: String[1]
Overrides the default reload command for your PostgreSQL service.
Default value: $postgresql::server::service_reload
Data type: String[1]
Overrides the default status check command for your PostgreSQL service.
Default value: $postgresql::server::service_status
Manages the service for the postgres main instance (default) or additional instances
The following parameters are available in the postgresql::server::instance::service
defined type:
service_ensure
service_enable
service_manage
service_name
service_provider
service_status
user
port
default_database
psql_path
connect_settings
Data type: Variant[Enum['running', 'stopped'], Boolean]
Ensure service is installed
Default value: $postgresql::server::service_ensure
Data type: Boolean
Enable the PostgreSQL service
Default value: $postgresql::server::service_enable
Data type: Boolean
Defines whether or not Puppet should manage the service.
Default value: $postgresql::server::service_manage
Data type: String[1]
Overrides the default PostgreSQL service name.
Default value: $postgresql::server::service_name
Data type: Optional[String[1]]
Overrides the default PostgreSQL service provider.
Default value: $postgresql::server::service_provider
Data type: String[1]
Overrides the default status check command for your PostgreSQL service.
Default value: $postgresql::server::service_status
Data type: String[1]
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: $postgresql::server::user
Data type: Stdlib::Port
Specifies the port for the PostgreSQL server to listen on. Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems, changing the port causes the server to come to a full stop before being able to make the change. Default value: 5432. Meaning the Postgres server listens on TCP port 5432.
Default value: $postgresql::server::port
Data type: String[1]
Specifies the name of the default database to connect with. On most systems this is 'postgres'.
Default value: $postgresql::server::default_database
Data type: Stdlib::Absolutepath
Specifies the path to the psql command.
Default value: $postgresql::server::psql_path
Data type: Hash
Specifies a hash of environment variables used when connecting to a remote server. Becomes the default for other defined types, such as postgresql::server::role.
Default value: $postgresql::server::default_connect_settings
This resource manages an individual rule that applies to the file defined in target.
The following parameters are available in the postgresql::server::pg_hba_rule
defined type:
Data type: Postgresql::Pg_hba_rule_type
Sets the type of rule.
Data type: String[1]
Sets a comma-separated list of databases that this rule matches.
Data type: String[1]
Sets a comma-separated list of users that this rule matches.
Data type: String[1]
Provides the method that is used for authentication for the connection that this rule matches. Described further in the PostgreSQL pg_hba.conf documentation.
Data type: Optional[Postgresql::Pg_hba_rule_address]
Sets a address for this rule matching when the type is not 'local'. Value can either be IPv4 CIDR, IPv6 CIDR, a FQDN, the strings 'all', 'samehost' or 'samenet' or a domain either with or without starting dot (.) https://www.postgresql.org/docs/current/auth-pg-hba-conf.html
Default value: undef
Data type: String[1]
Defines a longer description for this rule, if required. This description is placed in the comments above the rule in pg_hba.conf. Default value: 'none'.
Default value: 'none'
Data type: Optional[String]
For certain auth_method settings there are extra options that can be passed. Consult the PostgreSQL pg_hba.conf documentation for further details.
Default value: undef
Data type: Variant[String, Integer]
Sets an order for placing the rule in pg_hba.conf. This can be either a string or an integer. If it is an integer, it will be converted to a string by zero-padding it to three digits. E.g. 42 will be zero-padded to the string '042'. The pg_hba_rule fragments are sorted using the alpha sorting order. Default value: 150.
Default value: 150
Data type: Stdlib::Absolutepath
Provides the target for the rule, and is generally an internal only property. Use with caution.
Default value: $postgresql::server::pg_hba_conf_path
Data type: String
Manages pg_hba.conf without managing the entire PostgreSQL instance.
Default value: $postgresql::server::_version
This resource manages an individual rule that applies to the file defined in target.
The following parameters are available in the postgresql::server::pg_ident_rule
defined type:
Data type: String[1]
Sets the name of the user map that is used to refer to this mapping in pg_hba.conf.
Data type: String[1]
Specifies the operating system user name (the user name used to connect to the database).
Data type: String[1]
Specifies the user name of the database user. The system_username is mapped to this user name.
Data type: String[1]
Sets a longer description for this rule if required. This description is placed in the comments above the rule in pg_ident.conf.
Default value: 'none'
Data type: String[1]
Defines an order for placing the mapping in pg_ident.conf. Default value: 150.
Default value: '150'
Data type: Stdlib::Absolutepath
Provides the target for the rule and is generally an internal only property. Use with caution.
Default value: $postgresql::server::pg_ident_conf_path
Define for reassigning the ownership of objects within a database.
- Note This enables us to force the a particular ownership for objects within a database
The following parameters are available in the postgresql::server::reassign_owned_by
defined type:
Data type: String
Specifies the role or user who is the current owner of the objects in the specified db
Data type: String
Specifies the role or user who will be the new owner of these objects
Data type: String
Specifies the database to which the 'REASSIGN OWNED' will be applied
Data type: String
Specifies the OS user for running psql.
Default value: $postgresql::server::user
Data type: Stdlib::Port
Port to use when connecting.
Default value: $postgresql::server::port
Data type: Hash
Specifies a hash of environment variables used when connecting to a remote server.
Default value: $postgresql::server::default_connect_settings
Data type: String[1]
Sets the OS group to run psql
Default value: $postgresql::server::group
Data type: Stdlib::Absolutepath
Sets the path to psql command
Default value: $postgresql::server::psql_path
This resource manages the parameters that applies to the recovery.conf template.
- Note Allows you to create the content for recovery.conf. For more details see the usage example and the PostgreSQL documentation. Every parameter value is a string set in the template except recovery_target_inclusive, pause_at_recovery_target, standby_mode and recovery_min_apply_delay. A detailed description of all listed parameters can be found in the PostgreSQL documentation. Only the specified parameters are recognized in the template. The recovery.conf is only created if at least one parameter is set and manage_recovery_conf is set to true.
The following parameters are available in the postgresql::server::recovery
defined type:
restore_command
archive_cleanup_command
recovery_end_command
recovery_target_name
recovery_target_time
recovery_target_xid
recovery_target_inclusive
recovery_target
recovery_target_timeline
pause_at_recovery_target
standby_mode
primary_conninfo
primary_slot_name
trigger_file
recovery_min_apply_delay
target
Data type: Optional[String]
The shell command to execute to retrieve an archived segment of the WAL file series.
Default value: undef
Data type: Optional[String[1]]
This optional parameter specifies a shell command that will be executed at every restartpoint.
Default value: undef
Data type: Optional[String[1]]
This parameter specifies a shell command that will be executed once only at the end of recovery.
Default value: undef
Data type: Optional[String[1]]
This parameter specifies the named restore point (created with pg_create_restore_point()) to which recovery will proceed.
Default value: undef
Data type: Optional[String[1]]
This parameter specifies the time stamp up to which recovery will proceed.
Default value: undef
Data type: Optional[String[1]]
This parameter specifies the transaction ID up to which recovery will proceed.
Default value: undef
Data type: Optional[Boolean]
Specifies whether to stop just after the specified recovery target (true), or just before the recovery target (false).
Default value: undef
Data type: Optional[String[1]]
This parameter specifies that recovery should end as soon as a consistent state is reached, i.e. as early as possible.
Default value: undef
Data type: Optional[String[1]]
Specifies recovering into a particular timeline.
Default value: undef
Data type: Optional[Boolean]
Specifies whether recovery should pause when the recovery target is reached.
Default value: undef
Data type: Optional[String[1]]
Specifies whether to start the PostgreSQL server as a standby.
Default value: undef
Data type: Optional[String[1]]
Specifies a connection string to be used for the standby server to connect with the primary.
Default value: undef
Data type: Optional[String[1]]
Optionally specifies an existing replication slot to be used when connecting to the primary via streaming replication to control resource removal on the upstream node.
Default value: undef
Data type: Optional[String[1]]
Specifies a trigger file whose presence ends recovery in the standby.
Default value: undef
Data type: Optional[Integer]
This parameter allows you to delay recovery by a fixed period of time, measured in milliseconds if no unit is specified.
Default value: undef
Data type: Stdlib::Absolutepath
Provides the target for the rule, and is generally an internal only property. Use with caution.
Default value: $postgresql::server::recovery_conf_path
Define for creating a database role.
The following parameters are available in the postgresql::server::role
defined type:
update_password
password_hash
createdb
createrole
db
port
login
inherit
superuser
replication
connection_limit
username
connect_settings
ensure
psql_user
psql_group
psql_path
module_workdir
hash
salt
Data type: Boolean
If set to true, updates the password on changes. Set this to false to not modify the role's password after creation.
Default value: true
Data type: Variant[Boolean, String, Sensitive[String]]
Sets the hash to use during password creation.
Default value: false
Data type: Boolean
Specifies whether to grant the ability to create new databases with this role.
Default value: false
Data type: Boolean
Specifies whether to grant the ability to create new roles with this role.
Default value: false
Data type: String[1]
Database used to connect to.
Default value: $postgresql::server::default_database
Data type: Stdlib::Port
Port to use when connecting.
Default value: postgresql::default('port')
Data type: Boolean
Specifies whether to grant login capability for the new role.
Default value: true
Data type: Boolean
Specifies whether to grant inherit capability for the new role.
Default value: true
Data type: Boolean
Specifies whether to grant super user capability for the new role.
Default value: false
Data type: Boolean
Provides provides replication capabilities for this role if set to true.
Default value: false
Data type: String[1]
Specifies how many concurrent connections the role can make. Default value: '-1', meaning no limit.
Default value: '-1'
Data type: String[1]
Defines the username of the role to create.
Default value: $title
Data type: Hash
Specifies a hash of environment variables used when connecting to a remote server.
Default value: $postgresql::server::default_connect_settings
Data type: Enum['present', 'absent']
Specify whether to create or drop the role. Specifying 'present' creates the role. Specifying 'absent' drops the role.
Default value: 'present'
Data type: String[1]
Sets the OS user to run psql
Default value: $postgresql::server::user
Data type: String[1]
Sets the OS group to run psql
Default value: $postgresql::server::group
Data type: Stdlib::Absolutepath
Sets path to psql command
Default value: $postgresql::server::psql_path
Data type: String[1]
Specifies working directory under which the psql command should be executed. May need to specify if '/tmp' is on volume mounted with noexec option.
Default value: $postgresql::server::module_workdir
Data type: Optional[Enum['md5', 'scram-sha-256']]
Specify the hash method for pg password
Default value: undef
Data type: Optional[Variant[String[1], Integer]]
Specify the salt use for the scram-sha-256 encoding password (default username)
Default value: undef
Create a new schema.
- Note The database must exist and the PostgreSQL user should have enough privileges
postgresql::server::schema {'private':
db => 'template1',
}
The following parameters are available in the postgresql::server::schema
defined type:
Data type: String[1]
Required. Sets the name of the database in which to create this schema.
Default value: $postgresql::server::default_database
Data type: Optional[String[1]]
Sets the default owner of the schema.
Default value: undef
Data type: String[1]
Sets the name of the schema.
Default value: $title
Data type: Hash
Specifies a hash of environment variables used when connecting to a remote server.
Default value: $postgresql::server::default_connect_settings
Data type: Stdlib::Port
the post the postgresql instance is listening on.
Default value: $postgresql::server::port
Data type: String[1]
Sets the OS user to run psql
Default value: $postgresql::server::user
Data type: String[1]
Sets the OS group to run psql
Default value: $postgresql::server::group
Data type: Stdlib::Absolutepath
Sets path to psql command
Default value: $postgresql::server::psql_path
Data type: Stdlib::Absolutepath
Specifies working directory under which the psql command should be executed. May need to specify if '/tmp' is on volume mounted with noexec option.
Default value: $postgresql::server::module_workdir
This resource wraps the grant resource to manage table grants specifically.
The following parameters are available in the postgresql::server::table_grant
defined type:
Data type:
Enum['ALL', 'SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER', 'all', 'select', 'insert', 'update', 'delete',
'truncate', 'references', 'trigger']
Specifies comma-separated list of privileges to grant. Valid options: 'ALL', 'SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER'.
Data type: String[1]
Specifies the table to which you are granting access.
Data type: String[1]
Specifies which database the table is in.
Data type: String[1]
Specifies the role or user to whom you are granting access.
Data type: Optional[Enum['present', 'absent']]
Specifies whether to grant or revoke the privilege. Default is to grant the privilege.
Default value: undef
Data type: Optional[Stdlib::Port]
Port to use when connecting.
Default value: undef
Data type: Optional[String[1]]
Specifies the database to execute the grant against. This should not ordinarily be changed from the default.
Default value: undef
Data type: Optional[String[1]]
Specifies the OS user for running psql.
Default value: undef
Data type: Optional[Hash]
Specifies a hash of environment variables used when connecting to a remote server.
Default value: undef
Data type: Boolean
Create grant only if it doesn't exist.
Default value: false
This module creates tablespace.
The following parameters are available in the postgresql::server::tablespace
defined type:
Data type: String[1]
Specifies the path to locate this tablespace.
Data type: Boolean
Set to false if you have file{ $location: } already defined
Default value: true
Data type: Optional[String[1]]
Specifies the default owner of the tablespace.
Default value: undef
Data type: String[1]
Specifies the name of the tablespace.
Default value: $title
Data type: Hash
Specifies a hash of environment variables used when connecting to a remote server.
Default value: $postgresql::server::default_connect_settings
Data type: Stdlib::Port
the port of the postgresql instance that sould be used.
Default value: $postgresql::server::port
Data type: String[1]
Sets the OS user to run psql
Default value: $postgresql::server::user
Data type: String[1]
Sets the OS group to run psql
Default value: $postgresql::server::group
Data type: Stdlib::Absolutepath
Sets path to psql command
Default value: $postgresql::server::psql_path
Data type: String[1]
Specifies working directory under which the psql command should be executed. May need to specify if '/tmp' is on volume mounted with noexec option.
Default value: $postgresql::server::module_workdir
This type allows puppet to manage postgresql.conf parameters.
The following properties are available in the postgresql_conf
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The path to postgresql.conf
The value to set for this parameter.
The following parameters are available in the postgresql_conf
type.
Valid values: %r{^[\w.]+$}
namevar
The postgresql parameter name to manage.
The specific backend to use for this postgresql_conf
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
Verify that a connection can be successfully established between a node and the PostgreSQL server. Its primary use is as a precondition to prevent configuration changes from being applied if the PostgreSQL server cannot be reached, but it could potentially be used for other purposes such as monitoring.
The following properties are available in the postgresql_conn_validator
type.
Valid values: present
, absent
Ensure connection validation
Default value: present
The following parameters are available in the postgresql_conn_validator
type.
command
connect_settings
db_name
db_password
db_username
host
name
port
provider
psql_path
run_as
sleep
tries
Command to run against target database.
Default value: SELECT 1
Hash of environment variables for connection to a db.
The name of the database you are trying to validate a connection with.
The password required to access the target PostgreSQL database.
A user that has access to the target PostgreSQL database.
The DNS name or IP address of the server where PostgreSQL should be running.
namevar
An arbitrary name used as the identity of the resource.
The port that the PostgreSQL server should be listening on.
The specific backend to use for this postgresql_conn_validator
resource. You will seldom need to specify this ---
Puppet will usually discover the appropriate provider for your platform.
Path to the psql command.
System user that will run the psql command.
The length of sleep time between connection tries.
Default value: 2
The number of tries to validate the connection to the target PostgreSQL database.
Default value: 10
An arbitrary tag for your own reference; the name of the message.
The following properties are available in the postgresql_psql
type.
The SQL command to execute via psql.
The following parameters are available in the postgresql_psql
type.
connect_settings
cwd
db
environment
instance
name
onlyif
port
provider
psql_group
psql_path
psql_user
refreshonly
search_path
sensitive
unless
Connection settings that will be used when connecting to postgres
The working directory under which the psql command should be executed.
Default value: /tmp
The name of the database to execute the SQL command against, this overrides any PGDATABASE value in connect_settings
Any additional environment variables you want to set for a SQL command. Multiple environment variables should be specified as an array.
The postgresql instance under which the psql command should be executed.
Default value: main
namevar
An arbitrary tag for your own reference; the name of the message.
An optional SQL command to execute prior to the main :command; this is generally intended to be used for idempotency, to check for the existence of an object in the database to determine whether or not the main SQL command needs to be executed at all.
The port of the database server to execute the SQL command against, this overrides any PGPORT value in connect_settings.
The specific backend to use for this postgresql_psql
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
The system user group account under which the psql command should be executed.
Default value: postgres
The path to psql executable.
Default value: psql
The system user account under which the psql command should be executed.
Default value: postgres
Valid values: true
, false
If 'true', then the SQL will only be executed via a notify/subscribe event.
Default value: false
The schema search path to use when executing the SQL command
Valid values: true
, false
If 'true', then the executed command will not be echoed into the log. Use this to protect sensitive information passing through.
Default value: false
An optional SQL command to execute prior to the main :command; this is generally intended to be used for idempotency, to check for the existence of an object in the database to determine whether or not the main SQL command needs to be executed at all.'
This type allows to create and destroy replication slots to register warm standby replication on a Postgresql primary server.
The following properties are available in the postgresql_replication_slot
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the postgresql_replication_slot
type.
Valid values: %r{^[a-z0-9_]+$}
namevar
The name of the slot to create. Must be a valid replication slot name.
The specific backend to use for this postgresql_replication_slot
resource. You will seldom need to specify this ---
Puppet will usually discover the appropriate provider for your platform.
Type: Puppet Language
This function pull default values from the params
class or globals
class if the value is not present in params
.
postgresql::default('variable')
The postgresql::default function.
Returns: Any
postgresql::default('variable')
Data type: String
Type: Ruby 4.x API
This function escapes a string using Dollar Quoting using a randomly generated tag if required.
The postgresql::postgresql_escape function.
Returns: String
A Dollar Quoted
string
Data type: String[1]
The unescaped string you want to escape using dollar quoting
Type: Ruby 4.x API
This function returns the postgresql password hash from the clear text username / password
postgresql::postgresql_password(Variant[String[1], Integer] $username, Variant[String[1], Sensitive[String[1]], Integer] $password, Optional[Boolean] $sensitive, Optional[Optional[Postgresql::Pg_password_encryption]] $hash, Optional[Optional[Variant[String[1], Integer]]] $salt)
The postgresql::postgresql_password function.
Returns: Variant[String, Sensitive[String]]
The postgresql password hash from the clear text username / password.
Data type: Variant[String[1], Integer]
The clear text username
Data type: Variant[String[1], Sensitive[String[1]], Integer]
The clear text password
Data type: Optional[Boolean]
If the Postgresql-Passwordhash should be of Datatype Sensitive[String]
Data type: Optional[Optional[Postgresql::Pg_password_encryption]]
Set type for password hash
Default value comes from postgresql::params::password_encryption
and changes based on the postgresql::globals::version
.
Data type: Optional[Optional[Variant[String[1], Integer]]]
Use a specific salt value for scram-sha-256, default is username
Type: Ruby 4.x API
This function exists for usage of a role password that is a deferred function
The postgresql::prepend_sql_password function.
Returns: String
Data type: String
The clear text password
Type: Ruby 4.x API
DEPRECATED. Use the namespaced function postgresql::postgresql_escape
instead.
The postgresql_escape function.
Returns: Any
Data type: Any
Type: Ruby 4.x API
DEPRECATED. Use the namespaced function postgresql::postgresql_password
instead.
The postgresql_password function.
Returns: Any
Data type: Any
type for all parameters in the postgresql::server::hba_rule defined resource
- See also
Alias of
Struct[{
Optional[description] => String,
type => Postgresql::Pg_hba_rule_type,
database => String,
user => String,
Optional[address] => Optional[Postgresql::Pg_hba_rule_address],
auth_method => String,
Optional[auth_option] => Optional[String],
Optional[order] => Variant[String,Integer],
Optional[target] => Stdlib::Absolutepath,
Optional[postgresql_version] => String,
}]
Supported address types
Alias of Variant[Stdlib::IP::Address::V4::CIDR, Stdlib::IP::Address::V6::CIDR, Stdlib::Fqdn, Enum['all', 'samehost', 'samenet'], Pattern[/^\.(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$/]]
enum for all different types for the pg_hba_conf
Alias of Enum['local', 'host', 'hostssl', 'hostnossl', 'hostgssenc', 'hostnogssenc']
validates a hash of entries for postgresql::server::pg_hab_conf
- See also
Alias of Hash[String[1], Postgresql::Pg_hba_rule]
the supported password_encryption
Alias of Enum['md5', 'scram-sha-256']
Allows you to execute arbitary SQL
Supports noop? false
Data type: Optional[String[1]]
Database to connect to
Data type: Optional[String[1]]
Hostname to connect to
Data type: Optional[String[1]]
The password
Data type: Optional[String[1]]
The port
Data type: String[1]
The SQL you want to execute
Data type: Optional[String[1]]
The user