In the setup I'm working the variable $var1 is declared in several places. However I'm not sure which line is last applied. The structure is as follows.
The puppet module, module1, contains a vars.pp class which is inherited by its init.pp manifest. In the vars.pp manifest var1 is declared as "value-vars".
#vars.pp
$var1 = "value-vars"
This module is applied to any node that matches a certain regex which is defined in the nodes.pp.
#nodes.pp
node "/nodepattern/" inherits base {
require module1
}
nodes.pp inherits from base.pp which declares var1 as "value-base".
#base.pp
$var1 = "value-base"
Now when the module is applied to a certain node, what value would var1 contain?
Is it "value-vars" because node block is applied before the class?
UPDATE
├── puppet3
│ ├──**manifests**
│ │ └───**nodes**
│ │ └──base.pp (node "base", $var1 = "value-base")
│ ├──nodes.pp (various nodes inheriting base node, contains module1 node)
│ ├──**modules**
│ │ ├──**module1**
│ │ │ ├──**manifests**
│ │ ├──vars.pp (class "vars", $var1 = "value-vars")
│ │ ├──init.pp (class "module1", inherits vars class)
notify {"value: ${var1}":}to show the value when testing withpuppet agent -tornotice("value: ${var1}")to add the message to master's log - webNeat