-
-
Save hunner/2955705 to your computer and use it in GitHub Desktop.
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
| applications: | |
| app::core::instance: | |
| '01': | |
| index: '01' | |
| '02': | |
| index: '02' |
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
| Puppet::Parser::Functions.newfunction(:hiera_resources, :type => :statement) do |args| | |
| raise Puppet::Error, "hiera_resources requires 1 argument; got #{args.length}" if args.length != 1 | |
| apps = function_hiera_hash(args[0], {}) | |
| apps.each do |res_type, resources| | |
| function_create_resources(res_type, resources) | |
| end | |
| end |
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
| hostclass applications do | |
| apps = function_hiera_hash('applications') | |
| apps.each do |res_type, resources| | |
| function_create_resources(res_type, resources) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment