Jira (HI-638) Allow Puppet function calls from hiera data

5 views
Skip to first unread message

Martin Alfke (Jira)

unread,
Jan 9, 2023, 10:59:02 AM1/9/23
to puppe...@googlegroups.com
Martin Alfke created an issue
 
Hiera / Improvement HI-638
Allow Puppet function calls from hiera data
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2023/01/09 7:58 AM
Priority: Normal Normal
Reporter: Martin Alfke

In combination with stdlib::manage I want to be able to use Puppet functions from hiera data.

 

e.g.

 

stlib::manage::create_reosurces:
  file:
    '/etc/motd':
    ensure: file
    content: %{epp('profile/motd.epp')}

 

Actual result:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Unable to parse (/etc/puppetlabs/code/environments/production/data/common.yaml): found character '%' that cannot start any token. (Do not use % for indentation) while scanning for the next token at line 72 column 16

Desired result: The content is rendered from the template.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Josh Cooper (Jira)

unread,
Jan 26, 2023, 11:42:04 AM1/26/23
to puppe...@googlegroups.com
Josh Cooper commented on Improvement HI-638
 
Re: Allow Puppet function calls from hiera data

Currently it's only possible to use these interpolation functions: https://www.puppet.com/docs/puppet/7/hiera_merging.html#interpolation_functions We've had requests to allow arbitrary puppet functions such as this and PUP-11546. Henrik Lindberg has said it's possible to do this using his https://github.com/hlindberg/tahu module. I'm going to move this to the PUP project, since this JIRA project is for Hiera 3

Reply all
Reply to author
Forward
0 new messages