configuration - How to get key in hash value in puppet -


I do not know whether it is possible to appear to me like this:

  $ some_external_value = 'pew_pew' $ dict = {confirm = & gt; $ Make sure, configuration = & gt; {"Random_name - $ {some_external_value}" => {Command = & gt; 'Python script.py config / random_name - $ {some_external_value} Cfg ',}, "some_other_name - $ {some_external_value}" => {Command = & gt; 'Python script.py config / some_other_name - $ {some_external_value}. Cfg ',}, "Without-External" = & gt; {Command = & gt; "Python script.py configuration / non-external code", user = & gt; 'Cluster',}}} notice ($ dict ["configuration"] ["some_other_name - $ {some_external_value}"] ["command"])   

I get

  notice: scope (class [main]): Python script.py config / some_other_name-pew_pew.cfg   

Is it just a bar and later to write the key name Just mentions it?

  "some_other_name - $ {some_external_value}" => {Command = & gt; 'Python script.py config / $ {wild_magic_variable_pasting_key_here} Cfg ',},    

You can possibly reach there anyway.

  $ orig_dict = {... configuration = & gt; {"Random_name - $ {some_external_value}" => {Command = & gt; 'Python script.py config / __ key __. cfg ',}, ...} $ dict = keysubst ($ orig_dict)   

... where the ruby ​​function works by changing the __ key with the corresponding key value Token recursively.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -