On Tuesday, November 21, 2017 at 10:01:39 AM UTC-6, Constantin B wrote: > > Hello > > i run : > > puppet lookup --node xxxx --debug --explain sshkeys::users > > on puppet master it return a correctly merged array > i have group/xxx.ymal + common.yaml > i have set > > > lookup_options: > sshkeys::users: # This lookup option applies to > parameter 'local' of class 'users' > merge: # Merge the values found across > hierarchies, instead of getting the first one > strategy: deep # Do a deep merge, useful when dealing > with Hashes (to override single subkeys) > merge_hash_arrays: true > > > so it works fine on master and the result is correctly merged xxx + common > > when i run puppet agent -t on xxxx node to apply the config the merge is > incorrect it only takes xxx.yaml > but ignore common.yaml > > > how this is possible ? >
If the catalog builder really is obtaining different values for the same key than puppet lookup does, with the two running on the same machine (i.e. the master), then the only possibilities are that the two are using different configurations or looking at different data. They might well be using different configurations if they are running as different users, and they might be looking at different data if they are referring to different environments (*i.e.* if the catalog is being built for a node that self-assigns its environment). > how to debug hiera from slave node ? > Generally speaking, you can effectively debug data lookups only on the machine that is actually performing the lookups. In a master / agent setup, that means the master. You can, however, use other nodes to probe lookup results by adding a `Notify` resource or a `File` resource to report on the exact result of the lookup itself, as performed by the master during catalog building. That might help you discern whether the problem is with the lookup itself, or whether it is with how the looked-up data are used. John -- 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/118cbe1f-398d-4d7a-8f1d-e25732dd2259%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.