Skip to content

Commit 5aa7e01

Browse files
committed
Fix containment of java::config
In 0dcd91b the `anchor` pattern was removed, but not replaced with anything and thus broke the containment of `java::config`. This restores the original behaviour by using `contain`. As noted in the code comment, the declaration remains in the same place in the code as evaluation order is important. `java::config` is a private class and relies on variables from the base class's scope having been set before it is evaluated.
1 parent e7bd753 commit 5aa7e01

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

manifests/init.pp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@
135135
ensure => $version,
136136
install_options => $package_options,
137137
name => $use_java_package_name,
138+
before => Class['java::config'],
138139
}
139-
-> class { 'java::config': }
140+
141+
contain java::config # NB evalutation order is important here as the config class relies on variables from the base class having been set before it's evaluated.
140142
}

0 commit comments

Comments
 (0)