Hi Guys,
You have to forgive this but it’s driving me nuts. I thought I understood the way that Hiera worked and trying to get it to work in the way I expect has had me seriously doubting myself. My hiera.yaml looks like this *---* *# Hiera 5 Global configuration file* * version: 5* * defaults:* * datadir: /etc/puppetlabs/code/environments/production/hieradata* * data_hash: yaml_data* * hierarchy:* * - name: "Host Specifics"* * path: "hosts/%{facts.hostname}.yaml"* * - name: "Attribute Specifics"* * mapped_paths: [ attributes, att, "attributes/%{att}.yaml" ]* * - name: "Application List Specifics"* * mapped_paths: [ applicationlist, app, "application/%{app}.yaml" ]* * - name: "Business Owner Specifics"* * path: "businessowner/%{facts.businessowner}.yaml"* * - name: "Environment Specifics"* * path: "environment/%{facts.role}.yaml"* * - name: "OS Specific"* * path: "os/%{facts.os.family}%{facts.os.release.major}.yaml"* * - name: "Kernel Specific"* * path: "kernel/%{facts.kernel}.yaml"* * - name: "Hardware Specific"* * path: "hardware/%{facts.productname}.yaml"* * - name: "Site Specific"* * path: "site/%{facts.deriversite}.yaml"* * - name: "Common Data"* * path: “common.yaml"* On the agent I’m setting up some local facts that I need to control what comes back in the catalog. *---* * derivedsite: 'cp1'* * hostdb:* * role: 'development'* * businessowner: ‘Infrastructure'* * attributes:* * - 'DNS-Slave'* * - 'Oracle'* * applicationlist:* * - ‘test'* The way I’m trying to debug this is via a parameter called sourcefact that is in all off the Hiera yaml files and is merged to show me which files are being used. Local facts look like this *---* *# Yaml file for Hiera - Common* * lookup_options:* * sourcefact:* * merge: unique* * profile::packages::os:* * merge: unique* * "^profile::(.*)$":* * merge: deep * * sourcefact: ‘Common'* When I run the puppet agent -t one of the lines looks like *Notice: Let's see what the Source variable says [DNS Slave, test, Linux, Common]* Trouble is I can’t seem to get it to be consistent. The only facts I can seem to get the master to see are the attributes and applicationlist ones and they are both arrays end even then it only picks up the first element. For this agent I would expect to see *Notice: Let's see what the Source variable says [Oracle ,DNS Slave, test, Linux, cp1, Common]* I’m assuming I am doing something fundamentally wrong here - HELP!!!! -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/3b96dd74-90c3-4cc4-8dff-55245deea3d3n%40googlegroups.com.