registry
Version information
This version is compatible with:
- Puppet Enterprise 3.2.x
- Puppet 3.x
Start using this module
Add this module to your Puppetfile:
mod 'puppetlabs-registry', '1.0.0'
Learn more about managing modules with a PuppetfileDocumentation
#registry
####Table of Contents
- Overview - What is the registry module?
- Setup - The basics of getting started with registry
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
##Overview
The registry module enables you to manage your Windows Registry from your *nix puppet master by supplying the types and providers necessary to create and manage Windows Registry keys and values with Puppet.
##Setup
###What registry affects
- files, folders, and services in Windows Registry
- node manifests
###Setup requirements
For this module to run correctly, you must have pluginsync enabled.
This setting will ensure the types and providers are synchronized and available on the agent before the configuration run takes place. This is the default behavior of the puppet agent on Microsoft Windows platforms.
###Beginning with Registry
The registry module is intended to enable a *nix master server to interact with a Windows agent. The module must be downloaded and installed on your puppet master.
The bulk of registry's capabilities comes from two resource types: registry_key
and registry_value
. Combined, these types allow you to specify the Registry container and the file(s) meant to be in it.
The defined resource type registry::value
allows you to manage Registry values and the parent key in one fell swoop.
registry::value { 'MyApp Setting1':
key => 'HKLM\Software\Vendor\PuppetLabs',
value => setting1,
data => 'Hello World!'
}
Within this defined type, you can specify multiple Registry values for one registry key and manage both at once.
If, on the other hand, you just want to manage a standalone key or value, you can declare each resource type individually in your site.pp manifest.
registry_key { 'HKLM\System\CurrentControlSet\Services\Puppet':
ensure => present,
}
and/or
registry_value { 'HKLM\System\CurrentControlSet\Services\Puppet\Description':
ensure => present,
type => string,
data => "The Puppet Agent service periodically manages your configuration",
}
The type or types you declare will be applied at the next catalog run, and each one will be managed individually.
####Puppet Enterprise console
The Puppet Enterprise console makes using the registry module even easier. To manage Registry values or keys add the registry::value
defined type, registry_key
resource, or registry custom types to a class that is or can be applied to your agent nodes.
Once you have applied the type(s) or resources to a class, use the Puppet Enterprise console to assign the class to a Windows node or node group.
####Noteworthy functionality
- If Puppet creates a Registry key, Windows will automatically create any necessary parent Registry keys that do not already exist.
- Keys within HKEY_LOCAL_MACHINE (hklm) or HKEY_CLASSES_ROOT (hkcr) are supported. Other predefined root keys (e.g. HKEY_USERS) are not currently supported.
- Puppet will not recursively delete Registry keys.
- Any parent Registry key managed by Puppet will be autorequired.
##Usage
###Defined Type: registry::value
The registry::value
defined resource type allows you to use Puppet to manage the parent key for a particular value automatically. This defined type will automatically create and manage the parent key if it does not exist, in addition to managing the value.
class myapp {
registry::value { 'puppetmaster':
key => 'HKLM\Software\Vendor\PuppetLabs',
data => 'puppet.puppetlabs.com',
}
}
In the above example, a value named 'puppetmaster' would be created inside the key HKLM\Software\Vendor\PuppetLabs`.
The registry::value
defined type only manages keys and values in the system-native architecture. In other words, 32-bit keys applied in a 64-bit OS won't be managed by this defined type; instead, you must use the custom resource types, registry_key
and registry_value
individually.
####Parameters in registry::value
:
#####data
Lists the data inside the Registry value. Data should be specified as a string, unless you have set the type
parameter to 'array'.
#####key
Specifies the path of the key the value(s) must be in.
#####type
Determines the type of the registry value(s). Defaults to 'string'. Valid values are 'string', 'array', 'dword', 'qword', 'binary', or 'expand'.
#####value
Lists the name of the registry value(s) to manage. This will be copied from the resource title if not specified.
You can also use this parameter to set a specific registry value as the default value for the key. To do so you must name the value '(default)'.
registry::value { 'Setting0':
key => 'HKLM\System\CurrentControlSet\Services\Puppet',
value => '(default)',
data => "Hello World!",
}
It is worth noting that you can still add additional values in a string (or array) after the default, though you may only have one default value per key.
###Custom Type: registry_key
This custom type allows management of individual Registry keys on Windows systems.
registry_key { 'HKLM\System\CurrentControlSet\Services\Puppet':
ensure => present,
}
This type may be used outside of the registry::value
defined type for specific, customized requirements.
####Parameters in registry_key
#####ensure
Determines whether or not the key must exist. If not included, the module will do nothing but make sure the other parameters are met if the key is found on a node; it will not force its existence or absence. Valid values are 'present' and 'absent'.
#####path
Specifies the path of the Registry key to manage. For example: 'HKLM\Software' or 'HKEY_LOCAL_MACHINE\Software\Vendor'.
If Puppet is running on a 64-bit system, the 32-bit registry key can be explicitly managed using a prefix. For example: '32:HKLM\Software'.
#####purge_values
Whether to delete any Registry value associated with this key that is not being managed by Puppet. Valid values are 'true' and 'false'.
See the Purge Values section for more information on how this parameter works.
###Custom Type: registry_value
This custom type allows management of individual Registry values on Windows systems.
registry_value { 'HKLM\System\CurrentControlSet\Services\Puppet\Description':
ensure => present,
type => string,
data => "The Puppet Agent service periodically manages your configuration",
}
This type may be used outside of the registry::value
defined type for specific, customized requirements.
####Parameters in registry_value
#####path
Specifies the path of the registry value to manage. For example: 'HKLM\Software\Value1' or 'HKEY_LOCAL_MACHINE\Software\Vendor\Value2'.
If Puppet is running on a 64-bit system, the 32-bit Registry value can be explicitly managed using a prefix. For example: '32:HKLM\Software\Value3'.
#####ensure
Determines whether or not the value must exist. If not included, the module will do nothing but make sure the other parameters are met if the value is found on a node; it will not force its existence or absence. Valid values are 'present' and 'absent'.
#####type
Determines the type of the Registry value data. Valid values are 'string', 'array', 'dword', 'qword', 'binary', or 'expand'.
#####data
Lists the data inside the Registry value. Data should be specified as a string value, unless you have set the type
parameter to 'array'.
###Defined Type: registry::service
The registry::service
defined resource type utilizes specific Registry keys and values to manage service entries in the Microsoft service control framework. Specifically, registry::service
manages the values in the key HKLM\System\CurrentControlSet\Services\$name.
registry::service { puppet:
ensure => present,
display_name => "Puppet Agent",
description => "Periodically fetches and applies configurations from a Puppet master server.",
command => 'C:\PuppetLabs\Puppet\service\daemon.bat',
}
This is an alternative approach to using INSTSRV.EXE 1.
####Parameters in registry::service
:
#####ensure
Determines whether or not the service is 'present' or 'absent'.
#####display_name
Sets the Display Name of the service. Defaults to the title of the resource.
#####description
A description of the service.
#####command
Specifies the command to execute.
#####start
Specifies the starting mode of the service. Valid values are 'automatic', 'manual', and 'disabled'.
The native service resource can also be used to manage this setting.
####Extended registry::service
example
class registry::service_example {
# Define a new service named "Puppet Test" that is disabled.
registry::service { 'PuppetExample1':
display_name => "Puppet Example 1",
description => "This is a simple example managing the registry entries for a Windows Service",
command => 'C:\PuppetExample1.bat',
start => 'disabled',
}
registry::service { 'PuppetExample2':
display_name => "Puppet Example 2",
description => "This is a simple example managing the registry entries for a Windows Service",
command => 'C:\PuppetExample2.bat',
start => 'disabled',
}
}
###Purge Values
The Registry module provides a means of ensuring that only Puppet-specified values are associated with a particular key. This is not default behavior, but a feature you must enable.
In order to make sure only the values specified via Puppet are associated
with a particular key, use the purge_values => true
parameter of the
registry_key
resource. Enabling this feature will delete any values not managed by Puppet.
The registry::purge_example
class provides a quick and easy way to see a demonstration of how this works. This example class has two modes of operation determined by the Facter fact PURGE_EXAMPLE_MODE
: 'setup' or 'purge'.
To run the demonstration, make sure the registry::purge_example
class is included in the node catalog, then set an environment variable in Power Shell. This will set up a Registry key that contains six values.
PS C:\> $env:FACTER_PURGE_EXAMPLE_MODE = 'setup'
PS C:\> puppet agent --test
notice: /Stage[main]/Registry::Purge_example/Registry_key[HKLM\Software\Vendor\Puppet Labs\Examples\KeyPurge]/ensure: created
notice: /Stage[main]/Registry::Purge_example/Registry_value[HKLM\Software\Vendor\Puppet Labs\Examples\KeyPurge\Value3]/ensure: created
notice: /Stage[main]/Registry::Purge_example/Registry_value[HKLM\Software\Vendor\Puppet Labs\Examples\KeyPurge\Value2]/ensure: created
notice: /Stage[main]/Registry::Purge_example/Registry_key[HKLM\Software\Vendor\Puppet Labs\Examples\KeyPurge\SubKey]/ensure: created
notice: /Stage[main]/Registry::Purge_example/Registry_value[HKLM\Software\Vendor\Puppet Labs\Examples\KeyPurge\Value5]/ensure: created
notice: /Stage[main]/Registry::Purge_example/Registry_value[HKLM\Software\Vendor\Puppet Labs\Examples\KeyPurge\Value6]/ensure: created
notice: /Stage[main]/Registry::Purge_example/Registry_value[HKLM\Software\Vendor\Puppet Labs\Examples\KeyPurge\SubKey\Value1]/ensure: created
notice: /Stage[main]/Registry::Purge_example/Registry_value[HKLM\Software\Vendor\Puppet Labs\Examples\KeyPurge\Value1]/ensure: created
notice: /Stage[main]/Registry::Purge_example/Registry_value[HKLM\Software\Vendor\Puppet Labs\Examples\KeyPurge\SubKey\Value2]/ensure: created
notice: /Stage[main]/Registry::Purge_example/Registry_value[HKLM\Software\Vendor\Puppet Labs\Examples\KeyPurge\Value4]/ensure: created
notice: Finished catalog run in 0.14 seconds
Switching the mode to 'purge' will cause the class to only manage three of the
six registry_value
resources. The other three will be purged since the registry_key
resource has purge_values => true
specified in the manifest.
Notice how Value4, Value5 and Value6 are being removed.
PS C:\> $env:FACTER_PURGE_EXAMPLE_MODE = 'purge'
PS C:\> puppet agent --test
notice: /Registry_value[hklm\Software\Vendor\Puppet Labs\Examples\KeyPurge\Value4]/ensure: removed
notice: /Registry_value[hklm\Software\Vendor\Puppet Labs\Examples\KeyPurge\Value6]/ensure: removed
notice: /Registry_value[hklm\Software\Vendor\Puppet Labs\Examples\KeyPurge\Value5]/ensure: removed
notice: /Stage[main]/Registry::Purge_example/Registry_value[HKLM\Software\Vendor\Puppet Labs\Examples\KeyPurge\Value3]/data: data changed 'key3' to 'should not be purged'
notice: /Stage[main]/Registry::Purge_example/Registry_value[HKLM\Software\Vendor\Puppet Labs\Examples\KeyPurge\Value2]/data: data changed '2' to '0'
notice: /Stage[main]/Registry::Purge_example/Registry_value[HKLM\Software\Vendor\Puppet Labs\Examples\KeyPurge\Value1]/data: data changed '1' to '0'
notice: Finished catalog run in 0.16 seconds
##Limitations
This module was developed for use on *nix puppet master, and has been tested on Windows Server 2003, 2008 R2, 2012, and 2012 R2 on the puppet agents.
Please log tickets and issues at our Module Issue Tracker.
##Development
Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
You can read the complete module contribution guide on the Puppet Labs wiki.
Licensed under Apache License, Version 2.0
Types in this module release
##2014-03-04 - Supported Release 1.0.0 ###Summary This is a supported release.
####Bugfixes
- Documentation updates
- Add license file
####Known Bugs
- This module does not work if run as non-root. Please see PE-2772
##2013-08-01 - Release 0.1.2 ###Summary: This is a bugfix release that allows the module to work more reliably on x64 systems and on older systems such as 2003. Also fixes compilation errors due to windows library loading on *nix masters.
####Bugfixes:
- Refactored code into PuppetX namespace
- Fixed unhandled exception when loading windows code on *nix
- Updated README and manifest documentation
- Only manage redirected keys on 64 bit systems
- Only use /sysnative filesystem when available
- Use class accessor method instead of class instance variable
- Add geppetto project file
2012-05-21 - 0.1.1 - Jeff McCune jeff@puppetlabs.com
- (#14517) Improve error handling when writing values (27223db)
- (#14572) Fix management of the default value (f29bdc5)
2012-05-16 - 0.1.0 - Jeff McCune jeff@puppetlabs.com
- (#14529) Add registry::value defined type (bf44208)
2012-05-16 - Josh Cooper josh+github@puppetlabs.com
- Update README.markdown (2e9e45e)
2012-05-16 - Josh Cooper josh+github@puppetlabs.com
- Update README.markdown (3904838)
2012-05-15 - Josh Cooper josh@puppetlabs.com
- (Maint) Add type documentation (82205ad)
2012-05-15 - Josh Cooper josh+github@puppetlabs.com
- Remove note about case-sensitivity, as that is no longer an issue (5440a0e)
2012-05-15 - Jeff McCune jeff@puppetlabs.com
- (#14501) Fix autorequire case sensitivity (d5c12f0)
2012-05-15 - Jeff McCune jeff@puppetlabs.com
- (maint) Remove RegistryKeyPath#{valuename,default?} methods (29db478)
2012-05-14 - Jeff McCune jeff@puppetlabs.com
- Add acceptance tests for registry_value provider (6285f4a)
2012-05-14 - Jeff McCune jeff@puppetlabs.com
- Eliminate RegistryPathBas#(default?,valuename) from base class (2234f96)
2012-05-14 - Jeff McCune jeff@puppetlabs.com
- Memoize the filter_path method for performance (6139b7d)
2012-05-11 - Jeff McCune jeff@puppetlabs.com
- Add Registry_key ensure => absent and purge_values coverage (cfd3789)
2012-05-11 - Jeff McCune jeff@puppetlabs.com
- Fix cannot alias error when managing 32 and 64 bit versions of a key (3a2f260)
2012-05-11 - Jeff McCune jeff@puppetlabs.com
- Add registry_key creation acceptance test (0e68654)
2012-05-09 - Jeff McCune jeff@puppetlabs.com
- Add acceptance tests for the registry type (0a01b11)
2012-05-08 - Jeff McCune jeff@puppetlabs.com
- Update type description strings (c69bf2d)
2012-05-05 - Jeff McCune jeff@puppetlabs.com
- Separate the implementation of the type and provider (4e06ae5)
2012-05-04 - Jeff McCune jeff@puppetlabs.com
- Add watchr script to automatically run tests (d5bce2d)
2012-05-04 - Jeff McCune jeff@puppetlabs.com
- Add registry::compliance_example class to test compliance (0aa8a68)
2012-05-03 - Jeff McCune jeff@puppetlabs.com
- Allow values associated with a registry key to be purged (27eaee3)
2012-05-01 - Jeff McCune jeff@puppetlabs.com
- Update README with info about the types provided (b9b2d11)
2012-04-30 - Jeff McCune jeff@puppetlabs.com
- Add registry::service defined resource example (57c5b59)
2012-04-25 - Jeff McCune jeff@puppetlabs.com
- Add REG_MULTI_SZ (type => array) implementation (1b17c6f)
2012-04-26 - Jeff McCune jeff@puppetlabs.com
- Work around #3947, #4248, #14073; load our utility code (a8d9402)
2012-04-24 - Josh Cooper josh@puppetlabs.com
- Handle binary registry values (4353642)
2012-04-24 - Josh Cooper josh@puppetlabs.com
- Fix puppet resource registry_key (f736cff)
2012-04-23 - Josh Cooper josh@puppetlabs.com
- Registry keys and values were autorequiring all ancestors (0de7a0a)
2012-04-24 - Jeff McCune jeff@puppetlabs.com
- Add examples of current registry key and value types (bb7e4f4)
2012-04-23 - Josh Cooper josh@puppetlabs.com
- Add the ability to manage 32 and 64-bit keys/values (9a16a9b)
2012-04-23 - Josh Cooper josh@puppetlabs.com
- Remove rspec deprecation warning (94063d5)
2012-04-23 - Josh Cooper josh@puppetlabs.com
- Rename registry-specific util code (cd2aaa1)
2012-04-20 - Josh Cooper josh@puppetlabs.com
- Fix autorequiring when using different root key forms (b7a1c39)
2012-04-19 - Josh Cooper josh@puppetlabs.com
- Refactor key and value paths (74ebc80)
2012-04-19 - Josh Cooper josh@puppetlabs.com
- Encode default-ness in the registry path (64bba67)
2012-04-19 - Josh Cooper josh@puppetlabs.com
- Better validation and testing of key paths (d05d1e6)
2012-04-19 - Josh Cooper josh@puppetlabs.com
- Maint: Remove more crlf line endings (e9f00c1)
2012-04-19 - Josh Cooper josh@puppetlabs.com
- Maint: remove windows cr line endings (0138a1d)
2012-04-18 - Josh Cooper josh@puppetlabs.com
- Rename
default
parameter (f45af86)
2012-04-18 - Josh Cooper josh@puppetlabs.com
- Fix modifying existing registry values (d06be98)
2012-04-18 - Josh Cooper josh@puppetlabs.com
- Remove debugging (8601e92)
2012-04-18 - Josh Cooper josh@puppetlabs.com
- Always split the path (de66832)
2012-04-18 - Josh Cooper josh@puppetlabs.com
- Initial registry key and value types and providers (065d43d)
Dependencies
- puppetlabs/stdlib (>= 2.3.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2013 Puppet Labs Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.