William Myers
11/12/2022, 1:10 AMWilliam Myers
11/12/2022, 1:10 AMYury Bushmelev
11/12/2022, 5:08 AMWilliam Myers
11/12/2022, 7:14 PMSlackbot
11/12/2022, 11:13 PMWilliam Myers
11/12/2022, 11:15 PMWilliam Myers
11/13/2022, 4:38 AMWilliam Myers
11/13/2022, 4:44 AMWilliam Myers
11/13/2022, 4:45 AMWilliam Myers
11/13/2022, 10:16 PMSlackbot
11/14/2022, 3:26 AMsh6624gsj8
11/14/2022, 8:37 AMjavaopts.pp which would only add specific java options to my file when a list of IPs is passed
class my_cassandra::javaopts (
$replace_dead_node,
$config_path = $my_cassandra::config_path
) {
if !empty($replace_dead_node) {
file_line { 'java-replace-dead-node':
path => "${config_path}/cassandra-env.sh",
line => "JVM_OPTS=\"\$JVM_OPTS -Dcassandra.replace_address_first_boot=${$replace_dead_node}\"",
match => 'JVM_OPTS="\$JVM_OPTS -Dcassandra.replace_address_first_boot=.*',
append_on_no_match => true,
}
}
}
and in my init.pp I have initialised my variable as :-
Array[String] $replace_dead_node = $my_cassandra::replace_dead_node,
and I am trying to lookup the value from hiera (default.yaml ) as :-
my_cassandra::replace_dead_node:
- 10.111.120.156
However , I get the below error as :-
Class[My_cassandra]: parameter 'replace_dead_node' expects an Array value, got String
Could someone help me clarify what am I missing ?Slackbot
11/14/2022, 8:39 AMsh6624gsj8
11/14/2022, 8:41 AMsh6624gsj8
11/14/2022, 9:48 AMGanaparthi Nikhil
11/14/2022, 10:43 AMrnelson0
11/14/2022, 1:09 PMWilliam Myers
11/14/2022, 5:22 PMWilliam Myers
11/14/2022, 6:20 PMWilliam Myers
11/14/2022, 6:20 PMWilliam Myers
11/14/2022, 6:21 PMYorokobi
11/14/2022, 6:22 PM/var/tmpWilliam Myers
11/14/2022, 6:23 PMWilliam Myers
11/14/2022, 6:23 PMYorokobi
11/14/2022, 6:24 PMWilliam Myers
11/14/2022, 6:24 PMWilliam Myers
11/14/2022, 6:25 PMYorokobi
11/14/2022, 6:26 PMWilliam Myers
11/14/2022, 6:26 PMYorokobi
11/14/2022, 6:26 PM