Skip to content

Commit 6c53f8b

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 4e2246d commit 6c53f8b

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
@@ -131,6 +131,8 @@
131131
ensure => $version,
132132
install_options => $package_options,
133133
name => $use_java_package_name,
134+
before => Class['java::config'],
134135
}
135-
-> class { 'java::config': }
136+
137+
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.
136138
}

0 commit comments

Comments
 (0)