Thanks - finally found it myself - been looking for days on this --- environment: production
parameters: ybenv: alextest from Learning Puppet 4: A Guide to Configuration Management and Automation it actually says ENC paramaters are not the same as parameters anywhere else in puppet. wasn't too clear on that page... thanks again On Wednesday, 6 July 2016 17:03:46 UTC+10, R.I. Pienaar wrote: > > > > ----- Original Message ----- > > From: "Alex Samad" <al...@samad.com.au <javascript:>> > > To: "puppet-users" <puppet...@googlegroups.com <javascript:>> > > Sent: Wednesday, 6 July, 2016 09:01:10 > > Subject: [Puppet Users] can create a top level variable in my enc > > > Hi > > > > I have a bash script produce this for my test node > > > > --- > > environment: production > > ybenv: alextest > > > --- > environment: foo > parameters: > ybenv: foo > > https://docs.puppet.com/guides/external_nodes.html#parameters > <https://www.google.com/url?q=https%3A%2F%2Fdocs.puppet.com%2Fguides%2Fexternal_nodes.html%23parameters&sa=D&sntz=1&usg=AFQjCNHT_VaJVRtLX79dRserOCuIURsngg> > > > > > > > > I have this in my hiera.yaml file > > :hierarchy: > > > > # node specific > > - "nodes/%{::trusted.certname}" > > > > # OS specific > > - "os/%{::osfamily}" > > > > # Envornment > > - "ybenv/%{::ybenv}" > > > > # common to all > > - common > > > > > > These are my hieradata files > > hieradata/ > > hieradata/os > > hieradata/os/RedHat.yaml > > hieradata/nodes > > hieradata/nodes/testnode.yaml > > hieradata/common.yaml > > hieradata/ybenv > > hieradata/ybenv/alextest.yaml > > > > > > But this file doesn't seem to be getting read > > hieradata/ybenv/alextest.yaml > > > > and tried doing some testing in my site.pp > > > > tried this > > $ybenv=hiera('ybenv') > > info("Certname [${trusted['certname']}] OsName [${osfamily}] ybenv > > [${ybenv}] environment [${environment}]") > > > > and also just this > > > > info("ybenv [${ybenv}]") > > > > and it the logs it say ybenv undefined > > > > > > > > A > > > > > > -- > > 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...@googlegroups.com <javascript:>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/puppet-users/0c3c410c-cad1-47e6-a017-3a177458bc8d%40googlegroups.com. > > > > For more options, visit https://groups.google.com/d/optout. > -- 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/b24edb17-df7c-4391-8612-ba153802241a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.