Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7011

Hiera should be able to include external files within the YAML/JSON hierarchy.

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:
    • Acceptance Criteria:
      Hide

      It should be possible to specify a glob pattern instead of specific paths when defining a level in a hiera.yaml.

      Show
      It should be possible to specify a glob pattern instead of specific paths when defining a level in a hiera.yaml.
    • Team:
      Puppet Developer Experience
    • Story Points:
      1
    • Release Notes:
      Not Needed
    • Release Notes Summary:
      Part of the larger "productize lookup" feature.

      Description

      The crux of this issue is that I would like to be able to separate my files into more logical blocks when using the YAML or JSON configurations.

      For instance:

      hiera.yaml

      ---
      :backends:
        - yaml
      :hierarchy:
        - defaults
       
      :yaml:
        :datadir: /var/lib/hiera
      

      In /var/lib/hiera, I would like to be able to place a directory 'defaults' and have hiera load everything under that directory.

      Such as:

      defaults/thing1.yaml
      defaults/thing2.yaml
      

      The syntax change that I would like to see for this is to append a trailing '/' to the hierarchy statement to indicate that the directory should be parsed.

      Example:

      :hierarchy:
        - defaults/
      

      If this is not doable, then allowing for a universal ':hiera_include:' option that allows for file chaining would work well (if not better).

      In this case, defaults.yaml could have:

      ---
      :hiera_include: things/*
      

      This would include all YAML files under the /var/lib/hiera/things directory.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                redmine.exporter redmine.exporter
              • Votes:
                3 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: