postgresql_userconfig
Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.0 < 8.0.0
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'cirrax-postgresql_userconfig', '0.0.3'
Learn more about managing modules with a PuppetfileDocumentation
postgresql_userconfig puppet module
Table of Contents
Overview
The purpose of this module is to configure users configuration for postgres. Currently it supports to generete ~/.pgpass files (see [https://www.postgresql.org/docs/current/libpq-pgpass.html])
Usage
All available options for classes and defines are documented in the header of the class/define files. See there for any details. A generated documentation is also available in the REFERENCE.md file.
Contributing
Please report bugs and feature request using GitHub issue tracker.
For pull requests, it is very much appreciated to check your Puppet manifest with puppet-lint and the available spec tests in order to follow the recommended Puppet style guidelines from the Puppet Labs style guide.
Authors
This module is mainly written by Cirrax GmbH.
See the list of contributors for a list of all contributors.
Reference
Table of Contents
Classes
postgresql_userconfig
: main class to generate postgres passfiles
Defined types
postgresql_userconfig::passfile
: initialize a passfilepostgresql_userconfig::passfile_entry
: add an entry (line) in one ore more pgpass files
Classes
postgresql_userconfig
main class to generate postgres passfiles
Examples
include postgresql_passfile
Parameters
The following parameters are available in the postgresql_userconfig
class:
passfiles
Data type: Hash
Hash to create the files, see postgresql_userconfig::passfile for keys to use. in hiera this parameter is hash merged
Default value: {}
passfiles_defaults
Data type: Hash
use this if you want any defaults changed for the files.
Default value: {}
passfile_entries
Data type: Hash
Hash to create file entries, see postgresql_userconfig::passfile_entry for keys to use. in hiera this parameter is hash merged
Default value: {}
passfile_entries_defaults
Data type: Hash
use this if you want any defaults changed for the entries.
Default value: {}
Defined types
postgresql_userconfig::passfile
initialize a passfile
Examples
postgresql_userconfig::passfile { 'namevar': }
Parameters
The following parameters are available in the postgresql_userconfig::passfile
defined type:
filepath
Data type: String
the path to use for the file to write, normaly the homedirectory of the user. but puppet cannot (yet ?) detect your'e home, so we make this a parameter
filename
Data type: String
filename to write
Default value: '.pgpass'
owner
Data type: String
owner of the file (defaults to the title)
Default value: $title
group
Data type: Optional[String]
group of the file.
Default value: undef
mode
Data type: String
the mode of the file
Default value: '0600'
postgresql_userconfig::passfile_entry
lets you define a line entry in the pgpass file for simplification, you can define multiple targets.
Examples
postgresql_userconfig::passfile_entry { 'namevar': }
Parameters
The following parameters are available in the postgresql_userconfig::passfile_entry
defined type:
targets
Data type: Variant[String, Array]
the title of the target passfile. this can also be an array, if you like to add a database to several pgpass files.
Default value: []
comment
Data type: Optional[String]
a simple comment to add to the file prior to the entry
Default value: undef
hostname
Data type: String
the hostname entry
Default value: '*'
port
Data type: String
the port entry
Default value: '5432'
database
Data type: String
the database entry
Default value: $title
username
Data type: String
the username entry
Default value: '*'
password
Data type: Optional[String]
the password entry
Default value: undef
order
Data type: String
the order in the file
Default value: '100'
Dependencies
- puppetlabs/concat (>= 6.0.0 < 8.0.0)
- puppetlabs/stdlib (>= 5.0.0 < 9.0.0)