Skip to content

Commit 6e651cf

Browse files
committed
allow admin section to be conditional
1 parent 8daecf4 commit 6e651cf

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

manifests/config.pp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# == Class: influxdb::config
22
# More information on these settings available at: http://influxdb.org/docs/configuration.html
33
class influxdb::config {
4+
$admin_presence = $admin_port ? {
5+
"" => absent,
6+
undef => absent,
7+
default => present,
8+
}
9+
410
ini_setting { 'hostname':
511
section => '',
612
setting => 'hostname',
@@ -28,12 +34,14 @@
2834

2935
# [admin]
3036
ini_setting { 'admin_port':
37+
ensure => $admin_presence,
3138
section => 'admin',
3239
setting => 'port',
3340
value => $influxdb::admin_port,
3441
}
3542

3643
ini_setting { 'admin_assets':
44+
ensure => $admin_presence,
3745
section => 'admin',
3846
setting => 'assets',
3947
value => "\"${influxdb::admin_assets}\"",

0 commit comments

Comments
 (0)