Skip to content

Add support for module level Hiera data #424

@ardrigh

Description

@ardrigh

I just tested PDK 1.3.2 to create a new module, and I noticed it doesn't add support for module level hiera data.

This is probably seen as a compatibility issue, since it's only supported with Puppet 4.9+ and PDK defaults to Puppet 4.7

A nice way to add this would be an additional question asking if the module level Hiera data support is wanted (not asking if "required"). Then set version based on a Yes/No answer given by the user.

Alternatively, a question could be added about supported Puppet versions. It could list 4.7.0 with global Hiera data, or > 4.9.0 with module level Hiera data support. Perhaps output a docs URL for people to find information, or include the docs URL in the help information.

Based off the choice made by the user, PDK could then create the data directory and update metadata.json with the "data_provider": "hiera" line.
Edit: Also create a basic hiera.yaml pointing to a stub data/common.yaml

This might be a good way to get more modules using this feature, and exposing Puppet module developers to the benefits it can provide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions