Last active
February 16, 2019 09:52
-
-
Save binford2k/efd953569328baf3f64487b78fefbc62 to your computer and use it in GitHub Desktop.
Generate a templated file on the agent, using secrets resolved agent side.
This file contains hidden or 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
$variables = { | |
'password' => Deferred('vault_lookup::lookup', | |
["secret/test", 'https://vault.docker:8200']), | |
} | |
# use inline_epp(), and file() to compile the template source into the catalog | |
file { '/etc/secrets.conf': | |
ensure => file, | |
content => Deferred('inline_epp', | |
[file('mymodule/secrets.conf.epp'), $variables]), | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is possible to reference a template in the
templates
directory by first locating the module root with the functionmodule_directory()
in puppet and then adding the relative path totemplates
.