3
0

Merge branch 'jenkins-build-35' into 'master'

Auto-merge for build 35

See merge request puppet/postgresql_cd!31
This commit is contained in:
2025-10-30 13:38:19 +00:00
9 changed files with 38 additions and 55 deletions

View File

@@ -18,16 +18,19 @@ PostgreSQL is a powerful modern open source SQL database server.
Installation
* install binaries as per given parameters for major and minor version
* install binaries
* initialize the database cluster
Configuration
* manage directory structure including file system permissions and selinux context
* manage service status
* manage single line entries in pg_hba via define (optional)
* manage roles via define (optional)
* manage databases via define (optional)
Optional:
* manage single line entries in pg_hba via define
* manage roles and databases via define (set `$pl_manage_content` to true)
## Repo Documentation

View File

@@ -78,7 +78,7 @@
<p>Installation</p>
<ul><li>
<p>install binaries as per given parameters for major and minor version</p>
<p>install binaries</p>
</li><li>
<p>initialize the database cluster</p>
</li></ul>
@@ -88,12 +88,13 @@
<p>manage directory structure including file system permissions and selinux context</p>
</li><li>
<p>manage service status</p>
</li></ul>
<p>Optional:</p>
<ul><li>
<p>manage single line entries in pg_hba via define</p>
</li><li>
<p>manage single line entries in pg_hba via define (optional)</p>
</li><li>
<p>manage roles via define (optional)</p>
</li><li>
<p>manage databases via define (optional)</p>
<p>manage roles and databases via define (set <code>$pl_manage_content</code> to true)</p>
</li></ul>
<h2 id="label-Repo+Documentation">Repo Documentation</h2>

View File

@@ -78,7 +78,7 @@
<p>Installation</p>
<ul><li>
<p>install binaries as per given parameters for major and minor version</p>
<p>install binaries</p>
</li><li>
<p>initialize the database cluster</p>
</li></ul>
@@ -88,12 +88,13 @@
<p>manage directory structure including file system permissions and selinux context</p>
</li><li>
<p>manage service status</p>
</li></ul>
<p>Optional:</p>
<ul><li>
<p>manage single line entries in pg_hba via define</p>
</li><li>
<p>manage single line entries in pg_hba via define (optional)</p>
</li><li>
<p>manage roles via define (optional)</p>
</li><li>
<p>manage databases via define (optional)</p>
<p>manage roles and databases via define (set <code>$pl_manage_content</code> to true)</p>
</li></ul>
<h2 id="label-Repo+Documentation">Repo Documentation</h2>

View File

@@ -384,7 +384,7 @@
<li>
<span class='name'>pl_manage_roles</span>
<span class='name'>pl_manage_content</span>
<span class='type'>(<tt>Boolean</tt>)</span>
@@ -395,25 +395,7 @@
&mdash;
<div class='inline'>
<p>Whether to manage roles</p>
</div>
</li>
<li>
<span class='name'>pl_manage_databases</span>
<span class='type'>(<tt>Boolean</tt>)</span>
<em class="default">(defaults to: <tt>true</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether to manage databases</p>
<p>whether to manage roles and databases</p>
</div>
</li>
@@ -429,6 +411,7 @@
<pre class="lines">
24
25
26
27
@@ -472,12 +455,10 @@
65
66
67
68
69
70</pre>
68</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 25</span>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 24</span>
class postgresql_cd::params (
@@ -502,8 +483,7 @@ class postgresql_cd::params (
String $pl_server_crt = &#39;server.crt&#39;,
String $pl_server_key = &#39;server.key&#39;,
String $pl_ca_crt = &#39;root.crt&#39;,
Boolean $pl_manage_roles = true,
Boolean $pl_manage_databases = true,
Boolean $pl_manage_content = true,
) {
$fqdn = $facts[&#39;networking&#39;][&#39;fqdn&#39;]

View File

@@ -218,9 +218,9 @@ define postgresql_cd::server::databases::db_df (
Optional[String] $pl_db_action = undef,
String $pl_db_extension = &#39;pg_trgm&#39;,
) {
$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
if $pl_db_action == &#39;CREATE DATABASE&#39; {

View File

@@ -209,9 +209,9 @@ define postgresql_cd::server::roles::role_df (
String $pl_role_status = &#39;CREATE ROLE&#39;,
) {
$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
exec { &quot;role_${name}&quot;:

View File

@@ -1,6 +1,7 @@
## postgresql_cd::params.pp
# Module name: postgresql_cd
# 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
# system will be configured as client
# @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_key the name of the server key
# @param [String] pl_ca_crt the name of the CA crt
# @param [Boolean] pl_manage_roles Whether to manage roles
# @param [Boolean] pl_manage_databases Whether to manage databases
# @summary Class contains all parameters for the postgresql_cd module.
# @param [Boolean] pl_manage_content whether to manage roles and databases
##############################################################################
class postgresql_cd::params (
@@ -45,8 +44,7 @@ class postgresql_cd::params (
String $pl_server_crt = 'server.crt',
String $pl_server_key = 'server.key',
String $pl_ca_crt = 'root.crt',
Boolean $pl_manage_roles = true,
Boolean $pl_manage_databases = true,
Boolean $pl_manage_content = true,
) {
$fqdn = $facts['networking']['fqdn']

View File

@@ -17,9 +17,9 @@ define postgresql_cd::server::databases::db_df (
Optional[String] $pl_db_action = undef,
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
if $pl_db_action == 'CREATE DATABASE' {

View File

@@ -17,9 +17,9 @@ define postgresql_cd::server::roles::role_df (
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
exec { "role_${name}":