Skip to content

Commit dcf0b9e

Browse files
author
Roman Plessl
committed
changed a bit API of puppet class after rolling out the setup to production
1 parent 67d865d commit dcf0b9e

4 files changed

Lines changed: 20 additions & 20 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ These configuration parameter can be set:
2525
$reporting_disabled = false
2626
2727
# [meta]
28-
$hostname = 'localhost' or 192.168.0.1'
29-
$peers = 'none' or ['192.168.0.2', '192.168.0.3']
28+
$meta_hostname = "localhost" or "192.168.0.1"
29+
$meta_peers = undef or ["192.168.0.1:8088", "192.168.0.2:8088", "192.168.0.3:8088"]
3030
3131
# [retention]
32-
$replication = 'none' or 3
32+
$retention_replication = undef or 3
3333
```
3434

3535
## Testing

manifests/config.pp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@
2424
ini_setting { 'meta_hostname':
2525
section => 'meta',
2626
setting => 'hostname',
27-
value => "\"${influxdb::hostname}\"",
27+
value => "\"${influxdb::meta_hostname}\"",
2828
}
2929

30-
if $influxdb::peers != 'none' {
30+
if $influxdb::meta_peers != undef {
3131
ini_setting { 'meta_peers':
3232
section => 'meta',
3333
setting => 'peers',
34-
value => '\"${influxdb::peers}\"',
34+
value => $influxdb::meta_peers,
3535
}
3636
}
3737

38-
if $influxdb::replication != 'none' {
38+
if $influxdb::retention_replication != undef {
3939
# [retention]
4040
ini_setting { 'retention_replication':
4141
section => 'retention',
4242
setting => 'replication',
43-
value => $influxdb::replication,
43+
value => $influxdb::retention_replication,
4444
}
4545
}
4646

manifests/init.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
$install_from_repository = $influxdb::params::install_from_repository,
66
$config_file = $influxdb::params::config_file,
77
$reporting_disabled = $influxdb::params::reporting_disabled,
8-
$hostname = $influxdb::params::hostname,
9-
$peers = $influxdb::params::peers,
10-
$replication = $influxdb::params::replication,
8+
$meta_hostname = $influxdb::params::meta_hostname,
9+
$meta_peers = $influxdb::params::meta_peers,
10+
$retention_replication = $influxdb::params::retention_replication,
1111
) inherits influxdb::params {
1212

1313
class { 'influxdb::install': } ->

manifests/params.pp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# == Class: influxdb::params
22
# DO NOT CALL DIRECTLY
33
class influxdb::params {
4-
$ensure = 'installed'
5-
$version = '0.9.1'
6-
$install_from_repository = true
7-
$config_file = '/etc/opt/influxdb/influxdb.conf'
4+
$ensure = 'installed'
5+
$version = '0.9.1'
6+
$install_from_repository = true
7+
$config_file = '/etc/opt/influxdb/influxdb.conf'
88

9-
# general section of config.toml
10-
$reporting_disabled = false
9+
# general section of influxdb.conf
10+
$reporting_disabled = false
1111

1212
# [meta]
13-
$hostname = 'localhost'
14-
$peers = 'none'
13+
$meta_hostname = 'localhost'
14+
$meta_peers = undef
1515

1616
# [retention]
17-
$replication = 'none'
17+
$retention_replication = undef
1818
}

0 commit comments

Comments
 (0)