Skip to content

Commit 2f5fa95

Browse files
committed
- take Care of the other sensitive rendered Templates also
1 parent fcf3799 commit 2f5fa95

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

manifests/proxy.pp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,19 @@
489489
}
490490

491491
# Configuring the zabbix-proxy configuration file
492+
$content = template('zabbix/zabbix_proxy.conf.erb')
492493
file { $proxy_configfile_path:
493494
ensure => file,
494495
owner => 'zabbix',
495496
group => 'zabbix',
496497
mode => '0644',
497498
require => Package["zabbix-proxy-${db}"],
498499
replace => true,
499-
content => template('zabbix/zabbix_proxy.conf.erb'),
500+
content => if $database_password =~ Sensitive {
501+
Sensitive($content)
502+
} else {
503+
$content
504+
},
500505
}
501506

502507
# Include dir for specific zabbix-proxy checks.

manifests/server.pp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,14 +444,19 @@
444444
}
445445

446446
# Configuring the zabbix-server configuration file
447+
$content = template('zabbix/zabbix_server.conf.erb')
447448
file { $server_configfile_path:
448449
ensure => file,
449450
owner => $server_config_owner,
450451
group => $server_config_group,
451452
mode => '0640',
452453
require => Package["zabbix-server-${db}"],
453454
replace => true,
454-
content => template('zabbix/zabbix_server.conf.erb'),
455+
content => if $database_password =~ Sensitive {
456+
Sensitive($content)
457+
} else {
458+
$content
459+
},
455460
}
456461

457462
# Include dir for specific zabbix-server checks.

manifests/web.pp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,16 +259,17 @@
259259
}
260260

261261
# Webinterface config file
262+
$content = template('zabbix/web/zabbix.conf.php.erb')
262263
file { '/etc/zabbix/web/zabbix.conf.php':
263264
ensure => file,
264265
owner => $web_config_owner,
265266
group => $web_config_group,
266267
mode => '0640',
267268
replace => true,
268269
content => if $database_password =~ Sensitive {
269-
Sensitive(template('zabbix/web/zabbix.conf.php.erb'))
270+
Sensitive($content)
270271
} else {
271-
template('zabbix/web/zabbix.conf.php.erb')
272+
$content
272273
},
273274
}
274275

0 commit comments

Comments
 (0)