Skip to content

Improve custom hiera.yaml format #89

Description

@kbens

What problem are you trying to solve?

---
version: 5
defaults:
  datadir: /u01/app/psoft/dpk/puppet/production/data
  data_hash: yaml_data
  
hierarchy:
  - name: "Custom DPK Configuration"
    datadir: "/u01/app/psa/data"
    paths:
      - "server/%{facts.hostname}.yaml"
      - "environment/%{facts.env}.yaml"
      - "tier/%{facts.ps_tier}.yaml"
      - "zone/%{facts.ps_zone}.yaml"
      - "common.yaml"
    lookup_key: eyaml_lookup_key
    options:
      pkcs7_private_key: /u01/app/psoft/dpk/puppet/secure/keys/private_key.pkcs7.pem
      pkcs7_public_key:  /u01/app/psoft/dpk/puppet/secure/keys/public_key.pkcs7.pem
  - name: "DPK Configuration"
    paths:
      - "defaults.yaml"
      - "psft_customizations.yaml"
      - "psft_unix_system.yaml"
      - "psft_deployment.yaml"
      - "psft_configuration.yaml"
      - "psft_patches.yaml"
    lookup_key: eyaml_lookup_key
    options:
      pkcs7_private_key: /u01/app/psoft/dpk/puppet/secure/keys/private_key.pkcs7.pem
      pkcs7_public_key:  /u01/app/psoft/dpk/puppet/secure/keys/public_key.pkcs7.pem

Proposed solution

Current yaml generated has a bunch of duplication and the format could be changed to be easier to read.

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions