coretx
Version information
This version is compatible with:
- Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.0.0 < 5.0.0
- RHEL, CentOS, Debian, Ubuntu
Start using this module
Add this module to your Puppetfile:
mod 'astoyanov-coretx', '1.0.4'
Learn more about managing modules with a PuppetfileDocumentation
puppet-module-coretx
Description
A collection of parameterized classes for common resource management on Linux clients.
Designed and tested for use with an ENC.
Supported OS list: RHEL/CentOS/Debian/Ubuntu.
What does this module do?
Class coretx::identity - Manage user and group resources. User definition includes multiple SSH keys management via erb template.
Class coretx::cronjob - Manage user and system-wide Cron jobs. System crontab (/etc/crontab) is managed via erb template.
Class coretx::fsmounts - Manage file system mounts resources (/etc/fstab).
Class coretx::root - Manage the root super user account. Includes multiple SSH keys management via erb template (~/.ssh/authorized_keys).
Class coretx::hosts - Manage the hosts file (/etc/hosts) via erb template.
Class coretx::files - Manage file/folder resources.
Class coretx::yumrepos - Manage yum repositories on RedHat systems.
Class coretx::packages - Manage generic package resources states.
Class coretx::services - Manage generic service resource states.
Compatibility
This module supports Puppet v4 and above.
Tested on:
- RedHat EL 5/6/7
- Debian 6/7/8
- Ubuntu 16
Installing the module
Usage
Class coretx::identity
Manage user account and group resources - This class will overwrite individual user $home/.ssh/authorized_keys files!
Resource documentation (user): https://docs.puppet.com/puppet/latest/types/user.html
Resource documentation (group): https://docs.puppet.com/puppet/latest/types/group.html
Parameters
users_hash
Hash parameter which can be used for multi user resource management via create_resources().
Resource documentation (user): https://docs.puppet.com/puppet/latest/types/user.html
- Default: {}
- Note: The 'managehome' key/value is required for each nested user hash you want to trigger use of the SSH keys template
- Examples(YAML):
coretx::identity: users_hash: john: name: john ensure: present comment: Group admin groups:
- sudo
- nix-admins
password: '$1$324dfdsg$WIrstQFASIpxo3yy4Xjg80'
sysadmin:
name: sysadmin
ensure: present
home: '/home/sysadmin'
managehome: true
comment: System administrator
password_max_age: 90
password_min_age: 1
expiry: '2020-12-30'
groups:
- sudo
- nix-admins
password: '$1$324dfdsg$WIrstQFASIpxo3yy4Xjg80'
ssh_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfzq9TjTKQvylLeTkuCf9pE== root@localhost
testuser2:
name: testuser2
ensure: present
managehome: true
home: '/var/home/testuser2'
comment: This is a test user
ssh_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfzq9TjTKQvylLeTkuCf9pE95rc== testuser2@localhost
- ecdsa-sha2-nistp256 BBBBB3NzaC1yc2EAAAADAQABAAABAQDfzq9TjTKQvylLeTkuCf9== testuser2@localhost
users_defaults
Hash parameter which can be used to provide some default key values for $users_hash create_resources().
- Default: {}
- Examples(YAML):
coretx::identity: users_defaults: managehome: true groups:
- staff
- nix-admins
groups_hash
Hash parameter which can be used for multi group resource management via create_resources().
Resource documentation (group): https://docs.puppet.com/puppet/latest/types/group.html
- Default: {}
- Examples(YAML):
coretx::identity: groups_hash: staff: name: staff ensure: present nix-admins: name: nix-admins ensure: present gid: 2001
home_dir_parents
Hash parameter which can be used for multi folder resource management via create_resources().
You can use this to create parent directories for home folders if needed.
Resource documentation (file): https://docs.puppet.com/puppet/latest/types/file.html
- Default: {}
- Note: No recursion when creating directories, have to specify in hashed order
- Examples(YAML):
coretx::identity: home_dir_parents: /var/home: ensure: directory owner: root mode: '0774' /var/home/pub: ensure: directory owner: root mode: '0774'
Class coretx::cronjob
Manage user and system-wide Cron jobs (/etc/crontab) - This class will overwrite your system Crontab file!
Resource documentation (cron): https://docs.puppet.com/puppet/latest/types/cron.html
Parameters
user_cronjobs_hash
Hash parameter which can be used for multi user cron job resource management via create_resources().
Writes cron entries in individual user crontabs.
- Default: {}
- Note: Ommited time key/values ('minute', 'hour', etc) default to '*'. Ommited 'user' key/value defaults to 'root'
- Examples(YAML):
coretx::cronjob: user_cronjobs_hash: testjob1: name: testjob1 hour: 12 minute: 0 user: root command: reboot testjob2: name: testjob2 hour: 0 minute: 15 weekday: 1 user: sysadmin command: 'bash /var/scripts/montly-report.sh'
crontab_jobs_hash
Hash parameter which can be used for system Crontab file (/etc/crontab) management via erb template.
If this parameter is supplied a hash input, the class will detect the client OS (RedHat/Debian/Ubuntu) and write out a default template (coretx/crontab_deb.erb or coretx/crontab_el.erb)
- Default: {}
- Note: Ommited time schedule keys ('minute', 'hour', etc) default to '*'. Ommited 'user' key defaults to 'root'
- Examples(YAML):
coretx::cronjob: crontab_jobs_hash: testjob1: name: testjob1 hour: 12 minute: 0 user: root command: reboot testjob2: name: testjob2 hour: 0 minute: 15 weekday: 1 user: sysadmin command: 'bash /var/scripts/montly-report.sh'
override_crontab_template
String parameter which can be used to override what template to use, e.g when you are attempting to use this class on a client OS other than RedHat/Debian/Ubuntu.
You can also supply your own template, just need to copy it to the coretx/templates plugin folder.
- Default: 'use_defaults'
- Examples: 'coretx/crontab_deb.erb' , 'coretx/crontab_el.erb'
override_crontab_path
String parameter which can be used to override what PATH value to use on a provided template.
The class will detect and supply defaults for the client OS - RedHat/Debian/Ubuntu.
- Default: 'use_defaults'
- Example: '/usr/local/sbin:/usr/local/bin'
override_crontab_shell
String parameter which can be used to override what SHELL value to use on a provided template.
The class will detect and supply defaults for the client OS - RedHat/Debian/Ubuntu.
- Default: 'use_defaults'
- Example: '/bin/sh'
override_cron_service
String parameter which can be used to specify what CRON service name value is in use on the system for service ensure/enable states and refresh triggers.
The class will detect and supply defaults for the client OS - RedHat/Debian/Ubuntu.
- Default: 'use_defaults'
- Examples: 'cron' , 'crond'
crond_ensure
String parameter which can be used to specify the ensure state of the CRON service.
- Default: 'running'
- Examples: 'running' , 'stopped'
crond_enable
Boolean parameter which can be used to specify the enable state of the CRON service.
- Default: true
- Examples: true , false
Class coretx::fsmounts
Manage the filesystem mount states (/etc/fstab)
Resource documentation (mount): https://docs.puppet.com/puppet/latest/types/mount.html
Parameters
fsmounts_hash
Hash parameter which can be used to manage entries in (/etc/fstab) via create_resources().
- Default: {}
- Note: Some fs types require extra supporting packages installed on the system - e.g. nfs requires nfs-utils
- Examples(YAML):
coretx::fsmounts: fsmounts_hash: /mnt/exports: name: /mnt/exports ensure: mounted device: 192.168.99.200:/data fstype: nfs remounts: true options: ro /mnt/remote: name: /mnt/remote ensure: mounted device: 192.168.100.200:/data fstype: nfs remounts: true options: rw
fsmounts_dir_hash
Hash parameter which can be used for mount directory management via create_resources().
You can use this to create the mount directories on the local system, if needed.
- Default: {}
- Note: No recursion when creating directories. Hash directory resources are created before $fsmounts_hash mount resources
- Examples(YAML):
coretx::fsmounts: fsmounts_dir_hash: /mnt/exports: name: /mnt/exports ensure: directory /mnt/remote: name: /mnt/remote ensure: directory owner: root mode: '0775'
default_fsmounts_ensure
String parameter which can be used to specify the default 'ensure' key values in $fsmounts_hash
- Default: 'mounted'
- Examples: 'mounted' , 'unmounted' , 'present' , 'absent'
default_fsmounts_options
String parameter which can be used to specify the default 'options' key value.
You can specify multiple options in the same key as a single String, comma separated.
Check man pages for more details mount(8).
- Default: 'defaults'
- Examples: 'defaults' , 'rw' , 'ro' , 'suid' , 'dev' , 'exec' , 'auto' , 'nouser' , 'async' etc.
default_fsmounts_remounts
Boolean parameter which can be used too specify the default 'remounts' key value
- Default: true
- Examples: true , false
Class coretx::root
Manage the root superuser.
Resource documentation (user): https://docs.puppet.com/puppet/latest/types/user.html
Parameters
root_ssh_keys
Hash parameter which can be used to specify ssh keys in via provided erb template.
Overwrites the specified SSH keys file! (Default: /root/.ssh/authorized_keys)
- Default: {}
- Examples(YAML):
coretx::root: root_ssh_keys: Foreman Puppet-Master: ssh-keys:
- ecdsa-sha2-nistp256 BBBBB3NzaC1yc2EAAAADAQABAAABAQDfzq9TjTKQvylLeTkuCf9+BDaQgHCyAUEehLxJW6AkDa== foreman@localhost
- ssh-rsa zaC1yc2EAAAABJQAAAQEAqOk3yrDBjG9AGk2uGgQvE8nL7wEfZiLLo1CQ57m72a6B+U4A2qZ4Oz8d== foreman-proxy@localhost
John Smith:
ssh-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAqOk3yrDBjG9AGRmJVE4cpfcA/3lpjuZmZ4e0QRnRWPxQzhvC02U4+HpQ== jsmith@localhost
James Allen:
ssh-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAABJQAGV6yY5Tej1AiAV8Dvc7jmX92IxFZ5I1EdcY5l3YKcd7yJKvjBgW0kic== jallen@localhost
root_ssh_dir
String parameter which can be used to specify the ssh keys directory to create inside /root home directory.
- Default: '.ssh'
- Example: any qualified dir name as a string
root_ssh_keys_file
String parameter which can be used to specify the ssh keys file name to create inside /root/$root_ssh_dir directory.
- Default: 'authorized_keys'
- Examples: any qualified file name as a string
root_purge_ssh_keys
Boolean parameter which can be used to purge the SSH keys file contents for the root user.
- Default: false
- Note: Setting this key value to true will only have effect if $root_ssh_keys hash is empty
- Examples: true , false
root_acc_expiry
Use this String parameter to specify the root account expiry date.
- Default: undef
- Example: '2020-12-30'
root_passwd_hash
String parameter which can be used to specify the root account password in encrypted hashed format.
You can generate a salted encrypted password with the following:
- Default: undef
- Example: '$1$324dfdsg$WIrstQFASIpxo3yy4Xjg80'
root_passwd_max_age
String parameter which can be used to specify the root account password max age parameter in days as integer.
- Default: undef
- Example: '90'
root_passwd_min_age
String parameter which can be used to specify the root account password min age parameter in days as integer.
- Default: undef
- Example: '1'
Class coretx::hosts
Manage the hosts file (/etc/hosts) via erb template - This class will overwrite your hosts file!
Based off module chrekh/puppet-hosts - origin project url: https://github.com/chrekh/puppet-hosts
This class makes use of a custom fact (coretx/lib/facter/list_addrs.rb)
Parameters
hosts_file_entries
A hash with additional host file entries to add. Entries in this hash override automatic host entries for IP's on local interfaces.
The content can be either comment => { ip => [ names ], ... } or just ip => [ names ].
- Default: {}
- Examples(YAML):
coretx::hosts: hosts_file_entries: Foreman: 192.168.99.250:
- foreman-dev.lab.local
- puppet
- puppet.lab.local
Service nodes:
192.168.99.251:
- nfs-node1
192.168.99.252:
- nfs-node2
hosts_file
String parameter to specify the hosts file location.
- Default: '/etc/hosts'
hosts_file_group
String parameter to specify the hosts file group owner.
- Default: 'root'
lo_names4
List of names for localhost ip4 loopback.
- Default: [ 'localhost.localdomain', 'localhost', 'localhost4.localdomain4', 'localhost4' ]
lo_names6
List of names for localhost ip6 loopback.
- Default: [ 'localhost.localdomain', 'localhost', 'localhost6.localdomain6', 'localhost6' ]
primary_ipv4
List of IPv4 addresses. Empty list means no entry.
- Default: [ IPv4 addresses derived from local fact (no loopback or multicast) ]
primary_ipv6
List of IPv6 addresses. Empty list means no entry.
- Default: [ IPv6 addresses derived from local fact, defaults to linklocal if no global scope assigned to interface (no loopback or multicast) ]
primary_names
List of names for primary addresses.
- Default: [ $::fqdn, $::hostname ]
one_primary_ipv4
If true, only use the first address from primary_ipv4
- Default: true
one_primary_ipv6
If true, only use the first address from primary_ipv6
- Default: true
Class coretx::files
Manage file resources on client systems
Resource documentation (file): https://docs.puppet.com/puppet/latest/types/file.html
Resource documentation (file_line): https://forge.puppet.com/puppetlabs/stdlib#file_line
Parameters
files_hash
Hash parameter which can be used for multi file/folder resource management via create_resources().
You can put your own custom source files inside the coretx/files plugin directory and include them via with a 'source' key/value.
- Default: {}
- Examples(YAML):
coretx::files: fileshash: clientbucket.rb: name: clientbucket.rb path: '/root/clientbucket.rb' source: puppet:///modules/coretx/clientbucket.rb my_test_script.sh: name: my_test_script.sh path: '/var/scripts/my_test_script.sh' content: 'mysqldump -usysadmin --password=mypass --single-transaction > /backup/mysqlbackup${date}.sql' owner: sysadmin mode: '0700'
file_line_hash
Hash parameter which can be used to supply arguments to the file_line() stdlib function via create_resources().
The file_line() function can be used to modify line content in files by using regex match/replace.
- Default: {}
- Examples(YAML):
coretx::files: file_line_hash: '/etc/newrelic/nrsysmond.cfg': path: '/etc/newrelic/nrsysmond.cfg' match: "^license_key=" line: license_key=77f3fds0ZcsdfSA12400lNMc
create_parent_dirs
Boolean parameter which controls whether the class should also create the parent directories in $files_hash.
If true, scan the $files_hash parameter supplied hash for all "path" key/values and run a "mkdir -p" against each value.
Ensures all parent directories are created recursively.
- Default: false
- Examples: true , false
default_files_ensure
String parameter used as default value for $files_hash 'ensure' keys.
Can be overridden by specifying the 'ensure' key for each individual nested hash in $files_hash.
- Default: 'present'
- Examples: 'present' , 'absent' , 'file' , 'directory' etc.
default_files_owner
String parameter which can be used for specifying the default 'owner' key value for all nested hashes in $files_hash.
- Default: undef
default_files_group
String parameter which can be used for specifying the default 'group' key value for all nested hashes in $files_hash.
- Default: undef
default_files_mode
String parameter which can be used for specifying the default 'mode' key value for all nested hashes in $files_hash.
- Default: undef
Class coretx::yumrepos
Manage yum repository definitions for the RedHat family.
Resource documentation (yumrepo): https://docs.puppet.com/puppet/latest/types/yumrepo.html
Parameters
yumrepo_hash
Hash parameter which can be used to manage multiple yum repository resources via create_resources().
- Default: {}
- Examples(YAML):
coretx::yumrepos: yumrepo_hash: newrelic-repo: descr: Newrelic Yum repository baseurl: https://yum.newrelic.com/pub/newrelic/el5/x86_64/ puppet-pc1-el7: descr: Puppet Labs PC1 Repository el 7 baseurl: http://yum.puppetlabs.com/el/7/PC1/$basearch enabled: 1 gpgcheck: 0
default_yumrepo_enable
String parameter which can be used for specifying the default 'enable' key value for all nested hashes in $yumrepo_hash.
- Default: 1
default_gpgcheck_enable
String parameter which can be used for specifying the default 'gpgcheck' key value for all nested hashes in $yumrepo_hash.
- Default: 0
Class coretx::packages
Manage software package states.
Resource documentation (package): https://docs.puppet.com/puppet/latest/types/package.html
Parameters
packages_hash
Hash parameter which can be used to manage multiple package resources via create_resources().
- Default: {}
- Examples(YAML):
coretx::packages: packages_hash: nfs-utils: name: nfs-utils ensure: latest newrelic-sysmond: name: newrelic-sysmond ensure: purged
packages_hash_defaults
Hash parameter which can be used to specify default keys/values for $packages_hash input.
- Default: {}
- Examples(YAML):
coretx::packages: packages_hash_defaults: ensure: latest
Class coretx::services
Manage existing service states.
Resource documentation (service): https://docs.puppet.com/puppet/latest/types/service.html
Parameters
services_hash
Hash parameter which can be used to manage the state of multiple (existing) service resources via create_resources().
- Default: {}
- Examples(YAML):
coretx::services: services_hash: sshd: name: sshd enable: true ensure: running open-vm-tools: name: open-vm-tools enable: false ensure: stopped
default_service_ensure
String parameter which can be used for specifying the default 'ensure' key value for all nested hashes in $services_hash.
- Default: running
- Examples: stopped , running
default_service_enable
Boolean parameter which can be used for specifying the default 'enable' key value for all nested hashes in $services_hash.
- Default: true
- Examples: true , false
Dependencies
- puppetlabs/stdlib (>= 2.0.0 < 5.0.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 {yyyy} {name of copyright owner} 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.