Actually you don't have to inherit, you can (and should) just have something like:
class dk_oracle_java::install {
include dk_oracle_java
package { 'oracle-java8-installer':
ensure => $::dk_oracle_java::version,
}
}
The above include is not necessary if you are already incuding the dk_oracle_java class somewhere else, just be sure that the class is included before you refer to its variables.
The only currently acceptable reasons to use class inheritance is:
- when using the params patterm (main class of a module inheriting the params one), which is actully now totally unnecessary and can be replaced by data in module.
- when for whatever reason you have to change some parameters of a resource already declared in the inherited class, and also for this case you can have other workarounds.
Anyway inheritance still works, and so if it works for you it's ok.