title: hiera CLI lookup fails but puppet agent -t works
body: <p>[root@puppet puppet]# cat /etc/hiera.yaml</p>
  
  <pre><code>---
  :backends:
    - yaml
  :yaml:
    :datadir: '/etc/puppet/hieradata'
  :hierarchy:
    - env/%{::environment}/fqdn/%{::fqdn}
    - hostgroup/%{::hostgroup1}
    - global
  </code></pre>
  
  <p>[root@puppet puppet]# cat hieradata/env/dev/fqdn/client00.itw.local.yaml</p>
  
  <pre><code>fruit::a:
    - 'DevFQDN-kiwi'
  </code></pre>
  
  <p>[root@puppet puppet]# cat environments/dev/modules/fruit/manifests/init.pp</p>
  
  <pre><code>class fruit(
          $a = hiera('fruit::a' ),
          $b = hiera('fruit::b'),
          $c = hiera('fruit::c')
  ) {
          notify { 'foo':
                  message =&gt; "a is: ${a}, b is: ${b}, c is : ${c}",
          }
  }
  </code></pre>
  
  <p>fruit::a seems to resolve fine on client00.itw.local</p>
  
  <pre><code>[root@client00 ~]# puppet agent -t
  Warning: Local environment: "production" doesn't match server specified node  environment "dev", switching agent to "dev".
  Info: Retrieving plugin
  Info: Caching catalog for client00.itw.local
  Info: Applying configuration version '1411407772'
  Notice: a is: DevFQDN-kiwi, b is: HostgroupAll-orange, c is : global-lime-C
  </code></pre>
  
  <p>But CLI hiera does not return the correct value on the puppet master</p>
  
  <pre><code>[root@puppet puppet]# hiera -d fruit::a ::fqdn=client00.itw.local ::hostgroup1=all
  DEBUG: Mon Sep 22 13:57:16 -0400 2014: Hiera YAML backend starting
  DEBUG: Mon Sep 22 13:57:16 -0400 2014: Looking up fruit::a in YAML backend
  DEBUG: Mon Sep 22 13:57:16 -0400 2014: Looking for data source hostgroup/all
  DEBUG: Mon Sep 22 13:57:16 -0400 2014: Looking for data source global
  DEBUG: Mon Sep 22 13:57:16 -0400 2014: Found fruit::a in global
  ["global-lime-A"]
  </code></pre>
  
  <p>With mcollective, hiera -d fruit::a -m client00.itw.local, I got the same result.</p>
  
  <p>Thanks for your help.</p>