Skip to content

Instantly share code, notes, and snippets.

@poysama
Created November 24, 2015 09:52
Show Gist options
  • Save poysama/e04ed26911d9081a0fbf to your computer and use it in GitHub Desktop.
Save poysama/e04ed26911d9081a0fbf to your computer and use it in GitHub Desktop.
### Given a configuration file for rails named app.yml which contains whatever dynamic content
# init.pp
class rails (
$configs = {},
) {
create_resources('rails::config', $configs, {})
}
define rails::config (
### how do i define this part to accept dynamic vars?
) {
}
### a sample hiera.yml would be like
rails::configs:
'app.yml':
'dynamic_key': 'dynamic_value'
'dynamic_key2':
- 'dynamic_value_as_hash1
- 'dynamic_value_as_hash2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment