With the change to "split environments by default", you need to provide the environment name on the command line:

[root@sh00cw-pup01ny hieradata]# hiera profiles::packages::centos
nil
[root@sh00cw-pup01ny hieradata]# hiera profiles::packages::centos environment=production
["bind-utils", "curl", "nmap", "tcpdump", "unzip", "wget"]

This is done automatically by the Puppet server when compiling the manifest, but you need to do it manually on the command line.


On 2016-06-13 12:37 PM, Bret Wortman wrote:
Oh, and my hiera version is now 3.0.6. We lag a bit behind on our development & production networks....


On Monday, June 13, 2016 at 12:37:03 PM UTC-4, Bret Wortman wrote:

    That got me past the error, but I still am getting "nil" no matter
    what I ask for.

    And I've looked -- the keys I'm querying for are defined, at a
    minimum, in
    /etc/puppetlabs/code/environments/production/hieradata/common.yaml.


    On Monday, June 13, 2016 at 12:06:56 PM UTC-4, Peter Kristolaitis
    wrote:

        I suspect your hiera install is confused because you have both
        the puppet-agent and hiera packages installed.   Hiera now
        ships as part of the puppet-agent package and gets installed
        as /opt/puppetlabs/bin/hiera; there is no separate hiera
        package.  Hiera 1.3.4 is also quite old -- on a box with
        puppet-agent v1.5.1 installed, 'hiera -v' gives me version 3.2.0.

        You probably need to get rid of the hiera package and make
        sure that you're using the new version provided by puppet-agent.


        On 2016-06-13 11:54 AM, Bret Wortman wrote:
        This morning, I upgraded to Puppet 4 using the PC1 repository
        and even through I have the puppet server running, the Hiera
        files we rely heavily on aren't being seen. I'm getting false
        values for everything which really screwed up some of the
        boxes I was testing with.

        # hiera -c /etc/puppetlabs/code/hiera.yaml
        localtime::timezone -y test.yaml
        Could not load YAML scope: LoadError: cannot load such file
        -- puppet
        # cat /etc/puppetlabs/code/hiera.yaml
        ---
        :backends:
          - yaml

        :yaml:
        :datadir:
        "/etc/puppetlabs/code/environments/${::environment}/hieradata"

        :hierarchy:
          - "%{::hostname}"
          - "%{::sitename}"
          - common

        # ls
        /etc/puppetlabs/code/environments/production/hieradata/common.yaml
        /etc/puppetlabs/code/environments/production/hieradata/common.yaml
        # cat test.yaml
        ---
        "::hostname": testws
        "::sitename": hq
        # rpm -qa | grep hiera
        hiera-1.3.4-5.el7.noarch
        # rpm -qa | grep puppet
        puppetdb-3.2.2-1.el7.noarch
        puppetserver-2.2.1-1.el7.noarch
        puppet-agent-1.3.5-1.el7.x86_64
        #

        All the files under environments/production/hieradata used to
        reside under /etc/puppet/environments/production/data, but
        were moved & renamed to accomodate the upgrade. And promptly
        stopped working.

        Where should I be looking? Do I still need to have the
        "puppet" rpm installed?


        Bret
-- 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 view this discussion on the web visit
        
https://groups.google.com/d/msgid/puppet-users/63b7a931-d52c-4c1a-822d-f9000e87507f%40googlegroups.com
        
<https://groups.google.com/d/msgid/puppet-users/63b7a931-d52c-4c1a-822d-f9000e87507f%40googlegroups.com>.
        For more options, visit https://groups.google.com/d/optout
        <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 [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/25b411ce-855e-4fd2-8d7f-4a724cb25ea5%40googlegroups.com <https://groups.google.com/d/msgid/puppet-users/25b411ce-855e-4fd2-8d7f-4a724cb25ea5%40googlegroups.com?utm_medium=email&utm_source=footer>.
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/575EE5A5.7070905%40alter3d.ca.
For more options, visit https://groups.google.com/d/optout.

Reply via email to