I spotted it, seems obvious now:

class dk_oracle_java::install inherits dk_oracle_java {
  package { 'oracle-java8-installer':
    ensure => $version,
  }
}

On Sunday, May 6, 2018 at 2:55:40 PM UTC-7, Joaquin Menchaca wrote:
>
> I am sleuthing for this and haven't found anything obvious yet.
>
> I have an init.pp that looks like this
>
> class dk_oracle_java (
>   $docroot     = $::dk_oracle_java::params::docroot,
>   Optional[String] $local_repo  = $::dk_oracle_java::params::local_repo,
>   $version     = $::dk_oracle_java::params::version,
>   $javas       = $::dk_oracle_java::params::javas,
> ) inherits ::dk_oracle_java::params {
>     include ::dk_oracle_java::install
> }
>
> And I want to access the $version in my install.pp, but I am not sure how 
> to do this.
>
> class dk_oracle_java::install {
>   package { 'oracle-java8-installer':
>     ensure => $version,
>   }
> }
>
> How can I get this to work, or what is the best practice.  Can the 
> install.pp access parameters from the base class, $::version?  Or does this 
> need to be passed downward?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ef547bb3-6b89-4a97-9eae-28a4b04a43b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to