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

%{calling_class} yaml paths do not function on windows

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Duplicate
    • HI 1.3.0
    • HI 2.0.0
    • None

    Description

      My organization has a pre-existing hiera configuration which uses

      {calling_class}.yaml configuration files, like:

      classes/base::openldap.yaml

      Which get pulled into hiera via this path in the hierarchy.

      :hierarchy:
      ...
      - "%{environment}/classes/%{calling_class}

      "

      This does not work on Windows. Windows does not support colons in filenames so the .yaml can't even be checked out from source control. This presents issues when developing our puppet manifests on windows and sharing them with a Vagrant VM, for example.

      It'd be really nice if hiera supported reading calling_class files from files which did not use colons as separators. Perhaps it could look up the class via a 'backup' parameter if the colon version does not exist? (and it'd have to do this on every OS.. since the problem is a directory which is checked out on both windows and linux.. perhaps could be an option?)

      Maybe a new field,

      {%calling_class_safe}

      which reads from profile_base.yaml instead of profile::base.yaml? ? I'm not sure what the cleanest fix is.

      thanks-

      Attachments

        Issue Links

          Activity

            People

              eric.sorenson Eric Sorenson
              benh57 Ben Hines
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support