Hi guys.

I have an issue with scope changes, and I am wondering how to proceed.


This is what I've got:

define first (
  $somevar,
) {
  $name_array = split($title, '/')
  $developer = $name_array[0]
  $instance  = $name_array[1]

  ::second { "${developer}_${instance}":
    template => 'my/custom/file.erb',
  }

}


define second (
  $template,
) {
  notify { "${developer}": }
}

first { 'j/test': somevar => 'test' }


Accessing $developer was working before updating to puppet4, but after updating, it's not working any more. ERBs that are inside 'second' are depending on these variables being available to evaluate correctly.

I know a clean way to fix this would be to pass a variable $developer as a parameter to second defined type. BUT, I would like to try and avoid that because 'second' is a defined type provided by 3rd party module.


Is there anything else I can do?

--
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5631B70F.1050507%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to