Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 257

can't able to pass a variable with same name in different manifest in puppet 2016.1.1?

$
0
0
In previous i used puppet 2015.v.3.1, in that i pass a variable from one class to another by the same name. Eg: In Hiera, currentgen::prodequ_backup_path: 'C:\Backup' I got a hiera value to profiles::currentgen class profiles::currentgen ($prodequ_backup_loc = hiera ('currentgen::prodequ_backup_path') { notify {"test": message=>"$prodequ_backup_loc", } } then i get this $prodequ_backup_loc to my params.pp file Eg: class currentgen::currentgen_parms ($prodequ_backup_loc = $prodequ_backup_loc) inherits profiles::currentgen{ notify {"1test": message=>"this is $prodequ_backup_loc", } } When i call currentgen::currentgen_parms in site.pp, it notifies whatever in code. but now i migrate my puppet version to 2016.1.1 it gives error like below Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, default expression for $prodequ_backup_loc tries to illegally access not yet evaluated $prodequ_backup_loc at /etc/puppetlabs/code/environments/production/manifests/site.pp:73:2 on node node_name. if i change the name of variable mean it works. is this error caused by https://docs.puppet.com/pe/latest/code_mgr_custom.html

Viewing all articles
Browse latest Browse all 257

Trending Articles