Created
May 16, 2012 00:40
-
-
Save jeffmccune/2706336 to your computer and use it in GitHub Desktop.
Alias a resource in the munge method of the namevar
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
1.8.7 :010 > catalog = Puppet::Resource::Catalog.new; catalog.class | |
=> Puppet::Resource::Catalog | |
1.8.7 :011 > resource = Puppet::Type.type(:registry_key).new(:name => 'HKLM\Software\Vendor\PuppetLabs', :catalog => catalog); resource.class | |
=> Puppet::Type::Registry_key | |
1.8.7 :012 > catalog.add_resource resource | |
=> nil | |
1.8.7 :013 > pp catalog.resource_keys | |
[["Registry_key", "hklm\\Software\\Vendor\\PuppetLabs"], | |
["Registry_key", "HKLM\\Software\\Vendor\\PuppetLabs"], | |
["Registry_key", "hklm\\software\\vendor\\puppetlabs"]] | |
=> nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment