-
Notifications
You must be signed in to change notification settings - Fork 581
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently it is not possible to have a template file.epp ```puppet <%- | Stdlib::Port $port, String[1] $password, | %> port <%= $port %> password <%= $password %> ``` and run ```puppet file{'/tmp/junk': content => stdlib::deferrable_epp('module/file.epp', { 'port' => '1234', pass => Deferred('secrets::get',['mysecret'])}), } ``` since the deferred template substitution will fail: ``` Error: Failed to apply catalog: Evaluation Error: Resource type not found: Stdlib::Port (file: inlined-epp-text, line: 2, column: 3) ``` due to Stdlib::Port not being available on the agent node. This change now parses the EPP twice. The first pass will reduce the template to: ```puppet port = 1234 password <%= $password %> ``` and this simpler template will be passed in deferred mode. Note the original template type for password must accept the intermediate generated value of `<%= $password %>` which is typically case for a secret password.
- Loading branch information
1 parent
d871c4d
commit cfcbea5
Showing
3 changed files
with
95 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters