Skip to content

Commit 957588c

Browse files
add $manage_selinux as a parameter, keep default, simpler condition
1 parent 0588fe7 commit 957588c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

REFERENCE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2429,6 +2429,7 @@ The following parameters are available in the `postgresql::server::instance::con
24292429
* [`password_encryption`](#-postgresql--server--instance--config--password_encryption)
24302430
* [`pg_hba_auth_password_encryption`](#-postgresql--server--instance--config--pg_hba_auth_password_encryption)
24312431
* [`extra_systemd_config`](#-postgresql--server--instance--config--extra_systemd_config)
2432+
* [`manage_selinux`](#-postgresql--server--instance--config--manage_selinux)
24322433

24332434
##### <a name="-postgresql--server--instance--config--ip_mask_deny_postgres_user"></a>`ip_mask_deny_postgres_user`
24342435

@@ -2667,6 +2668,14 @@ Adds extra config to systemd config file, can for instance be used to add extra
26672668

26682669
Default value: `$postgresql::server::extra_systemd_config`
26692670

2671+
##### <a name="-postgresql--server--instance--config--manage_selinux"></a>`manage_selinux`
2672+
2673+
Data type: `Boolean`
2674+
2675+
Specifies whether or not manage the conf file for selinux.
2676+
2677+
Default value: `$postgresql::server::manage_selinux`
2678+
26702679
### <a name="postgresql--server--instance--initdb"></a>`postgresql::server::instance::initdb`
26712680

26722681
Manages initdb feature for a postgresql::server instance

manifests/server/instance/config.pp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
# this value is usefull if you want to start enforcing scram-sha-256, but give users transition time.
4848
# @param extra_systemd_config
4949
# Adds extra config to systemd config file, can for instance be used to add extra openfiles. This can be a multi line string
50+
# @param manage_selinux Specifies whether or not manage the conf file for selinux.
5051
define postgresql::server::instance::config (
5152
String[1] $ip_mask_deny_postgres_user = $postgresql::server::ip_mask_deny_postgres_user,
5253
String[1] $ip_mask_allow_all_users = $postgresql::server::ip_mask_allow_all_users,
@@ -76,6 +77,7 @@
7677
Postgresql::Pg_password_encryption $password_encryption = $postgresql::server::password_encryption,
7778
Optional[Postgresql::Pg_password_encryption] $pg_hba_auth_password_encryption = $postgresql::server::pg_hba_auth_password_encryption,
7879
Optional[String] $extra_systemd_config = $postgresql::server::extra_systemd_config,
80+
Boolean $manage_selinux = $postgresql::server::manage_selinux,
7981
) {
8082
$_pg_hba_auth_password_encryption = pick($pg_hba_auth_password_encryption,$password_encryption)
8183

@@ -164,7 +166,7 @@
164166
}
165167

166168
# ensure that SELinux has a proper label for the port defined
167-
if $postgresql::server::manage_selinux == true and $facts['os']['selinux']['enabled'] == true {
169+
if $manage_selinux and $facts['os']['selinux']['enabled'] {
168170
case $facts['os']['family'] {
169171
'RedHat', 'Linux': {
170172
if $facts['os']['name'] == 'Amazon' {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy