Oops, I copied and pasted the wrong thing.

hiera.yaml

:yaml:
  :datadir: /etc/puppetlabs/hieradata/%{::environment}
:hierarchy:
  - common
  - %{::application}


On my agent puppet.conf, I have tried what you suggested already but it 
can't find the value in hiera.

[agent]
    certname = xxxxxxxxxx
    server = xxxxxxxxxx
    report = true
    classfile = $vardir/classes.txt
    localconfig = $vardir/localconfig
    graph = true
    pluginsync = true
    environment = dev
    application = app_1


On Monday, April 8, 2013 10:33:26 AM UTC-7, Ygor wrote:
>
> http://docs.puppetlabs.com/guides/environment.html#on-the-agent-node
>
> I put it in the [agent] block of puppet.conf
>
> “Sometimes I think the surest sign that intelligent life exists elsewhere 
> in the universe is that none of it has tried to contact us.”
> Bill Waterson (Calvin & Hobbes)
>
> ------------------------------
> *From: *"Tony C" <tonyj...@gmail.com <javascript:>>
> *To: *puppet...@googlegroups.com <javascript:>
> *Sent: *Monday, April 8, 2013 1:28:37 PM
> *Subject: *[Puppet Users] More Hiera and Environment questions
>
> Hi everyone,
>
> I have a question that I can't seem to find a solution to.
>
> I am using hiera, and having a hard time understanding how to pass 
> environments for dynamic look ups.
>
> For example, if my hiera.yaml looks like this:
>
> :hierarchy: - %{::environment} - common
>
> How / where do I pass the $environment variable that the host will know 
> it's in a particular environment. I had something working before using an 
> ENC, but I do not have an option of using an ENC this time around.
>
> Thanks!
>
> Tony
>
> -- 
> 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 post to this group, send email to puppet...@googlegroups.com<javascript:>
> .
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to