puppetlabs/puppet — pull request #1028 by fatpat (2012-08-13 21:49:42+00:00)
Title: add hash($var, XX) syntax to configuration file to be able to extract the first XX chars from $var

We are deadling with a lots of environments and sub environments.

We are using the manifestdir parameter in puppet.conf and we would like to be able to "hash" $environment to distribute environments in sub directories

before:
manifestdir=$confdir/env/$environment/manifests ## /etc/puppet/env/production/manifests

after:
manifestdir=$confdir/env/hash($environment, 1)/hash($environment, 2)/$environment/manifests ## /etc/puppet/env/p/pr/production/manifests