R
R
root0072014-10-05 18:30:18
Puppet
root007, 2014-10-05 18:30:18

How can you redefine a variable when inheriting a class in puppet?

I want to write the following construction:
class classA {
$a = "AAA"
notify { $a : }
}
class classB inherits classA {
$a = "BBB"
}
Calling
class { classB : } from the node, I
expect to see BBB in notifications, but pappet stubbornly shoves
Notice: AAA
Notice: /Stage[main]/Classa/Notify[AAA]/message: defined 'message' as 'AAA'
How to get BBB as output?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
root007, 2014-10-06
@root007

solution:
class classB inherits classA {
$a = "BBB"
notify { [AAA] : message => $a }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question