switched parameter - https://gitlab.confdroid.com/internal/confdroid_management/-/issues/279
This commit is contained in:
11
README.md
11
README.md
@@ -18,16 +18,19 @@ PostgreSQL is a powerful modern open source SQL database server.
|
|||||||
|
|
||||||
Installation
|
Installation
|
||||||
|
|
||||||
* install binaries as per given parameters for major and minor version
|
* install binaries
|
||||||
* initialize the database cluster
|
* initialize the database cluster
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
|
|
||||||
* manage directory structure including file system permissions and selinux context
|
* manage directory structure including file system permissions and selinux context
|
||||||
* manage service status
|
* manage service status
|
||||||
* manage single line entries in pg_hba via define (optional)
|
|
||||||
* manage roles via define (optional)
|
Optional:
|
||||||
* manage databases via define (optional)
|
|
||||||
|
* manage single line entries in pg_hba via define
|
||||||
|
* manage roles and databases via define (set `$pl_manage_content` to true)
|
||||||
|
|
||||||
|
|
||||||
## Repo Documentation
|
## Repo Documentation
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
## postgresql_cd::params.pp
|
## postgresql_cd::params.pp
|
||||||
# Module name: postgresql_cd
|
# Module name: postgresql_cd
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||||
|
# @summary Class contains all parameters for the postgresql_cd module.
|
||||||
# @param [String] pl_server_fqdn the fqdn of the postgresql server. Any other
|
# @param [String] pl_server_fqdn the fqdn of the postgresql server. Any other
|
||||||
# system will be configured as client
|
# system will be configured as client
|
||||||
# @param [Array] reqpackages_server the packages for the server
|
# @param [Array] reqpackages_server the packages for the server
|
||||||
@@ -18,9 +19,7 @@
|
|||||||
# @param [String] pl_server_crt the name of the server cert
|
# @param [String] pl_server_crt the name of the server cert
|
||||||
# @param [String] pl_server_key the name of the server key
|
# @param [String] pl_server_key the name of the server key
|
||||||
# @param [String] pl_ca_crt the name of the CA crt
|
# @param [String] pl_ca_crt the name of the CA crt
|
||||||
# @param [Boolean] pl_manage_roles Whether to manage roles
|
# @param [Boolean] pl_manage_content whether to manage roles and databases
|
||||||
# @param [Boolean] pl_manage_databases Whether to manage databases
|
|
||||||
# @summary Class contains all parameters for the postgresql_cd module.
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class postgresql_cd::params (
|
class postgresql_cd::params (
|
||||||
|
|
||||||
@@ -45,8 +44,7 @@ class postgresql_cd::params (
|
|||||||
String $pl_server_crt = 'server.crt',
|
String $pl_server_crt = 'server.crt',
|
||||||
String $pl_server_key = 'server.key',
|
String $pl_server_key = 'server.key',
|
||||||
String $pl_ca_crt = 'root.crt',
|
String $pl_ca_crt = 'root.crt',
|
||||||
Boolean $pl_manage_roles = true,
|
Boolean $pl_manage_content = true,
|
||||||
Boolean $pl_manage_databases = true,
|
|
||||||
|
|
||||||
) {
|
) {
|
||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ define postgresql_cd::server::databases::db_df (
|
|||||||
Optional[String] $pl_db_action = undef,
|
Optional[String] $pl_db_action = undef,
|
||||||
String $pl_db_extension = 'pg_trgm',
|
String $pl_db_extension = 'pg_trgm',
|
||||||
) {
|
) {
|
||||||
$pl_manage_databases = $postgresql_cd::params::pl_manage_databases
|
$pl_manage_content = $postgresql_cd::params::pl_manage_content
|
||||||
|
|
||||||
if $pl_manage_databases == true {
|
if $pl_manage_content == true {
|
||||||
# create databases
|
# create databases
|
||||||
|
|
||||||
if $pl_db_action == 'CREATE DATABASE' {
|
if $pl_db_action == 'CREATE DATABASE' {
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ define postgresql_cd::server::roles::role_df (
|
|||||||
String $pl_role_status = 'CREATE ROLE',
|
String $pl_role_status = 'CREATE ROLE',
|
||||||
|
|
||||||
) {
|
) {
|
||||||
$pl_manage_roles = $postgresql_cd::params::pl_manage_roles
|
$pl_manage_content = $postgresql_cd::params::pl_manage_content
|
||||||
|
|
||||||
if $pl_manage_roles == true {
|
if $pl_manage_content == true {
|
||||||
# create the role
|
# create the role
|
||||||
|
|
||||||
exec { "role_${name}":
|
exec { "role_${name}":
|
||||||
|
|||||||
Reference in New Issue
Block a user