Hi folks,

I just managed to reproduce on a very small scale an issue
that's I've debugged for hours yesterday.

if we have a class:

    class foo (
      $bar = hiera_array('foo::bar', $foo::params::bar),
    ) inherits foo::params {
      notify{ "foo::bar: ${bar}": }
    }
    class foo::params {
      # so we know if we're hitting defaults, or actually hiera!
      $bar = 'bar'
    }

and a hierachiy:

    %{::fqdn}
    %{::common}
    
with the values:

    --- # ::fqdn
    foo::bar: baz

and
    --- # ::common
    foo::bar: quux

then hiera -a will deliever [ 'baz', 'quuux' ], but our notify will give
us 'baz'. Now, if we change the class:

    class foo (
      $_bar = hiera_array('foo::bar', $foo::params::bar),
    ) inherits foo::params {
      notify{ "foo::bar: ${_bar}": }
    }

we'll get the expected result, that is, notify will print:

   Notice: /Stage[main]/Foo/Notify[foo::bar: bazquux]/message: defined 
'message' as 'foo::bar: bazquux'

My question is simple: Is this a bug, or expected bahaviour?
if it's the latter, perhaps it should be documented some place.


So long,

-- i
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: [email protected]
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to