Skip to content

Commit b70d4f4

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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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+
Optional[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)