Not quite sure how you're using environments but here's what we do...
- Environments are configured in puppet.conf and we select the environment 
at runtime: puppet -t --environment my_env
- Each environment is a complete copy of our git source tree, including 
hiera
- We pipeline our release process using branches in git, merging the code 
from branch to branch & pulling it into an environment-per-pipeline-stage
- But hiera does not implicitly know about environments the way puppet.conf 
knows about them so we do the following

# Hiera data directory contains a symlink-per-environment that point to 
that environment's hiera tree

ls -l /etc/puppet/hiera/data
   ...   my_env  =>  /etc/puppet/environments/my_env/hiera/data

# Our hiera.yaml file looks like this

:backends:
    - yaml
:yaml:
    :datadir: '/etc/puppet/hiera/data'
:hierarchy:
      #                Note: fqdn should only be used to workaround 
temporary development issues
    - %{environment}/%{fqdn}/%{module_name}
    - %{environment}/%{project}/%{server_env}/%{module_name}
    - %{environment}/%{project}/%{server_env}/common
    - %{environment}/%{project}/%{role_name}-role/%{module_name}
    - %{environment}/%{project}/%{role_name}-role/common
    - %{environment}/%{project}/%{module_name}
    - %{environment}/%{location}/%{module_name}
    - %{environment}/%{module_name}
    - %{environment}/common

Cheers
Larry Fast

-- 
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 [email protected].
To post to this group, send email to [email protected].
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