The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

Feature #20220

Interpolate hash keys

Added by Bruno Leon about 3 years ago. Updated over 2 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:hiera
Target version:1.3.0
Keywords: Affected Hiera Version:1.2.0
Branch:https://github.com/puppetlabs/hiera/pull/126

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com


Description

The needs for this appeared while using create_resources(), which expects a hash, and takes hash keys as resources titles. When using hiera, hash keys where not interpolated before this patch.

You can now write this into hiera and have %{hostname} properly replaced by its facter value:

bacula::job:
%{hostname}_Cyrus:
    fileset: MailServer
    bacula_schedule: 'CycleStandard'
%{hostname}_LDAP:
    fileset: LDAP
    bacula_schedule: 'CycleStandard'

I did a first pull request which was missing the rspec test. I addred rspec test and updated the code from upstream.

https://github.com/puppetlabs/hiera/pull/126

History

#1 Updated by eric sorenson over 2 years ago

  • Status changed from Unreviewed to Merged - Pending Release
  • Target version set to 1.3.0
  • Branch set to https://github.com/puppetlabs/hiera/pull/126

This was merged but not reflected in the ticket — will be released in

#2 Updated by Melissa Stone over 2 years ago

  • Status changed from Merged - Pending Release to Closed

Released in Hiera 1.3.0-rc2

Also available in: Atom PDF