Uploaded image for project: 'Hiera'
  1. Hiera
  2. HI-14

Allow access to structured data

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: HI 2.0.0
    • Component/s: DOCS
    • Labels:
      None
    • Template:
    • Story Points:
      3
    • Sprint:
      Language 2015-02-04

      Description

      Ever since puppet has supported data structures, hiera has not been able to access those structures. With work in PP-542, facts themselves, which are the most commonly used values in hiera, are becoming data structures, and so this issue is becoming a large problem.

      There are several ways we can approach this:

      1. Implement another "function" to access facts:

       myvar: %{fact(osfamily)} 


      2. Implement parsing of structure access:

       myvar: %{facts[osfamily]} 


      3. Implement structure traversal (a more obviously limited form of structure access):

       myvar: %{facts.osfamily} 

      I propose that in order to keep hiera simple the most correct form might be option 3. Part of this work is to decide on which one is best for hiera and then implement it.

      *Pre-docs:* Added in https://github.com/puppetlabs/pre-docs/pull/34.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              andy Andrew Parker
              QA Contact:
              Eric Thompson
              Votes:
              7 Vote for this issue
              Watchers:
              23 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support